/* SGM Legal — matches the sgmlegal.com.au website theme.
   Deep navy (#161940) + steel blue (#1e518e) on cool white, Cormorant Garamond
   display headings, Poppins UI text, white cards with soft shadows and
   pill-shaped buttons — the same design language as the WordPress site, so
   clicking through from "Client Login" feels like the same firm.
   Fonts load from base.html (Cormorant Garamond + Poppins); they degrade
   gracefully to Georgia / system sans. */
:root {
  --navy: #161940;        /* site deep navy — headings, primary buttons */
  --navy-2: #232a5c;
  --brand-blue: #1e518e;  /* site steel blue */
  --accent: #1e518e;      /* links / focus — the site's blue */
  --accent-soft: #c5d3e6;
  --ink: #272727;         /* site body text colour */
  --ink-soft: #4a4d55;
  --muted: #7d8492;       /* cool grey */
  --line: #e4e8f0;        /* cool hairline */
  --line-soft: #eef1f6;
  --tint: #f2f5fa;        /* cool panel fill */
  --bg: #f7f9fc;          /* cool near-white page background */
  --card: #ffffff;        /* white cards, like the site */
  --error: #a71000;       /* site red */
  --ok: #2f6b4f;
  --radius: 16px;         /* rounded cards, like the site */
  --radius-sm: 10px;      /* inputs / small controls */
  --shadow: 0 2px 6px rgba(22,25,64,.05), 0 14px 34px rgba(22,25,64,.08);
  --serif-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --serif-text: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15.5px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif-display); color: var(--navy); font-weight: 700; letter-spacing: .2px; }
/* Cormorant renders smaller than Playfair at the same px — size headings up. */
h2 { font-size: 28px; }
h3 { font-size: 22px; }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 46px 20px; background: var(--card);
  border-bottom: 1.5px solid var(--navy);
}
.brand { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.brand img.brand-logo { height: 74px; width: auto; display: block; }
.brand .brand-tagline {
  font-family: var(--serif-text); font-style: italic; color: var(--accent);
  font-size: 16px; letter-spacing: .3px; text-align: center;
}
.topnav { display: flex; align-items: center; gap: 22px; }
.nav-link {
  font-family: var(--sans); color: var(--ink-soft); text-decoration: none;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em;
}
.nav-link:hover { color: var(--accent); }
.nav-who { font-family: var(--sans); font-size: 12px; color: var(--muted); font-style: italic; }

/* Data tables (dashboard / admin) */
/* Keep wide tables inside their card: scroll horizontally rather than spilling
   past the white background on narrow viewports. */
.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
/* Whole-row navigation (admin client list). */
.data-table tr.row-link { cursor: pointer; }
.data-table tr.row-link:hover td { background: var(--tint); }
.data-table th {
  text-align: left; font-family: var(--sans); font-size: 11px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted); font-weight: 700;
  padding: 8px 12px; border-bottom: 2px solid var(--line);
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.data-table tr:hover td { background: var(--tint); }
.data-table a { color: var(--accent); text-decoration: none; font-weight: 600; }
.pill {
  font-family: var(--sans); font-size: 11px; font-weight: 700; padding: 2px 9px;
  border-radius: 999px; text-transform: uppercase; letter-spacing: .06em;
}
.pill-sent { background: #e6f3ec; color: var(--ok); }
.pill-draft { background: var(--tint); color: var(--muted); }
.row-actions form { display: inline; }
.row-actions a { margin-right: 14px; font-size: 13px; }

/* Dashboard */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.dash-head .lead { margin: 0; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 24px; }
.stat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow);
}
.stat-num { font-family: var(--serif-display); font-size: 30px; color: var(--navy); font-weight: 600; line-height: 1.1; }
.stat-label { font-family: var(--sans); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 6px; }
.group-head {
  font-family: var(--sans); font-size: 12px; text-transform: uppercase;
  letter-spacing: .16em; color: var(--navy); font-weight: 700;
  margin: 8px 0 -4px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.help-card { background: var(--tint); }
.help-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.ok-banner {
  background: #e6f3ec; color: var(--ok); border: 1px solid #bfe3cd;
  border-radius: var(--radius); padding: 10px 16px; font-family: var(--sans);
  font-size: 14px; margin-bottom: 18px;
}

/* Outcome / final notice / responses */
.outcome-form { margin: 0; }
.outcome-form select {
  font-family: var(--sans); font-size: 13px; padding: 3px 6px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.tag {
  font-family: var(--sans); font-size: 10px; text-transform: uppercase;
  letter-spacing: .07em; background: #e8eef8; color: var(--brand-blue); padding: 1px 6px;
  border-radius: 3px; vertical-align: middle;
}
.resp-flag { font-family: var(--sans); font-size: 12px; color: var(--accent);
  text-decoration: none; margin-left: 6px; white-space: nowrap; }
.fn-banner {
  background: #fbf3e3; border: 1px solid #e7d4a8; color: #6f5618;
  border-radius: var(--radius); padding: 12px 18px; margin-bottom: 18px;
  font-family: var(--sans); font-size: 14px;
}
.detail-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 18px; }
.detail-grid dt { font-family: var(--sans); font-size: 12px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); align-self: center; }
.detail-grid dd { margin: 0; color: var(--ink); }
.resp-list { list-style: none; padding: 0; margin: 0; }
.resp-list li { border-bottom: 1px solid var(--line-soft); padding: 12px 0; }
.resp-meta { font-family: var(--sans); font-size: 13px; }
.resp-subj { font-weight: 600; margin: 3px 0; color: var(--navy); }
.resp-preview { color: var(--ink-soft); font-size: 14px; }
@media (max-width: 640px) {
  .stat-row { grid-template-columns: 1fr; }
  .dash-head { flex-direction: column; align-items: flex-start; }
}
.btn-link {
  background: none; border: none; color: var(--accent); cursor: pointer;
  font-family: var(--sans); font-size: 13px; padding: 0; text-decoration: underline;
}

