/* ────────────────────────────────────────────────────────────
   Ascent CRM theme — Optain-style dark UI.
   Change colors here (the :root block) to restyle everything.
   ──────────────────────────────────────────────────────────── */
:root {
  --bg: #040806;
  --side: #060b08;
  --card: #0f1813;
  --card-2: #0a120d;
  --hover: #142019;
  --line: #1a2a20;
  --line-2: #24382b;
  --text: #e9eef6;
  --muted: #8a94a6;
  --dim: #5b6576;
  --accent: #22c55e;
  --accent-ink: #03140a;
  --eyebrow: #7cc49a;
  --green: #34d399;
  --amber: #e8b44c;
  --red: #f87171;
  --radius: 18px;
  --radius-sm: 10px;
  --head: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--head); margin: 0; letter-spacing: -0.01em; }
::selection { background: #22c55e55; }

/* ── Layout ── */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 14px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; font: 700 26px var(--head); letter-spacing: -0.03em; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; border: 4px solid var(--accent); position: relative; }
.brand-mark::after { content: ''; position: absolute; right: -6px; top: -6px; width: 10px; height: 10px; background: var(--accent); transform: rotate(45deg); border-radius: 2px; }
.nav-label { font-size: 11px; letter-spacing: .22em; color: var(--dim); text-transform: uppercase; padding: 18px 12px 8px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-size: 15px; margin-bottom: 2px; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.active { background: #112218; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.nav a.active svg { color: var(--accent); }
.nav svg { width: 19px; height: 19px; flex: none; }
.nav .count { margin-left: auto; font-size: 11px; background: var(--line-2); color: var(--text); padding: 1px 8px; border-radius: 99px; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 600 12px var(--head); background: #103a24; color: #8ff0b5; border: 1px solid #1e5a37; flex: none; }
.me-name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.me-role { color: var(--dim); font-size: 12px; text-transform: capitalize; }
.avail { display: flex; align-items: center; justify-content: space-between; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--dim); margin-right: 8px; }
.dot.on { background: var(--green); box-shadow: 0 0 0 4px #34d39922; }

.main { min-width: 0; padding: 34px 40px 110px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.eyebrow { font: 600 12px var(--body); letter-spacing: .3em; text-transform: uppercase; color: var(--eyebrow); margin-bottom: 6px; }
.page-head h1 { font-size: 40px; font-weight: 700; line-height: 1.05; }
.sub { color: var(--muted); font-size: 15px; margin-top: 8px; }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ── Cards ── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h2 { font-size: 22px; margin-bottom: 4px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; }
.card-head a { font-size: 14px; color: var(--eyebrow); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-lead { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); align-items: start; }
.stat { text-align: center; padding: 26px 18px; }
.stat .label { font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.stat .value { font: 700 40px/1.15 var(--head); margin-top: 8px; letter-spacing: -0.02em; }
.stat .hint { color: var(--dim); font-size: 12px; margin-top: 4px; }
.stat.left { text-align: left; }
.mini-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.mini-stats .n { font: 600 26px var(--head); }
.mini-stats .l { color: var(--muted); font-size: 13px; }
.big-n { font: 700 38px var(--head); }
.green { color: var(--green); }
.amber { color: var(--amber); }
.red { color: var(--red); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); }
.mt { margin-top: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-size: 15px; font-weight: 500; }
.list-row .s { color: var(--dim); font-size: 13px; }
.empty { color: var(--dim); text-align: center; padding: 34px 10px; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text); padding: 9px 16px; border-radius: 99px; cursor: pointer; font-weight: 500; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--hover); border-color: #33503d; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #03140a; font-weight: 600; }
.btn.primary:hover { background: #1fb455; }
.btn.green { background: #10291f; border-color: #1f5a41; color: var(--green); }
.btn.danger { color: var(--red); border-color: #4a2026; background: #1d0f12; }
.btn.sm { padding: 5px 12px; font-size: 13px; }
.btn.icon { padding: 7px; border-radius: 10px; }
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; }

/* ── Pills ── */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 500; border: 1px solid; white-space: nowrap; }
.pill.pending { color: var(--amber); border-color: #6a5223; background: #1c160a; }
.pill.paid, .pill.funded { color: var(--green); border-color: #1f5a41; background: #0b1f17; }
.pill.neutral { color: #a6dcbc; border-color: #2a4a36; background: #0d1d14; }
.pill.red { color: var(--red); border-color: #5a2228; background: #1d0e10; }

/* ── Forms ── */
.input, select.input, textarea.input { width: 100%; background: var(--card-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 9px 12px; outline: none; transition: border-color .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #22c55e22; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
textarea.input { min-height: 90px; resize: vertical; }
label.f { display: block; }
label.f > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; letter-spacing: .04em; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .span2 { grid-column: span 2; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.switch { display: inline-block; vertical-align: middle; position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #c9d2e0; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(16px); background: #fff; }

/* ── Filters bar ── */
.filters { display: grid; grid-template-columns: 2fr repeat(5, minmax(0, 1fr)); gap: 12px; align-items: end; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs a, .tabs button { padding: 10px 16px; color: var(--muted); border: 0; background: none; border-bottom: 2px solid transparent; cursor: pointer; font-weight: 500; font-size: 15px; margin-bottom: -1px; }
.tabs .active { color: var(--text); border-bottom-color: var(--accent); }
.seg { display: inline-flex; background: var(--card-2); border: 1px solid var(--line); border-radius: 99px; padding: 3px; }
.seg button { border: 0; background: none; color: var(--muted); padding: 6px 14px; border-radius: 99px; cursor: pointer; font-size: 13px; }
.seg button.active { background: var(--line-2); color: var(--text); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font: 600 11.5px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 14px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--card-2); position: sticky; top: 0; }
th.sort { cursor: pointer; }
th.sort:hover { color: var(--text); }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #13211a; }
tr.click { cursor: pointer; }
td .row { flex-wrap: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.bulk { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #0d2216; border: 1px solid #1e4a30; border-radius: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; color: var(--muted); }
td select.cell { background: transparent; border: 1px solid transparent; border-radius: 99px; padding: 3px 10px; cursor: pointer; }
td select.cell:hover { border-color: var(--line-2); }

/* ── Lead page ── */
.rec { border-radius: var(--radius); padding: 22px; background: linear-gradient(160deg, #0e2e1b, #0c1810 60%); border: 1px solid #1f5a37; }
.rec .be { font: 700 34px var(--head); margin: 4px 0 2px; }
.rec .why { color: var(--muted); font-size: 13px; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick button { flex-direction: column; justify-content: center; padding: 14px 8px; border-radius: 14px; gap: 6px; font-size: 13px; }
.quick svg { width: 20px; height: 20px; color: var(--accent); }
.timeline .item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.timeline .item:first-child { border-top: 0; }
.tl-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--line-2); flex: none; }
.tl-icon svg { width: 15px; height: 15px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ── Leaderboard ── */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 18px; align-items: end; }
.podium .card { text-align: center; }
.podium .place { font: 700 13px var(--body); letter-spacing: .26em; color: var(--muted); }
.podium .first { border-color: #2f7a4b; background: linear-gradient(180deg, #112e1d, var(--card)); padding-top: 36px; padding-bottom: 36px; }
.podium .avatar { width: 56px; height: 56px; font-size: 18px; margin: 12px auto; }
.bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

/* ── Calendar ── */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.cal .dow { padding: 10px; font-size: 11px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; background: var(--card-2); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 118px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day:hover { background: var(--hover); }
.cal .day.out { opacity: .35; }
.cal .day .d { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.cal .day.today .d { color: #03140a; background: var(--accent); border-radius: 99px; display: inline-grid; place-items: center; width: 24px; height: 24px; }
.ev { display: block; font-size: 12px; padding: 3px 7px; border-radius: 6px; margin-bottom: 3px; background: #123320; color: #b5f0cb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 3px solid var(--accent); }
.ev.done { opacity: .45; text-decoration: line-through; }
.ev.Appointment { background: #102b22; color: #a6f0cf; border-color: var(--green); }
.ev.Meeting { background: #2a2210; color: #f3d69a; border-color: var(--amber); }

/* ── Referral link box (Optain) ── */
.linkbox { display: flex; gap: 12px; align-items: center; margin: 14px 0 20px; }
.linkbox .url { flex: 1; background: var(--card-2); border-radius: 12px; padding: 13px 18px; font-family: var(--mono); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--line); }

/* ── Modal / toast ── */
.overlay { position: fixed; inset: 0; background: #000b; display: grid; place-items: center; z-index: 50; padding: 20px; animation: fade .15s; }
.modal { background: var(--card); border: 1px solid var(--line-2); border-radius: 22px; width: min(640px, 100%); max-height: 90vh; overflow: auto; padding: 26px; box-shadow: 0 30px 80px #000a; }
.modal.wide { width: min(860px, 100%); }
.modal h2 { font-size: 24px; margin-bottom: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
#toasts { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--card); border: 1px solid var(--line-2); border-left: 3px solid var(--green); padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px #0008; max-width: 380px; animation: fade .2s; }
.toast.err { border-left-color: var(--red); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* ── Recent leads bar (like CFT's bottom tabs) ── */
.recent { position: fixed; left: 248px; right: 0; bottom: 0; background: #060b08ee; backdrop-filter: blur(8px); border-top: 1px solid var(--line); display: flex; gap: 8px; padding: 10px 20px; overflow-x: auto; z-index: 10; }
.recent .chip { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line-2); padding: 6px 8px 6px 14px; border-radius: 10px; font-size: 13px; white-space: nowrap; }
.recent .chip a { color: var(--text); }
.recent .chip button { background: none; border: 0; color: var(--dim); cursor: pointer; padding: 2px 4px; }

/* ── Login ── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(800px 400px at 50% -10%, #0f3a22 0%, transparent 70%), var(--bg); }
.login .card { width: min(420px, 100%); padding: 34px; }
.login h1 { font-size: 32px; margin: 18px 0 4px; }

.code { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; font: 13px/1.6 var(--mono); white-space: pre-wrap; overflow-x: auto; color: #c8d6ea; }
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.state-grid label { display: flex; align-items: center; gap: 8px; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.state-grid b { width: 26px; font-family: var(--mono); font-size: 13px; }
.state-grid select { flex: 1; background: transparent; border: 0; color: var(--text); }

.menu-btn { display: none; }
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g-lead, .g3 { grid-template-columns: 1fr; }
  .filters { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .menu-btn { display: inline-flex; margin-bottom: 16px; }
  .main { padding: 20px 16px 110px; }
  .page-head h1 { font-size: 30px; }
  .g2, .g4, .podium, .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: auto; }
  .recent { left: 0; }
  .stat .value { font-size: 32px; }
}

/* ── Submitted deals ── */
.tiles { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.tile { --c: var(--accent); text-align: left; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 14px; padding: 14px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.tile:hover { background: var(--hover); }
.tile.active { border-color: var(--c); box-shadow: 0 0 0 1px var(--c) inset; }
.tile .l { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .n { font: 700 26px var(--head); }
.pd-wrap { display: inline-flex; align-items: center; gap: 4px; }
.pd { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.pd.on { background: var(--green); box-shadow: 0 0 0 3px #34d39922; }
.pd-wrap b { font-weight: 500; color: var(--muted); margin-left: 4px; font-size: 12.5px; }
.send-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.send-grid .btn { justify-content: center; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, 1fr); } }

/* ── Time clock ── */
.clock { background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; font-size: 13.5px; }
.clock.in { border-color: #1f5a37; }
.clock.break { border-color: #6a5223; }
.clock .mono { font-size: 13px; color: var(--muted); }
.clock-btns { display: flex; gap: 8px; margin-top: 10px; }
.clock-btns .btn { flex: 1; justify-content: center; }
.dot.brk { background: var(--amber); box-shadow: 0 0 0 4px #e8b44c22; }
.g-clock { grid-template-columns: minmax(280px, 1fr) 2fr; align-items: stretch; }
.clock-hero { display: flex; flex-direction: column; justify-content: center; }
.clock-hero.in { background: linear-gradient(160deg, #0e2e1b, var(--card) 70%); border-color: #1f5a37; }
.clock-hero.break { background: linear-gradient(160deg, #2a210d, var(--card) 70%); border-color: #6a5223; }
.big-state { font: 700 34px/1.1 var(--head); margin: 6px 0 6px; }
.clock-hero .btn { padding: 11px 20px; }
tr.total td { border-top: 1px solid var(--line-2); background: var(--card-2); }
tr.dimrow td { opacity: .45; }
.punch { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ev.off { border-left-color: var(--green); background: #10291f; color: #a6f0cf; }
.ev.off.pend { border-left-color: var(--amber); background: #2a210d; color: #f3d69a; border-left-style: dashed; }
.ev.off.no { opacity: .4; text-decoration: line-through; }
.legend { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-right: 8px; }
.lg { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.lg.ok { background: var(--green); } .lg.pend { background: var(--amber); }
.steps { line-height: 1.8; padding-left: 20px; margin: 4px 0 0; }
/* ── Call activity bars ── */
.g-calls { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 220px; }
.bcol { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 4px; }
.btrack { flex: 1; width: 100%; max-width: 42px; display: flex; align-items: flex-end; }
.btrack i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 0; transition: height .3s; }
.bcol:hover .btrack i { background: #4ade80; }
.bval { font-size: 12.5px; color: var(--text); min-height: 18px; font-variant-numeric: tabular-nums; }
.blab { font-size: 12px; color: var(--muted); }
.blab.now { color: var(--text); font-weight: 600; }
.bsub { font-size: 11px; color: var(--dim); min-height: 15px; }
@media (max-width: 1100px) { .g-clock, .g-calls { grid-template-columns: 1fr; } .punch { grid-template-columns: 1fr 1fr; } }

/* ── Desktop-app lock ── */
.device-code { font: 700 40px var(--mono); letter-spacing: .25em; margin: 26px 0 8px; color: var(--accent); }

/* ── Lead dashboard ── */
.lead-hero { padding: 26px 28px; background: linear-gradient(160deg, #0e2a19, var(--card) 55%); border-color: #1f4a30; }
.lh-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.lh-id { display: flex; gap: 18px; align-items: center; }
.lh-avatar { width: 64px; height: 64px; font-size: 22px; }
.lead-hero h1 { font-size: 36px; margin-top: 2px; }
.lh-last { color: var(--text); }
.lh-tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.lh-tile { background: #0a120dcc; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lh-tile span { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lh-tile b { font: 700 24px var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lh-tile i { font-style: normal; font-size: 12px; color: var(--dim); }
.lh-tile.hl { border-color: #2f7a4b; background: #0f2a1a; }
.lh-tile.hl b { color: var(--green); }
.info-card h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 14px; }
.info-card h3 svg { width: 17px; height: 17px; color: var(--accent); }
.info-card .kv { grid-template-columns: 110px 1fr; }
.addr { font-size: 16px; line-height: 1.6; }
@media (max-width: 1250px) { .lh-tiles { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) { .lh-tiles { grid-template-columns: repeat(2, 1fr); } .lead-hero h1 { font-size: 28px; } }
.mini-bar { width: 80px; height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.mini-bar.alt i { background: #60a5fa; }
input.lim { width: 64px; display: inline-block; padding: 4px 8px; text-align: center; }
table.compact th { padding: 12px 10px; letter-spacing: .08em; }
table.compact td { padding: 10px 10px; }
table.compact .mini-bar { width: 56px; }

/* v5: lead contact strip, push card */
.lh-contact { display:flex; flex-wrap:wrap; gap:8px 18px; margin-top:10px; font-size:14.5px; }
.lh-contact a, .lh-contact span { display:inline-flex; align-items:center; gap:6px; color:var(--text); text-decoration:none; }
.lh-contact a:hover { color:var(--accent); }
.lh-contact svg { width:15px; height:15px; opacity:.7; }
.push-card .push-row { display:flex; align-items:center; gap:12px; padding:8px 0; border-top:1px solid var(--line); font-size:13px; }
.push-card .push-row:first-of-type { border-top:0; }
.push-card .push-row .btn { min-width:200px; justify-content:center; }
td.nowrap { white-space:nowrap; }

/* Basic mode (launch version) */
.b-filters { display:grid; grid-template-columns: 1fr 200px 160px; gap:12px; padding:16px; }
.b-hero { padding:24px; }
.b-hero-top { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; }
.b-hero h1 { font-size:30px; line-height:1.15; margin:0; }
.b-meta { color:var(--muted); font-size:13.5px; margin-top:6px; }
.b-contact { display:flex; gap:14px 34px; flex-wrap:wrap; margin-top:20px; padding-top:18px; border-top:1px solid var(--line); font-size:15px; }
.b-contact > div { display:flex; flex-direction:column; gap:4px; min-width:0; }
.b-contact span { font-size:11.5px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); }
.b-contact a { color:var(--accent); text-decoration:none; }
.b-actions { display:grid; grid-template-columns:repeat(4, 1fr); gap:12px; margin-top:20px; }
.b-act { display:flex; align-items:center; justify-content:center; gap:10px; padding:16px; border-radius:14px; border:1px solid var(--line-2); background:var(--card-2); color:var(--text); font:inherit; font-size:15px; cursor:pointer; transition:.15s; }
.b-act svg { width:20px; height:20px; color:var(--accent); }
.b-act:hover:not([disabled]) { border-color:var(--accent); background:#112218; }
.b-act[disabled] { opacity:.4; cursor:not-allowed; }
.b-cols { display:grid; grid-template-columns: 1.4fr 1fr; gap:18px; }
.b-note { white-space:pre-wrap; }
.b-note.is-note { font-size:15px; }
@media (max-width: 900px) { .b-cols, .b-filters { grid-template-columns:1fr; } .b-actions { grid-template-columns:repeat(2, 1fr); } }
.b-send .b-partner { font-size:22px; font-weight:600; color:var(--accent); margin-top:6px; }
.b-filters { grid-template-columns: 1fr 160px 130px 150px 160px; }
.b-aging { display:flex; align-items:center; gap:22px; padding:16px 20px; margin-bottom:14px; flex-wrap:wrap; }
.b-aging-num { display:flex; align-items:baseline; gap:10px; }
.b-aging-num b { font-size:34px; line-height:1; color:var(--accent); }
.b-aging-num span { color:var(--muted); font-size:14px; }
.b-aging-days { display:flex; gap:6px; flex-wrap:wrap; }
.b-day { display:flex; flex-direction:column; align-items:center; min-width:46px; padding:6px 4px; border-radius:10px; border:1px solid var(--line-2); background:var(--card-2); color:var(--text); font:inherit; cursor:pointer; }
.b-day b { font-size:16px; } .b-day span { font-size:11px; color:var(--muted); }
.b-day.zero { opacity:.45; } .b-day.on, .b-day:hover { border-color:var(--accent); background:#112218; }
.b-aging-side { margin-left:auto; display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--muted); text-align:right; }
.b-aging-side b { color:var(--text); margin-left:6px; }
.b-phone { display:inline-flex; align-items:center; gap:6px; color:var(--accent); text-decoration:none; padding:3px 8px; margin-left:-8px; border-radius:8px; }
.b-phone svg { width:14px; height:14px; } .b-phone:hover { background:#112218; }
.b-more svg { width:18px; height:18px; }
.row-menu { position:fixed; z-index:200; background:var(--card); border:1px solid var(--line-2); border-radius:12px; padding:6px; box-shadow:0 12px 32px #0008; min-width:170px; }
.row-menu button { display:flex; width:100%; align-items:center; gap:10px; padding:9px 12px; border:0; background:none; color:var(--text); font:inherit; font-size:14px; border-radius:8px; cursor:pointer; text-align:left; }
.row-menu button svg { width:16px; height:16px; color:var(--accent); }
.row-menu button:hover:not([disabled]) { background:#112218; } .row-menu button[disabled] { opacity:.4; }
.b-sub { font-size:12px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); margin:22px 0 8px; font-weight:500; }
.b-hero .f span { font-size:11px; }
@media (max-width: 1100px) { .b-filters { grid-template-columns: 1fr 1fr; } }
.b-notepad { min-height:180px; font-size:15px; line-height:1.55; }
.quick-open { display:flex; flex-direction:column; gap:2px; margin:10px 0 12px; }
.quick-open .qo { display:flex; align-items:center; gap:10px; padding:8px 12px; border:0; background:none; color:var(--muted); font:inherit; font-size:14px; border-radius:10px; cursor:pointer; text-align:left; }
.quick-open .qo svg { width:16px; height:16px; transform:rotate(45deg); }
.quick-open .qo:hover { background:#112218; color:var(--text); }
.quick-open a.qo { text-decoration:none; }
.quick-open a.qo svg { transform:none; }
.side .nav { flex:0 0 auto; }
.side { overflow-y:auto; }
.res-list { padding:8px; max-width:760px; }
.res-row { display:flex; align-items:center; gap:14px; padding:14px 14px; border-radius:12px; color:var(--text); text-decoration:none; border-bottom:1px solid var(--line); }
.res-row:last-child { border-bottom:0; }
.res-row:hover { background:#112218; }
.res-row .t { font-size:16px; font-weight:500; } .res-row .s { color:var(--muted); font-size:13px; margin-top:2px; }
.res-go { display:inline-flex; align-items:center; gap:4px; color:var(--accent); font-size:14px; } .res-go svg { width:16px; height:16px; }
.cal-legend { display:flex; gap:18px; font-size:12.5px; color:var(--muted); margin:-6px 0 10px; }
.cal-legend .lg { display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:6px; vertical-align:-1px; }
.lg.mine, .ev.mine { background:#22c55e26; } .lg.mine { background:#22c55e; }
.ev.mine { color:#86efac; border-left:2px solid #22c55e; }
.lg.team { background:#f5b84b; } .ev.team { background:#f5b84b22; color:#fcd38a; border-left:2px solid #f5b84b; }
.lg.google { background:#60a5fa; } .ev.google { background:#60a5fa1c; color:#a8cbfb; border-left:2px solid #60a5fa; cursor:default; }
.tm-people { display:grid; grid-template-columns:repeat(2, 1fr); gap:2px 14px; padding:6px 0 0 24px; } .tm-people.off { opacity:.4; pointer-events:none; }
.steps { margin:6px 0 10px 18px; font-size:14px; line-height:1.7; } .steps a { color:var(--accent); }
.res-row .grow { flex:1; min-width:0; }
.tm-opts > span { display:block; margin-bottom:6px; }
.tm-opts > .check { display:flex; margin:4px 0; }
.b-actions { grid-template-columns:repeat(5, 1fr); }
.b-act.loan svg { color:#f5b84b; }
.loan-step { display:flex; gap:14px; padding:14px 0; border-top:1px solid var(--line); }
.loan-step > b { flex:0 0 28px; height:28px; border-radius:50%; background:#22c55e22; color:var(--accent); display:grid; place-items:center; font-size:14px; }
.loan-step .t { font-weight:600; font-size:15px; } .loan-step .s { color:var(--muted); font-size:14px; margin-top:3px; }
@media (max-width: 900px) { .b-actions { grid-template-columns:repeat(2, 1fr); } }
.g4 { display:grid; grid-template-columns:repeat(4, 1fr); gap:14px; }
.loan-stat { text-align:left; cursor:pointer; font:inherit; color:inherit; border-left:3px solid var(--c); }
.loan-stat.on { background:#112218; border-color:var(--c); }
.loan-sel { padding:6px 30px 6px 10px; width:140px; color:var(--c); border-color:color-mix(in srgb, var(--c) 40%, transparent); font-weight:500; }
.oh-icon { display:grid; place-items:center; width:54px; height:54px; margin:4px auto 10px; border-radius:50%; background:#f5b84b22; color:#f5b84b; }
.oh-icon svg { width:28px; height:28px; }
@media (max-width: 900px) { .g4 { grid-template-columns:repeat(2, 1fr); } }
.sf-copy { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.sf-row { display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--line-2); border-radius:10px; background:var(--card-2); color:var(--text); font:inherit; text-align:left; cursor:pointer; }
.sf-row span { color:var(--muted); font-size:12px; width:86px; flex:0 0 auto; } .sf-row b { flex:1; font-weight:500; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.sf-row svg { width:14px; height:14px; color:var(--accent); } .sf-row:hover:not([disabled]) { border-color:var(--accent); }
.b-tools { display:flex; flex-wrap:wrap; align-items:center; gap:10px 22px; margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }
.b-push { display:flex; align-items:center; gap:10px; font-size:13px; min-width:0; }
.b-push .dim { max-width:300px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ── Call scripts bubble (public/scripts.js) ── */
.sc-bubble { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px 0 16px;
  border-radius: 99px; border: 1px solid #2f7a4b; background: linear-gradient(180deg, #1c4a2e, #12301e); color: var(--text); font: 600 14px var(--body, inherit);
  cursor: pointer; box-shadow: 0 10px 28px #0009, 0 0 0 4px #34d39914; transition: transform .15s, box-shadow .15s; }
.sc-bubble:hover { transform: translateY(-2px); box-shadow: 0 14px 32px #000a, 0 0 0 5px #34d39926; }
.sc-bubble .sc-ico svg { width: 18px; height: 18px; color: var(--green); }
.sc-bubble.active { background: var(--card-2); border-color: var(--line-2); }
.sc-panel { position: fixed; right: 22px; bottom: 86px; z-index: 59; width: min(470px, calc(100vw - 32px)); height: min(72vh, 680px);
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 24px 60px #000c;
  opacity: 0; transform: translateY(12px) scale(.98); pointer-events: none; transition: opacity .16s, transform .16s; }
.sc-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.sc-head { display: flex; gap: 8px; align-items: center; padding: 14px 14px 8px; }
.sc-head .sc-pick { flex: 1; font-weight: 600; }
.sc-x { width: 36px; height: 36px; flex: none; border-radius: 99px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--muted); cursor: pointer; font-size: 14px; }
.sc-x:hover { color: var(--text); }
.sc-tools { display: flex; gap: 8px; align-items: center; padding: 0 14px 10px; border-bottom: 1px solid var(--line); }
.sc-tools .sc-jump { flex: 1.1; min-width: 0; padding-top: 6px; padding-bottom: 6px; font-size: 13px; }
.sc-tools .sc-find { flex: 1; min-width: 0; padding-top: 6px; padding-bottom: 6px; font-size: 13px; }
.sc-count { font-size: 12px; min-width: 34px; text-align: right; }
.sc-body { flex: 1; overflow-y: auto; padding: 14px 18px 22px; font-size: 14.5px; line-height: 1.6; color: var(--text); }
.sc-body .sc-ln { margin: 0; }
.sc-body .sc-gap { height: 10px; }
.sc-body .sc-h { margin: 14px 0 4px; padding-top: 6px; font-weight: 700; color: var(--green); font-size: 14px; letter-spacing: .01em; scroll-margin-top: 8px; }
.sc-body .sc-h.big { font-size: 17px; color: var(--text); }
.sc-body .sc-h b { font-weight: 700; }
.sc-body b { color: #fff; }
.sc-body .sc-for { font-size: 12.5px; margin-bottom: 8px; }
mark.sc-fill { background: #34d39922; color: var(--green); padding: 0 3px; border-radius: 4px; }
mark.sc-hit { background: #f5b94233; color: inherit; border-radius: 3px; }
mark.sc-hit.on { background: #f5b942; color: #111; }
@media (max-width: 640px) { .sc-bubble { right: 14px; bottom: 14px; height: 46px; padding: 0 16px 0 13px; } .sc-panel { right: 16px; bottom: 72px; height: 70vh; } }
@media print { .sc-bubble, .sc-panel { display: none !important; } }

/* Manager dropdown menus (public/nav.js) */
.nav-menus { margin-top: 4px; }
.nav-menu-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 12px; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; text-align: left; margin-bottom: 2px; }
.nav-menu-head:hover { background: var(--hover); color: var(--text); }
.nav-menu-head > span:first-of-type { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-chev { display: inline-flex; transition: transform .15s; opacity: .7; }
.nav-chev svg { width: 15px; height: 15px; }
.nav-menu.open > .nav-menu-head { color: var(--text); }
.nav-menu.open .nav-chev { transform: rotate(180deg); }
.nav-sub { display: none; margin: 0 0 6px 14px; padding-left: 8px; border-left: 1px solid var(--line-2); }
.nav-menu.open .nav-sub { display: block; }
.nav-sub a { font-size: 14px; padding: 8px 10px; }
.nav-sub a svg { width: 16px; height: 16px; }
.nav-empty { color: var(--dim); font-size: 13px; padding: 6px 10px 8px; }
