/* 管理后台：沿用产品令牌，主按钮用品牌深蓝，登录页用深蓝底 + 天蓝光晕 + 橙色强调 */
.primary {
  background: var(--accent-fill);
  color: var(--on-accent);
  border-color: transparent;
  justify-content: center;
  font-weight: 600;
}
.primary:hover {
  border-color: transparent;
  filter: brightness(1.1);
}
.dangerbtn {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.28);
}
.dangerbtn:hover {
  background: rgba(239, 68, 68, 0.16);
}
.sign {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(60% 70% at 12% 8%, rgba(44, 156, 253, 0.55) 0%, transparent 60%),
    radial-gradient(40% 50% at 100% 100%, rgba(252, 164, 44, 0.22) 0%, transparent 60%),
    #0e2035;
}
.signin {
  width: min(400px, 92vw);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.signin:before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #045cac, #2c9cfd 55%, #fca42c);
}
.signin .brand {
  padding: 0;
  height: auto;
  margin-bottom: 34px;
  color: var(--fg);
}
.signin h1 {
  font-size: 28px;
}
.signin form {
  padding: 24px 0 0;
}
.signin button {
  width: 100%;
}
output {
  display: block;
  color: var(--strike-text);
  margin-top: 10px;
  font-size: 13px;
}
#fields {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#edit .primary {
  min-width: 80px;
}
.mark {
  object-fit: contain;
  background: white;
  border-radius: 8px;
}
.titleactions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.actionrow {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.actionrow button,
#logout,
#refresh {
  font-size: 12px;
  padding: 5px 9px;
}
.empty {
  padding: 48px 20px;
  color: var(--muted);
}
.tablewrap td {
  max-width: 320px;
  overflow-wrap: anywhere;
  white-space: normal;
}
.kpis:empty {
  display: none;
}
label input,
label select,
label textarea {
  min-width: 0;
}
.caption {
  font-size: 11px;
  color: var(--sub);
}
.pill {
  display: inline-block;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--positive);
  background: var(--positive-soft);
}
.pill.off {
  color: var(--sub);
  background: var(--well);
}
.pill.info {
  color: #045cac;
  background: rgba(4, 92, 172, 0.1);
}
.pill.warn {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
}
.pill.err {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.14);
}
#fields input,
#fields select,
#fields textarea {
  background: var(--recess);
  border: 1px solid var(--line, rgba(15, 23, 42, 0.14));
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--fg);
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
}
#fields textarea {
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}
#dialog {
  width: min(520px, 94vw);
}
.checkgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: var(--recess);
  border: 1px solid var(--line, rgba(15, 23, 42, 0.12));
  max-height: 160px;
  overflow: auto;
}
.checkgrid label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  cursor: pointer;
}
.checkgrid input[type="checkbox"] {
  width: auto;
  margin: 0;
}
.fieldgroup-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--sub);
  margin-bottom: 4px;
}
.userfilter {
  height: 32px;
  padding: 0 28px 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line, rgba(15, 23, 42, 0.14));
  background: var(--surface, #fff);
  color: var(--fg);
  font-size: 13px;
  cursor: pointer;
}
.userfilter[hidden],
.effcontrols[hidden],
button[hidden] {
  display: none;
}
.effcontrols {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.segmented {
  display: inline-flex;
  border: 1px solid var(--line, rgba(15, 23, 42, 0.14));
  border-radius: 8px;
  overflow: hidden;
  background: var(--recess);
}
.segbtn {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 5px 11px;
  font-size: 12px;
  color: var(--sub);
  cursor: pointer;
}
.segbtn.active {
  background: var(--accent-fill);
  color: var(--on-accent);
  font-weight: 600;
}
.checktoggle {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--fg);
  cursor: pointer;
  user-select: none;
}
.checktoggle input {
  width: auto;
  margin: 0;
}
.kpi-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--sub);
  font-weight: 400;
}
.money {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--fg);
}
.money-est {
  font-variant-numeric: tabular-nums;
  color: var(--sub);
}
.taglist {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--well);
  color: var(--fg);
}
.codecell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--sub);
  word-break: break-all;
}
.logdialog {
  width: min(860px, 92vw);
  max-height: 86vh;
  padding: 22px 24px;
}
.loghead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.logpre {
  margin: 0;
  padding: 14px;
  max-height: 62vh;
  overflow: auto;
  border-radius: 10px;
  background: #0e1726;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}
.sharepage {
  min-height: 100svh;
  background: #f3f6fa;
  padding: 28px 16px;
}
.sharewrap {
  max-width: 820px;
  margin: 0 auto;
}
.sharecard {
  padding: 28px;
}
.sharehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.sharehead .brand {
  padding: 0;
  height: auto;
}
.shareitems {
  margin: 20px 0;
}
.reviewform {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line, rgba(15, 23, 42, 0.1));
}
.reviewform textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line, rgba(15, 23, 42, 0.16));
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface, #fff);
  color: var(--fg);
  font-size: 13px;
}
.reviewactions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
/* 首页看板：按天趋势小图（纯 SVG）、可排序表头、页面级日期筛选 */
#charts:empty {
  display: none;
}
.trends {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.trend {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  padding: 14px 16px 10px;
}
.trend-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.trend-head strong {
  font-size: 15px;
  color: var(--fg);
}
.trend svg {
  display: block;
  width: 100%;
  height: 72px;
  margin-top: 8px;
}
.trend rect {
  fill: var(--accent);
  opacity: 0.85;
}
.trend rect:hover {
  opacity: 1;
}
.trend-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--sub);
  margin-top: 4px;
}
.sorthead {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.sorthead.active {
  color: var(--accent);
}
.dateinput {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.dateinput input {
  font-size: 12px;
  padding: 4px 6px;
}
.orgname.lv2 {
  padding-left: 20px;
}
.orgname.lv3 {
  padding-left: 40px;
}
.orgname.lv2:before,
.orgname.lv3:before {
  content: "└ ";
  color: var(--sub);
}
div.orgname:before {
  content: none;
}
.acctgrid {
  max-height: 260px;
  overflow: auto;
}
@media (max-width: 860px) {
  .trends {
    grid-template-columns: minmax(0, 1fr);
  }
}
.nowrap {
  white-space: nowrap;
}
/* 看板 / 日志页的筛选控件较多：标题不折行，工具栏整体换行靠右 */
.cardhead {
  flex-wrap: wrap;
}
.cardhead h2 {
  white-space: nowrap;
}
.tabletools {
  flex-wrap: wrap;
  justify-content: flex-end;
}
#pageTools {
  flex-wrap: wrap;
}

/* 客户端日志附带的截图（视频号授权失败时的小程序页面等） */
.logimages { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; }
.logimages a { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; font-size: 12px; }
.logimages img { max-height: 240px; max-width: 320px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
