:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --line: #e5eaf1;
  --line-strong: #cfd8e3;
  --ink: #0f1b3d;
  --ink-2: #5a6782;
  --ink-3: #8a97ad;
  --accent: #1b91ff;
  --accent-soft: #e8f3ff;
  --good: #16a34a;
  --good-soft: #e8f7ee;
  --warn: #d97706;
  --warn-soft: #fdf3e3;
  --bad: #dc2626;
  --bad-soft: #fdecec;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 27, 61, .04), 0 8px 24px -16px rgba(15, 27, 61, .18);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.5 Inter, -apple-system, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button { font: inherit; }

/* ---------- shell ---------- */
.shell {
  display: grid;
  /* Sidebar grows a little on very wide screens so it doesn't look stranded. */
  grid-template-columns: clamp(232px, 15vw, 300px) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 9px; padding: 0 8px; font-weight: 700; font-size: 17px; }
.brand .mark {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--accent), #22c9f5); color: #fff; font-size: 14px;
}
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-3); padding: 0 8px; margin-bottom: 6px; font-weight: 600;
}
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px;
  color: var(--ink-2); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav .ico { width: 16px; text-align: center; opacity: .85; }

.side-foot { margin-top: auto; font-size: 12px; color: var(--ink-3); padding: 0 8px; }
.side-stat {
  background: linear-gradient(160deg, var(--accent), #2ea4ff);
  color: #fff; border-radius: var(--radius); padding: 14px;
}
.side-stat b { display: block; font-size: 24px; line-height: 1.1; }
.side-stat span { font-size: 12px; opacity: .9; }

/* ---------- page ---------- */
/* Fluid on purpose — no max-width. On a 4K display a centred 1240px column leaves three
   quarters of the screen empty. Padding scales with viewport instead. */
.main { padding: clamp(24px, 2.2vw, 48px) clamp(20px, 2.6vw, 64px) 80px; width: 100%; min-width: 0; }
h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 14px; }
.sub { color: var(--ink-2); margin: 0 0 24px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px;
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.card-head h2 { margin: 0; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: 1fr 1fr; } }
/* 4K: nudge type up so a full-width layout stays readable at arm's length. */
@media (min-width: 2000px) { body { font-size: 15px; } .stat .value { font-size: 32px; } }
@media (max-width: 780px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; } }

.stat .label { font-size: 12px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat .value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ---------- controls ---------- */
.input, .select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: 9px; background: #fff; color: var(--ink); outline: none;
}
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(27,145,255,.15); }
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 10px 16px; border-radius: 9px; border: 1px solid transparent;
  background: var(--accent); color: #fff; font-weight: 600; cursor: pointer;
}
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.ghost { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn.ghost:hover { background: var(--bg); }
.btn.danger { background: var(--bad); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; min-height: 26px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 10px;
  background: var(--accent-soft); color: var(--accent); border-radius: 20px;
  font-size: 13px; font-weight: 600;
}
.chip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0; opacity: .6; }
.chip button:hover { opacity: 1; }

.suggest { position: relative; }
.suggest-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: var(--shadow); max-height: 260px; overflow: auto; padding: 4px;
}
.suggest-list div { padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.suggest-list div:hover, .suggest-list div.on { background: var(--accent-soft); color: var(--accent); }

.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--ink-2); font-weight: 600; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* ---------- map ---------- */
.map-wrap { position: relative; }
/* Cap the height so a full-width map on a 4K monitor doesn't push everything else
   below the fold — it stays centred instead of ballooning. */
.usmap { width: 100%; height: auto; display: block; max-height: 58vh; margin: 0 auto; }
.usmap path {
  fill: #e9eef5; stroke: #fff; stroke-width: 1; cursor: pointer;
  transition: fill .12s ease;
}
.usmap path:hover { fill: #cfe4fb; }
/* Selection must survive a coverage gradient. An inline fill (the gradient) beats this
   rule's colour, so the outline is what actually marks a state as picked — the solid
   fill only shows through on states with no coverage to display. */
.usmap path.sel { fill: var(--accent); stroke: var(--ink); stroke-width: 2.5; }
.usmap.readonly path { cursor: default; }
.usmap.readonly path:hover { filter: brightness(.96); }
.map-tip {
  position: absolute; pointer-events: none; background: var(--ink); color: #fff;
  padding: 5px 9px; border-radius: 7px; font-size: 12px; font-weight: 600;
  transform: translate(-50%, -140%); white-space: nowrap; opacity: 0; transition: opacity .1s;
}

/* ---------- table ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-3); font-weight: 600; padding: 0 10px 8px; border-bottom: 1px solid var(--line);
}
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.pill { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.pill.done { background: var(--good-soft); color: var(--good); }
.pill.partial { background: var(--warn-soft); color: var(--warn); }
.pill.running { background: var(--accent-soft); color: var(--accent); }
.pill.failed, .pill.stopped { background: var(--bad-soft); color: var(--bad); }
.pill.queued { background: var(--bg); color: var(--ink-2); }

/* ---------- leads page ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head h1 { margin: 0; }

.leads-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.leads-bar .input { max-width: 420px; }
.leads-bar .seg { margin-left: auto; }

.job {
  position: relative;
  display: grid;
  /* Fixed, not auto: every card is its own grid, so `auto` sized each row to its own
     content and the badge / numbers / buttons landed at a different x on every card.
     Fixed widths make the whole list line up as columns. */
  grid-template-columns: 92px minmax(0, 1fr) 148px 240px 284px;
  align-items: center; gap: 18px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; margin-bottom: 12px;
}
@media (max-width: 1150px) {
  .job { grid-template-columns: 60px minmax(0,1fr); }
  .job .badge, .job-figures, .job-actions { grid-column: 2; justify-self: start; }
}

