:root {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #162334;
  background: #f6f8fa;
  font-synthesis: none;
  --surface: #fff;
  --ink: #162334;
  --muted: #546476;
  --line: #dce3ea;
  --accent: #116658;
  --soft: #eaf5f0;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
a { color: inherit; }
button, select { font: inherit; }
button, select, .button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 4vw, 2rem); line-height: 1.15; letter-spacing: -.025em; }
h2 { font-size: 1rem; line-height: 1.4; }
.muted { color: var(--muted); }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 64px; max-width: 1280px; margin: auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-inner > .muted { font-size: .87rem; overflow-wrap: anywhere; text-align: right; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 720; white-space: nowrap; text-decoration: none; }
.brand-mark { width: 31px; height: 31px; display: inline-flex; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 8px; border-radius: 9px; background: var(--accent); }
.brand-mark i { width: 3px; border-radius: 2px; background: white; height: 6px; }
.brand-mark i:nth-child(2) { height: 11px; }
.brand-mark i:nth-child(3) { height: 15px; }
.login-layout { display: grid; justify-items: center; align-content: start; min-height: calc(100svh - 65px); padding: clamp(30px, 9vh, 96px) 16px 40px; }
.login-card { width: min(100%, 440px); padding: clamp(22px, 6vw, 36px); border: 1px solid var(--line); background: var(--surface); border-radius: 20px; text-align: center; box-shadow: 0 12px 40px #263e5710; }
.intro { margin-top: 10px; font-size: .93rem; line-height: 1.55; }
.qr-stage { margin: 24px auto 13px; width: 224px; max-width: 100%; aspect-ratio: 1; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.qr-stage img { display: block; max-width: 100%; height: auto; }
.qr-code-line { font-size: .87rem; min-height: 24px; color: var(--muted); }
.qr-code-line strong { margin-left: 6px; color: var(--ink); font: 700 1rem ui-monospace, monospace; letter-spacing: .11em; }
.qr-footer { min-height: 38px; display: flex; justify-content: center; flex-wrap: wrap; align-items: center; column-gap: 10px; font-size: .81rem; }
.text-button { color: var(--accent); border: 0; padding: 8px 0; background: transparent; font-weight: 650; }
.methods { margin-top: 14px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.methods .button { flex: 1 1 124px; }
.button, select { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 9px 13px; min-height: 40px; font-size: .88rem; font-weight: 650; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none; }
.button:hover, select:hover { border-color: var(--accent); }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button.primary:hover { background: #0d5146; }
.google-g { color: #155dc7; font: 750 1.05rem Arial, sans-serif; }
.message { background: var(--soft); color: var(--accent); padding: 11px 13px; border-radius: 8px; font-size: .88rem; line-height: 1.5; margin: 12px 0; }
.message[data-error="true"] { background: #fff0ee; color: #973519; }
.workspace { display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: 28px; max-width: 1280px; margin: auto; padding: 30px 28px 48px; }
.sidebar { display: grid; align-content: start; gap: 3px; }
.site-label { padding: 11px 12px 14px; font-weight: 700; white-space: nowrap; }
.site-label span { display: inline-block; vertical-align: 2px; width: 7px; height: 7px; margin-right: 4px; background: var(--accent); border-radius: 50%; }
.sidebar button { padding: 11px 12px; color: var(--muted); text-align: left; white-space: nowrap; border: 0; border-radius: 8px; background: transparent; }
.sidebar button:hover, .sidebar [aria-current="page"] { background: var(--soft); color: var(--accent); font-weight: 650; }
.page-heading, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.page-heading { margin-bottom: 24px; }
.page-heading p { margin-top: 6px; font-size: .85rem; }
.actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.view, .metrics { display: grid; gap: 14px; }
.metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.panel, .metric { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 18px; }
.metric p { font-size: .82rem; color: var(--muted); }
.metric strong { font-size: clamp(1.04rem, 2.1vw, 1.62rem); letter-spacing: -.025em; display: block; margin: 7px 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.metric .change-up { color: var(--accent); }
.metric .change-down { color: #973519; }
.panel > .muted { margin: 8px 0 18px; }
canvas { display: block; width: 100%; height: clamp(185px, 30vw, 280px); margin-top: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: .9rem; }
th { font-weight: 650; color: var(--muted); }
th, td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
.sources { margin: 14px 0 0; padding: 0; list-style: none; }
.sources li { display: grid; grid-template-columns: minmax(76px, .35fr) minmax(60px, 1fr) minmax(50px, .25fr); gap: 12px; align-items: center; padding: 8px 0; font-size: .88rem; }
.sources li strong { text-align: right; }
progress { width: 100%; accent-color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 970px) { .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .topbar-inner { padding: 0 16px; }
  .workspace { grid-template-columns: 1fr; gap: 18px; padding: 14px 16px 30px; }
  .sidebar { display: flex; overflow-x: auto; padding: 3px; }
  .sidebar .site-label { display: none; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel, .metric { padding: 13px; }
}
