/* ==========================================================================
   ColdMail design system
   ========================================================================== */

:root {
  /* Neutrals - very slightly cool, so the UI reads as considered rather than default grey */
  --bg:            #f4f6f8;
  --surface:       #ffffff;
  --surface-2:     #f8fafb;
  --surface-3:     #eef2f5;
  --border:        #e3e8ed;
  --border-strong: #cfd8e0;

  --ink:        #16202b;
  --ink-2:      #46576a;
  --ink-3:      #74869a;

  /* Brand */
  --brand:       #2563d9;
  --brand-dark:  #1b4bb0;
  --brand-wash:  #eaf1fe;

  /* Sidebar */
  --nav-bg:      #131c28;
  --nav-ink:     #9fb0c2;
  --nav-ink-on:  #ffffff;
  --nav-active:  #1e2b3b;

  /* Semantic */
  --ok:        #0f8a54;   --ok-wash:     #e4f5ec;
  --warn:      #9a6207;   --warn-wash:   #fdf3e0;
  --danger:    #c02b1f;   --danger-wash: #fceceb;
  --info:      #1f6f9e;   --info-wash:   #e7f2f9;

  --radius:    10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(18,28,40,.05);
  --shadow:    0 1px 3px rgba(18,28,40,.07), 0 6px 16px -8px rgba(18,28,40,.14);
  --shadow-lg: 0 2px 6px rgba(18,28,40,.08), 0 18px 40px -18px rgba(18,28,40,.30);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brand); color: #fff; }

/* --------------------------------------------------------------------------
   App shell: fixed sidebar + content column
   -------------------------------------------------------------------------- */

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex: none;
  background: var(--nav-bg);
  color: var(--nav-ink);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 18px;
  color: #fff; font-weight: 700; font-size: 16px; letter-spacing: -.01em;
}
.sidebar__mark {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, var(--brand) 0%, #4f8ef7 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; font-weight: 800;
}

.sidebar__nav { padding: 4px 12px; display: flex; flex-direction: column; gap: 2px; }
.sidebar__label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  color: #5d7085; font-weight: 700; padding: 16px 8px 6px;
}
.sidebar__nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--nav-ink); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: background .12s ease, color .12s ease;
}
.sidebar__nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar__nav a.active { background: var(--nav-active); color: var(--nav-ink-on); font-weight: 600; }
.sidebar__nav a.active svg { color: #6ea2ff; }
.sidebar__nav svg { width: 17px; height: 17px; flex: none; opacity: .95; }

.sidebar__foot { margin-top: auto; padding: 14px 16px 18px; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar__foot button {
  background: none; border: none; color: var(--nav-ink); cursor: pointer;
  font-size: 13.5px; padding: 6px 4px; font-family: var(--font); border-radius: 6px;
}
.sidebar__foot button:hover { color: #fff; background: none; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 60px;
  display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 20;
}
.topbar__title { font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }
.topbar__actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.page { padding: 28px 32px 72px; max-width: 1180px; width: 100%; }

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .sidebar__nav { flex-direction: row; flex-wrap: wrap; padding: 6px 10px 12px; }
  .sidebar__label { display: none; }
  .sidebar__foot { margin-top: 0; }
  .topbar { padding: 0 18px; }
  .page { padding: 20px 18px 60px; }
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1 { font-size: 23px; font-weight: 680; letter-spacing: -.02em; margin: 0 0 5px; }
h2 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; margin: 0 0 12px; }
h3 { font-size: 14px; font-weight: 650; margin: 22px 0 8px; }
p  { margin: 0 0 12px; }
.subtitle { color: var(--ink-2); margin: 0 0 22px; max-width: 72ch; }
.help { color: var(--ink-3); font-size: 12.8px; margin: 7px 0 0; line-height: 1.5; }
.small { font-size: 12.4px; color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: .92em; }

a { color: var(--brand-dark); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--mono); font-size: .88em;
  background: var(--surface-3); color: var(--ink);
  padding: 2px 6px; border-radius: 5px;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.card__head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.card__head h2 { margin: 0; }
.card__head .card__actions { margin-left: auto; display: flex; gap: 8px; }
.card__body { padding: 20px; }
.card__body > :last-child { margin-bottom: 0; }
.card--flush .card__body { padding: 0; }

/* legacy alias so older markup keeps its shape */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 20px; margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); gap: 12px; }

