/* Lead Hunter — gri rece, cobalt, ștampile de verificare. */
:root {
  --mist: #EDEFF3;
  --paper: #FFFFFF;
  --paper-2: #F6F7F9;
  --ink: #15171C;
  --ink-2: #5B616E;
  --ink-3: #8A909C;
  --line: #DDE1E8;
  --cobalt: #2F4BFF;
  --cobalt-ink: #FFFFFF;
  --cobalt-soft: #E3E8FF;
  --pass: #0E9F6E;
  --pass-soft: #DDF5EC;
  --fail: #E5484D;
  --fail-soft: #FDE7E8;
  --hold: #C27A00;
  --hold-soft: #FFF1D6;
  --bubble-in: #FFFFFF;
  --bubble-out: #E3E8FF;
  --shadow: 0 1px 2px rgba(21, 23, 28, .06), 0 8px 24px -12px rgba(21, 23, 28, .18);
  --radius: 14px;
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Geist', 'Segoe UI', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mist: #0F1116; --paper: #171A21; --paper-2: #1D2029; --ink: #E8EAF0; --ink-2: #A3A9B6; --ink-3: #6E7482; --line: #272B35;
    --cobalt: #6F83FF; --cobalt-ink: #0F1116; --cobalt-soft: #20284D; --pass: #34C38F; --pass-soft: #12362A; --fail: #FF6B6F; --fail-soft: #3D1A1C;
    --hold: #F0A83A; --hold-soft: #3A2B10; --bubble-in: #1D2029; --bubble-out: #232C57; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --mist: #0F1116; --paper: #171A21; --paper-2: #1D2029; --ink: #E8EAF0; --ink-2: #A3A9B6; --ink-3: #6E7482; --line: #272B35;
  --cobalt: #6F83FF; --cobalt-ink: #0F1116; --cobalt-soft: #20284D; --pass: #34C38F; --pass-soft: #12362A; --fail: #FF6B6F; --fail-soft: #3D1A1C;
  --hold: #F0A83A; --hold-soft: #3A2B10; --bubble-in: #1D2029; --bubble-out: #232C57; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--mist); color: var(--ink); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--cobalt); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; border-radius: 6px; }
.mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.hidden { display: none !important; }

/* ---------- cadru ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; height: 100vh; height: 100dvh; }
.rail { display: flex; flex-direction: column; gap: 4px; padding: 20px 14px; border-right: 1px solid var(--line); background: var(--paper-2); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; font: 800 20px/1 var(--display); letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 500; }
.nav a:hover { background: var(--mist); color: var(--ink); text-decoration: none; }
.nav a.on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--cobalt); color: var(--cobalt-ink); font: 600 11.5px/20px var(--mono); text-align: center; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.wa-pill { display: flex; align-items: center; gap: 9px; padding: 10px 11px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); font-size: 13.5px; }
.wa-pill:hover { text-decoration: none; border-color: var(--cobalt); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot.ok { background: var(--pass); box-shadow: 0 0 0 3px var(--pass-soft); }
.dot.warn { background: var(--hold); box-shadow: 0 0 0 3px var(--hold-soft); }
.dot.bad { background: var(--fail); box-shadow: 0 0 0 3px var(--fail-soft); }
.main { overflow: auto; min-width: 0; }
.page { max-width: 1240px; margin: 0 auto; padding: 28px 32px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font: 800 34px/1.05 var(--display); letter-spacing: -.03em; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); }

/* ---------- elemente ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--cobalt); border-color: var(--cobalt); color: var(--cobalt-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--fail); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--paper-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn svg { width: 16px; height: 16px; }
.btn.wa { background: #1FAF5A; border-color: #1FAF5A; color: #fff; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 0; }
.card-h h2, .card-h h3 { margin: 0; font: 700 17px/1.2 var(--display); letter-spacing: -.01em; }
.card-b { padding: 14px 18px 18px; }
.grid2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.in, textarea.in, select.in { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 14.5px; }
textarea.in { resize: vertical; min-height: 84px; line-height: 1.45; }
.in:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
.hint { font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-size: 13.5px; }
.seg button.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: var(--paper-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.chip.good { background: var(--pass-soft); border-color: transparent; color: var(--pass); }
.chip.bad { background: var(--fail-soft); border-color: transparent; color: var(--fail); }
.chip.warn { background: var(--hold-soft); border-color: transparent; color: var(--hold); }
.chip.blue { background: var(--cobalt-soft); border-color: transparent; color: var(--cobalt); }
.empty { padding: 34px 20px; text-align: center; color: var(--ink-2); }
.empty h3 { margin: 0 0 6px; font: 700 18px var(--display); color: var(--ink); }
.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--paper-2); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { padding: 7px 12px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; color: var(--ink-2); font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.tabs button.on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.tabs .n { font: 500 11.5px var(--mono); color: var(--ink-3); margin-left: 4px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .in { width: auto; }
.search { min-width: 220px; }
.bar { height: 6px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--cobalt); border-radius: inherit; transition: width .6s ease; }

/* ---------- ștampilele: semnătura aplicației ---------- */
.stamps { display: flex; gap: 6px; align-items: center; }
.stamp { --c: var(--ink-3); --bg: transparent; position: relative; display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid var(--c); color: var(--c); background: var(--bg); transform: rotate(-8deg); font: 700 13px/1 var(--mono); flex: none; }
.stamp::before { content: ''; position: absolute; inset: 3px; border-radius: 50%; border: 1px dashed var(--c); opacity: .7; }
.stamp small { position: absolute; top: 7px; font: 700 7px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; }
.stamp b { margin-top: 7px; font-weight: 700; }
.stamp.pass { --c: var(--pass); --bg: var(--pass-soft); }
.stamp.fail { --c: var(--fail); --bg: var(--fail-soft); }
.stamp.hold { --c: var(--hold); --bg: var(--hold-soft); }
.stamp.wait { --c: var(--ink-3); border-style: dashed; }
.stamp.wait::before { display: none; }
.stamp:nth-child(2) { transform: rotate(6deg); }
.stamp.fresh { animation: stamp .45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes stamp { from { transform: scale(1.8) rotate(-20deg); opacity: 0; } to { opacity: 1; } }
.stamps.big .stamp { width: 74px; height: 74px; font-size: 19px; border-width: 3px; }
.stamps.big .stamp::before { inset: 5px; }
.stamps.big .stamp small { top: 12px; font-size: 9px; }
.stamps.big .stamp b { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .stamp.fresh { animation: none; } .bar i { transition: none; } }

/* ---------- panou ---------- */
.tally { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.tally a { background: var(--paper); padding: 16px 18px; color: var(--ink); }
.tally a:hover { text-decoration: none; background: var(--paper-2); }
.tally b { display: block; font: 800 38px/1 var(--display); letter-spacing: -.03em; }
.tally span { font-size: 13px; color: var(--ink-2); }
.funnel { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 10px; }
.funnel div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.funnel i { width: 100%; max-width: 26px; border-radius: 6px 6px 2px 2px; background: var(--cobalt-soft); }
.funnel i.q { background: var(--cobalt); }
.funnel em { font: 400 10.5px var(--mono); color: var(--ink-3); font-style: normal; }

/* ---------- rânduri de lead ---------- */
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 100px minmax(0, 1.4fr) minmax(0, 1.6fr) auto; gap: 16px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--paper-2); }
.row .who b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .who span { font-size: 13px; color: var(--ink-2); }
.row .why { font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .meta { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.row .stamp { width: 40px; height: 40px; font-size: 11.5px; }
.row .stamp small { top: 6px; font-size: 6.5px; }
.row .stamp b { margin-top: 6px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 500; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.calificat { background: var(--pass-soft); color: var(--pass); }
.status.de_verificat { background: var(--hold-soft); color: var(--hold); }
.status.respins, .status.pierdut { background: var(--fail-soft); color: var(--fail); }
.status.contactat, .status.raspuns, .status.negociere { background: var(--cobalt-soft); color: var(--cobalt); }
.status.castigat { background: var(--pass); color: #fff; }
.ico { width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 8px; background: var(--paper-2); color: var(--ink-3); }
.ico.on { color: var(--pass); background: var(--pass-soft); }
.ico svg { width: 14px; height: 14px; }

/* ---------- sertar (dosar) ---------- */
.scrim { position: fixed; inset: 0; background: rgba(15, 17, 22, .38); z-index: 40; animation: fade .2s both; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100vw); background: var(--mist); z-index: 41; overflow: auto; box-shadow: -20px 0 60px -30px rgba(0,0,0,.5); animation: slide .28s cubic-bezier(.2, .8, .2, 1) both; }
.drawer.narrow { width: min(560px, 100vw); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.drawer-h { position: sticky; top: 0; z-index: 2; display: flex; gap: 16px; align-items: flex-start; padding: 22px 26px 18px; background: var(--mist); border-bottom: 1px solid var(--line); }
.drawer-h h2 { margin: 0; font: 800 27px/1.1 var(--display); letter-spacing: -.02em; }
.drawer-h .x { margin-left: auto; }
.drawer-b { padding: 20px 26px 60px; display: flex; flex-direction: column; gap: 16px; }
.sec h3 { margin: 0 0 10px; font: 700 13px/1 var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.flags { display: flex; flex-direction: column; gap: 2px; }
.flag { display: grid; grid-template-columns: 44px 1fr; gap: 8px; font-size: 14px; padding: 3px 0; }
.flag b { font: 500 13px/1.6 var(--mono); text-align: right; color: var(--pass); }
.flag b.neg { color: var(--fail); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.shots { display: flex; gap: 12px; align-items: flex-start; }
.shots img { border-radius: 10px; border: 1px solid var(--line); background: var(--paper); cursor: zoom-in; }
.shots .m { width: 130px; }
.shots .d { flex: 1; min-width: 0; width: 100%; }
.verdict { padding: 16px 18px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--ink-3); }
.verdict.pass { border-left-color: var(--pass); }
.verdict.fail { border-left-color: var(--fail); }
.verdict.hold { border-left-color: var(--hold); }
.verdict p { margin: 0 0 8px; }
.verdict ul { margin: 4px 0 10px; padding-left: 18px; }
.msg-card { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 12px 14px; }
.msg-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.msg-card p { margin: 0 0 10px; white-space: pre-wrap; }
.msg-card .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.timeline { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.timeline div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.timeline time { font: 400 12px/1.6 var(--mono); color: var(--ink-3); }

/* ---------- conversații ---------- */
.chat-shell { display: grid; grid-template-columns: 320px minmax(0, 1fr) 340px; height: 100vh; height: 100dvh; }
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--paper-2); }
.chat-list-h { padding: 18px 16px 10px; display: flex; flex-direction: column; gap: 10px; }
.chat-list-h h1 { margin: 0; font: 800 24px/1 var(--display); letter-spacing: -.02em; display: flex; align-items: center; justify-content: space-between; }
.chat-items { overflow: auto; flex: 1; }
.chat-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 10px 16px; cursor: pointer; border-left: 3px solid transparent; }
.chat-item:hover { background: var(--mist); }
.chat-item.on { background: var(--paper); border-left-color: var(--cobalt); }
.avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--cobalt-soft); color: var(--cobalt); font: 700 15px var(--display); flex: none; }
.chat-item b { display: block; font-weight: 600; font-size: 14.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-item p { margin: 0; font-size: 13px; color: var(--ink-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-item aside { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font: 400 11.5px var(--mono); color: var(--ink-3); }
.chat-item .unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--pass); color: #fff; display: grid; place-items: center; font-weight: 600; }
.mode-tag { font: 600 9.5px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 3px 5px; border-radius: 4px; background: var(--cobalt); color: var(--cobalt-ink); }
.thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--mist); }
.thread-h { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--paper); }
.thread-h .who { min-width: 0; }
.thread-h .who b { display: block; font: 700 16px/1.2 var(--display); }
.thread-h .who span { font-size: 12.5px; color: var(--ink-2); }
.thread-h .tabs { margin-left: auto; }
.msgs { flex: 1; overflow: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 4px; }
.day { align-self: center; margin: 12px 0 6px; padding: 3px 10px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); font: 400 11.5px var(--mono); color: var(--ink-2); }
.bubble { max-width: min(560px, 78%); padding: 8px 12px 6px; border-radius: 14px; background: var(--bubble-in); border: 1px solid var(--line); align-self: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.bubble.me { align-self: flex-end; background: var(--bubble-out); border-color: transparent; }
.bubble .t { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 2px; font: 400 11px var(--mono); color: var(--ink-3); }
.bubble .t .read { color: var(--cobalt); }
.bubble .auto { font: 600 9.5px var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--cobalt); }
.bubble img, .bubble video { display: block; max-width: 100%; max-height: 340px; border-radius: 10px; margin-bottom: 4px; cursor: zoom-in; }
.bubble audio { max-width: 260px; }
.bubble .doc { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--paper-2); color: var(--ink); margin-bottom: 4px; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--paper); }
.composer textarea { flex: 1; min-height: 42px; max-height: 180px; resize: none; }
.composer .btn { height: 42px; }
.attach-preview { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--paper-2); border-top: 1px solid var(--line); font-size: 13.5px; }
.attach-preview img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.coach { border-left: 1px solid var(--line); overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; background: var(--paper-2); }
.coach h3 { margin: 0; font: 700 13px var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.temp { display: flex; align-items: center; gap: 10px; }
.temp .bar { flex: 1; }
.sugg { border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-size: 14px; }
.sugg:hover { border-color: var(--cobalt); }
.sugg b { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--cobalt); margin-bottom: 3px; }
.qr-card { margin: auto; max-width: 420px; text-align: center; padding: 30px; }
.qr-card img { width: 264px; height: 264px; border-radius: 14px; background: #fff; padding: 10px; border: 1px solid var(--line); }
.qr-card h2 { font: 800 24px/1.15 var(--display); margin: 0 0 8px; }
.qr-card ol { text-align: left; color: var(--ink-2); font-size: 14px; padding-left: 20px; }

/* ---------- log căutare ---------- */
.log { font: 400 12.5px/1.6 var(--mono); max-height: 420px; overflow: auto; background: var(--paper-2); border-radius: 10px; padding: 10px 12px; border: 1px solid var(--line); }
.log div { white-space: pre-wrap; }
.log .warn { color: var(--hold); }
.log .error { color: var(--fail); }
.log .good { color: var(--pass); }
.log time { color: var(--ink-3); margin-right: 8px; }

/* ---------- login + toast ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 30px; }
.login h1 { margin: 0 0 4px; font: 800 30px/1 var(--display); letter-spacing: -.03em; display: flex; align-items: center; gap: 10px; }
.err { color: var(--fail); font-size: 13.5px; min-height: 1.2em; }
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { max-width: 380px; padding: 11px 14px; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: 14px; box-shadow: var(--shadow); animation: slide .25s both; }
.toast.error { background: var(--fail); color: #fff; }
.toast.good { background: var(--pass); color: #fff; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.82); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.back { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .chat-shell { grid-template-columns: 290px minmax(0, 1fr); }
  .chat-shell .coach { display: none; }
  .chat-shell.coach-open .coach { display: flex; position: fixed; right: 0; top: 0; bottom: 0; width: min(360px, 92vw); z-index: 30; box-shadow: var(--shadow); }
}
@media (max-width: 980px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .tally { grid-template-columns: repeat(2, 1fr); }
  .row { grid-template-columns: 90px minmax(0, 1fr) auto; }
  .row .why { display: none; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .rail { order: 2; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); gap: 0; }
  .brand, .rail-foot .btn { display: none; }
  .nav { display: flex; flex: 1; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 10.5px; position: relative; }
  .nav a.on { box-shadow: none; background: transparent; color: var(--cobalt); }
  .nav .count { position: absolute; top: 0; right: 2px; min-width: 16px; font-size: 10px; line-height: 16px; padding: 0 4px; }
  .rail-foot { margin: 0; flex-direction: row; }
  .wa-pill { padding: 6px; border: 0; background: transparent; flex-direction: column; font-size: 10.5px; gap: 4px; }
  .wa-pill .lbl { display: none; }
  .page { padding: 18px 16px 40px; }
  .page-head h1 { font-size: 28px; }
  .form-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr auto; gap: 10px; padding: 12px; }
  .row .stamps { order: 2; }
  .row .meta { display: none; }
  .kv { grid-template-columns: 1fr; gap: 0 0; }
  .kv dt { margin-top: 8px; }
  .drawer-h, .drawer-b { padding-left: 16px; padding-right: 16px; }
  .drawer-h h2 { font-size: 22px; }
  .stamps.big .stamp { width: 58px; height: 58px; font-size: 15px; }
  .chat-shell { grid-template-columns: 1fr; height: 100%; }
  .chat-shell .thread { display: none; }
  .chat-shell.has-chat .chat-list { display: none; }
  .chat-shell.has-chat .thread { display: flex; }
  .back { display: inline-flex; }
  .thread-h { flex-wrap: wrap; padding: 10px 12px; }
  .thread-h .tabs { margin-left: 0; width: 100%; }
  .msgs { padding: 12px; }
  .bubble { max-width: 88%; }
  .shots { flex-direction: column; }
  .shots .m { width: 150px; }
  .main { height: 100%; }
  .shell { height: 100dvh; }
}
