:root {
  --bg:#f7f8fc; --bg-2:#f4f6fa; --panel:#fff; --line:#dbe0ec; --line-2:#e9ecf3;
  --txt:#202537; --sub:#606a80; --mute:#707b90;
  --brand:#455da9; --brand-2:#354e9d; --brand-weak:#eff3fc;
  --brand-glow:#455da920; --ring:0 0 0 3px #455da925; --radius:10px; --radius-sm:7px;
  --shadow-sm:0 2px 7px #263b6704; --shadow:0 3px 18px #263b6708;
}
body {background:var(--bg);color:var(--txt);font-family:Inter,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
:focus-visible {outline:2px solid var(--brand);outline-offset:2px}
.side {width:204px;flex:0 0 204px;height:100dvh;background:white;border-right:1px solid var(--line);color:var(--sub)}
.side .brand {min-height:78px;padding:15px 20px;color:var(--txt);border-bottom:1px solid var(--line);gap:12px}
.brand img,.login-card img {width:40px;height:40px;border-radius:10px;object-fit:cover}
.brand span,.side-bottom>span:last-child {display:grid}
.brand strong {font-size:19px;line-height:1.3;letter-spacing:.04em}
.brand small,.side-bottom small {font-size:12px;font-weight:450;color:var(--sub)}
.side nav {display:block;padding:12px;scrollbar-width:thin}
.side nav h2 {font-size:12px;font-weight:500;color:var(--mute);margin:10px 12px 7px}
.side nav section {border-top:1px solid var(--line);padding-top:4px;margin-top:12px}
.side nav a {color:var(--sub);font-size:14px;font-weight:550;padding:8px 12px;border:1px solid transparent;border-radius:6px;gap:12px}
.side nav a svg {width:17px;height:17px;flex:none}
.side nav a:hover {background:var(--bg);color:var(--brand)}
.side nav a.on {color:var(--brand);background:var(--brand-weak);border-color:#d5dff6;box-shadow:none;font-weight:650}
.side-bottom {display:flex;align-items:center;gap:10px;padding:13px 20px;border-top:1px solid var(--line);font-size:13px}
.profile-avatar {border:1px solid var(--line);background:var(--bg-2);width:34px;height:34px;display:grid;place-items:center;border-radius:8px;color:var(--sub)}
.nav-toggle {display:none}
.topbar {background:#fff;backdrop-filter:none;height:58px;min-height:58px;padding:0 clamp(18px,2.3vw,45px)}
.console-name {font-size:13px;color:var(--sub);white-space:nowrap}
.account-tools,.function-search,.panel-head,.page-heading,.trend-readout {display:flex;align-items:center}
.account-tools {gap:10px}
.function-search {position:relative;gap:6px;border:1px solid var(--line);border-radius:7px;background:var(--bg);padding:3px 6px;width:min(180px,20vw);color:var(--sub)}
.function-search input {min-width:0;border:0;background:transparent;box-shadow:none;font-size:12px;padding:3px}
.function-search:focus-within {outline:2px solid #cad6f3}
.function-search input:focus {outline:0;background:transparent;box-shadow:none}
.function-search svg {width:15px;flex:none}
.search-go {padding:1px 5px;background:white;color:var(--sub);border:1px solid var(--line);box-shadow:none}
.function-results {position:absolute;top:calc(100% + 5px);right:0;width:max(100%,180px);padding:6px;background:white;border:1px solid var(--line);border-radius:7px;box-shadow:var(--shadow);z-index:5;max-height:280px;overflow:auto}
.function-results button {display:block;width:100%;background:white;color:var(--txt);text-align:left;box-shadow:none}
.function-results button:hover {background:var(--brand-weak)}
.desk-layout {width:min(100%,1610px);margin:0 auto;padding:22px clamp(22px,4.4vw,88px) 48px;min-width:0}
.page-heading {justify-content:space-between;margin-bottom:18px}
.page-heading h1 {margin:0;font-size:28px;letter-spacing:-.035em;line-height:1.5}
.page-heading time {font-size:12px;color:var(--sub);font-variant-numeric:tabular-nums}
.page {padding:0;grid-template-columns:minmax(0,1fr);gap:17px}
.page .card,.split>* {min-width:0}
.card {border-color:var(--line);box-shadow:var(--shadow-sm)}
.card-h {flex-wrap:wrap}
.tbl-wrap {border-radius:0 0 9px 9px}
th {background:#f4f6fa}
button,.btn {border-radius:6px}
button.ghost:hover,button.line:hover,.tabs button {background:var(--brand-weak)}
button.line:hover,input:hover,select:hover,textarea:hover,.list .item:hover {border-color:#aab8d7}
button:focus-visible {outline:2px solid var(--brand)}
.tabs button.on {background:var(--brand)}
.kpi::before {background:var(--brand)}
.login-page {background:var(--bg)}
.login-card {border-radius:12px;box-shadow:var(--shadow)}
.login-card h1 b {width:40px;height:40px;background:none;box-shadow:none;flex-basis:40px}.login-card h1 img {width:100%;height:100%;border-radius:10px;object-fit:cover}
.login-card .row {flex-wrap:nowrap}
.login-card .row input {min-width:0}
.login-card .row button {width:auto;white-space:nowrap}
.metrics {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.metric {display:flex;flex-direction:column;min-width:0;padding:16px 18px 14px;background:white;color:var(--txt);border:1px solid var(--line);border-radius:10px;font-variant-numeric:tabular-nums}
.metric:first-child {background:var(--brand-weak);border-color:#d2dcf6}
.metric:hover {border-color:#9fafda;box-shadow:var(--shadow)}
.metric-label,.metric-foot {display:flex;align-items:center;justify-content:space-between;gap:6px;color:var(--sub)}
.metric-label {font-size:13px}
.metric-label span {font-size:15px}
.metric strong {display:block;margin:8px 0 14px;line-height:1.25;font-size:clamp(22px,2.15vw,38px);letter-spacing:-.055em;overflow-wrap:anywhere}
.metric:first-child strong {color:var(--brand)}
.metric-foot {margin-top:auto;padding-top:9px;border-top:1px solid var(--line);font-size:12px;flex-wrap:wrap}
.metric-foot b {color:var(--txt);font-weight:600}
.charts {display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:16px}
.panel-head,.distribution {padding:17px 20px}
.panel-head {justify-content:space-between;gap:8px;flex-wrap:wrap}
.panel-head h2,.distribution h2 {font-size:17px;line-height:1.5;margin:0;letter-spacing:-.025em}
.series-key {display:flex;gap:12px;color:var(--sub);font-size:12px}
.series-key span:before {content:"";display:inline-block;vertical-align:middle;width:12px;border-top:3px solid var(--brand);margin-right:5px}
.series-key span:nth-child(2):before {border-top:2px dashed #8090a8}
.trend-plot {margin:2px 16px;min-height:192px}
.trend-plot svg {width:100%;height:192px;display:block}
.trend-plot text {fill:var(--sub);font-size:10px;font-variant-numeric:tabular-nums}
.grid-rule {stroke:#d7deed;stroke-dasharray:3 4}
.trend-readout {padding:8px 20px 13px;justify-content:space-between;gap:10px}
.trend-readout select {width:auto;padding:5px 30px 5px 10px;font-size:12px;border-radius:5px;background-color:var(--bg)}
.trend-readout output,.trend-details summary {font-size:12px;color:var(--sub)}
.trend-details {border-top:1px solid var(--line)}
.trend-details summary {padding:10px 20px;cursor:pointer}
.distribution p {margin:8px 0 13px;color:var(--sub);font-size:12px}
.distribution strong {font-size:23px;color:var(--txt);margin-left:6px;letter-spacing:-.04em}
.distribution th,.distribution td {padding:8px 0;background:white;position:static}
.distribution tbody th {font-weight:500;color:var(--txt);font-size:13px}
.distribution td:nth-child(2) {width:38%}
.distribution tbody tr:last-child th {border:0}
.bar-track {height:6px;border-radius:4px;overflow:hidden;background:var(--bg-2)}
.bar-track i {display:block;height:100%;border-radius:inherit;background:#aab7d6}
.distribution tr:first-child .bar-track i {background:var(--brand)}
.overview-list .panel-head {border-bottom:1px solid var(--line);padding-block:12px}
.overview-list h2 small {display:inline-block;margin-left:7px;font-size:12px;padding:1px 6px;color:var(--brand);background:var(--brand-weak);border-radius:4px;vertical-align:middle}
.section-link {padding:5px 9px;border:1px solid var(--line);border-radius:5px;color:var(--txt);font-size:12px}
.section-link:hover {background:var(--brand-weak);color:var(--brand)}
.section-link span {margin-left:5px}
@media(max-width:1100px) {
  .side {width:178px;flex-basis:178px}
  .desk-layout {padding-inline:22px}
  .topbar .who {display:none}
  .metric {padding-inline:13px}
}
@media(max-width:850px) {
  .metrics {grid-template-columns:repeat(2,minmax(0,1fr))}
  .charts {grid-template-columns:1fr}
  .topbar .badge {display:none}
}
@media(max-width:680px) {
  .app {display:block}
  .side {position:relative;width:100%;height:auto;display:grid;grid-template-columns:1fr auto;align-items:center;border-right:0;border-bottom:1px solid var(--line)}
  .side .brand {border:0;min-height:58px;padding:8px 15px;gap:8px}
  .brand img {height:32px;width:32px}
  .brand strong {font-size:15px}
  .brand small {font-size:11px}
  .nav-toggle {display:block;margin-right:14px;padding:6px 10px;font-size:12px}
  .side nav,.side-bottom {display:none}
  .nav-toggle[aria-expanded="true"] + nav {display:block;grid-column:1/-1;max-height:65dvh;overflow:auto;border-top:1px solid var(--line)}
  .topbar {position:relative;padding:0 14px;height:48px;min-height:48px;gap:7px}
  .function-search {width:min(170px,42vw)}
  .desk-layout {padding:16px 12px 32px}
  .page-heading {margin-bottom:12px}
  .page-heading h1 {font-size:23px}
  .metrics,.charts,.page {gap:10px}
  .metric {padding:12px}
  .metric strong {font-size:24px}
  .panel-head,.distribution {padding:14px}
  .trend-plot {margin-inline:6px}
  .tbl-wrap th {white-space:nowrap}
  .kpis {grid-template-columns:repeat(2,minmax(0,1fr))}
  .row.grow {min-width:0}
}
