@charset "utf-8";
/* theme-dark.css — 深色主题：同一套液态玻璃材质在暗底上的表现
   只覆盖颜色与光影，不改任何布局或行为 */

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0d0f14;
  --bg-elevated: #1c2029;
  --bg-soft: rgba(255, 255, 255, 0.05);
  --glass: rgba(32, 36, 46, 0.56);
  --glass-strong: rgba(34, 38, 48, 0.84);
  --glass-thin: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(30px) saturate(150%);
  --glass-blur-soft: blur(18px) saturate(140%);
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --glass-edge: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  --field: rgba(255, 255, 255, 0.06);
  --field-border: rgba(255, 255, 255, 0.11);

  --text: #f1f3f7;
  --text-soft: #b6bdc9;
  --text-mute: #868e9c;

  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --accent: #6f9dff;
  --accent-2: #a8c4ff;
  --accent-soft: rgba(111, 157, 255, 0.14);
  --accent-ring: rgba(111, 157, 255, 0.3);

  --danger: #ff7d7d;
  --danger-soft: rgba(255, 125, 125, 0.12);
  --warn: #e8b45c;
  --warn-soft: rgba(232, 180, 92, 0.14);
  --ok: #5fd39b;
  --ok-soft: rgba(95, 211, 155, 0.14);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 22px rgba(0, 0, 0, 0.3);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.34), 0 18px 44px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 6px 16px rgba(0, 0, 0, 0.4), 0 36px 84px rgba(0, 0, 0, 0.55);
}

/* 暗底光场 */
html[data-theme="dark"],
[data-theme="dark"] body {
  background-color: #0c0e13;
}
[data-theme="dark"] body {
  background-image:
    radial-gradient(48% 42% at 6% -6%, rgba(64, 104, 214, 0.4), rgba(64, 104, 214, 0) 62%),
    radial-gradient(38% 36% at 98% 0%, rgba(196, 74, 122, 0.24), rgba(196, 74, 122, 0) 64%),
    radial-gradient(52% 48% at 94% 98%, rgba(30, 150, 148, 0.26), rgba(30, 150, 148, 0) 66%),
    radial-gradient(42% 42% at 18% 96%, rgba(118, 92, 214, 0.24), rgba(118, 92, 214, 0) 68%),
    linear-gradient(165deg, #12151c 0%, #0b0d12 52%, #10131a 100%);
}

[data-theme="dark"] .topbar::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0));
}

[data-theme="dark"] .search-box input { background: rgba(255, 255, 255, 0.06); }
[data-theme="dark"] .search-box input:focus { background: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .search-results { background: rgba(30, 34, 43, 0.94); }
[data-theme="dark"] .search-item:hover,
[data-theme="dark"] .search-item.active { background: rgba(255, 255, 255, 0.1); }

[data-theme="dark"] .nav-item:hover { background: rgba(255, 255, 255, 0.07); }
[data-theme="dark"] .nav-item.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07));
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--accent-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 4px 14px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .collapse-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .collapse-btn:hover { background: rgba(255, 255, 255, 0.13); color: var(--text); }