/* Slim double rule beneath the header — navy with a brass hairline */
.brand-band { height: 2px; background: var(--navy); margin-top: 3px; }

.header-who { font-family: var(--serif-display); font-size: 21px; font-weight: 500; color: var(--navy); }

.test-banner {
  background: #8f2a23; color: #fff; font-family: var(--sans); font-size: 13px;
  font-weight: 600; text-align: center; padding: 8px 16px; letter-spacing: .02em;
}

/* App shell: left sidebar nav + main content */
.app-shell { display: flex; align-items: flex-start; gap: 30px; max-width: 1140px; margin: 0 auto; padding: 0 28px; }
.app-shell.no-sidebar { justify-content: center; }
.sidebar { flex: 0 0 244px; width: 244px; padding-top: 44px; position: sticky; top: 16px; }
.main-area { flex: 1 1 auto; min-width: 0; max-width: 820px; padding: 44px 0 24px; }
.app-shell.no-sidebar .main-area { max-width: 520px; }

.side-link {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 13px;
  background: var(--card); border: 1px solid var(--line); border-radius: 4px;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.side-link:hover { border-color: var(--navy); }
.side-link.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.side-link.active .side-text small { color: rgba(255, 255, 255, .72); }
.side-icon { display: inline-flex; flex: 0 0 auto; }
.side-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.side-text { display: flex; flex-direction: column; line-height: 1.25; font-family: var(--sans); }
.side-text strong { font-size: 16px; font-weight: 600; }
.side-text small { font-size: 12px; color: var(--muted); margin-top: 2px; }
.side-logout { margin-top: 10px; background: transparent; box-shadow: none; color: var(--muted); }
.side-logout:hover { color: var(--error); border-color: var(--error); transform: none; }

@media (max-width: 760px) {
  .app-shell { flex-direction: column; gap: 0; padding: 0 16px; }
  .sidebar { width: auto; flex: none; position: static; padding-top: 24px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .side-link { margin-bottom: 0; }
  .side-logout { grid-column: 1 / -1; }
  .main-area { max-width: none; padding-top: 28px; }
}

.container { max-width: 800px; margin: 0 auto; padding: 48px 24px 72px; }

/* Hero */
.intro { text-align: center; margin-bottom: 10px; }
.intro h1 { margin: 4px 0 14px; font-size: 42px; line-height: 1.12; font-weight: 600; }
.intro h1::after {
  content: ""; display: block; width: 60px; height: 1.5px; background: var(--navy);
  margin: 18px auto 0;
}
.lead {
  font-size: 16.5px; color: var(--ink-soft); margin: 0 auto; max-width: 62ch; line-height: 1.7;
}
.muted { color: var(--muted); }

/* Section label helper (uppercase letterspaced) */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px 38px; box-shadow: var(--shadow);
  margin-bottom: 24px;
}
/* Section headings inside cards — large serif like the website's card headings
   ("Get in touch with us"), with a subtle hairline to separate the section. */
h2 {
  font-family: var(--serif-display); font-size: 26px; font-weight: 700;
  text-transform: none; letter-spacing: .2px; color: var(--navy);
  margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}

/* Stepper — engraved small caps with a brass active marker */
.stepper {
  display: flex; gap: 0; list-style: none; padding: 0; margin: 30px 0 30px;
  flex-wrap: wrap; justify-content: center; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stepper li {
  font-family: var(--sans); font-size: 11px; color: var(--muted);
  padding: 14px 20px; text-align: center; text-transform: uppercase;
  letter-spacing: .16em; font-weight: 600; position: relative;
}
.stepper li + li::before {
  content: "·"; position: absolute; left: -3px; top: 50%; transform: translateY(-50%);
  color: var(--line); font-size: 14px;
}
.stepper li.reachable { cursor: pointer; }
.stepper li.reachable:hover { color: var(--accent); }
.stepper li.active { color: var(--navy); }
.stepper li.active::after {
  content: ""; position: absolute; left: 20px; right: 20px; bottom: -1px; height: 2px;
  background: var(--accent);
}
.stepper li.done { color: var(--accent); }

/* Forms */
.stack { display: grid; gap: 18px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.grid .full { grid-column: 1 / -1; }
label {
  font-family: var(--sans); font-size: 12px; font-weight: 600; display: grid; gap: 7px;
  color: var(--navy); text-transform: uppercase; letter-spacing: .08em;
}
label.checkbox {
  display: flex; align-items: center; gap: 10px; font-weight: 500;
  text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink);
}
input, textarea, select {
  font-family: var(--sans); font-size: 14.5px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #ffffff; color: var(--ink); width: 100%;
}
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #a3aab6; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(38,84,137,.15);
}
.field-hint {
  font-family: var(--sans); font-size: 12.5px; color: var(--muted);
  font-weight: 400; text-transform: none; letter-spacing: 0; font-style: italic;
}

/* Buttons */
.btn {
  font-family: var(--sans); font-weight: 600; font-size: 12.5px;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 13px 32px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; display: inline-block; text-align: center;
  transition: background .18s, color .18s, border-color .18s;
}
.btn-primary { background: var(--navy); color: #ffffff; border-color: var(--navy); }
.btn-primary:hover { background: var(--brand-blue); border-color: var(--brand-blue); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--navy); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.step-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 28px; }
.step-actions .btn-primary:only-child { margin-left: auto; }

/* "How it works" panel */
.howto { background: var(--paper, var(--tint)); border-color: var(--line); }
.howto h3 {
  font-family: var(--sans); font-size: 11px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: .18em; margin: 0 0 12px;
}
.howto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.howto-grid ul, .howto-grid ol { margin: 0; padding-left: 20px; }
.howto-grid li { margin-bottom: 9px; font-size: 16px; color: var(--ink-soft); }
.howto-note {
  margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 15px; color: var(--ink-soft); font-style: italic;
}
.howto-note a { color: var(--accent); font-weight: 600; font-style: normal; }
.auto-note {
  font-family: var(--sans); font-size: 13px; color: var(--accent);
  border-left: 2px solid var(--accent); padding: 4px 0 4px 14px; margin: 0 0 18px;
}

/* Dropzone */
.dropzone {
  display: grid; place-items: center; padding: 48px; border: 1px dashed var(--accent-soft);
  border-radius: var(--radius); background: var(--tint); cursor: pointer; color: var(--muted);
  transition: border-color .15s, background .15s; font-style: italic; font-size: 16px;
}
.dropzone.drag { border-color: var(--accent); background: #ece4d4; color: var(--navy); }
.dropzone u, .dropzone .dropzone-text u { color: var(--accent); }
.dropzone-sm { padding: 22px; font-size: 14px; background: var(--card); margin-bottom: 4px; }
.file-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 9px; }
.file-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 15px; background: #ffffff;
}
.file-list .remove { color: var(--error); cursor: pointer; border: none; background: none; font-size: 18px; }

