:root {
  color-scheme: dark;
  --surface: #15151b;
  --surface-raised: #1b1b23;
  --surface-hover: #22222c;
  --line: #2a2a33;
  --blue: #a29bff;
  --accent: #a29bff;
  --ink: #edecf2;
  --muted: #9998a6;
  --green: #78c99e;
  font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  color: var(--ink);
  background: #0a0a0f;
}
body { background: #0a0a0f; color: var(--ink); font-variant-numeric: tabular-nums; }
button, input, select, textarea { color-scheme: dark; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #a29bff; outline-offset: 2px; }
.sidebar { width: 224px; background: linear-gradient(180deg, #191622 0%, #121118 38%, #101015 100%); border-color: #302b3b; }
.brand { height: 68px; flex-shrink: 0; padding: 0 20px; color: #f0eff6; border-color: #302b3b; font-size: 15px; letter-spacing: -.02em; }
.sidebar > .brand { height: 64px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: #38314b; color: #ded9ff; border: 1px solid #625b7b; font-size: 16px; }
.brand small { color: #747280; font-size: 9px; letter-spacing: .08em; }
.nav { flex: 1; min-height: 0; padding: 12px 12px 24px; scrollbar-color: #494052 transparent; }
.nav-label { padding: 18px 12px 8px; color: #888494; font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.nav-button { position: relative; height: 40px; gap: 12px; padding: 0 12px; border-radius: 6px; color: #b7b5c1; font-size: 13px; transition: background .16s ease, color .16s ease; }
.nav-button:hover, .nav-child:hover { background: #292630; color: #f1effa; }
.nav-button.active, .nav-child.active { background: #3a334c; color: #f0edff; font-weight: 600; }
.nav-button.active::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: #b6a8ed; }
.nav-parent { margin-top: 4px; font-weight: 550; }
.nav-parent.current-parent { color: #e5e3ef; }
.nav-icon { width: 18px; color: #92909f; display: grid; place-items: center; }
.nav-button.active .nav-icon { color: #b5aeff; }
.nav-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-children { margin: 2px 0 8px; padding: 0; border: 0; }
.nav-child { position: relative; height: 36px; padding: 0 12px 0 42px; color: #a5a2b0; transition: background .16s ease, color .16s ease; }
.nav-child.active { background: #302b3c; color: #f0edff; }
.nav-child.active::after { content: ''; position: absolute; left: 13px; top: 11px; bottom: 11px; width: 2px; border-radius: 2px; background: #b6a8ed; }
:root .nav-parent .nav-chevron { width: 14px; height: 14px; margin-left: auto; flex: none; fill: none; stroke: #777583; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transform: rotate(-90deg); transition: transform .16s ease; }
.nav-parent[aria-expanded="true"] .nav-chevron { transform: rotate(0); }
.sidebar-foot { color: #696875; border-color: #292930; }
.main {
  background:
    radial-gradient(ellipse 950px 700px at 87% 10%, rgba(127, 105, 176, .48), transparent 72%),
    radial-gradient(ellipse 820px 620px at 22% 75%, rgba(91, 88, 151, .28), transparent 74%),
    #0a0a0f;
}
.topbar { height: 64px; padding: 0 32px; background: #0e0e13; border-color: #26262e; }
.metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 720px) { .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.list-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 0 0; color: #9395a3; font-size: 12px; }
.list-pagination .btn { min-height: 30px; padding: 5px 10px; }
.list-pagination .btn:disabled { opacity: .45; cursor: not-allowed; }
.breadcrumb { color: #858490; }
.breadcrumb strong { color: #dfdee7; font-weight: 550; }
.top-actions { color: #aaa9b6; }
.theme-toggle { width: 34px; height: 34px; display: inline-grid; place-items: center; flex: none; border: 1px solid #36343f; border-radius: 7px; background: #1b1b22; color: #c2bdcf; cursor: pointer; }
.theme-toggle:hover { background: #2a2832; color: #f1eef9; }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-main { position: relative; }
.login-theme { position: absolute; top: 24px; right: 32px; }
.avatar { background: #292735; color: #c3bfff; border-radius: 9px; }
.account-dropdown { position: relative; }
.account-trigger { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border: 0; border-radius: 7px; background: transparent; color: inherit; }
.account-trigger:hover { background: var(--surface-hover); }
.account-chevron { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.account-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 100; min-width: 140px; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 8px 24px #0003; }
.account-menu[hidden] { display: none; }
.account-menu button { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 5px; background: transparent; color: var(--ink); text-align: left; }
.account-menu button:hover, .account-menu button:focus-visible { background: var(--surface-hover); }
.content { padding: 24px 36px 64px; }
.content .page-head, .content .sl-head, .content .tkt-top { margin-bottom: 14px; }
.page-title, .sl-head h1, .tkt-top h1 { color: #f2f1f6; font-weight: 650; letter-spacing: -.025em; }
.page-subtitle, .sl-head p, .tkt-top p { color: #92919e; }
.panel, .metric { background: rgba(20, 20, 25, .92); border: 1px solid #33303b; border-radius: 8px; box-shadow: none; }
.panel-head h2, .section-title { color: #e7e6ed; }
.muted { color: #92919e; }
.btn { background: #1c1c24; border-color: #34343e; color: #d6d4df; }
.btn:hover { background: #282832; border-color: #4a485b; color: #f2f1f8; }
.btn-primary { color: #16131f; background: #ada6f4; border-color: #ada6f4; font-weight: 600; }
.btn-primary:hover { color: #15121d; background: #beb8ff; border-color: #beb8ff; }
.btn-ghost { background: #1c1c24; border-color: #34343e; }
.link { color: #b9b3ff; }
.link:hover { color: #d7d3ff; }
.input, .select, input:not([type=checkbox]):not([type=radio]), select, textarea { color: #e2e1e8; background: #18181f; border-color: #363640; }
.input::placeholder, input::placeholder, textarea::placeholder { color: #777684; }
.field { color: #aaa9b6; }
.data-table th { background: #1a1a21; color: #9998a5; }
.data-table td { color: #d8d7e0; border-color: #292930; }
.data-table tbody tr:hover { background: #1c1c24; }
.badge { background: #302e40; color: #c6c1ff; }
.tab { color: #9998a6; }
.tab:hover { color: #e9e7f5; background: #202029; }
.tab.active { color: #d8d4ff; background: #302d41; }
.empty { color: #858491; }
.metric { padding: 18px; }
.metric-top { color: #9998a6; }
.metric-icon { background: #292735; color: #b8b2fb; }
.metric strong { color: #f1f0f5; }
.metric small { color: #777684; }
.positive { color: #79c99f!important; }
.brand-chip { background: #19191f; border-color: #34343e; color: #b2b0bd; }
.brand-chip.active { background: #373246; border-color: #5a526e; color: #ebe7ff; }
.summary-row { border-color: #2a2a31; }
.notice { background: #22202c; border-color: #373241; color: #bab5cf; }
.toast { background: #25252e; border-color: #41404b; color: #e5e4ed; box-shadow: 0 10px 36px #0008; }
.modal-mask { background: #000a; }
.drawer { background: #17171e; }
.drawer-header, .drawer-footer { border-color: #30303a; }
.drawer-close { color: #9998a6; }
.login { background: #0d0d12; }
.login-aside { background: radial-gradient(ellipse at 16% 78%, #262238 0, #111119 48%, #0d0d12 78%); border-right: 1px solid #292930; }
.login-aside:after { border-color: #ffffff08; box-shadow: 0 0 0 65px #ffffff04, 0 0 0 130px #ffffff03; }
.login-aside .brand { color: #efedf6; }
.login-aside h1 { color: #f1eff7; letter-spacing: -.04em; }
.login-aside p { color: #92909e; }
.login-aside footer { color: #747280; }
.login-main { background: #101015; }
.login-box h2 { color: #f0eff5; }
.login-box p, .login-note { color: #92919e; }
.login-methods { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-top: 24px; }
.login-box .login-method { width: auto; height: 40px; margin: 0 0 -1px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); }
.login-box .login-method.active { border-bottom-color: var(--accent); color: var(--ink); font-weight: 600; }
.login-code-row { display: flex; gap: 10px; }
.login-code-row input { flex: 1; min-width: 0; }
.login-feedback { margin-top: 8px; color: #e47a83; font-size: 12px; line-height: 1.5; }
html[data-theme="light"] .login-feedback { color: #b42332; }
.login-box .login-code-button { width: auto; min-width: 110px; height: 44px; margin: 0; white-space: nowrap; }
.login-box .login-ding-entry, .login-box .login-ding-back { display: block; width: auto; height: auto; margin: 22px auto 0; padding: 4px; border: 0; background: transparent; color: var(--accent); }
.login-ding-screen { text-align: center; }
.ding-login-status { min-height: 190px; margin-top: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.ding-login-symbol { width: 42px; height: 42px; color: var(--muted); }
.ding-login-symbol svg { display: block; width: 100%; height: 100%; }
.account-dialog-mask { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: #000a; }
body:has(.account-dialog-mask) .toast { z-index: 1001; }
.account-dialog { width: min(440px, 100%); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); box-shadow: 0 18px 60px #0006; }
.account-dialog-head { min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); }
.account-dialog-head h2 { margin: 0; font-size: 16px; }
.account-dialog-close { padding: 0; border: 0; background: none; color: var(--muted); font-size: 24px; line-height: 1; }
.account-dialog-body { padding: 20px 24px 24px; }
.account-dialog-body p { margin: 0 0 16px; color: var(--muted); line-height: 1.6; }
.account-binding-options { display: grid; gap: 10px; }
.account-binding { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-raised); color: var(--ink); text-align: left; }
.account-binding:hover { background: var(--surface-hover); }
.account-binding span:last-child { color: var(--accent); }
.account-dialog-foot { display: flex; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid var(--line); }
@media(max-width:720px) {
  .sidebar { width: 65px; }
  .nav-children { margin: 0; padding: 0; }
  .nav-child { padding: 0; }
  .nav-child:before { content: attr(data-short); font-size: 12px; }
  .nav-child.active::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-button, .nav-child { transition: none; }
}
