:root {
  --bg: #f6f7f9;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --text: #111827;
  --muted: #6b7280;
  --faint: #9ca3af;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #eff6ff;
  --success: #10b981;
  --success-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --coral: #ef4444;
  --coral-soft: #fef2f2;
  --abnormal: #7c3aed;
  --abnormal-soft: #f5f3ff;
  --info: #0ea5e9;
  --info-soft: #ecfeff;
  --blue: #3b82f6;
  --blue-soft: #eff6ff;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 34px rgba(0, 0, 0, 0.1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

html.dark {
  --bg: #0d1117;
  --bg-soft: #161b22;
  --card: #131920;
  --line: rgba(240, 246, 252, 0.1);
  --line-strong: rgba(240, 246, 252, 0.18);
  --text: #e5edf5;
  --muted: #94a3b8;
  --faint: #64748b;
  --primary: #3b82f6;
  --primary-strong: #2563eb;
  --primary-soft: rgba(59, 130, 246, 0.12);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.12);
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, 0.12);
  --amber: #f5b14c;
  --amber-soft: rgba(245, 177, 76, 0.12);
  --coral: #f87171;
  --coral-soft: rgba(248, 113, 113, 0.12);
  --abnormal: #c084fc;
  --abnormal-soft: rgba(192, 132, 252, 0.14);
  --blue: #60a5fa;
  --blue-soft: rgba(96, 165, 250, 0.12);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; }
.eyebrow { color: var(--primary); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin: 0; }
h3 { margin: 8px 0 6px; font-size: 22px; }
.mono, .metric-value, .count-label, .pager-summary, .pager-button, .sync-label, .build-tag, .status-label { font-family: var(--font-mono); }

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ---------- Shell ---------- */
.app-shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: var(--bg-soft);
  border-right: 1px solid var(--line);
  padding: 20px 14px 18px;
  display: flex; flex-direction: column; gap: 18px;
}
.brand-lockup { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff; font-weight: 700; font-size: 16px; border-radius: 10px;
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.3);
}
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: 0.02em; color: var(--text); }
.rail-label { color: var(--faint); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; padding: 0 10px; }
.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  background: transparent; border: 0; color: var(--muted);
  font-size: 13.5px; font-weight: 500; padding: 9px 12px; border-radius: 10px;
  text-align: left; transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-glyph { width: 18px; text-align: center; font-size: 14px; }
.sidebar-footer { margin-top: auto; padding: 0 10px; }
.status-pip { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 12.5px; font-weight: 600; }
.status-pip i { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18); }
.version-line { color: var(--faint); font-size: 10.5px; margin-top: 6px; }
.build-tag { color: var(--amber); }

.main-content { min-width: 0; padding: 26px 30px 46px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.topbar h2 { margin: 4px 0 0; font-size: 26px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.sync-label { color: var(--faint); font-size: 11px; }
.notice {
  position: fixed; bottom: 24px; right: 26px; z-index: 1000;
  background: var(--primary-soft); color: var(--primary-strong);
  border: 1px solid rgba(59, 130, 246, 0.35); border-radius: 10px;
  padding: 11px 16px; font-size: 13px; box-shadow: var(--shadow-lg);
  transform: translateY(12px); opacity: 0; transition: all 0.22s ease;
}
.notice.visible { transform: translateY(0); opacity: 1; }
.notice.error { background: var(--coral-soft); color: var(--coral); border-color: rgba(239, 68, 68, 0.35); }

/* ---------- Overview ---------- */
.overview-toolbar { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.range-combo { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.range-combo select { background: var(--bg-soft); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; padding: 7px 12px; font-size: 13px; }
.hero-strip {
  display: none; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 24px; margin-bottom: 18px;
  background: linear-gradient(120deg, var(--primary-soft), rgba(59, 130, 246, 0.05) 60%, transparent);
  border: 1px solid rgba(59, 130, 246, 0.22); border-radius: var(--radius);
}
.hero-strip h3 { font-size: 22px; line-height: 1.3; margin: 6px 0 0; }
.hero-strip h3 em { color: var(--primary); font-style: normal; }
.hero-stamp {
  display: grid; place-items: center; gap: 2px; min-width: 120px; padding: 13px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.hero-stamp > span { font-weight: 700; font-size: 18px; color: var(--amber); }
.hero-stamp strong { font-family: var(--font-mono); font-size: 28px; color: var(--text); }
.hero-stamp small { color: var(--faint); font-size: 9px; letter-spacing: 0.12em; text-align: center; }
.hero-stamp-live strong { color: var(--blue); }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.metric-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.metric-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.metric-card.accent-lime { border-top: 2px solid var(--primary); }
.metric-card.accent-blue { border-top: 2px solid var(--blue); }
.metric-card.accent-coral { border-top: 2px solid var(--coral); }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.metric-value { font-size: 36px; font-weight: 600; line-height: 1.15; margin-top: 6px; }
.accent-lime .metric-value { color: var(--primary); }
.accent-blue .metric-value { color: var(--blue); }
.accent-coral .metric-value { color: var(--coral); }
.metric-sub { color: var(--faint); font-size: 11.5px; margin-top: 4px; }

.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-heading h3, .panel-heading h4 { margin: 4px 0 0; font-size: 16px; }
.text-button { background: none; border: 0; color: var(--primary); font-size: 12px; padding: 0; font-weight: 500; }
.text-button:hover { opacity: 0.75; }
.health-list { display: flex; flex-direction: column; gap: 10px; }
.health-row { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.health-row strong { margin-left: auto; font-family: var(--font-mono); font-size: 15px; color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-lime { background: var(--primary); }
.dot-amber { background: var(--amber); }
.dot-coral { background: var(--coral); }
.dot-abnormal { background: var(--abnormal); }
.dot-blue { background: var(--info); }
.dot-slate { background: #64748b; }
.call-summary { display: flex; gap: 24px; }
.call-summary span { display: block; color: var(--faint); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.call-summary strong { font-family: var(--font-mono); font-size: 21px; display: block; margin-top: 3px; }
.mini-bar { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; margin-top: 15px; }
.mini-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--blue)); border-radius: 99px; }

/* ---------- Section / filters / tables ---------- */
.section-intro { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-note { margin: 0; color: var(--muted); font-size: 12.5px; }
.count-label { color: var(--primary); font-size: 12px; }
.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-row label { display: flex; flex-direction: row; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.filter-row input, .filter-row select {
  background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 8px 11px; font-size: 13px; min-width: 150px;
}
.filter-check { white-space: nowrap; }
.filter-check input { min-width: 0; width: 14px; height: 14px; accent-color: var(--primary); }
.filter-row input:focus, .filter-row select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12); }
.account-filter-row { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
thead th {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint);
  text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--line-strong);
  white-space: nowrap; background: var(--bg-soft);
}
tbody td { padding: 11px 13px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.table-scroll table { min-width: 980px; }
#accounts-body td { white-space: nowrap; }
/* Import sequence: a narrow, non-wrapping column so the batch number is easy
   to scan without stealing width from the identity columns. */
.import-seq { width: 56px; min-width: 56px; max-width: 56px; text-align: center; }
td.import-seq { font-family: var(--font-mono); color: var(--muted); }
#accounts-body th:nth-child(1), #accounts-body td:nth-child(1) { width: 56px; min-width: 56px; }
#accounts-body th:nth-child(2), #accounts-body td:nth-child(2) { width: 24%; min-width: 220px; }
#accounts-body th:nth-child(3), #accounts-body td:nth-child(3) { width: 13%; }
#accounts-body th:nth-child(4), #accounts-body td:nth-child(4) { width: 11%; }
#accounts-body th:nth-child(n+5):nth-child(-n+8), #accounts-body td:nth-child(n+5):nth-child(-n+8) { width: 7%; }
#accounts-body th:nth-child(9), #accounts-body td:nth-child(9) { width: 10%; }
#accounts-body th:nth-child(10), #accounts-body td:nth-child(10) { width: 18%; }
#calls-body td:last-child { white-space: normal; }
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: var(--bg); }
tbody td strong { font-weight: 600; }
tbody td small { display: block; color: var(--faint); font-size: 11px; margin-top: 2px; }
.empty-cell { text-align: center; color: var(--faint); padding: 34px 12px !important; }
.align-right { text-align: right; }

.status-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; color: var(--primary); }
.status-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-label.quota, .status-label.cooling { color: var(--amber); }
.status-label.disabled, .status-label.failed { color: var(--coral); }
.status-label.abnormal { color: var(--abnormal); font-weight: 700; }
.status-label.pending { color: var(--info); }

/* ---------- Buttons / forms ---------- */
.primary-button, .secondary-button, .small-button, .ghost-button, .icon-button {
  border-radius: 10px; font-weight: 500; font-size: 12.5px;
  transition: transform 0.12s, background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.primary-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff; border: 0; padding: 9px 18px;
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.28);
}
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37, 99, 235, 0.34); }
.secondary-button { background: var(--bg-soft); color: var(--text); border: 1px solid var(--line-strong); padding: 8px 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
.secondary-button:hover { border-color: var(--faint); }
.small-button { background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line); padding: 5px 10px; font-size: 11.5px; }
.small-button:hover { color: var(--text); border-color: var(--line-strong); background: var(--bg); }
.small-button.danger:hover { color: var(--coral); border-color: rgba(239, 68, 68, 0.45); background: var(--coral-soft); }
.ghost-button { background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 8px 14px; }
.ghost-button:hover { color: var(--text); border-color: var(--line-strong); }
.icon-button { background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); width: 34px; height: 34px; font-size: 15px; }
.icon-button:hover { color: var(--primary); border-color: var(--primary); }
.danger { color: var(--coral); }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.inline-input, .stack-form input, .stack-form select, .stack-form textarea, .compact-form input, .compact-form select, .compact-form textarea {
  background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 10px; font-size: 13px;
}
.inline-input { width: 62px; padding: 5px 8px; }
.inline-input:focus, .stack-form input:focus, .compact-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12); }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; align-items: end; }
.form-row label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 11.5px; flex: 1; min-width: 130px; }
.form-row label.automation-toggle { flex: 0 0 auto; min-width: 0; align-items: flex-start; }
.form-row input, .form-row select { background: var(--bg-soft); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.form-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12); }
.stack-form { display: flex; flex-direction: column; gap: 12px; }
.stack-form textarea { min-height: 92px; resize: vertical; }
.panel-footnote { color: var(--faint); font-size: 11.5px; line-height: 1.65; margin: 10px 0 0; }
.form-error { color: var(--coral); font-size: 12.5px; margin-top: 8px; }
.success-text { color: var(--primary); }

