:root {
  --bg: #eaf4fb;
  --paper: #ffffff;
  --line: #d3e4f1;
  --ink: #16324a;
  --muted: #6d8498;
  --accent: #3d96cc;
  --accent-2: #2778b0;
  --soft: #f3f8fd;
  --ok: #17b77e;
  --warn: #d89a2b;
  --bad: #d15b5b;
  --shadow: 0 10px 28px rgba(22, 50, 74, .06);
  --r: 14px;
  --shell: 1680px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-2); text-decoration: none; }
input[type="checkbox"], input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-2);
}

.shell {
  width: min(100%, var(--shell));
  margin: 0 auto;
  padding: 18px 20px 56px;
}
.shell-admin { --shell: 1280px; }

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 20px; height: 20px; border-radius: 6px;
  background: linear-gradient(135deg, #7ec8ee, #2b7eb3);
  box-shadow: 0 0 0 3px rgba(74, 163, 216, .16);
}
.brand strong { font-size: 16px; letter-spacing: -.2px; }
.live-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.pill {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pill b { color: var(--ink); font-size: 14px; }
.entry-mini { display: flex; gap: 8px; }
.entry-ico {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  color: #6d8498;
}
.entry-ico:hover { color: var(--accent-2); border-color: #b9d6ea; }

.rate-stack { margin-bottom: 14px; }
.status-card {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.status-card + .status-card { margin-top: 10px; }
.metric { display: flex; align-items: center; gap: 8px; min-width: 148px; flex: 0 0 auto; }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(23, 183, 126, .12);
}
.metric-value {
  font-size: 20px; font-weight: 800; letter-spacing: -.35px; color: #050b14; white-space: nowrap;
}
.metric-label { color: var(--muted); font-size: 13px; white-space: nowrap; }
.divider { width: 1px; height: 32px; background: #e7ebf0; flex: 0 0 auto; }
.sparkline { flex: 0 0 120px; width: 120px; height: 32px; }
.sparkline svg { width: 100%; height: 100%; overflow: visible; }
.insight { min-width: 220px; flex: 1 1 auto; overflow: hidden; }
.insight-title {
  font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.insight-sub {
  margin-top: 3px; font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.range {
  display: flex; align-items: center; gap: 2px; padding: 3px;
  background: #f4f6f9; border-radius: 12px; flex: 0 0 auto;
}
.range button {
  border: 0; height: 30px; min-width: 36px; padding: 0 10px; border-radius: 9px;
  background: transparent; color: #7f8999; font-size: 12px; font-weight: 700; cursor: pointer;
}
.range button.active { color: #111827; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .08); }
.footnote {
  margin-top: 8px; display: flex; justify-content: flex-end; gap: 14px;
  color: #a9b2c0; font-size: 12px;
}
.footnote .recorded::before {
  content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 6px;
  vertical-align: 1px; border-radius: 50%; background: #c8d0db;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px 18px 18px;
  margin-bottom: 14px;
}
.card-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-hd h2 { margin: 0; font-size: 16px; }
.muted { color: var(--muted); font-size: 13px; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 180px; }
.cdk-row { align-items: center; }
.cdk-quota {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: #e8eef3;
  border: 1px solid #d5e0ea;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.cdk-quota-label {
  font-size: 12px;
  font-weight: 700;
  color: #7a93a8;
}
.cdk-quota strong {
  font-size: 16px;
  font-weight: 800;
  color: #8aa0b3;
  letter-spacing: -.3px;
}
.cdk-quota.is-ok {
  background: #143f6b;
  border-color: #143f6b;
}
.cdk-quota.is-ok .cdk-quota-label { color: #b9d4ee; }
.cdk-quota.is-ok strong { color: #fff; }
.cdk-quota.is-bad {
  background: #fdecec;
  border-color: #f0c2c2;
}
.cdk-quota.is-bad .cdk-quota-label { color: #b24141; }
.cdk-quota.is-bad strong { color: #b24141; font-size: 14px; }

.input, .area, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.input:focus, .area:focus, select:focus { border-color: #9ccceb; box-shadow: 0 0 0 3px rgba(74, 163, 216, .12); }
.area { min-height: 120px; resize: vertical; }
.input.sm, .cell-in {
  height: 36px;
  padding: 0 10px;
  font-size: 14px;
  border-radius: 8px;
}

.btn {
  height: 36px; padding: 0 16px; border: 0; border-radius: 10px;
  background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--accent-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost {
  background: var(--soft); color: var(--ink); border: 1px solid var(--line);
}
.btn-ghost:hover { background: #eaf4fb; }
.btn-orange {
  background: #e67a28;
  color: #fff;
}
.btn-orange:hover { background: #c86416; }
.btn-orange:disabled { opacity: .45; color: #fff; }
.btn.xs { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.file-btn { display: inline-flex; align-items: center; }

.tabs {
  display: flex; gap: 6px; margin: 4px 0 14px;
  background: #dceaf5; padding: 5px; border-radius: 12px;
}
.tab {
  flex: 1; height: 38px; border: 0; border-radius: 9px;
  background: transparent; color: #5d7589; font-size: 14px; font-weight: 700; cursor: pointer;
}
.tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(22, 50, 74, .08); }
.hidden { display: none !important; }

.mode-panel {
  margin: 14px 0 4px;
  padding: 14px;
  background: var(--soft);
  border: 1px solid #d5e6f3;
  border-radius: 12px;
}
.mode-hd { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.mode-card {
  display: block;
  cursor: pointer;
  margin: 0;
}
.mode-card > input { position: absolute; opacity: 0; pointer-events: none; }
.mode-card-body {
  height: 100%;
  padding: 14px 16px;
  border: 2px solid #d5e6f3;
  border-radius: 12px;
  background: #fff;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.mode-on {
  display: none;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}
.mode-card:has(input:checked) .mode-card-body {
  border-color: #163f66;
  background: #1a4f80;
  color: #fff;
  box-shadow: 0 8px 20px rgba(16, 52, 86, .22);
}
.mode-card:has(input:checked) .mode-card-name,
.mode-card:has(input:checked) .mode-card-desc {
  color: #fff;
}
.mode-card:has(input:checked) .mode-on {
  display: inline-block;
  background: #fff;
  color: #1a4f80;
}
.mode-card:has(input:checked) .mode-locks span,
.mode-card:has(input:checked) .mode-locks-muted span {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}
.mode-card.mode-special:has(input:checked) .mode-card-body {
  border-color: #0d4a45;
  background: #14635c;
  box-shadow: 0 8px 20px rgba(12, 64, 59, .22);
}
.mode-card.mode-special:has(input:checked) .mode-on {
  color: #14635c;
}
.mode-card-name { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.mode-locks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.mode-locks span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 6px;
  border-radius: 8px;
  background: #e8f3fb;
  color: #2b5f82;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.mode-locks-muted span {
  background: #f1f5f8;
  color: #7a8ea0;
  font-weight: 600;
}
.mode-card-desc { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.custom-only {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
  align-items: end;
}
.choice { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #35556d; }
.sel { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.sel select {
  height: 40px;
  line-height: 40px;
  padding: 0 12px;
  display: block;
}
.confirm-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.confirm-row .muted.ok { color: #12845b; }

.table-actions { display: flex; align-items: center; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td {
  padding: 10px 10px;
  border-bottom: 1px solid #edf3f8;
  text-align: left;
  vertical-align: middle;
}
th { color: #6d8296; font-weight: 700; background: #f7fbfe; font-size: 12px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.chk { width: 36px; }
.col-seq { width: 52px; white-space: nowrap; }
.col-status { min-width: 92px; white-space: nowrap; }
.col-country { min-width: 108px; }
.email {
  min-width: 168px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.url {
  min-width: 200px;
  max-width: 280px;
  white-space: normal;
  word-break: break-all;
  line-height: 1.35;
  color: #3f6078;
  font-size: 12px;
}
.empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 14px; }

.st {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.st-idle { background: #eef3f7; color: #6b7f91; }
.st-queue { background: #fff4d8; color: #9a6d12; }
.st-run { background: #e3f2ff; color: #1e6ea3; }
.st-ok { background: #e4f8ef; color: #12845b; }
.st-bad { background: #fdecec; color: #b24141; }
.st-exp { background: #f3e8ea; color: #9a4a56; }

.result-bar {
  margin-bottom: 10px; padding: 10px 12px; border-radius: 10px;
  background: #e8f7ef; color: #146b4a; font-size: 14px; font-weight: 700;
}
.result-bar.fail { background: #fdecec; color: #a13b3b; }

.cell-stack { display: flex; gap: 6px; align-items: center; }
.cell-stack .cell-in { width: 200px; min-width: 200px; }
.cell-stack.otp .cell-in { width: 96px; min-width: 96px; }
.col-phone { min-width: 220px; }
.col-otp { min-width: 168px; }
.col-change { min-width: 236px; }
.gen-grid {
  display: grid;
  grid-template-columns: 140px 160px 1fr auto;
  gap: 10px;
  align-items: end;
}
.seed-grid {
  display: grid;
  grid-template-columns: 180px 180px auto;
  gap: 12px;
  align-items: end;
  max-width: 560px;
}
.seed-grid .btn { height: 40px; }
.last-gen {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
}
.last-gen textarea {
  min-height: 90px;
  margin: 8px 0;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
}
.hint-row { display: block; margin-top: 4px; color: #b45309; font-size: 12px; max-width: 200px; white-space: normal; }
.disabled-look, .cell-in:disabled { background: #f1f5f8; color: #9aaabb; }
.country-select { min-width: 118px; height: 36px; }

.announce-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.announce {
  padding: 10px 12px; border-radius: 10px; font-size: 13px; border: 1px solid var(--line); background: #fff;
}
.announce-title { display: block; font-weight: 800; margin-bottom: 4px; }
.announce-body { white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
.announce.warn { background: #fff7e8; border-color: #f0ddb0; }
.tip-banner {
  margin-bottom: 12px; padding: 10px 12px; border-radius: 10px;
  background: #e8f3fb; color: #35556d; font-size: 13px; border: 1px solid #cfe3f1;
  white-space: pre-wrap; word-break: break-word; line-height: 1.55;
}

.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 23, 42, .28);
  backdrop-filter: blur(5px);
}
.guide-overlay.hidden { display: none; }
.guide-modal {
  width: min(100%, 580px);
  max-height: min(90vh, 800px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e8edf3;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 22px 64px rgba(15, 23, 42, .12);
}
.guide-header {
  flex: 0 0 auto;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #eef1f5;
}
.guide-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.guide-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}
.guide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16b77f;
  box-shadow: 0 0 0 3px rgba(22, 183, 127, .12);
}
.guide-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 9px;
  background: #f4f6f9;
  color: #7b8493;
  font-size: 12px;
  font-weight: 700;
}
.guide-timer strong { color: #111827; }
.guide-header h1 {
  margin: 10px 0 6px;
  font-size: 22px;
  line-height: 1.25;
}
.guide-header p {
  margin: 0;
  color: #8b95a7;
  font-size: 13px;
  line-height: 1.6;
}
.guide-content {
  min-height: 0;
  overflow: auto;
  padding: 14px 18px 16px;
}
.guide-label {
  margin: 8px 2px 8px;
  color: #8b95a7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}
.guide-alert {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #f4d9de;
  border-radius: 13px;
  background: #fff3f5;
}
.guide-alert-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #fff;
  color: #d9485f;
  font-size: 15px;
  font-weight: 800;
  border: 1px solid #f3dfe3;
}
.guide-alert b { display: block; margin-bottom: 4px; color: #8d293d; font-size: 14px; }
.guide-alert p { margin: 0; color: #a34b5c; font-size: 13px; line-height: 1.55; }
.guide-rules {
  overflow: hidden;
  border: 1px solid #e8edf3;
  border-radius: 14px;
  background: #fff;
}
.guide-rule {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid #f0f2f5;
}
.guide-rule:last-child { border-bottom: 0; }
.guide-no {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #e4e9ef;
  border-radius: 7px;
  background: #fafbfc;
  color: #697586;
  font-size: 11px;
  font-weight: 800;
}
.guide-rule-title { margin: 0 0 4px; font-size: 14px; font-weight: 800; }
.guide-rule-text { margin: 0; color: #5e6979; font-size: 13px; line-height: 1.6; }
.guide-rule-text strong { color: #202938; }
.guide-fees {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.guide-fee {
  padding: 12px;
  border: 1px solid #e8edf3;
  border-radius: 13px;
  background: #fafbfc;
}
.guide-fee-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
}
.guide-badge {
  height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
}
.guide-badge.ok { background: #effaf6; color: #13845f; }
.guide-badge.info { background: #f2f6ff; color: #456db8; }
.guide-fee-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  color: #727c8b;
  font-size: 13px;
}
.guide-fee-line + .guide-fee-line { border-top: 1px dashed #e7ebf0; }
.guide-fee-line strong { color: #111827; }
.guide-fee-note { margin-top: 6px; color: #98a2b3; font-size: 12px; line-height: 1.5; }
.guide-causes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.guide-cause {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 52px;
  padding: 10px;
  border: 1px solid #f0e4cd;
  border-radius: 11px;
  background: #fff8eb;
  color: #8b641d;
  font-size: 13px;
  line-height: 1.5;
}
.guide-cause-num {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 6px;
  background: #fff;
  color: #d97706;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid #f2e5cf;
}
.guide-buy {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dcefe7;
  border-radius: 13px;
  background: #f7fcfa;
}
.guide-buy-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #effaf6;
  color: #16b77f;
  font-weight: 800;
}
.guide-buy-body { min-width: 0; flex: 1; }
.guide-buy-title { margin: 0 0 3px; color: #2d5749; font-size: 14px; font-weight: 800; }
.guide-buy-body span {
  display: block;
  color: #168f66;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.guide-buy-open { color: #168f66; font-size: 13px; font-weight: 800; }
.guide-footer {
  position: relative;
  padding: 14px 18px 16px;
  border-top: 1px solid #eef1f5;
}
.guide-progress-track {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #eef2f5;
}
.guide-progress { width: 0; height: 100%; background: #16b77f; }
.guide-footer-row { display: flex; align-items: center; gap: 12px; }
.guide-read { flex: 1; min-width: 0; }
.guide-read-title { color: #6f7a8b; font-size: 13px; }
.guide-read-title.ready { color: #168f66; font-weight: 800; }
.guide-read-sub { margin-top: 3px; color: #a4adba; font-size: 12px; }
.guide-confirm {
  height: 38px;
  min-width: 128px;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 800;
}
.guide-confirm:disabled { color: #9fa8b4; background: #edf0f4; cursor: not-allowed; }
.guide-confirm:not(:disabled) {
  color: #fff;
  background: #111827;
  cursor: pointer;
}

@media (max-width: 560px) {
  .guide-fees, .guide-causes { grid-template-columns: 1fr; }
  .guide-footer-row { flex-direction: column; align-items: stretch; }
  .guide-confirm { width: 100%; }
}

.toast-wrap { position: fixed; right: 16px; top: 16px; z-index: 40; display: flex; flex-direction: column; gap: 6px; }
.toast {
  min-width: 200px; max-width: 320px; padding: 10px 12px; border-radius: 10px;
  background: #16324a; color: #fff; font-size: 13px; box-shadow: var(--shadow);
}

.admin-nav {
  display: flex; gap: 4px; overflow: auto; margin-bottom: 12px;
  background: #dceaf5; padding: 5px; border-radius: 12px;
}
.admin-nav a {
  flex: 0 0 auto; height: 34px; padding: 0 12px; border-radius: 8px;
  display: inline-flex; align-items: center; color: #5d7589; font-size: 13px; font-weight: 700;
}
.admin-nav a.active { background: #fff; color: var(--ink); }
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi {
  padding: 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line);
}
.kpi b { display: block; font-size: 20px; letter-spacing: -.4px; }
.kpi span { color: var(--muted); font-size: 12px; }
.login-box { max-width: 360px; margin: 64px auto; }

@media (max-width: 1100px) {
  .url { max-width: 240px; }
  .cell-stack .cell-in { width: 148px; min-width: 148px; }
  .mode-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sparkline, .divider { display: none; }
  .mode-grid, .custom-only, .gen-grid, .seed-grid { grid-template-columns: 1fr; }
  .status-card { gap: 10px; }
  .insight { min-width: 0; }
  .metric { min-width: auto; }
}
@media (max-width: 640px) {
  .status-card {
    height: auto; min-height: 62px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px;
  }
  .insight { order: 3; flex-basis: 100%; padding-left: 18px; }
  .range { margin-left: auto; }
  .footnote { display: none; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}
