/* 几何王国 · 授权控制台
   设计语言：暖纸底色 + 墨色侧栏 + 几何紫强调色；六边形宝石为品牌符号。
   断点：≤ 960px 侧栏收起为底部标签栏；≤ 640px 列表转为卡片、弹层转为底部抽屉。 */

:root {
  --bg: #f4f3ef; --panel: #ffffff; --panel-2: #f9f8f5; --panel-3: #f1efea;
  --line: #e8e5de; --line-2: #dcd8cf;
  --ink: #16171c; --ink-2: #3c3e47; --muted: #7b7c86; --faint: #a9a9b1;
  --accent: #5b45f5; --accent-2: #8b6dff; --accent-ink: #4330d6; --accent-soft: #eeebff; --accent-line: #d9d2ff;
  --ok: #0e9767; --ok-soft: #e3f5ed; --warn: #c27109; --warn-soft: #fcf0da; --bad: #d8344e; --bad-soft: #fce8eb;
  --info: #2a72d8; --info-soft: #e4effc; --dark-tone: #3c3e47; --dark-soft: #ebebee;
  --side: #111217; --side-2: #1a1b22; --side-line: #262833; --side-text: #9fa1ad;
  --shadow-sm: 0 1px 2px rgb(22 23 28 / 5%); --shadow: 0 1px 2px rgb(22 23 28 / 4%), 0 8px 24px -12px rgb(22 23 28 / 12%);
  --shadow-lg: 0 24px 64px -16px rgb(17 18 23 / 35%);
  --r-sm: 10px; --r: 14px; --r-lg: 20px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c0d10; --panel: #15161b; --panel-2: #1a1b21; --panel-3: #202128;
  --line: #24252d; --line-2: #2f3039;
  --ink: #ededf1; --ink-2: #c5c6cf; --muted: #8b8c97; --faint: #5d5e69;
  --accent: #8b78ff; --accent-2: #a995ff; --accent-ink: #b3a6ff; --accent-soft: rgb(139 120 255 / 14%); --accent-line: rgb(139 120 255 / 32%);
  --ok: #34c48f; --ok-soft: rgb(52 196 143 / 13%); --warn: #f0a83a; --warn-soft: rgb(240 168 58 / 13%); --bad: #ff6b81; --bad-soft: rgb(255 107 129 / 13%);
  --info: #6aa8ff; --info-soft: rgb(106 168 255 / 13%); --dark-tone: #c5c6cf; --dark-soft: rgb(197 198 207 / 10%);
  --side: #0a0b0e; --side-2: #14151a; --side-line: #1f2027;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px -12px rgb(0 0 0 / 50%); --shadow-lg: 0 24px 64px -16px rgb(0 0 0 / 70%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); font: 14px/1.55 var(--font); font-feature-settings: "tnum"; -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
small { font-size: 12px; }
b { font-weight: 600; }
.mono, code { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 12px; display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.end { margin-left: auto; color: var(--faint); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-line); }

/* ── 启动 ───────────────────────────────────────────── */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-mark { width: 34px; height: 34px; clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); background: linear-gradient(135deg, var(--accent-2), var(--accent)); animation: pulse 1.2s var(--ease) infinite; }
@keyframes pulse { 50% { transform: scale(.82) rotate(30deg); opacity: .6; } }