.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.stat__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 650; }
.stat__num { font-size: 27px; font-weight: 700; letter-spacing: -.025em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat__meta { font-size: 12.4px; color: var(--ink-3); margin-top: 2px; }
.stat--accent .stat__num { color: var(--brand-dark); }
.stat--ok .stat__num { color: var(--ok); }
.stat--danger .stat__num { color: var(--danger); }

/* legacy */
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stat-card .num { font-size: 27px; font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.stat-card .label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 650; margin-top: 4px; }

/* --------------------------------------------------------------------------
   Buttons  (everything actionable is a button, never a bare link)
   -------------------------------------------------------------------------- */

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--brand); color: #fff;
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 8px 15px;
  font-family: var(--font); font-size: 13.6px; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, box-shadow .12s ease;
  box-shadow: var(--shadow-sm);
}
button:hover, .btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; text-decoration: none; }
button:active, .btn:active { box-shadow: none; }
button:focus-visible, .btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [contenteditable]:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}

button.secondary, .btn.secondary {
  background: var(--surface); color: var(--ink); border-color: var(--border-strong);
}
button.secondary:hover, .btn.secondary:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3); }

button.ghost, .btn.ghost {
  background: transparent; color: var(--ink-2); border-color: transparent; box-shadow: none;
}
button.ghost:hover, .btn.ghost:hover { background: var(--surface-3); color: var(--ink); border-color: transparent; }

button.danger, .btn.danger {
  background: var(--surface); color: var(--danger); border-color: #eec6c2;
}
button.danger:hover, .btn.danger:hover { background: var(--danger-wash); color: var(--danger); border-color: var(--danger); }

button.sm, .btn.sm { padding: 5px 11px; font-size: 12.6px; }
button.block, .btn.block { width: 100%; }

.actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; }
.actions--end { justify-content: flex-end; }
.btn-row { display: flex; gap: 8px; align-items: center; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

label { display: block; font-size: 12.8px; font-weight: 650; color: var(--ink); margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

input[type=text], input[type=password], input[type=email], input[type=number],
input[type=url], input[type=search], textarea, select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:hover, textarea:hover, select:hover { border-color: var(--ink-3); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-wash);
}
input::placeholder, textarea::placeholder { color: #9aabbd; }

textarea { min-height: 120px; font-family: var(--mono); font-size: 13px; line-height: 1.6; }
textarea.tall { min-height: 300px; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2374869a' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
  padding-right: 32px;
}

.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 170px; }

.checkbox-row { display: flex; align-items: center; gap: 9px; margin: 10px 0; }
.checkbox-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.checkbox-row label { margin: 0; font-weight: 500; cursor: pointer; }

/* toggle switch */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  width: 40px; height: 23px; border-radius: 999px; background: var(--border-strong);
  position: relative; transition: background .15s ease; flex: none;
}
.switch__track::after {
  content: ""; position: absolute; top: 2.5px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: var(--shadow-sm); transition: transform .15s ease;
}
.switch input:checked + .switch__track { background: var(--brand); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.8px; }
thead th {
  text-align: left; padding: 10px 16px;
  font-size: 11.2px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); background: var(--surface-2);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
tbody td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .btn, td button { margin: -3px 0; }

/* The hidden attribute has to beat any display: rule we set elsewhere,
   otherwise hiding an element in JS silently does nothing. */
[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   Pills / badges
   -------------------------------------------------------------------------- */

.badge, .pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.8px; font-weight: 650; letter-spacing: .01em;
  border: 1px solid transparent; white-space: nowrap;
}
.badge::before, .pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85;
}
a.plain { color: var(--ink); font-weight: 400; }
a.plain:hover { text-decoration: underline; }

