/* =====================================================================
   BABSAIK SHEBA — "Ledger & Trust" design system
   Shared by the public website, client portal and admin console.
   ===================================================================== */
:root {
  --bg: #F3F7F6; --surface: #FFFFFF; --surface-2: #E8F0EE; --ink: #0C2526; --ink-2: #47605F; --line: #D2DEDB;
  --brand: #0B5D4B; --brand-dark: #084537; --brand-ink: #FFFFFF; --accent: #E3A008; --accent-ink: #2A1C00; --accent-soft: #F8ECC8;
  --ledger: rgba(11, 93, 75, .08); --margin: rgba(196, 52, 43, .45);
  --band: #0A3A35; --band-ink: #EAF5F2; --band-ink-2: #A9C9C3; --band-line: rgba(255, 255, 255, .14);
  --ok: #17744A; --warn: #9A5B00; --bad: #B3261E; --info: #1D5CA3;
  --ok-bg: #DDF3E7; --warn-bg: #FBEBCB; --bad-bg: #F9DEDB; --info-bg: #DEEAF8; --neutral-bg: #E6ECEB;
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --r: 6px; --shadow-hard: 6px 6px 0 var(--accent); --shadow-soft: 0 1px 2px rgba(12, 37, 38, .06);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #071314; --surface: #0E2123; --surface-2: #133130; --ink: #E4F0EE; --ink-2: #9CB6B2; --line: #22403F;
  --brand: #3DBB98; --brand-dark: #2C9C7E; --brand-ink: #04201A; --accent: #F2B53C; --accent-ink: #2A1C00; --accent-soft: #2D2611;
  --ledger: rgba(61, 187, 152, .07); --margin: rgba(240, 110, 100, .45);
  --band: #0B2927; --band-ink: #E4F0EE; --band-ink-2: #9CB6B2; --band-line: rgba(255, 255, 255, .1);
  --ok: #59D49A; --warn: #F2B53C; --bad: #FF8A80; --info: #7DB6F2;
  --ok-bg: #12382A; --warn-bg: #392C0E; --bad-bg: #40191A; --info-bg: #132B47; --neutral-bg: #1A3332;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
code, .mono { font-family: var(--font-mono); font-size: .92em; letter-spacing: .02em; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.tiny { font-size: .75rem; }
.eyebrow { font: 500 .75rem/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: .75rem; display: block; }
.text-brand { color: var(--brand); }
.text-bad { color: var(--bad); }
.text-ok { color: var(--ok); }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; z-index: 999; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 860px; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-tight { padding: 2.5rem 0; }
.section-alt { background: var(--surface-2); }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: .5rem; }
.row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head p { max-width: 520px; color: var(--ink-2); margin: 0; }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-sidebar { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.15rem; border-radius: var(--r); border: 1px solid transparent;
  font: 600 .9375rem/1.25 var(--font-body); letter-spacing: .01em; cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s, transform .05s, color .15s; white-space: nowrap; }
.btn:active { transform: translate(1px, 1px); }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand-dark); }
.btn-primary:hover { background: var(--brand-dark); color: var(--brand-ink); box-shadow: 3px 3px 0 var(--accent); }
.btn-secondary { background: var(--surface); color: var(--brand); border-color: var(--brand); }
.btn-secondary:hover { background: var(--surface-2); color: var(--brand); }
.btn-amber { background: var(--accent); color: var(--accent-ink); border-color: #C78A00; }
.btn-amber:hover { filter: brightness(1.05); color: var(--accent-ink); box-shadow: 3px 3px 0 var(--brand); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.btn-danger:hover { background: var(--bad); color: #fff; }
.btn-whatsapp { background: #1F8F4E; color: #fff; border-color: #17703C; }
.btn-whatsapp:hover { background: #17703C; color: #fff; }
.btn-sm { padding: .4rem .7rem; font-size: .8125rem; }
.btn-xs { padding: .2rem .5rem; font-size: .75rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.link-btn.danger { color: var(--bad); }

/* ---------- icons (inline SVG sprite) ---------- */
.icon { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field > label, .label { font: 600 .875rem/1.3 var(--font-body); color: var(--ink); }
.req { color: var(--bad); margin-left: 2px; }
.hint { font-size: .78rem; color: var(--ink-2); }
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=search], input[type=url], select, textarea {
  width: 100%; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r);
  padding: .65rem .8rem; font: 400 1rem/1.4 var(--font-body); transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 93, 75, .15); }
input.mono-input { font-family: var(--font-mono); letter-spacing: .06em; }
.has-error input, .has-error select, .has-error textarea, input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: .8rem; margin: 0; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: .15rem; flex: none; }
.choice-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span { display: inline-block; border: 1px solid var(--line); border-radius: var(--r); padding: .5rem .85rem; font-size: .9rem; cursor: pointer; background: var(--surface); }
.choice input:checked + span { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-top: 1.5rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem; margin: 0 0 1.25rem; }
legend { font: 600 .75rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--brand); padding: 0 .5rem; }

/* switch */
.switch { display: inline-flex; align-items: center; gap: .65rem; cursor: pointer; font-size: .92rem; }
.switch input { appearance: none; -webkit-appearance: none; width: 40px; height: 22px; background: var(--line); border-radius: 999px; position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }

/* chips (multi-select) */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r); padding: .45rem .75rem; font: 500 .875rem var(--font-body); cursor: pointer; }
.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.chip .count { font: 500 .72rem var(--font-mono); background: var(--surface-2); color: var(--ink-2); border-radius: 999px; padding: 0 .45rem; }
.chip.is-active .count { background: rgba(255, 255, 255, .2); color: inherit; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem; }
.card-sm { padding: 1rem; }
.card-flush { padding: 0; overflow: hidden; }
.card-hero { box-shadow: var(--shadow-hard); border-color: var(--ink); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.1rem; }
.card-body { padding: 1.25rem; }
.dossier { position: relative; padding-left: 2.5rem; }
.dossier::before { content: ''; position: absolute; left: 1.25rem; top: 0; bottom: 0; border-left: 1px solid var(--margin); }
.band { background: var(--band); color: var(--band-ink); }
.band h1, .band h2, .band h3, .band h4 { color: var(--band-ink); }
.band .muted, .band .eyebrow { color: var(--band-ink-2); }
.band a:not(.btn) { color: var(--band-ink); }