[data-theme="dark"] .btn {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 1px 2px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .btn:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  color: var(--text);
}
[data-theme="dark"] .btn.primary {
  background: linear-gradient(180deg, #7ba6ff, #3b6fe6 55%, #2f5fd0);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 18px rgba(43, 98, 224, 0.45);
}
[data-theme="dark"] .btn.primary:hover { color: #fff; }
[data-theme="dark"] .btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
[data-theme="dark"] .btn.ghost:hover { background: rgba(255, 255, 255, 0.09); }
[data-theme="dark"] .btn.danger {
  background: rgba(255, 125, 125, 0.12);
  border-color: rgba(255, 125, 125, 0.3);
  color: var(--danger);
}
[data-theme="dark"] .btn.danger:hover { background: var(--danger); color: #2a1010; }

[data-theme="dark"] .kpi {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
}
[data-theme="dark"] .kpi::before { background: radial-gradient(closest-side, rgba(255, 255, 255, 0.1), transparent); }

[data-theme="dark"] .tabs { background: rgba(255, 255, 255, 0.055); border-color: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .tab:hover { background: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .tab.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.18));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 2px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .row,
[data-theme="dark"] .memo-item,
[data-theme="dark"] .cal-cell {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .cal-cell.empty {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
[data-theme="dark"] .row:hover,
[data-theme="dark"] .memo-item:hover,
[data-theme="dark"] .cal-cell:hover:not(.empty) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}
[data-theme="dark"] .memo-item.pinned {
  background: linear-gradient(155deg, rgba(111, 157, 255, 0.18), rgba(255, 255, 255, 0.04));
  border-color: rgba(111, 157, 255, 0.32);
}
[data-theme="dark"] .col {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .table th { background: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .table tbody tr:hover { background: rgba(255, 255, 255, 0.05); }

[data-theme="dark"] .input,
[data-theme="dark"] .textarea,
[data-theme="dark"] .select { background: rgba(255, 255, 255, 0.055); border-color: rgba(255, 255, 255, 0.11); }
[data-theme="dark"] .input:focus,
[data-theme="dark"] .textarea:focus,
[data-theme="dark"] .select:focus { background: rgba(255, 255, 255, 0.1); border-color: rgba(111, 157, 255, 0.55); }

[data-theme="dark"] .badge {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-soft);
}
[data-theme="dark"] .badge.high { background: rgba(255, 125, 125, 0.16); color: var(--danger); border-color: rgba(255, 125, 125, 0.22); }
[data-theme="dark"] .badge.mid { background: rgba(232, 180, 92, 0.16); color: var(--warn); border-color: rgba(232, 180, 92, 0.22); }
[data-theme="dark"] .badge.ok { background: rgba(95, 211, 155, 0.16); color: var(--ok); border-color: rgba(95, 211, 155, 0.22); }
[data-theme="dark"] .badge.accent { background: rgba(111, 157, 255, 0.18); color: var(--accent-2); border-color: rgba(111, 157, 255, 0.24); }
[data-theme="dark"] .badge.solid {
  background: linear-gradient(180deg, #7ba6ff, #3b6fe6);
  color: #fff;
  border-color: transparent;
}

[data-theme="dark"] .progress { background: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .empty {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .modal-mask { background: rgba(0, 0, 0, 0.5); }
[data-theme="dark"] .modal { border-color: rgba(255, 255, 255, 0.12); }
[data-theme="dark"] .modal-close { background: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .modal-close:hover { background: rgba(255, 255, 255, 0.18); color: var(--text); }
[data-theme="dark"] .modal-foot { background: rgba(255, 255, 255, 0.03); }
[data-theme="dark"] .modal-warn {
  background: rgba(255, 125, 125, 0.12);
  border-color: rgba(255, 125, 125, 0.2);
}

[data-theme="dark"] .toast {
  background: rgba(48, 53, 64, 0.86);
  color: #f4f6fa;
  border-color: rgba(255, 255, 255, 0.14);
}
[data-theme="dark"] .toast.ok { background: rgba(31, 140, 92, 0.9); }
[data-theme="dark"] .toast.err { background: rgba(196, 62, 62, 0.9); }

[data-theme="dark"] .cal-cell.has-data,
[data-theme="dark"] .cal-cell.lvl-1 {
  background: linear-gradient(160deg, rgba(111, 157, 255, 0.2), rgba(255, 255, 255, 0.05));
  border-color: rgba(111, 157, 255, 0.34);
}
[data-theme="dark"] .cal-cell.lvl-2 {
  background: linear-gradient(160deg, rgba(111, 157, 255, 0.32), rgba(111, 157, 255, 0.12));
  border-color: rgba(111, 157, 255, 0.5);
}
[data-theme="dark"] .cal-cell.today { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 1px rgba(111, 157, 255, 0.25); }
[data-theme="dark"] .chart-grid { stroke: rgba(255, 255, 255, 0.12); }
[data-theme="dark"] .chart-dot { fill: #1b1f27; }
[data-theme="dark"] .chart-bar-bg { fill: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .detail,
[data-theme="dark"] .detail-block { border-top-color: rgba(255, 255, 255, 0.12); }

[data-theme="dark"]::-webkit-scrollbar-thumb,
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); background-clip: content-box; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.26); background-clip: content-box; }

/* 登录闸门 */
[data-theme="dark"] .gate { background: rgba(8, 11, 18, 0.78); }
[data-theme="dark"] .gate-card {
  background: linear-gradient(180deg, rgba(31, 35, 45, 0.97), rgba(23, 27, 35, 0.92));
  border-color: rgba(255, 255, 255, 0.13);
}
[data-theme="dark"] .gate-foot code { background: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .gate-error { border-color: rgba(255, 120, 120, 0.28); }