/* Review tiers */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0; }
.tier {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  cursor: pointer; display: flex; gap: 14px; align-items: flex-start;
  font-weight: 400; background: #ffffff; text-transform: none; letter-spacing: 0;
  transition: border-color .15s, box-shadow .15s;
}
.tier > input { margin-top: 6px; flex: 0 0 auto; }
.tier-body { flex: 1; }
.tier:hover { border-color: var(--accent-soft); }
.tier:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--tint); }
.tier-head { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 4px; gap: 10px; }
.tier-name { font-family: var(--serif-display); font-weight: 600; font-size: 19px; color: var(--navy); }
.tier-price { font-family: var(--serif-display); font-weight: 600; color: var(--accent); font-size: 22px; white-space: nowrap; }
.tier p { font-size: 15px; color: var(--ink-soft); margin: 8px 0 0; line-height: 1.5; }
.fineprint { font-size: 14px; color: var(--muted); font-style: italic; }

/* Draft */
.draft-text {
  width: 100%; font-family: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  font-size: 17px; line-height: 1.6; background: #ffffff;
}
.loading { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 20px 0; font-style: italic; }
.spinner {
  width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Send step */
.done { text-align: center; padding: 12px 0; }
.done h3 { color: var(--ok); }
.ref-line { font-size: 16px; margin: 0 0 20px; }
.ref-line strong { font-family: var(--sans); color: var(--accent); letter-spacing: .12em; font-size: 15px; }
.send-block { padding: 18px 0; border-top: 1px solid var(--line); }
.send-block:first-of-type { border-top: none; }
.send-block h4 { font-family: var(--serif-display); font-size: 18px; margin: 0 0 10px; color: var(--navy); font-weight: 600; }
/* Inline "amend with AI" chat on the internal tool */
.int-chat {
  display: flex; flex-direction: column; gap: 10px; margin: 12px 0;
  max-height: 340px; overflow-y: auto; padding: 4px 2px;
}
.int-chat:empty { display: none; }
.int-chat-msg {
  max-width: 82%; padding: 9px 13px; border-radius: 14px; font-size: 15px;
  line-height: 1.5; white-space: pre-wrap; word-wrap: break-word;
}
.int-chat-user {
  align-self: flex-end; background: var(--navy); color: #fff;
  border-bottom-right-radius: 4px;
}
.int-chat-bot {
  align-self: flex-start; background: #eef2f8; color: var(--ink, #222);
  border-bottom-left-radius: 4px;
}
.int-chat-form { display: flex; gap: 10px; align-items: stretch; }
.int-chat-form input {
  flex: 1; padding: 11px 14px; border: 1px solid var(--line);
  border-radius: 10px; font-family: var(--sans); font-size: 15px;
}
.int-chat-form button { white-space: nowrap; }
.int-draft-flash {
  animation: draftflash 1s ease-out;
  box-shadow: 0 0 0 3px var(--accent);
}
@keyframes draftflash {
  0% { box-shadow: 0 0 0 3px var(--accent); }
  100% { box-shadow: 0 0 0 3px rgba(0,0,0,0); }
}
.attach-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.attach-list li { font-size: 15px; }
.email-result {
  margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line);
  background: var(--tint); border-radius: var(--radius); font-size: 15px;
}
.email-result p { margin: 0 0 12px; }
#send-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.send-confirm {
  border: 1px solid var(--accent-soft); background: var(--tint); border-radius: var(--radius);
  padding: 14px 16px; margin-top: 4px;
}
.send-confirm p { margin: 0 0 12px; font-size: 15px; }
.send-confirm .btn { margin-right: 10px; }
.send-done {
  border: 1px solid #b9d8c4; background: #eef7f1; color: var(--ok);
  border-radius: var(--radius); padding: 14px 16px; font-weight: 600;
  font-family: var(--sans); font-size: 15px;
}

