:root {
    --bg: #f5f6f8;
    --panel: #ffffff;
    --panel-2: #f9fafb;
    --text: #1b1f24;
    --muted: #667085;
    --line: #e4e7ec;
    --line-2: #d0d5dd;
    --primary: #1d5fa8;
    --primary-ink: #ffffff;
    --company: var(--primary);
    --ok: #1a7f37;
    --warn: #b76e00;
    --bad: #c4321c;
    --sidebar: #0f1b2d;
    --sidebar-ink: #c8d1dc;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0d1117;
        --panel: #151b23;
        --panel-2: #1b222c;
        --text: #e6edf3;
        --muted: #8d96a0;
        --line: #262f3a;
        --line-2: #343f4c;
        --primary: #4a8fdc;
        --sidebar: #0a0f16;
        --ok: #3fb950;
        --warn: #d29922;
        --bad: #f0605a;
        --shadow: none;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; line-height: 1.25; margin: 2px 0 4px; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0; }
h3 { font-size: 14px; margin: 0 0 10px; }
h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 6px; }
p { margin: 0 0 10px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
code { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
code.copy { cursor: copy; word-break: break-all; display: inline-block; }
code.copy.copied { border-color: var(--ok); }
pre.code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow: auto; font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.text-bad { color: var(--bad); }
.ok-text { color: var(--ok); }
.i { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.i.xl { width: 36px; height: 36px; color: var(--muted); }

/* ---------- shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 232px; flex: none; background: var(--sidebar); color: var(--sidebar-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; font-size: 15px; }
.brand:hover { text-decoration: none; }
.sidebar nav { flex: 1; overflow-y: auto; padding: 4px 10px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; color: var(--sidebar-ink); font-weight: 500; }
.nav-item:hover { background: rgba(255, 255, 255, .06); text-decoration: none; color: #fff; }
.nav-item.active { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-item.disabled { opacity: .45; cursor: default; }
.nav-item.disabled:hover { background: none; color: var(--sidebar-ink); }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #7d8a9a; padding: 16px 10px 6px; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sidebar-foot .me { display: flex; align-items: center; gap: 10px; flex: 1; color: var(--sidebar-ink); min-width: 0; }
.sidebar-foot .me:hover { text-decoration: none; }
.sidebar-foot .me b { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .me small { display: block; font-size: 11.5px; }
.sidebar-foot .link { color: var(--sidebar-ink); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; border-top: 3px solid var(--company); }
.content { padding: 22px 24px 60px; max-width: 1400px; width: 100%; }
.menu-btn { display: none; }
.scrim { display: none; }

.switcher { display: flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.switcher button { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; font-size: 13px; padding: 5px 12px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.switcher button.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.switcher.single span { display: flex; align-items: center; gap: 6px; padding: 5px 10px; font-weight: 600; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.search { flex: 1; max-width: 420px; margin-left: auto; position: relative; display: flex; align-items: center; }
.search .i { position: absolute; left: 10px; color: var(--muted); }
.search input { padding-left: 32px; }

/* ---------- controls */
input, select, textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; width: 100%; min-height: 36px; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent); border-color: var(--primary); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--primary); }
input[type=color] { padding: 2px; width: 44px; height: 32px; }
input.xs { width: 64px; }
input:disabled { background: var(--panel-2); color: var(--muted); }
textarea { resize: vertical; }
label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13px; }
label small { font-weight: 400; }
label.check, label.inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
label.inline input { width: auto; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: 13px; margin-bottom: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: 13px; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); cursor: pointer; white-space: nowrap; min-height: 36px; box-shadow: var(--shadow); }
.btn:hover { text-decoration: none; background: var(--panel-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.sm { padding: 4px 9px; min-height: 30px; font-size: 12.5px; }
.btn.block { width: 100%; }
.icon-btn { border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 7px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { color: var(--text); background: var(--panel-2); }
.link { border: 0; background: none; padding: 0; font: inherit; color: var(--primary); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--panel); }
.seg a { padding: 6px 12px; color: var(--muted); font-weight: 600; font-size: 13px; border-right: 1px solid var(--line); }
.seg a:last-child { border-right: 0; }
.seg a.on { background: var(--panel-2); color: var(--text); }
.seg a:hover { text-decoration: none; color: var(--text); }
.tabs-nav { margin-bottom: 16px; flex-wrap: wrap; }

/* ---------- layout bits */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 620px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + .card, .grid-2 + section { margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.tight { gap: 10px; margin-top: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; max-width: 860px; }
.span-2 { grid-column: span 2; }
.empty { color: var(--muted); padding: 10px 0; margin: 0; }
.empty.big { text-align: center; padding: 48px 20px; }
.empty.big h2 { margin: 10px 0 4px; color: var(--text); }
.prose ol, .prose ul { padding-left: 20px; margin: 0 0 12px; }
.prose li { margin-bottom: 4px; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; font-weight: 500; }
.flash.ok { background: color-mix(in srgb, var(--ok) 10%, var(--panel)); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.flash.warn { background: color-mix(in srgb, var(--warn) 12%, var(--panel)); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.flash.error { background: color-mix(in srgb, var(--bad) 10%, var(--panel)); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }

/* ---------- tags */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; vertical-align: 1px; }
.tag.company, .tag.stage { --c: var(--muted); color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--panel)); border-color: color-mix(in srgb, var(--c) 30%, transparent); }
.tag.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.tag.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.tag.src-facebook { color: #1877f2; }
.tag.src-instagram { color: #c13584; }
.tag.src-google { color: #188038; }
.tag.src-website { color: #1d5fa8; }
.tag.src-phone { color: #b76e00; }
.tag.src-referral, .tag.src-word_of_mouth { color: #8250df; }
.tag.src-returning_client { color: #1a7f37; }
.tag.src-tiktok { color: #111827; }
.tag.role-admin { color: var(--bad); }
.tag.role-owner { color: #fff; background: #0f1b2d; border-color: #0f1b2d; }
.tag.role-super_agent { color: #8250df; }
.wait { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.wait .i { width: 12px; height: 12px; vertical-align: 0; }
.wait.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.wait.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.wait.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #2c4a6e; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; flex: none; }
.avatar.sm { width: 22px; height: 22px; font-size: 9.5px; background: color-mix(in srgb, var(--primary) 80%, #000); }
.agent { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; color: var(--text); }

/* ---------- dashboard */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--text); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.kpi:hover { text-decoration: none; border-color: var(--line-2); }
.kpi span { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi b { font-size: 28px; line-height: 1.2; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); }
.kpi.alert b { color: var(--bad); }
.kpi.warn b { color: var(--warn); }
.kpi.good b { color: var(--ok); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--text); }
.row-main:hover { text-decoration: none; }
.row-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.when { display: flex; flex-direction: column; align-items: center; width: 52px; font-size: 12px; line-height: 1.25; flex: none; }
.when b { font-size: 11px; text-transform: uppercase; color: var(--primary); }
.when small { color: var(--muted); }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: 130px 1fr 36px; align-items: center; gap: 10px; color: var(--text); font-size: 13px; }
.bar:hover { text-decoration: none; }
.bar i { height: 10px; border-radius: 5px; background: var(--primary); min-width: 4px; }
.bar i.src-facebook { background: #1877f2; } .bar i.src-instagram { background: #c13584; } .bar i.src-google { background: #188038; }
.bar i.src-phone { background: #d4732a; } .bar i.src-referral, .bar i.src-word_of_mouth { background: #8250df; } .bar i.src-returning_client { background: #1a7f37; } .bar i.src-tiktok { background: #111827; } .bar i.src-other { background: #8b949e; }
.bar b { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel-2); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.leads-table tbody tr { cursor: pointer; }
.leads-table tbody tr:hover { background: var(--panel-2); }
.table tr.inactive { opacity: .55; }
.card:not(.flush) .table th:first-child, .card:not(.flush) .table td:first-child { padding-left: 0; }
.stages-table td { padding: 6px 8px; vertical-align: middle; }
.hooks td:first-child { white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.filters input, .filters select { width: auto; min-width: 140px; }
.filters input[type=search] { min-width: 200px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 16px; }

/* ---------- board */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.col { flex: 0 0 272px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 200px); }
.col header { padding: 10px 12px; display: flex; align-items: center; gap: 8px; border-top: 3px solid var(--c); border-radius: var(--radius) var(--radius) 0 0; }
.col header small { margin-left: auto; color: var(--muted); }
.col .count { font-size: 12px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.col .cards { padding: 4px 8px 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 60px; }
.col.drop { outline: 2px dashed var(--primary); outline-offset: -2px; }
.lead-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; color: var(--text); display: flex; flex-direction: column; gap: 5px; box-shadow: var(--shadow); cursor: grab; }
.lead-card:hover { text-decoration: none; border-color: var(--line-2); }
.lead-card.dragging { opacity: .4; }
.lead-card .meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }

/* ---------- lead page */
.lead-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.lead-head .tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.stagebar { display: flex; margin-bottom: 18px; overflow-x: auto; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); }
.stagebar button { flex: 1; border: 0; border-right: 1px solid var(--line); background: none; padding: 9px 12px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.stagebar button:last-of-type { border-right: 0; }
.stagebar button:hover { background: var(--panel-2); color: var(--text); }
.stagebar button.on { background: var(--c); color: #fff; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.lead-side .card { margin-bottom: 14px; }
.dl { display: grid; grid-template-columns: 96px 1fr; gap: 6px 10px; margin: 0; }
.dl dt { color: var(--muted); font-size: 12.5px; }
.dl dd { margin: 0; min-width: 0; }
.message { white-space: normal; background: var(--panel-2); border-radius: 8px; padding: 10px 12px; font-size: 13px; max-height: 280px; overflow: auto; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
h3.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.composer textarea { margin: 10px 0; }
.composer .tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.composer .tabs label { font-weight: 600; }
.composer .tabs input, .chip input { position: absolute; opacity: 0; pointer-events: none; }
.composer .tabs span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 7px; color: var(--muted); cursor: pointer; font-size: 13px; }
.composer .tabs span:hover { background: var(--panel-2); }
.composer .tabs input:checked + span { background: color-mix(in srgb, var(--primary) 12%, var(--panel)); color: var(--primary); }
.composer .tabs input:focus-visible + span, .chip input:focus-visible + span { outline: 2px solid var(--primary); }
.outcomes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.outcomes[hidden] { display: none; }
.chip span { display: inline-block; padding: 4px 11px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.chip input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.composer-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.composer-foot .btn { margin-left: auto; }
.quick-dates { display: flex; gap: 10px; }
.timeline { display: flex; flex-direction: column; padding-left: 4px; }
.event { display: flex; gap: 12px; padding: 0 0 16px; position: relative; }
.event::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--line); }
.event:last-child::before { display: none; }
.ev-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }
.event > div { flex: 1; min-width: 0; padding-top: 5px; }
.event header { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ev-body { margin-top: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; overflow-wrap: anywhere; }
.ev-call .ev-icon, .ev-text .ev-icon, .ev-email .ev-icon { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.ev-meeting .ev-icon { color: #8250df; }
.ev-inbound .ev-icon { color: var(--warn); }
.ev-stage .ev-body, .ev-assign .ev-body, .ev-system .ev-body { background: none; border: 0; padding: 0; color: var(--muted); }
.appt { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.appt.canceled { opacity: .55; }
.appt.canceled b { text-decoration: line-through; }
.appt-links { display: flex; gap: 12px; margin-top: 4px; }
.appt-actions { display: flex; gap: 6px; align-items: flex-start; }
#appt details { margin-top: 12px; }
#appt summary.btn { box-shadow: none; }
.danger-zone { text-align: right; margin-top: 4px; }

/* ---------- appointments page */
.day { margin-bottom: 18px; }
.day h3 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.appt-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.appt-row:last-child { border-bottom: 0; }
.appt-row .time { width: 64px; font-weight: 700; display: flex; flex-direction: column; font-size: 13px; }
.appt-row .time small { font-weight: 400; color: var(--muted); }
.appt-row.canceled { opacity: .55; }
.gcal { width: 100%; height: 600px; border: 0; border-radius: 8px; background: #fff; }

/* ---------- forms */
.radio-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-cards label { flex: 1; min-width: 200px; }
.radio-cards input { position: absolute; opacity: 0; }
.radio-cards span { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 9px; cursor: pointer; font-weight: 600; }
.radio-cards input:checked + span { border-color: var(--c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 30%, transparent); background: color-mix(in srgb, var(--c) 6%, var(--panel)); }
.radio-cards input:focus-visible + span { outline: 2px solid var(--primary); }
.radio-list { display: flex; flex-direction: column; gap: 8px; }
.radio-list label { flex-direction: row; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.radio-list label input { margin-top: 3px; }
.radio-list span { display: flex; flex-direction: column; }
.radio-list small { color: var(--muted); font-weight: 400; }
.inline-form { margin-bottom: 12px; }

/* ---------- auth pages */
body.bare { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; background: radial-gradient(circle at 30% 0%, #1d5fa833, transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: 0 12px 40px rgba(16, 24, 40, .12); }
.auth-card h2 { font-size: 18px; margin-bottom: 6px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; font-size: 18px; }
.auth-logos { display: grid; justify-items: center; gap: 14px; margin-bottom: 22px; }
.auth-logos img { width: min(240px, 80%); height: auto; }
.auth-logos img + img { padding-top: 14px; border-top: 1px solid var(--line); box-sizing: content-box; }
.auth-title { margin: 2px 0 0; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.brand-seals { display: inline-flex; }
.brand-seals img { width: 30px; height: 30px; border-radius: 50%; background: #fff; }
.brand-seals img + img { margin-left: -9px; }
.auth-brand small { display: block; font-size: 12px; color: var(--muted); }

/* ---------- responsive */
@media (max-width: 1100px) {
    .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lead-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 40; }
    .menu-btn { display: inline-flex; }
    .topbar { padding: 8px 16px; flex-wrap: wrap; }
    .search { order: 5; max-width: none; flex-basis: 100%; }
    .topbar .btn.primary span { display: none; }
    .content { padding: 16px 16px 60px; }
    .grid-2, .form-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .switcher { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
    .topbar { gap: 8px; }
    .leads-table th:nth-child(4), .leads-table td:nth-child(4), .leads-table th:nth-child(7), .leads-table td:nth-child(7) { display: none; }
    .lead-head .actions .btn { flex: 1; }
    .bar { grid-template-columns: 100px 1fr 30px; }
}

/* Sign-in screens (match the approved design/login.html) */
body.bare { background: radial-gradient(circle at 15% 0%, #1d5fa833, transparent 55%), radial-gradient(circle at 100% 100%, #c8202f22, transparent 50%), var(--bg); }
.auth-card { border-top: 4px solid; border-image: linear-gradient(90deg, #1d5fa8 0 70%, #fff 70% 76%, #c8202f 76%) 1; }
