/* Supplier Chaser — calm, clean financial-operations UI */
:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f4f4f1;
  --text: #15171a;
  --muted: #6b6f76;
  --faint: #9a9ea5;
  --border: #e8e8e4;
  --border-strong: #d9d9d4;
  --accent: #2f5bd3;
  --accent-hover: #2549b3;
  --accent-soft: #edf2fd;
  --ok: #17803d;
  --ok-soft: #e9f6ee;
  --warn: #a5560b;
  --warn-soft: #fdf3e6;
  --danger: #b42318;
  --danger-soft: #fdeceb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 18, 22, .04), 0 1px 1px rgba(16, 18, 22, .03);
  --shadow-lg: 0 12px 40px rgba(16, 18, 22, .12), 0 2px 6px rgba(16, 18, 22, .06);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
.hidden { display: none !important; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 12px; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }

/* ---------- Top bar ---------- */
.topbar {
  height: 60px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 32px; gap: 32px; position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--text); display: grid; place-items: center; }
.brand-mark svg { width: 16px; height: 16px; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); padding: 7px 12px; border-radius: var(--radius-sm); font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--surface-2); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 13px; }

/* ---------- Layout ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 36px 32px 80px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head .titles { flex: 1; min-width: 240px; }
.page-head .titles p { margin-top: 4px; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; }
.relative-anchor { position: relative; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 24px; }
.card + .card { margin-top: 16px; }
.stats .card + .card { margin-top: 0; }
.table-wrap { overflow-x: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:focus-visible, .toggle:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .link-btn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-dark { background: var(--text); border-color: var(--text); color: #fff; }
.btn-dark:hover { background: #2a2d32; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: #f3c7c3; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn .count { background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 0 7px; font-size: 12px; line-height: 20px; }
.btn-primary .count { background: rgba(255,255,255,.2); color: #fff; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.chev { width: 14px; height: 14px; opacity: .6; }

/* ---------- Toggle ---------- */
.toggle {
  position: relative; width: 38px; height: 22px; border-radius: 999px; border: 0; padding: 0;
  background: #d6d7d3; cursor: pointer; transition: background .15s; flex-shrink: 0;
}
.toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s;
}
.toggle[aria-checked="true"] { background: var(--accent); }
.toggle[aria-checked="true"]::after { transform: translateX(16px); }
.toggle[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { padding: 18px 20px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin-top: 2px; }
.stat .value.zero { color: var(--faint); }

/* ---------- Supplier table ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.table td { padding: 16px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: #fcfcfa; }
.table .num { text-align: left; }
.table .right { text-align: right; }
.supplier-name { font-weight: 600; color: var(--text); background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.supplier-name:hover { color: var(--accent); }
.sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.table-foot { padding: 14px 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; display: flex; gap: 8px; }

/* ---------- Pills / status ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 550; background: var(--surface-2); color: var(--muted); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.count-big { font-size: 15px; font-weight: 600; }
.count-big.zero { color: var(--faint); font-weight: 500; }

/* ---------- Callouts & empty states ---------- */
.callout { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); margin-bottom: 20px; }
.callout.info { background: var(--accent-soft); border-color: #d8e2fa; }
.callout.warn { background: var(--warn-soft); border-color: #f4dfc2; }
.callout.danger { background: var(--danger-soft); border-color: #f3c7c3; }
.callout .text { flex: 1; }
.callout .text strong { display: block; margin-bottom: 2px; }
.empty { text-align: center; padding: 64px 24px; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 20px; }

/* ---------- Popover (supplier list) ---------- */
.popover {
  position: absolute; top: calc(100% + 8px); left: 0; width: 400px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 30;
}
.popover-head { padding: 16px 16px 12px; border-bottom: 1px solid var(--border); }
.popover-head p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.popover-list { max-height: 360px; overflow-y: auto; padding: 6px; }
.popover-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--radius-sm); }
.popover-item:hover { background: var(--surface-2); }
.popover-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popover-foot { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }

/* ---------- Forms ---------- */
label.field { display: block; }
label.field > span { display: block; font-size: 13px; font-weight: 550; margin-bottom: 6px; }
label.field > small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 6px; }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); font: inherit; color: var(--text);
}
textarea { height: auto; padding: 10px 12px; line-height: 1.55; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; }
.error-text { color: var(--danger); font-size: 13px; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 36px; }
.auth-card .brand { margin-bottom: 28px; }
.auth-card h1 { font-size: 22px; margin-bottom: 6px; }
.auth-card > p { color: var(--muted); margin-bottom: 24px; }
.auth-card form > * + * { margin-top: 14px; }
.auth-card .btn { width: 100%; height: 42px; margin-top: 20px; }

