/* 360 产教融合运营工作台 · 视觉系统 */

:root {
  --bg: #070c1a;
  --bg-soft: #0c1428;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-solid: #111c34;
  --panel-hover: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eaf1ff;
  --text-2: #c2cfe6;
  --muted: #7d8db0;
  --accent: #2e8bff;
  --accent-2: #22d3b8;
  --accent-3: #a78bfa;
  --gold: #f5a524;
  --good: #22c55e;
  --warn: #f5a524;
  --bad: #f4526c;
  --sidebar-bg: linear-gradient(180deg, #0a1428 0%, #070d1c 100%);
  --glow: radial-gradient(circle at 12% 8%, rgba(46, 139, 255, 0.18), transparent 42%),
          radial-gradient(circle at 88% 2%, rgba(34, 211, 184, 0.14), transparent 38%),
          radial-gradient(circle at 60% 100%, rgba(167, 139, 250, 0.10), transparent 45%);
  --shadow: 0 18px 40px rgba(2, 8, 22, 0.45);
  --radius: 18px;
  --sidebar-w: 246px;
  --table-head: rgba(255, 255, 255, 0.04);
  --input-bg: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
  --bg: #eef2f9;
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --panel-hover: #f4f7fd;
  --border: rgba(16, 34, 66, 0.10);
  --border-strong: rgba(16, 34, 66, 0.18);
  --text: #10223f;
  --text-2: #33456a;
  --muted: #6b7c9b;
  --sidebar-bg: linear-gradient(180deg, #0e1c38 0%, #0a1428 100%);
  --glow: radial-gradient(circle at 10% 4%, rgba(46, 139, 255, 0.12), transparent 40%),
          radial-gradient(circle at 90% 0%, rgba(34, 211, 184, 0.10), transparent 36%);
  --shadow: 0 14px 32px rgba(16, 34, 66, 0.10);
  --table-head: #f4f7fd;
  --input-bg: #ffffff;
}

* { -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  background-image: var(--glow);
  background-attachment: fixed;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: .01em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1045;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 20px; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(135deg, #2e8bff, #22d3b8);
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #fff;
  box-shadow: 0 8px 20px rgba(46, 139, 255, 0.35);
  flex: 0 0 42px;
}
.brand-text b { display: block; font-size: 15px; color: #fff; letter-spacing: .04em; }
.brand-text span { font-size: 11px; color: rgba(255, 255, 255, 0.55); }

.nav-label {
  font-size: 11px; letter-spacing: .18em; color: rgba(255, 255, 255, 0.32);
  padding: 14px 12px 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; margin-bottom: 5px;
  border-radius: 12px; color: rgba(233, 240, 255, 0.72);
  font-weight: 500; transition: all .18s ease; position: relative;
}
.nav-item i { font-size: 17px; width: 20px; text-align: center; }
.nav-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(46, 139, 255, 0.28), rgba(34, 211, 184, 0.12));
  color: #fff; box-shadow: inset 0 0 0 1px rgba(46, 139, 255, 0.35);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-2);
}
.nav-sub { margin: 0 0 6px 44px; }
.nav-sub a { display: block; font-size: 12.5px; color: rgba(220, 230, 250, 0.55); padding: 6px 0; }
.nav-sub a:hover { color: #fff; }

.sidebar-foot {
  margin-top: auto; padding: 14px 12px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px; color: rgba(255, 255, 255, 0.42); line-height: 1.7;
}

.main-area { flex: 1 1 auto; margin-left: var(--sidebar-w); min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 1030;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 26px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.page-title { font-size: 17px; font-weight: 700; margin: 0; }
.page-sub { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar > div { min-width: 0; }

.content { padding: 22px 26px 60px; }

.card-glass {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
[data-theme="light"] .card-glass { box-shadow: 0 10px 26px rgba(16, 34, 66, .07); }

.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px; }
.card-head h6 { margin: 0; font-size: 14.5px; font-weight: 700; }
.card-head .hint { font-size: 12px; color: var(--muted); }
.card-body-pad { padding: 14px 18px 18px; }

.section-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; margin: 4px 0 14px; }
.section-title::before {
  content: ""; width: 4px; height: 16px; border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.kpi-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); }
.kpi { position: relative; overflow: hidden; padding: 16px 16px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--border); }
.kpi::after {
  content: ""; position: absolute; right: -24px; top: -24px;
  width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 139, 255, .22), transparent 70%);
}
.kpi .kpi-label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .kpi-value { font-size: 27px; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.kpi .kpi-value small { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi .kpi-foot { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.kpi.k1 { border-left: 3px solid var(--accent); }
.kpi.k2 { border-left: 3px solid var(--accent-2); }
.kpi.k3 { border-left: 3px solid var(--gold); }
.kpi.k4 { border-left: 3px solid var(--accent-3); }
.kpi.k5 { border-left: 3px solid #f472b6; }

.chart { width: 100%; height: 300px; }
.chart-sm { height: 236px; }
.chart-lg { height: 420px; }
.chart-xl { height: 520px; }

.table-wrap { border-radius: 14px; border: 1px solid var(--border); overflow: hidden; background: var(--panel); }
.table-scroll { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0; }
.data-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--table-head);
  color: var(--muted); font-weight: 600; font-size: 12.5px;
  padding: 12px 14px; white-space: nowrap;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.data-table thead th a { color: inherit; display: inline-flex; gap: 4px; align-items: center; }
.data-table thead th a:hover { color: var(--accent); }
.data-table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: middle; }
.data-table tbody tr:hover td { background: var(--panel-hover); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td.primary { color: var(--text); font-weight: 600; }
.cell-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 320px; }
.col-seq { width: 62px; text-align: center; color: var(--muted) !important; }
.col-act { width: 96px; white-space: nowrap; text-align: right; }

.table-empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.table-empty i { font-size: 34px; opacity: .5; display: block; margin-bottom: 10px; }

.data-table tbody tr.group-row td {
  background: linear-gradient(90deg, rgba(46,139,255,.10), transparent 70%);
  color: var(--text); font-weight: 700; font-size: 13px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.data-table tbody tr.group-row:hover td { background: linear-gradient(90deg, rgba(46,139,255,.14), transparent 70%); }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.pill-delivery { background: rgba(34, 211, 184, .14); color: #56e3cc; border-color: rgba(34, 211, 184, .3); }
.pill-presale { background: rgba(46, 139, 255, .14); color: #74b3ff; border-color: rgba(46, 139, 255, .3); }
[data-theme="light"] .pill-delivery { color: #0d7d6c; }
[data-theme="light"] .pill-presale { color: #1c5fc4; }
.pill-good { background: rgba(34, 197, 94, .14); color: #4ade80; border-color: rgba(34, 197, 94, .3); }
.pill-warn { background: rgba(245, 165, 36, .15); color: #fbbf24; border-color: rgba(245, 165, 36, .3); }
.pill-bad { background: rgba(244, 82, 108, .15); color: #fb7185; border-color: rgba(244, 82, 108, .3); }
.pill-info { background: rgba(167, 139, 250, .15); color: #c4b5fd; border-color: rgba(167, 139, 250, .3); }
.pill-mute { background: rgba(148, 163, 184, .13); color: var(--muted); border-color: var(--border); }
[data-theme="light"] .pill-good { color: #15803d; }
[data-theme="light"] .pill-warn { color: #b45309; }
[data-theme="light"] .pill-bad { color: #be123c; }
[data-theme="light"] .pill-info { color: #6d28d9; }

.progress { height: 7px; border-radius: 999px; background: rgba(148, 163, 184, .18); overflow: hidden; }
.progress-bar { border-radius: 999px; }
.progress-bar.bg-grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.progress-cell { min-width: 130px; }
.progress-cell .pv { font-size: 11.5px; color: var(--muted); }

.btn { border-radius: 11px; font-size: 13px; font-weight: 600; padding: .45rem .9rem; }
.btn-grad { background: linear-gradient(120deg, #2e8bff, #22d3b8); border: 0; color: #fff; box-shadow: 0 8px 20px rgba(46, 139, 255, .28); }
.btn-grad:hover { color: #fff; filter: brightness(1.06); }
.btn-ghost { background: var(--panel); border: 1px solid var(--border); color: var(--text-2); }
.btn-ghost:hover { background: var(--panel-hover); color: var(--text); border-color: var(--border-strong); }
.btn-icon { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; background: var(--panel); border: 1px solid var(--border); color: var(--text-2); border-radius: 11px; }
.btn-icon:hover { background: var(--panel-hover); color: var(--text); }
.btn-xs { padding: .25rem .6rem; font-size: 12px; border-radius: 9px; }

.form-control, .form-select {
  background: var(--input-bg); border: 1px solid var(--border);
  color: var(--text); border-radius: 11px; font-size: 13.5px; padding: .5rem .75rem;
}
.form-control:focus, .form-select:focus {
  background: var(--input-bg); color: var(--text);
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46, 139, 255, .16);
}
.form-control::placeholder { color: var(--muted); }
.form-label { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.input-group-text { background: var(--panel); border: 1px solid var(--border); color: var(--muted); border-radius: 11px 0 0 11px; }

.modal-content { background: var(--panel-solid); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); color: var(--text); }
.modal-header, .modal-footer { border-color: var(--border); }
.modal-title { font-size: 15px; font-weight: 700; }
.btn-close { filter: invert(1) grayscale(1) opacity(.6); }
[data-theme="light"] .btn-close { filter: none; }

.dropdown-menu { background: var(--panel-solid); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow); }
.dropdown-item { color: var(--text-2); font-size: 13px; border-radius: 8px; }
.dropdown-item:hover { background: var(--panel-hover); color: var(--text); }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; margin-bottom: 16px; }
.filter-bar .form-control, .filter-bar .form-select { min-width: 150px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); }
.seg a, .seg button {
  padding: 5px 13px; border-radius: 9px; font-size: 12.5px; color: var(--muted);
  font-weight: 600; background: transparent; border: 0; line-height: 1.5;
}
.seg a.on, .seg button.on { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; }
.seg button:hover { color: var(--text); }

/* ---------------- 待办事项 ---------------- */
.todo-card {
  position: relative; overflow: hidden;
  border: 1px solid rgba(46, 139, 255, .28);
  background:
    linear-gradient(120deg, rgba(46, 139, 255, .10), rgba(34, 211, 184, .06) 46%, transparent 78%),
    var(--panel);
}
.todo-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.todo-stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.todo-stat {
  padding: 10px 12px; border-radius: 13px;
  background: rgba(255, 255, 255, .035); border: 1px solid var(--border);
}
.todo-stat .v { font-size: 21px; font-weight: 800; line-height: 1.2; }
.todo-stat .l { font-size: 11.5px; color: var(--muted); }
.todo-stat.hot .v { color: var(--bad); }
.todo-stat.warn .v { color: var(--warn); }
.todo-stat.good .v { color: var(--good); }
.todo-stat.info .v { color: var(--accent-2); }

.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-list.scroll { max-height: 430px; overflow-y: auto; padding-right: 4px; }
.todo-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 13px; border-radius: 13px;
  background: rgba(255, 255, 255, .028);
  border: 1px solid var(--border);
  transition: all .18s ease;
}
.todo-row:hover { background: var(--panel-hover); border-color: var(--border-strong); }
.todo-row.is-overdue { border-left: 3px solid var(--bad); }
.todo-row.is-done { opacity: .55; }
.todo-row.is-done .todo-title { text-decoration: line-through; }

.todo-check {
  width: 26px; height: 26px; flex: 0 0 26px; margin-top: 1px;
  border-radius: 8px; border: 1.6px solid rgba(148, 163, 184, .55);
  background: rgba(255, 255, 255, .04); color: transparent; display: grid; place-items: center;
  transition: all .18s ease; font-size: 14px;
}
.todo-check:hover { border-color: var(--good); color: var(--good); }
.todo-check.on {
  background: linear-gradient(135deg, #22c55e, #22d3b8);
  border-color: transparent; color: #fff;
}
.todo-check:disabled { opacity: .5; }

.todo-main { flex: 1 1 auto; min-width: 0; }
.todo-title { font-size: 13.6px; font-weight: 600; color: var(--text); word-break: break-word; }
.todo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 5px; font-size: 11.8px; color: var(--muted); }
.todo-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

.pill-urgent { background: rgba(244, 82, 108, .16); color: #fb7185; border-color: rgba(244, 82, 108, .34); }
.pill-important { background: rgba(245, 165, 36, .16); color: #fbbf24; border-color: rgba(245, 165, 36, .34); }
.pill-normal { background: rgba(148, 163, 184, .13); color: var(--muted); border-color: var(--border); }
[data-theme="light"] .pill-urgent { color: #be123c; }
[data-theme="light"] .pill-important { color: #b45309; }

.due-overdue { color: var(--bad); font-weight: 600; }
.due-today { color: var(--warn); font-weight: 600; }

/* ---------------- 动效层 ---------------- */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(.992); }
  to { opacity: 1; transform: none; }
}
.enter-in { animation: cardIn .52s cubic-bezier(.22, .9, .3, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .enter-in, .chart-sweep::after { animation: none !important; }
}

.chart-sweep { position: relative; }
.chart-sweep::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(105deg,
    transparent 34%, rgba(127, 231, 255, .075) 48%, rgba(46, 139, 255, .05) 54%, transparent 68%);
  background-size: 240% 100%;
  animation: sweepMove 7.5s linear infinite;
  border-radius: 12px;
}
@keyframes sweepMove {
  from { background-position: 135% 0; }
  to { background-position: -95% 0; }
}

/* HUD 角标（科技感） */
.card-glass { position: relative; }
.card-glass.hud::before,
.card-glass.hud::after {
  content: ""; position: absolute; width: 16px; height: 16px; pointer-events: none;
  border-color: rgba(46, 139, 255, .55); border-style: solid; border-width: 0;
}
.card-glass.hud::before { left: 7px; top: 7px; border-left-width: 2px; border-top-width: 2px; border-radius: 4px 0 0 0; }
.card-glass.hud::after { right: 7px; bottom: 7px; border-right-width: 2px; border-bottom-width: 2px; border-radius: 0 0 4px 0; }

.kpi .kpi-value { font-variant-numeric: tabular-nums; }

/* ---------------- 图谱工具栏 / 详情面板 ---------------- */
.graph-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 12px; margin-bottom: 10px;
  border-radius: 13px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, .028);
}
.graph-toolbar .gt-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.graph-toolbar .seg button { font-size: 12px; padding: 4px 11px; }
.graph-toolbar .toggle {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 12.5px; color: var(--muted); user-select: none;
  padding: 5px 11px; border-radius: 10px; border: 1px solid var(--border);
  background: transparent;
}
.graph-toolbar .toggle.on { color: var(--text); border-color: rgba(46, 139, 255, .5);
  background: linear-gradient(120deg, rgba(46,139,255,.18), rgba(34,211,184,.1)); }
.graph-search { max-width: 230px; }

.graph-canvas { position: relative; }
.graph-canvas .chart {
  border-radius: 14px; border: 1px solid var(--border);
  background-color: rgba(6, 12, 24, .5);
  background-image:
    radial-gradient(circle at 50% 48%, rgba(46, 139, 255, .14), transparent 62%),
    radial-gradient(circle at 50% 48%, rgba(34, 211, 184, .07), transparent 40%),
    linear-gradient(rgba(120, 180, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 180, 255, .055) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px;
  box-shadow: inset 0 0 60px rgba(46, 139, 255, .07);
}
[data-theme="light"] .graph-canvas .chart { background-color: #f7faff; }

/* 雷达扫描（科技感，圆形不溢出、不影响 tooltip） */
.graph-canvas .chart { position: relative; }
.graph-canvas .chart::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 78%; aspect-ratio: 1 / 1; border-radius: 50%;
  pointer-events: none; z-index: 1;
  background: conic-gradient(from 0deg at 50% 50%,
    rgba(34, 211, 184, .16) 0deg, rgba(46, 139, 255, .07) 16deg, transparent 44deg, transparent 360deg);
  animation: radarSweep 10s linear infinite;
}
@keyframes radarSweep {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 图谱来源标识 */
.graph-badge {
  position: absolute; left: 12px; top: 10px; z-index: 5;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  color: var(--muted); border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel-solid) 82%, transparent);
  backdrop-filter: blur(8px); pointer-events: none;
}
.graph-badge.ai {
  color: #c4b5fd; border-color: rgba(167, 139, 250, .5);
  background: linear-gradient(120deg, rgba(167, 139, 250, .2), rgba(46, 139, 255, .16));
  box-shadow: 0 0 18px rgba(167, 139, 250, .28);
  animation: badgeGlow 3.2s ease-in-out infinite;
}
@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 0 14px rgba(167, 139, 250, .22); }
  50% { box-shadow: 0 0 24px rgba(167, 139, 250, .5); }
}

.ai-credit {
  font-size: 11.8px; line-height: 1.6; padding: 7px 10px; border-radius: 10px;
  color: #c4b5fd; border: 1px solid rgba(167, 139, 250, .32);
  background: linear-gradient(120deg, rgba(167, 139, 250, .14), rgba(46, 139, 255, .08));
}
.ai-credit i { margin-right: 5px; }

.graph-detail .nd-reason {
  margin-top: 9px; font-size: 12px; color: #c4b5fd; line-height: 1.6;
  padding: 7px 10px; border-radius: 10px;
  border: 1px solid rgba(167, 139, 250, .3); background: rgba(167, 139, 250, .1);
}
.graph-detail .nd-reason i { margin-right: 5px; }

.sel-chip {
  display: none;
  font-size: 12px; font-weight: 600; padding: 3px 11px; border-radius: 999px;
  color: var(--muted); border: 1px solid var(--border);
  max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: all .2s ease;
}
.sel-chip.on {
  display: inline-block; color: #ffd166;
  border-color: rgba(255, 209, 102, .5);
  background: rgba(255, 209, 102, .12);
  box-shadow: 0 0 16px rgba(255, 209, 102, .22);
}
[data-theme="light"] .sel-chip.on { color: #b45309; }

/* ---------------- 登录页 ---------------- */
/* ---------------- 引产入校 ---------------- */
.flow-steps { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.flow-step {
  padding: 12px 13px; border-radius: 14px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03); position: relative;
}
.flow-step.optional { border-style: dashed; border-color: rgba(245, 165, 36, .38); }
.flow-step .fs-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 9px; }
.flow-step .fs-no {
  width: 22px; height: 22px; flex: 0 0 22px; border-radius: 7px; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #04121f;
  background: linear-gradient(135deg, #22d3b8, #2e8bff);
}
.flow-step.optional .fs-no { background: linear-gradient(135deg, #f5a524, #f4526c); }
.flow-step .fs-name { font-size: 13.2px; font-weight: 700; }
.flow-step .fs-bar {
  display: flex; height: 8px; border-radius: 999px; overflow: hidden;
  background: rgba(148, 163, 184, .18);
}
.flow-step .fs-bar i { background: linear-gradient(90deg, #22d3b8, #22c55e); transition: width .9s ease; }
.flow-step .fs-bar b { background: linear-gradient(90deg, #2e8bff, #7fe7ff); transition: width .9s ease; }
.flow-step .fs-foot { font-size: 11.8px; color: var(--muted); margin-top: 7px; }
.flow-step .fs-foot b { color: var(--text); }

.mech-card {
  height: 100%; padding: 13px 14px; border-radius: 14px;
  border: 1px solid var(--border); border-top: 3px solid var(--mech);
  background: linear-gradient(180deg, color-mix(in srgb, var(--mech) 10%, transparent), transparent 70%);
}
.mech-head { font-size: 13.6px; font-weight: 800; color: var(--mech); margin-bottom: 9px; }
.mech-list { margin: 0 0 10px; padding-left: 18px; }
.mech-list li { font-size: 12.4px; color: var(--text-2); line-height: 1.85; }
.mech-note {
  font-size: 11.8px; line-height: 1.6; padding: 7px 10px; border-radius: 10px;
  color: var(--text-2); background: color-mix(in srgb, var(--mech) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--mech) 32%, transparent);
}

.price-card {
  display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; margin-bottom: 9px;
  border-radius: 12px; border: 1px solid var(--border); background: rgba(255, 255, 255, .03);
}
.price-num { font-size: 21px; font-weight: 800; color: var(--text); }
.price-num i { font-size: 12px; font-style: normal; color: var(--muted); margin-left: 3px; }

.step-timeline { position: relative; }
.step-item { display: flex; gap: 14px; padding-bottom: 16px; }
.step-item:last-child { padding-bottom: 0; }
.step-rail { position: relative; flex: 0 0 34px; display: flex; justify-content: center; }
.step-rail::after {
  content: ""; position: absolute; top: 34px; bottom: -16px; left: 50%; width: 2px;
  transform: translateX(-50%); background: var(--border);
}
.step-item:last-child .step-rail::after { display: none; }
.step-dot {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  font-size: 14px; font-weight: 800; z-index: 1;
  border: 1px solid var(--border); background: var(--panel-solid); color: var(--muted);
  transition: all .3s ease;
}
.step-item.done .step-dot { color: #04121f; border-color: transparent; background: linear-gradient(135deg, #22c55e, #22d3b8); box-shadow: 0 0 18px rgba(34, 197, 94, .45); }
.step-item.doing .step-dot { color: #04121f; border-color: transparent; background: linear-gradient(135deg, #2e8bff, #7fe7ff); box-shadow: 0 0 18px rgba(46, 139, 255, .5); animation: dotPulse 2.4s ease-in-out infinite; }
.step-item.todo .step-dot { border-color: rgba(245, 165, 36, .45); color: var(--warn); }
.step-item.na .step-dot { opacity: .45; }

.step-card {
  flex: 1 1 auto; min-width: 0; padding: 13px 15px; border-radius: 14px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, .03);
  border-left: 3px solid var(--border); transition: all .2s ease;
}
.step-item:hover .step-card { background: var(--panel-hover); }
.step-item.done .step-card { border-left-color: #22c55e; }
.step-item.doing .step-card { border-left-color: #2e8bff; }
.step-item.todo .step-card { border-left-color: var(--warn); }
.step-item.na .step-card { opacity: .55; border-left-style: dashed; }
.step-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step-name { font-size: 14.5px; font-weight: 700; }
.step-status { cursor: pointer; border: 1px solid transparent; }
.step-desc { font-size: 12.5px; color: var(--muted); margin-top: 7px; line-height: 1.65; }
.step-meta {
  display: grid; gap: 6px 18px; margin-top: 9px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.step-meta > div { display: flex; gap: 8px; font-size: 12.4px; align-items: baseline; }
.step-meta span { color: var(--muted); flex: 0 0 78px; white-space: nowrap; }
.step-meta b { color: var(--text-2); font-weight: 600; min-width: 0; }

.nowrap-cell { white-space: nowrap; }
.step-remark {
  margin-top: 8px; font-size: 12.2px; color: var(--text-2); line-height: 1.6;
  padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, .03);
  border: 1px dashed var(--border);
}

.login-body {
  min-height: 100vh; margin: 0; overflow-x: hidden;
  background: #050a16;
  display: flex; align-items: center; justify-content: center;
}
.login-bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.login-bg .lb-grid {
  position: absolute; inset: -20%;
  background-image:
    linear-gradient(rgba(70, 140, 255, .085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 140, 255, .085) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(520px) rotateX(58deg) translateY(-6%);
  animation: gridDrift 16s linear infinite;
}
@keyframes gridDrift { to { background-position: 0 460px, 460px 0; } }
.login-bg .lb-glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.login-bg .g1 { width: 520px; height: 520px; left: -140px; top: -120px; background: #2e8bff; animation: float1 18s ease-in-out infinite; }
.login-bg .g2 { width: 460px; height: 460px; right: -120px; bottom: -120px; background: #22d3b8; animation: float2 22s ease-in-out infinite; }
.login-bg .g3 { width: 380px; height: 380px; left: 42%; top: 46%; background: #a78bfa; opacity: .3; animation: float1 26s ease-in-out infinite reverse; }
@keyframes float1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(60px, 46px); } }
@keyframes float2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-56px, -40px); } }
.login-bg .lb-ring {
  position: absolute; left: 50%; top: 50%; border-radius: 50%;
  border: 1px solid rgba(90, 160, 255, .18); transform: translate(-50%, -50%);
}
.login-bg .r1 { width: 620px; height: 620px; animation: ringPulse 7s ease-in-out infinite; }
.login-bg .r2 { width: 900px; height: 900px; animation: ringPulse 9s ease-in-out infinite reverse; }
@keyframes ringPulse { 0%, 100% { opacity: .25; } 50% { opacity: .7; } }
.login-bg .lb-scan {
  position: absolute; left: 0; right: 0; height: 180px;
  background: linear-gradient(180deg, transparent, rgba(46, 139, 255, .12), transparent);
  animation: scanDown 8s linear infinite;
}
@keyframes scanDown { from { top: -180px; } to { top: 100%; } }

.login-wrap { position: relative; z-index: 2; width: 100%; padding: 24px; display: flex; justify-content: center; }
.login-card {
  width: 100%; max-width: 412px; padding: 30px 28px 22px;
  border-radius: 22px; border: 1px solid rgba(90, 160, 255, .26);
  background: linear-gradient(160deg, rgba(300, 300, 300, .06), rgba(255, 255, 255, .02));
  backdrop-filter: blur(18px);
  box-shadow: 0 26px 70px rgba(2, 8, 22, .6), inset 0 0 60px rgba(46, 139, 255, .06);
  animation: cardIn .6s cubic-bezier(.22, .9, .3, 1) both;
}
.login-brand { display: flex; align-items: center; gap: 14px; }
.login-brand .brand-logo { width: 52px; height: 52px; border-radius: 15px; font-size: 17px; }
.login-brand h1 { font-size: 18.5px; font-weight: 800; margin: 0 0 3px; color: #eaf1ff; letter-spacing: .01em; }
.login-brand p { margin: 0; font-size: 11.5px; color: #7d8db0; letter-spacing: .04em; }
.login-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(90, 160, 255, .35), transparent); margin: 20px 0 18px; }
.login-alert {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 9px 12px; border-radius: 11px; font-size: 12.8px;
  color: #fb7185; border: 1px solid rgba(244, 82, 108, .38); background: rgba(244, 82, 108, .12);
}
.login-alert.shake { animation: shakeX .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes shakeX {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}
.login-label { display: block; font-size: 12.5px; color: #8fa2c4; font-weight: 600; margin: 0 0 6px; }
.login-input {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  padding: 0 14px; height: 48px; border-radius: 13px;
  border: 1px solid rgba(120, 170, 255, .22);
  background: rgba(8, 16, 32, .55);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.login-input:focus-within {
  border-color: #2e8bff; background: rgba(12, 24, 48, .72);
  box-shadow: 0 0 0 4px rgba(46, 139, 255, .16);
}
.login-input > i { color: #6f86ad; font-size: 16px; }
.login-input input {
  flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent;
  color: #eaf1ff; font-size: 14.5px; height: 100%; letter-spacing: .02em;
}
.login-input input::placeholder { color: #5d6f92; }
.pwd-toggle { border: 0; background: transparent; color: #6f86ad; padding: 4px 2px; cursor: pointer; }
.pwd-toggle:hover { color: #9fc1ff; }
.login-remember {
  display: flex; align-items: center; gap: 8px; margin: 2px 0 18px;
  font-size: 12.8px; color: #8fa2c4; cursor: pointer; user-select: none;
}
.login-remember input { accent-color: #22d3b8; width: 15px; height: 15px; }
.login-btn {
  width: 100%; height: 48px; border: 0; border-radius: 13px; cursor: pointer;
  font-size: 15px; font-weight: 700; letter-spacing: .18em; color: #04121f;
  background: linear-gradient(120deg, #22d3b8, #2e8bff);
  box-shadow: 0 14px 30px rgba(46, 139, 255, .34);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.login-btn:hover { filter: brightness(1.07); box-shadow: 0 18px 38px rgba(46, 139, 255, .45); transform: translateY(-1px); }
.login-btn:active { transform: translateY(1px); }
.login-foot {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 18px; font-size: 11.5px; color: #6b7c9b;
}
.login-foot .dot { width: 3px; height: 3px; border-radius: 50%; background: #4a5a7a; }

.user-chip { padding: .42rem .7rem; }

@media (max-width: 575.98px) {
  .login-card { padding: 24px 20px 18px; border-radius: 18px; }
  .login-brand h1 { font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .login-bg .lb-grid, .login-bg .lb-glow, .login-bg .lb-ring,
  .login-bg .lb-scan, .login-card, .login-alert.shake { animation: none !important; }
}

/* 节点明细：放在图谱下方，不遮挡画布 */
.graph-detail {
  display: none; margin-top: 12px; border-radius: 14px;
  border: 1px solid rgba(46, 139, 255, .28);
  background: linear-gradient(120deg, rgba(46, 139, 255, .07), rgba(34, 211, 184, .04) 55%, transparent);
  padding: 14px 16px; gap: 18px;
}
.graph-detail.show { display: flex; flex-wrap: wrap; animation: detailIn .32s cubic-bezier(.22, .9, .3, 1) both; }
@keyframes detailIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.graph-detail .nd-left { flex: 1 1 260px; min-width: 240px; }
.graph-detail .nd-body {
  flex: 2 1 520px; min-width: 280px;
  display: grid; gap: 10px 22px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.graph-detail .nd-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.graph-detail .nd-kind {
  font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  color: #8fefff; background: rgba(46, 139, 255, .16); border: 1px solid rgba(46, 139, 255, .4);
}
.graph-detail .nd-head b { font-size: 15px; }
.graph-detail .gp-close {
  margin-left: auto; border: 0; background: transparent; color: var(--muted);
  font-size: 20px; line-height: 1; padding: 0 4px; cursor: pointer;
}
.graph-detail .gp-close:hover { color: var(--text); }
.graph-detail .nd-desc { font-size: 12.6px; color: var(--text-2); line-height: 1.7; }
.graph-detail .nd-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.graph-detail .nd-metric {
  padding: 7px 11px; border-radius: 10px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, .04); min-width: 92px;
}
.graph-detail .nd-metric span { display: block; font-size: 11px; color: var(--muted); }
.graph-detail .nd-metric b { font-size: 15px; }
.graph-detail .nd-metric.hot b { color: var(--accent-2); }
.graph-detail .nd-col .nd-t { font-size: 11.5px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.graph-detail .nd-col ul { margin: 0; padding-left: 15px; }
.graph-detail .nd-col li { font-size: 12.2px; color: var(--text-2); line-height: 1.72; }
.graph-detail .gp-links { display: flex; flex-wrap: wrap; gap: 5px; }
.graph-detail .gp-links a {
  font-size: 11.6px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-2); background: rgba(255, 255, 255, .04);
}
.graph-detail .gp-links a:hover { border-color: var(--accent); color: var(--text); }
.graph-detail .gp-rel { color: var(--muted); margin-left: 4px; font-size: 10.5px; }

/* ---------------- 图谱顶部结论区 ---------------- */
.graph-hero {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch;
  padding: 18px 20px; border-radius: var(--radius);
  border: 1px solid rgba(46, 139, 255, .3);
  background:
    radial-gradient(circle at 8% 0%, rgba(46, 139, 255, .2), transparent 46%),
    radial-gradient(circle at 96% 100%, rgba(34, 211, 184, .16), transparent 44%),
    var(--panel);
  box-shadow: var(--shadow);
}
.graph-hero .gh-left { flex: 1 1 380px; min-width: 280px; }
.graph-hero .gh-kicker {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; letter-spacing: .14em; color: var(--accent-2); font-weight: 700;
}
.graph-hero .gh-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2); animation: dotPulse 2.2s ease-in-out infinite;
}
@keyframes dotPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.72); } }
.graph-hero .gh-title { font-size: 21px; font-weight: 800; margin: 7px 0 9px; letter-spacing: -.01em; }
.graph-hero .gh-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.graph-hero .gh-tag {
  font-size: 11.8px; padding: 3px 10px; border-radius: 999px;
  color: var(--muted); border: 1px solid var(--border); background: rgba(255, 255, 255, .04);
}
.graph-hero .gh-tag.on { color: #c4b5fd; border-color: rgba(167, 139, 250, .45); background: rgba(167, 139, 250, .14); }
.graph-hero .gh-tag.warn { color: #fbbf24; border-color: rgba(245, 165, 36, .4); background: rgba(245, 165, 36, .12); }
.graph-hero .gh-mini { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 12.3px; color: var(--muted); }
.graph-hero .gh-mini b { color: var(--text); font-size: 13.4px; }
.graph-hero .gh-mini b.hl { color: var(--accent-2); }

.graph-hero .gh-right {
  flex: 0 1 460px; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); align-items: center;
}
.graph-hero .gh-kpi {
  padding: 10px 12px; border-radius: 13px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, .035);
}
.graph-hero .gh-kpi b { display: block; font-size: 24px; font-weight: 800; line-height: 1.15; }
.graph-hero .gh-kpi b i { font-size: 13px; font-style: normal; color: var(--muted); margin-left: 2px; }
.graph-hero .gh-kpi span { font-size: 11.5px; color: var(--muted); }
.graph-hero .gh-kpi.main {
  border-color: rgba(34, 211, 184, .45);
  background: linear-gradient(140deg, rgba(34, 211, 184, .16), rgba(46, 139, 255, .1));
  box-shadow: 0 0 24px rgba(34, 211, 184, .16);
}
.graph-hero .gh-kpi.main b { color: var(--accent-2); font-size: 30px; }
.graph-hero .gh-bar { height: 5px; border-radius: 999px; background: rgba(148, 163, 184, .2); margin-top: 8px; overflow: hidden; }
.graph-hero .gh-bar i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #22d3b8, #2e8bff); box-shadow: 0 0 12px rgba(34, 211, 184, .7); }

.graph-conclusion {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: 14px; font-size: 13px; color: var(--text-2);
  border: 1px solid rgba(167, 139, 250, .3);
  background: linear-gradient(120deg, rgba(167, 139, 250, .12), rgba(46, 139, 255, .06));
}
.graph-conclusion i { color: var(--accent-3); font-size: 15px; margin-top: 2px; }
.graph-conclusion b { color: var(--text); margin-right: 8px; }

.alert-item { display: flex; gap: 12px; padding: 12px 14px; border-radius: 13px; border: 1px solid var(--border); background: var(--panel); margin-bottom: 9px; }
.alert-item .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: 0 0 8px; }
.alert-item.danger .dot { background: var(--bad); box-shadow: 0 0 12px var(--bad); }
.alert-item.warning .dot { background: var(--warn); box-shadow: 0 0 12px var(--warn); }
.alert-item.info .dot { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.alert-item .t { font-size: 13.2px; font-weight: 600; }
.alert-item .d { font-size: 12px; color: var(--muted); margin-top: 2px; }

.sidebar-toggle { display: none; }
.sidebar-overlay { display: none; position: fixed; inset: 0; z-index: 1040; background: rgba(3, 7, 18, .6); backdrop-filter: blur(2px); }

.graph-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.graph-tabs button { border: 1px solid var(--border); background: var(--panel); color: var(--muted); padding: 8px 16px; border-radius: 12px; font-size: 13px; font-weight: 600; }
.graph-tabs button.on { background: linear-gradient(120deg, rgba(46,139,255,.22), rgba(34,211,184,.14)); color: var(--text); border-color: rgba(46,139,255,.45); }
.tab-pane-c { display: none; }
.tab-pane-c.on { display: block; }

.drop-zone { border: 1.6px dashed var(--border-strong); border-radius: 16px; padding: 26px 18px; text-align: center; cursor: pointer; transition: all .2s ease; background: rgba(255, 255, 255, .02); }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--accent); background: rgba(46, 139, 255, .08); }
.drop-zone i { font-size: 30px; color: var(--accent); }
.drop-zone .dt { font-weight: 600; margin-top: 8px; }
.drop-zone .dd { font-size: 12px; color: var(--muted); margin-top: 3px; }

.metric-strip { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.metric-box { padding: 13px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); }
.metric-box .mv { font-size: 21px; font-weight: 800; }
.metric-box .ml { font-size: 12px; color: var(--muted); }

.legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.insight { padding: 12px 14px; border-radius: 13px; font-size: 12.8px; background: linear-gradient(120deg, rgba(46,139,255,.12), rgba(34,211,184,.08)); border: 1px solid rgba(46,139,255,.25); color: var(--text-2); }

.empty-state { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty-state i { font-size: 46px; opacity: .4; }
.empty-state h5 { color: var(--text); margin: 14px 0 6px; font-size: 16px; }

.toast-stack { position: fixed; top: 78px; right: 22px; z-index: 1090; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 15px; border-radius: 14px; background: var(--panel-solid); border: 1px solid var(--border); box-shadow: var(--shadow); animation: slideIn .28s ease; font-size: 13px; }
.toast-card.success { border-left: 3px solid var(--good); }
.toast-card.danger { border-left: 3px solid var(--bad); }
.toast-card.warning { border-left: 3px solid var(--warn); }
.toast-card.info { border-left: 3px solid var(--accent); }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

.insight-card { padding: 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--panel); }
.insight-card .num { font-size: 24px; font-weight: 800; color: var(--accent-2); }

@media (max-width: 1199.98px) { .chart-xl { height: 460px; } }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-102%); transition: transform .26s ease; width: 268px; flex-basis: 268px; }
  body.sidebar-open .sidebar { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.5); }
  body.sidebar-open .sidebar-overlay { display: block; }
  .main-area { margin-left: 0; }
  .sidebar-toggle { display: inline-grid; }
  .topbar { padding: 10px 14px; }
  .content { padding: 16px 14px 70px; }
  .chart-lg { height: 360px; }
  .chart-xl { height: 380px; }
}

@media (max-width: 767.98px) {
  body { font-size: 13.5px; }
  .page-title { font-size: 15.5px; }
  .page-sub { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 13px 12px; }
  .kpi .kpi-value { font-size: 22px; }
  .chart { height: 250px; }
  .chart-sm { height: 210px; }
  .chart-lg { height: 300px; }
  .chart-xl { height: 320px; }

  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { border: 1px solid var(--border); border-radius: 14px; background: var(--panel); margin: 0 0 10px; padding: 6px 4px; box-shadow: 0 6px 18px rgba(2, 8, 22, .18); }
  .table-cards tbody td {
    display: grid; grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px; align-items: start; text-align: left;
    border-bottom: 1px dashed var(--border); padding: 9px 12px;
  }
  .table-cards tbody td:last-child { border-bottom: 0; }
  .table-cards tbody td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; padding-top: 1px; }
  .table-cards tbody td[data-label=""]::before { display: none; }
  .table-cards tbody td.cell-block { display: block; }
  .table-cards tbody td.cell-block::before { display: block; margin-bottom: 5px; }
  .table-cards .col-act { width: auto; }
  .table-cards tbody td.col-act {
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  }
  .table-cards tbody td.col-act::before { margin-right: auto; }
  .table-cards tbody td.col-act .btn { width: auto; flex: 0 0 auto; }
  .table-cards .cell-clamp { max-width: none; }
  .table-cards tbody td > * { min-width: 0; }
  .table-cards .col-seq { text-align: left; }

  .toast-stack { right: 12px; left: 12px; top: 66px; max-width: none; }
  .filter-bar { padding: 12px; }
  .filter-bar .form-control, .filter-bar .form-select { min-width: 0; width: 100%; }
  .modal-dialog { margin: .6rem; }

  .todo-card .card-head { flex-wrap: wrap; row-gap: 8px; }
  .todo-card .card-head .ms-auto { margin-left: 0 !important; width: 100%; }
  .todo-row { flex-wrap: wrap; row-gap: 8px; }
  .todo-actions { width: 100%; justify-content: flex-end; }

  .graph-toolbar { gap: 6px; padding: 9px 10px; }
  .graph-toolbar .graph-search { max-width: none; width: 100%; order: 9; margin-left: 0 !important; }
  .graph-panel { left: 8px; right: 8px; width: auto; max-height: 62%; top: 8px; }
  .graph-panel .gp-head { font-size: 12.5px; }
}

@media (max-width: 575.98px) {
  .page-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar { gap: 8px; flex-wrap: nowrap; }
  .topbar-actions { gap: 6px; flex-wrap: nowrap; }
  .topbar-actions .btn { font-size: 0; padding: .5rem .62rem; }
  .topbar-actions .btn i { font-size: 15px; }
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(146px, 1fr)); }
  .todo-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg { width: 100%; overflow-x: auto; }
  .seg a, .seg button { flex: 0 0 auto; }
}

@media (max-width: 359.98px) { .kpi-grid { grid-template-columns: 1fr; } }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .28); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, .45); }
::-webkit-scrollbar-track { background: transparent; }

.text-muted-2 { color: var(--muted) !important; }
.text-accent { color: var(--accent) !important; }
.fw-800 { font-weight: 800; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.cursor-pointer { cursor: pointer; }
.nowrap { white-space: nowrap; }
