:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #fff;
  --surface-blue: #f5f9ff;
  --text: #172033;
  --muted: #68758a;
  --line: #e2e8f2;
  --line-strong: #cbd5e1;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eaf2ff;
  --success: #059669;
  --success-soft: #ecfdf5;
  --warning: #b7791f;
  --warning-soft: #fff8e6;
  --danger: #dc2626;
  --danger-soft: #fff1f2;
  --shadow: 0 12px 36px rgba(39, 64, 112, .08);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: 24px; letter-spacing: -.4px; }
h2 { margin-bottom: 4px; font-size: 17px; }
h3 { font-size: 14px; }
.muted { color: var(--muted); }
.eyebrow, .section-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 15% 12%, rgba(59, 130, 246, .15), transparent 30%),
    radial-gradient(circle at 85% 80%, rgba(147, 197, 253, .18), transparent 28%),
    linear-gradient(145deg, #f7faff 0%, #edf4ff 100%);
}
.login-card {
  width: min(430px, 100%);
  padding: 42px;
  border: 1px solid rgba(191, 219, 254, .9);
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 28px 70px rgba(37, 99, 235, .14);
}
.login-logo { width: 150px; height: 42px; object-fit: contain; object-position: left; margin-bottom: 24px; }
.login-card h1 { font-size: 28px; }
.login-card > .muted { line-height: 1.7; margin-bottom: 24px; }
.login-mfa-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 12px;
  margin: 8px 0 4px;
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
}
.login-mfa-step .security-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}
.login-mfa-step strong { display: block; margin-bottom: 3px; }
.login-mfa-step p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.login-mfa-step label, .login-mfa-step .text-button { grid-column: 1 / -1; }
.login-mfa-step input { font-size: 22px; font-weight: 750; letter-spacing: 8px; text-align: center; }
.login-card label, .dialog-form label, .drawer label {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  color: #46536a;
  font-size: 13px;
  font-weight: 650;
}

input, select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: var(--text);
  transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