.segmented { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line-strong); border-radius: 10px; padding: 3px; gap: 2px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; }
.segmented span {
  display: inline-block; padding: 6px 13px; border-radius: 8px;
  color: var(--muted); font-size: 12px; cursor: pointer; transition: background 0.14s, color 0.14s;
}
.segmented input:checked + span { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.segmented input:focus-visible + span { outline: 1px solid var(--primary); }

.automation-toggle { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; color: var(--text); font-size: 13px; }
.automation-toggle input { accent-color: var(--primary); flex: 0 0 auto; margin: 2px 0 0; }
.automation-toggle span { display: flex; flex-direction: column; gap: 2px; }
.automation-toggle strong { font-weight: 600; }
.automation-toggle small { color: var(--faint); font-size: 11px; }
.settings-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.settings-tab { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); padding: 8px 16px; font-size: 12.5px; font-weight: 500; }
.settings-tab.active { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.compact-form { display: flex; flex-direction: column; gap: 4px; }

/* ---------- Proxy / chips / badges ---------- */
.proxy-mode-choice { margin: 8px 0 12px; }
.proxy-pool-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.proxy-profile { display: flex; align-items: center; gap: 10px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.proxy-profile.active { border-color: var(--primary); background: var(--primary-soft); }
.proxy-profile-main { flex: 1; min-width: 0; }
.proxy-profile-main strong { display: block; font-size: 12.5px; }
.proxy-profile-main small { color: var(--faint); font-size: 11px; word-break: break-all; }
.proxy-stat { color: var(--faint); font-size: 10.5px; font-weight: 500; margin-left: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.proxy-profile.disabled .proxy-stat { color: var(--faint); opacity: .7; }
.proxy-add-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.proxy-add-row label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 11px; flex: 1; min-width: 130px; }
.proxy-add-row input { background: var(--bg-soft); border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); padding: 8px 10px; font-size: 12.5px; }
.download-egress { margin-top: 14px; }

.badge { display: inline-block; font-family: var(--font-mono); font-size: 10px; border-radius: 99px; padding: 3px 9px; border: 1px solid; }
.badge-blue { color: var(--blue); border-color: rgba(59, 130, 246, 0.4); background: var(--blue-soft); }
.model-badge { color: var(--amber); border-color: rgba(217, 119, 6, 0.4); background: var(--amber-soft); }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 3px 9px; background: var(--bg-soft); }
.aspect-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.aspect-chip { font-family: var(--font-mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; background: var(--bg-soft); }
.aspect-chip.selected { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.aspect-picker-label { color: var(--muted); font-size: 11.5px; }
.aspect-collapse { margin-top: 10px; }
.aspect-collapse summary { cursor: pointer; color: var(--primary); font-size: 12px; }
.inherit-summary { color: var(--faint); font-size: 11.5px; margin-top: 6px; line-height: 1.6; }

/* ---------- Calls / images ---------- */
.param-line { font-family: var(--font-mono); font-size: 12px; }
.asset-count { display: block; color: var(--faint); font-size: 10.5px; margin-top: 2px; }
.call-thumb { background: var(--bg); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; padding: 0; width: 44px; height: 44px; display: grid; place-items: center; }
.call-thumb img { width: 100%; height: 100%; object-fit: cover; }
.call-thumb-empty { color: var(--faint); font-size: 16px; cursor: default; }
.call-prompt-open { background: none; border: 0; color: var(--muted); font-size: 12.5px; text-align: left; padding: 0; max-width: 340px; }
.call-prompt-open:hover { color: var(--primary); }
.call-dialog, .test-dialog {
  background: var(--card); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 16px;
  padding: 0; width: min(620px, 92vw); max-height: 88vh; overflow: auto;
  box-shadow: var(--shadow-lg);
}
.call-dialog::backdrop, .test-dialog::backdrop { background: rgba(15, 23, 42, 0.4); }
.call-dialog form, .test-dialog form { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.call-dialog-section { display: flex; flex-direction: column; gap: 8px; }
.call-preview { width: 100%; border-radius: 11px; overflow: hidden; background: var(--bg); }
.call-preview img { width: 100%; display: block; max-height: 44vh; object-fit: contain; background: var(--bg); }
.call-preview-empty {
  color: var(--faint); text-align: center; padding: 46px 0; margin: 0;
  background: var(--bg-soft); border: 1px dashed var(--line-strong); border-radius: 12px;
  display: grid; place-items: center; min-height: 120px;
}
.call-meta { display: grid; grid-template-columns: 108px 1fr; gap: 6px 14px; }
.call-meta-row { display: contents; }
.call-meta-row dt { color: var(--faint); font-size: 11.5px; }
.call-meta-row dd { margin: 0; font-size: 13px; word-break: break-word; }
.call-prompt-full { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; font-size: 13px; line-height: 1.7; max-height: 150px; overflow: auto; white-space: pre-wrap; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.test-state { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.test-state-indicator { width: 9px; height: 9px; border-radius: 50%; }
.test-state[data-state="running"] .test-state-indicator { background: var(--blue); animation: pulse 1.2s ease-in-out infinite; }
.test-state[data-state="success"] .test-state-indicator { background: var(--primary); }
.test-state[data-state="error"] .test-state-indicator { background: var(--coral); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 13px; }
.image-card { background: var(--card); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; box-shadow: var(--shadow); transition: transform 0.16s, box-shadow 0.16s; }
.image-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.image-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--bg); }
.image-meta { padding: 10px 12px; }
.image-meta strong { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.image-meta p { margin: 3px 0 6px; color: var(--faint); font-size: 11px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.image-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.image-tags span { font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.image-open { color: var(--primary); font-size: 11px; background: none; border: 0; padding: 0; margin-top: 6px; cursor: pointer; font-weight: 600; }
.image-open:hover { text-decoration: underline; }
.empty-state { color: var(--faint); text-align: center; padding: 46px 0; }

/* ---------- API keys / models ---------- */
.api-key-list { display: flex; flex-direction: column; gap: 8px; }
.api-key-row { display: flex; align-items: center; gap: 10px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.api-key-row-env { border-style: dashed; }
.api-key-name { flex: 1; background: transparent; border: 0; color: var(--text); font-size: 13px; }
.api-key-name:disabled { opacity: 0.85; }
.api-key-badge { font-family: var(--font-mono); font-size: 10px; color: var(--blue); border: 1px solid rgba(59, 130, 246, 0.35); border-radius: 99px; padding: 2px 8px; }
.api-key-add { display: flex; gap: 10px; margin-top: 10px; }
.api-key-add input { flex: 1; background: var(--bg-soft); border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); padding: 8px 10px; }

.model-upstream-view { color: var(--faint); font-size: 11px; }
.model-caps { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.model-id { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
input.model-name, input.model-upstream, input.model-id, select.model-upstream { font-family: var(--font-mono); font-size: 11px; color: var(--text); background: var(--bg-soft); border: 1px solid var(--line-strong); border-radius: 6px; padding: 3px 6px; max-width: 100%; }
.model-tools, .row-actions, .account-tools { display: flex; gap: 5px; flex-wrap: nowrap; }
.row-actions .small-button {
  padding: 3px 7px; font-size: 11px; white-space: nowrap;
  background: transparent; border-color: transparent; color: var(--muted);
}
.row-actions .small-button:hover { background: var(--bg); color: var(--text); border-color: var(--line-strong); }
.row-actions .small-button.danger:hover { background: var(--coral-soft); color: var(--coral); }

/* ---------- Pager ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 13px 10px 3px; color: var(--faint); font-size: 11px; }
.pager-controls, .pager-jump, .pager-jump label { display: flex; align-items: center; gap: 5px; }
.pager-button {
  display: inline-grid; place-items: center; min-width: 29px; height: 28px;
  border: 1px solid var(--line); border-radius: 8px; color: var(--muted);
  background: var(--bg-soft); font-size: 11px;
}
.pager-button:not(:disabled) { cursor: pointer; }
.pager-button:disabled { opacity: 0.35; cursor: not-allowed; }
.pager-button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pager-button.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.pager-jump input { width: 46px; min-height: 28px; padding: 4px 6px; background: var(--bg-soft); border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); text-align: center; }
.image-pager { margin-top: 8px; padding-inline: 0; }

/* ---------- Login ---------- */
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(140deg, var(--primary-soft), var(--bg) 55%); }
.login-card {
  width: min(420px, 94vw); background: var(--card);
  border: 1px solid var(--line-strong); border-radius: 18px; padding: 36px 34px;
  box-shadow: var(--shadow-lg);
}
.login-card h1 { font-size: 25px; margin: 6px 0 4px; }
.login-card input { width: 100%; background: var(--bg-soft); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 13px; font-size: 14px; margin-top: 12px; }
.login-card input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12); }
.login-card .primary-button { width: 100%; margin-top: 16px; }
.login-copy { color: var(--muted); font-size: 13px; }
.login-footnote { color: var(--faint); font-size: 11px; margin-top: 18px; text-align: center; }

/* ---------- Motion ---------- */
.view { display: none; }
.view.active { display: block; }
/* 视图切换不做列表级动画,避免大表格重绘卡顿 */
.view.active > .section-intro, .view.active > .overview-toolbar, .view.active > .hero-strip {
  animation: none;
}
@keyframes riseIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.is-loading { opacity: 0.65; pointer-events: none; transition: opacity 0.15s; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-grid { grid-template-columns: 1fr; }
}
/* Mobile: the sidebar becomes a compact top bar with a drawer. The drawer
   overlays the content instead of pushing it down or spanning full width. */
.sidebar-toggle { display: none; }
@media (max-width: 720px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky; top: 0; z-index: 60;
    height: auto;
    flex-direction: row; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .sidebar-brand { flex: 1; }
  .sidebar-toggle {
    display: grid; place-items: center;
    width: 38px; height: 38px;
    background: var(--bg); border: 1px solid var(--line-strong);
    border-radius: 10px; color: var(--text); font-size: 17px;
  }
  .sidebar .rail-label, .sidebar .nav-list, .sidebar .sidebar-footer {
    display: none;
  }
  .sidebar.open .nav-list {
    display: flex;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 2px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 12px 12px;
    padding: 10px 14px 14px;
    box-shadow: var(--shadow-lg);
  }
  .main-content { padding: 18px 16px 42px; }
  .topbar h2 { font-size: 23px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-strip { flex-direction: column; align-items: flex-start; }
  .form-row, .filter-row { flex-direction: column; align-items: stretch; }
  .pager { flex-wrap: wrap; }
  .pager-summary { width: 100%; }
  .pager-controls { order: 3; overflow-x: auto; max-width: 100%; }
  .pager-jump { margin-left: auto; }
  .settings-grid { grid-template-columns: 1fr; }
}

/* ---------- Image preview dialog ---------- */
.image-preview-dialog {
  background: transparent; border: 0; padding: 0; max-width: 92vw; max-height: 92vh;
}
.image-preview-dialog::backdrop { background: rgba(15, 23, 42, 0.62); }
.image-preview-wrap { position: relative; }
.image-preview-close { position: absolute; top: 10px; right: 10px; background: rgba(15, 23, 42, 0.72); border-color: rgba(255,255,255,0.25); color: #fff; z-index: 2; }
.image-preview-wrap img { display: block; max-width: 92vw; max-height: 78vh; border-radius: 14px; box-shadow: var(--shadow-lg); }
.image-preview-meta { margin-top: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.image-preview-meta strong { font-size: 13px; }
.image-preview-meta p { margin: 4px 0 6px; color: var(--muted); font-size: 12px; }
.image-preview-meta span { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }

/* ============ 2026-09-01 UI refinement overlay ============ */

/* 浅色增加层次，不再纯白 */
body {
  background: linear-gradient(180deg, #eef3f8 0%, #e7edf4 100%);
  background-attachment: fixed;
}
.main-content { background: transparent; }

/* 卡片更有体量 */
.panel, .metric-card, .image-card, .table-panel, .filter-panel {
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  border-color: #e3e8ef;
}

/* 按钮更像按钮 */
.secondary-button { background: #ffffff; border: 1px solid #d0d7e2; color: #1f2937; box-shadow: 0 1px 2px rgba(16,24,40,0.06); }
.secondary-button:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.small-button { background: #ffffff; border: 1px solid #d0d7e2; color: #374151; padding: 5px 10px; font-size: 11.5px; border-radius: 8px; box-shadow: 0 1px 2px rgba(16,24,40,0.05); }
.small-button:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.small-button.danger:hover { border-color: var(--coral); color: var(--coral); background: var(--coral-soft); }
.ghost-button { background: #ffffff; }
.icon-button { background: #ffffff; border-radius: 9px; }

/* 表格更好看 */
thead th { background: #f1f5f9; color: #475569; font-weight: 600; border-bottom: 1px solid #dbe2ea; }
tbody td { padding: 13px 14px; border-bottom: 1px solid #eef1f5; }
tbody tr:hover { background: #f4f8fd; }
table { border: 1px solid #e3e8ef; border-radius: 12px; }

/* 状态徽标胶囊化（颜色走主题变量，浅色/深色自动适配）。
   默认（可用/成功）为绿色，其余状态各有专属色。 */
.status-label { padding: 3px 10px; border-radius: 999px; font-weight: 600; color: var(--success); background: var(--success-soft); }
.status-label.quota, .status-label.cooling { color: var(--amber); background: var(--amber-soft); }
.status-label.disabled, .status-label.failed { color: var(--coral); background: var(--coral-soft); }
.status-label.abnormal { color: var(--abnormal); background: var(--abnormal-soft); }
.status-label.pending { color: var(--info); background: var(--info-soft); }

/* 计划/状态上下两行 */
#accounts-body td:nth-child(2) strong { display: block; margin-bottom: 6px; }
#accounts-body td:nth-child(2) small { display: block; margin-top: 4px; }

/* 账号表操作按钮紧凑但可见 */
#accounts-body .row-actions { flex-wrap: nowrap; gap: 4px; }
#accounts-body .row-actions .small-button { padding: 4px 8px; font-size: 11px; }

/* 调用详情弹窗分区清晰 */
.call-dialog form, .call-dialog-panel { gap: 16px; }
.call-dialog .panel-heading { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.call-preview { border: 1px solid var(--line-strong); border-radius: 14px; }
.call-preview-empty { border-radius: 14px; }
.call-prompt-full { border-radius: 12px; border-color: var(--line-strong); }
.call-meta { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.call-meta-row dd { color: var(--muted); }

/* 图片资产卡片与预览 */
.image-card { border-color: #e3e8ef; }
.image-thumb { border-radius: 12px 12px 0 0; }
.image-open {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; padding: 6px 12px;
  border-radius: 8px; font-weight: 600; margin-top: 10px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
.image-open:hover { text-decoration: none; background: var(--primary-strong); }
.image-preview-wrap img { border-radius: 14px; }

/* 深色下按钮与表格协调 */
html.dark .secondary-button, html.dark .small-button, html.dark .ghost-button, html.dark .icon-button { background: #161b22; border-color: rgba(240,246,252,0.16); color: #c9d1d9; }
html.dark thead th { background: #161b22; color: #8b949e; border-bottom: 1px solid rgba(240,246,252,0.12); }
html.dark tbody tr:hover { background: #1a2129; }
html.dark table { border-color: rgba(240,246,252,0.12); }

/* ============ Button loading & interaction ============ */
@keyframes dsh-spin { to { transform: rotate(360deg); } }

button.is-loading { position: relative; pointer-events: none; opacity: 0.75; }
button.is-loading::before {
  content: "";
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: dsh-spin 0.75s linear infinite;
  flex: none;
}

.primary-button, .secondary-button, .small-button, .ghost-button, .icon-button {
  transition: transform 0.12s ease, background 0.16s ease, border-color 0.16s ease,
    color 0.16s ease, box-shadow 0.16s ease, opacity 0.15s ease;
}
.primary-button:active:not(:disabled), .secondary-button:active:not(:disabled),
.small-button:active:not(:disabled), .ghost-button:active:not(:disabled) {
  transform: scale(0.97);
}
.primary-button:focus-visible, .secondary-button:focus-visible, .small-button:focus-visible,
.ghost-button:focus-visible, .icon-button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* 表格操作按钮 hover 轻抬 */
.small-button:hover { transform: translateY(-1px); }

/* 卡片与行微动效 */
.metric-card, .image-card { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.nav-item { transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease; }
.nav-item:hover { transform: translateX(2px); }

/* 接口密钥表单:名称列固定窄,密钥框自适应 */
.api-key-add { display: flex; gap: 10px; align-items: flex-end; }
.api-key-add label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 11.5px; }
.api-key-add label:first-child { flex: 0 0 160px; }
.api-key-add label:nth-child(2) { flex: 1; }
.api-key-add input { width: 100%; }

/* 面板标题去掉英文 eyebrow 行,只保留中文标题 */
.panel-heading .eyebrow { display: none; }
.panel-heading h3, .panel-heading h4 { margin-top: 0; }

/* ============ layout + dark leakage fixes ============ */
.split-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 14px; align-items: start; }
@media (max-width: 1080px) { .split-grid { grid-template-columns: 1fr; } }

/* 深色下强制纯色背景，杜绝浅色渐变泄漏 */
html.dark body { background: var(--bg); }

/* 图片预览弹窗卡片化，不再空荡 */
.image-preview-dialog {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 0;
  max-width: min(860px, 92vw);
}
.image-preview-dialog .image-preview-wrap { padding: 14px; }
.image-preview-wrap img { width: 100%; max-height: 76vh; object-fit: contain; background: var(--bg); border-radius: 12px; }
.image-preview-meta { border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; }

/* 调用详情弹窗图片区域不再透浅色 */
.call-preview img, .call-preview-empty { background: var(--bg); }

/* 刷新按钮加载时转圈：隐藏原图标，绝对居中 spinner */
.icon-button { position: relative; }
.icon-button.is-loading { color: transparent !important; pointer-events: none; }
.icon-button.is-loading::before {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 15px; height: 15px; margin: -8px 0 0 -8px;
  border: 2px solid var(--primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: dsh-spin 0.7s linear infinite;
}

/* 导入 Cookie 编辑框加大，不再拥挤 */
#import-form textarea[name="cookie"] { min-height: 150px; font-size: 13px; line-height: 1.6; resize: vertical; }

/* 表单标签内输入占满宽度，reCAPTCHA 等不再过短 */
.compact-form label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 11.5px; }
.compact-form label > input, .compact-form label > select, .compact-form label > textarea { width: 100%; }

/* 代理名称、密钥名称列收窄 */
.proxy-add-row label:first-child { flex: 0 0 150px; }
.api-key-add label:first-child { flex-basis: 130px; }

/* 导入 Cookie 文本框比例协调：扁宽、等宽字体 */
#import-form textarea[name="cookie"] {
  min-height: 118px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  padding: 12px 14px;
  border-radius: 10px;
}

/* 密钥行比例：名称列固定窄，密钥值自适应 */
.api-key-row { display: flex; align-items: center; gap: 10px; }
.api-key-name { flex: 0 0 130px; min-width: 0; font-size: 13px; }
.api-key-value { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 12px; background: var(--bg-soft); border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; color: var(--text); }
.api-key-row .small-button { flex: none; }

/* 调用详情弹窗内边距与圆角 */
.call-dialog-panel { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.call-dialog { border-radius: 16px; }
.call-dialog .call-meta { margin-bottom: 2px; }

/* 图片预览弹窗关闭按钮强制右上角 */
.image-preview-dialog .image-preview-close {
  position: absolute; top: 12px; right: 12px; left: auto; bottom: auto;
  z-index: 5;
}

/* 图片预览关闭按钮两种主题都保持深底白字可见 */
.image-preview-dialog .image-preview-close {
  background: rgba(15, 23, 42, 0.8) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

/* 测试弹窗排版统一 */
.test-dialog .panel-heading h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
.test-dialog label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; }
.test-dialog textarea, .test-dialog select { width: 100%; background: var(--bg-soft); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 11px; font-size: 13px; }
.test-dialog .dialog-actions { margin-top: 6px; }
.test-state { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }

/* 测试弹窗主题适配兜底 */
.test-dialog, .call-dialog, .image-preview-dialog { background: var(--card); color: var(--text); }
.test-dialog::backdrop, .call-dialog::backdrop, .image-preview-dialog::backdrop { background: rgba(6, 9, 14, 0.55); }

/* 深色表格分隔线淡雅，不再白色突兀 */
html.dark tbody td { border-bottom: 1px solid rgba(240, 246, 252, 0.08); }
html.dark thead th { border-bottom: 1px solid rgba(240, 246, 252, 0.14); }

/* 深色下统一边框为主题色，杜绝白色边框突兀 */
html.dark .panel, html.dark .metric-card, html.dark .image-card,
html.dark .table-panel, html.dark .filter-panel, html.dark .proxy-profile,
html.dark .api-key-row, html.dark .call-dialog, html.dark .test-dialog,
html.dark .image-preview-dialog, html.dark .segmented,
html.dark input, html.dark select, html.dark textarea,
html.dark .small-button, html.dark .secondary-button, html.dark .ghost-button,
html.dark .icon-button, html.dark .pager-button, html.dark .chip, html.dark .aspect-chip {
  border-color: var(--line-strong) !important;
}

/* Proxy test results */
.proxy-profile-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.proxy-test-result { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--primary); min-height: 14px; }
.proxy-test-result.error { color: var(--coral); }

/* Call retry timeline */
.call-attempts-section { margin-top: 16px; }
.call-attempts { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.attempt-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.attempt-seq { font-family: var(--font-mono); font-size: 11px; color: var(--faint); padding-top: 2px; min-width: 26px; }
.attempt-main { min-width: 0; display: grid; gap: 2px; }
.attempt-main strong { font-size: 12.5px; }
.attempt-main small { color: var(--muted); font-size: 11px; display: block; }
.attempt-main small.err { color: var(--coral); }
.attempt-ok { border-color: rgba(16,185,129,.35); }
.attempt-warn { border-color: rgba(245,158,11,.35); }
.attempt-bad { border-color: rgba(239,68,68,.4); }

/* Metric value acting as a button */
.metric-action { background: none; border: 0; padding: 0; margin: 0; color: inherit; cursor: pointer; text-align: inherit; }
.metric-action:hover { text-decoration: underline; }

/* Image card: thumbnail as a preview button (no new tab), action row */
.image-thumb-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.image-thumb-btn .image-thumb { display: block; width: 100%; }
.image-meta-actions { display: flex; gap: 6px; margin-top: 8px; }
.image-meta-actions .image-open { flex: 1; }

/* ============ 2026 redesign: overview + detail dialogs ============ */

/* KPI cards */
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi-card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 15px 15px 13px; overflow: hidden;
  animation: dsh-rise .4s ease both;
}
.kpi-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--kc, var(--primary)); }
.kpi-k { color: var(--muted); font-size: 11.5px; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.kpi-sw { width: 8px; height: 8px; border-radius: 2px; background: var(--kc, var(--primary)); }
.kpi-v { font-size: 25px; font-weight: 600; letter-spacing: -0.03em; margin-top: 10px; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-d { color: var(--faint); font-size: 11px; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-action { background: none; border: 0; padding: 0; margin: 10px 0 0; color: var(--coral); cursor: pointer; text-align: left; font-size: 25px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-action:hover { text-decoration: underline; }
@keyframes dsh-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* overview lower grid */
.overview-lower { display: grid; grid-template-columns: 320px 1fr; gap: 14px; align-items: start; }
.overview-lower > * { min-width: 0; }

/* pool health */
.pool-bar { display: flex; height: 11px; border-radius: 99px; overflow: hidden; background: var(--line-strong); margin: 16px 0 14px; }
.pool-bar i { display: block; height: 100%; }
.pool-list { display: flex; flex-direction: column; }
.pool-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 2px; border-top: 1px solid var(--line); font-size: 13px; }
.pool-row:first-child { border-top: 0; }
.pool-row span { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.pool-row strong { font-family: var(--font-mono); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pool-row .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }

/* model ranking summary + rows */
.model-summary { display: flex; align-items: center; gap: 22px; padding: 13px 0 15px; border-bottom: 1px solid var(--line); }
.model-summary div { display: grid; gap: 2px; }
.model-summary span { color: var(--faint); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.model-summary strong { font-family: var(--font-mono); font-size: 19px; }
.model-summary .mini-bar { flex: 1; margin: 0; }
.model-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 10px; }
.model-hint { color: var(--faint); font-size: 11px; letter-spacing: 0.08em; }
.sort-group { display: flex; gap: 6px; }
.sort-btn { font-size: 11.5px; font-family: var(--font-mono); color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; cursor: pointer; transition: all .18s ease; }
.sort-btn:hover { color: var(--text); border-color: var(--line-strong); }
.sort-btn.active { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.model-rows { display: flex; flex-direction: column; }
.model-row { display: grid; grid-template-columns: 40px 1.6fr repeat(4, 1fr); gap: 10px; align-items: center; padding: 12px 8px; border-top: 1px solid var(--line); animation: dsh-rise .4s ease both; }
.model-row:hover { background: var(--bg-soft); }
.model-row.model-head { border-top: 0; padding: 4px 8px 10px; color: var(--faint); font-size: 10.5px; font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; animation: none; }
.model-row.model-head span { text-align: right; }
.model-row.model-head span:nth-child(1), .model-row.model-head span:nth-child(2) { text-align: left; }
.model-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.model-name small { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 10.5px; color: var(--faint); }
.rank-badge { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); background: var(--bg-soft); }
.rank-badge.r1 { color: #231505; background: linear-gradient(135deg,#f9dd92,#e4ad3c); border-color: transparent; }
.rank-badge.r2 { color: #10141c; background: linear-gradient(135deg,#eef1f6,#b9c2d0); border-color: transparent; }
.rank-badge.r3 { color: #2a1408; background: linear-gradient(135deg,#f0c49b,#cf8f52); border-color: transparent; }
.mnum { text-align: right; font-family: var(--font-mono); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.mnum.req { font-weight: 600; color: var(--text); }
.mnum.ok { color: var(--success); }
.mnum.fail { color: var(--coral); }
.rate-line { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.rate-pct { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.mbar { width: 78px; height: 6px; border-radius: 99px; background: var(--line-strong); overflow: hidden; }
.mbar i { display: block; height: 100%; border-radius: 99px; background: var(--success); }
.mbar i.warn { background: var(--amber); }
.mbar i.bad { background: var(--coral); }

/* theme toggle svg */
.theme-toggle { position: relative; }
.theme-toggle svg { width: 16px; height: 16px; position: absolute; inset: 0; margin: auto; transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .2s ease; }
.theme-toggle .ico-sun { color: var(--amber); }
.theme-toggle .ico-moon { color: var(--primary); opacity: 0; transform: scale(.5) rotate(-90deg); }
html.dark .theme-toggle .ico-sun { opacity: 0; transform: scale(.5) rotate(90deg); }
html.dark .theme-toggle .ico-moon { opacity: 1; transform: scale(1) rotate(0); }

/* ============ detail dialogs ============ */
.call-dialog { width: min(1120px, 96vw); max-height: 90vh; overflow: hidden; border-radius: 18px; }
.image-preview-dialog { width: min(880px, 94vw); max-height: 90vh; overflow: hidden; border-radius: 18px; }
.modal-panel { display: flex; flex-direction: column; max-height: 90vh; }
.modal-head { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-title { min-width: 0; }
.modal-title h3 { margin: 5px 0 0; font-size: 18px; }
.modal-id { color: var(--faint); font-size: 11px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 99px; font-size: 12px; font-weight: 600; flex: none; }
.status-chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.status-chip.failed { background: var(--coral-soft); color: var(--coral); }
.status-chip.failed .dot { background: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
.status-chip.ok { background: var(--success-soft); color: var(--success); }
.status-chip.ok .dot { background: var(--success); }
.head-actions { display: flex; gap: 8px; flex: none; margin-left: auto; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: all .18s ease; }
.icon-btn:hover { color: var(--primary); border-color: var(--primary); }
.icon-btn.danger:hover { color: var(--coral); border-color: var(--coral); }
.icon-btn svg { width: 15px; height: 15px; }
.modal-body { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 0; }
.modal-img { position: relative; background: #0c1016; display: grid; place-items: center; min-height: 440px; overflow: hidden; }
.modal-img-checker { position: absolute; inset: 0; background-image: linear-gradient(45deg,rgba(255,255,255,.035) 25%,transparent 25%,transparent 75%,rgba(255,255,255,.035) 75%),linear-gradient(45deg,rgba(255,255,255,.035) 25%,transparent 25%,transparent 75%,rgba(255,255,255,.035) 75%); background-size: 22px 22px; background-position: 0 0, 11px 11px; }
.modal-img-frame { position: relative; z-index: 1; width: 100%; height: 100%; display: grid; place-items: center; padding: 18px; }
.modal-img-frame img { display: block; max-width: 100%; max-height: 62vh; object-fit: contain; border-radius: 8px; box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.modal-img-empty { color: #9aa6b8; text-align: center; margin: 0; font-size: 13px; }
.img-badge { position: absolute; left: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; background: rgba(8,11,16,.75); border: 1px solid rgba(255,255,255,.14); color: #cbd5e1; border-radius: 9px; padding: 5px 10px; font-family: var(--font-mono); font-size: 11px; }
.modal-info { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; border-left: 1px solid var(--line); }
.sec { display: flex; flex-direction: column; gap: 8px; }
.sec-title { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-family: var(--font-mono); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 9px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 12px; font-weight: 500; }
.chip .tick { width: 8px; height: 8px; border-radius: 2px; background: var(--primary); }
.chip.mono { font-family: var(--font-mono); font-size: 11.5px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.kv .item { border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; background: var(--bg-soft); min-width: 0; }
.kv .item.full { grid-column: 1 / -1; }
.kv .k { color: var(--faint); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; font-family: var(--font-mono); }
.kv .v { margin-top: 3px; font-size: 12.5px; font-weight: 500; word-break: break-word; }
.kv .v.mono { font-family: var(--font-mono); font-size: 12px; }
.prompt-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12px; line-height: 1.7; color: var(--muted); white-space: pre-wrap; word-break: break-word; max-height: 108px; overflow: auto; margin: 0; }
.timeline { position: relative; display: flex; flex-direction: column; gap: 12px; padding-left: 17px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line-strong); border-radius: 2px; }
.tl-item { position: relative; }
.tl-item::before { content: ""; position: absolute; left: -17px; top: 5px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--card); background: var(--faint); }
.tl-item.ok::before { background: var(--success); }
.tl-item.warn::before { background: var(--amber); }
.tl-item.bad::before { background: var(--coral); }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-head .seq { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--primary); }
.tl-head .who { font-weight: 600; font-size: 12.5px; }
.tl-head .meta { color: var(--faint); font-size: 11px; font-family: var(--font-mono); }
.kind { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 600; font-family: var(--font-mono); }
.kind.warn { background: var(--amber-soft); color: var(--amber); }
.kind.bad { background: var(--coral-soft); color: var(--coral); }
.kind.ok { background: var(--success-soft); color: var(--success); }
.tl-err { margin: 5px 0 0; font-size: 11.5px; color: var(--muted); font-family: var(--font-mono); line-height: 1.6; word-break: break-word; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.modal-foot .note { color: var(--faint); font-size: 11px; font-family: var(--font-mono); }
.actions { display: flex; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--muted); transition: all .18s ease; }
.btn:hover { border-color: var(--line-strong); color: var(--text); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { color: #fff; filter: brightness(1.06); }

@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .overview-lower { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .modal-body { grid-template-columns: 1fr; }
  .modal-img { min-height: 260px; }
  .modal-info { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-v { font-size: 21px; }
  .model-rows { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .model-row { min-width: 520px; grid-template-columns: 30px minmax(200px, 1.4fr) repeat(2,1fr); grid-template-areas: "rank name req ok" "rank name fail rate"; }
  .model-row.model-head { display: none; }
  .model-row .rank-badge { grid-area: rank; }
  .model-row .model-name { grid-area: name; max-width: none; overflow: visible; text-overflow: clip; }
  .model-row .mnum.req { grid-area: req; }
  .model-row .mnum.ok { grid-area: ok; }
  .model-row .mnum.fail { grid-area: fail; padding-top: 6px; }
  .model-row .rate-line { grid-area: rate; padding-top: 6px; }
  .mbar { width: 56px; }
}

/* 模型排行失败数可点击跳转失败明细 */
.mnum-btn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--coral); font-family: var(--font-mono); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.mnum-btn:hover { text-decoration: underline; }

/* 图片资产明细列表（行式台账） */
.asset-ledger { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.asset-row { display: grid; grid-template-columns: 56px 1.5fr 1fr 90px 110px 150px; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.asset-row:first-child { border-top: 0; }
.asset-row:hover { background: var(--bg-soft); }
.asset-thumb { width: 56px; height: 56px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); cursor: pointer; padding: 0; }
.asset-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-cell { min-width: 0; }
.asset-title { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-desc { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.asset-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.asset-tag { padding: 3px 8px; border-radius: 6px; font-size: 10.5px; font-family: var(--font-mono); background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); }
.asset-size { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.asset-time { font-size: 12px; color: var(--faint); text-align: right; white-space: nowrap; }
.asset-actions { display: flex; gap: 6px; justify-content: flex-end; }
.asset-open { display: inline-flex; align-items: center; padding: 6px 11px; border-radius: 8px; font-size: 11.5px; font-weight: 600; cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--muted); transition: all .16s ease; white-space: nowrap; }
.asset-open:hover { border-color: var(--primary); color: var(--primary); }
.asset-open:first-child { background: var(--primary); border-color: var(--primary); color: #fff; }
.asset-open:first-child:hover { color: #fff; filter: brightness(1.06); }

@media (max-width: 900px) {
  .asset-row { grid-template-columns: 48px 1.4fr 1fr 90px; grid-template-areas: "thumb model tags size" "thumb model time actions"; }
  .asset-thumb { grid-area: thumb; width: 48px; height: 48px; }
  .asset-model { grid-area: model; }
  .asset-tags { grid-area: tags; }
  .asset-size { grid-area: size; text-align: right; }
  .asset-time { grid-area: time; text-align: left; }
  .asset-actions { grid-area: actions; }
  .asset-desc { display: none; }
}
@media (max-width: 560px) {
  .asset-row { grid-template-columns: 44px 1fr auto; grid-template-areas: "thumb model actions" "thumb tags tags" "thumb time time"; }
  .asset-thumb { grid-area: thumb; width: 44px; height: 44px; }
  .asset-size { display: none; }
}

/* 图片预览弹框：提示词框放大，占满信息区剩余空间 */
.image-preview-dialog .modal-info { min-height: 440px; }
.image-preview-dialog .sec:last-child { flex: 1; display: flex; flex-direction: column; }
.image-preview-dialog .prompt-box { max-height: none; min-height: 220px; flex: 1; }

/* 提示词一键复制按钮 */
.copy-mini { background: none; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-size: 10.5px; color: var(--muted); cursor: pointer; font-family: inherit; letter-spacing: 0; text-transform: none; }
.copy-mini:hover { color: var(--primary); border-color: var(--primary); }

/* 调用明细错误信息单行截断，避免长文本撑破表格 */
.call-error { display: block; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--coral); font-size: 11px; }

/* 调用详情错误字段单行省略 */
.err-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; color: var(--coral); }

/* 调用明细提示词列限宽单行省略，避免长文本撑破表格 */
.call-prompt { max-width: 320px; }
.call-prompt-open { display: block; width: 100%; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 调用明细表格紧凑排版：单行不换行，模型/参数完整，账号/状态/提示词截断 */
#calls-body td { padding: 7px 12px; font-size: 12.5px; white-space: nowrap; }
#calls-body td strong, #calls-body td small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 100%; }
#calls-body td:nth-child(3) { min-width: 170px; max-width: 250px; }
#calls-body td:nth-child(5) { max-width: 210px; }
#calls-body td:nth-child(6) { max-width: 220px; }
#calls-body td:last-child { white-space: nowrap; max-width: 300px; }
#calls-body .call-prompt-open { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#calls-body .call-error { max-width: 100%; }

/* 调用详情弹框：状态标签移入图片区，生成中为蓝色 */
.status-chip.pending { background: var(--info-soft); color: var(--info); }
.status-chip.pending .dot { background: var(--info); box-shadow: 0 0 0 3px var(--info-soft); }
.img-status { position: absolute; top: 12px; left: 12px; z-index: 2; }

/* 图片灯箱：独立放大缩小视图 */
.image-lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; background: rgba(4,8,16,.88); border: 0; padding: 0; overflow: hidden; }
.image-lightbox::backdrop { background: rgba(4,8,16,.88); }
.lightbox-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; z-index: 3; }
.lightbox-zoom { display: flex; align-items: center; gap: 8px; }
.lightbox-bar .icon-btn { background: rgba(15,23,42,.72); border-color: rgba(255,255,255,.22); color: #e5edf5; width: 34px; height: 34px; }
.lightbox-bar .icon-btn:hover { color: #fff; border-color: var(--primary); }
.lightbox-level { color: #cbd5e1; font-size: 12px; min-width: 46px; text-align: center; }
.lightbox-stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; cursor: grab; touch-action: none; transform: translateZ(0); will-change: transform; }
.lightbox-stage.dragging { cursor: grabbing; }
.lightbox-stage img { max-width: 92vw; max-height: 86vh; object-fit: contain; transform-origin: center center; user-select: none; -webkit-user-drag: none; will-change: transform; backface-visibility: hidden; }

/* 缩略图 hover 显示放大镜，点击直接进入灯箱 */
.call-thumb { cursor: zoom-in; }
.asset-thumb { cursor: zoom-in; }

/* Account network operations use the existing console tokens and table rhythm. */
.network-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:20px 0; }
.network-tabs button { padding:10px 18px; border:1px solid var(--line); border-radius:10px; background:var(--card); color:var(--muted); cursor:pointer; }
.network-tabs button.active { color:var(--blue); border-color:var(--blue); }
[data-view="network"] .panel { margin-bottom:20px; }
.network-subline { display:block; font-size:12px; color:var(--muted); margin-top:6px; overflow-wrap:anywhere; }
.network-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:18px 0; }
.network-toolbar label { display:flex; flex-direction:column; align-items:flex-start; gap:8px; color:var(--muted); }
.network-toolbar input, .network-toolbar select { max-width:320px; }
.table-scroll .network-policy-table { min-width:780px; width:100%; table-layout:fixed; }
.network-policy-table th:first-child { width:30%; }
.network-policy-table td { vertical-align:top; }
.network-policy-table select, .network-policy-table input, .network-toolbar input, .network-toolbar select {
  width:100%; min-height:40px; padding:8px 10px; border:1px solid var(--line-strong); border-radius:8px; background:var(--bg-soft); color:var(--text); font:inherit; font-size:14px;
}
.network-policy-table :is(input,select):focus-visible, .network-toolbar :is(input,select):focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
.network-policy-table .network-policy-category th { width:auto; padding:12px 20px; background:var(--bg-soft); color:var(--text); font-size:14px; letter-spacing:normal; text-align:left; }
.network-policy-table [data-route-note] { display:block; padding-top:9px; color:var(--muted); font-size:14px; }
.network-operation-details { margin-top:8px; font-size:12px; color:var(--muted); }
.network-operation-details code { display:block; padding-top:8px; overflow-wrap:anywhere; }
.network-route-limits summary, .network-operation-details summary { cursor:pointer; width:fit-content; }
.network-route-limits summary { color:var(--primary); padding:9px 0; font-size:14px; }
.network-route-limits label { display:flex; flex-direction:column; gap:6px; margin-top:10px; color:var(--muted); font-size:14px; }
.network-routing-mode { margin:12px 0 20px; color:var(--text); font-size:14px; line-height:1.7; max-width:85ch; }
.network-policy-actions h3 { margin-top:0; }
.network-policy-actions p { color:var(--text); font-size:14px; margin:8px 0; }
.network-policy-actions .network-toolbar { padding-bottom:0; align-items:flex-end; }
.network-policy-actions .network-toolbar label { flex:1; min-width:220px; }
.network-inventory-table { min-width:1000px; }
.network-inventory-table td { vertical-align:top; }
.network-inventory-table .network-diagnostic { max-width:250px; white-space:normal; overflow-wrap:anywhere; }
.network-proxy-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; min-width:145px; }
[data-view="network"] .network-subline, [data-view="network"] .panel-footnote { color:var(--muted); font-size:14px; }
[data-view="network"] .network-subline.form-error { color:var(--coral); }
#network-preview:empty { display:none; }
.network-checks { display:flex; flex-wrap:wrap; gap:12px; }
.network-checks label { display:flex; flex-direction:row; align-items:center; gap:8px; }
.network-checks input, #network-maintenance input, #network-accounts-body input[type="checkbox"] { width:16px; height:16px; accent-color:var(--blue); }
.network-message { padding:12px 16px; border:1px solid var(--line); border-radius:10px; overflow-wrap:anywhere; }
.network-members { white-space:pre-wrap; overflow-wrap:anywhere; max-height:240px; overflow:auto; margin:20px; }
@media (max-width:760px) { .network-toolbar label { width:100%; } .network-toolbar input, .network-toolbar select { width:100%; } }
@media (max-width:760px) {
  .table-scroll .network-policy-table, .network-policy-table tbody { display:block; min-width:0; width:100%; }
  .network-policy-table thead { display:none; }
  .network-policy-table tr[data-policy-op] { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:14px; padding:18px 12px; border-bottom:1px solid var(--line); }
  .network-policy-table tr[data-policy-op] td { display:block; padding:0; border:0; min-width:0; }
  .network-policy-table td:first-child, .network-policy-table td:last-child { grid-column:1 / -1; }
  .network-policy-table tr[data-policy-op] td:nth-child(2)::before, .network-policy-table tr[data-policy-op] td:nth-child(3)::before { display:block; margin-bottom:6px; color:var(--muted); font-size:14px; }
  .network-policy-table tr[data-policy-op] td:nth-child(2)::before { content:"出口方式"; }
  .network-policy-table tr[data-policy-op] td:nth-child(3)::before { content:"代理目标"; }
  .network-policy-table .network-policy-category { display:block; }
  .network-policy-table .network-policy-category th { display:block; padding:12px; }
  .network-policy-table input, .network-policy-table select, .network-toolbar input { font-size:16px; }
}
