:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #142033;
  --text-soft: #344054;
  --muted: #667085;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --accent: #3157d5;
  --accent-dark: #2445b8;
  --accent-soft: #eef2ff;
  --success: #087443;
  --success-soft: #ecfdf3;
  --warning: #b54708;
  --warning-soft: #fffaeb;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --info: #175cd3;
  --info-soft: #eff8ff;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.1);
  --radius: 14px;
  --radius-sm: 9px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 8% -10%, rgba(49, 87, 213, 0.09), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
code { background: #f2f4f7; border: 1px solid #eaecf0; border-radius: 5px; padding: 1px 5px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 1.9rem; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 8px; }
h2 { font-size: 1.1rem; line-height: 1.35; margin-bottom: 6px; }
[hidden] { display: none !important; }

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 66px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; color: var(--text); }
.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #1b2f8a, #3157d5);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  box-shadow: 0 4px 12px rgba(49, 87, 213, 0.24);
  flex: 0 0 auto;
}
.brand-mark.large { width: 48px; height: 48px; border-radius: 14px; font-size: 24px; }
.brand-text { display: flex; flex-direction: column; font-weight: 700; letter-spacing: 0.06em; line-height: 1.1; }
.brand-text small { font-size: 8px; font-weight: 600; letter-spacing: 0.16em; color: var(--muted); margin-top: 3px; }
.mainnav { display: flex; gap: 4px; flex: 1; }
.mainnav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 8px;
}
.mainnav a:hover { color: var(--text); background: #f2f4f7; text-decoration: none; }
.mainnav a.active { color: var(--accent); background: var(--accent-soft); }
.userbox { display: flex; align-items: center; gap: 9px; }
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef2ff;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-meta strong { font-size: 0.82rem; font-weight: 600; }
.user-meta small { font-size: 0.68rem; color: var(--muted); }
.link-button {
  border: 0;
  background: none;
  padding: 4px;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.link-button:hover { color: var(--danger); }

/* Layout */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 34px 24px 56px; flex: 1; }
.footer { border-top: 1px solid var(--border); background: rgba(255, 255, 255, 0.6); }
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-head.compact { margin-bottom: 18px; }
.page-head h1 { margin-bottom: 5px; }
.page-head .muted { max-width: 720px; margin-bottom: 0; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.title-row h1 { margin-bottom: 0; }
.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.hint { color: var(--muted); font-size: 0.78rem; margin: 8px 0 0; }
.dot { margin: 0 7px; color: #98a2b3; }
.nowrap { white-space: nowrap; }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.slug-line { margin: 2px 0 6px; color: var(--muted); }
.slug-line code { background: #fff; }

/* Alerts */
.alert {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 0.9rem;
  background: var(--surface);
}
.alert a { font-weight: 600; }
.alert-success { background: var(--success-soft); border-color: #abefc6; color: #05603a; }
.alert-error { background: var(--danger-soft); border-color: #fecdca; color: #912018; }
.alert-warning { background: var(--warning-soft); border-color: #fedf89; color: #93370d; }
.alert-info { background: var(--info-soft); border-color: #b2ddff; color: #1849a9; }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.87rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}
.button:hover { background: #f9fafb; text-decoration: none; color: var(--text); }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 5px rgba(49, 87, 213, 0.2); }
.button.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.button.success { background: var(--success); border-color: var(--success); color: #fff; }
.button.success:hover { background: #05603a; color: #fff; }
.button.secondary { background: var(--accent-soft); border-color: #c7d2fe; color: var(--accent); }
.button.secondary:hover { background: #e0e7ff; color: var(--accent-dark); }
.button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.button.ghost:hover { background: #f2f4f7; color: var(--text); }
.button.danger-outline { color: var(--danger); border-color: #fda29b; background: #fff; }
.button.danger-outline:hover { background: var(--danger-soft); color: #912018; }
.button.small { min-height: 30px; padding: 5px 9px; font-size: 0.78rem; border-radius: 7px; }
.button.block { width: 100%; }
.inline-form { display: inline-flex; align-items: center; gap: 5px; margin: 0; }

/* Forms */
.stack-form { display: flex; flex-direction: column; gap: 15px; }
.grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.grid-form .form-actions { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--text-soft); }
label small { font-weight: 400; color: var(--muted); line-height: 1.5; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 9px 11px;
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus {
  border-color: #7f9cf5;
  box-shadow: 0 0 0 3px rgba(49, 87, 213, 0.12);
}
input::placeholder, textarea::placeholder { color: #98a2b3; }
.form-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.compact-form { gap: 10px; }
.checkbox-line { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 500; color: var(--text-soft); font-size: 0.82rem; }
.checkbox-line input { width: auto; margin-top: 3px; }
.select-small { width: auto; min-width: 96px; padding: 4px 7px; font-size: 0.78rem; }

/* Cards / panels */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}
.panel.narrow { max-width: 620px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-head h2 { margin-bottom: 2px; }
.panel-head p { margin-bottom: 0; }
.details-panel summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--text);
  list-style: none;
}
.details-panel summary::-webkit-details-marker { display: none; }
.details-panel summary::before { content: "▸"; display: inline-block; margin-right: 7px; color: var(--muted); transition: transform 0.15s; }
.details-panel[open] summary::before { transform: rotate(90deg); }
.details-panel > form { margin-top: 18px; }
.prose { color: var(--text-soft); font-size: 0.9rem; }
.prose p:last-child { margin-bottom: 0; }

/* Stats & grids */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.stat-card span { color: var(--muted); font-size: 0.78rem; }
.stat-card strong { font-size: 1.6rem; line-height: 1.15; letter-spacing: -0.03em; }

.site-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.site-list-head,
.site-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) minmax(120px, 1fr) 150px minmax(200px, 1.6fr) 160px;
  gap: 16px;
  align-items: center;
  padding: 13px 18px;
}
.site-list-head {
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}
.site-row { border-bottom: 1px solid var(--border); }
.site-row:last-child { border-bottom: 0; }
.site-row:hover { background: var(--surface-soft); }
.site-name { color: var(--text); font-weight: 600; }
.site-name:hover { color: var(--accent); text-decoration: none; }
.site-sub { display: flex; align-items: center; gap: 6px; margin-top: 3px; flex-wrap: wrap; color: var(--muted); font-size: 0.76rem; }
.site-sub code { font-size: 0.74rem; }
.site-cell-url a { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.site-cell-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.count-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid #fedf89;
  white-space: nowrap;
}
.meta-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
}
.meta-grid > div { background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.meta-grid span { color: var(--muted); font-size: 0.72rem; }
.meta-grid strong { font-size: 0.84rem; font-weight: 600; word-break: break-word; }

/* Pending panel */
.pending-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-left: 3px solid #f79009; }
.pending-panel p { margin: 5px 0 0; }
.pending-panel .status-badge { margin-right: 7px; }

/* Upload */
.upload-area { margin-top: 2px; }
.drop-zone {
  border: 1.5px dashed #b9c0cc;
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone strong { font-size: 0.95rem; }
.drop-zone span { color: var(--muted); font-size: 0.8rem; max-width: 600px; }
.drop-icon { font-size: 24px; color: var(--accent); line-height: 1; }
.file-summary {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  padding: 12px 14px;
  font-size: 0.82rem;
}
.file-summary .summary-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.file-summary ul { margin: 0; padding-left: 18px; color: var(--muted); max-height: 150px; overflow: auto; }
.file-summary li { margin: 1px 0; }
.upload-actions { display: flex; align-items: center; gap: 12px; margin-top: 13px; flex-wrap: wrap; }
.upload-actions .hint { margin: 0; }
.progress {
  position: relative;
  height: 24px;
  margin-top: 14px;
  border-radius: 999px;
  background: #eef2f6;
  overflow: hidden;
}
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, #3157d5, #6d8cff); transition: width 0.2s ease; }
.progress-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f2f4f7;
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 650;
  white-space: nowrap;
  line-height: 1.55;
}
.status-active, .status-passed, .status-approved { background: var(--success-soft); border-color: #abefc6; color: #05603a; }
.status-disabled, .status-rejected, .status-failed { background: var(--danger-soft); border-color: #fecdca; color: #912018; }
.status-draft, .status-pending, .status-superseded { background: #f2f4f7; border-color: #e4e7ec; color: #475467; }
.status-scanning { background: var(--info-soft); border-color: #b2ddff; color: #1849a9; }
.status-error { background: var(--warning-soft); border-color: #fedf89; color: #93370d; }
.tag {
  display: inline-flex;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 650;
  border: 1px solid var(--border);
  background: #f2f4f7;
  color: var(--muted);
  vertical-align: 1px;
}
.tag-green { background: var(--success-soft); color: var(--success); border-color: #abefc6; }
.tag-blue { background: var(--info-soft); color: var(--info); border-color: #b2ddff; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.data-table th {
  text-align: left;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: #fcfcfd; }
.data-table tr.active-row td { background: #f6fef9; }
.actions-cell { white-space: nowrap; text-align: right; }
.actions-cell .button { margin-left: 4px; }
.findings-table .path-cell { max-width: 280px; word-break: break-all; }
.rule-id { background: #f8fafc; color: #475467; font-size: 0.72rem; }
.evidence { display: inline-block; max-width: 300px; overflow-wrap: anywhere; color: #475467; background: #f8fafc; font-size: 0.72rem; }
.users-table td { vertical-align: top; }
.user-actions { min-width: 250px; }
.password-reset input { width: 120px; padding: 5px 7px; font-size: 0.78rem; }
.user-edit { margin-top: 6px; }
.user-edit summary { cursor: pointer; font-size: 0.76rem; color: var(--accent); }
.user-edit-form { display: grid; gap: 6px; margin-top: 8px; max-width: 220px; }
.user-edit-form label { display: grid; gap: 2px; font-size: 0.74rem; }
.user-edit-form input { width: 100%; padding: 4px 6px; font-size: 0.78rem; }
.json-pre { margin: 6px 0 0; padding: 8px; background: #f8fafc; border-radius: 6px; max-width: 360px; white-space: pre-wrap; word-break: break-word; font-size: 0.72rem; }

/* Severity */
.sev {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.7rem;
  font-weight: 650;
  white-space: nowrap;
  margin-right: 3px;
}
.sev-critical { background: #fef3f2; color: #912018; border: 1px solid #fecdca; }
.sev-high { background: #fff4ed; color: #b93815; border: 1px solid #f9dbaf; }
.sev-medium { background: var(--warning-soft); color: #93370d; border: 1px solid #fedf89; }
.sev-low { background: #f8fafc; color: #475467; border: 1px solid #e4e7ec; }
.sev-info { background: var(--info-soft); color: #1849a9; border: 1px solid #b2ddff; }

/* Scan summary */
.scan-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.scan-count {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.scan-count span { font-size: 0.72rem; color: var(--muted); }
.scan-count strong { font-size: 1.3rem; line-height: 1.2; }
.scan-count.sev-critical strong { color: var(--danger); }
.scan-count.sev-high strong { color: #b93815; }
.scan-count.sev-medium strong { color: var(--warning); }
.scan-count.sev-low strong { color: var(--text-soft); }
.scan-count.sev-info strong { color: var(--info); }

/* Admin */
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.subtabs a {
  padding: 9px 13px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 550;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.subtabs a:hover { color: var(--text); text-decoration: none; }
.subtabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.admin-action-panel { border-left: 3px solid var(--accent); }
.admin-action-grid { display: grid; grid-template-columns: 1fr 1.3fr 0.8fr; gap: 20px; align-items: start; }
.admin-action-grid > form { border-right: 1px solid var(--border); padding-right: 20px; }
.admin-action-grid > form:last-child { border-right: 0; padding-right: 0; }

/* Auth */
.auth-shell { max-width: 440px; margin: 6vh auto 4vh; }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 30px;
}
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-brand .brand-mark { margin-bottom: 13px; }
.auth-brand h1 { font-size: 1.55rem; }
.auth-brand p { color: var(--muted); font-size: 0.84rem; margin-bottom: 0; }
.auth-card .hint { text-align: center; margin-top: 16px; }
.divider { display: flex; align-items: center; gap: 10px; color: #98a2b3; font-size: 0.74rem; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.error-shell { max-width: 520px; margin: 8vh auto; }
.error-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 36px;
  text-align: center;
}
.error-code { font-size: 3.4rem; font-weight: 800; line-height: 1; color: var(--accent); margin-bottom: 12px; letter-spacing: -0.05em; }
.error-card p { color: var(--muted); }
.error-card .button { margin-top: 8px; }

/* Empty states */
.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 46px 24px;
  text-align: center;
}
.empty-icon { font-size: 30px; color: #98a2b3; margin-bottom: 8px; }
.empty-state p { color: var(--muted); margin-bottom: 17px; }
.empty-inline { padding: 20px; text-align: center; color: var(--muted); background: var(--surface-soft); border-radius: 8px; font-size: 0.86rem; }
.success-empty { background: var(--success-soft); color: #05603a; }

/* Misc */
@media (max-width: 980px) {
  .site-list-head,
  .site-row { grid-template-columns: minmax(160px, 1.4fr) minmax(110px, 1fr) 130px minmax(160px, 1.2fr) 140px; gap: 12px; }
  .meta-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-action-grid { grid-template-columns: 1fr; }
  .admin-action-grid > form { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--border); padding-bottom: 18px; }
  .admin-action-grid > form:last-child { border-bottom: 0; padding-bottom: 0; }
}
@media (max-width: 760px) {
  .topbar-inner { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .mainnav { order: 3; width: 100%; overflow-x: auto; }
  .userbox { margin-left: auto; }
  .container { padding: 24px 16px 40px; }
  .page-head { flex-direction: column; gap: 13px; }
  .head-actions { justify-content: flex-start; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-list-head { display: none; }
  .site-row { grid-template-columns: 1fr; gap: 6px; align-items: start; }
  .site-cell[data-label]::before {
    content: attr(data-label) "：";
    color: var(--muted);
    font-size: 0.74rem;
  }
  .site-cell-url { white-space: normal; word-break: break-all; }
  .site-cell-url a { white-space: normal; }
  .site-cell-actions { justify-content: flex-start; }
  .meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scan-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .scan-count { padding: 8px; }
  .scan-count strong { font-size: 1.1rem; }
  .grid-form { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .pending-panel { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 1.55rem; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .meta-grid { grid-template-columns: 1fr; }
  .scan-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-card, .error-card { padding: 22px; }
  .user-meta { display: none; }
}
