/* Beheerplatform – opmaak overgenomen uit de praktijksoftware (repo praktijk, static/css/app.css), ingekort tot
   wat het platform gebruikt. Geen externe fonts of scripts. */
:root {
  --teal: #0b7383;
  --teal-dark: #085a67;
  --teal-brand: #34b5ca;
  --teal-soft: #e6f5f8;
  --lilac: #e09ff1;
  --lilac-dark: #8e44a8;
  --lilac-soft: #f8eefb;
  --ink: #17363b;
  --muted: #56696e;
  --bg: #f6fafb;
  --surface: #ffffff;
  --line: #d6e5e8;
  --line-strong: #b9d0d5;
  --sidebar: #10343a;
  --ok: #1d7a4c;
  --ok-soft: #e4f4ec;
  --warn: #9a5a00;
  --warn-soft: #fff3df;
  --danger: #b0261c;
  --danger-soft: #fde9e7;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 4px 16px rgba(0, 0, 0, .05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; }
body.public { font-size: 18px; }
body.staff { font-size: 15px; }
img { max-width: 100%; height: auto; }
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: 2rem; letter-spacing: -.01em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
:focus-visible { outline: 3px solid var(--lilac); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Knoppen */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .7em 1.25em; border-radius: 999px; border: 2px solid var(--teal);
  background: var(--teal); color: #fff; font: inherit; font-weight: 600; text-decoration: none;
  cursor: pointer; line-height: 1.2; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn.secondary { background: transparent; color: var(--teal); }
.btn.secondary:hover { background: var(--teal-soft); color: var(--teal-dark); }
.btn.lilac { background: var(--lilac-dark); border-color: var(--lilac-dark); }
.btn.lilac:hover { filter: brightness(.88); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.danger.secondary { background: transparent; color: var(--danger); }
.btn.small { padding: .35em .85em; font-size: .9em; }
.btn.big { padding: .9em 1.6em; font-size: 1.1em; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--teal); font: inherit; cursor: pointer;
  text-decoration: underline; }
.link-btn.danger { color: var(--danger); }

/* Kaarten en meldingen */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem;
  box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.card.soft { background: var(--teal-soft); border-color: transparent; box-shadow: none; }
.card.lilac { background: var(--lilac-soft); border-color: transparent; box-shadow: none; }
.card h2, .card h3 { margin-top: 0; }
.messages { list-style: none; padding: 0; margin: 1rem 0; }
.alert { padding: .8em 1em; border-radius: var(--radius-sm); margin: 0 0 .6rem; border: 1px solid transparent; }
.alert.success { background: var(--ok-soft); border-color: #b9e0cb; color: #14532f; }
.alert.error { background: var(--danger-soft); border-color: #f2c1bb; color: #7b1912; }
.alert.warning { background: var(--warn-soft); border-color: #f4d7a6; color: #6b3f00; }
.alert.info { background: var(--teal-soft); border-color: var(--line-strong); color: var(--teal-dark); }
.badge { display: inline-block; padding: .15em .6em; border-radius: 999px; font-size: .8em; font-weight: 600;
  background: var(--teal-soft); color: var(--teal-dark); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.grey { background: #eef1f2; color: var(--muted); }
.badge.lilac { background: var(--lilac-soft); color: var(--lilac-dark); }

/* Formulieren */
form p { margin: 0 0 1rem; }
label { display: block; font-weight: 600; margin-bottom: .3em; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time],
input[type=datetime-local], input[type=tel], input[type=search], input[type=url], input:not([type]), select, textarea {
  width: 100%; padding: .6em .75em; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: #fff;
}
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px var(--teal-soft); }
input[type=checkbox], input[type=radio] { width: 1.15em; height: 1.15em; accent-color: var(--teal); vertical-align: middle; }
.helptext, .help { display: block; color: var(--muted); font-size: .88em; margin-top: .25em; font-weight: normal; }
.errorlist { list-style: none; margin: .3em 0 0; padding: 0; color: var(--danger); font-size: .92em; }
.errorlist.nonfield { background: var(--danger-soft); padding: .7em 1em; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.field { margin-bottom: 1rem; }
.field.check label { display: flex; gap: .6em; align-items: flex-start; font-weight: normal; }
.field.check input { margin-top: .25em; }
.fields-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-top: 1.25rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1.25rem; background: #fff; }
legend { font-weight: 700; padding: 0 .4em; color: var(--teal-dark); }
.code-input { font-size: 1.6em !important; letter-spacing: .3em; text-align: center; max-width: 12ch; }
.hp { position: absolute; left: -9999px; }
/* Django's standaard formulieropmaak */
form > div:not([class]) { margin-bottom: 1rem; }
form > div:not([class]) > label:has(+ input[type=checkbox]) { display: inline; margin-right: .4em; }
ul[id$="-list"], div[id^="id_"] > div { list-style: none; padding: 0; }

/* Tabellen */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: .55em .7em; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: .82em; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 700; background: var(--bg); }
tbody tr:hover { background: var(--bg); }
tr.clickable { cursor: pointer; }
td.num, th.num { text-align: right; white-space: nowrap; }
tfoot td { font-weight: 700; border-top: 2px solid var(--line-strong); }
table.plain th { background: none; text-transform: none; font-size: 1em; letter-spacing: 0; color: var(--muted); width: 35%; }
.total-row td { font-weight: 700; background: var(--teal-soft); }


.auth-box { max-width: 460px; margin: 1rem auto; }
.qr { background: #fff; padding: .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); display: inline-block; }
.qr svg { display: block; width: 240px; height: 240px; max-width: 100%; }
.codes { font-family: ui-monospace, Consolas, monospace; font-size: 1.15em; display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem 1.5rem; padding: 1rem; background: var(--teal-soft); border-radius: var(--radius-sm); }

/* ---------- Backoffice ---------- */
.staff-layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--sidebar) 232px, var(--bg) 232px); }
.sidebar { background: var(--sidebar); color: rgba(255, 255, 255, .8); padding: 1rem .75rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem 1rem; color: #fff; text-decoration: none; font-weight: 700; }
.sidebar .brand img { width: 34px; height: 34px; background: #fff; border-radius: 8px; padding: 2px; }
.sidebar nav a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5em .75em; border-radius: 8px; color: rgba(255, 255, 255, .8); text-decoration: none; font-weight: 500; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar nav a.active { background: var(--teal); color: #fff; }
.sidebar .group { font-size: .72em; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .5); margin: 1rem .75rem .3rem; }
.sidebar .count { background: var(--lilac-dark); color: #fff; border-radius: 999px; font-size: .75em; padding: 0 .5em; }
.staff-main { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 1.5rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar form { margin: 0; }
.topbar .search input { width: 260px; padding: .45em .7em; }
.content { padding: 1.5rem; max-width: 1280px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.6rem; margin: 0; }
.page-head .sub { color: var(--muted); margin-top: .2rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat .label { color: var(--muted); font-size: .85em; font-weight: 600; }
.stat .value { font-size: 1.6rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat a { text-decoration: none; }
.meter { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin: .5rem 0 .3rem; }
.meter span { display: block; height: 100%; background: var(--teal-brand); }
.meter.warn span { background: #e5a23b; }
.meter.over span { background: var(--danger); }
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--line); margin-bottom: 1.25rem; flex-wrap: wrap; }
.tabs a { padding: .55em 1em; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tabs a.active { color: var(--teal-dark); border-bottom-color: var(--teal); }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.filters input, .filters select { width: auto; }
.filters .field { margin: 0; }
.pill-links { display: flex; gap: .35rem; flex-wrap: wrap; }
.pill-links a { padding: .3em .8em; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .9em; }
.pill-links a.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: 0; }
.dl dt { color: var(--muted); font-weight: 600; }
.dl dd { margin: 0; }
/* Aandacht voor een veld met een fout of een vergeten vinkje (static/js/forms.js): twee rustige roze golfjes */
@keyframes attention-pulse {
  0%, 100% { background-color: rgba(222, 78, 115, 0); box-shadow: 0 0 0 .6rem rgba(222, 78, 115, 0); }
  40% { background-color: rgba(222, 78, 115, .14); box-shadow: 0 0 0 .6rem rgba(222, 78, 115, .14); }
}
.field.attention { border-radius: 6px; animation: attention-pulse 1.6s ease-in-out 2; }
.field.attention input[type="checkbox"] { outline: 2px solid var(--danger); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .field.attention { animation: none; background-color: rgba(222, 78, 115, .12); box-shadow: 0 0 0 .6rem rgba(222, 78, 115, .12); }
}

.menu-toggle { display: none; background: none; border: 2px solid var(--line-strong); border-radius: var(--radius-sm); padding: .4em .7em; font: inherit; font-weight: 600; color: var(--ink); }
@media (max-width: 900px) {
  .staff-layout { grid-template-columns: 1fr; background: var(--bg); }
  .sidebar { position: static; height: auto; display: none; }
  .sidebar.open { display: block; }
  .menu-toggle { display: inline-block; }
  .topbar { padding: .6rem 1rem; flex-wrap: wrap; }
  .content { padding: 1rem; }
}
@media print {
  .sidebar, .topbar, .actions, .no-print { display: none !important; }
  .staff-layout { display: block; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* ---------- Platform ---------- */
.auth-page { padding: 2.5rem 0; }
.auth-brand { text-align: center; margin-bottom: 1rem; font-weight: 800; font-size: 1.3rem; color: var(--teal); }
.auth-brand small { display: block; font-weight: 500; font-size: .8rem; color: var(--muted); }
.dot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--line-strong); }
.dot.ok { background: var(--ok); }
.dot.warn { background: #e5a23b; }
.dot.danger { background: var(--danger); }
.log { background: var(--sidebar); color: #e6f1f3; padding: 1rem; border-radius: var(--radius-sm); overflow-x: auto;
  font-size: .85em; line-height: 1.45; white-space: pre-wrap; word-break: break-word; max-height: 70vh; overflow-y: auto; margin: 0; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { padding: .45em 0; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 1rem; }
.info-list li:last-child { border-bottom: 0; }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.terminal { display: block; width: 100%; height: calc(100vh - 260px); min-height: 420px; border: 0; border-radius: var(--radius-sm); background: #000; }

/* ---------- Publieke websites (praktijkwerkt.nl, salonwerkt.nl) ---------- */
body.public { font-size: 17px; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; flex-wrap: wrap; }
.wordmark { font-size: 1.35rem; font-weight: 800; color: var(--teal); text-decoration: none; letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: .5rem 1.1rem; flex-wrap: wrap; }
.nav a:not(.btn) { text-decoration: none; color: var(--ink); font-weight: 600; }
.nav a[aria-current] { color: var(--teal); }
.hero { background: linear-gradient(135deg, var(--teal-soft) 0%, #fff 60%); padding: 3.5rem 0 3rem; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.lead { font-size: 1.15rem; color: var(--muted); }
.section { padding: 2.5rem 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.price-card .price { margin-bottom: .2rem; }
.price-card .amount { font-size: 2rem; font-weight: 800; color: var(--ink); }
.checks { list-style: none; padding: 0; margin: 1rem 0; }
.checks li { padding: .25em 0 .25em 1.6em; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.input-suffix { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; font-weight: 600; color: var(--muted); }
.input-suffix input { width: auto; flex: 1 1 17ch; min-width: 17ch; font-family: ui-monospace, Consolas, monospace; }
.ok-text { color: var(--ok); }
.error-text { color: var(--danger); }
.prose ul { padding-left: 1.2em; }
.prose h2 { margin-top: 1.5em; font-size: 1.25rem; }
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .85); padding: 2rem 0; margin-top: 2rem; font-size: .92em; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.muted-light { color: rgba(255, 255, 255, .6); }
.portal-nav { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.portal-nav a { padding: .45em 1em; border-radius: 999px; text-decoration: none; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: .95em; }
.portal-nav a.active, .portal-nav a:hover { background: var(--teal); border-color: var(--teal); color: #fff; }
.show-sm { display: none; }
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .dl.dl-stack-sm { grid-template-columns: 1fr; gap: .1rem; }
  .dl.dl-stack-sm dd { margin-bottom: .6rem; }
  .show-sm { display: block; font-size: .85em; white-space: nowrap; }
}

/* Versie van het beheer onderin het menu (templates/beheer/base.html) */
.sidebar .app-version { display: block; margin: 1rem .75em .25rem; font-size: .78em; color: rgba(255, 255, 255, .45); }

/* Handleiding beheer (templates/beheer/handleiding/) */
.manual { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 2rem; align-items: start; }
.manual-toc { position: sticky; top: 1rem; }
.manual-toc ol { margin: 0; padding-left: 1.2rem; line-height: 1.9; font-size: .95em; }
.manual-body { max-width: 860px; }
.manual-body section { scroll-margin-top: 1rem; margin-bottom: 2.5rem; }
.manual-body h2 { border-bottom: 2px solid var(--line); padding-bottom: .35rem; }
.manual-body h3 { margin-top: 1.4rem; }
.manual-body li { margin-bottom: .35rem; }
.manual-body .tip { background: var(--teal-soft); border-left: 4px solid var(--teal); padding: .7rem 1rem; border-radius: var(--radius-sm); margin: 1rem 0; }
.manual-body .warn { background: var(--warn-soft); border-left: 4px solid var(--warn); padding: .7rem 1rem; border-radius: var(--radius-sm); margin: 1rem 0; }
@media (max-width: 900px) { .manual { grid-template-columns: 1fr; } .manual-toc { position: static; } }

/* ---------- Website: propositie, stappen, vragen ---------- */
.center { text-align: center; }
.narrow-center { max-width: 720px; margin-left: auto; margin-right: auto; }
.small { font-size: .9em; }
.h3 { font-size: 1.15rem; }
.hero-grid { display: grid; gap: 2rem; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: center; }
.hero-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.5rem 0 .6rem; }
.hero-card { box-shadow: var(--shadow); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.steps-row { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.steps-row li { position: relative; padding-top: 2.4rem; }
.step-no { position: absolute; top: -1rem; left: 1.25rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 1.1rem; }
.features .feature { padding: .25rem .25rem 0; }
.features .icon { color: var(--teal); margin-bottom: .4rem; }
.features h3 { margin-bottom: .3em; }
.features p { color: var(--muted); }
.price-line .amount { font-size: 2.4rem; font-weight: 800; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .6rem; }
.faq summary { cursor: pointer; padding: .8rem 1rem; font-weight: 700; }
.faq details p { padding: 0 1rem 1rem; margin: 0; color: var(--muted); }
.cta { background: var(--teal); color: #fff; }
.cta h2, .cta a:not(.btn) { color: #fff; }
.cta .btn { background: #fff; color: var(--teal); border-color: #fff; }
.wizard-steps { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; gap: .4rem 1.2rem; flex-wrap: wrap; font-size: .92em; color: var(--muted); }
.wizard-steps li { display: flex; align-items: center; gap: .4rem; }
.wizard-steps span { width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; font-weight: 700; font-size: .85em; }
.wizard-steps li.current { color: var(--ink); font-weight: 700; }
.wizard-steps li.current span { border-color: var(--teal); background: var(--teal); color: #fff; }
.wizard-steps li.done span { border-color: var(--teal); color: var(--teal); }
.wizard-steps li.current span, .wizard-steps li.done.current span { border-color: var(--teal); background: var(--teal); color: #fff; }
.kvk-card { margin-bottom: 1rem; }
.kvk-card p { margin-bottom: .3rem; }

/* ---------- Klantportaal: inrichten (onboarding) ---------- */
.file-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.file-list li { display: flex; align-items: center; gap: .8rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); }
.file-list li > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.file-list img, .file-icon { width: 56px; height: 56px; object-fit: contain; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); flex: none; }
.file-icon { display: grid; place-items: center; font-weight: 800; font-size: .75em; color: var(--muted); }
.upload-row { display: grid; gap: 0 1rem; grid-template-columns: minmax(160px, 1fr) minmax(200px, 2fr) auto; align-items: end; }
@media (max-width: 700px) { .upload-row { grid-template-columns: 1fr; } }
.wizard-steps a { color: inherit; text-decoration: none; }
.onboarding-chat { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: .6rem; }
.chat-log { min-height: 340px; max-height: 62vh; overflow-y: auto; display: flex; flex-direction: column; gap: .6rem; padding: .25rem; }
.chat-msg { padding: .7rem 1rem; border-radius: var(--radius); max-width: 88%; overflow-wrap: anywhere; }
.chat-msg p { margin: 0 0 .5em; } .chat-msg p:last-child, .chat-msg ul:last-child { margin-bottom: 0; }
.chat-msg ul { margin: 0 0 .5em; padding-left: 1.2em; }
.chat-msg h3 { font-size: 1rem; margin: .4em 0 .3em; }
.chat-msg.assistant { background: var(--teal-soft); align-self: flex-start; }
.chat-msg.user { background: #fff; border: 1px solid var(--line); align-self: flex-end; }
.chat-msg.error { background: var(--danger-soft); color: #7b1912; align-self: stretch; }
.chat-tool { align-self: flex-start; padding-left: .5rem; }
.chat-form { display: flex; gap: .5rem; align-items: flex-end; }
.chat-form textarea { flex: 1; resize: vertical; min-height: 3em; }
.proposal-section { margin-bottom: 1.25rem; }
.proposal-section table { width: 100%; border-collapse: collapse; font-size: .92em; }
.proposal-section th, .proposal-section td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.proposal-section td.text { white-space: pre-line; max-width: 34ch; }
.proposal-section img { max-height: 64px; max-width: 160px; }
.table-scroll { overflow-x: auto; }