.job .badge { justify-self: start; align-self: center; }
.job-status { text-align: center; }
.job-icon {
  display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 6px;
  border-radius: 50%; font-size: 17px; font-weight: 700;
}
.job-icon.done    { background: var(--good-soft); color: var(--good); }
.job-icon.partial { background: var(--warn-soft); color: var(--warn); }
.job-icon.running { background: var(--accent-soft); color: var(--accent); animation: spin 1.6s linear infinite; }
.job-icon.queued  { background: var(--bg); color: var(--ink-3); }
.job-icon.stopped,
.job-icon.failed  { background: var(--bad-soft); color: var(--bad); }
@keyframes spin { to { transform: rotate(360deg); } }

.job-status-label { font-size: 12px; font-weight: 700; text-transform: capitalize; }
.job-status-label.done { color: var(--good); }
.job-status-label.partial { color: var(--warn); }
.job-status-label.running { color: var(--accent); }
.job-status-label.stopped, .job-status-label.failed { color: var(--bad); }
.job-status-label.queued { color: var(--ink-3); }

.job-title { font-weight: 600; font-size: 15px; }
.job-sub { color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.job-note { color: var(--good); font-size: 12.5px; margin-top: 6px; max-width: 70ch; line-height: 1.5; }
.job-note.bad { color: var(--bad); }

.badge {
  background: var(--accent-soft); color: var(--accent);
  padding: 5px 11px; border-radius: 7px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
}

.job-count { text-align: right; }
.job-count b { display: block; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.job-count span { font-size: 12px; color: var(--ink-3); }

.job-actions { display: flex; gap: 8px; white-space: nowrap; justify-content: flex-end; }

/* ---------- misc ---------- */
.bar { height: 8px; background: var(--bg); border-radius: 20px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 20px; transition: width .3s ease; }
.rowbar { height: 6px; background: var(--bg); border-radius: 20px; overflow: hidden; min-width: 60px; }
.rowbar > i { display: block; height: 100%; background: var(--accent); }

.log {
  background: #0f1b3d; color: #cbd7ea; border-radius: 10px; padding: 12px 14px;
  font: 12px/1.6 ui-monospace, "Cascadia Code", Menlo, monospace;
  max-height: 220px; overflow: auto; white-space: pre-wrap;
}
.empty { text-align: center; color: var(--ink-3); padding: 40px 20px; }
.empty b { display: block; color: var(--ink-2); margin-bottom: 4px; }

.banner { border-radius: 10px; padding: 12px 14px; font-weight: 500; margin-bottom: 16px; }
.banner.warn { background: var(--warn-soft); color: #92510a; border: 1px solid #f3d9ac; }
.banner.bad { background: var(--bad-soft); color: #991b1b; border: 1px solid #f3c0c0; }
.banner.ok { background: var(--good-soft); color: #14532d; border: 1px solid #b7e4c7; }

.kv { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--ink-2); }
.kv b { font-variant-numeric: tabular-nums; }
code { background: var(--bg); padding: 2px 6px; border-radius: 5px; font-size: 12px; }
.spark { display: block; width: 100%; height: 60px; }

/* ---------------------------------------------------------------- cost estimate */
/* Sits directly above "Start scrape" so the price is the last thing read before
   committing. Scoped under .est so it can't leak into the other cards. */
.est { margin-top: 12px; }
.est-empty {
  margin: 0; padding: 12px; font-size: 13px; color: var(--ink-3);
  background: var(--bg); border: 1px dashed var(--line-strong); border-radius: 10px;
}
.est-box {
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--bg); padding: 12px 14px;
}
.est-head { display: flex; align-items: baseline; justify-content: space-between; }
.est-label { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.est-total { font-size: 26px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.est-range { font-size: 12px; color: var(--ink-3); text-align: right; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.est-free { font-size: 26px; font-weight: 700; color: var(--good); }

.est-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--ink-2); padding: 5px 0;
  border-top: 1px solid var(--line);
}
.est-row b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.est-row.est-leads b { color: var(--good); }
.est-dim { color: var(--ink-3); font-weight: 400; font-size: 12px; }

.est-split {
  display: flex; justify-content: space-between; gap: 8px;
  margin-top: 10px; font-size: 12px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.est-note { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-3); }
.est-note b { color: var(--ink-2); }

/* ---------------------------------------------------------------- state picker */
/* Searchable checkbox list above the map. Both edit the same selection, so either
   surface can drive it. Scoped under .state-* so it can't leak into other cards. */
/* Floats over the map instead of pushing it down — the card keeps its height whether
   the list is open or shut. Sits inside .suggest, which supplies the positioning. */
.state-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}
.state-list[hidden] { display: none; }
.state-row {
  display: grid;
  grid-template-columns: 18px 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.state-row:last-child { border-bottom: 0; }
.state-row:hover { background: var(--bg); }
.state-row.on { background: var(--accent-soft); }
.state-row input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; margin: 0; }
.state-code { font-weight: 700; color: var(--ink-3); font-size: 12px; letter-spacing: .03em; }
.state-row.on .state-code { color: var(--accent); }
.state-name { color: var(--ink); }
.state-zips { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.state-empty { padding: 14px 12px; font-size: 13px; color: var(--ink-3); }

/* ---------------------------------------------------------------- spend cap */
.cap-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; font-size: 13px; color: var(--ink-2);
}
.cap-input { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 13px; }
.cap-input input {
  width: 110px; padding: 7px 9px; border: 1px solid var(--line-strong);
  border-radius: 8px; font: inherit; color: var(--ink); background: #fff;
  font-variant-numeric: tabular-nums;
}
.cap-input input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(27,145,255,.15); }
.cap-hint { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-3); }

.spend-meter {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 9px 12px; margin-bottom: 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px;
  font-size: 13px; color: var(--ink-2);
}
.spend-meter b { color: var(--ink); font-variant-numeric: tabular-nums; font-size: 15px; }

/* ---------------------------------------------------------------- coverage by niche */
/* Each niche is a <details>. Collapsed by default so the page opens as a short list of
   niches rather than a wall of every state you have ever touched. */
.cov-niche { border-top: 1px solid var(--line); }
.cov-niche:first-of-type { border-top: 0; }

.cov-head {
  display: flex; align-items: baseline; gap: 10px;
  padding: 12px 4px; cursor: pointer; list-style: none;
  border-radius: 8px;
}
.cov-head::-webkit-details-marker { display: none; }
.cov-head:hover { background: var(--bg); }
.cov-head b { font-size: 15px; }
.cov-caret {
  color: var(--ink-3); font-size: 11px; width: 12px; flex: none;
  transition: transform .12s ease; display: inline-block;
}
.cov-niche[open] .cov-caret { transform: rotate(90deg); }
.cov-meta {
  margin-left: auto; text-align: right;
  font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.cov-meta b { font-size: 12px; color: var(--ink-2); }
.cov-meta b.cov-left { color: var(--good); }
.cov-meta b.cov-warn { color: var(--warn); }

/* Wide table, so it scrolls inside its own box instead of stretching the page. */
.cov-table-wrap { overflow-x: auto; padding: 0 4px 14px; }
.cov-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cov-table th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-3); font-weight: 600; padding: 0 10px 7px; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.cov-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cov-table tr:last-child td { border-bottom: 0; }
.cov-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cov-table td.cov-left { color: var(--good); font-weight: 600; }
.cov-zero { color: var(--line-strong); }

.cov-bar { height: 4px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 4px; min-width: 64px; }
.cov-bar i { display: block; height: 100%; background: var(--accent); }

.cov-pill {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.cov-pill.maxed   { background: var(--bad-soft);    color: var(--bad); }
.cov-pill.harvest { background: var(--good-soft);   color: var(--good); }
.cov-pill.partial { background: var(--accent-soft); color: var(--accent); }
.cov-pill.stale   { background: var(--warn-soft);   color: var(--warn); }

.job-of { color: var(--ink-3); font-weight: 600; font-size: 14px; }
.job-note.warn { color: var(--warn); }
.est-fits { margin: 8px 0 0; font-size: 12px; color: var(--good); }
.est-short { margin: 8px 0 0; font-size: 12px; color: var(--bad); line-height: 1.5; }
.est-short b { color: var(--bad); }


/* ---------------------------------------------------------------- coverage map */
.cov-mapbar { display: flex; align-items: center; gap: 14px; }
.cov-select { width: auto; min-width: 190px; padding: 7px 10px; font-size: 13px; }
.cov-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
/* Mirrors the map fill: solid below the level, empty above. */
.cov-key {
  width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line-strong);
  background: linear-gradient(to top, var(--accent) 0 45%, #e9eef5 45% 100%);
}
.cov-maphint { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); text-align: center; }
@media (max-width: 780px) { .cov-mapbar { flex-direction: column; align-items: flex-end; gap: 6px; } }

/* A scrape that has been pushed carries its own link, in Sheets green so it reads as a
   live destination rather than another action button. */
.btn.sheet-open {
  background: #0f9d58; color: #fff; border-color: #0f9d58;
  text-decoration: none; white-space: nowrap;
}
.btn.sheet-open:hover { filter: brightness(1.08); }
.btn.sm.icon { padding: 6px 8px; min-width: 30px; }

/* Archive control, tucked in the card corner so it never competes with the action row. */
.job-x {
  position: absolute; top: 8px; right: 10px;
  border: 0; background: none; cursor: pointer; line-height: 1;
  color: var(--ink-3); font-size: 14px; padding: 4px 6px; border-radius: 6px;
}
.job-x:hover { background: var(--bad-soft); color: var(--bad); }
.job.is-archived { opacity: .72; background: var(--bg); }
.job.is-archived .job-x:hover { background: var(--accent-soft); color: var(--accent); }

/* ================================================================ hosted additions (2026-10-12)
   Everything above is the local Lead Scraper's stylesheet, copied verbatim so the hosted
   app looks the same. Only what the local app never needed is added below. */


/* sign-in / invite */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.auth .card { width: 100%; max-width: 420px; padding: 28px; }
.auth .brand { margin-bottom: 18px; padding: 0; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; font-size: 13px; color: var(--ink-2); }
.check input { margin-top: 2px; accent-color: var(--accent); }

/* paused-scrape notice */
.modal-back {
  position: fixed; inset: 0; background: rgba(15, 27, 61, .45); display: grid; place-items: center;
  z-index: 100; padding: 16px;
}
.modal { background: var(--card); border-radius: 16px; max-width: 480px; width: 100%; padding: 26px; box-shadow: 0 30px 80px -20px rgba(15,27,61,.45); }
.modal h2 { margin: 0 0 8px; font-size: 19px; }
.modal p { color: var(--ink-2); margin: 0 0 12px; line-height: 1.55; }
.modal .paused-job { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: 13px; }
.modal .paused-job b { color: var(--ink); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }

/* billing */
.amounts { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.amounts button {
  flex: 1 1 64px; padding: 10px 0; border: 1px solid var(--line-strong); background: #fff; border-radius: 9px;
  font-weight: 700; cursor: pointer; color: var(--ink);
}
.amounts button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.auto-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); margin: 10px 0; }
.auto-row .input { width: 96px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--ink); }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }
.amt-pos { color: var(--good); }

