/* Broker Desk layout on top of styles.css: a left sidebar with saved lists, server-paged lead
   tables, the lead page, the phone bar, the dialer, dashboards and settings. */
:root { --side: 236px; --live: #1f8a54; }
html, body { height: 100%; }
body { overflow: hidden; }
.small { font-size: 12.5px; }
.w100 { width: 100%; }
.h2 { font-size: 16px; margin: 22px 0 10px; }
.pad-s { padding: 0 14px 12px; margin: 0; }
.loading { padding: 60px 28px; color: var(--muted); }
.sp-r { margin-left: auto; }
.av.sm { width: 24px; height: 24px; font-size: 10px; }
.ib.sm { width: 26px; height: 26px; }
.right { text-align: right; }

/* ---------- shell and sidebar ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); height: 100vh; }
body.signed-out .shell { grid-template-columns: minmax(0, 1fr); }
body.signed-out .side { display: none; }
.side { background: #fbfbf9; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; padding: 10px 10px 8px; gap: 4px; }
.main { overflow-y: auto; min-width: 0; }
.ws { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; padding: 6px 6px 8px; font-weight: 700; font-size: 13.5px; line-height: 1.2; text-align: left; border-radius: var(--r1); }
.ws .trunc { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ws:hover { background: var(--line-2); }
.logo { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; color: #fff; font-size: 11.5px; font-weight: 750; letter-spacing: .02em; flex: none; }
.side-search { position: relative; display: flex; align-items: center; margin: 2px 0 8px; color: var(--muted); }
.side-search svg { position: absolute; left: 9px; }
.side-search input { width: 100%; height: 32px; border: 1px solid var(--line); border-radius: var(--r1); padding: 0 30px 0 30px; background: #fff; font-size: 13px; }
.side-search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.side-search kbd { position: absolute; right: 8px; font: 11px var(--sans); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; background: var(--surface-2); }
.side-nav, .side-lists { display: flex; flex-direction: column; gap: 1px; }
.side-nav a, .side-lists a, .side-foot a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 9px; border-radius: var(--r1); color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: 13.5px; min-width: 0; }
.side-nav a:hover, .side-lists a:hover, .side-foot a:hover { background: var(--line-2); color: var(--ink); }
.side-nav a.on, .side-lists a.on, .side-foot a.on { background: var(--accent-soft); color: var(--accent-ink); }
.side-nav a .badge { margin-left: auto; }
.side-lists { overflow-y: auto; min-height: 0; flex: 1; }
.side-lists a { height: 30px; font-weight: 500; font-size: 13px; }
.side-lists a .n { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.side-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 9px 4px; font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.side-h .ib { border-color: transparent; background: none; }
.side-empty { padding: 4px 9px; font-size: 12.5px; margin: 0; }
.side-foot { border-top: 1px solid var(--line-2); padding-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.side-foot .line { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 6px 9px; font-size: 12.5px; color: var(--ink-2); border-radius: var(--r1); text-align: left; min-width: 0; }
.side-foot .line:hover { background: var(--line-2); }
.side-foot .line .pill { margin-left: auto; height: 18px; font-size: 10.5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #c5cbc2; flex: none; }
.dot.on { background: var(--live); box-shadow: 0 0 0 3px #d9efe2; }
.side .me { width: 100%; border-radius: var(--r1); border: 0; background: none; height: 38px; padding: 0 8px 0 5px; justify-content: flex-start; }
.side .me:hover { background: var(--line-2); }
.side .me svg { margin-left: auto; color: var(--muted); }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; margin-bottom: 22px; }

/* ---------- page basics ---------- */
.page { padding: 22px 28px 90px; max-width: 1500px; }
.page-inbox, .page-settings { max-width: 1180px; }
.empty-sec.zen { align-items: center; text-align: center; padding: 48px 16px; }
.empty-sec .btn-row { margin-top: 6px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.row.leaving { opacity: .35; transition: opacity .15s ease; }
.pillbtn { display: inline-flex; align-items: center; gap: 3px; border: 0; background: none; padding: 0; color: var(--muted); }
.pillbtn:hover .pill { filter: brightness(.96); }
.pill.muted { background: var(--line-2); color: var(--muted); }

/* ---------- leads table ---------- */
.fbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.fsearch { position: relative; display: flex; align-items: center; color: var(--muted); }
.fsearch svg { position: absolute; left: 9px; }
.fsearch input { height: 32px; width: 220px; border: 1px solid var(--line); border-radius: var(--r1); padding: 0 10px 0 30px; background: #fff; font-size: 13px; }
.bulkbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin: 0 0 10px; background: var(--accent-soft); border: 1px solid #cfd6f5; border-radius: var(--r2); font-size: 13.5px; }
.bulkbar b { color: var(--accent-ink); }
.ltable { overflow: hidden; }
.lrow { display: grid; grid-template-columns: 34px minmax(0, 2.2fr) 150px 140px 120px 60px 100px 70px; gap: 10px; align-items: center; padding: 8px 14px 8px 10px; border-bottom: 1px solid var(--line-2); cursor: pointer; font-size: 13.5px; }
.lrow:hover { background: var(--surface-2); }
.lrow.sel { background: #f5f7ff; }
.lrow.lhead { cursor: default; background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 7px; padding-bottom: 7px; }
.lrow .main { display: flex; flex-direction: column; min-width: 0; }
.lrow .main b { font-weight: 650; }
.lrow .main .sub { font-size: 12.5px; color: var(--muted); }
.lrow .ph { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cb { display: grid; place-items: center; height: 100%; cursor: pointer; }
.cb input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }

/* ---------- lead page ---------- */
.lp-head { margin-bottom: 14px; }
.lp-top { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.lp-title { flex: 1; min-width: 280px; }
.lp-title h1 { margin: 0; font-size: 23px; line-height: 1.2; }
.lp-head .track { margin-top: 14px; }
.lp-head .track > span { flex: 1; font-size: 12px; color: var(--muted); padding-bottom: 4px; min-width: 0; }
.lp-head .track > span::before { content: ""; display: block; height: 4px; border-radius: 2px; background: var(--line); margin: 0 3px 7px 0; }
.lp-head .track > span.done::before { background: #9aa39a; }
.lp-head .track > span.cur::before { background: var(--accent); }
.lp-head .track > span.cur { color: var(--ink); font-weight: 650; }
.lp { display: grid; grid-template-columns: 290px minmax(0, 1fr) 290px; gap: 14px; align-items: start; }
.lp-left, .lp-right { display: flex; flex-direction: column; gap: 12px; }
.lp-mid { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card-s { background: #fff; border: 1px solid var(--line); border-radius: var(--r3); padding-bottom: 6px; }
.cs-h { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px 6px; }
.cs-h h3 { margin: 0; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 4px 14px; font-size: 13px; }
.kv > span { color: var(--muted); }
.kv > b { font-weight: 600; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.kv b.good { color: var(--good); } .kv b.warn { color: var(--warn); } .kv b.bad { color: var(--bad); } .kv b.muted { color: var(--muted); font-weight: 500; }
.about-s { margin: 6px 14px 4px; padding: 8px 10px; background: #fffdf6; border: 1px solid var(--line-2); border-radius: var(--r1); font-size: 13px; white-space: pre-wrap; }
.person { padding: 6px 14px; border-top: 1px solid var(--line-2); }
.person:first-of-type { border-top: 0; }
.pn { font-size: 13.5px; }
.pl { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); margin-top: 3px; min-width: 0; }
.pl .acts { gap: 4px; }
.card-s .muted.small, .card-s p.small { padding: 0 14px; margin: 2px 0 4px; }
.dnc { padding: 6px 14px 8px; font-size: 13px; }
.comp .tabs { padding: 0 8px; border-bottom: 1px solid var(--line-2); margin: 0; }
.comp .tabs button { display: inline-flex; align-items: center; gap: 6px; }
.comp-b { padding: 12px 14px; }
.comp-b textarea { width: 100%; min-height: 76px; border: 1px solid var(--line); border-radius: var(--r2); padding: 9px 11px; resize: vertical; background: #fff; line-height: 1.45; }
.comp-b textarea.tall { min-height: 150px; }
.comp-b textarea:focus-visible, .comp-row input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.comp-b textarea:disabled { background: var(--surface-2); }
.comp-row { display: flex; gap: 8px; margin-bottom: 8px; }
.comp-row select { height: 34px; border: 1px solid var(--line); border-radius: var(--r1); padding: 0 8px; background: #fff; max-width: 180px; }
.comp-row input { flex: 1; height: 34px; border: 1px solid var(--line); border-radius: var(--r1); padding: 0 10px; }
.comp-f { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.comp .chips { margin-bottom: 8px; }
.tl-p { overflow: hidden; }
.tl li { grid-template-columns: 28px minmax(0, 1fr); }
.tl .meta { color: var(--ink-2); font-size: 13px; }
.tl .meta b { color: var(--ink); }
.tl .ic.mail { background: #f1eefb; color: #5b45b0; }
.tl .ic.note { background: #fff6dd; color: var(--warn); }
.tl .ic.form { background: var(--good-soft); color: var(--good); }
.tl .ic.bank { background: #eef3f1; color: #3c6b5a; }
.tl .ic.call.bad { background: var(--bad-soft); color: var(--bad); }
.tl .txt.vm { color: var(--ink-2); font-style: italic; }
.tl audio { height: 32px; margin-top: 6px; width: 100%; max-width: 360px; }
.tl li.bubble-li { display: flex; grid-template-columns: none; padding: 8px 16px; background: var(--surface-2); }
.tl li.bubble-li.out { justify-content: flex-end; }
.tl.mini li { padding: 7px 12px; font-size: 13px; }
details.mail summary { cursor: pointer; color: var(--ink-2); font-size: 13px; margin-top: 2px; }
details.mail[open] summary { margin-bottom: 4px; }
.bub.mini { max-width: 100%; margin-top: 4px; }
.bub.mini .b { padding: 6px 10px; font-size: 13px; }
.task { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; padding: 7px 14px; border-top: 1px solid var(--line-2); align-items: start; }
.task:first-of-type { border-top: 0; }
.task b { font-size: 13px; font-weight: 600; display: block; }
.task span { font-size: 12.5px; color: var(--muted); }
.task.late span { color: var(--bad); font-weight: 600; }
.tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #b8beb5; background: #fff; color: transparent; display: grid; place-items: center; padding: 0; }
.tick:hover { border-color: var(--good); color: var(--good); }
.dealmini { display: flex; flex-direction: column; gap: 5px; margin: 0 14px 6px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r2); text-decoration: none; color: inherit; background: var(--surface-2); }
.dealmini:hover { border-color: var(--accent); }
.dealmini .money { font-size: 21px; }
.dealmini .pill { align-self: flex-start; }
.file { display: flex; align-items: center; gap: 8px; padding: 6px 14px; color: var(--ink); text-decoration: none; font-size: 13px; min-width: 0; }
.file:hover { background: var(--surface-2); }
.file svg { color: var(--muted); flex: none; }
.files { border-top: 1px solid var(--line-2); padding: 4px 0; }

/* ---------- phone bar ---------- */
#phone-root { position: fixed; right: 22px; bottom: 22px; z-index: 260; }
#phone-root .callbar { width: 500px; max-width: calc(100vw - 32px); }
.callbar .av.pulse { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .35); } 50% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); } }
.callbar.live .cb-state { color: #7fe0a8; }
.callbar.voicemail .cb-state { color: #f3c96b; }
.hang { width: 38px; height: 38px; border-radius: 50%; border: 0; background: #d33a2c; color: #fff; display: grid; place-items: center; flex: none; }
.hang:hover { background: #b52c20; }
.vm-btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); color: #fff; }
.vm-btn:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .3); color: #fff; }
.cb-note { margin-top: 6px; font-size: 12px; color: var(--muted); text-align: right; }
.callbar.wrap textarea { min-height: 60px; }
#ring-root { position: fixed; top: 18px; right: 22px; z-index: 270; }
.ringer { width: 340px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--live); border-radius: var(--r2); box-shadow: var(--shadow-lift); padding: 12px 12px 12px 14px; animation: rise .2s ease; }
.rg-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--live); }
.rg-b { display: flex; flex-direction: column; margin: 6px 0 10px; }
.rg-b b { font-size: 15px; }
.rg-b span { color: var(--ink-2); font-size: 13px; }
.rg-acts { display: flex; gap: 8px; justify-content: flex-end; }
.btn.answer { background: var(--live); border-color: var(--live); color: #fff; }
.btn.answer:hover { background: #18713f; }

/* ---------- dialer ---------- */
.lines-seg button { width: 44px; }
.lines-seg button:disabled { opacity: .35; cursor: not-allowed; }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.guard { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r2); margin-top: 12px; }
.guard > div:first-child { display: flex; flex-direction: column; font-size: 13px; }
.guard > div:first-child span { color: var(--ink-2); }
.guard.big b { font-size: 26px; }
.meter { position: relative; flex: 0 0 120px; height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--good); border-radius: 4px; }
.meter.warn i { background: #d29a2b; }
.dl-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) 1.4fr; gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: var(--r2); overflow: hidden; margin-bottom: 14px; }
.dl-stats > div { background: #fff; padding: 9px 12px; display: flex; flex-direction: column; min-width: 0; }
.dl-stats span { font-size: 12px; color: var(--muted); }
.dl-stats b { font-size: 19px; font-variant-numeric: tabular-nums; }
.dl-guard .meter { margin-top: 6px; flex: none; width: 100%; }
.legs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.leg { background: #fff; border: 1px solid var(--line); border-radius: var(--r2); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.lg-top { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--muted); }
.lg-dot { width: 8px; height: 8px; border-radius: 50%; background: #c5cbc2; }
.leg.live { border-color: #c9d3f6; }
.leg.live .lg-dot { background: var(--accent); animation: blink 1s ease-in-out infinite; }
.leg.live .lg-st { color: var(--accent-ink); }
.leg.good { border-color: var(--live); background: #f2fbf6; box-shadow: 0 0 0 3px #d9efe2; }
.leg.good .lg-dot { background: var(--live); }
.leg.good .lg-st { color: var(--live); }
.leg.warn .lg-dot { background: #d29a2b; } .leg.warn .lg-st { color: var(--warn); }
.leg.bad .lg-dot { background: var(--bad); } .leg.bad .lg-st { color: var(--bad); }
@keyframes blink { 50% { opacity: .35; } }
.dl-live { overflow: hidden; }
.dl-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #f2fbf6; border-bottom: 1px solid #d3eadb; font-variant-numeric: tabular-nums; }
.dl-wrap .dl-bar { background: var(--surface-2); border-bottom-color: var(--line-2); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--live); animation: blink 1.4s ease-in-out infinite; }
.dl-lead { display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line-2); }
.dl-lead h2 { margin: 0; font-size: 20px; }
.kvrow { display: flex; gap: 22px; }
.kvrow > div { display: flex; flex-direction: column; }
.kvrow span { font-size: 12px; color: var(--muted); }
.kvrow b { font-size: 16px; }
.dl-wrap textarea { width: 100%; margin: 10px 0; border: 1px solid var(--line); border-radius: var(--r2); padding: 8px 10px; resize: vertical; }
.dl-wrap .cb-f { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.dl-idle .empty-sec { align-items: center; text-align: center; padding: 36px 16px; }
.sumgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sumgrid > div { border: 1px solid var(--line-2); border-radius: var(--r2); padding: 10px 12px; display: flex; flex-direction: column; }
.sumgrid span { font-size: 12px; color: var(--muted); }
.sumgrid b { font-size: 22px; }

/* ---------- deals ---------- */
.page-deals { max-width: none; }
.card { display: block; text-decoration: none; color: inherit; cursor: pointer; }
.dp { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 14px; }
.subrow { border-top: 1px solid var(--line-2); padding: 10px 16px; }
.sr-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.offer2 { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-top: 8px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--r1); background: var(--surface-2); font-size: 13px; }
.offer2 .od { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--ink-2); }
.offer2 .od b { color: var(--ink); }
.offer2.chosen { border-color: var(--accent); background: #f5f7ff; }
.offer2 .money.big { font-size: 19px; }
.offer-in { display: grid; grid-template-columns: 1.4fr 1fr .8fr 1fr .8fr; gap: 8px; margin-bottom: 8px; }
.offer-in input, .offer-in select { height: 34px; border: 1px solid var(--line); border-radius: var(--r1); padding: 0 8px; min-width: 0; }
.lpick { display: flex; flex-direction: column; gap: 6px; max-height: 56vh; overflow: auto; }
.lp-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r1); cursor: pointer; }
.lp-row.nofit { background: #fffaf0; }
.lp-row.off { opacity: .55; cursor: default; }
.lp-row input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.lp-row .main { display: flex; flex-direction: column; min-width: 0; }
.lp-row .sub { font-size: 12.5px; color: var(--ink-2); }

/* ---------- lenders ---------- */
.lnrow { grid-template-columns: minmax(0, 2fr) repeat(5, 90px); }
.lnrow .num { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; font-weight: 600; }
.lnrow .num .sub { font-weight: 500; font-size: 11.5px; color: var(--muted); }
.lnrow.off { opacity: .6; }
.lnrow.row { cursor: pointer; }
.lnrow.row:hover { background: var(--surface-2); }

/* ---------- sequences ---------- */
.seqgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.seqcard { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.sq-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.sq-h h3 { margin: 0; font-size: 15px; }
.sq-h p { margin: 2px 0 0; }
.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.steps-list li { display: flex; align-items: center; gap: 8px; }
.steps-list .ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--ink-2); flex: none; }
.steps-list .ic.mail { background: #f1eefb; color: #5b45b0; } .steps-list .ic.text { background: var(--good-soft); color: var(--good); }
.sq-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-2); border-radius: var(--r1); overflow: hidden; border: 1px solid var(--line-2); }
.sq-stats > div { background: var(--surface-2); padding: 6px 10px; display: flex; flex-direction: column; }
.sq-stats b { font-size: 16px; font-variant-numeric: tabular-nums; }
.sq-stats span { font-size: 11.5px; color: var(--muted); }
.seqstep { border: 1px solid var(--line); border-radius: var(--r2); padding: 10px 12px; margin: 10px 0; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.ss-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ss-h .n { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.ss-h select, .seqstep input, .seqstep textarea { border: 1px solid var(--line); border-radius: var(--r1); padding: 6px 9px; background: #fff; }
.seqstep textarea { resize: vertical; }
.inl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.inl input { width: 58px; height: 30px; }

/* ---------- dashboard ---------- */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r3); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.tile b { font-size: 25px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tile .s { font-size: 12px; color: var(--ink-2); }
.up { color: var(--good); font-weight: 650; } .down { color: var(--bad); font-weight: 650; }
.dgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dgrid > .wide { grid-column: 1 / -1; }
.dsec { overflow: hidden; }
.chart { width: 100%; height: auto; display: block; }
.chart text { font-size: 10.5px; fill: var(--muted); font-family: var(--sans); }
.chart .grid { stroke: var(--line-2); }
.b-dial { fill: #c9d3f6; } .b-talk { fill: var(--accent); }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.legend i.b-dial { background: #c9d3f6; } .legend i.b-talk { background: var(--accent); }
.reprow { grid-template-columns: minmax(0, 1.6fr) repeat(6, minmax(0, .7fr)); font-size: 13.5px; }
.reprow .main { display: flex; align-items: center; gap: 6px; }
.lrow2 { grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, .7fr)); font-size: 13.5px; }
.numrow { grid-template-columns: minmax(0, 1fr) 90px 120px; font-size: 13.5px; }
.numrow.flag { background: var(--bad-soft); }
.renrow { grid-template-columns: minmax(0, 1fr) 140px 100px; text-decoration: none; color: inherit; font-size: 13.5px; }
.renrow:hover { background: var(--surface-2); }
.funnel2 { padding: 4px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.fs { display: grid; grid-template-columns: 130px minmax(0, 1fr) 60px 46px; gap: 10px; align-items: center; font-size: 13px; }
.fs .l { color: var(--ink-2); }
.fs b { text-align: right; font-variant-numeric: tabular-nums; }
.fbar { position: relative; }
.funnel2 .fbar { height: 14px; background: var(--line-2); border-radius: 4px; overflow: hidden; display: block; margin: 0; }
.funnel2 .fbar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 4px; }

/* ---------- settings ---------- */
.set-wrap { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; align-items: start; }
.set-nav { display: flex; flex-direction: column; gap: 1px; position: sticky; top: 0; }
.set-nav a { padding: 7px 10px; border-radius: var(--r1); color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: 13.5px; }
.set-nav a:hover { background: var(--line-2); color: var(--ink); }
.set-nav a.on { background: var(--accent-soft); color: var(--accent-ink); }
.set-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.set-panel { overflow: hidden; }
.sp-h { padding: 14px 18px 4px; }
.sp-h h2 { margin: 0; font-size: 16px; }
.sp-h p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; max-width: 76ch; }
.sp-b { padding: 10px 18px 16px; }
.sp-b .rows { border: 1px solid var(--line-2); border-radius: var(--r2); }
.sp-b .field textarea, .sp-b textarea.w100 { width: 100%; border: 1px solid var(--line); border-radius: var(--r1); padding: 8px 10px; resize: vertical; }
.carrier { display: flex; gap: 12px; padding: 12px 16px; border-radius: var(--r3); border: 1px solid var(--line); background: #fff; align-items: flex-start; }
.carrier > div:first-child { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.carrier.live > div:first-child { background: var(--good-soft); color: var(--good); }
.carrier > div:last-child { display: flex; flex-direction: column; font-size: 13.5px; }
.carrier span { color: var(--ink-2); }
.numrow2 { grid-template-columns: minmax(0, 1fr) 200px 80px; }
.numrow2 select { height: 32px; border: 1px solid var(--line); border-radius: var(--r1); padding: 0 8px; width: 100%; }
.buybox { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.inline-field { max-width: 180px; margin: 0; }
.numpick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.numopt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r2); background: #fff; text-align: left; }
.numopt:hover { border-color: var(--accent); background: var(--accent-soft); }
.numopt b { font-variant-numeric: tabular-nums; }
.numopt span { font-size: 12.5px; color: var(--muted); }
.numopt .link { color: var(--accent-ink); font-weight: 600; }
.wallet { display: grid; grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1.3fr); gap: 14px; align-items: start; }
.wallet > div { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.wallet .bal b { font-size: 30px; line-height: 1.1; }
.wallet > div > span:first-child { font-size: 12px; color: var(--muted); font-weight: 600; }
.usage { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.usage > div { border: 1px solid var(--line-2); border-radius: var(--r2); padding: 8px 12px; display: flex; flex-direction: column; min-width: 110px; font-size: 13px; }
.usage b { font-size: 16px; }
.rates { margin-top: 12px; font-size: 13px; }
.rates summary { cursor: pointer; color: var(--ink-2); font-weight: 550; }
.rgrid { display: grid; grid-template-columns: 1fr 80px 80px; gap: 4px 12px; max-width: 420px; margin-top: 8px; }
.ledger > div { display: grid; grid-template-columns: 110px minmax(0, 1fr) 90px; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--line-2); }
.ledger b { text-align: right; font-variant-numeric: tabular-nums; }
.regform .grid2 { margin-bottom: 10px; }
.stlist { display: flex; flex-direction: column; gap: 6px; }
.strow { display: grid; grid-template-columns: minmax(0, 1fr) 110px 30px 160px; gap: 8px; align-items: center; }
.strow input, .strow select { height: 32px; border: 1px solid var(--line); border-radius: var(--r1); padding: 0 8px; }
.tpl-edit.em { grid-template-columns: 170px minmax(0, 1fr) 30px; }
.tpl-edit.em > div { display: flex; flex-direction: column; gap: 6px; }
.progress { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; margin-top: 14px; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .2s ease; }
.dnclist { max-height: 320px; overflow: auto; margin-top: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .lp { grid-template-columns: 270px minmax(0, 1fr); }
  .lp-right { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lrow { grid-template-columns: 34px minmax(0, 2fr) 140px 130px 110px 50px 90px; }
  .lrow > :nth-child(8) { display: none; }
}
@media (max-width: 1100px) {
  .dgrid, .dp { grid-template-columns: minmax(0, 1fr); }
  .lrow { grid-template-columns: 34px minmax(0, 2fr) 130px 120px 100px 80px; }
  .lrow > :nth-child(6), .lrow > :nth-child(8) { display: none; }
}
@media (max-width: 1000px) {
  :root { --side: 200px; }
  .dgrid, .dp { grid-template-columns: minmax(0, 1fr); }
  .legs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dl-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wallet { grid-template-columns: minmax(0, 1fr); }
  .numpick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lrow > :nth-child(6), .lrow > :nth-child(7) { display: none; }
  .lrow { grid-template-columns: 34px minmax(0, 2fr) 130px 120px 100px; }
}
@media (max-width: 760px) {
  body { overflow: auto; }
  .shell { grid-template-columns: minmax(0, 1fr); height: auto; }
  .side { position: fixed; left: 0; right: 0; bottom: 0; top: auto; flex-direction: row; height: 58px; padding: 4px 6px; z-index: 50; border-right: 0; border-top: 1px solid var(--line); background: #fff; }
  .side-top, .side-search, .side-h, .side-lists, .side-foot { display: none; }
  .side-nav { flex-direction: row; justify-content: space-around; width: 100%; }
  .side-nav a { flex-direction: column; height: 50px; gap: 2px; font-size: 11px; padding: 0 4px; justify-content: center; }
  .main { overflow: visible; }
  .page { padding: 16px 14px 100px; }
  .lp, .lp-right { grid-template-columns: minmax(0, 1fr); }
  .lrow { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .lrow > :nth-child(4), .lrow > :nth-child(5) { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .set-wrap { grid-template-columns: minmax(0, 1fr); }
  .set-nav { flex-direction: row; overflow-x: auto; position: static; }
  .legs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #phone-root { left: 8px; right: 8px; bottom: 66px; }
  #phone-root .callbar { width: auto; }
  .offer2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.dl-notes { padding: 10px 16px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; background: #fffdf6; }
.dl-notes b { font-size: 12px; color: var(--muted); }
.rgrid.wide { grid-template-columns: 180px minmax(0, 1fr); max-width: 640px; }
.rgrid.wide b { font-weight: 550; }
.page-seq .brow, .set-panel .brow { padding: 10px 16px; }
@media (max-width: 760px) {
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .page-head .filters { width: 100%; }
  .set-nav a { white-space: nowrap; }
  .numrow2 { grid-template-columns: minmax(0, 1fr) auto; }
  .numrow2 > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .numrow2 > :nth-child(3) { grid-column: 2; grid-row: 1; }
  .wallet .topup .btn-row { flex-wrap: wrap; }
  .fbar .fsearch input { width: 100%; }
  .fbar .fsearch { width: 100%; }
  .bulkbar { font-size: 13px; }
  .dl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kvrow { gap: 14px; }
  #ring-root { left: 8px; right: 8px; top: 8px; }
  .ringer { width: auto; }
  .reprow { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, .7fr)); }
  .reprow > :nth-child(n+5) { display: none; }
  .lrow2 { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, .7fr)); }
  .lrow2 > :nth-child(n+4) { display: none; }
  .lnrow { grid-template-columns: minmax(0, 1fr) 70px 70px; }
  .lnrow > :nth-child(n+4) { display: none; }
}
