/* ============================================================
   ops-panel · iPhone 17 Pro 组网控制台
   设计语言：深空黑 + 极光渐变 + 玻璃拟态 + 磷光绿终端
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #050508;
  --bg2: #0b0c13;
  --glass: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.028));
  --glass2: rgba(255,255,255,.07);
  --line: rgba(255,255,255,.09);
  --line2: rgba(255,255,255,.16);
  --fg: #f4f6fb;
  --dim: rgba(233,238,252,.58);
  --faint: rgba(233,238,252,.34);
  --ok: #34d399;   --acc: #818cf8;  --cyan: #22d3ee;
  --warn: #fbbf24; --bad: #f87171;  --violet: #a78bfa;
  --grad: linear-gradient(135deg, #818cf8 0%, #22d3ee 100%);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --r: 20px;
  --shadow: 0 12px 34px rgba(0,0,0,.42);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

html { height: 100%; }
html, body { overscroll-behavior-y: none; }
body {
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.55 -apple-system, "SF Pro Text", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(78px + var(--sab));
  overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; user-select: none; -webkit-user-select: none; }
input { font: inherit; }
a { color: var(--cyan); text-decoration: none; }
.dim { color: var(--dim); } .faint { color: var(--faint); }

/* ---------------- 背景极光 ---------------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .32; }
.aurora .a1 { width: 46vw; height: 46vw; min-width: 300px; min-height: 300px; left: -14vw; top: -12vw;
  background: radial-gradient(circle, #4f46e5 0%, transparent 68%); animation: drift1 26s ease-in-out infinite alternate; }
.aurora .a2 { width: 40vw; height: 40vw; min-width: 260px; min-height: 260px; right: -12vw; top: 22vh;
  background: radial-gradient(circle, #0e7490 0%, transparent 68%); animation: drift2 32s ease-in-out infinite alternate; }
.aurora .a3 { width: 34vw; height: 34vw; min-width: 220px; min-height: 220px; left: 24vw; bottom: -16vh;
  background: radial-gradient(circle, #3b0764 0%, transparent 70%); animation: drift3 38s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(9vw, 7vh) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-8vw, -6vh) scale(.9); } }
@keyframes drift3 { to { transform: translate(-6vw, -9vh) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .aurora i { animation: none; } }

/* ---------------- 顶栏（灵动岛适配） ---------------- */
.top {
  position: sticky; top: 0; z-index: 30;
  padding-top: calc(var(--sat) + 8px);
  background: rgba(5,5,8,.68);
  -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
.top-in { max-width: 1100px; margin: 0 auto; padding: 6px 16px 10px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.logo {
  width: 38px; height: 38px; border-radius: 13px; flex: none;
  display: flex; align-items: center; justify-content: center; color: #c7d2fe;
  background: var(--glass); border: 1px solid var(--line2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 4px 16px rgba(99,102,241,.22);
}
.logo svg { width: 21px; height: 21px; }
.brand-t { min-width: 0; }
.top h1 { font-size: 17px; font-weight: 800; letter-spacing: 2.5px; line-height: 1.15; display: flex; align-items: baseline; gap: 8px; }
.top h1 em { font-style: normal; font-size: 11px; font-weight: 500; letter-spacing: 1px; color: var(--dim); }
.topstat { font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; }
.tabs { display: none; gap: 4px; margin-left: auto; }
.tabs button { padding: 7px 16px; border-radius: 12px; color: var(--dim); font-size: 13.5px; font-weight: 500; }
.tabs button.on { color: var(--fg); background: var(--glass2); box-shadow: inset 0 1px 0 rgba(255,255,255,.1); }

/* ---------------- 主区 ---------------- */
main { max-width: 1100px; margin: 0 auto; padding: 14px 16px 8px; }
.tab { display: none; }
.tab.on { display: block; animation: tabin .28s cubic-bezier(.3,.7,.3,1); }
@keyframes tabin { from { opacity: 0; transform: translateY(8px) scale(.995); } }

/* ---------------- 底部导航（Home 指示条适配） ---------------- */
.bnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex;
  padding: 6px 10px calc(6px + var(--sab));
  background: rgba(6,6,10,.74);
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
  border-top: 1px solid var(--line);
}
.bnav button { flex: 1; padding: 6px 0 4px; color: var(--faint); font-size: 10px; display: flex; flex-direction: column; align-items: center; gap: 3px; border-radius: 14px; transition: color .18s; position: relative; }
.bnav button i { font-style: normal; font-size: 0; line-height: 0; }
.bnav button svg { width: 23px; height: 23px; }
.bnav button.on { color: #c7d2fe; }
.bnav button.on::before {
  content: ""; position: absolute; inset: 2px 14% 0; border-radius: 14px; z-index: -1;
  background: linear-gradient(180deg, rgba(129,140,248,.2), rgba(34,211,238,.08));
  box-shadow: inset 0 0 0 1px rgba(129,140,248,.25);
}
.bnav button:active { transform: scale(.94); }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 15px; margin-bottom: 12px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.06);
}
.card-h { font-size: 11.5px; font-weight: 700; color: var(--dim); letter-spacing: 2px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-h a { font-size: 11.5px; letter-spacing: .5px; color: var(--acc); }
.panelrow { display: grid; gap: 12px; }

/* ---------------- 告警 ---------------- */
.alert {
  border-radius: 15px; padding: 10px 14px; margin-bottom: 9px; font-size: 12.5px; border: 1px solid;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.alert.bad { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.32); color: #ffb4ad; }
.alert.warn { background: rgba(251,191,36,.09); border-color: rgba(251,191,36,.3); color: #fde19a; }

/* ---------------- 总览仪表 ---------------- */
.gauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 12px; }
.gauge {
  background: var(--glass); border: 1px solid var(--line); border-radius: 18px;
  padding: 9px 4px 8px; text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.gauge canvas { width: 100%; max-width: 76px; height: 76px; }
.gauge .g-l { font-size: 10px; color: var(--faint); margin-top: 1px; letter-spacing: 1px; }
.gauge .g-v { font-size: 10.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }

/* ---------------- 今日条 ---------------- */
.today { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 12px; }
.tcell {
  background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 10px 10px 9px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06); min-width: 0;
}
.tcell .t-n { font-size: 19px; font-weight: 800; color: var(--fg); font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.tcell .t-l { font-size: 10px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcell .t-s { font-size: 9.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- 服务 chips ---------------- */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; background: var(--glass2);
  border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px; font-size: 12px; color: var(--dim);
}
.badge { font-size: 9.5px; font-weight: 600; padding: 1.5px 7px; border-radius: 9px; letter-spacing: .5px; white-space: nowrap; }
.badge.ok { background: rgba(52,211,153,.14); color: var(--ok); }
.badge.warn { background: rgba(251,191,36,.14); color: var(--warn); }
.badge.acc { background: rgba(129,140,248,.16); color: #a5b4fc; }
.badge.bad { background: rgba(248,113,113,.14); color: var(--bad); }

/* ---------------- 状态灯 ---------------- */
.dot, .led { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.on, .led.on { background: var(--ok); box-shadow: 0 0 8px rgba(52,211,153,.8); }
.dot.on, .led.on { animation: breathe 2.6s ease-in-out infinite; }
.dot.off, .led.off { background: rgba(233,238,252,.22); }
.dot.bad, .led.bad { background: var(--bad); box-shadow: 0 0 8px rgba(248,113,113,.8); }
.dot.warn, .led.warn { background: var(--warn); box-shadow: 0 0 8px rgba(251,191,36,.7); }
@keyframes breathe { 50% { box-shadow: 0 0 2px rgba(52,211,153,.3); } }

/* ---------------- 事件流 ---------------- */
.evlist { max-height: 320px; overflow-y: auto; }
.ev { display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 12px; align-items: baseline; }
.ev:last-child { border-bottom: none; }
.ev .e-t { color: var(--faint); font-size: 10.5px; white-space: nowrap; font-family: var(--mono); }
.ev .e-s { color: #a5b4fc; font-size: 10.5px; min-width: 34px; font-family: var(--mono); }
.ev.sev-bad .e-m { color: #ffb4ad; } .ev.sev-warn .e-m { color: #fde19a; } .ev.sev-ok .e-m { color: #86efac; }

/* ============================================================
   服务页 · 网格（一屏尽览，无需滚动）
   ============================================================ */
.svcgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile {
  position: relative; overflow: hidden;
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 13px 12px; min-height: 148px;
  display: flex; flex-direction: column; gap: 6px; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 22px rgba(0,0,0,.28);
  transition: transform .16s cubic-bezier(.3,.7,.3,1), border-color .16s, box-shadow .16s;
}
.tile:active { transform: scale(.965); }
.tile.up { border-color: rgba(52,211,153,.26); }
.tile.down { border-color: rgba(248,113,113,.24); }
.tile::after { /* 顶部微光 */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 42%;
  background: linear-gradient(180deg, rgba(255,255,255,.05), transparent); pointer-events: none;
}
.t-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.t-name { font-size: 12.5px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.t-sub { font-size: 10.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-sub b { font-weight: 600; }
.t-stats { font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 14px; }
.t-actions { margin-top: auto; display: flex; gap: 7px; padding-top: 4px; }
.pwr {
  width: 38px; height: 34px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.32); color: #fda4a4;
  transition: transform .14s, filter .14s;
}
.pwr.start { background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.34); color: #6ee7b7; }
.pwr.neutral { background: var(--glass2); border-color: var(--line2); color: var(--dim); }
.pwr svg { width: 15px; height: 15px; }
.pwr:active { transform: scale(.9); }
.pwr:disabled { opacity: .35; }
.t-more {
  flex: 1; height: 34px; border-radius: 12px; font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--dim);
  background: var(--glass2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.t-more:active { transform: scale(.97); }
.t-more svg { width: 13px; height: 13px; }
.foot { display: flex; gap: 8px; justify-content: center; margin: 14px 0 4px; flex-wrap: wrap; }
.foot button { padding: 9px 18px; border-radius: 13px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; }

@media (min-width: 620px) { .svcgrid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) {
  body { padding-bottom: 24px; }
  .tabs { display: flex; } .bnav { display: none; }
  .panelrow { grid-template-columns: 5fr 7fr; }
  .svcgrid { grid-template-columns: repeat(4, 1fr); }
  .foot { margin: 18px 0 8px; }
}

/* ---------------- 按钮 ---------------- */
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btns button, .foot button {
  padding: 8px 15px; border-radius: 12px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line); background: var(--glass2); color: var(--fg);
  transition: transform .14s, filter .14s;
}
.btns button:active:not(:disabled), .foot button:active:not(:disabled) { transform: scale(.95); }
.btns button:disabled { opacity: .38; }
.b-ok { background: rgba(52,211,153,.13) !important; color: #6ee7b7 !important; border-color: rgba(52,211,153,.36) !important; }
.b-bad { background: rgba(248,113,113,.12) !important; color: #fda4a4 !important; border-color: rgba(248,113,113,.34) !important; }
.b-acc { background: rgba(129,140,248,.14) !important; color: #a5b4fc !important; border-color: rgba(129,140,248,.36) !important; }
.b-warn { background: rgba(251,191,36,.12) !important; color: #fde19a !important; border-color: rgba(251,191,36,.32) !important; }
.b-ghost { background: transparent !important; color: var(--faint) !important; }

/* ============================================================
   详情抽屉（底部弹出）
   ============================================================ */
#sheet { position: fixed; inset: 0; z-index: 40; display: none; }
#sheet.show { display: block; }
.sheet-bg { position: absolute; inset: 0; background: rgba(2,2,5,.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transition: opacity .24s; }
#sheet.show .sheet-bg { opacity: 1; }
.sheet-card {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 620px; margin: 0 auto;
  background: linear-gradient(180deg, rgba(22,23,34,.97), rgba(12,13,20,.97));
  -webkit-backdrop-filter: blur(26px); backdrop-filter: blur(26px);
  border: 1px solid var(--line2); border-bottom: none;
  border-radius: 28px 28px 0 0;
  padding: 8px 20px calc(20px + var(--sab));
  transform: translateY(103%);
  transition: transform .34s cubic-bezier(.32,.72,.28,1);
  box-shadow: 0 -18px 60px rgba(0,0,0,.55);
}
#sheet.show .sheet-card { transform: none; }
.grip { width: 40px; height: 4.5px; border-radius: 3px; background: rgba(255,255,255,.22); margin: 4px auto 12px; cursor: pointer; }
.sh-h { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.sh-h .sh-name { font-size: 16.5px; font-weight: 800; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-row { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.055); font-size: 12.5px; align-items: baseline; }
.sh-row:last-of-type { border-bottom: none; }
.sh-row .k { color: var(--faint); font-size: 11px; flex: none; width: 62px; letter-spacing: 1px; }
.sh-row .v { color: var(--fg); min-width: 0; word-break: break-all; font-variant-numeric: tabular-nums; }
.sh-spark { width: 100%; height: 64px; display: block; margin: 8px 0 4px; }
.sh-legend { display: flex; gap: 14px; font-size: 10px; color: var(--faint); margin-bottom: 8px; }
.sh-legend i { display: inline-block; width: 8px; height: 2.5px; border-radius: 2px; margin-right: 4px; vertical-align: 2px; }
.sh-btns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.sh-btns button {
  padding: 11px 10px; border-radius: 13px; font-size: 13px; font-weight: 700;
  border: 1px solid var(--line); background: var(--glass2); color: var(--fg);
  transition: transform .14s;
}
.sh-btns button:active:not(:disabled) { transform: scale(.96); }
.sh-btns button:disabled { opacity: .35; }
.sh-url { margin-top: 10px; }
.sh-url a { display: block; padding: 10px 12px; border-radius: 12px; background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.26); color: #7dd3fc; font-size: 12px; word-break: break-all; text-align: center; }

/* ============================================================
   数据页
   ============================================================ */
.subtabs { display: flex; gap: 7px; margin-bottom: 13px; }
.subtabs button {
  flex: 1; padding: 8px 6px; border-radius: 13px; border: 1px solid var(--line);
  color: var(--dim); font-size: 12.5px; font-weight: 600; background: var(--glass2);
  transition: all .18s; white-space: nowrap;
}
.subtabs button.on {
  color: #e0e7ff; border-color: rgba(129,140,248,.5);
  background: linear-gradient(180deg, rgba(129,140,248,.18), rgba(34,211,238,.07));
  box-shadow: 0 4px 18px rgba(99,102,241,.22), inset 0 1px 0 rgba(255,255,255,.1);
}
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 12px; }
.kpi {
  background: var(--glass); border: 1px solid var(--line); border-radius: 17px;
  padding: 10px 11px 9px; min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.kpi .k-n { font-size: 19px; font-weight: 800; letter-spacing: -.3px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .k-l { font-size: 10px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .k-s { font-size: 9.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.g .k-n { color: var(--ok); } .kpi.w .k-n { color: var(--warn); }
.kpi.r .k-n { color: var(--bad); } .kpi.a .k-n { color: #a5b4fc; } .kpi.c .k-n { color: var(--cyan); }
@media (max-width: 480px) { .kpis { grid-template-columns: repeat(2, 1fr); } }

.chartcard { position: relative; margin: 0 -4px; }
.chartcard canvas { width: calc(100% + 8px); height: 150px; display: block; }

/* 数据库大小（手机股票板块） */
.dbrow { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.055); }
.dbrow:last-child { border-bottom: none; }
.dbrow .db-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.dbrow .db-n { font-size: 12.5px; font-weight: 700; font-family: var(--mono); }
.dbrow .db-v { font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.dbbar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.dbbar i { display: block; height: 100%; border-radius: 3px; }
.dbfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; font-size: 11px; color: var(--dim); }
.grow-badge { font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 10px; background: rgba(52,211,153,.12); color: #6ee7b7; border: 1px solid rgba(52,211,153,.3); }
.grow-badge.neg { background: rgba(248,113,113,.1); color: #fda4a4; border-color: rgba(248,113,113,.28); }

/* 表格 */
table.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { color: var(--faint); font-weight: 600; text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--line); font-size: 10px; letter-spacing: 1px; white-space: nowrap; }
.tbl td { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,.05); font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .num { text-align: right; }
.tbl th.num { text-align: right; }
.fresh-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.fresh-dot.ok { background: var(--ok); box-shadow: 0 0 6px rgba(52,211,153,.7); }
.fresh-dot.stale { background: var(--warn); }
.li-row { display: flex; gap: 8px; padding: 5px 0; font-size: 12.5px; border-bottom: 1px solid rgba(255,255,255,.05); align-items: baseline; }
.li-row:last-child { border-bottom: none; }
.li-t { color: var(--faint); font-size: 10.5px; white-space: nowrap; font-family: var(--mono); }

/* 分数 × 标签 矩阵 */
.stmatrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -6px; padding: 0 6px; }
.stmatrix { min-width: 380px; font-variant-numeric: tabular-nums; }
.stmatrix th, .stmatrix td { text-align: center; font-size: 11.5px; padding: 6px 7px; white-space: nowrap; }
.stmatrix th { font-weight: 600; color: var(--faint); font-size: 10px; }
.stmatrix tr + tr td { border-top: 1px solid rgba(255,255,255,.05); }
.stmatrix td:first-child, .stmatrix th:first-child { text-align: left; padding-left: 2px; font-weight: 600; }
.st-note { font-size: 10.5px; margin: 9px 0 8px; line-height: 1.6; }

/* 额度条（DSH GLM） */
.quota { margin-bottom: 12px; }
.quota .q-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.quota .q-n { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.quota .q-s { font-size: 10.5px; color: var(--faint); }
.qbar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.07); overflow: hidden; position: relative; }
.qbar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #34d399, #22d3ee); box-shadow: 0 0 12px rgba(52,211,153,.5); transition: width .5s cubic-bezier(.3,.7,.3,1); }

/* ============================================================
   日志页 · Matrix 终端
   ============================================================ */
.term-srcs { margin-bottom: 10px; }
.term-srcs button {
  padding: 5px 13px; border-radius: 9px; border: 1px solid rgba(52,211,153,.28);
  background: rgba(52,211,153,.06); color: rgba(125,252,164,.75);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .5px;
}
.term-srcs button.on {
  background: rgba(52,211,153,.16); color: #86efac;
  box-shadow: 0 0 14px rgba(52,211,153,.22), inset 0 0 8px rgba(52,211,153,.08);
  border-color: rgba(52,211,153,.55);
}
.logbar {
  display: flex; gap: 8px; align-items: center; margin-bottom: 10px; font-size: 11.5px; color: var(--dim);
  font-family: var(--mono);
}
.lauto { display: flex; align-items: center; gap: 5px; color: #86efac; cursor: pointer; white-space: nowrap; }
.lauto input { accent-color: #34d399; width: 14px; height: 14px; }
.lprompt { color: #34d399; text-shadow: 0 0 8px rgba(52,211,153,.6); font-weight: 700; }
#logfilter {
  flex: 1; min-width: 60px; background: rgba(0,12,5,.7); border: 1px solid rgba(52,211,153,.3);
  color: #bbf7d0; border-radius: 8px; padding: 5px 10px; font-family: var(--mono); font-size: 11.5px; outline: none;
}
#logfilter:focus { border-color: rgba(52,211,153,.65); box-shadow: 0 0 12px rgba(52,211,153,.18); }
#logfilter::placeholder { color: rgba(125,252,164,.32); }
#logmeta { white-space: nowrap; color: rgba(125,252,164,.45); }

.term {
  position: relative; border-radius: 18px; overflow: hidden;
  background: #010604;
  border: 1px solid rgba(52,211,153,.22);
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 0 34px rgba(16,185,129,.1), inset 0 0 26px rgba(3,32,18,.55);
}
#mrx { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.logview {
  position: relative; z-index: 1; background: transparent;
  padding: 13px 15px; margin: 0; max-height: 64vh; overflow: auto;
  font: 11px/1.7 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal;
  color: #6ee7a0; text-shadow: 0 0 7px rgba(61,245,137,.32);
}
.logview .ln { display: block; }
.logview .ts { color: rgba(110,231,160,.42); }
.logview .ln.err { color: #ff7b72; text-shadow: 0 0 7px rgba(255,80,80,.4); }
.logview .ln.warn { color: #ffd66e; text-shadow: 0 0 7px rgba(255,200,60,.35); }
.logview .ln.hi { color: #c9ffe0; text-shadow: 0 0 9px rgba(110,255,170,.6); }
.scan {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.24) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.5) 100%);
  mix-blend-mode: multiply;
}

/* ============================================================
   PIN 锁
   ============================================================ */
#lock { position: fixed; inset: 0; z-index: 50; background: rgba(4,4,8,.92); display: none; align-items: center; justify-content: center; overflow: hidden; }
#lock.show { display: flex; }
#lock .aurora { z-index: 0; }
#lockbox { position: relative; z-index: 1; text-align: center; padding: 34px 30px; border-radius: 28px; background: var(--glass); border: 1px solid var(--line2); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 24px 70px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.1); }
.lk-ico {
  width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center; color: #a5b4fc;
  background: linear-gradient(180deg, rgba(129,140,248,.16), rgba(34,211,238,.06));
  border: 1px solid rgba(129,140,248,.34);
  box-shadow: 0 0 28px rgba(99,102,241,.28), inset 0 1px 0 rgba(255,255,255,.14);
  animation: lkfloat 3.2s ease-in-out infinite;
}
.lk-ico svg { width: 27px; height: 27px; }
@keyframes lkfloat { 50% { transform: translateY(-4px); box-shadow: 0 0 40px rgba(99,102,241,.4), inset 0 1px 0 rgba(255,255,255,.14); } }
.lk-t { font-size: 20px; font-weight: 800; letter-spacing: 3px; }
.lk-s { font-size: 9.5px; color: var(--faint); letter-spacing: 3.5px; margin: 5px 0 22px; }
#lockpin {
  display: block; width: 226px; margin: 0 auto 12px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line2); color: var(--fg);
  text-align: center; border-radius: 14px; padding: 12px; font-size: 19px; letter-spacing: 6px; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
#lockpin:focus { border-color: rgba(129,140,248,.6); box-shadow: 0 0 0 3px rgba(129,140,248,.18), 0 0 26px rgba(99,102,241,.25); }
#lockok {
  display: block; width: 226px; margin: 0 auto; padding: 12px; border-radius: 14px; font-size: 14.5px; font-weight: 700; letter-spacing: 6px; text-indent: 6px; color: #060a14;
  background: linear-gradient(135deg, #a5b4fc, #67e8f9);
  box-shadow: 0 6px 24px rgba(99,102,241,.4), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .15s, box-shadow .15s;
}
#lockok:active { transform: scale(.96); box-shadow: 0 2px 10px rgba(99,102,241,.35); }
.lk-err { margin-top: 13px; font-size: 12px; color: var(--bad); min-height: 18px; }
.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-7px); } 50% { transform: translateX(7px); } 75% { transform: translateX(-4px); } }

/* ---------------- toast ---------------- */
#toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--sab)); transform: translateX(-50%) translateY(6px);
  z-index: 60; padding: 10px 20px; border-radius: 14px; font-size: 12.5px; font-weight: 600;
  background: rgba(22,23,34,.94); color: var(--fg); border: 1px solid var(--line2);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 10px 34px rgba(0,0,0,.5); display: none; max-width: 86vw; opacity: 0;
  transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 900px) { #toast { bottom: 34px; } }

/* 滚动条（桌面） */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