/* stat tiles */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.15rem 1.25rem; position: relative; }
.stat .stat-label { font: 500 .72rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.stat .stat-value { font: 700 2.2rem/1.1 var(--font-display); margin: .35rem 0 .2rem; color: var(--ink); }
.stat .stat-foot { font-size: .8rem; color: var(--ink-2); }
.stat.tone-warn { border-left: 4px solid var(--accent); }
.stat.tone-bad { border-left: 4px solid var(--bad); }
.stat.tone-ok { border-left: 4px solid var(--ok); }
.stat.tone-brand { border-left: 4px solid var(--brand); }
a.stat { text-decoration: none; display: block; }
a.stat:hover { box-shadow: 4px 4px 0 var(--accent); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; font: 500 .72rem/1.4 var(--font-mono); letter-spacing: .04em; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-brand { background: var(--surface-2); color: var(--brand); }
.badge-neutral { background: var(--neutral-bg); color: var(--ink-2); }
.tag { display: inline-block; font: 500 .72rem var(--font-mono); letter-spacing: .05em; background: var(--surface-2); color: var(--ink-2); border-radius: 4px; padding: .1rem .45rem; }

/* ---------- alerts / flash ---------- */
.alert { border-radius: var(--r); padding: .85rem 1rem; border: 1px solid transparent; font-size: .92rem; display: flex; gap: .65rem; align-items: flex-start; }
.alert-ok, .alert-success { background: var(--ok-bg); color: var(--ok); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert-error, .alert-bad { background: var(--bad-bg); color: var(--bad); }
.alert-info { background: var(--info-bg); color: var(--info); }
.alert p:last-child { margin: 0; }
.flash-stack { display: grid; gap: .5rem; margin-bottom: 1.25rem; }
.notice-margin { border-left: 3px solid var(--bad); background: var(--surface); padding: .75rem 1rem; border-radius: 0 var(--r) var(--r) 0; font-size: .9rem; }
.notice-margin.warn { border-left-color: var(--accent); }

/* ---------- tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { background: var(--surface-2); font: 600 .72rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--bg) 60%, var(--surface)); }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-family: var(--font-mono); }
.table a.row-link { color: var(--ink); font-weight: 600; text-decoration: none; }
.table a.row-link:hover { color: var(--brand); text-decoration: underline; }
.table .actions { display: flex; gap: .35rem; justify-content: flex-end; flex-wrap: wrap; }
.table-check { width: 36px; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--ink-2); }
.empty .icon { width: 2rem; height: 2rem; margin: 0 auto .5rem; opacity: .6; }

/* key-value list */
.kv { display: grid; grid-template-columns: 150px 1fr; gap: .45rem 1rem; font-size: .92rem; margin: 0; }
.kv dt { color: var(--ink-2); font: 500 .75rem/1.9 var(--font-mono); text-transform: uppercase; letter-spacing: .05em; }
.kv dd { margin: 0; word-break: break-word; }

/* ---------- pagination / toolbar ---------- */
.toolbar { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.toolbar input[type=search], .toolbar select { width: auto; min-width: 180px; padding: .5rem .7rem; font-size: .9rem; }
.toolbar .grow { flex: 1; min-width: 200px; }
.pagination { display: flex; gap: .35rem; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; font-size: .85rem; color: var(--ink-2); flex-wrap: wrap; }
.pagination .pages { display: flex; gap: .3rem; }
.pagination a, .pagination span.cur { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); background: var(--surface); padding: 0 .5rem; }
.pagination span.cur { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs a, .tabs button { padding: .7rem 1rem; text-decoration: none; color: var(--ink-2); border: 0; background: none; border-bottom: 2px solid transparent; font: 600 .9rem var(--font-body); cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs a.is-active, .tabs button.is-active, .tabs [aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1.15rem 1.75rem; font-size: .9rem; }
.timeline li::before { content: ''; position: absolute; left: 0; top: 5px; width: 15px; height: 15px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.timeline li.is-internal::before { border-color: var(--accent); background: var(--accent-soft); }
.timeline li.is-notice::before { border-color: var(--bad); }
.timeline .when { font: 500 .72rem var(--font-mono); color: var(--ink-2); }
.timeline .who { font-weight: 600; }
.timeline .msg { margin-top: .2rem; white-space: pre-line; }

/* ---------- dropzone & progress ---------- */
.dropzone { border: 1.5px dashed var(--line); border-radius: var(--r); padding: 2rem 1rem; text-align: center; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone.is-over { border-color: var(--brand); background: var(--surface-2); }
.dropzone .icon { width: 2.25rem; height: 2.25rem; margin: 0 auto .5rem; color: var(--brand); }
.file-list { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: .4rem; }
.file-list li { display: flex; justify-content: space-between; gap: .75rem; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: .88rem; }
.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }

/* ---------- modal & toast ---------- */
.modal { position: fixed; inset: 0; background: rgba(6, 20, 21, .55); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 200; }
.modal-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-hard); }
.modal-box .card-head { position: sticky; top: 0; background: var(--surface); }
.toast-host { position: fixed; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; z-index: 300; max-width: min(380px, calc(100vw - 2rem)); }
.toast { background: var(--ink); color: var(--bg); padding: .8rem 1rem; border-radius: var(--r); font-size: .9rem; box-shadow: 4px 4px 0 var(--accent); animation: toastIn .2s ease-out; }
.toast.error { background: var(--bad); color: #fff; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* =====================================================================
   PUBLIC WEBSITE
   ===================================================================== */
.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 74px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 42px; height: 42px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; border-radius: var(--r); font: 800 1.05rem var(--font-display); box-shadow: 2px 2px 0 var(--accent); flex: none; }
.brand-logo { height: 44px; width: auto; max-width: 64px; object-fit: contain; flex: none; border-radius: 4px; }
.brand-logo-wide { max-width: 220px; }
.site-footer .brand-logo, .band .brand-logo { background: #fff; padding: 4px; border-radius: 6px; }
.brand-name { font: 700 1.1rem/1 var(--font-display); letter-spacing: -.01em; display: block; }
.brand-tag { font: 500 .62rem/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); display: block; margin-top: 4px; }
.main-nav { display: flex; gap: 1.5rem; align-items: center; }
.main-nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.nav-toggle { display: none; }
.main-nav .show-mobile { display: none; }
@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { position: fixed; top: 74px; left: 0; right: 0; bottom: 0; background: var(--bg); flex-direction: column; align-items: stretch; gap: 0; padding: 1rem 1.25rem; transform: translateX(100%); transition: transform .2s; overflow-y: auto; }
  .main-nav.is-open { transform: none; }
  .main-nav a { padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; color: var(--ink); }
  .header-actions .hide-mobile { display: none; }
  .main-nav .show-mobile { display: block; }
  .brand-tag { display: none; }
}

.hero { position: relative; overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--line); }
.hero::before { content: ''; position: absolute; inset: 0; background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--ledger) 31px 32px); pointer-events: none; }
.hero::after { content: ''; position: absolute; top: 0; bottom: 0; left: max(1.25rem, calc((100vw - 1280px) / 2 + .25rem)); border-left: 1px solid var(--margin); pointer-events: none; }
.hero .container { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 3rem; align-items: center; padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.hero h1 .hl { color: var(--brand); background: linear-gradient(transparent 70%, var(--accent-soft) 70%); }
.hero .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 600px; }
.hero-note { margin-top: 1.75rem; display: inline-flex; flex-direction: column; gap: .2rem; border-left: 3px solid var(--accent); padding: .6rem 1rem; background: var(--bg); border-radius: 0 var(--r) var(--r) 0; font-size: .9rem; }
.hero-note strong { font-family: var(--font-display); }
.builder h3 { font-size: 1.15rem; }
@media (max-width: 960px) { .hero .container { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts > div { padding: 2rem 1.5rem; border-left: 1px solid var(--band-line); }
.facts > div:first-child { border-left: 0; }
.facts .fact-value { font: 700 clamp(1.8rem, 3vw, 2.5rem)/1.1 var(--font-display); color: var(--band-ink); }
.facts .fact-label { font: 500 .7rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: .5rem; }
.facts p { color: var(--band-ink-2); font-size: .88rem; margin: .4rem 0 0; }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, 1fr); } .facts > div:nth-child(3) { border-left: 0; } .facts > div { border-top: 1px solid var(--band-line); } }

