/* Client portal additions on top of the dashboard styles (admin.css). */
.auth-home { display: inline-block; }
.auth-alt { margin: 16px 0 0; font-size: 14px; }
.small { font-size: 13px; }
.two { display: grid; gap: 0 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.two > div { display: grid; gap: 6px; }
.check-row { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 14px !important; margin-top: 14px !important; }
.check-row input { width: 20px; min-height: 20px; margin-top: 2px; accent-color: var(--green); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
[aria-invalid="true"] { border-color: var(--bad) !important; }

.top-actions { display: flex; align-items: center; gap: 8px; }
.bell-wrap { position: relative; }
.bell svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bell { display: grid; place-items: center; position: relative; }
.bell-dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.notif-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(360px, 90vw); max-height: 70vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow); }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel); }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li { border-bottom: 1px solid var(--border); }
.notif-list a, .notif-list .n { display: block; padding: 10px 14px; text-decoration: none; color: var(--text); }
.notif-list .unread { background: var(--mark-wash); }
.notif-list strong { display: block; font-size: 14px; color: var(--heading); }
.notif-list span { display: block; font-size: 13px; color: var(--muted); }
.notif-list time { font-size: 12px; color: var(--muted); }
.linkish { background: none; border: 0; color: var(--accent-ink); font-weight: 600; cursor: pointer; font-size: 13px; padding: 4px; }
.notif-enable { display: block; width: 100%; padding: 10px; text-align: center; }

#banner:empty { display: none; }
#banner { padding: 16px 28px 0; }
@media (max-width: 900px) { #banner { padding: 12px 16px 0; } }
.status-banner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 18px; border-radius: 12px; border: 1.5px solid var(--gold); background: var(--warn-bg); }
.status-banner.ok { border-color: color-mix(in srgb, var(--good) 50%, transparent); background: var(--good-bg); }
.status-banner p { margin: 0; }
.status-banner strong { color: var(--heading); }

