/* Doorvane: a working CRM demo for a real-estate brokerage team (concept project, fictional data). */
:root {
  --bg: #f1f4f7; --surface: #ffffff; --surface-2: #f6f8fb; --surface-3: #eaeff4; --border: #e0e6ec; --border-2: #cbd5df;
  --text: #0e161d; --text-2: #34404b; --muted: #627080; --faint: #9aa6b2;
  --lime: #38bdf8; --lime-2: #0ea5e9; --lime-ink: #075985; --lime-soft: #e0f2fe; --ring: rgba(14, 165, 233, .35);
  --ink: #0f1820; --ink-2: #22303c;
  --side: #0c141b; --side-2: #16212b; --side-3: #213040; --side-text: #c2ccd6; --side-muted: #788694;
  --green: #15803d; --green-soft: #e2f4e7; --amber: #a35a00; --amber-soft: #fff0d4; --red: #cf3139; --red-soft: #fde8e9;
  --blue: #2361c7; --blue-soft: #e5edfb; --violet: #6a49d6; --violet-soft: #eeeafd; --pink: #bb3477; --pink-soft: #fce7f1; --sky: #0f766e; --sky-soft: #dcf3ef;
  --chart-2: #334455; --wa-out: #dff6cb; --wa-in: #f0f3f6; --cal-line: #e8edf2;
  --hot: #ec5a26; --warm: #e7a10f; --cold: #6378e0;
  --shadow-sm: 0 1px 2px rgba(12, 20, 27, .06);
  --shadow: 0 1px 2px rgba(12, 20, 27, .04), 0 8px 26px rgba(12, 20, 27, .06);
  --shadow-lg: 0 30px 80px rgba(12, 20, 27, .24);
  --r: 18px; --r-sm: 12px;
  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, "SF Pro Display", Roboto, Arial, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #080b0e; --surface: #10161c; --surface-2: #151c23; --surface-3: #1c252e; --border: #222c36; --border-2: #314050;
  --text: #e8eef4; --text-2: #cbd5df; --muted: #8d9aa7; --faint: #5a6773;
  --lime-ink: #7dd3fc; --lime-soft: rgba(56, 189, 248, .12); --ring: rgba(56, 189, 248, .3);
  --ink: #e2ecf5; --ink-2: #ffffff;
  --side: #05080b; --side-2: #121a22; --side-3: #1b2630;
  --green: #4ade80; --green-soft: rgba(74, 222, 128, .12); --amber: #fbbf24; --amber-soft: rgba(251, 191, 36, .13); --red: #f87171; --red-soft: rgba(248, 113, 113, .14);
  --blue: #8fb3ff; --blue-soft: rgba(96, 140, 255, .16); --violet: #b9a5ff; --violet-soft: rgba(167, 139, 250, .16); --pink: #f49ac4; --pink-soft: rgba(244, 114, 182, .15); --sky: #5eead4; --sky-soft: rgba(45, 212, 191, .14);
  --chart-2: #8a9bb0; --wa-out: #1d3517; --wa-in: #18212a; --cal-line: #18212a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
.i { flex: none; display: block; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }
.ellip { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 220px; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 8px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; padding: 20px 14px 14px; gap: 14px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px; }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand b { display: block; color: #fff; font: 700 18px/1.1 var(--display); letter-spacing: -.02em; }
.brand small { color: var(--side-muted); font-size: 12px; }
.org { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 13px; background: var(--side-2); border: 1px solid #1e2a35; }
.org-i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #1b2c3a; color: var(--lime); flex: none; }
.org b { display: block; color: #eaf1f7; font-size: 13px; }
.org small { color: var(--side-muted); font-size: 11.5px; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.nav-g { font: 700 10.5px var(--font); letter-spacing: .14em; text-transform: uppercase; color: #5a6773; padding: 12px 12px 6px; }
.nav-sp { height: 10px; }
.nav-i { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; color: var(--side-text); font-weight: 600; font-size: 14px; }
.nav-i:hover { background: var(--side-2); color: #fff; }
.nav-i.on { background: var(--lime); color: #06283d; box-shadow: 0 6px 18px rgba(56, 189, 248, .16); }
.nav-i.on .i { color: #06283d; }
.nb { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--lime); color: #06283d; font: 700 11px/20px var(--font); text-align: center; }
.nb.soft { background: var(--side-3); color: #d5dee7; }
.nb.warn { background: #e5484d; color: #fff; }
.nav-i.on .nb { background: #06283d; color: var(--lime); }
.side-foot { margin-top: auto; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px 8px 4px; border-top: 1px solid #1a2430; }
.me b { display: block; color: #fff; font-size: 13.5px; }
.me small { color: var(--side-muted); font-size: 12px; }
.me .icon-btn { margin-left: auto; color: var(--side-muted); border-color: transparent; background: transparent; box-shadow: none; }
.me .icon-btn:hover { color: #fff; background: var(--side-2); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; font: 700 13px var(--font); color: #fff; flex: none; letter-spacing: .02em; }
.avatar.sm { width: 32px; height: 32px; font-size: 11.5px; }
.avatar.xs { width: 24px; height: 24px; font-size: 9.5px; }
.avatar.xl { width: 58px; height: 58px; font-size: 20px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; height: 66px; display: flex; align-items: center; gap: 14px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.top-brand { display: none; align-items: center; gap: 10px; font: 700 17px var(--display); letter-spacing: -.02em; }
.top-brand svg { width: 30px; height: 30px; }
.search-trigger { flex: 1; max-width: 440px; height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); text-align: left; box-shadow: var(--shadow-sm); }
.search-trigger span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
kbd { font: 600 11px var(--font); padding: 3px 7px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--muted); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 10px; position: relative; }
.clock { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; padding: 0 6px; white-space: nowrap; }
.clock b { color: var(--text); font-weight: 700; }
.icon-btn { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); box-shadow: var(--shadow-sm); flex: none; }
.icon-btn:hover { border-color: var(--border-2); color: var(--text); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; box-shadow: none; }
.dot-badge { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; border-radius: 10px; background: var(--red); color: #fff; font: 700 10.5px/19px var(--font); font-style: normal; text-align: center; padding: 0 5px; border: 2px solid var(--bg); }
.page { padding: 26px 28px 40px; min-width: 0; }
.demo-foot { margin-top: 34px; text-align: center; color: var(--faint); font-size: 12px; }
.tabbar { display: none; }

/* ---------- common ---------- */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.ph h1 { font: 680 27px/1.15 var(--display); letter-spacing: -.03em; }
.ph p { color: var(--muted); margin-top: 6px; max-width: 720px; }
.ph-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.card-h h3 { font: 680 15.5px var(--display); letter-spacing: -.01em; }
.card-h small { color: var(--muted); display: block; margin-top: 2px; }
.card-h .cnt { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--surface-3); font: 700 12px var(--font); margin-left: 6px; vertical-align: 1px; }
.grid { display: grid; gap: 18px; }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g3-1 { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); }
.mt { margin-top: 18px; }
.mt-s { margin-top: 12px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.btn { height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 650; white-space: nowrap; box-shadow: var(--shadow-sm); }
.btn:hover { border-color: var(--border-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--lime); border-color: #22b1f2; color: #06283d; box-shadow: 0 8px 18px rgba(14, 165, 233, .28), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn-primary:hover { background: var(--lime-2); border-color: #0b93d1; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-dark:hover { background: var(--ink-2); }
.btn-soft { background: var(--lime-soft); border-color: transparent; color: var(--lime-ink); box-shadow: none; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { background: var(--red-soft); color: var(--red); border-color: transparent; box-shadow: none; }
.btn-wa { background: #1c9e53; border-color: #178a48; color: #fff; }
.danger-t { color: var(--red); }
.btn-sm { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn-xs { height: 28px; padding: 0 9px; border-radius: 8px; font-size: 12px; gap: 5px; }
.btn-lg { height: 50px; font-size: 15px; border-radius: 14px; }
.w100 { width: 100%; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 13px; white-space: nowrap; }
.chip:hover { border-color: var(--border-2); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip b { font-weight: 700; opacity: .55; }
.chip.sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--border); gap: 2px; max-width: 100%; }
.seg button { height: 32px; padding: 0 12px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font-weight: 650; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.seg.w100 { display: flex; }
.seg.w100 button { flex: 1; }
.seg.sm button { height: 28px; padding: 0 10px; font-size: 12.5px; }
.seg.wrap { flex-wrap: wrap; }
.input, select.input, textarea.input { height: 42px; width: 100%; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); padding: 0 13px; outline: none; }
select.input { padding-right: 8px; }
.input.sm { height: 32px; border-radius: 9px; font-size: 13px; padding: 0 9px; }
.input.big { height: 50px; font: 700 20px var(--display); }
textarea.input { height: auto; padding: 11px 13px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: #0b93d1; box-shadow: 0 0 0 4px var(--ring); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label { font-weight: 650; font-size: 13px; color: var(--text-2); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.search { position: relative; }
.search .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search .input { padding-left: 40px; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 7px; font-weight: 650; font-size: 12px; white-space: nowrap; }
.pill.xs { height: 19px; font-size: 10.5px; padding: 0 6px; border-radius: 5px; }
.p-green { background: var(--green-soft); color: var(--green); }
.p-amber { background: var(--amber-soft); color: var(--amber); }
.p-red { background: var(--red-soft); color: var(--red); }
.p-blue { background: var(--blue-soft); color: var(--blue); }
.p-gray { background: var(--surface-3); color: var(--muted); }
.p-lime { background: var(--lime-soft); color: var(--lime-ink); }
.st-new { background: var(--sky-soft); color: var(--sky); }
.st-contacted { background: var(--violet-soft); color: var(--violet); }
.st-visit { background: var(--amber-soft); color: var(--amber); }
.st-negotiation { background: var(--pink-soft); color: var(--pink); }
.st-booking { background: var(--lime-soft); color: var(--lime-ink); }
.st-won { background: var(--green-soft); color: var(--green); }
.st-lost { background: var(--surface-3); color: var(--muted); }
.switch { position: relative; width: 44px; height: 25px; border-radius: 13px; background: var(--border-2); border: 0; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch.on { background: #0ea5e9; }
.switch.on::after { transform: translateX(19px); }
.empty { display: grid; place-items: center; gap: 8px; text-align: center; padding: 30px 16px; color: var(--muted); }
.empty .i { color: var(--faint); }
.empty b { color: var(--text); }
.empty.sm { padding: 16px 8px; font-size: 13px; }
.bar { height: 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 6px; background: #0ea5e9; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); justify-content: flex-end; }
.legend.left { justify-content: flex-start; margin: -4px 0 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend .lg, .cal-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }
.src { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.src i { width: 8px; height: 8px; border-radius: 50%; }
.who { display: flex; align-items: center; gap: 10px; }
.who.sm { gap: 7px; font-weight: 600; font-size: 13px; }
.bd { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.bd.hot { background: var(--hot); } .bd.warm { background: var(--warm); } .bd.cold { background: var(--cold); }
.note-box { display: flex; gap: 9px; align-items: flex-start; padding: 11px 13px; border-radius: 12px; background: var(--lime-soft); color: var(--lime-ink); font-size: 13px; font-weight: 550; }
.note-box.amber { background: var(--amber-soft); color: var(--amber); }
.note-box .i { margin-top: 1px; }
.lnk:hover { text-decoration: underline; }
.star-on { color: #e7a10f; display: inline-block; vertical-align: -1px; }
.star-on .i { fill: currentColor; }

/* score ring */
.ring { position: relative; width: 38px; height: 38px; display: inline-grid; place-items: center; flex: none; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 3.6; stroke-linecap: round; }
.ring .tr { stroke: var(--surface-3); }
.ring.hot .fg { stroke: var(--hot); } .ring.warm .fg { stroke: var(--warm); } .ring.cold .fg { stroke: var(--cold); }
.ring b { position: relative; font: 700 12px var(--font); }
.ring.na { color: var(--faint); font-weight: 700; }
.ring.big { width: 62px; height: 62px; }
.ring.big b { font: 700 19px var(--display); }
.ring.big circle { stroke-width: 3; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.t td { padding: 12px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--surface-2); }
table.t tr.selr td { background: var(--lime-soft); }
table.t td.r, table.t th.r { text-align: right; }
table.t td.c, table.t th.c { text-align: center; }
table.t .ck { width: 34px; padding-right: 0; }
table.t .ck input { width: 17px; height: 17px; accent-color: #0ea5e9; vertical-align: middle; }
.cell-main { font-weight: 650; }
.cell-sub { color: var(--muted); font-size: 12.5px; }
.input.assign { width: 168px; }
table.t td.num, table.t td .num, table.t td.nw { white-space: nowrap; }
.next { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.next.late { color: var(--red); }
.nextc { max-width: 240px; }

/* ---------- dashboard ---------- */
a.kpi { display: block; transition: transform .15s, box-shadow .15s; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 0 0 1px var(--border-2); }
.kpi { position: relative; overflow: hidden; padding: 18px 18px 16px; }
.kpi .lbl { display: flex; align-items: center; gap: 9px; color: var(--muted); font-weight: 650; font-size: 13px; }
.kpi .lbl .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--lime-soft); color: var(--lime-ink); flex: none; }
.kpi.warn .lbl .ico { background: var(--red-soft); color: var(--red); }
.kpi.lime { background: linear-gradient(150deg, #16212b, #0c141b); border-color: #16212b; color: #eef4fa; }
.kpi.lime .lbl { color: #b3c0cc; } .kpi.lime .lbl .ico { background: var(--lime); color: #06283d; } .kpi.lime .muted { color: #9fadba; }
.kpi .val { font: 650 28px/1.1 var(--display); letter-spacing: -.03em; margin-top: 14px; }
.kpi .foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 9px; font-size: 12.5px; min-height: 18px; }
.kpi .spark { position: absolute; right: 14px; top: 58px; width: 74px; height: 28px; }
.delta { font-weight: 700; font-size: 12.5px; }
.delta.up { color: var(--green); } .delta.down { color: var(--red); }
.spark { display: block; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font: 11px var(--font); }
.chart text.hi { fill: var(--text); font-weight: 700; }
.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut-wrap svg { width: 148px; height: 148px; flex: none; }
.dn-v { font: 700 24px var(--display); fill: var(--text); }
.dn-s { font: 600 11px var(--font); fill: var(--muted); }
.mix { flex: 1; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.mix-row { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.mix-row .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.mix-row b { margin-left: auto; }
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hb-t { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 6px; font-weight: 600; }
.hb-t span { display: inline-flex; align-items: center; gap: 7px; }
.hb .sd { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.hb small { display: block; margin-top: 4px; }
.time-badge { width: 56px; text-align: center; padding: 6px 0; border-radius: 10px; background: var(--surface-3); color: var(--text); font: 700 13px var(--font); flex: none; }
.time-badge small { display: block; font-size: 10.5px; font-weight: 650; color: var(--muted); }
.vlist, .tlist { display: flex; flex-direction: column; }
.vrow, .prow { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border: 0; border-bottom: 1px dashed var(--border); background: none; text-align: left; width: 100%; border-radius: 0; }
.vrow:last-child, .prow:last-child { border-bottom: 0; }
.vrow:hover, .prow:hover { background: var(--surface-2); }
.vrow b, .prow b { display: block; font-size: 13.5px; }

/* ---------- leads ---------- */
.tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.tools .search { min-width: 240px; }
.input.w-src { width: 160px; } .input.w-ag { width: 170px; } .input.w-sort { width: 200px; } .input.w-sm { width: 120px; } .input.w-min { width: 96px; }
.tools .search.grow { flex: 1; }
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.mini-stats div { border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); padding: 10px 12px; min-width: 0; }
.mini-stats small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.mini-stats b { display: block; font: 680 20px var(--display); letter-spacing: -.02em; margin-top: 2px; }
.mini-stats span { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: var(--bg); }
.fc small { display: block; font-size: 11.5px; opacity: .7; }
.fc > b { font: 700 20px var(--display); color: var(--lime); white-space: nowrap; }
[data-theme="dark"] .fc { background: var(--surface-3); color: var(--text); }
.tools2 { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.band-seg .bd { margin-right: 2px; }
.bulk { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--lime-soft); margin-bottom: 10px; }
.bulk b { margin-right: 6px; color: var(--lime-ink); }
.bulk-f { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.bulk-f select { width: 160px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; gap: 10px; flex-wrap: wrap; }
.pager-b { display: flex; gap: 8px; }

/* ---------- lead profile ---------- */
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.crumbs a:hover { color: var(--text); }
.lp-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; padding: 22px 24px 18px; }
.lp-who { display: flex; gap: 16px; align-items: center; min-width: 0; }
.lp-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lp-name h1 { font: 680 26px/1.1 var(--display); letter-spacing: -.03em; }
.star { border: 0; background: none; color: var(--faint); padding: 2px; display: grid; }
.star.on { color: #e7a10f; } .star.on .i { fill: currentColor; }
.lp-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.lp-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.lp-right { display: flex; gap: 22px; align-items: center; }
.lp-score { display: flex; align-items: center; gap: 12px; }
.lp-score small, .lp-agent small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.lp-score b { font: 680 17px var(--display); }
.lp-agent { display: flex; flex-direction: column; gap: 4px; }
.lp-agent select { width: 180px; }
.lp-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.track { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; border-top: 1px solid var(--border); padding-top: 16px; }
.trk { border: 0; background: none; padding: 0; display: flex; flex-direction: column; gap: 7px; text-align: left; color: var(--muted); font-weight: 650; font-size: 12.5px; }
.trk i { display: block; height: 7px; border-radius: 4px; background: var(--surface-3); }
.trk:hover i { background: var(--border-2); }
.trk.done i { background: #38bdf8; }
.trk.done { color: var(--text-2); }
.trk.cur i { background: var(--ink); box-shadow: inset 0 0 0 2px var(--lime); }
.trk.cur { color: var(--text); }
.trk.won.cur i { background: var(--green); box-shadow: none; }
.trk.lost.cur i { background: var(--red); box-shadow: none; }
.lp { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; margin-top: 18px; align-items: start; }
.lp-main, .lp-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.composer { padding: 0; overflow: hidden; }
.cp-tabs { display: flex; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.cp-tabs button { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border: 0; background: none; color: var(--muted); font-weight: 650; border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.cp-tabs button.on { color: var(--text); border-bottom-color: #0ea5e9; }
.cp-b { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.cp-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.cp-f { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cp-hint { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.cp-next { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.cp-next select { width: 150px; }
.tpl .chip { background: var(--surface-2); }
.tl-day { margin-top: 6px; }
.tl-d { font: 700 11.5px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 10px 0 8px; }
.ti { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.ti:not(.wa)::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--border); }
.ti-i { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text-2); }
.ti-b { flex: 1; min-width: 0; padding-top: 2px; }
.ti-h b { font-size: 13.5px; }
.ti-t { color: var(--text-2); margin-top: 2px; }
.ti-m { color: var(--faint); font-size: 12px; margin-top: 3px; }
.c-call .ti-i, .t-ic.c-call { background: var(--blue-soft); color: var(--blue); }
.c-note .ti-i, .t-ic.c-docs { background: var(--amber-soft); color: var(--amber); }
.c-visit .ti-i, .t-ic.c-visit { background: var(--violet-soft); color: var(--violet); }
.c-stage .ti-i { background: var(--ink); color: var(--lime); }
.c-new .ti-i, .t-ic.c-email { background: var(--sky-soft); color: var(--sky); }
.c-pay .ti-i, .t-ic.c-pay, .t-ic.c-wa { background: var(--green-soft); color: var(--green); }
.c-share .ti-i { background: var(--lime-soft); color: var(--lime-ink); }
.c-task .ti-i { background: var(--surface-3); color: var(--green); }
.t-ic.c-meeting { background: var(--pink-soft); color: var(--pink); }
.ti.wa { justify-content: flex-start; padding-bottom: 10px; }
.ti.wa.out { justify-content: flex-end; }
.bubble { max-width: 78%; padding: 9px 12px 7px; border-radius: 14px; background: var(--wa-in); border: 1px solid var(--border); }
.ti.wa.out .bubble { background: var(--wa-out); border-color: transparent; border-bottom-right-radius: 4px; }
.ti.wa.in .bubble { border-bottom-left-radius: 4px; }
.b-h { display: flex; align-items: center; gap: 5px; font: 700 11px var(--font); color: #1c8a49; text-transform: uppercase; letter-spacing: .05em; }
[data-theme="dark"] .b-h { color: #6fdc96; }
.b-t { margin-top: 3px; }
.b-m { font-size: 11.5px; color: var(--muted); text-align: right; margin-top: 3px; }
.ticks { color: #2a9fd8; letter-spacing: -2px; }
.pr { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.pr:last-child { border-bottom: 0; }
.pr span { color: var(--muted); }
.pr b { text-align: right; font-weight: 650; }
.pr b.pos { color: var(--green); } .pr b.neg { color: var(--red); }
.mu { border: 1px solid var(--border); border-radius: 13px; padding: 11px 12px; margin-bottom: 9px; background: var(--surface-2); }
.mu:last-child { margin-bottom: 0; }
.mu-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.mu-h b { font-size: 13.5px; }
.mu-p { font: 700 15px var(--display); white-space: nowrap; }
.mu-f { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.mu-b { display: flex; gap: 2px; margin-left: auto; }
.bk-card .bar { margin: 2px 0 8px; height: 10px; }
.bk-n { display: flex; justify-content: space-between; font-size: 13px; font-weight: 650; margin-bottom: 14px; }

/* ---------- tasks ---------- */
.task { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px dashed var(--border); }
.task:last-child { border-bottom: 0; }
.task b { font-size: 13.5px; font-weight: 650; display: block; }
.task .cell-sub a { color: var(--text-2); font-weight: 600; }
.task .cell-sub a:hover { text-decoration: underline; }
.tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-2); background: var(--surface); display: grid; place-items: center; color: transparent; flex: none; padding: 0; }
.tick:hover { border-color: #0ea5e9; color: #0ea5e9; }
.task.done .tick { background: #0ea5e9; border-color: #0ea5e9; color: #06283d; }
.task.done b { text-decoration: line-through; color: var(--muted); }
.late-t { color: var(--red); font-weight: 650; }
.t-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text-2); }
.tlist.compact .task { padding: 9px 0; }
.task-top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.prog { display: flex; align-items: center; gap: 18px; padding: 14px 18px; min-width: 300px; }
.prog small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.prog b { font: 680 22px var(--display); }
.prog .bar { flex: 1; min-width: 120px; height: 10px; }
.tsec.late .card-h h3 { color: var(--red); }
.more-n { margin-top: 10px; font-size: 13px; }

/* ---------- pipeline ---------- */
.board-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px 6px; }
.board { display: grid; grid-template-columns: repeat(6, minmax(176px, 1fr)); gap: 12px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 10px; transition: background .15s, border-color .15s; min-width: 0; }
.col.over, .zone.over { background: var(--lime-soft); border-color: #0ea5e9; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 4px 4px 0; font: 680 14px var(--display); }
.col-h i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.col-h .cnt { margin-left: auto; min-width: 24px; height: 22px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); font: 700 12px/20px var(--font); text-align: center; padding: 0 6px; }
.col-v { padding: 2px 4px 10px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.col-b { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 262px); min-height: 380px; overflow-y: auto; margin: 0 -4px; padding: 0 4px 2px; }
.col-empty { border: 1.5px dashed var(--border-2); border-radius: 12px; padding: 22px 10px; text-align: center; color: var(--faint); font-size: 12.5px; font-weight: 600; }
.deal { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 11px; box-shadow: var(--shadow-sm); cursor: grab; transition: box-shadow .15s, transform .15s; }
.deal:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.deal.dragging { opacity: .4; }
.dl-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dl-h b { font-size: 13.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal .ring { width: 30px; height: 30px; }
.deal .ring b { font-size: 10.5px; }
.dl-p { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-f { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.dl-f > b { font: 700 13.5px var(--display); margin-right: auto; white-space: nowrap; }
.dl-age { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 650; color: var(--muted); padding: 2px 6px; border-radius: 6px; background: var(--surface-3); }
.dl-age.old { color: var(--amber); background: var(--amber-soft); }
.deal.closed { padding: 8px 10px; box-shadow: none; }
.deal.closed .dl-f { margin-top: 5px; }
.deal.closed .dl-f > b { margin-right: 0; margin-left: auto; font-size: 12.5px; }
.zone { border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; border: 1px dashed transparent; }
.zone.won { background: var(--green-soft); }
.zone.lost { background: var(--surface-3); margin-top: 4px; }
.zone-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 2px 2px 4px; }
.zone.won .zone-h { color: var(--green); }
.zone.lost .zone-h { color: var(--muted); }
.zone.lost .deal { opacity: .8; }

/* ---------- site visits ---------- */
.vis { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.cal-card { padding: 14px 16px 14px 10px; }
.cal-h, .cal-b { display: grid; grid-template-columns: 58px repeat(7, minmax(0, 1fr)); }
.cal-d { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 0 10px; border-radius: 12px; position: relative; color: var(--muted); }
.cal-d small { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.cal-d b { font: 680 19px var(--display); color: var(--text); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.cal-d.today b { background: var(--lime); color: #06283d; }
.cal-d.sel { background: var(--surface-2); }
.cal-d i { position: absolute; top: 4px; right: 8px; font: 700 10px/16px var(--font); min-width: 16px; height: 16px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); font-style: normal; }
.cal-b { position: relative; border-top: 1px solid var(--border); }
.cal-times { position: relative; }
.cal-times span { position: absolute; right: 10px; transform: translateY(-50%); font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.cal-times span:first-child { transform: none; top: 3px !important; }
.cal-col { position: relative; border-left: 1px solid var(--border); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 49px, var(--cal-line) 49px, var(--cal-line) 50px); }
.cal-col.today { background-color: color-mix(in srgb, var(--lime-soft) 55%, transparent); }
.cal-col.sel:not(.today) { background-color: var(--surface-2); }
.vb { position: absolute; left: 4px; right: 4px; border-radius: 9px; padding: 5px 7px; text-align: left; overflow: hidden; border: 0; background: var(--lime-soft); border-left: 3px solid #0ea5e9; color: var(--text); display: flex; flex-direction: column; gap: 1px; box-shadow: var(--shadow-sm); }
.vb b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vb span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vb.st-done { background: var(--surface-3); border-left-color: var(--green); }
.vb.st-done b::before { content: "✓ "; color: var(--green); }
.vb.st-noshow { background: repeating-linear-gradient(135deg, var(--surface-3) 0 6px, var(--surface-2) 6px 12px); border-left-color: var(--faint); opacity: .8; }
.vb.st-noshow b { text-decoration: line-through; color: var(--muted); }
.vb.live { background: var(--amber-soft); border-left-color: #e7a10f; }
.vb:hover { filter: brightness(.97); box-shadow: var(--shadow); }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 3; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--text-2); font-weight: 600; padding: 14px 0 0 58px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg.sched { background: var(--lime-soft); box-shadow: inset 3px 0 #0ea5e9; } .lg.done { background: var(--surface-3); box-shadow: inset 3px 0 var(--green); } .lg.noshow { background: repeating-linear-gradient(135deg, var(--surface-3) 0 3px, var(--surface) 3px 6px); box-shadow: inset 3px 0 var(--faint); }
.m-days { display: none; }
.vcard { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
.vcard:last-child { margin-bottom: 0; }
.vc-main { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 0; background: var(--surface); width: 100%; text-align: left; }
.vc-main:hover { background: var(--surface-2); }
.vc-main b { display: block; font-size: 13.5px; }
.vc-b { display: flex; gap: 6px; padding: 8px 12px 10px; border-top: 1px dashed var(--border); background: var(--surface-2); }
.vc-fb { padding: 8px 12px 10px; border-top: 1px dashed var(--border); font-size: 12.5px; color: var(--text-2); background: var(--surface-2); }
.day-card .card-h { margin-bottom: 12px; }

/* ---------- inventory ---------- */
.projs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.proj { text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-sm); min-width: 0; }
.proj:hover { border-color: var(--border-2); }
.proj.on { border-color: #0ea5e9; box-shadow: 0 0 0 3px var(--ring), var(--shadow); }
.pj-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pj-h b { font: 680 14.5px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-theme="dark"] .pj-t { background: var(--lime); color: #0c141b; }
[data-theme="dark"] .c-stage .ti-i { background: var(--lime-soft); color: var(--lime); }
.pj-t { width: 24px; height: 24px; border-radius: 7px; background: #0c141b; color: var(--lime); font: 800 12px/24px var(--font); text-align: center; flex: none; }
.proj small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stackbar { display: flex; height: 8px; border-radius: 5px; overflow: hidden; background: var(--surface-3); margin-top: 4px; }
.stackbar i { display: block; height: 100%; }
.s-sold { background: var(--chart-2); } .s-held { background: #f0a81c; } .s-av { background: #38bdf8; }
.pj-f { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.pj-f b { color: var(--text); }
.inv { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.tower { width: 100%; height: auto; max-height: 720px; display: block; margin: 0 auto; }
.tw-body { fill: var(--surface-2); stroke: var(--border-2); stroke-width: 1.5; }
.tw-crown { fill: var(--surface-3); stroke: var(--border-2); stroke-width: 1.5; }
.tw-line { stroke: var(--border-2); stroke-width: 2; }
.tw-light { fill: var(--red); }
.tw-name { font: 800 11px var(--font); letter-spacing: .16em; fill: var(--muted); }
.tw-fl { font: 700 11px var(--font); fill: var(--muted); }
.tw-pod { fill: var(--surface-3); stroke: var(--border-2); stroke-width: 1.5; }
.tw-pt { font: 700 10px var(--font); letter-spacing: .14em; fill: var(--muted); }
.tw-ground { stroke: var(--border-2); stroke-width: 2; }
.tw-tree { fill: #9cc8a6; opacity: .8; }
[data-theme="dark"] .tw-tree { fill: #2f4a3a; }
.u { cursor: pointer; }
.u rect { stroke-width: 1.5; transition: opacity .15s; }
.u .u-l { font: 700 11px var(--font); }
.u .u-c { font: 600 10px var(--font); opacity: .75; }
.u-available rect { fill: #d6effd; stroke: #0ea5e9; } .u-available text { fill: #075985; }
.u-held rect { fill: #ffe7b0; stroke: #e7a10f; } .u-held text { fill: #7a4600; }
.u-sold rect { fill: #334455; stroke: #334455; } .u-sold text { fill: #d3dbe3; }
[data-theme="dark"] .u-available rect { fill: #0e3046; stroke: #38bdf8; } [data-theme="dark"] .u-available text { fill: #bae6fd; }
[data-theme="dark"] .u-held rect { fill: #3d2c0b; stroke: #f0a81c; } [data-theme="dark"] .u-held text { fill: #ffd98a; }
[data-theme="dark"] .u-sold rect { fill: #1f2933; stroke: #34414f; } [data-theme="dark"] .u-sold text { fill: #8896a4; }
.u:hover rect, .u:focus rect { stroke-width: 3; }
.u:focus { outline: none; }
.u.dim { opacity: .16; }
.kv3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kv3 div, .kv div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.kv3 small, .kv small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 600; }
.kv3 b { font: 680 16px var(--display); }
.amen { display: flex; align-items: center; gap: 6px; font-size: 12.5px; margin: 12px 0; }
.ulist { margin-top: 12px; max-height: 520px; overflow: auto; border-top: 1px solid var(--border); }
.ulist table.t th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.ulist table.t td { padding: 9px 10px; }
.legend .lg.av { background: #38bdf8; } .legend .lg.hd { background: #f0a81c; } .legend .lg.sd { background: var(--chart-2); }

/* ---------- team, payments, reports ---------- */
.medal { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font: 800 12.5px var(--font); background: var(--surface-3); color: var(--muted); }
.medal.m0 { background: #f6d561; color: #5d4500; } .medal.m1 { background: #d7dde2; color: #3c4650; } .medal.m2 { background: #e3ab79; color: #5a3010; }
.lb-bar { min-width: 180px; }
.lb-bar .bar { margin-bottom: 4px; }
.lb-bar b { font-size: 12.5px; }
.me-row td { background: var(--lime-soft); }
.funnel .fn-n { font: 800 16px var(--display); fill: #0c141b; }
.funnel .fn-l { font: 680 13.5px var(--display); fill: var(--text); }
.funnel .fn-s { font: 600 11px var(--font); fill: var(--muted); }
.funnel .fn-r { font: 650 12px var(--font); fill: var(--text-2); }
.mini { display: flex; flex-direction: column; gap: 4px; min-width: 130px; font-size: 12.5px; }
.mini .bar { height: 6px; }
.row-b { display: inline-flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.pay-t td { padding: 11px 10px; }
.prow .t-ic { width: 34px; height: 34px; }
.prow > b { font: 700 14px var(--display); }

/* ---------- settings ---------- */
.settings { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }
.set-card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.set-card svg { width: 46px; height: 46px; margin-bottom: 6px; }
.set-card b { font: 680 17px var(--display); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: 0; }
.set-row b { display: block; }
.set-row small { color: var(--muted); }
.sc { display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; font-size: 13.5px; }

/* ---------- windows ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(8, 12, 16, .46); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fade .15s ease-out; }
.modal { width: min(540px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
.modal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 6px; }
.modal-h h2 { font: 680 20px var(--display); letter-spacing: -.02em; }
.modal-h p { color: var(--muted); margin-top: 4px; font-size: 13.5px; }
.modal-b { padding: 12px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-f { padding: 12px 22px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.modal-f.wrap { flex-wrap: wrap; }
.overlay.top-panel { place-items: start center; padding-top: 12vh; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kv b { font-size: 14px; display: block; margin-top: 2px; }
.check { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 13.5px; }
.check input { width: 18px; height: 18px; accent-color: #0ea5e9; }
.stars { display: flex; gap: 4px; }
.stars button { border: 0; background: none; font-size: 30px; line-height: 1; color: var(--border-2); padding: 0 2px; }
.stars button.on { color: #f0a81c; }
.fb-box { border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); padding: 12px 14px; font-size: 13.5px; }
.fb-s { color: #f0a81c; font-size: 16px; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.row-in { display: flex; gap: 8px; }
.unit-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.unit-hero small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.unit-hero b { display: block; font: 700 28px var(--display); letter-spacing: -.02em; }
.pay-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pay-sum div { border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); padding: 9px 12px; }
.pay-sum small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.pay-sum b { font: 700 15px var(--display); }
.receipt { background: #fffef8; color: #16202a; border: 1px dashed #cdd5de; border-radius: 14px; padding: 18px; }
.rc-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px dashed #cdd5de; }
.rc-logo { display: flex; gap: 10px; align-items: center; }
.rc-logo svg { width: 34px; height: 34px; }
.rc-logo b { display: block; font: 700 15px var(--display); }
.rc-logo small, .rc-no small { display: block; color: #66717d; font-size: 11.5px; }
.rc-no { text-align: right; }
.rc-no b { font: 700 14px ui-monospace, "Cascadia Mono", Consolas, monospace; }
.rc-amt { text-align: center; padding: 16px 0 12px; }
.rc-amt small { color: #66717d; font-weight: 600; font-size: 12px; }
.rc-amt b { display: block; font: 750 34px var(--display); letter-spacing: -.02em; }
.rc-amt span { display: block; color: #46515c; font-size: 12.5px; font-style: italic; margin-top: 2px; }
.rc-rows div { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-top: 1px dashed #dfe5eb; font-size: 13px; }
.rc-rows span { color: #66717d; }
.rc-rows b { text-align: right; font-weight: 650; }
.rc-foot { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #cdd5de; text-align: center; color: #66717d; font-size: 11.5px; }
.more-list { gap: 8px; padding-bottom: 20px; }
.more-list .btn { justify-content: flex-start; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.pal-in input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 16px; height: 34px; }
.pal-list { max-height: 400px; overflow-y: auto; padding: 8px; }
.pal-g { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 10px 10px 6px; }
.pal-i { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; border: 0; background: none; text-align: left; }
.pal-i.on { background: var(--lime-soft); }
.pal-l { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pal-i .k { color: var(--muted); font-size: 12px; white-space: nowrap; }
.pal-i .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); flex: none; }
.pop { position: absolute; top: 52px; right: 0; width: 370px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden; animation: pop .15s ease-out; }
.pop-h { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.pop-h b { font: 680 15px var(--display); }
.ntf { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.ntf:last-child { border-bottom: 0; }
.ntf .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.ntf.unread .ico { background: var(--lime-soft); color: var(--lime-ink); }
.ntf small { color: var(--muted); }
#toasts { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: #0f171e; color: #fff; box-shadow: var(--shadow-lg); font-weight: 600; animation: pop .18s ease-out; max-width: 400px; }
.toast .i { color: var(--lime); }
.toast.warn .i { color: #fbbf24; }
.toast.out { opacity: 0; transform: translateY(6px); transition: all .3s; }
[data-theme="dark"] .toast { background: #eaf0f5; color: #0f171e; }
[data-theme="dark"] .toast .i { color: #0369a1; }

/* ---------- sign in ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { position: relative; overflow: hidden; background: #0a1218; color: #fff; padding: 46px 52px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; }
.login-art::before { content: ""; position: absolute; width: 680px; height: 680px; right: -260px; top: -240px; border-radius: 50%; background: radial-gradient(circle, rgba(56, 189, 248, .34), rgba(56, 189, 248, 0) 66%); }
.login-art::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: 46px 46px; mask-image: radial-gradient(circle at 30% 60%, #000, transparent 75%); }
.login-art > * { position: relative; z-index: 1; }
.login-art .brand b { font-size: 21px; }
.login-art .brand svg { width: 42px; height: 42px; }
.login-art h2 { font: 700 48px/1.05 var(--display); letter-spacing: -.04em; max-width: 560px; }
.login-art h2 em { font-style: normal; color: var(--lime); }
.login-art p.lead { color: #bfcad5; font-size: 16.5px; max-width: 470px; margin-top: 16px; }
.la-cards { position: relative; height: 230px; margin-top: 38px; max-width: 560px; }
.la-card { position: absolute; width: 250px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(10px); box-shadow: 0 24px 50px rgba(0, 0, 0, .35); }
.la-card small { color: #a3b0bd; font-size: 12px; font-weight: 600; }
.la-card b { display: block; font: 700 20px var(--display); margin-top: 3px; }
.la-card span { color: #bfcad5; font-size: 13px; }
.la-card .up { color: var(--lime); font-weight: 700; }
.la-card.c1 { left: 0; top: 0; }
.la-card.c2 { left: 210px; top: 74px; transform: rotate(2deg); background: rgba(56, 189, 248, .14); border-color: rgba(56, 189, 248, .3); }
.la-card.c3 { left: 40px; top: 146px; transform: rotate(-1.5deg); }
.la-score { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 800 13px var(--font); font-style: normal; color: #06283d; background: var(--lime); }
.la-note { color: #7a8794; font-size: 12.5px; }
.login-form { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.login-box { width: min(420px, 100%); display: flex; flex-direction: column; gap: 16px; }
.lb-logo svg { width: 44px; height: 44px; }
.login-box h1 { font: 700 30px var(--display); letter-spacing: -.03em; }
.login-box > p { color: var(--muted); margin-top: -8px; }
.role-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role-chips button { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; text-align: left; color: var(--text-2); }
.role-chips button b { display: block; font-size: 13.5px; }
.role-chips button small { color: var(--muted); font-size: 12px; }
.role-chips button.on { border-color: #0ea5e9; background: var(--lime-soft); box-shadow: 0 0 0 3px var(--ring); color: var(--text); }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; font-weight: 650; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.demo-note { font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 1320px) {
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .projs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lp { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 1100px) {
  .g2-1, .g3, .g3-1, .g2, .vis, .inv, .settings, .lp { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .lp-head { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .top { padding: 0 16px; height: 60px; gap: 8px; }
  .top-brand { display: flex; margin-right: auto; }
  .search-trigger, .clock { display: none; }
  .top-r { margin-left: 0; gap: 8px; }
  .top .icon-btn { width: 40px; height: 40px; }
  .top .btn-primary { width: 40px; height: 40px; padding: 0; }
  .top .btn-primary span { display: none; }
  .page { padding: 18px 16px 104px; }
  .ph { margin-bottom: 16px; gap: 12px; }
  .ph h1 { font-size: 23px; }
  .ph-actions { width: 100%; }
  .ph-actions .w-ag { flex: 1; width: auto; min-width: 0; }
  .grid { gap: 12px; }
  .mt { margin-top: 12px; }
  .g5, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g5 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .card { padding: 16px; border-radius: 16px; }
  .kpi { padding: 14px; }
  .kpi .val { font-size: 22px; margin-top: 10px; }
  .kpi .lbl { font-size: 12px; gap: 7px; }
  .kpi .lbl .ico { width: 26px; height: 26px; }
  .kpi .spark { display: none; }
  .donut-wrap { gap: 14px; }
  .mini-stats { grid-template-columns: 1fr 1fr; }
  .mini-stats div:last-child { grid-column: 1 / -1; }
  .donut-wrap svg { width: 120px; height: 120px; }
  .legend { justify-content: flex-start; }
  .card-h { flex-wrap: wrap; }
  .tools .search, .tools .search.grow { min-width: 0; flex: 1 1 100%; }
  .ph-actions > .btn { flex: 1 1 auto; }
  .ph-actions .input.w-ag { flex: 1 1 150px; width: auto; }
  .cp-tabs { padding: 6px 8px 0; gap: 0; }
  .cp-tabs button { flex: 1; justify-content: center; padding: 0 6px; font-size: 13px; white-space: nowrap; gap: 5px; }
  .pay-t thead { display: none; }
  .pay-t, .pay-t tbody { display: block; }
  .pay-t tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .pay-t tbody tr:last-child { border-bottom: 0; }
  table.pay-t td { display: block; padding: 0; border: 0; }
  .pay-t td:nth-child(2) { order: 1; }
  .pay-t td:nth-child(5) { order: 2; }
  .pay-t td:nth-child(1) { order: 3; display: flex; gap: 8px; align-items: baseline; }
  .pay-t td:nth-child(6) { order: 4; text-align: right; }
  .pay-t td:nth-child(7) { order: 5; grid-column: 1 / -1; text-align: left; }
  .pay-t td:nth-child(7) .row-b { justify-content: flex-start; margin-top: 4px; }
  .pay-t td:nth-child(7):empty, .pay-t td:nth-child(7) .row-b:empty { display: none; }
  .tools select.input { flex: 1; width: auto; min-width: 0; }
  .tools2 { align-items: stretch; }
  .tools2 .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .band-seg { width: 100%; }
  .band-seg button { flex: 1; padding: 0 6px; }
  .bulk-f select { width: 130px; }
  .hide-m { display: none !important; }
  table.t td, table.t th { padding: 10px 7px; }
  .ellip { max-width: 140px; }
  .lp-head { padding: 16px; gap: 14px; }
  .lp-who { align-items: flex-start; }
  .avatar.xl { width: 46px; height: 46px; font-size: 16px; }
  .lp-name h1 { font-size: 21px; }
  .lp-meta { gap: 4px 12px; font-size: 12.5px; }
  .lp-right { justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .lp-agent select { width: 160px; }
  .lp-actions .btn { flex: 1 1 calc(50% - 8px); }
  .track { display: flex; overflow-x: auto; margin: 0 -16px; padding: 14px 16px 2px; scrollbar-width: none; }
  .trk { flex: 0 0 92px; }
  .bubble { max-width: 90%; }
  .cp-f .btn { flex: 1; }
  .board-wrap { margin: 0 -16px; padding: 0 16px 8px; scroll-snap-type: x mandatory; }
  .board { grid-template-columns: repeat(6, 80vw); }
  .col { scroll-snap-align: center; }
  .col-b { max-height: none; min-height: 200px; }
  .cal-card { display: none; }
  .m-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 14px; }
  .m-days button { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 7px 0; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--muted); }
  .m-days small { font-size: 10.5px; font-weight: 650; text-transform: uppercase; }
  .m-days b { font: 680 16px var(--display); color: var(--text); }
  .m-days .today b { color: var(--lime-ink); }
  .m-days .on { background: var(--ink); border-color: var(--ink); }
  .m-days .on b, .m-days .on small { color: var(--bg); }
  .vc-b .btn { flex: 1; }
  .projs { display: flex; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 8px; scroll-snap-type: x mandatory; }
  .proj { flex: 0 0 72%; scroll-snap-align: start; }
  .ulist { max-height: none; }
  .kv3 { grid-template-columns: 1fr 1fr; }
  .kv3 div:last-child { grid-column: 1 / -1; }
  .task-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .task-top .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .prog { min-width: 0; }
  .lb-bar { min-width: 0; }
  .settings .set-card { display: none; }
  .set-row { flex-wrap: wrap; }
  .pop { position: fixed; top: 66px; left: 12px; right: 12px; width: auto; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface); border-top: 1px solid var(--border); padding: 7px 6px calc(8px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 650; color: var(--muted); border: 0; background: none; padding: 4px 0; }
  .tabbar .on { color: var(--text); }
  .tabbar .on .i { color: #06283d; background: var(--lime); border-radius: 9px; padding: 2px 9px; width: 42px; height: 26px; }
  .overlay { padding: 12px; }
  .modal { max-height: calc(100vh - 24px); border-radius: 18px; }
  .modal-h { padding: 18px 16px 4px; }
  .modal-b { padding: 12px 16px; }
  .modal-f { padding: 12px 16px 16px; flex-wrap: wrap; }
  .modal-f .btn { flex: 1 1 auto; }
  .two, .kv { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr 1fr; }
  .pay-sum b { font-size: 13px; }
  .row-in { flex-direction: column; }
  .pal-list { max-height: 60vh; }
  .overlay.top-panel { padding-top: 10vh; }
  #toasts { left: 16px; right: 16px; bottom: 92px; align-items: stretch; }
  .toast { max-width: none; }
  .demo-foot { margin-top: 24px; }
}
@media print {
  body * { visibility: hidden !important; }
  .receipt, .receipt * { visibility: visible !important; }
  .receipt { position: fixed; left: 0; top: 0; width: 150mm; border: 0; }
}