/* Just the coloured dot, for lines that read as a sentence already. */
.dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-3, #98a2b3); margin-right: 9px; vertical-align: middle;
}
.dot.sent, .dot.completed, .dot.ok { background: var(--ok); }
.dot.failed, .dot.bounced { background: var(--danger); }
.dot.paused, .dot.retrying, .dot.unsubscribed { background: var(--warn); }
.dot.replied { background: var(--info); }
.badge.active, .badge.running, .badge.ok, .badge.completed, .badge.inbox, .badge.delivered,
.pill--ok   { background: var(--ok-wash); color: var(--ok); }
.badge.bounced, .badge.failed, .badge.error, .badge.spam, .badge.send_failed,
.pill--danger { background: var(--danger-wash); color: var(--danger); }
.badge.unsubscribed, .badge.paused, .badge.skipped_suppressed, .badge.not_delivered, .badge.retrying,
.badge.delayed, .badge.held,
.pill--warn { background: var(--warn-wash); color: var(--warn); }
.badge.pending, .badge.draft, .badge.manual, .badge.in_progress,
.pill--neutral { background: var(--surface-3); color: var(--ink-2); }
.badge.replied, .badge.sent, .pill--info { background: var(--info-wash); color: var(--info); }

/* --------------------------------------------------------------------------
   Alerts
   -------------------------------------------------------------------------- */

.alert {
  padding: 12px 15px; border-radius: var(--radius-sm);
  font-size: 13.6px; margin-bottom: 18px;
  border: 1px solid transparent; line-height: 1.5;
}
.alert.ok    { background: var(--ok-wash);     color: #0a6b41; border-color: #bde5d0; }
.alert.error { background: var(--danger-wash); color: #9c2118; border-color: #f0c8c4; }
.alert.warn-alert, .alert.warn { background: var(--warn-wash); color: #7d4f05; border-color: #f0dcb4; }
.alert strong { font-weight: 700; }

/* --------------------------------------------------------------------------
   Misc
   -------------------------------------------------------------------------- */

.progress { background: var(--surface-3); border-radius: 999px; height: 8px; overflow: hidden; margin: 8px 0; }
.progress > div { background: var(--brand); height: 100%; border-radius: 999px; transition: width .3s ease; }
.progress.ok > div { background: var(--ok); }

.empty { text-align: center; padding: 44px 20px; color: var(--ink-3); }
.empty__title { font-weight: 650; color: var(--ink-2); margin-bottom: 4px; font-size: 14.5px; }

.divider { height: 1px; background: var(--border); margin: 22px 0; border: none; }

/* Login */
.login-wrap { max-width: 380px; margin: 0 auto; padding: 12vh 20px 0; }
.login-brand { display: flex; align-items: center; gap: 11px; justify-content: center; margin-bottom: 22px; font-size: 19px; font-weight: 700; }

/* --------------------------------------------------------------------------
   Template editor
   -------------------------------------------------------------------------- */

.editor { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); margin-bottom: 20px; }

.editor__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.editor__bar .spacer { margin-left: auto; }

.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.seg-btn {
  background: var(--surface); border: none; color: var(--ink-2);
  padding: 6px 13px; font-size: 12.8px; font-weight: 600; cursor: pointer;
  border-radius: 0; box-shadow: none;
}
.seg-btn:hover { background: var(--surface-3); color: var(--ink); border: none; }
.seg-btn.active { background: var(--brand); color: #fff; }
.seg-btn.active:hover { background: var(--brand-dark); }

/* split: code on the left, live preview on the right */
.split { display: grid; grid-template-columns: 1fr 1fr; min-height: 520px; }
.split--full { grid-template-columns: 1fr; }
.split__pane { min-width: 0; display: flex; flex-direction: column; }
.split__pane + .split__pane { border-left: 1px solid var(--border); }
.split__head {
  padding: 8px 14px; font-size: 11.2px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3);
  background: var(--surface-2); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.split__head .spacer { margin-left: auto; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } .split__pane + .split__pane { border-left: none; border-top: 1px solid var(--border); } }

.code-pane {
  flex: 1; width: 100%; border: none; resize: none; border-radius: 0;
  font-family: var(--mono); font-size: 12.9px; line-height: 1.65;
  padding: 14px 16px; background: var(--surface); color: var(--ink);
  min-height: 460px;
}
.code-pane:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand-wash); }


/* The two email panes - compose and preview - drawn identically, so the
   left side is not an approximation of the right. */