/* Lead tickets */
.tickets { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.ticket { position: relative; display: grid; gap: 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s; }
.ticket:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.ticket.t-hot { border-left: 4px solid #D9534F; }
.ticket.t-warm { border-left: 4px solid var(--gold); }
.ticket.t-cold { border-left: 4px solid #5B8DB8; }
.ticket-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.ticket h3 { font-size: 16px; margin: 0; }
.ticket .addr { font-size: 13.5px; color: var(--muted); margin: 2px 0 0; }
.ticket dl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.ticket dt { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.ticket dd { margin: 0; overflow-wrap: anywhere; }
.ticket .motive { font-size: 13.5px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ticket-actions select { min-height: 36px; font-size: 13.5px; flex: 1 1 150px; }
.act { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--panel); color: var(--heading); text-decoration: none; font-size: 15px; }
.act:hover { border-color: var(--gold); }
.temp { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.temp-hot { background: rgba(217,83,79,.15); color: #B3261E; }
.temp-warm { background: var(--warn-bg); color: var(--warn); }
.temp-cold { background: rgba(91,141,184,.15); color: #2F6390; }
:root[data-theme="dark"] .temp-hot { color: #FF9E92; }
:root[data-theme="dark"] .temp-cold { color: #A9CBEA; }
.flag { font-size: 12px; font-weight: 600; color: var(--bad); }
.st-awaiting_answer, .st-voicemail { color: var(--warn); background: var(--warn-bg); }
.st-contract_sent { color: var(--heading); background: var(--mark-wash); }
.st-closed { color: var(--good); background: var(--good-bg); }
.st-dead { color: var(--muted); background: var(--panel-2); }
.st-open { color: var(--warn); background: var(--warn-bg); }
.st-valid { color: var(--heading); background: var(--mark-wash); }
.st-replaced, .st-paid { color: var(--good); background: var(--good-bg); }
.st-discarded, .st-void { color: var(--muted); background: var(--panel-2); }
.st-awaiting_payment { color: var(--bad); background: var(--bad-bg); }
.st-client, .st-active { color: var(--good); background: var(--good-bg); }
.st-inactive, .st-paused, .st-suspended { color: var(--muted); background: var(--panel-2); }

/* Lead detail */
.drawer-panel.wide { width: min(640px, 100%); }
.status-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.status-steps button { min-height: 36px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--panel); cursor: pointer; font-size: 13.5px; font-weight: 500; }
.status-steps button[aria-pressed="true"] { background: var(--heading); color: var(--bg); border-color: var(--heading); font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--border-strong); display: grid; gap: 10px; }
.timeline li { position: relative; font-size: 13.5px; }
.timeline li::before { content: ''; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.timeline time { display: block; font-size: 12px; color: var(--muted); }
.subcard { border: 1px solid var(--border); border-radius: 10px; padding: 14px; display: grid; gap: 10px; }
.subcard h3 { font-size: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row > * { flex: 1 1 160px; }
.row > .btn { flex: 0 0 auto; }
.field { display: grid; gap: 5px; }
.field label { font-weight: 600; font-size: 13px; }

/* Tasks */
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.task-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.task-list li.done { opacity: .6; }
.task-list li.done .t-title { text-decoration: line-through; }
.task-list li.overdue { border-color: var(--bad); }
.task-list input[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; accent-color: var(--green); }
.t-meta { font-size: 12.5px; color: var(--muted); }
.t-meta.late { color: var(--bad); font-weight: 600; }

/* Billing */
.bill-hero { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.big-money { font-size: 40px; font-weight: 600; color: var(--heading); line-height: 1.1; }

/* Automatic comps */
.comps-auto { display: grid; gap: 10px; }
.comps-auto input[type="text"] { flex: 1 1 260px; min-height: 46px; font-size: 16px; }
.comps-found { display: grid; gap: 12px; }
.comps-value { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--mark-wash); }
.comps-value > div { display: grid; gap: 2px; }
.comps-value strong { font: 600 26px/1.1 var(--f-display); color: var(--heading); }
.comps-table tr.used td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.comps-table td:first-child, .comps-table th:first-child { width: 44px; }
.comps-table input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--gold); cursor: pointer; }
.comps-table tr:not(.used) td { opacity: .62; }
.comps-table tr:not(.used) td:first-child { opacity: 1; }
.comps-kind { padding: 10px 14px; border-radius: 10px; font-size: 14px; background: var(--warn-bg); border: 1px solid rgba(199,161,90,.45); }
.comps-kind.sold { background: var(--good-bg); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.calc input.from-comp { border-color: rgba(199,161,90,.55); background: var(--mark-wash); }
.comps-history { display: grid; gap: 12px; }
.comps-history input[type="search"] { min-width: min(260px, 100%); }
.buyers { display: grid; gap: 12px; }
.buyers-list { margin: 0; padding-left: 22px; display: grid; gap: 12px; }
.buyers-list li > strong { display: block; }
.appeal { display: grid; gap: 8px; margin-top: 6px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.14); }
.appeal-score { font: 500 26px/1 var(--f-display); color: var(--gold); }
.appeal-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.appeal-bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #A8843F, #E2C88F); transition: width .35s ease; }
.appeal-lines { margin: 0; padding-left: 18px; font-size: 13.5px; color: #D5DCD7; display: grid; gap: 4px; }
/* Offer calculator */
.calc { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.calc .field input { font-size: 18px; min-height: 48px; }
.calc-out { border-radius: 14px; padding: 20px; background: var(--green); color: #EDE8DB; display: grid; gap: 10px; align-content: start; }
:root[data-theme="dark"] .calc-out { background: #1B4238; border: 1px solid rgba(199,161,90,.45); }
.calc-out .mao { font-size: 44px; font-weight: 600; color: var(--gold); line-height: 1.05; }
.calc-out dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; font-size: 14px; }
.calc-out dt { color: #C5CEC8; }
.calc-out dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.formula { font-size: 13px; color: #C5CEC8; margin: 0; }
.locked { position: relative; }
.lock-overlay { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; text-align: center; padding: 20px; border-radius: 14px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(3px); }
.lock-overlay > div { max-width: 360px; display: grid; gap: 10px; justify-items: center; }
.lock-overlay .lock-icon { font-size: 34px; }

.acct-type { border: 0; padding: 0; margin: 4px 0 8px; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.acct-type label { display: flex !important; gap: 10px; align-items: flex-start; margin: 0 !important; padding: 12px; border: 1.5px solid var(--border-strong); border-radius: 10px; cursor: pointer; font-weight: 400 !important; }
.acct-type label:has(input:checked) { border-color: var(--gold); background: var(--warn-bg); }
.acct-type input { width: 18px; min-height: 18px; margin-top: 3px; accent-color: var(--green); }
.deals { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.deal { display: grid; gap: 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.deal h3 { font-size: 16px; margin: 0; }
.deal .price { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--mark-wash); }
.deal .price strong { font-size: 22px; color: var(--heading); }
.deal dl { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px 10px; margin: 0; font-size: 13px; }
.deal dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.deal dd { margin: 0; }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.subtabs a, .subtabs button { cursor: pointer; color: inherit; font-family: inherit; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--border-strong); text-decoration: none; font-weight: 500; font-size: 14px; background: var(--panel); }
.subtabs a[aria-current="page"], .subtabs button[aria-current="page"] { background: var(--heading); color: var(--bg); border-color: var(--heading); font-weight: 600; }
.reveal-box { padding: 12px; border-radius: 10px; border: 1.5px solid color-mix(in srgb, var(--good) 45%, transparent); background: var(--good-bg); font-size: 14px; }
.guide-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }

/* Intake form */
.intake-page { place-items: start center; padding-block: 32px; }
.intake fieldset { border: 0; padding: 0; margin: 18px 0 0; display: grid; gap: 6px; }
.intake legend { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); font-weight: 600; margin-bottom: 6px; padding: 0; width: 100%; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.intake label { font-weight: 600; font-size: 13.5px; margin-top: 6px; }
.intake input, .intake textarea { width: 100%; }
.three { display: grid; gap: 0 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); }
.three > div, .two > div { display: grid; gap: 6px; }
.temps-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.temps-pick label { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: 99px; cursor: pointer; }
.temps-pick input { min-height: auto; width: auto; accent-color: var(--green); }
.ok-msg { color: var(--good); font-weight: 600; min-height: 1.2em; }

/* Toasts + chat */
.toasts { position: fixed; z-index: 60; right: 16px; bottom: 88px; display: grid; gap: 8px; max-width: min(360px, calc(100vw - 32px)); }
.toast { padding: 12px 14px; border-radius: 10px; background: var(--green); color: #fff; box-shadow: var(--shadow); font-size: 14px; animation: toastIn .25s ease; }
.toast strong { display: block; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }
.chat { position: fixed; z-index: 55; right: 18px; bottom: 18px; display: grid; justify-items: end; gap: 10px; }
.chat-btn { width: 56px; height: 56px; border-radius: 50%; border: 0; background: #25D366; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 24px -8px rgba(0,0,0,.45); }
.chat-btn svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.chat-panel { width: min(320px, calc(100vw - 36px)); background: var(--panel); border: 1px solid var(--border-strong); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); display: grid; gap: 10px; }
.chat-head { display: grid; }
.chat-panel #chat-wa { justify-self: center; }

/* Profile / avatar / balance */
.side-profile { margin: 4px 0 12px; }
.side-profile-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--side-text); text-decoration: none; background: rgba(255,255,255,.06); }
.side-profile-link:hover { background: rgba(255,255,255,.12); }
.side-profile-link > span { display: grid; min-width: 0; line-height: 1.25; }
.side-profile-link strong, .side-profile-link .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; }
.side-profile-link .muted { opacity: .75; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--gold); background: var(--panel-2); }
.avatar-initials { display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--green); background: var(--gold-soft); }
.avatar-xl { width: 96px; height: 96px; font-size: 30px; }
.avatar-lg { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.balance-chip { padding: 7px 14px; border-radius: 99px; background: var(--good-bg); color: var(--good); font-weight: 600; font-size: 14px; text-decoration: none; border: 1px solid color-mix(in srgb, var(--good) 35%, transparent); white-space: nowrap; }
.balance-chip.low { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.ok { color: var(--good); }

/* Buy leads cards */
.ppl { display: grid; gap: 10px; align-content: start; background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.ppl.t-hot { border-left-color: #D2462F; } .ppl.t-warm { border-left-color: var(--gold); } .ppl.t-cold { border-left-color: #5B8DB8; }
.ppl h3 { margin: 0; font-size: 18px; }
.ppl-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12.5px; }
.ppl-top .fresh { color: var(--muted); }
.ppl-top .excl { margin-left: auto; font-weight: 600; color: var(--accent-ink); }
.ppl-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--mark-wash); }
.ppl-price strong { font-size: 26px; color: var(--heading); font-family: var(--f-display); }
.ppl .kv { margin: 0; }
.blurred { filter: blur(4.5px); user-select: none; letter-spacing: .08em; }
.wallet-banner { margin-bottom: 14px; }

/* Ticket threads (portal + dashboard) */
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.msg { max-width: 88%; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border); }
.msg p { margin: 4px 0 0; white-space: pre-wrap; }
.msg-meta { font-size: 12px; color: var(--muted); }
.msg-me, .msg-lgo { justify-self: end; background: var(--mark-wash); }
.msg-system { justify-self: center; background: var(--good-bg); font-size: 14px; }
tr.unread td { font-weight: 600; }
/* Knowledge base */
.kb { display: grid; gap: 6px; }
.kb-item { border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.kb-item summary { cursor: pointer; padding: 11px 14px; font-weight: 600; color: var(--heading); list-style-position: inside; }
.kb-item[open] summary { border-bottom: 1px solid var(--border); }
.kb-body { padding: 10px 16px 14px; line-height: 1.6; font-size: 15px; }
.kb-body p { margin: 0 0 8px; }
.kb-list { margin: 0 0 8px; padding-left: 22px; }
.kb-list li { margin: 3px 0; }
/* Offers & discounts */
.offer-banner { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; padding: 12px 16px; border-radius: 12px; background: linear-gradient(90deg, rgba(199,161,90,.22), rgba(199,161,90,.06)); border: 1.5px solid var(--gold); }
.offer-banner p { margin: 0; }
.offer-badge { display: inline-block; padding: 2px 8px; border-radius: 99px; background: var(--gold); color: #1d1a12; font-weight: 700; font-size: 12px; white-space: nowrap; }
.offer-badge.big { font-size: 14px; padding: 6px 12px; }
.offer-price { display: inline-flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
/* Dial pad (top of every page) */
.dp-toggle { position: relative; }
.dp-toggle.on { background: var(--mark-wash); }
.dp-live { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: #2FB36B; box-shadow: 0 0 0 2px var(--panel); }
.dialpad { position: fixed; top: 72px; right: 22px; z-index: 40; width: min(320px, calc(100vw - 32px)); max-height: calc(100vh - 96px); overflow: hidden auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--border-strong); box-shadow: 0 18px 40px -18px rgba(0,0,0,.45); }
.dp-head { display: flex; justify-content: space-between; align-items: center; }
.dial-wrap { border: 2px solid var(--mark, #C7A15A); display: grid; gap: 12px; }
.dial-wrap h2 { margin: 0; font-size: 20px; }
.dial-wrap .dp-chips .btn { font-size: 15px; padding: 10px 14px; }
button.act { border: 0; background: none; cursor: pointer; font: inherit; padding: 0; }
.dp-row { display: flex; gap: 6px; align-items: center; }
.dialpad select, .dialpad input { max-width: 100%; min-width: 0; }
.dp-number { flex: 1; min-width: 0; width: 100%; font-size: 20px; font-weight: 600; letter-spacing: .02em; text-align: center; }
.dp-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dp-key { padding: 10px 0; font-size: 19px; font-weight: 600; border-radius: 12px; border: 1px solid var(--border); background: var(--panel-2); color: var(--heading); cursor: pointer; }
.dp-key:hover { background: var(--mark-wash); }
.dp-actions { display: flex; gap: 8px; }
.dp-actions .dp-call { flex: 1; }
.dp-timer { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--good); min-width: 48px; text-align: right; }
.dp-incoming { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: var(--good-bg); text-align: center; }
.dp-outcome { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.dp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--panel); color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: none; }
.chip:hover { background: var(--mark-wash); }
.chip-good { border-color: color-mix(in srgb, var(--good) 55%, transparent); color: var(--good); font-weight: 600; }
.chip-bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); color: var(--bad); }
@media (max-width: 700px) { .dialpad { top: auto; bottom: 84px; right: 16px; } }
/* Lists, tags, dialer */
.tag { display: inline-block; margin: 0 4px 2px 0; padding: 1px 8px; border-radius: 99px; font-size: 12px; background: var(--mark-wash); color: var(--heading); }
.tag-bad { background: var(--bad-bg); color: var(--bad); margin-left: 6px; }
.bulkbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 12px 0; padding: 10px; border-radius: 12px; background: var(--panel-2); }
.progress { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; margin: 6px 0 10px; }
.progress span { display: block; height: 100%; background: var(--gold); transition: width .4s; }
.script { white-space: pre-wrap; line-height: 1.55; font-size: 15px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.bar { height: 10px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gold); }
.bar-n { color: var(--muted); font-size: 13px; white-space: nowrap; }
.rec-locked { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 99px; background: var(--panel-2); border: 1px dashed var(--border-strong); }
.rec-play { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--border); color: var(--muted); font-size: 12px; }
.rec-wave { letter-spacing: 1px; color: var(--heading); }
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin: 10px 0; max-height: 260px; overflow: auto; padding: 8px; border: 1px solid var(--border); border-radius: 10px; }
.state-grid label { display: flex; gap: 6px; align-items: center; font-size: 13.5px; padding: 3px 4px; border-radius: 6px; }
.state-grid label:has(input:checked) { background: var(--mark-wash); font-weight: 600; }
.state-grid .muted { margin-left: auto; }
.pillars { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } .ticket:hover { transform: none; } }

/* Live demo banner (/portal/demo) */
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; padding: 10px 16px; background: #C7A15A; color: #123F36; font-size: 14.5px; text-align: center; }
.demo-bar .btn-primary { background: #123F36; color: #F4F0E5; border-color: #123F36; }


/* Guided sign-up (quiz) */
.wiz-progress { height: 6px; border-radius: 99px; background: var(--panel-2); overflow: hidden; margin: 4px 0 18px; }
.wiz-progress span { display: block; height: 100%; width: 20%; background: var(--gold); border-radius: 99px; transition: width .35s ease; }
.wiz-step { border: 0; padding: 0; margin: 0; min-width: 0; animation: wizIn .3s ease both; }
.wiz-step legend { padding: 0; margin-bottom: 14px; }
.wiz-step legend h1 { margin: 0 0 4px; }
@keyframes wizIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.wiz-q { font-weight: 600; margin: 6px 0 8px; }
.choice-grid { display: grid; gap: 10px; margin-bottom: 12px; }
.choice-grid.tight { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-grid label { display: flex !important; gap: 12px; align-items: flex-start; margin: 0 !important; padding: 14px 16px; border: 1.5px solid var(--border-strong); border-radius: 12px; cursor: pointer; font-weight: 400 !important; transition: border-color .15s, background-color .15s, transform .15s; }
.choice-grid label:hover { border-color: var(--gold); transform: translateY(-1px); }
.choice-grid label:has(input:checked) { border-color: var(--gold); background: var(--warn-bg); }
.choice-grid input { width: 18px; min-height: 18px; margin-top: 3px; accent-color: var(--green); flex: none; }
.choice-grid strong { display: block; font-size: 16px; color: var(--heading); }
.choice-grid small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.45; margin-top: 2px; }
.wiz-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.wiz-nav #wiz-next { margin-left: auto; min-width: 170px; }
@media (prefers-reduced-motion: reduce) { .wiz-step { animation: none; } }

/* Custom plan & onboarding cards on Home */
.plan-card { border: 1.5px solid var(--gold); background: linear-gradient(135deg, var(--warn-bg), var(--panel)); }
.plan-card .plan-price { font: 500 32px/1.1 var(--f-display); color: var(--heading); margin: 4px 0; }
.plan-card ul { margin: 6px 0 12px 18px; padding: 0; }


/* ── SMS inbox as a chat: two panes that fill the window and scroll on their own ── */
.inbox-chat { display: grid; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); height: calc(100vh - 215px); height: calc(100dvh - 215px); min-height: 420px; border: 1px solid var(--border-strong, rgba(128,128,128,.25)); border-radius: 16px; overflow: hidden; background: var(--panel, transparent); }
.inbox-side { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; border-right: 1px solid var(--border-strong, rgba(128,128,128,.25)); }
.inbox-side-head { display: grid; gap: 8px; padding: 14px; border-bottom: 1px solid var(--border-strong, rgba(128,128,128,.25)); }
.inbox-side-head input[type="search"] { width: 100%; }
.inbox-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
.inbox-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--border, rgba(128,128,128,.14)); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .15s ease; }
.inbox-item:hover { background: rgba(128,128,128,.10); }
.inbox-item.active { background: rgba(200,160,70,.16); box-shadow: inset 3px 0 0 var(--gold, #c9a24a); }
.inbox-item:focus-visible { outline: 2px solid var(--gold, #c9a24a); outline-offset: -2px; }
.inbox-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: rgba(200,160,70,.22); }
.inbox-item-main { min-width: 0; flex: 1; display: grid; gap: 2px; }
.inbox-item-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.inbox-item-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.inbox-item.unread .inbox-item-top strong { font-weight: 800; }
.inbox-item-top time { flex: none; font-size: .78rem; opacity: .65; }
.inbox-item-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; opacity: .75; }
.inbox-item.unread .inbox-item-last { opacity: 1; }
.inbox-tag { font-size: .7rem; padding: 1px 6px; border-radius: 999px; background: rgba(220,80,80,.18); margin-right: 6px; }
.inbox-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--gold, #c9a24a); }
.inbox-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.inbox-empty { margin: auto; text-align: center; padding: 24px; }
.inbox-empty p:first-child { font-size: 2.4rem; margin: 0; }
.inbox-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border-strong, rgba(128,128,128,.25)); }
.inbox-head-who { display: grid; min-width: 0; flex: 1; }
.inbox-head-who strong { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-back { display: none; }
.inbox-msgs { list-style: none; margin: 0; padding: 16px; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.inbox-msgs .msg { max-width: min(78%, 560px); margin: 0; padding: 9px 13px; border-radius: 16px; background: rgba(128,128,128,.16); align-self: flex-start; border-bottom-left-radius: 5px; }
.inbox-msgs .msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.inbox-msgs .msg-me { align-self: flex-end; background: rgba(200,160,70,.22); border-bottom-left-radius: 16px; border-bottom-right-radius: 5px; }
.inbox-msgs .msg-meta { font-size: .72rem; opacity: .6; margin-top: 3px; }
.inbox-msgs .msg-me .msg-meta { text-align: right; }
.msg-new { animation: msg-in .28s ease-out; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.inbox-open .inbox-pane { animation: pane-in .2s ease-out; }
@keyframes pane-in { from { opacity: .4; } to { opacity: 1; } }
.inbox-compose { display: grid; gap: 6px; padding: 10px 14px 12px; border-top: 1px solid var(--border-strong, rgba(128,128,128,.25)); }
.inbox-compose-row { display: flex; gap: 8px; align-items: flex-end; }
.inbox-compose-row textarea { flex: 1; min-width: 0; resize: none; min-height: 42px; max-height: 140px; }
.inbox-compose-tpl { min-width: 0; }
.inbox-compose-tpl select { max-width: 100%; width: 100%; }
.inbox-compose { min-width: 0; }
.inbox-head { min-width: 0; }
.inbox-closed { margin: 0; padding: 14px 16px; border-top: 1px solid var(--border-strong, rgba(128,128,128,.25)); color: #e07a7a; }
@media (max-width: 900px) {
  .inbox-chat { grid-template-columns: 1fr; height: calc(100dvh - 170px); }
  .inbox-pane { display: none; }
  .inbox-chat.inbox-open .inbox-side { display: none; }
  .inbox-chat.inbox-open .inbox-pane { display: flex; }
  .inbox-back { display: inline-flex; }
  .inbox-msgs .msg { max-width: 88%; }
}
@media (prefers-reduced-motion: reduce) { .msg-new, .inbox-open .inbox-pane { animation: none; } .inbox-item { transition: none; } }

/* Inbox groups: All · Leads · Needs your reply · Waiting for their reply · Opted out */
.inbox-groups { display: flex; flex-wrap: wrap; gap: 6px; }
.inbox-group { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border-strong, rgba(128,128,128,.3)); background: none; color: inherit; font: inherit; font-size: .82rem; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.inbox-group:hover { background: rgba(128,128,128,.12); }
.inbox-group.active { background: rgba(200,160,70,.24); border-color: var(--gold, #c9a24a); font-weight: 700; }
.inbox-group:focus-visible { outline: 2px solid var(--gold, #c9a24a); outline-offset: 1px; }
.inbox-group-n { font-size: .74rem; opacity: .75; }
.inbox-tag-you { background: rgba(200,160,70,.3); }
@media (prefers-reduced-motion: reduce) { .inbox-group { transition: none; } }

/* The conversation list never scrolls sideways: each row is exactly as wide as the list and long text ends in "…". */
.inbox-list { overflow-x: hidden; }
.inbox-list > li { min-width: 0; max-width: 100%; overflow: hidden; }
.inbox-item { box-sizing: border-box; max-width: 100%; min-width: 0; overflow: hidden; }
.inbox-item-main, .inbox-item-top, .inbox-item-last { min-width: 0; max-width: 100%; }
.inbox-item-top strong { min-width: 0; flex: 1 1 auto; }
.inbox-item-last { display: block; }
.inbox-side-head { min-width: 0; }
.inbox-side-head > * { min-width: 0; max-width: 100%; }
.inbox-msgs { overflow-x: hidden; }

/* Predictive dialer: the three lines. Yellow = ringing, green = connected, grey = idle or stopped. */
.pd-status { display: inline-flex; align-items: center; gap: 6px; }
.pd-lines { display: flex; gap: 22px; align-items: flex-start; padding: 6px 0; }
.pd-line { display: grid; justify-items: center; gap: 6px; min-width: 76px; }
.pd-dot { width: 46px; height: 46px; border-radius: 50%; background: rgba(128,128,128,.28); border: 2px solid rgba(128,128,128,.35); transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease; }
.pd-dot.pd-ring { background: #e8b923; border-color: #f3d36b; animation: pd-ring 1.1s ease-in-out infinite; }
.pd-dot.pd-on { background: #2fbf71; border-color: #7be0a8; box-shadow: 0 0 0 6px rgba(47,191,113,.2); }
.pd-dot.pd-off { background: rgba(128,128,128,.28); border-color: rgba(128,128,128,.35); }
@keyframes pd-ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(232,185,35,.55); } 50% { box-shadow: 0 0 0 10px rgba(232,185,35,0); } }
.btn.pd-on { outline: 2px solid var(--gold, #c9a24a); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .pd-dot.pd-ring { animation: none; } .pd-dot { transition: none; } }

.push-enable { display: block; width: 100%; padding: 10px 14px; text-align: left; border-top: 1px solid var(--border); font-size: 13px; }
.push-enable:disabled { opacity: .75; cursor: default; }

/* Shift bar (team members) */
.shift-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; z-index: 40; justify-content: center; width: max-content; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: min(560px, calc(100vw - 96px)); padding: 8px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border-strong, var(--border)); box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.shift-bar.on { border-color: #1F8A5B; }
.shift-bar.warn { border-color: #B3261E; }
.shift-bar .small { max-width: 320px; }
/* Hours tracker */
.hr-bar, .hr-line { display: flex; height: 12px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); background: transparent; }
.hr-line { height: 26px; margin: 8px 0 4px; }
.hr-bar > span, .hr-line > span { display: block; min-width: 0; }
.hr-line > span { flex: 1 1 0; }
.hr-call { background: #1F8A5B; } .hr-active { background: #C7A15A; } .hr-idle { background: #9AA5A0; } .hr-gap { background: repeating-linear-gradient(90deg, transparent 0 2px, rgba(128,128,128,.18) 2px 4px); }
.hr-noscreen { background-image: repeating-linear-gradient(135deg, rgba(179,38,30,.75) 0 2px, transparent 2px 5px); }
.hr-key span { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--border); vertical-align: -2px; margin-left: 10px; }
.hr-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.hr-shots a { display: grid; gap: 2px; text-decoration: none; color: inherit; font-size: 12px; }
.hr-shots img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2, transparent); }
.act-feed { max-height: 520px; overflow: auto; }
.act-feed li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.field-bad { outline: 2px solid #B3261E; outline-offset: 1px; }

/* Outreach */
.or-apps { display: grid; gap: 6px; margin-top: 8px; }
.or-app { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.or-app > a { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Campaign form: pick several lists */
.list-pick { display: grid; gap: 4px; max-height: 170px; overflow: auto; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; }

/* Home tiles are buttons: click one to see those leads */
.tile-btn { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: transform .12s ease, border-color .12s ease; }
.tile-btn:hover, .tile-btn:focus-visible { transform: translateY(-2px); border-color: var(--gold, #C7A15A); }
.tile-btn.tile-on { border-color: var(--gold, #C7A15A); box-shadow: 0 0 0 2px rgba(199,161,90,.35); }
.tile-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.tile.hero .tile-hint { color: #D5DCD7; }
#home-leads { display: block; scroll-margin-top: 90px; }
@media (prefers-reduced-motion: reduce) { .tile-btn { transition: none; } .tile-btn:hover { transform: none; } }

/* Inbox: step through campaigns */
.inbox-camp { display: flex; gap: 6px; align-items: center; }
.inbox-camp select { flex: 1; min-width: 0; }
/* Campaign assistant */
.assist-log { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow: auto; padding: 4px 2px 10px; }
.assist-msg { align-self: flex-start; max-width: min(640px, 92%); padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--panel-2); border: 1px solid var(--border); overflow-wrap: anywhere; animation: lgo-rise .25s ease both; }
.assist-msg.me { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: rgba(199,161,90,.18); border-color: rgba(199,161,90,.45); }
.assist-panel { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.assist-option { text-align: left; font: inherit; color: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.assist-option:hover, .assist-option:focus-visible { border-color: var(--gold, #C7A15A); box-shadow: 0 0 0 2px rgba(199,161,90,.25); }

/* Email marketing */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.emk-funnel { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.emk-funnel > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--mark-wash); }
.emk-funnel strong { font: 500 22px/1.1 var(--f-display); color: var(--heading); }
.emk-steps { display: grid; gap: 10px; }
.emk-steps .subcard { display: grid; gap: 8px; }
.emk-steps input[type="text"], .emk-steps textarea { width: 100%; }
.emk-thread { display: grid; gap: 10px; }
.emk-msg { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel-2); }
.emk-msg.in { border-color: rgba(199,161,90,.55); background: var(--mark-wash); }
.emk-msg.draft { border-style: dashed; }
.emk-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.emk-quote { padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--mark-wash); border-radius: 0 10px 10px 0; }
/* Inbox: a suggested reply, and the message text in the report */
.inbox-suggest { display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(199,161,90,.6); background: var(--mark-wash); }
.inbox-suggest p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-preview { max-width: 520px; white-space: normal; overflow-wrap: anywhere; }
.inbox-side-head select[aria-label="Order"] { width: 100%; }
/* Inbox: the conversations and the messages get the room; the filters take one line and fold away on scroll */
.inbox-side-head { gap: 8px; padding: 10px 12px; }
.inbox-search-row { display: flex; align-items: center; gap: 8px; }
.inbox-search-row input[type="search"] { flex: 1; min-width: 0; min-height: 38px; }
.inbox-search-row .muted { flex: none; white-space: nowrap; }
.inbox-more-btn { flex: none; position: relative; width: 38px; height: 38px; }
.inbox-more-btn[aria-expanded="true"] { border-color: var(--gold); background: rgba(199,161,90,.12); }
.inbox-more-btn.on::after { content: ''; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.inbox-groups { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding-bottom: 1px; }
.inbox-groups::-webkit-scrollbar { display: none; }
.inbox-group { flex: none; white-space: nowrap; }
.inbox-more { display: grid; gap: 8px; }
.inbox-side-head > .inbox-groups, .inbox-side-head > .inbox-more { max-height: 240px; transition: max-height .24s ease, opacity .18s ease, margin-top .24s ease; }
.inbox-side-head.compact > .inbox-groups, .inbox-side-head.compact > .inbox-more { max-height: 0; opacity: 0; margin-top: -8px; overflow: hidden; pointer-events: none; }
.inbox-head { padding: 8px 12px; gap: 8px; }
.inbox-head .btn-sm { min-height: 34px; padding: 5px 9px; }
.inbox-msgs { padding: 12px 14px; }
.inbox-compose { padding: 8px 10px 10px; }
.inbox-compose-tpl { flex: none; width: 46px; }
.inbox-compose-tpl select { width: 46px; min-height: 42px; padding: 0 0 0 10px; text-overflow: clip; }
@media (max-width: 900px) { .inbox-head { flex-wrap: wrap; } .inbox-head-who { flex-basis: 50%; } }
@media (prefers-reduced-motion: reduce) { .inbox-side-head > .inbox-groups, .inbox-side-head > .inbox-more { transition: none; } }
/* Side menu lists */
.nav-groups { display: grid; gap: 2px; margin-top: 6px; }
.nav-head { width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left; color: rgba(232,227,214,.62); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; transition: background .2s ease, color .2s ease; }
.nav-head:hover { background: rgba(244,240,229,.06); color: #fff; }
.nav-head-label { flex: 1; }
.nav-head::after { content: ''; width: 6px; height: 6px; margin-right: 4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .2s ease; opacity: .8; }
.nav-group.open > .nav-head { color: #fff; }
.nav-group.open > .nav-head::after { transform: rotate(45deg); }
.nav-group.has-current:not(.open) > .nav-head { color: var(--gold-soft); }
.nav-group.open .group-badge { display: none; }
.nav-group > .nav { margin: 2px 0 8px 12px; padding-left: 8px; border-left: 1px solid rgba(199,161,90,.25); }
/* On a phone there are no lists to open: every page is in the one strip, as before. The arrows are for wide screens. */
@media (max-width: 900px) {
  .side nav { display: flex; align-items: center; gap: 4px; }
  .nav-groups { display: flex; gap: 4px; margin: 0; }
  .nav-group { display: flex; align-items: center; }
  .nav-head { display: none; }
  .nav-group > .nav, .nav-group > .nav[hidden] { display: flex !important; margin: 0; padding: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) { .nav-head, .nav-head::after { transition: none; } }