/* Extracted details read-back */
.extract-summary {
  border: 1px solid var(--line); border-left: 4px solid #b8860b;
  background: #fff; border-radius: var(--radius);
  padding: 14px 18px; margin: 6px 0 22px; font-size: 15px; color: var(--ink);
}
.extract-summary h4 {
  margin: 0 0 8px; font-family: var(--sans); font-size: 11px; font-weight: 700;
  color: var(--ink); text-transform: uppercase; letter-spacing: .12em;
}
.extract-summary ul { margin: 0; padding-left: 20px; }
.extract-summary li { margin-bottom: 8px; color: var(--ink); line-height: 1.5; }
.extract-summary li:last-child { margin-bottom: 0; }

/* "Prepare the next letter from this bundle" call-to-action */
.next-debtor-block {
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  background: var(--tint); border-radius: var(--radius); padding: 16px 18px;
  margin-top: 20px;
}

/* Add-client "read from document" prefill box */
.prefill-box {
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: var(--tint); padding: 14px 18px; margin: 0 0 18px;
}
.prefill-box p { margin: 0 0 10px; }
.prefill-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#extract-client-status { display: block; margin-top: 8px; }

/* Admin impersonation banner ("view as client") */
.impersonate-banner {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  flex-wrap: wrap; background: #7a4e12; color: #fff;
  padding: 8px 16px; font-family: var(--sans); font-size: 13px; text-align: center;
}
.impersonate-banner strong { color: #ffe6b8; }
.impersonate-exit { display: inline; }
.impersonate-exit button {
  background: #fff; color: #7a4e12; border: none; border-radius: 6px;
  padding: 4px 12px; font-family: var(--sans); font-size: 12px; font-weight: 700;
  cursor: pointer;
}
.impersonate-exit button:hover { background: #ffe6b8; }

/* Help assistant (floating widget on the tool page) */
.assist-toggle {
  position: fixed; right: 22px; bottom: 22px; z-index: 50;
  background: var(--navy); color: #fff; border: none; border-radius: 999px;
  padding: 11px 18px; font-family: var(--sans); font-size: 14px; font-weight: 600;
  cursor: pointer; box-shadow: 0 4px 16px rgba(12,26,48,.28);
}
.assist-toggle:hover { background: var(--navy-2); }
.assist-panel {
  position: fixed; right: 22px; bottom: 74px; z-index: 51;
  width: 360px; max-width: calc(100vw - 32px); max-height: 70vh;
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 40px rgba(12,26,48,.30); overflow: hidden;
}
.assist-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: var(--navy); color: #fff;
}
.assist-head strong { font-family: var(--sans); font-size: 14px; letter-spacing: .02em; }
.assist-close {
  background: none; border: none; color: #fff; font-size: 22px; line-height: 1;
  cursor: pointer; padding: 0 2px;
}
.assist-disclaimer {
  margin: 0; padding: 9px 16px; font-size: 12px; color: var(--muted);
  background: var(--tint); border-bottom: 1px solid var(--line);
}
.assist-messages {
  flex: 1; overflow-y: auto; padding: 14px 16px; display: flex;
  flex-direction: column; gap: 10px; min-height: 120px;
}
.assist-msg {
  font-size: 14px; line-height: 1.45; padding: 9px 12px; border-radius: 10px;
  max-width: 85%; white-space: normal;
}
.assist-user { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 3px; }
.assist-bot { align-self: flex-start; background: var(--tint); color: var(--ink); border-bottom-left-radius: 3px; }
.assist-form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.assist-form input {
  flex: 1; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-family: inherit;
}
.assist-form .btn { padding: 8px 16px; }
.assist-footnote {
  margin: 0; padding: 8px 16px 12px; font-size: 11px; color: var(--muted);
  text-align: center; border-top: 1px solid var(--line-soft);
}

/* Debtor picker + tickable invoice list on the confirm step */
.debtor-choice {
  border: 1px solid var(--line); background: var(--tint); border-radius: var(--radius);
  padding: 14px 18px; margin: 6px 0 16px;
}
.debtor-choice-head { margin: 0 0 10px; font-weight: 600; color: var(--ink); }
.debtor-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.debtor-option {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  cursor: pointer; font-size: 15px;
}
.debtor-option:hover { border-color: var(--accent); }
.debtor-option:has(input:checked) { border-color: var(--accent); background: #f3f0e7; }
.debtor-option input { margin: 0; width: 17px; height: 17px; flex: none; }
.debtor-option-name { font-weight: 600; color: var(--ink); }
.debtor-option-total { margin-left: auto; font-weight: 400; color: var(--ink-soft); }
.invoice-picker {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin: 0 0 20px;
}
.invoice-picker h4 {
  margin: 0 0 6px; font-family: var(--sans); font-size: 11px; font-weight: 700;
  color: var(--accent); text-transform: uppercase; letter-spacing: .16em;
}
.invoice-list { list-style: none; margin: 8px 0 4px; padding: 0; }
.invoice-list li { margin-bottom: 6px; }
.invoice-list.muted li { color: var(--muted); font-size: 14px; }
.invoice-list label.checkbox { font-size: 15px; }

/* Misc */
.hidden { display: none !important; }
.error { color: var(--error); font-size: 15px; }
.banner { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 22px; font-size: 14px; }
.banner-demo {
  background: #eaf1f9; border: 1px solid var(--accent-soft); color: #1f4a7c;
  font-family: var(--sans);
}
.banner-demo code { background: #dde8f3; padding: 1px 5px; border-radius: 3px; }

.site-footer { margin: 40px 0 24px; padding-top: 18px; border-top: 1px solid var(--line-soft); text-align: center; }
.site-footer p { font-size: 13.5px; color: var(--muted); font-style: italic; margin: 0; }

.login-card { max-width: 440px; margin: 76px auto 20px; text-align: center; }
.login-card h1 { font-size: 30px; margin-top: 0; }
.login-card .stack { text-align: left; margin-top: 22px; }
.login-help {
  font-size: 12.5px; color: var(--muted); margin: 18px 0 0; line-height: 1.6;
}
.login-help a { color: var(--accent); text-decoration: none; font-weight: 500; }
/* "Not a client yet?" — lead capture under the sign-in card */
.login-cta { max-width: 440px; margin: 0 auto 60px; text-align: center; background: var(--tint); }
.login-cta h2 { margin-top: 0; font-size: 24px; }
.login-cta p { font-size: 14px; color: var(--ink-soft); margin: 8px 0 18px; }

@media (max-width: 640px) {
  .grid, .tiers, .howto-grid { grid-template-columns: 1fr; }
  .intro h1 { font-size: 32px; }
  .container { padding: 32px 18px 56px; }
  .card { padding: 26px 22px; }
}
