/* Portal: same tokens as the site; the brand (accent) is overridden per tenant at runtime. */
:root { --side: 248px; --brand-mark: var(--acc); }
html, body { height: 100%; }
body { background: var(--paper); color: var(--ink-100); font-size: 14px; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.02em; }
.muted { color: var(--ink-500); }
.small { font-size: 12px; }
.num-tab { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ===== Shell ===== */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--ink-950) 0, var(--ink-950) calc(var(--side) - 1px), var(--line) calc(var(--side) - 1px), var(--line) var(--side), transparent var(--side)); }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--ink-950); padding: 18px 14px; gap: 18px; min-width: 0; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 8px; min-height: 40px; }
.brand-logo { width: 30px; height: 30px; border-radius: 9px; background: var(--acc); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex-shrink: 0; overflow: hidden; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: -0.015em; line-height: 1.15; }
.brand-sub { font-size: 11px; color: var(--ink-500); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-600); padding: 12px 10px 6px; font-weight: 500; }
.nav a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 10px; color: var(--ink-400); font-size: 14px; transition: background .12s, color .12s; }
.nav a svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .8; }
.nav a:hover { background: var(--ink-900); color: var(--ink-100); }
.nav a.active { background: var(--white); color: var(--ink-100); box-shadow: var(--shadow-s); border: 1px solid var(--line); height: 36px; }
.nav a .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--acc); color: #fff; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.side-foot { margin-top: auto; display: grid; gap: 10px; min-width: 0; }
.viewas { display: grid; gap: 6px; padding: 10px; border: 1px dashed var(--line-2); border-radius: 12px; min-width: 0; }
.viewas label { font-size: 11px; color: var(--ink-500); }
.viewas select { width: 100%; min-width: 0; height: 32px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--white); font-size: 13px; padding: 0 8px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 6px; min-width: 0; }
.me > div { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--ink-850); color: var(--ink-400); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.me-name { font-size: 13px; font-weight: 500; line-height: 1.2; }
.me-role { font-size: 11px; color: var(--ink-500); }
.me button { margin-left: auto; border: 0; background: none; color: var(--ink-500); font-size: 12px; padding: 6px; border-radius: 6px; }
.me button:hover { color: var(--ink-100); background: var(--ink-900); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.banner { display: flex; align-items: center; gap: 10px; padding: 9px 28px; font-size: 12.5px; border-bottom: 1px solid var(--line); background: var(--warn-soft); color: #7A4E00; }
.banner b { font-weight: 600; }
.banner.as { background: var(--acc-soft); color: var(--acc-ink); }
.banner button { margin-left: auto; border: 1px solid currentColor; background: transparent; color: inherit; border-radius: 999px; font-size: 12px; height: 26px; padding: 0 10px; opacity: .8; }
.page { padding: 32px 36px 64px; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head .eyebrow { margin-bottom: 8px; }
.page-title { font-family: var(--f-display); font-weight: 400; font-size: 44px; line-height: 1; letter-spacing: -0.02em; }
.page-title em { font-style: italic; color: var(--acc); }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ===== Building blocks ===== */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g-main { grid-template-columns: 1.6fr 1fr; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-title { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.panel-sub { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel.flush .panel-head { padding: 18px 20px 0; }
.section-gap { height: 16px; }

.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; min-width: 0; }
.kpi .l { font-size: 12px; color: var(--ink-500); display: flex; justify-content: space-between; gap: 8px; }
.kpi .v { font-size: 30px; font-weight: 600; letter-spacing: -0.025em; margin-top: 6px; line-height: 1.05; }
.kpi .v small { font-size: 14px; font-weight: 500; color: var(--ink-500); letter-spacing: 0; margin-left: 4px; }
.kpi .d { font-size: 12px; margin-top: 6px; color: var(--ink-500); }
.up { color: #0E8A55; } .down { color: var(--err); }
.kpi.hero .v { font-size: 48px; }

.chip-s { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; white-space: nowrap; background: var(--ink-900); color: var(--ink-400); }
.chip-s::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-s.nodot::before { display: none; }
.chip-s.on { background: var(--live-soft); color: #0E8A55; }
.chip-s.off { background: var(--ink-900); color: var(--ink-500); }
.chip-s.warn { background: var(--warn-soft); color: #8A5A00; }
.chip-s.err { background: var(--err-soft); color: #B4232A; }
.chip-s.acc { background: var(--acc-soft); color: var(--acc-ink); }

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 500; font-size: 11.5px; color: var(--ink-500); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.r, .tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr.click { cursor: pointer; transition: background .1s; }
.tbl tr.click:hover td { background: var(--ink-950); }
.tbl .name { font-weight: 500; }
.tbl-wrap { overflow-x: auto; }

.seg { display: inline-flex; background: var(--ink-900); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; color: var(--ink-500); font-weight: 500; }
.seg button.on { background: var(--white); color: var(--ink-100); box-shadow: var(--shadow-s); }

.btn-acc { background: var(--acc); color: #fff; }
.btn-acc:hover { filter: brightness(.96); }
.btn-danger { background: var(--err-soft); color: #B4232A; }
.btn-tiny { height: 28px; padding: 0 11px; font-size: 12.5px; }

.field { display: grid; gap: 6px; }
.field > label { font-size: 12px; font-weight: 500; color: var(--ink-400); }
.field .hint { font-size: 12px; color: var(--ink-500); line-height: 1.4; }
.inp, .sel, .ta { width: 100%; height: 40px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; font-size: 14px; background: var(--white); color: var(--ink-100); }
.ta { height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.inp:focus, .sel:focus, .ta:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.sel { appearance: none; -webkit-appearance: none; padding-right: 34px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%236B6B76' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center; }
.form-row { display: grid; gap: 14px; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* toggle */
.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--ink-800); border-radius: 999px; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15); transition: transform .15s; }
.switch input:checked + span { background: var(--acc); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }

/* range */
.range { width: 100%; accent-color: var(--acc); height: 26px; }
.range-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-500); font-family: var(--f-mono); }

/* review rows */
.topic-hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; background: var(--ink-100); color: var(--paper); border-radius: var(--r-lg); padding: 22px 24px; position: relative; overflow: hidden; }
.topic-hero::after { content: ""; position: absolute; right: -50px; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(closest-side, var(--acc), transparent); opacity: .45; pointer-events: none; }
.topic-hero .k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-600); }
.topic-hero .t { font-family: var(--f-display); font-size: 30px; line-height: 1.05; letter-spacing: -0.02em; margin-top: 6px; }
.topic-hero .t em { color: var(--acc-on-dark, var(--acc-2)); font-style: italic; }
.topic-hero .n { font-size: 46px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; position: relative; z-index: 1; }
.topic-hero .ico { width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center; }
.topic-hero .btn { position: relative; z-index: 1; }

.review { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); overflow: hidden; }
.review + .review { margin-top: 10px; }
.review-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 14px 16px; cursor: pointer; align-items: center; }
.review-row:hover { background: var(--ink-950); }
.review-q { font-size: 14.5px; font-weight: 500; letter-spacing: -0.01em; }
.review-meta { font-size: 12px; color: var(--ink-500); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.review-body { border-top: 1px solid var(--line); padding: 18px 16px 18px; display: grid; gap: 16px; background: var(--ink-950); }
.why { font-size: 13.5px; line-height: 1.55; color: var(--ink-400); }
.why b { color: var(--ink-100); font-weight: 500; }
.player { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 10px 10px; }
.player button.play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--acc); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.player .bar { height: 32px; display: flex; align-items: center; gap: 2px; cursor: pointer; }
.player .bar i { flex: 1; border-radius: 2px; background: var(--ink-800); min-width: 2px; }
.player .bar i.p { background: var(--acc); }
.player .time { font-family: var(--f-mono); font-size: 12px; color: var(--ink-500); min-width: 88px; text-align: right; }
.player .na { grid-column: 2 / -1; font-size: 12.5px; color: var(--ink-500); }
.tx { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; max-height: 260px; overflow: auto; }
.tx p { margin: 0; font-size: 13.5px; line-height: 1.5; display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
.tx p span { font-family: var(--f-mono); font-size: 11px; color: var(--ink-500); padding-top: 2px; }
.tx p.a { color: var(--acc-ink); }
.tx p.mark { background: var(--warn-soft); border-radius: 6px; margin: 0 -6px; padding: 2px 6px; }
.verdicts { display: flex; gap: 8px; flex-wrap: wrap; }
.verdicts button { height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); font-size: 13.5px; color: var(--ink-100); font-weight: 500; }
.verdicts button:hover { border-color: var(--ink-400); }
.verdicts button.sel { background: var(--acc); border-color: var(--acc); color: #fff; }
.answered { display: flex; gap: 10px; align-items: flex-start; background: var(--live-soft); color: #0B6B43; border-radius: 12px; padding: 12px 14px; font-size: 13.5px; line-height: 1.45; }

/* campaigns */
.camp { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.camp:last-child { border-bottom: 0; }
.camp-name { font-weight: 500; font-size: 15px; letter-spacing: -0.01em; }
.camp-meta { font-size: 12.5px; color: var(--ink-500); margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.setting { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.setting .t { font-weight: 500; font-size: 14.5px; }
.setting .s { font-size: 12.5px; color: var(--ink-500); margin-top: 3px; line-height: 1.45; max-width: 520px; }
.lines-box { display: grid; gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.lines-val { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.pending-note { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: #8A5A00; background: var(--warn-soft); padding: 8px 12px; border-radius: 10px; }

/* messages */
.thread { display: flex; flex-direction: column; gap: 12px; max-height: 56vh; overflow: auto; padding: 4px 2px 12px; }
.msg { max-width: 76%; display: grid; gap: 4px; }
.msg .b { padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; background: var(--white); border: 1px solid var(--line); white-space: pre-wrap; }
.msg .w { font-size: 11px; color: var(--ink-500); padding: 0 6px; }
.msg.mine { align-self: flex-end; }
.msg.mine .b { background: var(--acc); color: #fff; border-color: var(--acc); border-bottom-right-radius: 6px; }
.msg.mine .w { text-align: right; }
.msg.them .b { border-bottom-left-radius: 6px; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; border-top: 1px solid var(--line); padding-top: 14px; }
.composer .ta { height: 48px; min-height: 48px; }

/* charts */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink-100); color: var(--paper); font-size: 12px; padding: 6px 9px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -100%); margin-top: -8px; opacity: 0; transition: opacity .1s; box-shadow: var(--shadow-m); }
.chart .tip b { font-weight: 600; }
.funnel { display: grid; gap: 10px; }
.frow { display: grid; grid-template-columns: 150px 1fr 120px; gap: 12px; align-items: center; font-size: 13px; }
.frow .fl { color: var(--ink-400); }
.frow .ft { height: 22px; background: var(--ink-900); border-radius: 6px; position: relative; overflow: hidden; }
.frow .fb { position: absolute; left: 0; top: 0; bottom: 0; background: var(--acc); border-radius: 0 4px 4px 0; }
.frow .fp { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-100); }
.frow .fv { text-align: right; font-variant-numeric: tabular-nums; }
.frow .fv b { font-weight: 600; }
.frow .fv span { color: var(--ink-500); font-size: 12px; margin-left: 6px; }

.health { display: flex; gap: 8px; flex-wrap: wrap; }
.hcell { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); font-size: 12.5px; color: var(--ink-400); }
.hcell b { color: var(--ink-100); font-weight: 600; font-variant-numeric: tabular-nums; }
.hcell .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.hcell.warn .dot { background: var(--warn); }
.hcell.err .dot { background: var(--err); }
.hcell.err { border-color: #F6C7C9; background: var(--err-soft); }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: center; font-size: 13.5px; }
.list-plain li:last-child { border-bottom: 0; }
.empty { padding: 28px 12px; text-align: center; color: var(--ink-500); font-size: 13.5px; }
.empty b { display: block; color: var(--ink-100); font-weight: 500; margin-bottom: 4px; font-size: 14.5px; }

.swatch { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); }
.brand-prev { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--paper); }
.brand-prev .bp-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--white); font-weight: 600; }
.brand-prev .bp-body { padding: 14px; display: flex; gap: 8px; align-items: center; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink-100); color: var(--paper); padding: 11px 16px; border-radius: 12px; font-size: 13.5px; box-shadow: var(--shadow-l); opacity: 0; transition: opacity .2s, transform .2s; z-index: 100; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal-bg { position: fixed; inset: 0; background: rgba(10,10,11,.35); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--white); border-radius: var(--r-lg); width: 520px; max-width: 100%; max-height: 90vh; overflow: auto; padding: 24px; box-shadow: var(--shadow-l); }
.modal h3 { font-family: var(--f-display); font-weight: 400; font-size: 30px; margin-bottom: 6px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-art { background: var(--art-bg, var(--ink-100)); color: var(--paper); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art::after { content: ""; position: absolute; right: -80px; bottom: -80px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(closest-side, var(--acc), transparent); opacity: .5; }
.login-art h2 { font-family: var(--f-display); font-weight: 400; font-size: 56px; line-height: .98; letter-spacing: -0.02em; max-width: 440px; position: relative; z-index: 1; }
.login-art h2 em { color: var(--acc-on-dark, var(--acc-2)); font-style: italic; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 32px; }
.login-card { width: 360px; max-width: 100%; display: grid; gap: 16px; }
.login-card h1 { font-family: var(--f-display); font-weight: 400; font-size: 40px; line-height: 1; }
.err { color: var(--err); font-size: 13px; min-height: 18px; }

/* routing */
.route-grid { display: grid; gap: 8px; }
.route-row { display: grid; grid-template-columns: 1.2fr 2fr 110px 70px 32px; gap: 10px; align-items: center; }
.route-row .inp, .route-row .sel { height: 36px; font-size: 13px; }
.states { display: flex; flex-wrap: wrap; gap: 4px; }
.st { font-family: var(--f-mono); font-size: 11px; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--white); color: var(--ink-500); cursor: pointer; user-select: none; }
.st.on { background: var(--acc); border-color: var(--acc); color: #fff; }
.split-preview { display: grid; gap: 8px; margin-top: 6px; }
.split-line { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; align-items: center; font-size: 13px; }
.split-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--paper); }
.split-bar i { display: flex; align-items: center; justify-content: center; color: #fff; font-style: normal; font-size: 11px; font-weight: 600; min-width: 0; overflow: hidden; white-space: nowrap; }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .g-main { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .side { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-l); }
  body.menu-open .side { transform: none; }
  body.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(10,10,11,.3); z-index: 55; }
  .topbar { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--line); background: rgba(251,250,246,.9); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 40; }
  .topbar button { border: 0; background: none; padding: 8px; margin-left: -8px; border-radius: 8px; }
  .page { padding: 22px 16px 56px; }
  .page-title { font-size: 34px; }
  .g2, .g3, .form-2 { grid-template-columns: 1fr; }
  .banner { padding: 9px 16px; }
  .topic-hero { grid-template-columns: 1fr auto; }
  .topic-hero .ico { display: none; }
  .topic-hero .btn { grid-column: 1 / -1; justify-self: start; }
  .frow { grid-template-columns: 100px 1fr 92px; }
  .route-row { grid-template-columns: 1fr 90px 60px 32px; }
  .route-row .states-cell { grid-column: 1 / -1; order: 5; }
  .login-wrap { grid-template-columns: minmax(0, 1fr); }
  .login-form { padding: 24px 16px; }
  .login-art { display: none; }
  .msg { max-width: 88%; }
  .tbl.stack thead { display: none; }
  .hide-m { display: none !important; }
  .tbl.stack tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .tbl.stack td { border: 0; padding: 3px 12px; }
  .tbl.stack td.r { text-align: right; }
}
@media (max-width: 480px) {
  .g4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 13px 14px; }
  .kpi .v { font-size: 24px; }
  .kpi.hero .v { font-size: 36px; }
  .player { grid-template-columns: 40px 1fr; }
  .player .time { grid-column: 1 / -1; text-align: left; }
}
/* 10/08: feed state, phases, people */
.banner.err { background: var(--err-soft); color: #8F1D23; }
.hcell.off .dot { background: var(--ink-600); }
.hcell.off { color: var(--ink-500); }
.note-box { border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 14px 16px; font-size: 13.5px; line-height: 1.55; color: var(--ink-400); background: var(--white); }
.note-box b { color: var(--ink-100); font-weight: 600; }
.people { display: grid; gap: 4px; }
.people .p { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.people .p button { border: 0; background: transparent; color: var(--acc-ink); font-size: 12px; padding: 0 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.people .p button.rm { color: #B4232A; }
.tbl td .sub { font-size: 12px; color: var(--ink-500); }
.banner > span { min-width: 0; line-height: 1.45; }
.banner button { flex: none; white-space: nowrap; }
/* 10/09: test calls inside the portal */
.tc-note { margin: -6px 0 14px; max-width: 760px; }
.tc-frame { display: block; width: 100%; height: calc(100vh - 210px); min-height: 620px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); }
@media (max-width: 860px) { .tc-frame { height: calc(100dvh - 150px); min-height: 560px; border-radius: var(--r-md); } }

/* ===== Brand parts (1012) ===== */
.brand-wide { display: block; height: 28px; max-width: 200px; object-fit: contain; object-position: left center; }
.art-logo { display: block; height: 40px; max-width: 260px; object-fit: contain; object-position: left center; }
.logo-row { display: flex; gap: 8px; align-items: center; }
.logo-prev { width: 120px; height: 40px; border: 1px solid var(--line); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--white); overflow: hidden; flex-shrink: 0; }
.logo-prev.dark { background: var(--ink-100); }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.color-in { width: 44px; height: 40px; border: 1px solid var(--line-2); border-radius: 10px; padding: 2px; background: #fff; flex-shrink: 0; }
.brand-prev .bp-art { margin-left: auto; display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 8px; color: #fff; font-size: 12px; }
.brand-prev .bp-art img { height: 22px; max-width: 150px; object-fit: contain; }

/* ===== Notifications and webhooks (1012) ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sel-sm { height: 32px; font-size: 13px; padding-left: 10px; }
.tbl th.grp { background: var(--ink-950); color: var(--ink-400); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.chk { display: flex; gap: 8px; align-items: center; font-size: 13.5px; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--acc); }
.chk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.chk-grid.one { grid-template-columns: 1fr; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.hook { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; margin-bottom: 10px; }
.hook:last-child { margin-bottom: 0; }
.hook-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.hook-act { display: flex; flex-wrap: wrap; gap: 6px; }
.note-box + .panel, .note-box { margin-bottom: 14px; }
@media (max-width: 760px) { .grid-2, .chk-grid { grid-template-columns: 1fr; } .logo-row { flex-wrap: wrap; } }
label.switch { display: inline-block; vertical-align: middle; }
.tbl select.sel-sm { width: auto; max-width: 220px; }

/* ===== Integrations (1013) ===== */
.int-intro { max-width: 860px; line-height: 1.55; margin: -6px 0 16px; font-size: 13.5px; }
.int-grid { align-items: start; }
.int-card .hook-top .name { font-weight: 500; overflow-wrap: anywhere; }
.int-card .small, .int-row .small { overflow-wrap: anywhere; }
.int-reason { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--err-soft); color: #8E1C22; line-height: 1.45; }
.int-row .hook-act .btn { flex: none; }
.modal .chk span { line-height: 1.4; }

/* ===== Partner looks (1013): type, corners, dark pages, sign-in art. Set per brand as attributes on <html>
   (data-font, data-corners, data-theme, data-art) by applyBrand in app.js. Defaults keep the look above. ===== */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 300; font-display: swap; src: url(/fonts/poppins-300.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/poppins-400.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/poppins-500.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/poppins-600.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/poppins-700.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/open-sans-400.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/open-sans-600.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/open-sans-700.woff2) format("woff2"); }

/* Type: Poppins headings and numbers, Open Sans text (sellbigger.ai) */
html[data-font="poppins"] { --f-display: "Poppins", "Open Sans", Helvetica, Arial, sans-serif; --f-sans: "Open Sans", Helvetica, Arial, sans-serif; --f-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
html[data-font="poppins"] body { font-feature-settings: normal; }
html[data-font="poppins"] :is(.page-title, .login-art h2, .login-card h1, .modal h3, .topic-hero .t) { font-weight: 500; letter-spacing: -0.025em; }
html[data-font="poppins"] .page-title { font-size: 36px; line-height: 1.12; }
html[data-font="poppins"] .login-art h2 { font-size: 50px; line-height: 1.08; font-weight: 400; letter-spacing: -0.03em; max-width: 520px; }
html[data-font="poppins"] .login-card h1 { font-size: 32px; line-height: 1.1; font-weight: 600; }
html[data-font="poppins"] .modal h3 { font-size: 24px; font-weight: 600; margin-bottom: 10px; }
html[data-font="poppins"] .topic-hero .t { font-size: 24px; line-height: 1.2; }
html[data-font="poppins"] :is(.page-title, .login-art h2, .login-card h1, .modal h3, .topic-hero .t) em { font-style: normal; }
html[data-font="poppins"] :is(.panel-title, .kpi .v, .brand-name, .btn, .camp-name, .lines-val, .topic-hero .n, .review-q, .setting .t, .empty b, .me-name, .seg button, .verdicts button) { font-family: var(--f-display); }
html[data-font="poppins"] :is(.panel-title, .camp-name, .review-q, .setting .t) { font-weight: 500; letter-spacing: -0.01em; }
html[data-font="poppins"] .kpi .v { font-weight: 600; letter-spacing: -0.03em; }
html[data-font="poppins"] .btn { font-weight: 500; letter-spacing: 0; }
html[data-font="poppins"] .eyebrow, html[data-font="poppins"] .nav-label { font-family: var(--f-display); font-weight: 500; letter-spacing: .16em; }

/* Corners */
html[data-corners="soft"] { --r-xs: 4px; --r-sm: 8px; --r-md: 10px; --r-lg: 12px; --r-xl: 16px; --r-pill: 10px; }
html[data-corners="square"] { --r-xs: 2px; --r-sm: 3px; --r-md: 4px; --r-lg: 6px; --r-xl: 8px; --r-pill: 4px; }
html[data-corners="soft"] :is(.nav a, .inp, .sel, .ta, .seg, .seg button, .verdicts button, .player, .tx, .hcell, .msg .b, .banner button, .brand-logo, .topic-hero .ico, .pending-note, .toast, .answered, .int-reason, .viewas, .viewas select, .hook, .note-box, .logo-prev, .color-in, .chip-s, .chip, .swatch, .frow .ft, .st, .me button, .chart .tip, .split-bar) { border-radius: 8px; }
html[data-corners="square"] :is(.nav a, .inp, .sel, .ta, .seg, .seg button, .verdicts button, .player, .tx, .hcell, .msg .b, .banner button, .brand-logo, .topic-hero .ico, .pending-note, .toast, .answered, .int-reason, .viewas, .viewas select, .hook, .note-box, .logo-prev, .color-in, .chip-s, .chip, .swatch, .frow .ft, .st, .me button, .chart .tip, .split-bar, .frow .fb) { border-radius: 3px; }
html[data-corners="square"] .msg.mine .b, html[data-corners="square"] .msg.them .b { border-radius: 3px; }

/* Dark pages (sellbigger.ai is near black with one bright color) */
html[data-theme="dark"] {
  --ink-000: #FFFFFF; --ink-100: #F4F4F6; --ink-200: #E4E4E8; --ink-400: #BDBDC6; --ink-500: #8F8F9A; --ink-600: #6C6C76;
  --ink-700: #4D4D56; --ink-800: #36363D; --ink-850: #2C2C32; --ink-900: #232328; --ink-950: #19191D;
  --paper: #141416; --white: #1B1B1F; --line: #2A2A30; --line-2: #3A3A42; --line-ink: #2A2A31;
  --live: #2FD08A; --live-soft: rgba(47,208,138,.13); --warn: #FFB020; --warn-soft: rgba(255,176,32,.12); --err: #FF5A60; --err-soft: rgba(255,90,96,.13);
  --shadow-s: 0 1px 0 rgba(0,0,0,.35); --shadow-m: 0 10px 30px -10px rgba(0,0,0,.65); --shadow-l: 0 24px 64px -16px rgba(0,0,0,.75);
}
html[data-theme="dark"] body { background: var(--paper); }
html[data-theme="dark"][data-art="waves"] { --bar-old: var(--art-dot); }
html[data-theme="dark"] .shell { background: linear-gradient(90deg, #0E0E10 0, #0E0E10 calc(var(--side) - 1px), #222227 calc(var(--side) - 1px), #222227 var(--side), transparent var(--side)); }
html[data-theme="dark"] .side { background: #0E0E10; border-right-color: #222227; }
html[data-theme="dark"] .brand { padding: 6px 6px 14px; }
html[data-theme="dark"] .brand-wide { height: 30px; max-width: 190px; }
html[data-theme="dark"] .brand-logo img { background: transparent; }
html[data-theme="dark"] .nav a { color: #A9A9B3; }
html[data-theme="dark"] .nav a:hover { background: #18181C; color: #fff; }
html[data-theme="dark"] .nav a.active { background: rgba(var(--acc-rgb), .12); color: #fff; border: 0; box-shadow: inset 3px 0 0 var(--acc); }
html[data-theme="dark"] .nav a.active svg { color: var(--acc); opacity: 1; }
html[data-theme="dark"] .nav-label { color: #5E5E68; }
html[data-theme="dark"] .avatar { background: #232328; color: #CFCFD6; }
html[data-theme="dark"] .page-title { color: var(--acc-title); }
html[data-theme="dark"] .page-title em { color: #fff; }
html[data-theme="dark"] .panel, html[data-theme="dark"] .kpi { background: linear-gradient(180deg, #1D1D22 0, #19191D 100%); }
html[data-theme="dark"] .kpi .v { color: #fff; }
html[data-theme="dark"] .inp, html[data-theme="dark"] .ta, html[data-theme="dark"] .sel { background-color: #101013; border-color: #34343B; }
html[data-theme="dark"] .inp:focus, html[data-theme="dark"] .ta:focus, html[data-theme="dark"] .sel:focus { box-shadow: 0 0 0 3px rgba(var(--acc-rgb), .22); }
html[data-theme="dark"] .seg { background: #101013; border: 1px solid #2A2A30; }
html[data-theme="dark"] .seg button.on { background: var(--acc); color: #fff; box-shadow: none; }
html[data-theme="dark"] .btn-ghost { color: #F4F4F6; border-color: #3A3A42; }
html[data-theme="dark"] .btn-ghost:hover { border-color: #6C6C76; }
html[data-theme="dark"] .btn-primary { background: #F4F4F6; color: #141416; }
html[data-theme="dark"] .btn-danger { color: #FF9195; }
html[data-theme="dark"] .chip-s.on { color: #45DE9B; }
html[data-theme="dark"] .chip-s.warn { color: #FFC24D; }
html[data-theme="dark"] .chip-s.err { color: #FF9195; }
html[data-theme="dark"] .up { color: #45DE9B; }
html[data-theme="dark"] .banner { color: #FFC24D; border-bottom-color: #2A2A30; }
html[data-theme="dark"] .banner.err { color: #FF9195; }
html[data-theme="dark"] .banner.as { color: var(--acc-ink); }
html[data-theme="dark"] .answered { color: #5BE0A5; }
html[data-theme="dark"] .pending-note { color: #FFC24D; }
html[data-theme="dark"] .int-reason { color: #FFA3A6; }
html[data-theme="dark"] .hcell.err { border-color: rgba(255,90,96,.35); }
html[data-theme="dark"] .people .p button.rm { color: #FF9195; }
html[data-theme="dark"] .topbar { background: rgba(14,14,16,.9); border-bottom-color: #222227; }
html[data-theme="dark"] .modal-bg, html[data-theme="dark"] body.menu-open::after { background: rgba(0,0,0,.62); }
html[data-theme="dark"] .modal { border: 1px solid #2A2A30; }
html[data-theme="dark"] .toast, html[data-theme="dark"] .chart .tip { background: #26262C; color: #fff; border: 1px solid #3A3A42; }
html[data-theme="dark"] .logo-prev.dark { background: #000; }
html[data-theme="dark"] .review-body { background: #161619; }
html[data-theme="dark"] .player, html[data-theme="dark"] .tx, html[data-theme="dark"] .verdicts button, html[data-theme="dark"] .hcell { background: #1B1B1F; }
html[data-theme="dark"] .frow .fp { background: #fff; }
html[data-theme="dark"] .topic-hero { background: radial-gradient(120% 140% at 100% 0, rgba(var(--acc-rgb), .16) 0, transparent 55%), #0F0F13; color: #fff; border: 1px solid #26262C; }
html[data-theme="dark"] .topic-hero .k { color: #8F8F9A; }
html[data-theme="dark"] .topic-hero .t em { color: var(--acc-title); }
html[data-theme="dark"] .topic-hero .ico { background: rgba(var(--acc-rgb), .14); color: var(--acc); }
html[data-theme="dark"] .topic-hero .btn { background: var(--acc) !important; color: #fff !important; border-color: var(--acc); }
html[data-theme="dark"] ::selection { background: var(--acc); color: #fff; }
html[data-theme="dark"] .tbl tr.click:hover td { background: #1F1F24; }
html[data-theme="dark"] .empty { color: #8F8F9A; }
html[data-theme="dark"] .split-bar { background: #101013; }

/* Sign-in page */
.login-art .art-sub { color: var(--ink-600); position: relative; z-index: 1; }
.login-for { margin-top: -8px; }
html[data-theme="dark"] .login-wrap { background: var(--paper); }
html[data-theme="dark"] .login-art { background: #0B0B10; border-right: 1px solid #1F1F25; }
html[data-theme="dark"] .login-art h2 { color: var(--acc-title); }
html[data-theme="dark"] .login-art h2 em { color: #fff; }
html[data-theme="dark"] .login-art .art-sub { color: #9A9AA6; }
html[data-theme="dark"] .login-card { background: #19191D; border: 1px solid #26262C; border-radius: var(--r-lg); padding: 36px 32px; width: 420px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.8); }
html[data-theme="dark"] .login-card .btn-acc { box-shadow: 0 10px 30px -10px rgba(var(--acc-rgb), .7); }

/* Moving-dots art (data-art="waves"): a canvas behind the sign-in art and the overview's input card */
.art-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.login-art > :not(.art-canvas), .topic-hero > :not(.art-canvas), .login-wrap > :not(.art-canvas) { position: relative; z-index: 2; }
html[data-art="waves"] .login-wrap { position: relative; overflow: hidden; background: #0B0B10; }
html[data-art="waves"] .login-wrap::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(45% 55% at 22% 18%, rgba(var(--acc-rgb), .13), transparent 70%), linear-gradient(180deg, transparent 62%, rgba(11,11,16,.72) 100%); }
html[data-art="waves"] .login-art, html[data-art="waves"] .login-form { background: transparent; border: 0; }
html[data-art="waves"] .login-art::after, html[data-art="waves"] .topic-hero::after, html[data-art="none"] .login-art::after, html[data-art="none"] .topic-hero::after { display: none; }

@media (max-width: 860px) {
  html[data-art="waves"] .login-art { display: flex; min-height: 240px; padding: 22px 18px 20px; gap: 26px; justify-content: flex-start; border-bottom: 1px solid #1F1F25; }
  html[data-art="waves"] .login-art h2 { margin-top: 18px; }
  html[data-art="waves"] .login-wrap { background: var(--paper); }
  html[data-art="waves"] .login-wrap::before { display: none; }
  html[data-art="waves"] .login-art { background: #0B0B10; }
  html[data-art="waves"] .login-art h2 { font-size: 30px; text-shadow: 0 0 8px #0B0B10, 0 0 18px #0B0B10, 0 0 32px #0B0B10, 0 0 48px #0B0B10; }
  html[data-art="waves"] .login-art .art-sub { display: none; }
  html[data-art="waves"] .art-logo { height: 30px; }
  html[data-theme="dark"] .login-card { padding: 26px 20px; border: 0; background: transparent; box-shadow: none; }
  html[data-theme="dark"] .login-form { align-items: flex-start; }
}

/* Brand form preview follows the chosen look */
.brand-prev[data-theme="dark"] { background: #141416; border-color: #2A2A30; }
.brand-prev[data-theme="dark"] .bp-top { background: #0E0E10; border-color: #2A2A30; color: #fff; }
.brand-prev[data-font="poppins"] { font-family: "Open Sans", Helvetica, Arial, sans-serif; }
.brand-prev[data-font="poppins"] :is(.bp-top, .btn) { font-family: "Poppins", Helvetica, Arial, sans-serif; }
.brand-prev[data-corners="square"] :is(.btn, .chip-s, .bp-art) { border-radius: 3px; }
.brand-prev[data-corners="soft"] :is(.btn, .chip-s, .bp-art) { border-radius: 8px; }
html[data-art="waves"] .login-art { justify-content: flex-start; }
html[data-art="waves"] .login-art h2 { margin-top: 13vh; }
html[data-art="waves"] .login-art .art-sub { margin-top: auto; }
@media (max-width: 860px) { html[data-theme="dark"] .shell { background: none; } html[data-theme="dark"] .side { box-shadow: 0 0 0 1px #222227, var(--shadow-l); } }

/* ---------- Calls (1013c): every call, its recording and transcript; exports ---------- */
.kpi-link { cursor: pointer; transition: border-color .15s, transform .15s; }
.kpi-link:hover, .kpi-link:focus-visible { border-color: var(--acc); outline: none; }
.cf-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.cf-bar .sel-sm { width: auto; min-width: 200px; max-width: 320px; }
.cf-q { flex: 1 1 220px; max-width: 360px; height: 36px; }
.fchips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; scrollbar-width: thin; }
.fchip { flex: 0 0 auto; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); color: var(--ink-300, var(--ink-400)); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.fchip b { font-weight: 600; color: var(--ink-100); margin-left: 4px; }
.fchip:hover { border-color: var(--acc); }
.fchip.on { background: var(--acc); border-color: var(--acc); color: #fff; }
.fchip.on b { color: #fff; }
.cf-more { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.cf-more .sel-sm { width: auto; }
.chk-inline { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-500); cursor: pointer; }
.chk-inline input { accent-color: var(--acc); width: 16px; height: 16px; }
.calls-panel { overflow: hidden; }
.calls-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; font-size: 12.5px; color: var(--ink-500); border-bottom: 1px solid var(--line); }
.call-cols, .call-row { display: grid; grid-template-columns: 44px minmax(180px, 1.5fr) 132px minmax(160px, 1.3fr) 168px 132px; gap: 14px; align-items: center; padding: 0 18px; }
.call-cols { height: 34px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); border-bottom: 1px solid var(--line); }
.call-row { min-height: 62px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13.5px; }
.call-row:last-child { border-bottom: 0; }
.call-row:hover, .call-row:focus-visible { background: var(--acc-soft); outline: none; }
.call-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-sub { font-size: 12px; color: var(--ink-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.call-who, .call-camp, .call-time { min-width: 0; }
.call-camp > div:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-phone { font-size: 12.5px; color: var(--ink-400); white-space: nowrap; }
.call-time { text-align: right; white-space: nowrap; }
.call-play { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--white); color: var(--ink-100); display: grid; place-items: center; cursor: pointer; }
.call-play:hover:not(:disabled), .call-play.on { background: var(--acc); border-color: var(--acc); color: #fff; }
.call-play:disabled { opacity: .3; cursor: default; }
.chip-s.dim { opacity: .75; }
.calls-more { padding: 14px; text-align: center; border-top: 1px solid var(--line); }
.mono { font-family: var(--f-mono); }
.drawer-bg { position: fixed; inset: 0; background: rgba(8, 8, 12, .45); z-index: 60; display: flex; justify-content: flex-end; }
.drawer { width: min(560px, 100%); height: 100%; overflow-y: auto; background: var(--paper); border-left: 1px solid var(--line); padding: 18px 24px 40px; box-shadow: var(--shadow-l); }
.dr-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.dr-nav { display: flex; gap: 8px; }
.dr-x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--white); color: var(--ink-100); font-size: 20px; line-height: 1; cursor: pointer; }
.dr-name { font-size: 22px; font-weight: 600; letter-spacing: -.015em; }
.dr-sub { color: var(--ink-500); font-size: 13.5px; margin-top: 3px; }
.dr-phone { margin-top: 6px; font-size: 13.5px; }
.dr-facts { display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--ink-500); margin: 14px 0 16px; }
.dplayer { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg, 14px); background: var(--white); }
.dplayer .play { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--acc); color: #fff; display: grid; place-items: center; cursor: pointer; }
.dp-seek { width: 100%; accent-color: var(--acc); }
.dp-time { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 11px; color: var(--ink-500); }
.dp-speed { display: flex; gap: 4px; }
.dp-speed button { height: 28px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-400); font-size: 12px; cursor: pointer; }
.dp-speed button.on { border-color: var(--acc); color: var(--ink-100); background: var(--acc-soft); }
.dr-actions { display: flex; gap: 8px; margin: 12px 0 18px; flex-wrap: wrap; }
.dr-label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 8px; }
.dtx { display: block; max-height: none; overflow: visible; padding: 8px; }
.dtx .ln { display: block; cursor: pointer; border-radius: 8px; margin: 0 0 2px; padding: 8px 10px; outline: none; }
.dtx .ln-t { display: block; font-family: var(--f-mono); font-size: 11px; color: var(--ink-500); margin-bottom: 3px; }
.dtx .ln-x { display: block; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.dtx .ln.a .ln-x { color: var(--acc-ink); }
.dtx .ln:hover, .dtx .ln:focus-visible { background: var(--acc-soft); }
.dtx .ln.now { background: var(--acc-soft); box-shadow: inset 3px 0 0 var(--acc); }
.dr-id { margin-top: 18px; word-break: break-all; }
.ex-card { border: 1px solid var(--line); border-radius: var(--r-lg, 14px); padding: 16px; margin-bottom: 12px; background: var(--white); }
.ex-card.ex-partner { border-color: var(--acc); }
.ex-t { font-weight: 600; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.ex-s { font-size: 13px; color: var(--ink-500); margin: 4px 0 12px; line-height: 1.45; }
.ex-btns { display: flex; gap: 8px; margin-top: 4px; }
.ex-days { display: flex; gap: 8px; margin-top: 8px; }
.ex-card .field { margin-bottom: 12px; }
.modal:has(.ex-card) { max-width: 560px; max-height: 90vh; overflow-y: auto; }
@media (max-width: 1100px) { .call-cols, .call-row { grid-template-columns: 40px minmax(160px, 1.4fr) minmax(140px, 1fr) 150px 112px; } .call-phone, .call-cols span:nth-child(3) { display: none; } }
@media (max-width: 760px) {
  .call-cols { display: none; }
  .call-row { grid-template-columns: 40px 1fr auto; grid-template-areas: "play who time" "play camp res"; gap: 4px 12px; padding: 12px 14px; }
  .call-play { grid-area: play; align-self: start; }
  .call-who { grid-area: who; } .call-time { grid-area: time; } .call-camp { grid-area: camp; } .call-res { grid-area: res; text-align: right; }
  .call-camp > div:first-child { font-size: 12px; color: var(--ink-500); }
  .cf-bar .sel-sm, .cf-q { min-width: 0; max-width: none; flex: 1 1 100%; }
  .drawer { padding: 14px 16px 40px; border-left: 0; }
  .dplayer { grid-template-columns: 48px 1fr; }
  .dp-speed { grid-column: 1 / -1; justify-content: flex-end; }
}