.mail-pane {
  flex: 1; background: var(--surface-3); padding: 18px 16px; overflow-y: auto;
  min-height: 560px;
}
.mail-sheet {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  margin: 0 auto; width: 640px; max-width: 100%;
  overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: width .18s ease;
}
.split.mobile .mail-sheet { width: 390px; }

.mail-sheet iframe { width: 100%; height: 620px; border: none; display: block; background: #fff; }

.preview-head { padding: 13px 17px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.preview-subject { font-weight: 680; font-size: 14.5px; letter-spacing: -.01em; }
.preview-meta { color: var(--ink-3); font-size: 12.2px; margin-top: 2px; }

.split { min-height: 660px; }
.code-pane { min-height: 620px; }

/* formatting toolbar */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tool {
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink-2);
  padding: 5px 10px; font-size: 12.6px; font-weight: 600; border-radius: 6px;
  cursor: pointer; box-shadow: none; min-width: 32px;
}
.tool:hover { background: var(--surface-3); color: var(--ink); border-color: var(--ink-3); }
.tool-sep { width: 1px; height: 18px; background: var(--border-strong); margin: 0 3px; }

/* personalization chips */
.mergebar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  background: var(--brand-wash); border: 1px solid #c8dbfb; color: var(--brand-dark);
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; cursor: pointer; box-shadow: none;
}
.chip:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* --------------------------------------------------------------------------
   Sequence builder
   -------------------------------------------------------------------------- */

.sequence { margin: 4px 0; }
.seq-step { position: relative; }
.seq-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 17px; box-shadow: var(--shadow-sm);
}
.seq-badge {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13.5px;
}
.seq-body { flex: 1; min-width: 0; }
.seq-title { font-weight: 650; font-size: 13.6px; margin-bottom: 9px; }
.seq-select { width: 100%; max-width: 100%; }
.seq-subject { width: 100%; margin-top: 8px; }
.seq-stats { text-align: right; flex: none; }
.seq-stats strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.seq-remove {
  background: transparent; border: none; color: var(--ink-3); font-size: 20px; line-height: 1;
  padding: 2px 6px; cursor: pointer; box-shadow: none; border-radius: 6px; flex: none;
}
.seq-remove:hover { color: var(--danger); background: var(--danger-wash); border: none; }

.seq-wait {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 0 12px 46px; position: relative;
  color: var(--ink-3); font-size: 12.8px;
}
.seq-wait::before {
  content: ""; position: absolute; left: 15px; top: 0; bottom: 0; width: 2px;
  background: repeating-linear-gradient(to bottom, var(--border-strong) 0 5px, transparent 5px 10px);
}
.seq-wait-input { width: 62px !important; padding: 5px 8px !important; text-align: center; font-weight: 600; }
.seq-add { margin: 14px 0 4px; }

/* --------------------------------------------------------------
   File pickers - the browser default looks out of place next to
   the rest of the form controls
   -------------------------------------------------------------- */
input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
input[type="file"]:hover { border-color: var(--brand); background: var(--surface); }
input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 7px 14px;
  border: 0;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--brand-dark, #1d4fb8); }

/* --------------------------------------------------------------
   Radio choices - for decisions that need explaining, not a
   bare list of options
   -------------------------------------------------------------- */
.choice {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 15px; margin-bottom: 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); cursor: pointer;
}
.choice:last-child { margin-bottom: 0; }
.choice:hover { border-color: var(--brand); background: var(--surface-2); }
.choice input[type="radio"] { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; }
.choice:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.choice .help { margin-top: 4px; }

/* Collapsible helper block - settings tables, provider presets */
.presets {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); margin-bottom: 16px; overflow: hidden;
}
.presets > summary {
  cursor: pointer; padding: 10px 14px; font-size: 13px; font-weight: 650; color: var(--ink-2);
  list-style: none;
}
.presets > summary::-webkit-details-marker { display: none; }
.presets > summary::before { content: "▸ "; color: var(--ink-3); }
.presets[open] > summary::before { content: "▾ "; }
.presets > summary:hover { color: var(--brand-dark); }
.presets .table-wrap { border-top: 1px solid var(--border); background: var(--surface); }
.presets .help { padding: 0 14px 12px; margin-top: 10px; }

/* Buttons sitting together inside a table cell */
.row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row-actions form { margin: 0; }