/* ── 按钮与控件 ─────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 15px; border: 1px solid transparent; border-radius: var(--r-sm); background: var(--panel-3); font-weight: 500; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; }
.btn .icon { width: 16px; height: 16px; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent)); border-color: var(--accent-ink); box-shadow: 0 1px 0 rgb(255 255 255 / 25%) inset, 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn.primary:hover:not(:disabled) { background: var(--accent-ink); }
.btn.ghost { background: var(--panel); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn.ghost:hover:not(:disabled) { background: var(--panel-2); border-color: var(--faint); }
.btn.soft { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-line); }
.btn.soft:hover:not(:disabled) { background: color-mix(in srgb, var(--accent-soft) 60%, var(--accent-line)); }
.btn.danger { color: #fff; background: var(--bad); border-color: color-mix(in srgb, var(--bad) 80%, #000); }
.btn.sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.danger-text { color: var(--bad) !important; }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.icon-button:hover { background: var(--panel-3); color: var(--ink); }
.icon-button.sm { width: 30px; height: 30px; }
.icon-button.sm .icon { width: 15px; height: 15px; }
.link { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: var(--accent-ink); font-size: 13px; font-weight: 500; cursor: pointer; }
.link .icon { width: 14px; height: 14px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link.subtle { color: var(--muted); margin-top: 12px; }
.link.mono { color: var(--muted); font-weight: 400; }

.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field > small { color: var(--muted); }
.field input, .field textarea, .search input { width: 100%; min-height: 44px; padding: 10px 13px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--panel); outline: none; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field textarea:focus, .search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input::placeholder, .field textarea::placeholder, .search input::placeholder { color: var(--faint); }
.form-error { min-height: 20px; margin: 4px 0 0; color: var(--bad); font-size: 13px; }
.form-error:empty { min-height: 0; }

.check { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; color: var(--ink-2); font-size: 13px; cursor: pointer; user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box { display: grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid var(--line-2); border-radius: 6px; background: var(--panel); transition: .15s; }
.check .box .icon { width: 13px; height: 13px; stroke-width: 2.6; color: #fff; opacity: 0; }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .box .icon { opacity: 1; }
.check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }

.search { position: relative; display: block; flex: 1 1 280px; min-width: 0; }
.search .icon { position: absolute; left: 13px; top: 50%; translate: 0 -50%; color: var(--faint); pointer-events: none; }
.search input { padding-left: 40px; min-height: 42px; box-shadow: var(--shadow-sm); }
.search input::-webkit-search-cancel-button { cursor: pointer; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-3); max-width: 100%; }
.seg.scroll { overflow-x: auto; scrollbar-width: none; }
.seg.scroll::-webkit-scrollbar { display: none; }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.seg button:hover { color: var(--ink); }
.seg button.on { color: var(--ink); background: var(--panel); box-shadow: 0 1px 3px rgb(22 23 28 / 10%), 0 0 0 1px var(--line); }
.seg button em { min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--line); color: var(--muted); font-size: 11px; font-style: normal; line-height: 18px; }
.seg button.on em { background: var(--accent-soft); color: var(--accent-ink); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--panel-3); color: var(--muted); }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: var(--ok-soft); } .pill.warn { color: var(--warn); background: var(--warn-soft); }
.pill.bad { color: var(--bad); background: var(--bad-soft); } .pill.info { color: var(--info); background: var(--info-soft); }
.pill.dark { color: var(--dark-tone); background: var(--dark-soft); } .pill.accent { color: var(--accent-ink); background: var(--accent-soft); }

/* ── 登录 ───────────────────────────────────────────── */
.login { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); min-height: 100vh; }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 44px 56px; color: #fff; background: radial-gradient(120% 80% at 70% 40%, #2a1f7a 0%, #15123a 38%, #0b0b10 72%); }
.login-art::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(255 255 255 / 9%) 1px, transparent 1px); background-size: 26px 26px; mask-image: radial-gradient(70% 60% at 60% 45%, #000, transparent); pointer-events: none; }
.art-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 600; letter-spacing: .04em; }
.art-brand .brand-mark { width: 34px; height: 34px; }
.constellation { position: absolute; right: -8%; top: 50%; width: min(760px, 92%); translate: 0 -54%; fill: none; stroke-linejoin: round; }
.orbit { transform-origin: 300px 300px; }
.orbit path { stroke: rgb(184 168 255 / 55%); stroke-width: 1; }
.o1 { animation: spin 90s linear infinite; } .o1 path { stroke: rgb(184 168 255 / 28%); stroke-dasharray: 2 7; }
.o2 { animation: spin 60s linear infinite reverse; }
.o3 path { stroke: rgb(214 205 255 / 85%); stroke-width: 1.4; fill: rgb(139 109 255 / 10%); }
.o3 { animation: spin 40s linear infinite; }
.core { fill: #d9d0ff; filter: drop-shadow(0 0 12px #8b6dff); }
@keyframes spin { to { transform: rotate(360deg); } }
.art-copy { position: relative; z-index: 1; max-width: 440px; }
.art-copy h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.15; font-weight: 650; letter-spacing: .02em; background: linear-gradient(100deg, #fff 30%, #c8bbff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.art-copy p { margin: 14px 0 26px; color: rgb(255 255 255 / 66%); font-size: 15px; }
.art-copy ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; color: rgb(255 255 255 / 82%); }
.art-copy li { display: flex; align-items: center; gap: 12px; }
.art-copy li .icon { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: rgb(255 255 255 / 8%); border: 1px solid rgb(255 255 255 / 12%); color: #c8bbff; }
.login-panel { display: grid; place-items: center; padding: 40px 28px; background: var(--panel); }
.login-form { width: min(380px, 100%); }
.login-head { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.login-head .brand-mark { width: 46px; height: 46px; filter: drop-shadow(0 8px 16px rgb(91 69 245 / 35%)); }
.login-head h2 { font-size: 24px; font-weight: 650; }
.login-head p { color: var(--muted); }
.otp { font-family: var(--mono); font-size: 20px !important; letter-spacing: .5em; text-align: center; }
.otp::placeholder { font-family: var(--font); font-size: 14px; letter-spacing: normal; }
.login-form .btn.primary { min-height: 48px; font-size: 15px; margin-top: 6px; }
.login-foot { margin-top: 18px; color: var(--muted); font-size: 12px; text-align: center; }

/* ── 外壳 ───────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 20px 14px 16px; color: var(--side-text); background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0 56 16v32L28 64 0 48V16zM28 64v33M0 48 0 80M56 48v32' fill='none' stroke='%23ffffff' stroke-opacity='.035'/%3E%3C/svg%3E") 0 0 / 56px 97px, linear-gradient(180deg, var(--side-2), var(--side)); border-right: 1px solid var(--side-line); }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 22px; color: #fff; }
.side-brand .brand-mark { width: 36px; height: 36px; filter: drop-shadow(0 6px 14px rgb(108 85 255 / 45%)); }
.side-brand b { display: block; font-size: 15px; letter-spacing: .04em; }
.side-brand small { display: block; color: var(--side-text); font-size: 11px; letter-spacing: .12em; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 11px; font-weight: 500; transition: background .15s, color .15s; }
.side-nav a:hover { color: #fff; background: rgb(255 255 255 / 4%); }
.side-nav a.on { color: #fff; background: linear-gradient(90deg, rgb(139 109 255 / 22%), rgb(139 109 255 / 6%)); box-shadow: inset 0 0 0 1px rgb(139 109 255 / 22%); }
.side-nav a.on::before { content: ""; position: absolute; left: -14px; top: 11px; bottom: 11px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); }
.side-nav a.on .icon { color: #c4b6ff; }
.side-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--side-line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.me { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me b { display: block; color: #fff; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me small { display: block; font-size: 11px; }
.me-avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; color: #fff; font-weight: 600; background: linear-gradient(135deg, #8b6dff, #4f3be0); }
.side-tools { display: flex; }
.side-tools .icon-button { color: var(--side-text); width: 34px; height: 34px; }
.side-tools .icon-button:hover { color: #fff; background: rgb(255 255 255 / 7%); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; min-height: 72px; padding: 14px 36px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; }
.topbar-brand { display: none; }
.crumbs { flex: 1; min-width: 0; }
.crumbs h1 { font-size: 21px; font-weight: 650; letter-spacing: .01em; }
.crumbs p { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; gap: 8px; }
.content { flex: 1; width: 100%; max-width: 1320px; padding: 6px 36px 56px; outline: none; animation: rise .35s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.tabbar { display: none; }

/* ── 通用布局 ───────────────────────────────────────── */
.card { position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow); }
.card.pad { padding: 20px 22px; }
.content > * + * { margin-top: 18px; }
.content > :is(.toolbar, .callout, .stat-strip, .hello) + * { margin-top: 0; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h3 { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.card.failure { display: flex; align-items: center; gap: 14px; padding: 22px; color: var(--bad); }
.card.failure > div { flex: 1; color: var(--ink); } .card.failure p { color: var(--muted); }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.callout { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r); background: var(--panel-3); color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.callout .icon { margin-top: 1px; }
.callout.accent { background: var(--accent-soft); color: var(--accent-ink); }
.callout.warn { background: var(--warn-soft); color: var(--warn); }
.empty { display: grid; justify-items: center; gap: 6px; padding: 42px 20px; color: var(--muted); text-align: center; }
.empty svg { width: 84px; margin-bottom: 8px; }
.empty .e1 { fill: var(--panel-3); stroke: var(--line-2); stroke-width: 1.4; stroke-linejoin: round; }
.empty .e2 { fill: none; stroke: var(--line-2); stroke-width: 1.4; stroke-linejoin: round; }
.empty b { color: var(--ink-2); font-weight: 600; }
.empty span { font-size: 13px; }
.skeleton { display: grid; gap: 10px; padding: 18px; }
.skeleton i { height: 18px; border-radius: 8px; background: linear-gradient(90deg, var(--panel-3) 25%, var(--line) 50%, var(--panel-3) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skeleton i:nth-child(3n) { width: 62%; } .skeleton i:nth-child(3n+2) { width: 84%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.end-note { padding: 14px 0 2px; color: var(--faint); font-size: 12px; text-align: center; }

.avatar { --h: 252; display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; color: hsl(var(--h) 55% 32%); background: linear-gradient(135deg, hsl(var(--h) 85% 93%), hsl(var(--h) 70% 85%)); font-size: 13px; font-weight: 650; letter-spacing: -.02em; }
:root[data-theme="dark"] .avatar { color: hsl(var(--h) 85% 82%); background: linear-gradient(135deg, hsl(var(--h) 40% 24%), hsl(var(--h) 45% 17%)); }
.avatar.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 12px; }
.avatar.lg { width: 56px; height: 56px; border-radius: 17px; font-size: 18px; }
.avatar[data-hue="1"] { --h: 280; } .avatar[data-hue="2"] { --h: 320; } .avatar[data-hue="3"] { --h: 350; } .avatar[data-hue="4"] { --h: 18; } .avatar[data-hue="5"] { --h: 36; }
.avatar[data-hue="6"] { --h: 160; } .avatar[data-hue="7"] { --h: 185; } .avatar[data-hue="8"] { --h: 205; } .avatar[data-hue="9"] { --h: 225; } .avatar[data-hue="10"] { --h: 140; } .avatar[data-hue="11"] { --h: 265; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; text-align: left; }
.who > span:last-child { min-width: 0; display: grid; }
.who b, .who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { color: var(--muted); }
.who.large h2 { font-size: 19px; font-weight: 650; }

/* ── 列表 ───────────────────────────────────────────── */
.list-card { overflow: hidden; }
.list-head, .row { display: grid; align-items: center; gap: 16px; padding: 0 20px; }
.list-head { min-height: 42px; color: var(--muted); font-size: 12px; font-weight: 500; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.row { width: 100%; min-height: 72px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; transition: background .12s; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--panel-2); }
.row > span { min-width: 0; }
.row > span > b, .row > span > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row > span > small { color: var(--muted); margin-top: 2px; }
.row .go { justify-self: end; color: var(--faint); transition: transform .15s, color .15s; }
.row:hover .go { color: var(--accent); transform: translateX(2px); }
.user-grid { grid-template-columns: minmax(200px, 1.4fr) minmax(190px, 1.1fr) 140px 110px 24px; }
.bless-grid { grid-template-columns: minmax(190px, 1.2fr) minmax(140px, 1fr) minmax(170px, 1.1fr) 96px minmax(120px, .8fr) 24px; }
.license-cell { display: grid; gap: 6px; }
.license-cell .line { display: flex; align-items: center; gap: 8px; }
.license-cell .line small { color: var(--muted); }
.meter { display: block; height: 5px; border-radius: 99px; background: var(--panel-3); overflow: hidden; max-width: 200px; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.meter.warn i { background: var(--warn); } .meter.bad i { background: var(--bad); }
.meter.accent i { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.chips { display: inline-flex; gap: 6px; }
.chip { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; border: 1px dashed var(--line-2); color: var(--faint); }
.chip .icon { width: 16px; height: 16px; }
.chip.bound { border-style: solid; border-color: var(--line); background: var(--panel-2); color: var(--ink-2); }
.chip.online::after { content: ""; position: absolute; right: -3px; top: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); border: 2px solid var(--panel); }

/* ── 概览 ───────────────────────────────────────────── */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.hello h2 { font-size: 26px; font-weight: 650; letter-spacing: .01em; }
.hello p { margin-top: 4px; color: var(--muted); }
.quick { display: flex; gap: 8px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { position: relative; overflow: hidden; display: grid; align-content: start; gap: 4px; min-height: 152px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow); transition: transform .2s var(--ease), box-shadow .2s; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 16px 32px -18px rgb(22 23 28 / 30%); }
.kpi small { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi b { font-size: 34px; line-height: 1.15; font-weight: 680; letter-spacing: -.02em; }
.kpi b em { margin-left: 6px; color: var(--faint); font-size: 16px; font-style: normal; font-weight: 500; }
.kpi p { color: var(--muted); font-size: 12px; }
.kpi-icon { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 10px; border-radius: 11px; color: var(--accent-ink); background: var(--accent-soft); }
.kpi-icon.warn { color: var(--warn); background: var(--warn-soft); } .kpi-icon.info { color: var(--info); background: var(--info-soft); } .kpi-icon.ok { color: var(--ok); background: var(--ok-soft); }
.kpi.hero { color: #fff; border-color: transparent; background: radial-gradient(120% 140% at 100% 0%, #9f86ff 0%, #5b45f5 45%, #3624c4 100%); box-shadow: 0 18px 40px -18px rgb(91 69 245 / 70%); }
.kpi.hero small, .kpi.hero p { color: rgb(255 255 255 / 75%); }
.kpi.hero .kpi-icon { color: #fff; background: rgb(255 255 255 / 16%); }
.kpi-art { position: absolute; right: -18px; bottom: -22px; width: 132px; fill: rgb(255 255 255 / 7%); stroke: rgb(255 255 255 / 22%); stroke-width: 1.2; stroke-linejoin: round; }
.donut-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px 28px; }
.donut { width: 156px; flex: none; }
.donut circle { fill: none; stroke-width: 4.2; }
.donut .track { stroke: var(--panel-3); }
.donut .arc { stroke-linecap: round; transition: stroke-width .15s; }
.donut .arc:hover { stroke-width: 5.2; }
.donut text { fill: var(--ink); font-size: 6.4px; font-weight: 700; text-anchor: middle; }
.donut text.sub { fill: var(--muted); font-size: 2.9px; font-weight: 500; }
.arc.accent { stroke: var(--accent); } .arc.ok { stroke: var(--ok); } .arc.warn { stroke: var(--warn); } .arc.bad { stroke: var(--bad); } .arc.info { stroke: var(--info); } .arc.neutral { stroke: var(--faint); } .arc.dark { stroke: var(--dark-tone); }
.legend { flex: 1 1 220px; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px 18px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 8px; color: var(--ink-2); white-space: nowrap; }
.legend li.zero { opacity: .45; }
.legend i { width: 9px; height: 9px; border-radius: 3px; }
.legend b { margin-left: auto; }
.legend i.accent { background: var(--accent); } .legend i.ok { background: var(--ok); } .legend i.warn { background: var(--warn); } .legend i.bad { background: var(--bad); } .legend i.info { background: var(--info); } .legend i.neutral { background: var(--faint); } .legend i.dark { background: var(--dark-tone); }
.bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); align-items: end; gap: 6px; height: 176px; }
.bar { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 6px; text-align: center; }
.bar i { align-self: end; display: block; width: 100%; min-height: 3px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 45%, transparent), color-mix(in srgb, var(--accent) 18%, transparent)); transition: background .15s; }
.bar:hover i, .bar.today i { background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.bar small { height: 16px; color: var(--faint); font-size: 11px; }
.mini-list { display: grid; margin: -6px -10px; padding: 0; list-style: none; }
.mini-list li > * { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; }
.mini-list li > *:hover { background: var(--panel-2); }
.mini-list li > * > span:not(.avatar):not(.end):not(.vc-recent-mark) { flex: 1; min-width: 0; display: grid; }
.mini-list b, .mini-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list small { color: var(--muted); }
.mini-list .end { display: grid; justify-items: end; gap: 3px; flex: none; }
.platform-list { display: grid; gap: 10px; }
.platform-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); }
.platform-row > div:not(.nums) { flex: 1; min-width: 0; display: grid; }
.platform-row small { color: var(--muted); }
.nums { display: flex; gap: 18px; text-align: center; }
.nums span { display: grid; }
.nums b { font-size: 18px; line-height: 1.2; }
.nums small { font-size: 11px; }
.device-icon { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); position: relative; }
.device-icon.online::after { content: ""; position: absolute; right: -3px; top: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); border: 2px solid var(--panel); box-shadow: 0 0 0 3px var(--ok-soft); }
.card-head h3 .device-icon { width: 32px; height: 32px; border-radius: 10px; }
.bless-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bless-summary div, .stat-strip div { display: grid; gap: 2px; padding: 14px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line); }
.bless-summary b, .stat-strip b { font-size: 22px; line-height: 1.2; }
.bless-summary small, .stat-strip small { color: var(--muted); }
.stat-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-strip div { background: var(--panel); box-shadow: var(--shadow-sm); }

/* ── 时间线 ─────────────────────────────────────────── */
.timeline { display: grid; margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; padding: 9px 0; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 30px; bottom: -9px; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li > i { width: 13px; height: 13px; margin-top: 4px; border-radius: 50%; border: 3px solid var(--panel); background: var(--faint); box-shadow: 0 0 0 1px var(--line-2); }
.timeline li.tone-ok > i { background: var(--ok); } .timeline li.tone-warn > i { background: var(--warn); } .timeline li.tone-bad > i { background: var(--bad); }
.timeline li.tone-info > i { background: var(--info); } .timeline li.tone-accent > i { background: var(--accent); }
.timeline b { font-weight: 550; }
.timeline div small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.timeline time { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }
.timeline time small { display: block; color: var(--faint); font-size: 11px; }
.timeline.compact li { padding: 7px 0; }
.day-head { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 4px; font-size: 13px; font-weight: 600; }
.day-head:first-child { margin-top: 0; }
.day-head small { color: var(--faint); font-weight: 400; }

/* ── 注册审核 ───────────────────────────────────────── */
.reg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.reg-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.reg-card.status-pending { border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); }
.reg-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.reg-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 12px; }
.reg-meta span { display: inline-flex; align-items: center; gap: 6px; }
.reg-meta .icon { width: 15px; height: 15px; }
.reg-note { padding: 10px 12px; border-radius: 12px; background: var(--panel-2); font-size: 13px; overflow-wrap: anywhere; }
.reg-term { display: grid; gap: 7px; }
.reg-term > span { color: var(--muted); font-size: 12px; }
.reg-card footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: auto; }
.reg-card footer.split { justify-content: space-between; align-items: center; }
.reg-result { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.reg-result small { width: 100%; color: var(--muted); }

/* ── 版本发布 / 登录设备 ────────────────────────────── */
.release-hero { display: grid; gap: 2px; margin-bottom: 14px; padding: 16px 18px; border-radius: var(--r); background: linear-gradient(135deg, var(--accent-soft), transparent 80%); border: 1px solid var(--accent-line); }
.release-hero small { color: var(--accent-ink); font-weight: 500; }
.release-hero b { font-size: 30px; line-height: 1.2; font-weight: 680; letter-spacing: -.02em; }
.release-hero span { color: var(--muted); font-size: 13px; }
.sub-head { margin: 18px 0 10px; color: var(--muted); font-size: 12px; font-weight: 600; }
.version-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.version-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.version-list li small { flex: 1; color: var(--muted); }
.version-list li.current { background: var(--panel-2); }
.session-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.session { display: flex; align-items: flex-start; gap: 14px; padding: 18px; }
.session.current { border-color: var(--accent-line); box-shadow: var(--shadow), 0 0 0 3px var(--accent-soft); }
.session-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 13px; background: var(--panel-3); color: var(--ink-2); }
.session.current .session-icon { background: var(--accent-soft); color: var(--accent-ink); }
.session-info { flex: 1; min-width: 0; display: grid; gap: 3px; }
.session-info b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.session-info small { color: var(--muted); }
.expiry { display: block; height: 4px; margin-top: 8px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.expiry i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* ── 浮层：抽屉 / 弹窗 ──────────────────────────────── */
.layer { position: fixed; inset: 0; z-index: 50; display: flex; }
.scrim { position: absolute; inset: 0; background: rgb(10 10 16 / 42%); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity .22s; }
.layer.open .scrim { opacity: 1; }
.layer.leaving .scrim { opacity: 0; }
.drawer-panel, .modal-panel { position: relative; display: flex; flex-direction: column; background: var(--panel); box-shadow: var(--shadow-lg); }
.layer.drawer { justify-content: flex-end; }
.drawer-panel { width: min(480px, 100%); height: 100%; border-left: 1px solid var(--line); transform: translateX(100%); transition: transform .28s var(--ease); }
.drawer-panel.wide { width: min(560px, 100%); }
.layer.open .drawer-panel { transform: none; }
.layer.leaving .drawer-panel { transform: translateX(100%); }
.layer.modal { align-items: center; justify-content: center; padding: 20px; }
.modal-panel { width: min(480px, 100%); max-height: calc(100vh - 40px); border-radius: var(--r-lg); border: 1px solid var(--line); opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .2s, transform .24s var(--ease); }
.modal-panel > form { display: flex; flex-direction: column; min-height: 0; }
.layer.open .modal-panel { opacity: 1; transform: none; }
.layer.leaving .modal-panel { opacity: 0; transform: translateY(6px) scale(.98); }
.drawer-head, .modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 24px 16px; }
.drawer-head { border-bottom: 1px solid var(--line); }
.drawer-head > div { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.drawer-head > .who.large { display: flex; gap: 14px; }
.who.large > span:last-child { justify-items: start; gap: 2px; }
.drawer-head h2, .modal-head h2 { font-size: 18px; font-weight: 650; }
.drawer-head p, .modal-head p { color: var(--muted); font-size: 13px; }
.drawer-head .skeleton { flex: 1; padding: 0; }
.drawer-head.compact { border-bottom: 0; padding-bottom: 6px; }
.eyebrow { display: flex; align-items: center; gap: 6px; color: var(--accent-ink); font-size: 12px; font-weight: 600; }
.eyebrow .icon { width: 14px; height: 14px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px 28px; overscroll-behavior: contain; }
.drawer-foot { display: flex; justify-content: space-between; gap: 10px; padding: 14px 24px calc(14px + var(--safe-bottom)); border-top: 1px solid var(--line); background: var(--panel-2); }
.modal-body { overflow-y: auto; padding: 4px 24px 8px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 20px; }
.confirm { display: grid; justify-items: center; gap: 8px; padding: 28px 28px 6px; text-align: center; }
.confirm h3 { font-size: 17px; font-weight: 650; }
.confirm p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.confirm-mark { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 4px; border-radius: 15px; color: var(--accent-ink); background: var(--accent-soft); }
.confirm-mark.danger { color: var(--bad); background: var(--bad-soft); }
.confirm-mark .icon { width: 22px; height: 22px; }
.confirm + .modal-foot .btn { flex: 1; }

.block { padding: 20px 0; border-top: 1px solid var(--line); }
.block:first-of-type, .license-hero + .block { border-top: 0; }
.block h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.block h3 small { margin-right: auto; color: var(--faint); font-weight: 400; }
.license-hero { position: relative; overflow: hidden; padding: 20px; border-radius: var(--r-lg); background: linear-gradient(150deg, var(--panel-2), var(--panel-3)); border: 1px solid var(--line); }
.license-hero::after { content: ""; position: absolute; right: -40px; top: -50px; width: 170px; height: 170px; clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); background: currentColor; opacity: .06; }
.license-hero.tone-ok { color: var(--ok); } .license-hero.tone-warn { color: var(--warn); } .license-hero.tone-bad { color: var(--bad); } .license-hero.tone-info { color: var(--info); } .license-hero.tone-dark, .license-hero.tone-neutral { color: var(--muted); }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.hero-top small { color: var(--muted); }
.license-hero strong { display: block; color: var(--ink); font-size: 26px; line-height: 1.2; font-weight: 680; letter-spacing: -.01em; }
.license-hero p { margin: 4px 0 14px; color: var(--muted); font-size: 13px; }
.license-hero .meter { max-width: none; height: 6px; }
.grant-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.grant-row .btn { padding: 0 6px; }
.device-grid { display: grid; gap: 10px; }
.device { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); }
.device-info { display: grid; min-width: 0; }
.device-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-info small { color: var(--muted); }
.device-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.empty-device { border-style: dashed; color: var(--muted); }
.empty-device .device-icon { color: var(--faint); background: var(--panel-2); }
.empty-device div { display: grid; }
.live { color: var(--ok); font-style: normal; font-weight: 600; }
.perm-list { display: grid; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.perm-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.perm-row:last-child { border-bottom: 0; }
.perm-row > span { flex: 1; display: grid; gap: 2px; min-width: 0; }
.perm-row b { display: flex; align-items: center; gap: 8px; }
.perm-row small { color: var(--muted); }
.perm-tag { font-style: normal; font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 99px; background: var(--panel-3); color: var(--muted); }
.perm-chip { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 99px; font-size: 11px; font-weight: 500; line-height: 18px; vertical-align: 1px; }
.perm-chip.off { background: var(--bad-soft); color: var(--bad); }
.switch { position: relative; flex: none; width: 42px; height: 24px; border: 0; border-radius: 99px; background: var(--line-2); cursor: pointer; transition: background .18s var(--ease); }
.switch i { position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .18s var(--ease); }
.switch.on { background: var(--accent); }
.switch.on i { transform: translateX(18px); }
.switch:disabled { opacity: .55; cursor: progress; }
.action-list { display: grid; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.action-list button { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: var(--panel); text-align: left; cursor: pointer; }
.action-list button:last-child { border-bottom: 0; }
.action-list button:hover { background: var(--panel-2); }
.action-list button > span { flex: 1; display: grid; }
.action-list small { color: var(--muted); }
.note-line { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.note-line .icon { width: 15px; height: 15px; }
.defs { display: grid; margin: 0; border-top: 1px solid var(--line); }
.defs div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.defs dt { color: var(--muted); }
.defs dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.block .callout { margin: 12px 0 0; }
.code-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: code; }
.code-list li { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border: 1px dashed var(--accent-line); border-radius: 12px; background: var(--accent-soft); }
.code-list code { flex: 1; color: var(--accent-ink); font-size: 14px; font-weight: 600; letter-spacing: .02em; user-select: all; }
.menu-list { display: grid; padding: 4px 12px calc(16px + var(--safe-bottom)); }
.menu-list > * { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 0 12px; border: 0; border-radius: 12px; background: none; font-size: 15px; text-align: left; cursor: pointer; }
.menu-list > *:hover { background: var(--panel-2); }
.menu-list .icon { color: var(--muted); }
.menu-list .danger-text .icon { color: var(--bad); }

.toasts { position: fixed; z-index: 90; right: 24px; bottom: 24px; display: grid; gap: 10px; justify-items: end; pointer-events: none; }
.toast { max-width: min(360px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 12px; color: #fff; background: #1c1d24; box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 500; animation: toast-in .3s var(--ease); }
.toast.ok { background: linear-gradient(135deg, #0f8d62, #0b7a55); }
.toast.bad { background: linear-gradient(135deg, #d8344e, #b9233c); }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }

/* ── 响应式 ─────────────────────────────────────────── */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-grid { grid-template-columns: minmax(180px, 1.4fr) minmax(170px, 1.1fr) 120px 24px; }
  .user-grid > :nth-child(4) { display: none; }
  .stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-strip div:nth-child(n+4) { display: none; }
  .bless-grid { grid-template-columns: minmax(170px, 1.2fr) minmax(130px, 1fr) 96px minmax(110px, .8fr) 24px; }
  .bless-grid > :nth-child(3) { display: none; }
}
@media (max-width: 960px) {
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 300px; padding: 28px 24px; justify-content: flex-start; gap: 120px; }
  .art-copy p, .art-copy ul { display: none; }
  .art-copy h1 { font-size: 30px; }
  .constellation { width: 430px; right: -90px; translate: 0 -46%; }
  .login-panel { margin-top: -28px; padding: 30px 22px calc(30px + var(--safe-bottom)); border-radius: 26px 26px 0 0; position: relative; z-index: 2; place-items: start center; }
  .login-head { display: none; }

  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .topbar { min-height: 60px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); gap: 10px; border-bottom-color: var(--line); }
  .topbar-brand { display: block; }
  .topbar-brand .brand-mark { width: 30px; height: 30px; display: block; }
  .crumbs h1 { font-size: 17px; }
  .crumbs p { display: none; }
  .top-actions .btn span { display: none; }
  .top-actions .btn { width: 38px; padding: 0; }
  .content { padding: 16px 16px calc(96px + var(--safe-bottom)); }
  .tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(6, 1fr); padding: 6px 6px calc(6px + var(--safe-bottom)); background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-top: 1px solid var(--line); }
  .tabbar > * { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 0 4px; border: 0; border-radius: 12px; background: none; color: var(--muted); font-size: 11px; font-weight: 500; cursor: pointer; }
  .tabbar .icon { width: 22px; height: 22px; }
  .tabbar .on { color: var(--accent-ink); }
  .tabbar .on .icon { stroke-width: 2.1; }
  .grid.two { grid-template-columns: minmax(0, 1fr); }
  .grid { gap: 14px; }
  .content > * + * { margin-top: 14px; }
  .hello h2 { font-size: 21px; }
  .hello .quick { display: none; }
  .kpis { gap: 12px; }
  .kpi { min-height: 132px; padding: 16px; }
  .kpi b { font-size: 28px; }
  .toasts { left: 16px; right: 16px; bottom: calc(84px + var(--safe-bottom)); justify-items: center; }
}
@media (max-width: 640px) {
  .card.pad { padding: 16px; }
  .toolbar { gap: 10px; }
  .toolbar .seg { width: 100%; }
  .search { flex-basis: 100%; }
  .list-head { display: none; }
  .list-card { background: transparent; border: 0; box-shadow: none; overflow: visible; display: grid; gap: 10px; }
  .row { grid-template-columns: minmax(0, 1fr) auto !important; gap: 10px 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow-sm); }
  .row > :first-child { grid-column: 1 / -1; }
  .row .go { display: none; }
  .row.user-grid .device-cell { align-self: end; }
  .row.bless-grid > span:nth-child(3), .row.bless-grid > span:nth-child(5) { display: none; }
  .row.bless-grid > span:nth-child(4) { justify-self: end; align-self: start; grid-row: 2; grid-column: 2; }
  .hide-sm { display: none; }
  .meter { max-width: none; }
  .donut-wrap { flex-direction: column; gap: 18px; }
  .legend { width: 100%; }
  .bars { height: 140px; gap: 4px; }
  .bless-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat-strip div { padding: 10px 12px; }
  .stat-strip b { font-size: 18px; }
  .reg-grid, .session-grid { grid-template-columns: minmax(0, 1fr); }
  .nums { gap: 12px; }
  .timeline li { grid-template-columns: 20px minmax(0, 1fr); }
  .timeline time { grid-column: 2; text-align: left; margin-top: -6px; }
  .timeline time small { display: inline; margin-left: 6px; }

  .layer.drawer, .layer.modal { align-items: flex-end; justify-content: stretch; padding: 0; }
  .drawer-panel, .drawer-panel.wide, .modal-panel { width: 100%; height: auto; max-height: calc(100vh - 36px); border: 0; border-radius: 22px 22px 0 0; transform: translateY(100%); opacity: 1; transition: transform .3s var(--ease); }
  .drawer-panel { height: calc(100vh - 36px); }
  .layer.sheet .drawer-panel { height: auto; }
  .drawer-panel::before, .modal-panel::before { content: ""; position: absolute; top: 7px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: var(--line-2); }
  .layer.open .drawer-panel, .layer.open .modal-panel { transform: none; }
  .layer.leaving .drawer-panel, .layer.leaving .modal-panel { transform: translateY(100%); opacity: 1; }
  .drawer-head, .modal-head { padding: 22px 18px 14px; }
  .drawer-body { padding: 16px 18px calc(24px + var(--safe-bottom)); }
  .modal-body { padding: 4px 18px 8px; }
  .modal-foot { padding: 12px 18px calc(16px + var(--safe-bottom)); }
  .modal-foot .btn { flex: 1; }
  .grant-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field input, .field textarea, .search input { font-size: 16px; } /* 防止 iOS 聚焦时放大页面 */
}
@media (hover: none) { .row:hover, .mini-list li > *:hover { background: var(--panel); } a.kpi:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* 特殊权限徽章 */
.spx { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 9px 0 7px; border-radius: 99px; white-space: nowrap; vertical-align: middle;
  background: linear-gradient(120deg, #5b3df5 0%, #9b4dff 48%, #ff6fb5 100%); color: #fff; font-size: 11px; font-weight: 650; font-style: normal; letter-spacing: .04em; line-height: 1;
  box-shadow: 0 3px 10px -3px rgba(124, 77, 255, .6), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(60, 20, 140, .25); }
.spx svg { width: 11px; height: 11px; flex: none; fill: #ffe08a; filter: drop-shadow(0 0 3px rgba(255, 214, 102, .9)); }
.spx::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; z-index: -1; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent); transform: skewX(-20deg); animation: spx-shine 3.8s ease-in-out infinite; }
.spx.sm { height: 18px; padding: 0 7px 0 5px; font-size: 10px; margin-left: 6px; vertical-align: 1px; }
.spx.sm svg { width: 10px; height: 10px; }
@keyframes spx-shine { 0%, 62% { left: -60%; } 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .spx::after { animation: none; } }
.perm-row.special.granted { background: linear-gradient(90deg, rgba(155, 77, 255, .09), rgba(255, 111, 181, .04) 55%, var(--panel) 85%); box-shadow: inset 3px 0 0 #9b4dff; }

/* ── 助力码券 ─────────────────────────────────────────────────── */
.vc-setup { display: flex; gap: 18px; align-items: flex-start; }
.vc-setup-art { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 16px; color: var(--accent-ink); background: var(--accent-soft); }
.vc-setup-art .icon { width: 28px; height: 28px; }
.vc-setup h3 { margin-bottom: 6px; font-size: 16px; }
.vc-setup p { color: var(--muted); }
.vc-env { margin: 12px 0 0; padding: 12px 14px; overflow-x: auto; border-radius: var(--r-sm); background: var(--panel-3); font-family: var(--mono); font-size: 12.5px; line-height: 1.7; white-space: pre; }
.vc-section-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 2px 12px; }
.vc-section-head h3 { font-size: 15px; font-weight: 600; }
.vc-section-head .link.subtle { margin: 0 0 0 auto; }
.vc-last { font-size: 18px !important; }
.vc-tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; margin-bottom: 18px; }
.vc-tier { --tone: var(--info); --tone-soft: var(--info-soft); position: relative; display: grid; gap: 12px; padding: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow); }
.vc-tier.is-150 { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.vc-tier::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--tone), color-mix(in srgb, var(--tone) 40%, transparent)); }
.vc-tier.is-archived { opacity: .62; }
.vc-tier header { display: flex; align-items: center; gap: 6px; }
.vc-tier header .icon-button { margin-left: auto; margin-right: -6px; }
.vc-tier-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.vc-tier-title b { overflow: hidden; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.vc-tier-title span { flex: none; color: var(--muted); font-size: 12px; }
.vc-tier-title em { margin-right: 2px; color: var(--tone); font-size: 26px; font-style: normal; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.vc-tier-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.vc-tier-stats div { padding: 8px 10px; border-radius: 10px; background: var(--panel-2); }
.vc-tier-stats dt { color: var(--muted); font-size: 11.5px; }
.vc-tier-stats dd { margin: 1px 0 0; font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.vc-tier-stats dd.fresh { color: var(--warn); }
.vc-tier-stats dd.zero { color: var(--faint); }
.vc-meter { display: block; height: 4px; overflow: hidden; border-radius: 99px; background: var(--panel-3); }
.vc-meter i { display: block; height: 100%; border-radius: inherit; background: var(--tone); }
.vc-tier footer { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vc-tier-add { place-content: center; justify-items: center; gap: 4px; min-height: 196px; border: 1.5px dashed var(--line-2); background: transparent; box-shadow: none; color: var(--muted); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.vc-tier-add::before { display: none; }
.vc-tier-add:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.vc-tier-add .icon { width: 26px; height: 26px; margin-bottom: 4px; }
.vc-tier-add b { color: var(--ink-2); font-weight: 600; }
.vc-tier-add small { font-size: 12px; }
.vc-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.vc-group { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.vc-group.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.vc-group header { display: flex; align-items: center; gap: 6px; min-width: 0; }
.vc-group header b { overflow: hidden; font-size: 14.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.vc-group dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.vc-group dl div { padding: 6px 8px; border-radius: 10px; background: var(--panel-2); }
.vc-group dt { color: var(--muted); font-size: 11.5px; }
.vc-group dd { margin: 1px 0 0; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.vc-group dd.fresh { color: var(--warn); }
.vc-group dd.zero { color: var(--faint); }
.vc-group footer { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vc-group-tag { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; padding: 0 6px; border-radius: 6px; color: var(--accent-ink); background: var(--accent-soft); font-size: 11.5px; }
.vc-group-tag .icon { width: 12px; height: 12px; }
.vc-copied textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-3); font-family: var(--mono); font-size: 12.5px; line-height: 1.6; resize: vertical; }
.vc-columns { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.vc-list-tools { display: grid; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.vc-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.vc-select { min-height: 40px; padding: 0 30px 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-3); color: var(--ink-2); font-size: 13px; }
.vc-grid { grid-template-columns: minmax(200px, 1.3fr) minmax(120px, 1fr) 92px minmax(130px, 1fr) 24px; }
.vc-grid .mono { letter-spacing: .02em; }
.vc-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.vc-pager .muted { margin-right: auto; }
.vc-recent .mini-list b { font-size: 14px; }
.vc-recent-mark { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; color: var(--ok); background: var(--ok-soft); }
.vc-recent-mark.extend { color: var(--accent-ink); background: var(--accent-soft); }
.vc-recent-mark .icon { width: 16px; height: 16px; }
.vc-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.vc-pick-item { --tone: var(--info); --tone-soft: var(--info-soft); display: grid; justify-items: start; gap: 1px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--panel); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.vc-pick-item.is-150 { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.vc-pick-item b { color: var(--tone); font-size: 12px; font-weight: 650; }
.vc-pick-item span { overflow: hidden; max-width: 100%; color: var(--ink); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.vc-pick-item em { color: var(--muted); font-size: 12px; font-style: normal; }
.vc-pick-item.on { border-color: var(--tone); background: var(--tone-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 14%, transparent); }
.vc-count { display: flex; gap: 8px; align-items: center; }
.vc-count input { flex: 1; min-width: 0; }
.vc-done { --tone: var(--info); --tone-soft: var(--info-soft); display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 14px 16px; border-radius: var(--r); background: var(--tone-soft); }
.vc-done.is-150 { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.vc-done > span { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: var(--tone); }
.vc-done > div { display: grid; flex: 1; min-width: 0; }
.vc-done small { color: var(--muted); }
.vc-done em { color: var(--tone); font-size: 30px; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.vc-copy { display: inline-flex; gap: 12px; }
/* 授权兑换码：长期档位用强调色，与助力码券共用卡片与列表样式。 */
:is(.vc-tier, .vc-pick-item, .vc-done).is-life { --tone: var(--accent); --tone-soft: var(--accent-soft); }
.vc-tier-title em .icon { width: 24px; height: 24px; vertical-align: -4px; }
.inline-icon { display: inline-flex; align-items: center; gap: 6px; }
.inline-icon .icon { width: 15px; height: 15px; }
.redeem-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.redeem-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--panel-2); }
.redeem-list li > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.redeem-list small { color: var(--muted); }
.redeem-list .end { display: grid; justify-items: end; text-align: right; }
@media (max-width: 1200px) { .vc-columns { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .vc-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .vc-tier { padding: 13px; gap: 10px; }
  .vc-tier-title { display: grid; gap: 0; }
  .vc-tier-title em { font-size: 22px; }
  .vc-tier-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vc-tier-stats div:nth-child(3) { display: none; }
  .vc-tier footer { grid-template-columns: 1fr; gap: 6px; }
  .vc-tier-add { min-height: 120px; }
  .vc-groups { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .vc-list-tools { padding: 12px; }
  .vc-filters .seg { width: 100%; }
  .vc-select { flex: 1; }
  .vc-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vc-count { display: grid; }
  .row.vc-grid > span:nth-child(2), .row.vc-grid > span:nth-child(4) { grid-column: 1 / -1; }
  .row.vc-grid > span:nth-child(3) { justify-self: end; align-self: start; grid-row: 1; grid-column: 2; }
  .row.vc-grid > span:first-child { grid-column: 1; }
  .row.vc-grid > span:nth-child(2) { display: none; }
  .vc-setup { display: grid; }
}

/* ── 闲鱼自动发货 ─────────────────────────────────────────────── */
.dl-plans .dl-id { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.dl-plans .vc-tier > small { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.dl-clients { margin-bottom: 18px; }
.dl-client-grid { grid-template-columns: minmax(140px, 1fr) 120px minmax(120px, 1fr) 100px 110px auto; cursor: default; }
.dl-client-grid.is-off { opacity: .55; }
.dl-actions { display: flex; gap: 6px; justify-content: flex-end; }
.dl-order-grid { grid-template-columns: minmax(190px, 1.3fr) minmax(150px, 1fr) 110px 96px 120px 24px; }
.dl-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.dl-vars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dl-vars code, .dl-steps code, .callout code { white-space: nowrap; padding: 1px 6px; border-radius: 6px; background: var(--panel-3); font-family: var(--mono); font-size: 12px; }
.dl-preview pre, .dl-config pre { margin: 0; padding: 12px 14px; overflow-x: auto; border-radius: var(--r-sm); background: var(--panel-3); font-family: var(--mono); font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; }
.dl-preview { margin-top: 4px; }
.dl-config > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dl-steps { margin: 0 0 6px; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.dl-codes { display: grid; gap: 8px; }
.dl-code { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.dl-code > span:first-child { display: grid; gap: 2px; }
.dl-code small { color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
  .dl-client-grid, .dl-order-grid { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; padding: 12px 14px; }
  .dl-client-grid > span:nth-child(n+3):not(:last-child), .row.dl-order-grid > span:nth-child(2), .row.dl-order-grid > span:nth-child(5) { display: none; }
  .list-head.dl-client-grid, .list-head.dl-order-grid { display: none; }
  .dl-two { grid-template-columns: 1fr; }
}

/* ── 续签提醒 ─────────────────────────────────────────────── */
.renewal-card .card-head { margin-bottom: 12px; }
.renewal-hero { display: grid; gap: 2px; margin-bottom: 12px; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel-2); }
.renewal-hero small { color: var(--muted); font-weight: 500; }
.renewal-hero b { font-size: 30px; line-height: 1.2; font-weight: 680; letter-spacing: -.02em; }
.renewal-hero span { color: var(--muted); font-size: 13px; }
.renewal-card.tone-ok .renewal-hero { background: linear-gradient(135deg, var(--ok-soft), transparent 80%); }
.renewal-card.tone-ok .renewal-hero b { color: var(--ok); }
.renewal-card.tone-warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.renewal-card.tone-warn .renewal-hero { background: linear-gradient(135deg, var(--warn-soft), transparent 80%); }
.renewal-card.tone-warn .renewal-hero b { color: var(--warn); }
.renewal-card.tone-bad { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.renewal-card.tone-bad .renewal-hero { background: linear-gradient(135deg, var(--bad-soft), transparent 80%); }
.renewal-card.tone-bad .renewal-hero b { color: var(--bad); }
.renewal-card .meter { max-width: none; margin-bottom: 14px; }
.renewal-card .callout { margin: 12px 0 0; }
.renewal-card .defs dd { word-break: break-all; }
.renewal-alert { align-items: center; text-decoration: none; }
.renewal-alert > span { flex: 1; display: grid; gap: 2px; }
.mini-list li > a { color: inherit; text-decoration: none; }
.mini-list .device-icon { width: 32px; height: 32px; border-radius: 10px; flex: none; }
