/* ==========================================================================
   SiteMatrix 设计系统 · 零第三方 UI 依赖
   深海军蓝 + 青绿强调色；所有图标为自绘 SVG。
   ========================================================================== */

:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e5eaf0;
  --line-strong: #d4dde7;
  --bg: #f3f5f8;
  --bg-soft: #f8fafc;
  --card: #ffffff;
  --sidebar: #0b1220;
  --sidebar-2: #111b2e;
  --sidebar-text: #94a3b8;
  --accent: #0d9488;
  --accent-strong: #0f766e;
  --accent-soft: #ccfbf1;
  --accent-2: #0891b2;
  --blue: #2563eb;
  --amber: #d97706;
  --red: #dc2626;
  --green: #059669;
  --purple: #7c3aed;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.25);
  --shadow-lg: 0 28px 60px -24px rgba(15, 23, 42, 0.35);
  --sidebar-w: 248px;
  --topbar-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
a { color: var(--accent-strong); text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
svg { display: block; }
::selection { background: rgba(13, 148, 136, 0.18); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; background-clip: padding-box; border: 2px solid transparent; }

/* ------------------------------ 应用骨架 ------------------------------ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, #0b1220 0%, #0a1424 60%, #0c1728 100%);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  border-right: 1px solid rgba(148, 163, 184, 0.08);
}
.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(480px 220px at 20% -10%, rgba(13, 148, 136, 0.18), transparent 70%),
    radial-gradient(320px 220px at 120% 100%, rgba(8, 145, 178, 0.12), transparent 70%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  height: var(--topbar-h);
  padding: 0 20px;
  flex: 0 0 var(--topbar-h);
  position: relative;
  z-index: 1;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #14b8a6, #0e7490);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(20, 184, 166, 0.65);
  flex: 0 0 34px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { color: #f8fafc; font-size: 16px; letter-spacing: 0.2px; }
.brand-text span { font-size: 10px; color: #5e718f; letter-spacing: 1.6px; text-transform: uppercase; }
.sidebar-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 12px 18px; position: relative; z-index: 1; }
.sidebar-scroll::-webkit-scrollbar { width: 5px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.25); }
.nav-group { margin-top: 14px; }
.nav-group:first-child { margin-top: 2px; }
.nav-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: 0;
  color: #64748b;
  font-size: 10.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 7px 10px 6px;
  font-weight: 600;
}
.nav-group-title:hover { color: #a5b4c8; }
.nav-group-title .chev { transition: transform 0.2s; opacity: 0.7; }
.nav-group.collapsed .chev { transform: rotate(-90deg); }
.nav-group.collapsed .nav-items { display: none; }
.nav-items { display: flex; flex-direction: column; gap: 1px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  color: #91a2b9;
  font-size: 13.2px;
  position: relative;
  transition: background 0.16s, color 0.16s;
  white-space: nowrap;
}
.nav-item svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: 0.78; }
.nav-item:hover { background: rgba(148, 163, 184, 0.08); color: #e2e8f0; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.22), rgba(13, 148, 136, 0.06));
  color: #f0fdfa;
  font-weight: 600;
}
.nav-item.active svg { color: #2dd4bf; opacity: 1; }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #2dd4bf;
}
.nav-item .nav-badge {
  margin-left: auto;
  font-size: 10px;
  background: rgba(220, 38, 38, 0.16);
  color: #fca5a5;
  border-radius: 20px;
  padding: 1px 6px;
  font-weight: 600;
}
.nav-item .nav-badge.neutral { background: rgba(148, 163, 184, 0.12); color: #94a3b8; }
.sidebar-foot {
  margin: 0 12px 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.08);
  position: relative;
  z-index: 1;
  font-size: 11px;
  color: #64748b;
}
.sidebar-foot b { color: #a5b4c8; font-weight: 600; display: block; margin-bottom: 2px; }

.main-wrap { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 26px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.crumb { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; min-width: 0; }
.crumb .sep { color: #cbd5e1; }
.crumb b { color: var(--ink); font-weight: 600; }
.top-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 240px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 9px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s;
}
.top-search:hover { border-color: var(--line-strong); background: #fff; }
.top-search span { font-size: 12.5px; }
.top-search kbd {
  margin-left: auto;
  font-family: var(--font);
  font-size: 10px;
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 5px;
  background: #fff;
}
.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  position: relative;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }
.icon-btn .dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid #fff;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 7px 4px 4px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
}
.user-chip:hover { background: var(--bg-soft); border-color: var(--line); }
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  flex: 0 0 30px;
  background: var(--accent);
}
.user-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.user-meta b { font-size: 12.5px; color: var(--ink); }
.user-meta span { font-size: 10.5px; color: var(--muted); }
.page { padding: 24px 26px 50px; max-width: 1560px; width: 100%; margin: 0 auto; flex: 1; }

/* ------------------------------ 页头 / 卡片 ------------------------------ */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-title { font-size: 23px; font-weight: 700; letter-spacing: -0.3px; display: flex; align-items: center; gap: 10px; }
.page-title .eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1.2px; color: var(--accent); background: var(--accent-soft); padding: 3px 7px; border-radius: 5px; text-transform: uppercase; }
.page-desc { color: var(--muted); font-size: 13px; margin-top: 5px; max-width: 760px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.card-title { font-size: 14.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.card-body { padding: 16px 18px 18px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.section-gap { margin-top: 16px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-0 { margin-bottom: 0 !important; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .tiny { font-size: 11px; }
.nowrap { white-space: nowrap; } .text-right { text-align: right; } .text-center { text-align: center; }
.mono { font-family: var(--mono); font-size: 12px; }
.w-100 { width: 100%; }

/* ------------------------------ KPI ------------------------------ */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 17px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--tone-soft, #f1f5f9);
  opacity: 0.55;
}
.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: relative; z-index: 1; }
.stat-label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.stat-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--tone-soft, #f1f5f9);
  color: var(--tone, var(--accent));
}
.stat-value { font-size: 27px; font-weight: 700; letter-spacing: -0.8px; margin-top: 10px; position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.stat-foot { display: flex; align-items: center; gap: 7px; margin-top: 6px; position: relative; z-index: 1; font-size: 11.5px; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: 11px; border-radius: 20px; padding: 1px 6px; }
.delta.up { color: var(--green); background: #ecfdf5; }
.delta.down { color: var(--red); background: #fef2f2; }
.delta.flat { color: var(--muted); background: var(--bg-soft); }

/* ------------------------------ 按钮 ------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.16s;
  text-decoration: none;
}
.btn:hover { border-color: var(--line-strong); background: var(--bg-soft); color: var(--ink); }
.btn:active { transform: translateY(0.5px); }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: linear-gradient(135deg, #0d9488, #0e7490); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -8px rgba(13, 148, 136, 0.75); }
.btn.primary:hover { filter: brightness(1.05); color: #fff; }
.btn.danger { color: var(--red); border-color: #fecaca; background: #fff; }
.btn.danger:hover { background: #fef2f2; border-color: #fca5a5; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--bg-soft); color: var(--ink); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.xs { height: 26px; padding: 0 8px; font-size: 11.5px; border-radius: 6px; }
.btn.lg { height: 42px; padding: 0 20px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }
.btn-group { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.btn-group .btn { border: 0; border-radius: 0; height: 32px; }
.btn-group .btn + .btn { border-left: 1px solid var(--line); }
.btn-group .btn.active { background: var(--ink); color: #fff; }
.link-btn { border: 0; background: none; color: var(--accent-strong); font-size: 12.5px; padding: 2px 4px; border-radius: 5px; }
.link-btn:hover { background: var(--accent-soft); }
.link-btn.danger { color: var(--red); }
.link-btn.danger:hover { background: #fef2f2; }

/* ------------------------------ 表单 ------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 12.5px; font-weight: 550; color: var(--ink-2); display: flex; align-items: center; gap: 4px; }
.field > label .req { color: var(--red); }
.field .hint { font-size: 11px; color: var(--muted-2); }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 8px 11px;
  height: 36px;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.textarea { height: auto; min-height: 90px; resize: vertical; line-height: 1.65; padding: 9px 11px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12); }
.input::placeholder, .textarea::placeholder { color: #b0bccb; }
.input:disabled, .select:disabled { background: var(--bg-soft); color: var(--muted); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .field { grid-column: span 12; }
.col-6 { grid-column: span 6 !important; } .col-4 { grid-column: span 4 !important; } .col-3 { grid-column: span 3 !important; } .col-8 { grid-column: span 8 !important; } .col-12 { grid-column: span 12 !important; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 6px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--accent); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 12.5px; color: var(--ink-2); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 36px; height: 20px; border-radius: 20px; background: #cbd5e1; position: relative; transition: background 0.18s; flex: 0 0 36px; }
.switch .track::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: transform 0.18s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-card { border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; font-size: 12.5px; color: var(--muted); cursor: pointer; background: #fff; }
.radio-card.active { border-color: var(--accent); background: #f0fdfa; color: var(--accent-strong); font-weight: 600; }
.file-drop {
  border: 1.5px dashed var(--line-strong);
  border-radius: 11px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  background: var(--bg-soft);
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s;
}
.file-drop:hover, .file-drop.dragover { border-color: var(--accent); background: #f0fdfa; }
.file-drop svg { margin: 0 auto 7px; color: var(--accent); }
.file-drop b { color: var(--ink-2); }

/* ------------------------------ 筛选 / 工具条 ------------------------------ */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fff; border-radius: var(--radius) var(--radius) 0 0; }
.toolbar .spacer { flex: 1; }
.search-box { position: relative; width: 230px; }
.search-box svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted-2); width: 15px; height: 15px; }
.search-box .input { padding-left: 32px; height: 34px; background: var(--bg-soft); border-color: var(--line); }
.search-box .input:focus { background: #fff; }
.filter-select { height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-soft); color: var(--ink-2); padding: 0 28px 0 10px; font-size: 12.5px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.filter-select:focus { outline: none; border-color: var(--accent); background-color: #fff; }
.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--line); padding: 0 16px; overflow-x: auto; }
.tab { border: 0; background: none; padding: 12px 12px 11px; color: var(--muted); font-size: 13px; position: relative; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent-strong); font-weight: 600; }
.tab.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.tab .count { margin-left: 5px; font-size: 10.5px; background: var(--bg-soft); color: var(--muted); padding: 1px 5px; border-radius: 10px; }
.tab.active .count { background: var(--accent-soft); color: var(--accent-strong); }

/* ------------------------------ 表格 ------------------------------ */
.table-wrap { overflow: auto; }
table.table { width: 100%; border-collapse: collapse; min-width: 620px; }
.table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 10px 14px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
  letter-spacing: 0.2px;
}
.table td { padding: 12px 14px; border-bottom: 1px solid #eef2f6; vertical-align: middle; font-size: 13px; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover { background: #fafcfd; }
.table tbody tr.clickable { cursor: pointer; }
.table .cell-main { font-weight: 550; color: var(--ink); }
.table .cell-sub { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.table .actions { display: flex; gap: 2px; justify-content: flex-end; flex-wrap: nowrap; }
.table th.actions-head, .table td.actions-cell { white-space: nowrap; width: 1%; }
.table td.actions-cell {
  text-align: right;
  position: sticky;
  right: 0;
  z-index: 1;
  background: #fff;
  box-shadow: -8px 0 12px -12px rgba(15, 23, 42, 0.35);
}
.table th.actions-head { position: sticky; right: 0; z-index: 4; background: var(--bg-soft); }
.table tbody tr:hover td.actions-cell { background: #fafcfd; }
.table .check-col { width: 38px; }
.table td.check-col { padding-right: 0; }
.table .num { font-variant-numeric: tabular-nums; }
.table-empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.table-empty .empty-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--bg-soft); display: grid; place-items: center; margin: 0 auto 12px; color: var(--muted-2); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.pager-btns { display: flex; gap: 4px; align-items: center; }
.pager-btns button { min-width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 12px; padding: 0 8px; }
.pager-btns button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-strong); }
.pager-btns button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager-btns button:disabled { opacity: 0.45; cursor: default; }