.invite-link { display: flex; gap: 8px; margin-top: 10px; }
.invite-link .input { font-size: 12.5px; }

.shell[hidden], .nav-group[hidden] { display: none; }
.modal a.btn, .banner a.btn { text-decoration: none; }

/* one stat box: verified mobiles + credit (owner: "it looks like two buttons") */
a.side-stat { display: block; text-decoration: none; color: inherit; }
.side-stat-credit {
  display: block; margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.28);
  font-size: 12.5px; opacity: 1 !important;
}
.side-stat-credit #side-credit { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.side-stat-credit em { font-style: normal; float: right; font-weight: 600; opacity: .95; }
a.side-stat:hover { filter: brightness(1.04); }

/* bottom-left account block — modelled on the Revamp Mainframe's sidebar footer */
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.mfu { padding: 10px 4px 2px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.mfu-me { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; text-decoration: none; color: var(--ink); }
.mfu-me:hover { background: var(--bg); }
.mfu-av {
  width: 32px; height: 32px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700;
}
.mfu-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.mfu-who b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mfu-who small { font-size: 12px; color: var(--ink-2); }
.mfu-act {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--ink);
  cursor: pointer; background: #fff; font-family: inherit;
}
.mfu-act:hover { background: var(--bg); }
.mfu-act svg { width: 15px; height: 15px; }
.mfu-act.is-danger { color: var(--bad); }
.nav a[hidden] { display: none; }
