:root {
  color-scheme: light;
  --ground: #f8f9fb;
  --surface: #fff;
  --ink: #17191e;
  --muted: #5e636d;
  --border: #e4e6ea;
  --control: #cdd0d6;
  --accent: #b91b42;
  --accent-ink: #941134;
  --accent-soft: #fceef2;
  --positive: #1f684a;
  --warning: #854610;
  --radius: 8px;
  font: 14px/1.5 "DM Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--ground);
}
* { box-sizing: border-box; }
body { margin: 0; display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100svh; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: fixed; top: -100px; left: 16px; z-index: 4; background: white; padding: 12px; }
.skip:focus { top: 12px; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); }
.brand { min-height: 64px; display: flex; gap: 10px; align-items: center; padding: 0 22px; border-bottom: 1px solid var(--border); }
.brand strong { display: block; font-size: 17px; line-height: 1.2; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 6px; background: var(--ink); color: white; font-weight: 700; font-size: 14px; }
nav { display: grid; gap: 5px; padding: 23px 14px; }
nav a { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 12px; text-decoration: none; color: var(--muted); border-radius: 6px; }
nav a:hover { background: var(--ground); }
nav a[aria-current] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.nav-count { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; }
.nav-icon { width: 17px; height: 17px; display: inline-grid; flex: none; place-items: center; font-size: 18px; line-height: 1; }
.grid::before { content: "⊞"; }
.bell { position: relative; }
.bell::before { content: ""; width: 10px; height: 10px; border: 1.5px solid currentColor; border-radius: 7px 7px 3px 3px; }
.bell::after { content: ""; width: 4px; height: 1px; background: currentColor; position: absolute; bottom: 0; left: 6.5px; }
.bolt::before { content: "ϟ"; }
.account::before { content: "◎"; }
.sidebar-foot { margin-top: auto; padding: 20px 22px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.topbar { height: 64px; display: flex; justify-content: space-between; align-items: center; padding: 0 29px; background: var(--surface); border-bottom: 1px solid var(--border); font-weight: 600; }
.demo { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 500; }
.demo i, .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; flex: none; }
main { max-width: 1480px; margin: 0 auto; padding: 28px 29px 50px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; letter-spacing: -.04em; line-height: 1.25; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
.page-head, .panel-head, .actions, .row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-head { margin-bottom: 22px; flex-wrap: wrap; }
.page-head p, .panel-head p { margin-top: 5px; }
.muted, .meta { color: var(--muted); }
.meta { font-size: 12px; }
.actions { justify-content: flex-start; flex-wrap: wrap; }
button, select, input { min-height: 36px; border: 1px solid var(--control); border-radius: 6px; background: var(--surface); padding: 6px 11px; }
button:hover, select:hover { background: var(--ground); }
.primary { background: var(--ink); border-color: var(--ink); color: white; }
.primary:hover { background: #34363d; }
.text-button { border: none; padding: 4px 0; background: transparent; color: var(--accent-ink); font-weight: 600; text-align: left; }
.text-button:hover { background: transparent; text-decoration: underline; }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.panel-head { padding: 17px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.metric { padding: 17px 20px; border-right: 1px solid var(--border); }
.metric:last-child { border: 0; }
.metric span { display: block; color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin: 4px 0; font-size: 25px; line-height: 1.25; font-weight: 650; font-variant-numeric: tabular-nums; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(255px, 1fr); gap: 20px; margin-bottom: 20px; align-items: stretch; }
.chart { padding: 15px 20px 10px; }
.chart canvas { width: 100%; height: 196px; display: block; }
.chart-key { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.chart-key .dot { margin-right: 6px; }
.chart-data { padding-top: 7px; }
.chart-data summary { cursor: pointer; color: var(--muted); width: fit-content; font-size: 12px; }
.chart-data ul { display: grid; gap: 4px; margin: 8px 0; padding-left: 20px; }
.feed { margin: 0; padding: 0 20px; list-style: none; }
.feed li { padding: 13px 0; border-bottom: 1px solid var(--border); }
.feed li:last-child { border: 0; }
.feed a { display: block; text-decoration: none; font-weight: 600; }
.feed a:hover { color: var(--accent-ink); }
.feed .meta { margin-top: 4px; }
.pill { display: inline-block; border-radius: 4px; padding: 2px 7px; white-space: nowrap; color: var(--muted); background: var(--ground); font-size: 12px; font-weight: 500; }
.pill.good { color: var(--positive); background: #edf6f1; }
.pill.attention { color: var(--accent-ink); background: var(--accent-soft); }
.pill.warning { color: var(--warning); background: #fbf2e5; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 12px; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; white-space: nowrap; }
.identity { min-width: 175px; }
.identity small { display: block; color: var(--muted); }
.empty, .notice { padding: 17px 20px; color: var(--muted); }
.notice { background: var(--accent-soft); border-radius: var(--radius); margin-bottom: 18px; color: var(--accent-ink); }
.stack { display: grid; gap: 20px; }
.list { display: grid; gap: 0; }
.list article { padding: 17px 20px; border-bottom: 1px solid var(--border); scroll-margin-top: 16px; }
.list article:last-child { border: 0; }
.list article:target { background: var(--accent-soft); }
.list article p { margin: 6px 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
dialog { width: min(620px, calc(100% - 32px)); max-height: 90vh; border: 1px solid var(--border); color: var(--ink); border-radius: var(--radius); padding: 22px; }
dialog::backdrop { background: #17191e66; }
dialog h2 { overflow-wrap: anywhere; }
.dialog-body { margin-top: 15px; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 5px; }
.form input, .form select { width: 100%; }
.form .actions { justify-content: flex-end; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toast { position: fixed; right: 24px; bottom: 22px; background: var(--ink); color: white; border-radius: 6px; padding: 10px 14px; z-index: 3; }
@media (max-width: 1040px) {
  body { grid-template-columns: 175px minmax(0, 1fr); }
  main { padding-inline: 20px; }
  .overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  body { display: block; padding-bottom: 60px; }
  .sidebar { position: static; height: auto; border: 0; }
  .brand { min-height: 54px; padding-inline: 16px; }
  .sidebar-foot, .topbar > span:first-child { display: none; }
  nav { position: fixed; z-index: 2; bottom: 0; left: 0; right: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 4px 5px; background: white; border-top: 1px solid var(--border); }
  nav a { min-height: 46px; justify-content: center; position: relative; flex-direction: column; gap: 1px; padding: 3px; white-space: nowrap; font-size: 12px; }
  .nav-count { position: absolute; left: calc(50% + 10px); top: 2px; }
  .topbar { position: absolute; top: 0; right: 0; padding-inline: 16px; height: 54px; background: transparent; border: 0; }
  main { padding: 20px 16px 28px; }
  h1 { font-size: 23px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { padding: 13px 15px; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .metric strong { font-size: 22px; }
  button, select, input { min-height: 44px; }
  .table-scroll table { min-width: 615px; }
  .toast { bottom: 66px; right: 12px; }
}
.list article.highlight { background: var(--accent-soft); }
@media (min-width: 681px) {
  .table-scroll table { min-width: 590px; }
}
.top-actions { flex-wrap: nowrap; }
#language { font-size: 13px; }
.account-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 20px; align-items: start; }
.account-form { padding: 17px 20px; }
.account-layout h3 { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 920px) {
  .account-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .top-actions { gap: 7px; }
  #language { padding-inline: 6px; }
}
@media (max-width: 355px) {
  .top-actions .demo { display: none; }
}
.login-shell { max-width: 470px; margin: 56px auto 0; display: grid; gap: 16px; }
.login-shell .page-head { margin-bottom: 0; }
.login-shell > button { justify-self: start; }
.team { position: relative; }
.team::before { content: ""; position: absolute; top: 1px; width: 5px; height: 5px; border: 1.5px solid currentColor; border-radius: 50%; }
.team::after { content: ""; position: absolute; bottom: 1px; width: 12px; height: 6px; border: 1.5px solid currentColor; border-radius: 7px 7px 3px 3px; }
.member-list h3 { min-width: 0; overflow-wrap: anywhere; }
.member-list code { overflow-wrap: anywhere; }
@media (max-width: 680px) {
  body:has(nav [data-page="members"]:not([hidden])) nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .top-actions:has(#sign-out:not([hidden])) .demo { display: none; }
  .show-login { padding-bottom: 0; }
  .login-shell { margin-top: 24px; }
}