/* ------------------------------ 徽标 / 标签 ------------------------------ */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 550; white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.badge.green { color: #047857; background: #ecfdf5; }
.badge.teal { color: #0f766e; background: #f0fdfa; }
.badge.blue { color: #1d4ed8; background: #eff6ff; }
.badge.amber { color: #b45309; background: #fffbeb; }
.badge.red { color: #b91c1c; background: #fef2f2; }
.badge.gray { color: #475569; background: #f1f5f9; }
.badge.purple { color: #6d28d9; background: #f5f3ff; }
.badge.plain::before { display: none; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 5px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.tag + .tag { margin-left: 4px; }
.dot-badge { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 20px; font-size: 11.5px; background: var(--bg-soft); color: var(--muted); }
.pill.ok { color: var(--green); background: #ecfdf5; }
.pill.warn { color: var(--amber); background: #fffbeb; }
.pill.bad { color: var(--red); background: #fef2f2; }

/* ------------------------------ 进度 / 分数 ------------------------------ */
.progress { height: 6px; border-radius: 6px; background: #eef2f6; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #14b8a6, #0891b2); transition: width 0.4s; }
.progress.amber > i { background: linear-gradient(90deg, #f59e0b, #d97706); }
.progress.red > i { background: linear-gradient(90deg, #f87171, #dc2626); }
.score-ring { position: relative; display: inline-grid; place-items: center; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .score-text { position: absolute; text-align: center; }
.score-ring .score-text b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -1px; line-height: 1.1; }
.score-ring .score-text span { font-size: 10.5px; color: var(--muted); }

/* ------------------------------ 图表 ------------------------------ */
.chart-wrap { width: 100%; }
.chart-svg { width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11.5px; color: var(--muted); }
.chart-legend .item { display: flex; align-items: center; gap: 5px; border: 0; background: none; padding: 3px 6px; font: inherit; color: inherit; border-radius: 6px; }
.chart-legend .item.clickable { cursor: pointer; }
.chart-legend .item.clickable:hover { background: var(--bg-soft); color: var(--ink); }
.chart-legend-bottom { justify-content: center; gap: 16px; margin-top: 6px; }
.spider-chart-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(360px, 1fr); gap: 16px; }
.spider-donut-wrap { display: flex; flex-direction: column; align-items: center; width: 100%; }
.spider-donut-svg { width: 100%; max-width: 430px; height: auto; overflow: visible; }
.spider-donut-legend { display: flex; flex-wrap: nowrap; justify-content: center; gap: 2px 6px; width: 100%; }
.spider-legend-item { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 2px 3px; border-radius: 6px; font-size: 10.5px; color: var(--muted); font-family: inherit; white-space: nowrap; }
.spider-legend-item:hover { background: var(--bg-soft); color: var(--ink); }
.spider-legend-item.active { background: #f0fdfa; color: var(--accent-strong); font-weight: 600; }
.spider-legend-item i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.spider-slice { cursor: pointer; transition: opacity 0.14s; }
.spider-slice:hover { opacity: 0.82; }
.spider-slice.dim { opacity: 0.22; }
.spider-slice.dim:hover { opacity: 0.45; }
.spider-trend [data-chart-series-key].series-hidden { display: none; }
.chart-legend .item.off { opacity: 0.35; }
.spider-label { cursor: pointer; }
@media (max-width: 1180px) {
  .spider-chart-grid { grid-template-columns: 1fr; }
}
.spider-log-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 11px 16px; background: #f7fafc; border-bottom: 1px solid var(--line); }
.spider-log-toolbar .log-title { font-size: 14px; font-weight: 650; color: var(--ink); margin-right: 1px; white-space: nowrap; }
.log-today { height: 27px; padding: 0 10px; border-radius: 6px; border: 0; background: #2563eb; color: #fff; font-size: 11.5px; font-weight: 600; }
.log-today:hover { background: #1d4ed8; }
.log-today.active { background: #1d4ed8; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.log-sep { width: 1px; height: 19px; background: var(--line-strong); margin: 0 2px; }
.log-tilde { color: var(--muted-2); font-size: 12px; }
.log-date { width: 124px; height: 32px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; background: #fff; color: var(--ink-2); font-size: 11.5px; font-family: inherit; }
.log-date:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1); }
.log-search { width: 32px; height: 32px; border-radius: 7px; border: 1px solid #bfdbfe; background: #eff6ff; color: #2563eb; display: grid; place-items: center; }
.log-search:hover { background: #dbeafe; }
.btn.outline-green { border-color: #99f6e4; color: var(--accent-strong); background: #f0fdfa; }
.btn.outline-green:hover { border-color: var(--accent); background: #ccfbf1; color: var(--accent-strong); }
.spider-log-detail { display: flex; flex-direction: column; gap: 10px; }
.spider-log-record { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; }
.spider-log-record .rec-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spider-log-record .rec-url { font-family: var(--mono); font-size: 11.5px; color: #334155; margin-top: 6px; word-break: break-all; line-height: 1.55; }
.spider-log-record .rec-meta { display: flex; flex-wrap: wrap; gap: 5px 14px; color: var(--muted); font-size: 11px; margin-top: 6px; }
.spider-log-record .rec-ua { color: var(--muted-2); font-size: 10.5px; margin-top: 5px; word-break: break-all; }
@media (max-width: 720px) {
  .spider-log-toolbar .spacer { display: none; }
  .log-date { width: 112px; }
  .spider-log-toolbar .toolbar-note { width: 100%; }
}
.chart-legend .swatch { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.chart-tooltip { font-size: 11px; fill: var(--muted); }
.donut-legend { display: flex; flex-direction: column; gap: 7px; }
.donut-legend .row { display: flex; align-items: center; gap: 7px; font-size: 12px; padding: 3px 6px; margin: 0 -6px; border-radius: 7px; transition: background 0.14s, color 0.14s; }
.donut-legend .row.clickable { cursor: pointer; }
.donut-legend .row.clickable:hover { background: var(--bg-soft); }
.donut-legend .row.active { background: #f0fdfa; color: var(--accent-strong); font-weight: 600; }
.donut-legend .row.active .sq { box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.16); }
.donut-legend .row b { margin-left: auto; font-variant-numeric: tabular-nums; }
.donut-legend .sq { width: 8px; height: 8px; border-radius: 2px; }
.donut-seg { cursor: pointer; transition: opacity 0.14s; }
.donut-seg:hover { opacity: 0.78; }
.spark { display: inline-block; vertical-align: middle; }

/* ------------------------------ 弹窗 / 抽屉 / 提示 ------------------------------ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 32, 0.48);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 30px;
  overflow-y: auto;
  animation: fadeIn 0.16s ease;
}
.modal {
  background: #fff;
  border-radius: 16px;
  width: 620px;
  max-width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 90px);
}
.modal.wide { width: 860px; }
.modal.xwide { width: 1080px; }
.modal.narrow { width: 460px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; font-weight: 650; }
.modal-head p { color: var(--muted); font-size: 12px; margin-top: 2px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-body.flush { padding: 0; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: flex-end; gap: 8px; background: #fbfcfd; border-radius: 0 0 16px 16px; }
.modal-foot .left { margin-right: auto; color: var(--muted); font-size: 12px; }
.drawer-overlay { position: fixed; inset: 0; background: rgba(10, 18, 32, 0.42); z-index: 100; animation: fadeIn 0.16s; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 520px;
  max-width: 94vw;
  background: #fff;
  z-index: 101;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: drawerIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.drawer-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.toast-stack { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  min-width: 260px;
  max-width: 380px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 12.5px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 9px;
  pointer-events: auto;
  animation: toastIn 0.2s ease;
}
.toast.success { border-left: 3px solid #2dd4bf; }
.toast.error { border-left: 3px solid #f87171; }
.toast.info { border-left: 3px solid #60a5fa; }
.toast svg { flex: 0 0 16px; margin-top: 1px; color: #2dd4bf; }
.toast.error svg { color: #f87171; }
.toast.info svg { color: #60a5fa; }
.toast .msg { flex: 1; line-height: 1.5; word-break: break-word; }
.confirm-body { padding: 6px 2px 2px; color: var(--ink-2); font-size: 13.5px; }
.confirm-body b { color: var(--ink); }

/* ------------------------------ 命令面板 ------------------------------ */
.palette-overlay { position: fixed; inset: 0; background: rgba(10, 18, 32, 0.45); z-index: 150; display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; animation: fadeIn 0.14s; }
.palette { width: 560px; max-width: 92vw; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; animation: modalIn 0.18s; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.palette-input input { border: 0; outline: none; font-size: 14.5px; flex: 1; }
.palette-list { max-height: 380px; overflow-y: auto; padding: 6px; }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.palette-item:hover, .palette-item.active { background: var(--bg-soft); color: var(--ink); }
.palette-item .group { margin-left: auto; font-size: 10.5px; color: var(--muted-2); }
.palette-empty { padding: 30px; text-align: center; color: var(--muted); font-size: 12.5px; }

/* ------------------------------ 空态 / 加载 ------------------------------ */
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--bg-soft); color: var(--muted-2); margin: 0 auto 12px; }
.empty h4 { color: var(--ink-2); font-size: 14px; margin-bottom: 4px; }
.empty p { font-size: 12.5px; }
.skeleton { background: linear-gradient(90deg, #eef2f6 25%, #f7f9fb 37%, #eef2f6 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
.loading-line { height: 12px; margin: 8px 0; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(15, 23, 42, 0.12); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.75s linear infinite; display: inline-block; }
.btn .spinner { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }

/* ------------------------------ 登录页 ------------------------------ */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr); background: #fff; }
.login-brand {
  background:
    radial-gradient(900px 600px at 15% 15%, rgba(20, 184, 166, 0.26), transparent 60%),
    radial-gradient(700px 500px at 90% 85%, rgba(8, 145, 178, 0.22), transparent 65%),
    linear-gradient(145deg, #07111f 0%, #0b1b2e 55%, #0b2233 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 46px 54px;
  display: flex;
  flex-direction: column;
}
.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(148, 163, 184, 0.14) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 80%);
}
.login-brand > * { position: relative; z-index: 1; }
.login-logo { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 18px; letter-spacing: 0.3px; }
.login-logo .brand-mark { width: 38px; height: 38px; border-radius: 11px; }
.login-hero { margin-top: auto; margin-bottom: auto; max-width: 620px; }
.login-hero .kicker { font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase; color: #2dd4bf; font-weight: 600; }
.login-hero h1 { font-size: clamp(32px, 3.4vw, 48px); line-height: 1.16; letter-spacing: -1.2px; margin: 16px 0 18px; font-weight: 750; }
.login-hero h1 em { font-style: normal; color: #5eead4; }
.login-hero p { color: #94a3b8; font-size: 15px; line-height: 1.9; max-width: 480px; }
.login-features { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin-top: 34px; }
.login-feature { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: #cbd5e1; }
.login-feature svg { color: #2dd4bf; margin-top: 2px; flex: 0 0 16px; }
.login-feature b { display: block; color: #f1f5f9; font-weight: 600; margin-bottom: 2px; font-size: 13px; }
.login-foot { color: #5e718f; font-size: 11.5px; display: flex; gap: 16px; flex-wrap: wrap; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.login-card { width: 100%; max-width: 390px; }
.login-card .eyebrow { color: var(--accent); font-size: 11px; letter-spacing: 1.6px; font-weight: 700; text-transform: uppercase; }
.login-card h2 { font-size: 28px; letter-spacing: -0.6px; margin: 8px 0 6px; }
.login-card .lead { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.login-form { display: flex; flex-direction: column; gap: 15px; }
.login-form .field > label { font-size: 12.5px; }
.login-input { position: relative; }
.login-input svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-2); width: 16px; height: 16px; }
.login-input .input { height: 44px; padding-left: 38px; border-radius: 10px; background: var(--bg-soft); }
.login-input .input:focus { background: #fff; }
.login-input .toggle-pw { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.login-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); }
.login-submit { height: 44px; font-size: 14px; border-radius: 10px; margin-top: 2px; }
.demo-box { margin-top: 26px; border-top: 1px dashed var(--line); padding-top: 18px; }
.demo-box .t { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted-2); margin-bottom: 9px; }
.demo-accounts { display: flex; gap: 7px; flex-wrap: wrap; }
.demo-account { border: 1px solid var(--line); border-radius: 8px; background: var(--bg-soft); padding: 6px 9px; font-size: 11px; color: var(--muted); text-align: left; }
.demo-account:hover { border-color: var(--accent); background: #f0fdfa; }
.demo-account b { display: block; color: var(--ink-2); font-size: 12px; }
.login-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 8px; padding: 9px 11px; font-size: 12px; display: none; }
.login-error.show { display: block; animation: shake 0.3s; }
.login-note { margin-top: 16px; text-align: center; font-size: 11px; color: var(--muted-2); }

/* ------------------------------ 站点 / 画廊 / 模板等业务组件 ------------------------------ */
.site-cell { display: flex; align-items: center; gap: 10px; }
.site-favicon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; flex: 0 0 34px; background: linear-gradient(135deg, #0d9488, #0e7490); }
.site-cell .domain { color: var(--muted); font-size: 11.5px; display: flex; align-items: center; gap: 5px; }
.health-bar { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.health-bar .progress { flex: 1; }
.health-bar b { font-size: 12px; font-variant-numeric: tabular-nums; width: auto; min-width: 26px; text-align: right; white-space: nowrap; }
.inline-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.alert-list { display: flex; flex-direction: column; }
.alert-item { display: flex; gap: 11px; padding: 12px 16px; border-bottom: 1px solid #eef2f6; align-items: flex-start; }
.alert-item:last-child { border-bottom: 0; }
.alert-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 30px; background: #fef2f2; color: var(--red); }
.alert-item.warning .alert-icon { background: #fffbeb; color: var(--amber); }
.alert-item.info .alert-icon { background: #eff6ff; color: var(--blue); }
.alert-item .content { flex: 1; min-width: 0; }
.alert-item .content b { display: block; font-size: 12.5px; font-weight: 600; }
.alert-item .content p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.alert-item .go { color: var(--muted); }
.timeline { display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: 12px; padding-bottom: 18px; position: relative; }
.timeline-item::before { content: ""; position: absolute; left: 5px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--accent); background: #fff; margin-top: 5px; flex: 0 0 11px; z-index: 1; }
.timeline-item .content { flex: 1; }
.timeline-item .content b { font-size: 12.5px; }
.timeline-item .content p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.timeline-item .time { font-size: 11px; color: var(--muted-2); white-space: nowrap; }
.quick-actions { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.quick-action { border: 1px solid var(--line); border-radius: 11px; padding: 13px; background: #fff; display: flex; flex-direction: column; gap: 8px; text-align: left; transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s; }
.quick-action:hover { border-color: #99f6e4; transform: translateY(-2px); box-shadow: var(--shadow); }
.quick-action .qi { width: 30px; height: 30px; border-radius: 8px; background: #f0fdfa; color: var(--accent-strong); display: grid; place-items: center; }
.quick-action b { font-size: 12.5px; }
.quick-action span { font-size: 11px; color: var(--muted); }
.group-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.group-card:hover { border-color: #99f6e4; box-shadow: var(--shadow); }
.group-card .top { display: flex; align-items: center; justify-content: space-between; }
.group-card h3 { font-size: 14.5px; }
.group-card .gmeta { display: flex; gap: 16px; color: var(--muted); font-size: 11.5px; }
.group-card .gmeta b { color: var(--ink); font-size: 16px; display: block; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.gallery-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; position: relative; transition: box-shadow 0.16s, transform 0.16s; }
.gallery-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.gallery-thumb { aspect-ratio: 4 / 3; background: var(--bg-soft); overflow: hidden; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s; }
.gallery-card:hover .gallery-thumb img { transform: scale(1.04); }
.gallery-info { padding: 10px 11px; }
.gallery-info b { font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-info span { font-size: 10.5px; color: var(--muted); }
.gallery-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity 0.16s; }
.gallery-card:hover .gallery-actions { opacity: 1; }
.gallery-actions .icon-btn { width: 28px; height: 28px; background: rgba(15, 23, 42, 0.72); color: #fff; border-radius: 7px; }
.template-card { border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: #fff; transition: box-shadow 0.16s, transform 0.16s; }
.template-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.template-preview { height: 180px; background: var(--bg-soft); position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.template-preview iframe { position: absolute; top: 0; left: 0; width: 312.5%; height: 562.5px; border: 0; transform: scale(0.32); transform-origin: top left; pointer-events: none; }
.template-info { padding: 12px 14px; }
.template-info h4 { font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.template-info p { color: var(--muted); font-size: 11px; margin-top: 3px; }
.template-meta { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: 11px; color: var(--muted); }
.code-editor { width: 100%; min-height: 360px; font-family: var(--mono); font-size: 12px; line-height: 1.6; border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px; background: #0b1220; color: #cbd5e1; resize: vertical; outline: none; tab-size: 2; }
.code-editor:focus { border-color: var(--accent); }
.preview-frame { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.split-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.score-list { display: flex; flex-direction: column; gap: 12px; }
.score-row { display: flex; align-items: center; gap: 10px; }
.score-row .label { width: 100px; font-size: 12px; color: var(--ink-2); flex: 0 0 100px; }
.score-row .progress { flex: 1; }
.score-row b { width: 36px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.engine-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.engine-cell { border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; background: var(--bg-soft); }
.engine-cell b { font-size: 12px; display: block; }
.engine-cell span { font-size: 10.5px; color: var(--muted); }
.engine-cell.ok { background: #f0fdfa; border-color: #99f6e4; }
.engine-cell.no { background: #fef2f2; border-color: #fecaca; }
.supplement-row { padding: 14px 16px; border-bottom: 1px solid #eef2f6; }
.supplement-row:last-child { border-bottom: 0; }
.supplement-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.supplement-head b { font-size: 13px; }
.supplement-row .progress { margin-top: 9px; }
.supplement-meta { display: flex; gap: 14px; margin-top: 7px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.check-group { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.check-group-head { background: var(--bg-soft); padding: 10px 14px; font-size: 12px; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-top: 1px solid #eef2f6; font-size: 12.5px; }
.check-row .status-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: 0 0 8px; background: var(--green); }
.check-row.warn .status-dot { background: var(--amber); }
.check-row.fail .status-dot { background: var(--red); }
.check-row .check-main { flex: 1; min-width: 0; }
.check-row .check-main b { font-weight: 550; }
.check-row .check-main p { color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.check-row .dur { color: var(--muted-2); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.system-hero { display: flex; align-items: center; gap: 26px; padding: 22px; }
.system-hero .info { flex: 1; }
.system-hero .info h3 { font-size: 16px; margin-bottom: 4px; }
.system-hero .info p { color: var(--muted); font-size: 12.5px; }
.kv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kv { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.kv span { display: block; font-size: 10.5px; color: var(--muted); margin-bottom: 4px; }
.kv b { font-size: 13px; font-weight: 600; word-break: break-all; }
.model-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fff; position: relative; }
.model-card.default { border-color: #99f6e4; box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.06); }
.model-card h4 { font-size: 14px; display: flex; align-items: center; gap: 7px; }
.model-row { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--muted); margin-top: 7px; }
.model-row b { color: var(--ink-2); font-weight: 500; text-align: right; word-break: break-all; }
.ad-preview { background: var(--bg-soft); border: 1px dashed var(--line-strong); border-radius: 10px; padding: 16px; min-height: 120px; display: grid; place-items: center; text-align: center; }
.ad-preview img { max-width: 100%; max-height: 180px; border-radius: 8px; }
.palette-swatch { display: inline-flex; gap: 4px; }
.palette-swatch i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 20px; padding: 5px 10px; font-size: 11.5px; background: #fff; }
.tag-chip .count { color: var(--muted-2); font-size: 10px; }
.industry-tree { display: flex; flex-direction: column; }
.industry-node { padding: 10px 14px; border-bottom: 1px solid #eef2f6; display: flex; align-items: center; gap: 10px; }
.industry-node.child { padding-left: 44px; background: #fcfdfe; }
.industry-node .name { flex: 1; font-size: 13px; }
.industry-node.child .name { color: var(--ink-2); }
.split-list { display: flex; flex-direction: column; }
.split-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eef2f6; font-size: 12.5px; }
.split-row:last-child { border-bottom: 0; }
.notice { display: flex; gap: 9px; padding: 10px 12px; border-radius: 9px; background: #f0fdfa; border: 1px solid #ccfbf1; color: #0f766e; font-size: 12px; line-height: 1.6; }
.notice.warn { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.notice.info { background: #eff6ff; border-color: #dbeafe; color: #1d4ed8; }
.notice svg { flex: 0 0 15px; margin-top: 2px; }
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table td { padding: 8px 0; border-bottom: 1px solid #eef2f6; font-size: 12px; }
.mini-table td:last-child { text-align: right; color: var(--muted); }
.mini-table tr:last-child td { border-bottom: 0; }
.copy-code { position: relative; }
.copy-code .btn { position: absolute; right: 6px; top: 6px; }
.code-block { background: #0b1220; color: #cbd5e1; border-radius: 9px; padding: 12px 14px; font-family: var(--mono); font-size: 11.5px; line-height: 1.6; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.toolbar-note { font-size: 11.5px; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.text-accent { color: var(--accent-strong); }
.text-green { color: var(--green); } .text-amber { color: var(--amber); } .text-red { color: var(--red); } .text-blue { color: var(--blue); }
.bg-soft { background: var(--bg-soft); }
.rounded { border-radius: 10px; }
.pointer { cursor: pointer; }
.hidden { display: none !important; }

/* ------------------------------ 动画 ------------------------------ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(-10px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes drawerIn { from { transform: translateX(30px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@keyframes toastIn { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.fade-in { animation: fadeIn 0.25s ease; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.14); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.14); } 50% { box-shadow: 0 0 0 5px rgba(5, 150, 105, 0.04); } }

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-actions { grid-template-columns: repeat(3, 1fr); }
  .kv-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1080px) {
  .grid-3, .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .top-search { width: 170px; }
  .user-meta { display: none; }
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .split-editor { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  :root { --sidebar-w: 0px; }
  .sidebar { width: 248px; transform: translateX(-100%); transition: transform 0.22s ease; }
  .sidebar.open { transform: none; }
  .main-wrap { margin-left: 0; }
  .mobile-menu { display: grid !important; }
  .page { padding: 18px 16px 40px; }
  .topbar { padding: 0 14px; }
  .sidebar-mask { position: fixed; inset: 0; background: rgba(10,18,32,.45); z-index: 35; }
}
@media (max-width: 720px) {
  .page-head { flex-direction: column; align-items: stretch; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 13px; }
  .stat-value { font-size: 23px; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .engine-grid { grid-template-columns: repeat(2, 1fr); }
  .toolbar { padding: 10px 12px; }
  .search-box { width: 100%; }
  .top-search { display: none; }
  .login-panel { padding: 24px; }
  .system-hero { flex-direction: column; align-items: flex-start; }
  .form-grid { gap: 10px; }
  .col-6, .col-4, .col-3, .col-8 { grid-column: span 12 !important; }
  .kv-grid { grid-template-columns: 1fr; }
  .modal { max-height: calc(100vh - 100px); }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .login-features { grid-template-columns: 1fr; }
}