/* ---------- Drawer & modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(20, 22, 26, .28); z-index: 40; animation: fade .15s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: 100vw; background: var(--surface);
  box-shadow: var(--shadow-lg); z-index: 41; display: flex; flex-direction: column; animation: slide .18s ease;
}
.drawer-head { padding: 24px 28px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 12px; }
.drawer-head .titles { flex: 1; min-width: 0; }
.drawer-body { padding: 24px 28px 40px; overflow-y: auto; flex: 1; }
.drawer-section + .drawer-section { margin-top: 32px; }
.drawer-section h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 560px; max-width: calc(100vw - 32px); max-height: calc(100vh - 64px);
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 41; display: flex; flex-direction: column; animation: pop .16s ease;
}
.modal-head { padding: 24px 28px 8px; display: flex; gap: 12px; align-items: flex-start; }
.modal-head .titles { flex: 1; }
.modal-head p { color: var(--muted); margin-top: 4px; }
.modal-body { padding: 16px 28px; overflow-y: auto; }
.modal-foot { padding: 16px 28px 24px; display: flex; justify-content: flex-end; gap: 10px; }
.close-btn { border: 0; background: none; color: var(--muted); cursor: pointer; width: 32px; height: 32px; border-radius: var(--radius-sm); font-size: 20px; line-height: 1; }
.close-btn:hover { background: var(--surface-2); color: var(--text); }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
@keyframes pop { from { transform: translate(-50%, -48%); opacity: 0; } }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row .main { flex: 1; min-width: 0; }
.setting-line { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.setting-line + .setting-line { border-top: 1px solid var(--border); }
.setting-line .main { flex: 1; }
.dropzone { border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 36px 24px; text-align: center; color: var(--muted); background: var(--bg); }

/* ---------- Settings ---------- */
.settings { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.settings-nav { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { color: var(--muted); padding: 8px 12px; border-radius: var(--radius-sm); font-weight: 500; }
.settings-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.settings-nav a.active { color: var(--text); background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--border); }
.section-title { margin-bottom: 20px; }
.section-title p { color: var(--muted); margin-top: 4px; }
.template-block + .template-block { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.chip { border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); border-radius: 6px; padding: 2px 8px; font-size: 12px; cursor: pointer; font-family: ui-monospace, Consolas, monospace; }
.chip:hover { color: var(--accent); border-color: #cdd9f7; }
.email-preview { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; }
.email-preview .subject { font-weight: 600; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }

/* ---------- Toasts ---------- */
#toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--text); color: #fff; padding: 11px 18px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: fade .15s ease; max-width: 560px; }
.toast.error { background: var(--danger); }

.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 80px; text-align: center; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .settings { grid-template-columns: 1fr; gap: 20px; }
  .settings-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .hide-md { display: none; }
}
@media (max-width: 640px) {
  .topbar { padding: 0 16px; gap: 16px; }
  .topbar-right .org { display: none; }
  .brand-text { display: none; }
  .actions .btn { flex: 1; }
  .page { padding: 24px 16px 60px; }
  .form-grid { grid-template-columns: 1fr; }
  .table th, .table td { padding: 12px; }
  .hide-sm { display: none; }
}

/* ---------- Import & matching ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
label.dropzone { display: block; cursor: pointer; transition: border-color .12s, background .12s; }
label.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.warn-text { color: var(--warn); }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.segmented button { border: 0; background: none; font: inherit; font-weight: 550; color: var(--muted); padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.segmented button span { color: var(--faint); font-weight: 500; margin-left: 4px; }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.match-row { border-bottom: 1px solid var(--border); }
.match-row:last-child { border-bottom: 0; }
.match-row.open { background: #fcfcfa; }
.match-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) auto; gap: 20px; align-items: center; padding: 16px 20px; }
.mono-desc { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; font-weight: 600; word-break: break-word; }
.match-actions { display: flex; gap: 8px; justify-content: flex-end; }
.match-panel { padding: 4px 20px 22px; }
.mp-list { margin-top: 16px; max-height: 280px; overflow-y: auto; border-top: 1px solid var(--border); }
.mp-list .list-row { padding: 8px 0; }
@media (max-width: 760px) { .match-head { grid-template-columns: 1fr; gap: 10px; } .match-actions { justify-content: flex-start; } }

/* ---------- Review ---------- */
.review-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.txn-amount { font-size: 34px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.doc-list { margin-top: 14px; border-top: 1px solid var(--border); }
.doc-pick { flex: 1; cursor: pointer; gap: 12px; }
.doc-pick input { width: 16px; height: 16px; }
.credit { color: var(--ok); }
.ok-text { color: var(--ok); font-weight: 550; }
.tick-total { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 12px 14px; background: var(--bg); border-radius: var(--radius-sm); font-size: 13.5px; }
.decision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.decision { display: flex; gap: 14px; align-items: flex-start; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 18px 20px; cursor: pointer; transition: border-color .12s, box-shadow .12s, background .12s; }
.decision:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.decision strong { display: block; font-size: 15px; margin-bottom: 2px; }
.decision .sub { display: block; }
.decision .num { flex-shrink: 0; width: 24px; height: 24px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 600; display: grid; place-items: center; }
.decision.current { border-color: var(--accent); background: var(--accent-soft); }
.decision .needs-docs-hint { display: none; font-size: 12px; color: var(--warn); margin-top: 6px; }
.decision.blocked { opacity: .55; }
.decision.blocked .needs-docs-hint { display: block; }
.note-box { margin-top: 18px; }
.note-box summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.note-box textarea, .note-box ul { margin-top: 10px; }
.stat-link { text-align: left; font: inherit; color: inherit; cursor: pointer; border: 1px solid #cdd9f7; background: var(--accent-soft); }
.stat-link:hover { border-color: var(--accent); }
.stat-link .sub { color: var(--accent); margin-top: 0; }
.txn-link { color: var(--text); }
.txn-link:hover { color: var(--accent); }
.modal.wide { width: 680px; }
@media (max-width: 860px) { .review-grid, .decision-grid { grid-template-columns: 1fr; } }

.rule-preview { margin-top: 12px; font-size: 13px; color: var(--muted); }
.rule-preview:empty { display: none; }
.rule-preview ul { margin: 6px 0 0; padding-left: 18px; }
.rule-preview.warn { background: var(--warn-soft); border: 1px solid #f4dfc2; border-radius: var(--radius-sm); padding: 10px 14px; color: var(--text); }
.rule-preview.warn strong { color: var(--warn); }

/* ---------- Sending ---------- */
.form-stack > * + * { margin-top: 14px; }
.form-stack textarea { font-family: inherit; font-size: 13.5px; }
.bulk-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.bulk-row:last-child { border-bottom: 0; }
.bulk-row .email-preview { margin-top: 10px; }
.bulk-row input[type=checkbox] { width: 16px; height: 16px; }
.danger-text { color: var(--danger); }
.demo-strip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: -8px 0 20px; }
.demo-strip .dot { color: var(--warn); }

/* ---------- Billing & auth ---------- */
.auth-alt { margin-top: 18px !important; text-align: center; }
.paywall { max-width: 620px; margin: 24px auto; padding: 40px; }
.paywall h1 { font-size: 26px; margin: 4px 0 10px; }
.checks { list-style: none; padding: 0; margin: 22px 0 6px; }
.checks li { padding: 7px 0 7px 28px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 10px; width: 16px; height: 16px; border-radius: 50%; background: var(--ok-soft); box-shadow: inset 0 0 0 5px var(--ok-soft), inset 0 0 0 16px var(--ok); transform: scale(.6); }
.billing-strip, .trial-strip { text-align: center; font-size: 13px; padding: 9px 16px; }
.billing-strip { background: var(--danger-soft); color: var(--danger); }
.trial-strip { background: var(--accent-soft); color: var(--accent); }

/* ---------- Workspaces (practices) ---------- */
.ws-btn { display: flex; align-items: center; gap: 8px; max-width: 280px; padding: 6px 10px 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.ws-btn:hover { background: var(--surface-2); }
.ws-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ws-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-caret { color: var(--muted); font-size: 11px; }
.ws-menu { left: auto; right: 0; width: 340px; }
.ws-item { width: 100%; border: 0; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.ws-item.current { background: var(--surface-2); }
.ws-tick { width: 18px; height: 18px; border-radius: 50%; background: var(--text); display: grid; place-items: center; flex: none; }
.ws-tick svg { width: 11px; height: 11px; }
.client-strip { background: var(--surface-2); border-bottom: 1px solid var(--border); padding: 8px 32px; font-size: 13px; color: var(--muted); text-align: center; }
.client-strip strong { color: var(--text); }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); }
.choice:has(input:checked) { border-color: var(--text); box-shadow: 0 0 0 1px var(--text) inset; }
.choice input { margin-top: 3px; }
.choice strong { display: block; font-size: 13.5px; }
.choice small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; font-weight: 400; }
.nowrap { white-space: nowrap; }
@media (max-width: 720px) { .choice-row { grid-template-columns: 1fr; } .ws-btn { max-width: 160px; } .ws-label { display: none; } .client-strip { padding: 8px 16px; } }
div.field { margin-bottom: 16px; } div.field > span { display: block; font-size: 13px; font-weight: 550; margin-bottom: 6px; }
@media (max-width: 640px) {
  .topbar:has(.ws-btn) { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 8px; }
  .topbar:has(.ws-btn) .topbar-right { order: -1; width: 100%; margin-left: 0; justify-content: space-between; }
  .topbar:has(.ws-btn) .brand { display: none; }
  .ws-btn { max-width: 230px; }
  .ws-menu { right: auto; left: 0; }
}
.email-preview.html { white-space: normal; background: #fff; } .email-preview.html table { width: auto; }