.service-card { display: flex; flex-direction: column; gap: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem; text-decoration: none; color: var(--ink); transition: box-shadow .15s, transform .15s; height: 100%; }
.service-card:hover { box-shadow: var(--shadow-hard); transform: translate(-2px, -2px); color: var(--ink); }
.service-card .code { width: 36px; height: 36px; display: grid; place-items: center; background: var(--band); color: var(--band-ink); font: 700 1rem var(--font-display); border-radius: var(--r); margin-bottom: .5rem; }
.service-card h3 { margin: 0; }
.service-card p { color: var(--ink-2); font-size: .93rem; margin: 0; flex: 1; }
.service-card .more { font-weight: 600; color: var(--brand); font-size: .9rem; margin-top: .5rem; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: .6rem; align-items: start; }
.checklist li::before { content: ''; width: 18px; height: 18px; margin-top: .2rem; border-radius: 4px; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }
.checklist.two-col { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .checklist.two-col { grid-template-columns: 1fr; } }

.commit-list { font: 700 clamp(1.8rem, 4.5vw, 3rem)/1.25 var(--font-display); }
.commit-list span { display: block; }
.commit-list span:last-child { color: var(--accent); }

.steps { counter-reset: step; }
.step-card { border-top: 2px solid var(--brand); padding-top: 1rem; }
.step-card .step-no { font: 600 .75rem var(--font-mono); letter-spacing: .1em; color: var(--brand); }