.form-error { min-height: 18px; margin: 8px 0; color: var(--danger); font-size: 12px; }
.wide { width: 100%; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 218px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 15px 16px;
  border-right: 1px solid var(--line);
  background: #fff;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 24px; }
.brand img { width: 91px; height: 34px; object-fit: contain; object-position: left; }
.brand div { display: none; }
.brand strong { display: block; font-size: 18px; }
.brand span { color: var(--muted); font-size: 11px; }
.nav { display: grid; gap: 5px; }
.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 7px;
  min-height: 43px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #566278;
  text-align: left;
}
.nav-item i { font-style: normal; color: #94a3b8; font-size: 16px; text-align: center; }
.nav-item span { font-weight: 650; }
.nav-item:hover { background: #f6f8fc; color: var(--text); }
.nav-item.is-active { background: var(--primary-soft); color: var(--primary-dark); }
.nav-item.is-active i { color: var(--primary); }
.nav-item b {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  text-align: center;
}
.sidebar-note {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding: 13px;
  border: 1px solid #dbeafe;
  border-radius: 11px;
  background: var(--surface-blue);
}
.sidebar-note span, .sidebar-note small, .sidebar-foot span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.sidebar-note strong { color: var(--primary-dark); font-size: 12px; }
.sidebar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 7px 2px;
  border-top: 1px solid var(--line);
}
.sidebar-foot div { display: grid; gap: 2px; min-width: 0; }
.sidebar-foot strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
.text-button { padding: 0; border: 0; background: none; color: var(--primary); }
.text-button:hover { text-decoration: underline; }

.main { min-width: 0; padding: 0 28px 40px; }
.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 86px;
  padding: 17px 0;
  border-bottom: 1px solid rgba(226, 232, 240, .85);
  background: rgba(245, 247, 251, .92);
  backdrop-filter: blur(12px);
}
.topbar p { margin-bottom: 0; color: var(--muted); }
.top-actions, .button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.btn {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-weight: 650;
}
.btn:hover:not(:disabled) { border-color: #93c5fd; color: var(--primary-dark); }
.btn-primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { border-color: var(--primary-dark); background: var(--primary-dark); color: #fff; }
.btn-danger { border-color: #fecaca; color: var(--danger); }
.connection-pill, .status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}
.connection-pill i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; }
.connection-pill.connected { border-color: #a7f3d0; background: var(--success-soft); color: #047857; }
.connection-pill.connected i { background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .12); }

.panel { display: none; padding-top: 24px; }
.panel.is-active { display: block; }
.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 13px; margin-bottom: 16px; }
.stat-card {
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(30, 64, 175, .035);
}
.stat-card span { display: block; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; margin-bottom: 6px; font-size: 24px; letter-spacing: -.3px; }
.stat-card small { color: var(--muted); }
.stat-card.accent { border-color: #bfdbfe; background: linear-gradient(135deg, #eff6ff, #fff); }
.stat-card.warning { border-color: #fde68a; background: #fffdf5; }
.section-block, .scan-card, .selected-summary {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(30, 64, 175, .03);
}
.hero-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  overflow: hidden;
  padding: 25px;
  border-color: #bfdbfe;
  background: linear-gradient(120deg, #edf5ff 0%, #fff 58%, #f8fbff 100%);
}
.hero-block > div:first-child { max-width: 590px; }
.hero-block h2 { font-size: 22px; }
.hero-block p { margin: 10px 0 0; color: #536178; line-height: 1.75; }
.flow { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.flow span { padding: 9px 11px; border: 1px solid #bfdbfe; border-radius: 8px; background: #fff; color: var(--primary-dark); font-size: 12px; font-weight: 700; }
.flow i { color: #60a5fa; font-style: normal; }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(340px, .8fr); gap: 16px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.section-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  color: #7a879a;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
}
td { padding: 12px 11px; border-bottom: 1px solid #edf1f6; color: #344056; vertical-align: middle; }
tbody tr:hover { background: #f8fbff; }
tbody tr:last-child td { border-bottom: 0; }
.text-end { text-align: right; }
.amount { color: var(--text); font-weight: 750; text-align: right; }
.amount small { color: var(--muted); font-weight: 400; }
.cell-main { display: block; color: var(--text); font-weight: 650; }
.cell-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.empty { padding: 32px; color: var(--muted); text-align: center; }
.status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 14px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}
.status.auto, .status.assigned { background: var(--success-soft); color: #047857; }
.status.pending { background: var(--warning-soft); color: #9a6700; }
.status.manual { background: var(--primary-soft); color: var(--primary-dark); }
.status.conflict { background: var(--danger-soft); color: var(--danger); }
.status.no-stats, .status.avoided { background: #f1f5f9; color: #64748b; }
.timeline { display: grid; gap: 13px; }
.timeline-item { position: relative; padding-left: 20px; }
.timeline-item::before { content: ""; position: absolute; left: 2px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: #60a5fa; box-shadow: 0 0 0 4px #eff6ff; }
.timeline-item strong { display: block; margin-bottom: 3px; font-size: 12px; }
.timeline-item span { color: var(--muted); font-size: 11px; line-height: 1.5; }

.toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.toolbar label { display: grid; gap: 6px; min-width: 145px; color: #667085; font-size: 11px; }
.toolbar input, .toolbar select { min-height: 38px; }
.search-field { flex: 1; min-width: 260px !important; }
.search-field > div { display: flex; gap: 7px; }
.search-field input { min-width: 170px; }
.filters.compact { margin: -3px -3px 14px; padding: 3px; border: 0; }
.filter-quick-actions { display: flex; align-items: center; gap: 10px; min-height: 38px; }
.registration-summary {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 14px;
  padding: 11px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #475569;
  font-size: 12px;
}
.registration-summary strong { color: #1d4ed8; font-size: 20px; }
.registration-summary small { color: var(--muted); }
.selected-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 58px; border-color: var(--line); background: var(--surface); }
.node-finance-summary { color: #0f766e; font-size: 13px; font-weight: 700; }
.node-downline-finance-summary { color: #2563eb; font-size: 13px; font-weight: 700; }
.member-cell { display: grid; gap: 3px; }
.copy-chip {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f6f8fb;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  cursor: copy;
}
.copy-chip:hover { border-color: var(--primary); color: var(--primary); }
.tree-legend { display: flex; gap: 18px; margin: 0 0 10px 4px; color: var(--muted); font-size: 11px; }
.tree-legend span { display: flex; align-items: center; gap: 6px; }
.tree-legend i { width: 12px; height: 8px; border: 1px solid; border-radius: 3px; }
.tree-legend .group { border-color: #60a5fa; background: #eff6ff; }
.tree-legend .staff { border-color: #2dd4bf; background: #f0fdfa; }
.tree-legend .member { border-color: #cbd5e1; background: #fff; }
.tree-stage {
  height: clamp(520px, calc(100vh - 240px), 760px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 12px;
}
#tree-svg { display: block; max-width: none; }
.tree-link { fill: none; stroke: #cfd8e6; stroke-width: 1.5; }
.tree-link.active { stroke: var(--primary); }
.tree-node rect { fill: #fff; stroke: #cbd5e1; stroke-width: 1.2; }
.tree-node.role-line_group rect { fill: #eff6ff; stroke: #93c5fd; }
.tree-node.role-line_staff rect { fill: #f0fdf4; stroke: #86efac; }
.tree-node.selected rect { stroke: var(--primary); stroke-width: 2.2; }
.tree-node text { fill: var(--text); font-size: 12px; font-weight: 600; pointer-events: none; }
.tree-node .meta { fill: var(--muted); font-size: 11px; font-weight: 400; }
.tree-node .finance { fill: #0f766e; font-size: 10px; font-weight: 600; }
.tree-node .downline-finance { fill: #2563eb; font-size: 10px; font-weight: 600; }
.tree-node:not(.role-line_group):not(.role-line_staff) { cursor: copy; }
.member-account-link {
  display: inline-block;
  margin-top: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  text-align: left;
}
.member-account-link:hover { text-decoration: underline; }

.scan-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-color: #dbeafe; background: var(--surface-blue); }
.scan-card .scan-main { display: flex; align-items: center; gap: 12px; }
.scan-card .scan-dot { width: 12px; height: 12px; border-radius: 50%; background: #94a3b8; }
.scan-card .scan-dot.connected { background: #10b981; box-shadow: 0 0 0 5px rgba(16,185,129,.12); }
.scan-card p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.scan-metrics { display: flex; gap: 24px; }
.scan-metrics span { display: grid; gap: 3px; color: var(--muted); font-size: 10px; }
.scan-metrics strong { color: var(--text); font-size: 13px; }
.pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; color: var(--muted); font-size: 12px; }
.pagination div { display: flex; gap: 7px; }
.settings-grid { grid-template-columns: 1fr 1fr; }
.security-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-color: #bfdbfe; background: linear-gradient(120deg, #eff6ff, #fff); }
.security-hero p { margin: 8px 0 0; color: var(--muted); line-height: 1.65; }
.security-state {
  min-width: 148px;
  padding: 15px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 750;
  text-align: center;
}
.security-grid { grid-template-columns: 1fr 1fr; }
.security-actions { margin-top: 15px; }
.qr-shell {
  display: grid;
  width: 304px;
  max-width: 100%;
  margin: 0 auto 16px;
  padding: 12px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}
.qr-shell img { display: block; width: 280px; max-width: 100%; aspect-ratio: 1; }
.setup-key {
  width: 100%;
  display: grid;
  gap: 6px;
  margin: 14px 0;
  padding: 13px;
  border: 1px dashed #93c5fd;
  border-radius: 10px;
  background: #eff6ff;
  color: var(--text);
  text-align: left;
}
.setup-key span, .setup-key small { color: var(--muted); font-size: 11px; }
.setup-key strong { overflow-wrap: anywhere; color: var(--primary-dark); font-family: Consolas, monospace; letter-spacing: 1px; }
.key-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 15px 0; }
.key-values div { padding: 11px; border-radius: 8px; background: #f8fafc; }
.key-values span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; }
.key-values strong { font-size: 12px; }
.rule-list { display: grid; gap: 10px; }
.rule-list p { display: grid; grid-template-columns: 95px 1fr; gap: 10px; margin: 0; line-height: 1.55; }
.rule-list span { color: var(--muted); font-size: 12px; }
.management-grid { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(420px, 1.3fr); gap: 18px; }
.setting-list { display: grid; gap: 7px; max-height: 560px; overflow: auto; }
.setting-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; }
.setting-item.off { opacity: .55; }
.setting-item strong, .setting-item span { display: block; }
.setting-item span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.setting-item button { border: 0; background: transparent; color: var(--primary); }

.drawer-backdrop { position: fixed; z-index: 30; inset: 0; background: rgba(15, 23, 42, .3); backdrop-filter: blur(2px); }
.drawer {
  position: fixed;
  z-index: 31;
  top: 0;
  right: 0;
  width: min(600px, 94vw);
  height: 100vh;
  overflow: auto;
  transform: translateX(102%);
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -24px 0 70px rgba(15, 23, 42, .16);
  transition: transform .22s ease;
}
.drawer.open { transform: translateX(0); }
.drawer > header { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.drawer-body { padding: 20px 22px 40px; }
.icon-button { width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); font-size: 20px; }
.detail-status { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 18px; }
.detail-grid div { padding: 12px; border-radius: 8px; background: #f8fafc; }
.detail-grid span, .detail-grid strong { display: block; }
.detail-grid span { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.detail-section { margin: 18px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.route { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.route span { padding: 6px 9px; border-radius: 6px; background: var(--primary-soft); color: var(--primary-dark); font-size: 11px; }
.route i { color: #94a3b8; font-style: normal; }
.notice, .code-box { padding: 11px; border-radius: 8px; background: #f8fafc; color: #536178; font-size: 12px; line-height: 1.65; }
.code-box { overflow: auto; white-space: pre-wrap; word-break: break-all; font-family: Consolas, monospace; }
.audit { display: grid; gap: 3px; margin: 9px 0; padding: 10px; border-left: 3px solid #93c5fd; background: #f8fbff; }
.audit span { color: var(--muted); font-size: 11px; }
.resolve-form { padding: 15px; border: 1px solid #bfdbfe; border-radius: 10px; background: var(--surface-blue); }
.checkbox { display: flex !important; grid-template-columns: 18px 1fr; align-items: center; }
.checkbox input { width: 16px; min-height: auto; }

dialog { width: min(520px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 30px 90px rgba(15,23,42,.25); }
dialog::backdrop { background: rgba(15, 23, 42, .38); backdrop-filter: blur(2px); }
.dialog-form { padding: 20px; }
.dialog-form header, .dialog-form footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-form header { margin-bottom: 16px; }
.dialog-form footer { justify-content: flex-end; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); }
.captcha-row { display: grid; grid-template-columns: 1fr 135px; gap: 8px; }
.captcha-button { overflow: hidden; min-height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.captcha-button img { width: 100%; height: 38px; object-fit: contain; }
.toast { position: fixed; z-index: 50; right: 24px; bottom: 24px; max-width: 380px; padding: 12px 16px; border-radius: 9px; background: #172033; color: #fff; box-shadow: var(--shadow); }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .split-grid { grid-template-columns: 1fr; }
  .hero-block { align-items: flex-start; flex-direction: column; }
  .management-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; width: 100%; height: auto; padding: 12px; }
  .brand { padding-bottom: 10px; }
  .nav { display: flex; overflow: auto; }
  .nav-item { flex: 0 0 auto; grid-template-columns: 20px auto auto; }
  .sidebar-note, .sidebar-foot { display: none; }
  .main { padding: 0 14px 28px; }
  .topbar { position: static; align-items: flex-start; flex-direction: column; padding: 16px 0; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { align-items: stretch; flex-direction: column; width: 100%; }
  .flow i { display: none; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar label { width: 100%; }
  .key-values { grid-template-columns: 1fr; }
  .security-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { padding: 28px 22px; }
  .detail-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; }
  .scan-card { align-items: flex-start; flex-direction: column; }
  .scan-metrics { flex-wrap: wrap; }
  .security-hero { align-items: flex-start; flex-direction: column; }
  .security-state { width: 100%; }
}
