@font-face { font-family: "Roboto"; src: url("/fonts/Roboto.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* The Spa Mart palette: purple #7d2a90 (primary), teal #00a4b2, chartreuse #d7df23, gold #ffcf01, lavender #b88ac2 */
:root {
  --bg: #f9f7f3;
  --panel: #ffffff;
  --panel-2: #fbfaf7;
  --ink: #121212;
  --ink-2: #353535;
  --muted: #535353;
  --line: #e6e6e6;
  --line-2: #f3f3f3;
  --brand: #7d2a90;
  --brand-2: #5e2270;
  --brand-text: #7d2a90;
  --brand-soft: #f3e7f6;
  --brand-ink: #ffffff;
  --teal: #00a4b2;
  --teal-soft: #ebf8fa;
  --teal-line: #cfeef1;
  --teal-ink: #003d43;
  --gold-soft: #fff8d6;
  --gold-line: #f2d24d;
  --lime: #d7df23;
  --lav: #b88ac2;
  --ok: #2e9e46;
  --warn: #ffcf01;
  --warn-ink: #121212;
  --danger: #c62828;
  --danger-soft: #fdecec;
  --staff: #5e2270;
  --staff-soft: #faf3fc;
  --staff-line: #c8a0d3;
  --human: #7d2a90;
  --shadow: 0 1px 2px rgba(18, 18, 18, .06), 0 4px 12px rgba(18, 18, 18, .08);
  --radius: 12px;
  --font: "Roboto", "Poppins", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121012; --panel: #1c191d; --panel-2: #171418; --ink: #f3f3f3; --ink-2: #d6d1d8; --muted: #aaa3ad;
    --line: #2f2a32; --line-2: #252027; --brand: #9c4eae; --brand-2: #b074bf; --brand-text: #d2b0dc; --brand-soft: #2e2033; --brand-ink: #ffffff;
    --teal-soft: #0e2b2f; --teal-line: #164a50; --teal-ink: #9be0e7; --gold-soft: #3a3213; --gold-line: #6b5a14;
    --ok: #4cc764; --danger: #ff8a80; --danger-soft: #3d1f1f;
    --staff: #e3cdea; --staff-soft: #2a1f2e; --staff-line: #6b4a75; --human: #7d2a90;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121012; --panel: #1c191d; --panel-2: #171418; --ink: #f3f3f3; --ink-2: #d6d1d8; --muted: #aaa3ad;
  --line: #2f2a32; --line-2: #252027; --brand: #9c4eae; --brand-2: #b074bf; --brand-text: #d2b0dc; --brand-soft: #2e2033; --brand-ink: #ffffff;
  --teal-soft: #0e2b2f; --teal-line: #164a50; --teal-ink: #9be0e7; --gold-soft: #3a3213; --gold-line: #6b5a14;
  --ok: #4cc764; --danger: #ff8a80; --danger-soft: #3d1f1f;
  --staff: #e3cdea; --staff-soft: #2a1f2e; --staff-line: #6b4a75; --human: #7d2a90;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body, #app { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-text); text-underline-offset: 3px; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- buttons & controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 550; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.warn { background: var(--warn); border-color: var(--warn); color: var(--warn-ink); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.small { height: 28px; padding: 0 11px; font-size: 13px; border-radius: 999px; }
.btn.icon { width: 34px; padding: 0; justify-content: center; }
.seg { display: inline-flex; background: var(--line-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
.seg button:disabled { cursor: default; }
.switch { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; font-weight: 600; font-size: 13px; }
.switch .track { width: 36px; height: 20px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch.on .track { background: var(--brand); }
.switch.on .track::after { transform: translateX(16px); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.pill.open { background: var(--teal-soft); color: var(--teal-ink); }
.pill.closed { color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--muted); }
.dot.working, .dot.on_call { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.dot.on_call { animation: pulse 1.6s infinite; }
.dot.idle { background: var(--lav); }
.dot.waiting { background: var(--warn); animation: pulse 1.2s infinite; }
.dot.error { background: var(--danger); }
.dot.offline { background: transparent; border: 2px solid var(--muted); opacity: .6; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 0%, transparent); opacity: 1; } 50% { opacity: .55; } }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.badge.ai { background: var(--teal-soft); color: var(--teal-ink); }
.badge.waiting { background: var(--warn); color: var(--warn-ink); }
.badge.human { background: var(--brand); color: var(--brand-ink); }
.badge.live { background: var(--lime); color: #121212; }
.badge.open { background: var(--line-2); color: var(--ink-2); }
.badge.closed { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.badge.follow { background: var(--danger-soft); color: var(--danger); }
.badge.draft { background: var(--staff-soft); color: var(--staff); }
.badge.verified { background: var(--teal-soft); color: var(--teal-ink); }
.count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--brand); color: var(--brand-ink); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.count.zero { background: var(--line); color: var(--muted); }
.count.hot { background: var(--warn); color: var(--warn-ink); }
.count.ok { background: var(--teal-soft); color: var(--teal-ink); }

/* ---------- app layout ---------- */
.app { height: 100%; display: grid; grid-template-rows: 56px 1fr; }
.top { display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--line); min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -.01em; font-size: 15px; white-space: nowrap; }
.brand img.logo { height: 26px; width: auto; display: block; }
.brand .divider { width: 1px; height: 22px; background: var(--line); }
.brand .app-name { color: var(--brand-text); font-weight: 700; }
.brand img.mark { height: 26px; width: auto; display: none; }
.top .spacer { flex: 1; }
.top .label { font-size: 12px; color: var(--muted); font-weight: 600; margin-right: -4px; }
.main { display: grid; grid-template-columns: 300px 380px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); min-height: 0; }
.col { min-height: 0; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.col:last-child { border-right: 0; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--brand-text); }
.scroll { overflow-y: auto; min-height: 0; }

/* agents */
.agents { padding: 0 10px 8px; display: grid; gap: 6px; }
.agent { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); text-align: left; width: 100%; }
.agent:hover { border-color: var(--muted); }
.agent.sel { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.agent .name { font-weight: 650; }
.agent .st { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: capitalize; }
.agent .task { grid-column: 2 / 4; font-size: 12.5px; color: var(--ink-2); }
.agent.offline .name, .agent.offline .task { color: var(--muted); }
.team { padding: 4px 16px 12px; display: grid; gap: 6px; font-size: 13px; }
.team .row span:last-child { margin-left: auto; font-size: 12px; }
.c-agents { overflow-y: auto; }
.activity { flex: 1 0 auto; border-top: 1px solid var(--line); min-height: 220px; display: flex; flex-direction: column; }
.events { padding: 0 12px 16px; display: grid; gap: 2px; }
.ev { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 8px; padding: 7px 6px; border-radius: 8px; font-size: 12.5px; align-items: start; }
.ev:hover { background: var(--line-2); }
.ev .bar { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--line); }
.ev.warn .bar { background: var(--warn); }
.ev.info .bar { background: var(--lav); }
.ev.error .bar { background: var(--danger); }
.ev.success .bar { background: var(--ok); }
.ev .t { font-weight: 600; }
.ev .d { overflow-wrap: anywhere; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev time { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.ev.click { cursor: pointer; }

/* conversation list */
.tabs { display: flex; gap: 4px; padding: 0 12px 10px; }
.tabs button { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 999px; font-weight: 650; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.tabs button.on { background: var(--panel); color: var(--brand-text); box-shadow: var(--shadow); }
.search { margin: 0 12px 10px; display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; height: 34px; color: var(--muted); }
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; color: var(--ink); }
.filter-chip { margin: 0 12px 8px; }
.convs { padding: 0 8px 16px; display: grid; gap: 4px; align-content: start; }
.conv { display: grid; grid-template-columns: 32px 1fr auto; gap: 2px 10px; padding: 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; text-align: left; width: 100%; align-items: start; }
.conv:hover { background: var(--panel); border-color: var(--line); }
.conv.sel { background: var(--panel); border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.conv.urgent { background: var(--gold-soft); border-color: var(--gold-line); }
.conv .ch { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); grid-row: 1 / 3; }
.conv .who { font-weight: 650; }
.conv .last { grid-column: 2 / 4; font-size: 12.5px; color: var(--muted); }
.conv .meta { display: flex; gap: 4px; align-items: center; justify-content: flex-end; }
.conv time { font-size: 11.5px; color: var(--muted); }
.conv .unread { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); font-size: 13px; }

/* detail */
.detail { display: flex; flex-direction: column; min-height: 0; background: var(--panel-2); }
.d-head { padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--panel); display: grid; gap: 10px; }
.d-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.d-title h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.d-sub { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.d-sub a { color: inherit; }
.d-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.callout { border-radius: 8px; padding: 10px 12px; font-size: 13px; background: var(--gold-soft); border: 1px solid var(--gold-line); }
.callout.info { background: var(--teal-soft); border-color: var(--teal-line); }
.callout b { display: block; margin-bottom: 2px; }
.back { display: none; }
.transcript { flex: 1; overflow-y: auto; padding: 18px 20px 8px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: min(78%, 620px); display: grid; gap: 3px; }
.msg .by { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.msg .b { padding: 9px 12px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.customer { align-self: flex-start; }
.msg.customer .b { background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.ai, .msg.agent, .msg.human, .msg.draft { align-self: flex-end; text-align: left; }
.msg.ai .by, .msg.agent .by, .msg.human .by, .msg.draft .by { text-align: right; }
.msg.ai .b, .msg.agent .b { background: var(--teal-soft); border: 1px solid var(--teal-line); border-bottom-right-radius: 4px; }
.msg.human .b { background: var(--human); color: #fff; border-bottom-right-radius: 4px; }
.msg.draft .b { background: var(--panel); border: 1.5px dashed var(--teal); border-bottom-right-radius: 4px; }
.msg.draft.done { opacity: .55; }
.msg.draft.done .b { text-decoration: line-through; border-style: dotted; }
.msg.draft textarea { width: 100%; min-height: 90px; border: 1.5px solid var(--teal); border-radius: 12px; padding: 9px 12px; background: var(--panel); resize: vertical; }
.msg .acts { display: flex; gap: 6px; justify-content: flex-end; margin-top: 2px; }
.sys { align-self: center; font-size: 12px; color: var(--muted); text-align: center; max-width: 80%; }
.note { align-self: center; width: min(86%, 620px); border-radius: 10px; padding: 8px 12px; font-size: 13px; white-space: pre-wrap; background: var(--line-2); color: var(--ink-2); }
.note.whisper { background: var(--staff-soft); border: 1px dashed var(--staff-line); color: var(--ink); }
.note .by { display: block; font-size: 11.5px; font-weight: 700; color: var(--staff); margin-bottom: 2px; }
.note.internal .by { color: var(--muted); }
.typing { align-self: flex-start; font-size: 12px; color: var(--muted); padding: 2px 4px; }
.day { align-self: center; font-size: 11.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; margin: 6px 0; }
.composer { border-top: 1px solid var(--line); background: var(--panel); padding: 10px 14px 14px; display: grid; gap: 8px; }
.composer .modes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.show-m { display: none; }
.composer .hint { font-size: 12px; color: var(--muted); }
.composer .box { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 44px; max-height: 180px; resize: none; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); outline: 0; }
.composer textarea:focus { border-color: var(--brand); }
.composer.m-whisper textarea { background: var(--staff-soft); border-color: var(--staff-line); }
.composer.m-note textarea { background: var(--line-2); }
.placeholder { flex: 1; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 40px; }
.placeholder h3 { margin: 0 0 6px; color: var(--ink); font-size: 16px; }

/* toasts */
.toasts { position: fixed; top: 64px; right: 16px; display: grid; gap: 8px; z-index: 50; width: min(360px, calc(100vw - 32px)); }
.toast { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; display: grid; gap: 6px; animation: slidein .2s ease-out; }
.toast.transfer, .toast.escalation { border-color: var(--gold-line); background: var(--gold-soft); }
.toast.error { border-color: var(--danger); }
.toast .t { display: flex; gap: 8px; align-items: center; }
.toast .t { font-weight: 700; }
.toast .b { font-size: 13px; color: var(--ink-2); }
.toast .acts { display: flex; gap: 6px; }
@keyframes slidein { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(10, 15, 14, .45); display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal { background: var(--panel); border-radius: 12px; box-shadow: var(--shadow); width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 20px; display: grid; gap: 12px; }
.modal h3 { margin: 0; font-size: 17px; }
.modal ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.modal code, .code { font-family: var(--mono); font-size: 12px; background: var(--line-2); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.code { display: block; padding: 10px; }
.menu { position: absolute; top: 50px; right: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: grid; min-width: 240px; z-index: 40; }
.menu button { text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; display: flex; gap: 10px; align-items: center; }
.menu button:hover { background: var(--line-2); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }

/* mobile tabs */
.mtabs { display: none; }

.agents-toggle { display: none !important; }
@media (max-width: 1180px) {
  .main { grid-template-columns: 340px minmax(0, 1fr); }
  .col.c-agents { display: none; }
  .main.show-agents .col.c-agents { display: flex; position: fixed; z-index: 30; top: 56px; bottom: 0; left: 0; width: 320px; background: var(--bg); box-shadow: var(--shadow); }
}
@media (max-width: 1180px) and (min-width: 761px) {
  .agents-toggle { display: inline-flex !important; }
}

@media (max-width: 760px) {
  .app { grid-template-rows: 52px 1fr 58px; }
  .top { padding: 0 12px; gap: 8px; }
  .top .hide-m { display: none !important; }
  .main { grid-template-columns: 100%; }
  .col { border-right: 0; }
  .main .col { display: none !important; }
  .main[data-tab="agents"] .c-agents, .main[data-tab="chats"] .c-list, .main[data-tab="detail"] .c-detail { display: flex !important; position: static; width: auto; box-shadow: none; }
  .agents-toggle { display: none !important; }
  .back { display: inline-flex; }
  .show-m { display: inline; }
  .composer .hint { display: none; }
  .composer .seg button { padding: 0 8px; font-size: 12.5px; white-space: nowrap; }
  .composer { padding: 8px 10px 10px; }
  .composer .btn.primary span { display: none; }
  .composer .btn.primary { width: 44px; padding: 0; justify-content: center; height: 44px; }
  .detail { overflow-x: hidden; }
  .mtabs { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .mtabs button { border: 0; background: none; display: grid; justify-items: center; align-content: center; gap: 2px; font-size: 11px; font-weight: 650; color: var(--muted); position: relative; }
  .mtabs button.on { color: var(--brand-text); }
  .mtabs .count { position: absolute; top: 6px; left: calc(50% + 6px); }
  .msg { max-width: 88%; }
  .toasts { top: 58px; right: 12px; left: 12px; width: auto; }
  .d-head { padding: 12px 14px; }
  .transcript { padding: 14px 12px 8px; }
}

/* ---------- mini (pop-out / PiP) ---------- */
body.mini-body { background: var(--panel); }
.mini { display: flex; flex-direction: column; height: 100vh; font-size: 13px; }
.mini .mh { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.mini .mh b { font-size: 13px; }
.mini .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px 12px 4px; }
.mini .stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; }
.mini .stat b { display: block; font-size: 20px; line-height: 1.1; }
.mini .stat span { font-size: 11px; color: var(--muted); font-weight: 600; }
.mini .stat.hot { background: var(--warn); border-color: var(--warn); color: var(--warn-ink); }
.mini .stat.hot span { color: var(--warn-ink); }
.mini .sec { padding: 8px 12px 2px; font-size: 11px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.mini .list { padding: 0 8px; display: grid; gap: 2px; }
.mini .li { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; padding: 6px 6px; border-radius: 8px; align-items: center; }
.mini .li .sub { grid-column: 2; font-size: 12px; color: var(--muted); }
.mini .wait { background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 10px; padding: 8px 10px; margin: 4px 8px; display: grid; gap: 6px; }
.mini .feed { flex: 1; overflow-y: auto; padding-bottom: 10px; }
.mini .tick { padding: 5px 12px; font-size: 12.5px; border-bottom: 1px solid var(--line-2); }
.mini .tick b { font-weight: 650; }
.mini .foot { padding: 8px 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }

/* ---------- login ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login form { width: min(380px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 28px; display: grid; gap: 14px; }
.login h1 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.login p { margin: 0; color: var(--muted); font-size: 13px; }
.login label { display: grid; gap: 6px; font-weight: 600; font-size: 13px; }
.login input { height: 42px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); padding: 0 12px; outline: 0; }
.login input:focus { border-color: var(--brand); }
.login .btn { height: 42px; justify-content: center; }
.login .err { color: var(--danger); font-size: 13px; min-height: 18px; }
.login .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.login .or::before, .login .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* brand bits */
.login .brand img.logo { height: 34px; }
.mini .mh img { height: 22px; width: auto; }
@media (max-width: 760px) {
  .brand img.logo, .brand .divider, .brand .app-name { display: none; }
  .brand img.mark { display: block; }
}
.switch.sm { font-size: 12.5px; color: var(--muted); gap: 6px; }
.switch.sm.on { color: var(--ink); }
.switch.sm .track { width: 30px; height: 17px; }
.switch.sm .track::after { width: 13px; height: 13px; }
.switch.sm.on .track::after { transform: translateX(13px); }
.switch:disabled { cursor: default; opacity: .7; }
.etag { font-weight: 600; }
.etag.queued { color: var(--muted); }
.etag.sent { color: var(--ok); }
.etag.failed { color: var(--danger); }