.team-card { display: grid; grid-template-columns: 120px 1fr; gap: 1.5rem; align-items: start; }
.team-photo { width: 120px; height: 120px; border-radius: var(--r); object-fit: cover; background: var(--band); color: var(--band-ink); display: grid; place-items: center; font: 700 2rem var(--font-display); box-shadow: 4px 4px 0 var(--accent); }
.team-card .cred { font: 500 .8rem var(--font-mono); color: var(--brand); letter-spacing: .04em; }
@media (max-width: 640px) { .team-card { grid-template-columns: 1fr; } }

.faq-item { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: .6rem; }
.faq-item summary { padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font: 600 1.3rem/1 var(--font-mono); color: var(--brand); }
.faq-item[open] summary::after { content: '–'; }
.faq-item .faq-a { padding: 0 1.25rem 1.1rem; color: var(--ink-2); }
.faq-item .faq-a p:last-child { margin: 0; }

.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .35rem; }
.prose table { border-collapse: collapse; width: 100%; }
.prose th, .prose td { border: 1px solid var(--line); padding: .5rem; }

.page-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: clamp(2.5rem, 6vw, 4rem) 0; position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--ledger) 31px 32px); pointer-events: none; }
.page-hero .container { position: relative; }
.page-hero p { max-width: 680px; color: var(--ink-2); font-size: 1.08rem; margin: 0; }
.breadcrumbs { font: 500 .75rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: .75rem; }
.breadcrumbs a { color: var(--ink-2); text-decoration: none; }

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.contact-list li { display: grid; grid-template-columns: 22px 1fr; gap: .75rem; }
.contact-list .icon { color: var(--brand); margin-top: .2rem; }

.site-footer { background: var(--band); color: var(--band-ink-2); padding: 3.5rem 0 1.5rem; font-size: .92rem; }
.site-footer h4 { color: var(--band-ink); font: 600 .75rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer a { color: var(--band-ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 2rem; }
.footer-bottom { border-top: 1px solid var(--band-line); margin-top: 2.5rem; padding-top: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .8rem; }
.site-footer .brand { color: var(--band-ink); }
.site-footer .brand-tag { color: var(--band-ink-2); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

.wa-float { position: fixed; right: 1rem; bottom: 1rem; z-index: 90; box-shadow: 3px 3px 0 var(--accent); }

.auth-shell { min-height: calc(100vh - 74px); display: grid; place-items: center; padding: 3rem 1rem; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card.wide { max-width: 720px; }

/* =====================================================================
   APP SHELL (admin console + client portal)
   ===================================================================== */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .brand { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); }
.side-nav { padding: .75rem .75rem 1.5rem; flex: 1; }
.side-nav .group { font: 600 .66rem var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); padding: 1rem .6rem .4rem; }
.side-nav a { display: flex; align-items: center; gap: .65rem; padding: .5rem .65rem; border-radius: var(--r); color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 500; }
.side-nav a:hover { background: var(--surface-2); }
.side-nav a.is-active { background: var(--brand); color: var(--brand-ink); box-shadow: 3px 3px 0 var(--accent); }
.side-nav a .icon { opacity: .85; }
.side-nav .count { margin-left: auto; font: 600 .7rem var(--font-mono); background: var(--accent); color: var(--accent-ink); padding: 0 .45rem; border-radius: 999px; }
.side-foot { padding: 1rem 1.25rem; border-top: 1px solid var(--line); font: 500 .7rem var(--font-mono); color: var(--ink-2); letter-spacing: .05em; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); height: 64px; display: flex; align-items: center; gap: 1rem; padding: 0 1.5rem; }
.topbar .search { flex: 1; max-width: 460px; position: relative; }
.topbar .search input { padding-left: 2.25rem; background: var(--surface); }
.topbar .search .icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--ink-2); }
.topbar .spacer { flex: 1; }
.icon-btn { position: relative; width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: var(--r); border: 1px solid transparent; background: none; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn .dot { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; border-radius: 999px; background: var(--bad); color: #fff; font: 600 .65rem/18px var(--font-mono); text-align: center; padding: 0 4px; }
.user-chip { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.user-chip .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font: 700 .85rem var(--font-display); flex: none; }
.user-chip .meta { line-height: 1.2; font-size: .85rem; }
.user-chip .meta small { display: block; color: var(--ink-2); font-size: .72rem; }
.content { padding: 1.75rem 1.5rem 3rem; max-width: 1400px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(1.5rem, 2.5vw, 2rem); margin: 0; }
.page-head .crumbs { font: 500 .72rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: .35rem; }
.page-head .crumbs a { color: var(--ink-2); text-decoration: none; }
.menu-btn { display: none; }
.sidebar-backdrop { display: none; }
@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 150; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.is-open { transform: none; box-shadow: 6px 0 0 var(--accent); }
  .sidebar-backdrop.is-open { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 140; }
  .menu-btn { display: inline-grid; }
  .user-chip .meta { display: none; }
  .content { padding: 1.25rem 1rem 3rem; }
  .topbar { padding: 0 1rem; }
}

/* Kanban */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(250px, 1fr)); gap: 1rem; overflow-x: auto; padding-bottom: 1rem; align-items: start; }
.kanban-col { background: var(--surface-2); border-radius: var(--r); border: 1px solid var(--line); min-height: 300px; display: flex; flex-direction: column; }
.kanban-col header { padding: .75rem .9rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.kanban-col .col-body { padding: .6rem; display: grid; gap: .6rem; flex: 1; align-content: start; min-height: 120px; }
.kanban-col.is-over { outline: 2px dashed var(--brand); outline-offset: -4px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .75rem; cursor: grab; font-size: .86rem; }
.kcard:hover { box-shadow: 3px 3px 0 var(--accent); }
.kcard.is-dragging { opacity: .5; }
.kcard .kref { font: 500 .7rem var(--font-mono); color: var(--ink-2); }
.kcard a { color: var(--ink); font-weight: 600; text-decoration: none; }

/* Bars (dashboard mini charts) */
.bars { display: grid; gap: .55rem; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 44px; gap: .75rem; align-items: center; font-size: .85rem; }
.bar-track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.bar-fill.tone-warn { background: var(--accent); } .bar-fill.tone-bad { background: var(--bad); } .bar-fill.tone-ok { background: var(--ok); } .bar-fill.tone-info { background: var(--info); } .bar-fill.tone-neutral { background: var(--ink-2); }
.col-chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.col-chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.col-chart .col span.b { width: 100%; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 2px; }
.col-chart .col small { font: 500 .62rem var(--font-mono); color: var(--ink-2); }

/* Notification list */
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li { display: grid; grid-template-columns: 10px 1fr auto; gap: .9rem; padding: .9rem 1.25rem; border-bottom: 1px solid var(--line); align-items: start; }
.notif-list li.unread { background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.notif-list li .ndot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: .5rem; }
.notif-list li:not(.unread) .ndot { background: transparent; }
.notif-dropdown { position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, 92vw); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-hard); z-index: 120; max-height: 70vh; overflow: auto; }
.notif-dropdown .notif-list li { padding: .75rem 1rem; font-size: .88rem; }
.notif-wrap { position: relative; }

/* Portal top nav */
.portal-nav { background: var(--surface); border-bottom: 1px solid var(--line); }
.portal-nav .container { display: flex; gap: .25rem; overflow-x: auto; }
.portal-nav a { padding: .85rem 1rem; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; gap: .45rem; align-items: center; }
.portal-nav a.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.portal-welcome { background: var(--surface); border: 1px solid var(--ink); border-radius: var(--r); padding: 1.75rem; box-shadow: var(--shadow-hard); }
.sub-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.sub-item + .sub-item { margin-top: .6rem; }
.sub-item .ficon { width: 40px; height: 40px; border-radius: var(--r); background: var(--surface-2); display: grid; place-items: center; color: var(--brand); }
.sub-item .title { font-weight: 600; color: var(--ink); text-decoration: none; }
.sub-item .title:hover { color: var(--brand); text-decoration: underline; }
.sub-item .meta { font-size: .8rem; color: var(--ink-2); }
.sub-item .notice-margin { grid-column: 1 / -1; }
@media (max-width: 640px) { .sub-item { grid-template-columns: 40px minmax(0, 1fr); } .sub-item > :last-child:not(.notice-margin) { grid-column: 2; } }
.deadline { display: grid; grid-template-columns: 58px 1fr; gap: .9rem; padding: .85rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.deadline + .deadline { margin-top: .6rem; }
.deadline .date { background: var(--band); color: var(--band-ink); border-radius: var(--r); text-align: center; padding: .4rem .2rem; font: 700 1.2rem/1.1 var(--font-display); }
.deadline .date small { display: block; font: 600 .62rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.deadline .date.recurring { background: var(--accent-soft); color: var(--warn); font-size: .7rem; display: grid; place-items: center; }

@media print {
  .sidebar, .topbar, .site-header, .site-footer, .wa-float, .btn, .toolbar, .portal-nav { display: none !important; }
  .app { display: block; } body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* =====================================================================
   CHAT / MESSAGES
   ===================================================================== */
.chat-shell { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 1rem; height: calc(100vh - 230px); min-height: 480px; }
.chat-threads { display: flex; flex-direction: column; overflow: hidden; }
.thread-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; border-top: 1px solid var(--line); }
.thread-list a { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .75rem 1rem; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.thread-list a:hover { background: var(--surface-2); }
.thread-list a.is-active { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--brand); }
.thread-list .avatar, .chat-head .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font: 700 .85rem var(--font-display); flex: none; }
.thread-list .t-main { min-width: 0; display: flex; flex-direction: column; }
.thread-list .t-name { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-list .t-last { font-size: .8rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-list .t-side { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.thread-list .count { font: 600 .7rem var(--font-mono); background: var(--accent); color: var(--accent-ink); padding: 0 .45rem; border-radius: 999px; }
.chat-panel { display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.chat-solo { height: calc(100vh - 330px); min-height: 460px; }
.chat-head { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.chat-back { display: none; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; background: var(--bg); background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--ledger) 31px 32px); display: flex; flex-direction: column; gap: .5rem; }
.chat-scroll.is-over { outline: 2px dashed var(--brand); outline-offset: -8px; }
.chat-empty { text-align: center; color: var(--ink-2); padding: 3rem 1rem; margin: auto; }
.chat-empty .icon { width: 2.4rem; height: 2.4rem; opacity: .5; }
.chat-day { text-align: center; margin: .5rem 0; }
.chat-day span { font: 500 .7rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); padding: .15rem .6rem; border-radius: 999px; }
.chat-row { display: flex; }
.chat-row.is-mine { justify-content: flex-end; }
.chat-bubble { position: relative; max-width: min(560px, 78%); background: var(--surface); border: 1px solid var(--line); border-radius: 10px 10px 10px 2px; padding: .55rem .8rem .4rem; box-shadow: var(--shadow-soft); }
.chat-row.is-mine .chat-bubble { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); border-radius: 10px 10px 2px 10px; }
.chat-bubble.is-deleted { opacity: .75; background: var(--surface-2); }
.chat-meta { font-size: .75rem; color: var(--ink-2); margin-bottom: .15rem; }
.chat-meta strong { color: var(--brand); }
.chat-text { font-size: .95rem; white-space: normal; word-wrap: break-word; overflow-wrap: anywhere; }
.chat-text .icon { width: 1em; height: 1em; }
.chat-foot { display: flex; gap: .35rem; justify-content: flex-end; font: 500 .66rem var(--font-mono); color: var(--ink-2); margin-top: .2rem; }
.chat-tick { color: var(--ink-2); letter-spacing: -.15em; }
.chat-tick.is-read { color: var(--info); }
.chat-file { display: grid; grid-template-columns: 22px minmax(0, 1fr) 18px; gap: .5rem; align-items: center; margin-top: .4rem; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); text-decoration: none; }
.chat-file:hover { border-color: var(--brand); color: var(--ink); }
.chat-file .name { display: block; font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-file .size { display: block; font: 500 .68rem var(--font-mono); color: var(--ink-2); }
.chat-img img { margin-top: .4rem; max-width: 100%; max-height: 220px; border-radius: 6px; border: 1px solid var(--line); }
.chat-actions { position: absolute; top: -12px; right: 8px; display: none; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 2px; box-shadow: 2px 2px 0 var(--accent); }
.chat-bubble:hover .chat-actions, .chat-bubble:focus-within .chat-actions { display: flex; }
.chat-act { border: 0; background: none; color: var(--ink-2); width: 28px; height: 26px; display: grid; place-items: center; border-radius: 4px; cursor: pointer; }
.chat-act:hover { background: var(--surface-2); color: var(--ink); }
.chat-act.danger:hover { background: var(--bad-bg); color: var(--bad); }
@media (hover: none) { .chat-actions { display: flex; position: static; box-shadow: none; border: 0; padding: 0; margin-top: .3rem; justify-content: flex-end; background: none; } }
.chat-composer { border-top: 1px solid var(--line); background: var(--surface); padding: .65rem .75rem; }
.chat-input-row { display: flex; gap: .5rem; align-items: flex-end; }
.chat-input-row textarea { min-height: 42px; max-height: 160px; resize: none; padding: .6rem .8rem; }
.chat-input-row .btn { height: 42px; }
.chat-attach-list { list-style: none; margin: 0 0 .5rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .8rem; }
.chat-composer .progress { margin-bottom: .5rem; }
.chat-hint { margin-top: .35rem; }
@media (max-width: 900px) {
  .chat-shell { grid-template-columns: 1fr; height: calc(100vh - 200px); }
  .chat-shell.has-thread .chat-threads { display: none; }
  .chat-shell:not(.has-thread) .chat-panel { display: none; }
  .chat-back { display: inline-grid; }
  .chat-bubble { max-width: 88%; }
  .chat-solo { height: calc(100vh - 290px); }
}

@media (max-width: 640px) { .chat-hint .hide-mobile, .chat-input-row .hide-mobile { display: none; } }
