/* LuxCRM — white with violet → blue */
:root {
  color-scheme: light;
  --bg: #f7f7fc;
  --surface: #ffffff;
  --surface-2: #f3f2fb;
  --surface-3: #e9e7f8;
  --line: #e6e4f2;
  --line-2: #d6d2ee;
  --ink: #16133a;
  --ink-2: #44406b;
  --muted: #78749b;
  --gold: #6d28d9;      /* accent text (names kept from the earlier theme) */
  --gold-2: #5b21b6;
  --violet: #7c3aed;
  --blue: #2563eb;
  --grad: linear-gradient(135deg, #7c3aed 0%, #5b4ff0 50%, #2563eb 100%);
  --on-gold: #ffffff;   /* text on the gradient */
  --accent: #7c3aed;
  --link: #6d28d9;
  --display: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  --red: #dc2626;
  --red-bg: #fdecec;
  --orange: #c2410c;
  --orange-bg: #fff0e6;
  --amber: #b45309;
  --amber-bg: #fef5e4;
  --green: #047857;
  --green-bg: #e3f7ef;
  --gray-bg: #efeef7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 19, 58, .04), 0 6px 20px rgba(22, 19, 58, .06);
  --glow: 0 0 0 1px rgba(124, 58, 237, .28), 0 10px 28px rgba(79, 70, 229, .16);
  --nav-h: 62px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  color: var(--ink);
  font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 420px at 15% -12%, rgba(124, 58, 237, .09), transparent 65%),
    radial-gradient(800px 420px at 100% -5%, rgba(37, 99, 235, .08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body.noscroll { overflow: hidden; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; }
h1 { font-family: var(--display); font-weight: 800; font-size: 2rem; letter-spacing: -.02em; }
.panel > h2, .block > h2, .cm-name, .dp-head h2 { font-family: var(--display); font-weight: 750; font-size: 1.2rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; }
h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: .25em; display: flex; align-items: center; gap: 8px; }
h4 { font-size: .9rem; margin-top: 1em; }
code { background: var(--surface-3); padding: 1px 6px; border-radius: 5px; font-size: .9em; word-break: break-all; color: var(--ink-2); }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .85rem; margin: .25em 0 .75em; }
.hint a, .notice a, .empty a:not(.btn), .muted a { color: var(--link); }
.center { text-align: center; }
.good { color: var(--green); font-weight: 600; }
.warn { color: var(--amber); font-weight: 600; }
.error { color: var(--red); font-weight: 600; }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
::selection { background: rgba(124, 58, 237, .45); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  height: var(--nav-h); padding: 0 22px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; text-decoration: none; white-space: nowrap; letter-spacing: -.01em; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--grad); color: var(--on-gold); font-family: var(--display); font-weight: 800; font-size: 1rem; box-shadow: 0 4px 14px rgba(79, 70, 229, .45); }
.brand-crm { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
#nav { display: flex; gap: 4px; }
#nav a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 550; transition: color .15s, background .15s; }
#nav a:hover { color: var(--ink); background: var(--surface-2); }
#nav a.active { color: var(--gold-2); background: linear-gradient(135deg, rgba(124, 58, 237, .12), rgba(37, 99, 235, .10)); box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .22); }
.nav-ico { font-size: 1rem; }

main { padding: 24px 22px; max-width: 1500px; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
/* .shine: a light sweep across the button every few seconds (every "Start free trial" button) */
.btn.shine { position: relative; overflow: hidden; isolation: isolate; }
.btn.shine::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent); transform: skewX(-18deg); animation: shineSweep 4.5s ease-in-out 1.4s infinite; pointer-events: none; z-index: 1; }
@keyframes shineSweep { 0% { left: -60%; } 30%, 100% { left: 130%; } }
.btn.shine { transition: transform .15s, box-shadow .2s; }
.btn.shine:hover { transform: translateY(-1px); }
.btn.shine:active { transform: translateY(1px) scale(.99); }
@media (prefers-reduced-motion: reduce) { .btn.shine::after { animation: none; display: none; } }

/* admin: customer earnings */
.earn-stats { grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; }
.earn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.earn-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.earn-months { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; height: 180px; }
.em { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.em-bar { flex: 1; width: 100%; max-width: 46px; display: flex; align-items: flex-end; background: var(--surface-3); border-radius: 8px; overflow: hidden; }
.em-bar div { width: 100%; background: var(--grad); border-radius: 8px 8px 0 0; min-height: 0; }
.em-v { font-size: .72rem; font-weight: 700; color: var(--ink-2); min-height: 1em; white-space: nowrap; }
.em-l { font-size: .78rem; color: var(--muted); }
.view-anim .grow-y { transform-origin: bottom; animation: growY .9s cubic-bezier(.2, .7, .2, 1) both .15s; }
@keyframes growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.earn-top { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: et; }
.earn-top li { counter-increment: et; }
.et-row { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.et-row b::before { content: counter(et) ". "; color: var(--muted); font-weight: 600; }
.et-row span { font-weight: 800; color: var(--green); }
.et-sub { font-size: .78rem; margin-top: 3px; }
@media (max-width: 800px) { .earn-grid { grid-template-columns: 1fr; } .earn-stats { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .view-anim .grow-y { animation: none; } }

/* admin PIN screen */
.pin-gate { display: grid; place-items: center; min-height: 60vh; }
.pin-card { width: min(400px, 100%); text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 30px 26px; box-shadow: var(--shadow); }
.pin-card h1 { font-size: 1.6rem; margin: 12px 0 8px; }
.pin-card form { margin-top: 18px; }
.pin-card input { text-align: center; font-size: 1.4rem; letter-spacing: .4em; }
.pin-ic { width: 54px; height: 54px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center; color: #fff; background: var(--grad); }
.pin-ic svg { width: 26px; height: 26px; }
#pin-err:empty { display: none; }

/* ---------- controls ---------- */
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink); min-width: 0; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #a3a0c2; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(124, 58, 237, .25); }
select option { background: var(--surface); }
textarea { resize: vertical; }
label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
label > input, label > select, label > textarea { margin-top: 5px; font-weight: 400; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 15px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink);
  font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: filter .15s, background .15s, transform .05s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--grad); border-color: transparent; color: var(--on-gold); box-shadow: 0 6px 18px rgba(79, 70, 229, .35); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: rgba(220, 38, 38, .3); background: transparent; }
.btn.icon { padding: 6px 10px; }
.link-btn { background: none; border: 0; padding: 0 4px; color: var(--link); cursor: pointer; font-weight: 600; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 8px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.notice { background: var(--amber-bg); color: #8a4b08; border: 1px solid #f6dfae; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.empty { text-align: center; padding: 50px 20px; }
.empty p { color: var(--muted); }

/* ---------- badges & cards ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .7rem; font-weight: 750; letter-spacing: .03em; white-space: nowrap; }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.orange { background: var(--orange-bg); color: var(--orange); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.gray { background: var(--gray-bg); color: var(--muted); }
.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; background: rgba(124, 58, 237, .16); font-size: .74rem; font-weight: 650; color: var(--gold); }
.count { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--gray-bg); color: var(--ink-2); font-size: .74rem; text-align: center; font-weight: 700; letter-spacing: 0; text-transform: none; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 13px; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card:hover { border-color: rgba(124, 58, 237, .55); box-shadow: var(--glow); transform: translateY(-1px); }
.card.dragging { opacity: .5; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-name { font-weight: 650; }
.card-sub { color: var(--muted); font-size: .83rem; margin-top: 2px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 7px; font-size: .82rem; color: var(--ink-2); }
.fu { font-weight: 600; color: var(--ink-2); }
.fu.due { color: var(--amber); }
.fu.overdue { color: var(--red); }

/* ---------- today ---------- */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 26px; }
.stat {
  position: relative; overflow: hidden; display: block; text-align: left; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 14px;
  box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s;
}
.stat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); opacity: .8; }
a.stat:hover, .stat.money:hover { border-color: rgba(124, 58, 237, .55); box-shadow: var(--glow); }
.stat-ico { position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: rgba(124, 58, 237, .14); color: var(--gold); font-weight: 700; }
.stat-n { font-family: var(--display); font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin-top: 2px; }
.stat-l { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.block { margin-bottom: 28px; }
.block h2 { display: flex; align-items: center; gap: 8px; }

/* money: hidden until hover (PC) or tap (phone) */
.stat.money { width: 100%; cursor: pointer; font: inherit; color: inherit; }
.stat.money .stat-ico { background: var(--green-bg); color: var(--green); }
.stat.money .m-show { display: none; }
.stat.money .m-hide { color: var(--muted); }
.stat.money .stat-n .m-hide { letter-spacing: .05em; }
.stat.money:hover .m-show, .stat.money:focus-visible .m-show, .stat.money.revealed .m-show { display: inline; }
.stat.money:hover .m-hide, .stat.money:focus-visible .m-hide, .stat.money.revealed .m-hide { display: none; }
.on-touch { display: none; }
@media (hover: none) { .on-touch { display: inline; } .on-mouse { display: none; } }
.stat.money .stat-n .m-show { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- pipeline ---------- */
.toolbar { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; scroll-snap-type: x proximity; }
.col { flex: 0 0 272px; background: #f1f0fa; border: 1px solid var(--line); border-radius: 14px; scroll-snap-align: start; }
.col.over { outline: 2px dashed var(--violet); outline-offset: -2px; }
.col header { display: flex; justify-content: space-between; align-items: center; padding: 11px 13px; font-weight: 700; font-size: .86rem; color: var(--ink-2); }
.col-body { display: grid; gap: 8px; padding: 0 8px 10px; max-height: calc(100vh - 240px); overflow-y: auto; min-height: 60px; }
.col-empty { color: var(--muted); font-size: .8rem; text-align: center; padding: 14px 0; border: 1px dashed var(--line-2); border-radius: 10px; }

/* ---------- find ---------- */
.find-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.find-grid .panel { margin-bottom: 0; }
.find-grid + .panel { margin-top: 16px; }
#pages { width: auto; flex: none; min-width: 125px; }
.auto-panel h2 { display: flex; align-items: center; gap: 10px; }
.auto-grid { display: grid; grid-template-columns: 1.4fr 1.4fr 1fr 1fr 1fr auto; gap: 10px; align-items: end; }
.auto-grid label { margin: 0; }
.auto-grid .btn { height: 42px; padding: 0 22px; }
#auto-status { margin-top: 12px; }
#auto-status .bar { margin: 8px 0; height: 6px; }
.auto-head { font-weight: 600; }
.auto-stats { font-size: .85rem; margin-bottom: 12px; }
.auto-stats .good { font-size: 1rem; }
@media (max-width: 1000px) { .auto-grid { grid-template-columns: 1fr 1fr; } .auto-grid .btn { grid-column: 1 / -1; } }
.filters { display: grid; gap: 8px; margin: 12px 0 4px; }
.toggle { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; color: var(--ink); cursor: pointer; flex-wrap: wrap; }
.toggle.sub { margin-left: 46px; font-weight: 500; color: var(--ink-2); font-size: .82rem; }
.toggle.disabled { opacity: .45; cursor: default; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle > span:first-of-type { flex: none; position: relative; width: 36px; height: 20px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background .15s; }
.toggle > span:first-of-type::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(22,19,58,.25); transition: transform .15s; }
.toggle input:checked + span { background: var(--grad); border-color: transparent; }
.toggle input:checked + span::after { transform: translateX(16px); }
.toggle input:focus-visible + span { box-shadow: 0 0 0 3px rgba(124, 58, 237, .35); }
.toggle .muted { font-weight: 400; font-size: .8rem; }
.toggle.sub select { padding: 4px 8px; font-size: .82rem; }
.cleanup { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.stale-list { list-style: none; padding: 0; margin: 8px 0 12px; max-height: 260px; overflow-y: auto; display: grid; gap: 4px; font-size: .86rem; }
.stale-list li { padding: 6px 10px; background: var(--surface-2); border-radius: 8px; }
.result-summary { margin: 14px 0 8px; }
#search-result .cards, #link-result .card { margin-top: 10px; }
.recent { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .88rem; }
.manual { margin-top: 18px; }
.manual summary { cursor: pointer; color: var(--ink-2); font-weight: 600; margin-bottom: 10px; }
.usage-row { display: grid; grid-template-columns: 120px 1fr 90px; gap: 10px; align-items: center; font-size: .88rem; margin-bottom: 6px; }
.usage-row .muted { text-align: right; }
.bar { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bar div { height: 100%; background: var(--grad); }
.bar div.hot { background: var(--red); }
details summary { cursor: pointer; color: var(--ink-2); }

/* ---------- call mode ---------- */
.callmode { max-width: 560px; margin: 0 auto; }
.cm-progress { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .85rem; margin-bottom: 8px; }
.cm-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.cm-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.cm-cat { color: var(--muted); font-size: .85rem; }
.cm-name { font-size: 1.65rem; margin: 4px 0 8px; }
.cm-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.call-btn { width: 100%; padding: 17px; font-size: 1.15rem; background: var(--grad); border: 0; color: var(--on-gold); border-radius: 14px; box-shadow: 0 10px 26px rgba(79, 70, 229, .4); }
.call-btn:hover { filter: brightness(1.1); background: var(--grad); }
.cm-pitch { margin-top: 18px; }
.cm-pitch ul { margin: 0; padding-left: 20px; display: grid; gap: 7px; color: var(--ink-2); }
.cm-site { display: inline-block; margin-top: 12px; color: var(--link); font-weight: 600; text-decoration: none; }
.cm-last, .cm-notes { margin-top: 12px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; font-size: .88rem; white-space: pre-wrap; color: var(--ink-2); }
.cm-log { margin-top: 14px; }
.cm-fu { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.cm-fu input { width: auto; margin: 0; }
.outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.outcome { padding: 14px 8px; white-space: normal; }
.o-interested, .o-meeting-scheduled, .o-closed-won { border-color: rgba(4, 120, 87, .35); color: var(--green); }
.o-not-interested { color: var(--red); border-color: rgba(220, 38, 38, .3); }

/* ---------- drawer ---------- */
.drawer.hidden { display: none; }
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(22, 19, 58, .35); backdrop-filter: blur(3px); }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(640px, 100%);
  background: var(--surface); border-left: 1px solid var(--line); overflow-y: auto; padding: 22px 24px 40px; box-shadow: -16px 0 40px rgba(22, 19, 58, .14);
}
.dp-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.dp-head h2 { font-size: 1.4rem; margin-bottom: 2px; }
.dp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drawer section { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.saved { color: var(--green); font-weight: 600; margin-left: 6px; }
.log { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.log li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: .88rem; padding: 8px 11px; background: var(--surface-2); border-radius: 9px; }
.log li span:nth-child(3) { flex: 1; }
.log-when { color: var(--muted); font-size: .8rem; white-space: nowrap; }
#d-log select { width: auto; }
#d-log input, #d-pay input { flex: 1; }
#d-pay .amount { flex: 0 0 140px; }
.pay-total { margin-left: auto; color: var(--green); letter-spacing: 0; text-transform: none; font-size: .85rem; }
.money-amt { color: var(--green); }
.hidden { display: none !important; }
.btn.small { padding: 5px 10px; font-size: .8rem; border-radius: 8px; }
h3 .btn.small { margin-left: auto; letter-spacing: 0; text-transform: none; }
h3 .link-btn { letter-spacing: 0; text-transform: none; font-size: .8rem; }
.danger-text { color: var(--red); }
.inv-form { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 14px; margin: 10px 0; }
.inv-form .hint { margin: 0 0 10px; color: var(--gold); }
label.check { display: flex; align-items: center; gap: 8px; align-self: end; padding-bottom: 10px; }
label.check input { width: auto; margin: 0; accent-color: var(--violet); }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.seg label { margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; width: auto; }
.seg span { display: block; padding: 6px 14px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.seg input:checked + span { background: var(--grad); color: var(--on-gold); }
.addr { display: grid; gap: 8px; margin-bottom: 12px; }
.addr-title { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.addr-row { display: grid; grid-template-columns: 2fr 70px 110px; gap: 8px; }
.log.invoices li.inv { display: block; }
.inv-main { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inv-main small { font-weight: 600; opacity: .8; }
.log li.inv .inv-main > span { flex: none; }
.log li.inv .inv-main > span:nth-child(2) { flex: 1; min-width: 140px; }
.inv-sub { font-size: .8rem; margin-top: 3px; }
.inv-actions { margin-top: 8px; gap: 6px; }
.score-row { display: flex; gap: 16px; align-items: center; }
.score-big { font-size: 2.4rem; font-weight: 800; line-height: 1; padding: 12px 15px; border-radius: 14px; display: inline-block; }
.score-big small { font-size: 1rem; font-weight: 600; opacity: .7; }
.score-big.red { background: var(--red-bg); color: var(--red); font-size: 1.4rem; }
.score-big.orange { background: var(--orange-bg); color: var(--orange); font-size: 1.4rem; }
.score-row .score-big.red { font-size: 2.4rem; }
.score-big.amber { background: var(--amber-bg); color: var(--amber); }
.score-big.green { background: var(--green-bg); color: var(--green); }
.score-big.gray { background: var(--gray-bg); color: var(--muted); }
.score-info { font-size: .88rem; display: grid; gap: 3px; color: var(--ink-2); }
.psi { display: flex; flex-wrap: wrap; gap: 10px; color: var(--ink-2); }
.design-notes { margin-top: 12px; padding: 10px 12px; background: rgba(79, 70, 229, .14); border: 1px solid rgba(79, 70, 229, .3); border-radius: 10px; font-size: .9rem; }
.checks { list-style: none; padding: 0; margin: 6px 0 10px; display: grid; gap: 7px; }
.checks li { display: flex; gap: 10px; font-size: .88rem; }
.checks .pts { flex: 0 0 40px; text-align: center; font-weight: 700; border-radius: 6px; padding: 1px 0; align-self: flex-start; }
.checks .fail .pts { background: var(--red-bg); color: var(--red); }
.checks .pass .pts { background: var(--green-bg); color: var(--green); }
/* audit: score by area + what to say */
.cat-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 18px; margin: 14px 0 4px; }
.cat-top { display: flex; justify-content: space-between; font-size: .84rem; margin-bottom: 4px; color: var(--ink-2); }
.bar div.good { background: var(--green); }
.bar div.mid { background: var(--amber); }
.bar div.bad { background: var(--red); }
.muted.small { font-size: .8rem; margin: 6px 0 0; }
.say { margin-top: 6px; padding: 8px 10px; border-left: 3px solid var(--violet); background: rgba(124, 58, 237, .07); border-radius: 0 8px 8px 0; color: var(--ink); line-height: 1.5; }
.say span { display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--violet); margin-bottom: 2px; }
.shots { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin: 12px 0; }
.shots a { display: block; text-decoration: none; font-size: .78rem; color: var(--muted); text-align: center; }
.shots img { width: 100%; border: 1px solid var(--line); border-radius: 10px; display: block; margin-bottom: 4px; }
.kv { display: grid; gap: 6px; font-size: .9rem; margin-bottom: 10px; }
.kv span { display: inline-block; width: 110px; color: var(--muted); }
.plain { margin: 6px 0; padding-left: 18px; font-size: .88rem; }
.reviews { list-style: none; padding: 0; display: grid; gap: 10px; font-size: .88rem; }
.reviews b { color: #f59e0b; }
.reviews p { margin: 2px 0 0; color: var(--ink-2); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 10px 0; }
.photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; display: block; }
.danger-zone { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.danger-zone .hint { margin: 0; }

/* ---------- settings ---------- */
.steps { padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); }
.lan { margin: 6px 0; font-size: 1.05rem; }

/* ---------- scrollbars ---------- */
* { scrollbar-color: var(--line-2) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }

/* ---------- confirm box ---------- */
.ask { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; }
.ask-backdrop { position: absolute; inset: 0; background: rgba(22, 19, 58, .4); backdrop-filter: blur(3px); }
.ask-box { position: relative; width: min(420px, 100%); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 20px; box-shadow: 0 20px 50px rgba(22, 19, 58, .2); }
.ask-box::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: 16px 16px 0 0; background: var(--grad); }
.ask-box p { margin: 0 0 16px; font-size: 1rem; line-height: 1.5; }
.ask-box .row { justify-content: flex-end; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--surface-3); border: 1px solid var(--line-2); color: var(--ink); padding: 10px 16px; border-radius: 12px; font-weight: 600; z-index: 100;
  transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); box-shadow: 0 12px 30px rgba(22, 19, 58, .18);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #fdecec; border-color: #f5b5b5; color: #991b1b; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  main { padding: 16px 16px calc(var(--nav-h) + 26px + env(safe-area-inset-bottom)); }
  /* backdrop-filter would trap the fixed bottom nav inside the top bar */
  .topbar { height: 50px; padding: 0 16px; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  #nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); justify-content: space-around; gap: 0;
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
  }
  #nav a { flex-direction: column; gap: 0; padding: 6px 4px; font-size: .7rem; flex: 1; text-align: center; }
  .nav-ico { font-size: 1.2rem; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .toolbar #f-q { grid-column: 1 / -1; }
  .col { flex-basis: 85vw; }
  .col-body { max-height: none; }
  .find-grid { grid-template-columns: 1fr; gap: 16px; }
  .row { flex-wrap: wrap; }
  .row > input { flex: 1 1 100%; }
  .grid2 { grid-template-columns: 1fr; gap: 0; }
  #d-log select { flex: 1; }
  #d-log input { flex: 1 1 100%; order: 3; }
  #d-pay .amount { flex: 1 1 100%; }
  .drawer-panel { padding: 16px 16px 40px; border-left: 0; }
  .shots { grid-template-columns: 1fr 1fr; }
  .usage-row { grid-template-columns: 95px 1fr 70px; }
  .toast { bottom: calc(var(--nav-h) + 20px); }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stats .money { grid-column: 1 / -1; }
  .stat { padding: 13px 13px 12px; }
  .stat-n { font-size: 1.9rem; }
  .stat-ico { width: 26px; height: 26px; top: 10px; right: 10px; font-size: .85rem; }
  h1 { font-size: 1.75rem; }
  .nav-desktop { display: none !important; }
  .banner { top: 50px; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
}

/* ---------- LuxCRM additions ---------- */
.stack.narrow { max-width: 380px; }
.earn-hero { display: flex; gap: 24px; align-items: center; background: linear-gradient(135deg, #f5f0ff, #eef3ff); border-color: #e2dbfb; }
.earn-hero p { margin: 0; color: var(--ink-2); line-height: 1.6; }
.earn-big { flex: none; text-align: center; }
.earn-big span { display: block; font: 800 3.2rem/1 var(--display); letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.earn-big small { color: var(--muted); font-size: .78rem; font-weight: 600; }
.earn-upsell { text-align: center; }
@media (max-width: 760px) { .earn-hero { flex-direction: column; text-align: center; } }
.ref-link { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.ref-link code { font-size: .95rem; padding: 8px 12px; background: #f6f2ff; color: var(--gold-2); border: 1px solid rgba(124, 58, 237, .25); border-radius: 9px; }
.dialers { display: grid; gap: 6px; max-width: 640px; }
.dialer { display: flex; gap: 10px; align-items: center; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 500; color: var(--ink); }
.dialer input { width: auto; margin: 0; accent-color: var(--violet); }
.dialer:has(input:checked) { border-color: rgba(124, 58, 237, .5); background: #f6f2ff; }
.cm-dialer { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.cm-dialer a { color: var(--link); }
.trial-steps { list-style: none; counter-reset: st; padding: 0; margin: 22px auto 24px; max-width: 400px; text-align: left; display: grid; gap: 10px; }
.trial-steps li { counter-increment: st; display: grid; grid-template-columns: 30px 1fr; column-gap: 10px; align-items: start; }
.trial-steps li::before { content: counter(st); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(124, 58, 237, .5); color: var(--gold-2); font-weight: 700; font-size: .85rem; }
.trial-steps li.done::before { content: "✓"; background: var(--grad); color: var(--on-gold); border: 0; }
.whop-checkout { margin: 6px auto 10px; max-width: 520px; min-height: 120px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.whop-checkout:has(> .muted), .whop-checkout:has(> .warn) { background: transparent; text-align: center; }
.paywall.start-trial { max-width: 640px; }
.trial-steps span { color: var(--muted); font-size: .88rem; }
.topbar-account { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-name { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
@media (max-width: 1000px) { .topbar-name { display: none; } }
#a-email .stack > .btn { justify-self: start; }
.badge.gold { background: rgba(124, 58, 237, .16); color: var(--gold-2); }
.btn.big { padding: 13px 22px; font-size: 1.02rem; border-radius: 11px; }
.danger-text { color: var(--red) !important; }
.center-row { justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.brand-name { font-family: var(--display); font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; }
.brand-crm { margin-left: 1px; }

/* trial banner under the top bar */
.banner {
  position: sticky; top: var(--nav-h); z-index: 15;
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 16px; font-size: .88rem; color: var(--gold-2);
  background: linear-gradient(90deg, rgba(124, 58, 237, .04), rgba(124, 58, 237, .13), rgba(124, 58, 237, .04));
  border-bottom: 1px solid rgba(124, 58, 237, .22);
}

/* first-run setup card on Today */
.setup { border-color: rgba(124, 58, 237, .4); background: linear-gradient(160deg, rgba(124, 58, 237, .09), var(--surface) 55%); }
.setup-steps { margin: 8px 0 4px; padding-left: 20px; line-height: 1.6; }
.setup-steps li { margin-bottom: 6px; }
.setup a, .steps a { color: var(--gold); }

/* paywall */
.paywall { max-width: 560px; margin: 40px auto; text-align: center; padding: 38px 28px; }
.paywall h1 { margin-top: 14px; }
.pw-mark {
  display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 16px;
  background: var(--grad); color: var(--on-gold); font: 800 1.8rem var(--display); box-shadow: 0 10px 30px rgba(124, 58, 237, .28);
}

/* admin */
.admin-stats { grid-template-columns: repeat(6, 1fr); }
.admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.admin-grid .panel { margin-bottom: 0; }
.admin-grid .stack > .btn, .admin-grid .stack > .row, #a-whop .stack > .btn { justify-self: start; }
.admin-grid + .panel { margin-top: 16px; }
.table-wrap { overflow-x: auto; margin-top: 10px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 860px; }
.admin-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table tr:hover td { background: rgba(124, 58, 237, .03); }
.admin-actions { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
@media (max-width: 1100px) {
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
  .admin-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- dark mode (Settings → Theme) ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0d1f;
  --surface: #17152c;
  --surface-2: #1e1b38;
  --surface-3: #2a2650;
  --line: #2c2852;
  --line-2: #3d3870;
  --ink: #eeecff;
  --ink-2: #c6c2ea;
  --muted: #918cbb;
  --gold: #b9a2ff;
  --gold-2: #cbb8ff;
  --link: #b9a2ff;
  --red: #f87171;
  --red-bg: rgba(239, 68, 68, .15);
  --orange: #fb923c;
  --orange-bg: rgba(249, 115, 22, .15);
  --amber: #fbbf24;
  --amber-bg: rgba(245, 158, 11, .14);
  --green: #34d399;
  --green-bg: rgba(16, 185, 129, .15);
  --gray-bg: rgba(160, 150, 220, .13);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px rgba(4, 3, 18, .45);
  --glow: 0 0 0 1px rgba(139, 92, 246, .45), 0 10px 28px rgba(79, 70, 229, .3);
}
:root[data-theme="dark"] body {
  background:
    radial-gradient(900px 420px at 15% -12%, rgba(124, 58, 237, .22), transparent 65%),
    radial-gradient(800px 420px at 100% -5%, rgba(37, 99, 235, .16), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
:root[data-theme="dark"] .topbar { background: rgba(15, 13, 31, .86); }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea, :root[data-theme="dark"] .seg { background: #120f26; }
:root[data-theme="dark"] input::placeholder, :root[data-theme="dark"] textarea::placeholder { color: #6c6797; }
:root[data-theme="dark"] .notice { color: #fde68a; border-color: rgba(251, 191, 36, .3); }
:root[data-theme="dark"] .col { background: rgba(23, 21, 44, .7); }
:root[data-theme="dark"] .toast.error { background: #4c1d1d; border-color: #b91c1c; color: #fecaca; }
:root[data-theme="dark"] .earn-hero, :root[data-theme="dark"] .setup { background: linear-gradient(135deg, rgba(124, 58, 237, .18), rgba(37, 99, 235, .12)); border-color: rgba(139, 92, 246, .35); }
:root[data-theme="dark"] .ref-link code, :root[data-theme="dark"] .dialer:has(input:checked) { background: rgba(124, 58, 237, .16); }
:root[data-theme="dark"] #nav a.active { background: linear-gradient(135deg, rgba(124, 58, 237, .3), rgba(37, 99, 235, .22)); }
:root[data-theme="dark"] .drawer-backdrop, :root[data-theme="dark"] .ask-backdrop { background: rgba(3, 2, 12, .65); }
@media (max-width: 760px) {
  :root[data-theme="dark"] .topbar { background: var(--bg); }
  :root[data-theme="dark"] #nav { background: rgba(15, 13, 31, .96); }
}

/* medium screens: keep the whole top menu on one line */
@media (min-width: 761px) and (max-width: 1180px) {
  .topbar { gap: 14px; padding: 0 14px; }
  #nav { gap: 2px; min-width: 0; }
  #nav a { padding: 8px 8px; }
  #nav .nav-ico { display: none; }
  .brand-name.custom { max-width: 150px; }
}

/* admin invites */
.inv-create { display: grid; grid-template-columns: 1.3fr 1.3fr auto auto; gap: 8px; margin: 6px 0 12px; }
.inv-create select { width: auto; }
.inv-table { min-width: 560px; }
@media (max-width: 760px) { .inv-create { grid-template-columns: 1fr; } .inv-create select { width: 100%; } }

/* Pipeline: five simple stages, slim cards */
.pl-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.pl-toolbar #f-q { flex: 1 1 280px; max-width: 460px; }
.pl-toolbar #f-site { width: auto; flex: none; }
.pl-lost { margin-left: auto; font-weight: 500; font-size: .86rem; color: var(--ink-2); }
.board.simple .col { flex: 1 0 230px; max-width: 300px; }
.board.simple .col header { padding-bottom: 0; }
.board.simple .col.lost { opacity: .85; }
.col-hint { padding: 2px 13px 10px; font-size: .74rem; color: var(--muted); }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; cursor: grab; transition: border-color .15s, box-shadow .15s; }
.pcard:hover { border-color: rgba(124, 58, 237, .45); box-shadow: var(--glow); }
.pcard.dragging { opacity: .5; }
.pc-name { font-weight: 650; font-size: .9rem; line-height: 1.3; }
.pc-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; font-size: .74rem; }
.pc-tag { padding: 1px 8px; border-radius: 999px; background: var(--gray-bg); color: var(--ink-2); font-weight: 650; }
.col-more { width: 100%; padding: 8px; border: 1px dashed var(--line-2); border-radius: 10px; background: transparent; color: var(--link); font-weight: 600; cursor: pointer; }
.col-more:hover { background: var(--surface-2); }
@media (max-width: 760px) {
  .board.simple .col { flex: 0 0 82vw; max-width: none; }
  .pl-lost { margin-left: 0; }
}

/* Today: slim lead lists instead of card grids */
.today-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.list-panel { padding: 18px 18px 14px; margin-bottom: 0; }
.list-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.list-head h2 { margin: 0; }
.list-hint { margin: 0 0 8px; }
.list-sub { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 4px; }
.list-empty { color: var(--muted); margin: 10px 0 4px; }
.lead-list { display: grid; }
.lead-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 8px; border-top: 1px solid var(--line); cursor: pointer; border-radius: 10px; transition: background .12s; }
.lead-list .lead-row:first-child { border-top-color: transparent; }
.lead-row:hover, .lead-row:focus-visible { background: var(--surface-2); outline: none; }
.lr-main { min-width: 0; }
.lr-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-sub { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-side { display: flex; align-items: center; gap: 8px; flex: none; font-size: .8rem; }
.lr-call { padding: 5px 9px; font-size: .9rem; }
.list-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.list-more { display: inline-block; margin-top: 8px; font-size: .82rem; color: var(--link); text-decoration: none; }
@media (max-width: 900px) { .today-grid { grid-template-columns: 1fr; } }

/* results */
:root { --chart: #7c3aed; --chart-hover: #5b21b6; }
:root[data-theme="dark"] { --chart: #a78bfa; --chart-hover: #c4b5fd; }
.range-seg { flex-wrap: wrap; margin-bottom: 16px; }
.results-stats { grid-template-columns: repeat(5, 1fr); }
.delta { display: block; margin-top: 6px; font-size: .78rem; font-weight: 600; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.delta.flat { color: var(--muted); font-weight: 500; }
.delta .muted { font-weight: 500; }
.results-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.results-grid .panel { margin-bottom: 0; }
.funnel { display: grid; gap: 10px; margin-top: 6px; }
.f-row { display: grid; grid-template-columns: 130px 1fr 150px; gap: 12px; align-items: center; font-size: .9rem; }
.f-label { color: var(--ink-2); font-weight: 600; }
.f-track { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.f-bar { height: 100%; background: var(--chart); border-radius: 0 4px 4px 0; }
.f-num { display: flex; flex-direction: column; line-height: 1.25; }
.f-num .muted { font-size: .76rem; }
.funnel-sum { margin-top: 14px; }
.outcome-bars { display: grid; gap: 9px; }
.o-row { display: grid; grid-template-columns: 130px 1fr 40px; gap: 10px; align-items: center; font-size: .88rem; color: var(--ink-2); }
.o-row b { text-align: right; color: var(--ink); }
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .bar-mark { fill: var(--chart); }
.chart .bar-g { cursor: pointer; }
.chart .bar-g.active .bar-mark { fill: var(--chart-hover); }
.chart-tip { position: absolute; top: 0; width: 110px; padding: 7px 10px; border-radius: 9px; background: var(--ink); color: var(--bg); font-size: .8rem; line-height: 1.35; pointer-events: none; box-shadow: var(--shadow); text-align: center; }
.table-view { margin-top: 10px; font-size: .85rem; }
.admin-table.mini { min-width: 0; max-width: 320px; }
@media (max-width: 1100px) { .results-stats { grid-template-columns: repeat(3, 1fr); } .results-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .results-stats { grid-template-columns: 1fr 1fr; }
  .f-row { grid-template-columns: 100px 1fr 96px; gap: 8px; }
  .o-row { grid-template-columns: 110px 1fr 34px; }
}

/* daily goal + reminder settings */
.goal { padding: 14px 18px; margin-bottom: 14px; }
.goal-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.goal-bar { height: 10px; }
.goal .hint { margin: 8px 0 0; }
.remind-grid { max-width: 560px; }

/* branding + theme controls */
label.grow { flex: 1 1 260px; margin: 0; }
#brand-form { align-items: flex-end; margin-bottom: 6px; }
.brand-name.custom { max-width: 240px; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.theme-seg { margin-bottom: 0; }
/* =================== Mockup redesign (Nov 2026): line icons, icon tiles, softer cards =================== */
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ic-sm { width: 14px; height: 14px; vertical-align: -2px; }
.btn .ic { margin-right: 2px; }
.ic-tile { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: #f1ecfe; color: var(--violet); }
.ic-tile.blue { background: #e9f0ff; color: var(--blue); }
.ic-tile .ic { width: 20px; height: 20px; }
:root[data-theme="dark"] .ic-tile { background: rgba(139, 92, 246, .18); color: #c4b5fd; }
:root[data-theme="dark"] .ic-tile.blue { background: rgba(59, 130, 246, .18); color: #93c5fd; }
.nav-ico .ic { width: 17px; height: 17px; }
#nav a { gap: 7px; }
.stars { display: inline-flex; gap: 1px; }
.stars .ic { width: 15px; height: 15px; stroke: none; fill: #f59e0b; }
.stars .ic.off { fill: var(--line-2); }

/* Today */
/* Other tabs: a soft Higgsfield-made background per tab that slowly drifts and breathes.
   Light images sit on white (multiplied onto the page color); dark ones share the dark page color. */
body[data-route]::before {
  content: ""; position: fixed; inset: -6%; z-index: -1; pointer-events: none;
  background: center / cover no-repeat; opacity: 0; transition: opacity .6s ease;
  animation: tabBgDrift 32s ease-in-out infinite alternate; will-change: transform;
}
body[data-route="pipeline"]::before, body[data-route="admin"]::before { background-image: url('/img/bg/light-1.jpg'); }
body[data-route="call"]::before, body[data-route="earn"]::before { background-image: url('/img/bg/light-2.jpg'); }
body[data-route="find"]::before, body[data-route="help"]::before { background-image: url('/img/bg/light-3.jpg'); }
body[data-route="results"]::before, body[data-route="settings"]::before { background-image: url('/img/bg/light-4.jpg'); }
body:is([data-route="pipeline"], [data-route="admin"], [data-route="call"], [data-route="earn"], [data-route="find"], [data-route="help"], [data-route="results"], [data-route="settings"])::before { opacity: 1; mix-blend-mode: multiply; }
:root[data-theme="dark"] body[data-route="pipeline"]::before, :root[data-theme="dark"] body[data-route="admin"]::before { background-image: url('/img/bg/dark-1.jpg'); }
:root[data-theme="dark"] body[data-route="call"]::before, :root[data-theme="dark"] body[data-route="earn"]::before { background-image: url('/img/bg/dark-2.jpg'); }
:root[data-theme="dark"] body[data-route="find"]::before, :root[data-theme="dark"] body[data-route="help"]::before { background-image: url('/img/bg/dark-3.jpg'); }
:root[data-theme="dark"] body[data-route="results"]::before, :root[data-theme="dark"] body[data-route="settings"]::before { background-image: url('/img/bg/dark-4.jpg'); }
:root[data-theme="dark"] body[data-route]::before { mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] body[data-route="pipeline"]::before, :root[data-theme="auto"] body[data-route="admin"]::before { background-image: url('/img/bg/dark-1.jpg'); }
  :root[data-theme="auto"] body[data-route="call"]::before, :root[data-theme="auto"] body[data-route="earn"]::before { background-image: url('/img/bg/dark-2.jpg'); }
  :root[data-theme="auto"] body[data-route="find"]::before, :root[data-theme="auto"] body[data-route="help"]::before { background-image: url('/img/bg/dark-3.jpg'); }
  :root[data-theme="auto"] body[data-route="results"]::before, :root[data-theme="auto"] body[data-route="settings"]::before { background-image: url('/img/bg/dark-4.jpg'); }
  :root[data-theme="auto"] body[data-route]::before { mix-blend-mode: normal; }
}
@keyframes tabBgDrift {
  0% { transform: scale(1.02) translate3d(0, 0, 0); }
  50% { transform: scale(1.08) translate3d(-1.8%, 1.2%, 0); }
  100% { transform: scale(1.05) translate3d(1.5%, -1.5%, 0); }
}
@media (prefers-reduced-motion: reduce) { body[data-route]::before { animation: none; } }

/* Today: flowing purple waves behind the top of the page (full width, behind the content) */
.app-waves {
  position: absolute; left: 0; right: 0; top: 0; height: 430px; z-index: 0; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent); mask-image: linear-gradient(to bottom, #000 62%, transparent);
  animation: wavesIn 1.2s ease both;
}
#view > *:not(.app-waves) { position: relative; z-index: 1; }
.aw { position: absolute; left: 0; bottom: 20px; width: 200%; height: 380px; animation: waveDriftApp linear infinite; will-change: transform;
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 95%); mask-image: linear-gradient(to bottom, #000 35%, transparent 95%); }
.aw.w1 { opacity: .30; animation-duration: 26s; }
.aw.w2 { opacity: .24; animation-duration: 38s; animation-delay: -12s; }
.aw.w3 { opacity: .32; animation-duration: 19s; animation-delay: -6s; }
:root[data-theme="dark"] .aw.w1 { opacity: .45; }
:root[data-theme="dark"] .aw.w2 { opacity: .38; }
:root[data-theme="dark"] .aw.w3 { opacity: .48; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .aw.w1 { opacity: .45; } :root[data-theme="auto"] .aw.w2 { opacity: .38; } :root[data-theme="auto"] .aw.w3 { opacity: .48; } }
@keyframes waveDriftApp { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes wavesIn { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 760px) { .app-waves { height: 360px; } .aw { height: 260px; bottom: 20px; } .aw.w1 { animation-duration: 20s; } .aw.w2 { animation-duration: 28s; } .aw.w3 { animation-duration: 15s; } }
@media (prefers-reduced-motion: reduce) { .aw, .app-waves { animation: none; } }

.today-head { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; margin-bottom: 18px; }
.today-head h1 { margin: 0; font-size: 2.3rem; }
.head-date { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.head-actions { display: flex; gap: 8px; align-items: center; }
.head-results { display: none; }
.goal-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow); max-width: 640px; justify-self: center; width: 100%; }
.goal-ic { width: 26px; height: 26px; color: var(--violet); }
.goal-text { display: flex; flex-direction: column; line-height: 1.3; }
.goal-text .muted { font-size: .8rem; }
.goal-meter { flex: 1; min-width: 140px; }
.goal-num { text-align: right; font-size: .85rem; margin-bottom: 6px; }
.goal-bar { height: 10px; }
.stats.stats4 { grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat.stat2 { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; }
.stat.stat2::before { display: none; }
.stat2 .ic-tile { width: 52px; height: 52px; border-radius: 14px; }
.stat2 .ic-tile .ic { width: 24px; height: 24px; }
.stat2 .stat-l { margin: 0 0 2px; font-size: .84rem; }
.stat2 .stat-n { margin: 0; font-size: 2rem; }
.stat2 .stat-n small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.stat.money.stat2 { text-align: left; }
.list-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.list-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.list-sub2 { font-size: .8rem; margin-top: 2px; }
.list-link { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--link); font-weight: 700; font-size: .85rem; text-decoration: none; white-space: nowrap; }
.lead-row { gap: 14px; padding: 12px 8px; }
.lead-row .ic-tile { width: 42px; height: 42px; }
.lead-row .lr-main { flex: 1; }
.lr-sub { display: flex; align-items: center; gap: 4px; }
.lr-rating { margin-left: 8px; }
.lr-call { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; background: #f1ecfe; border-color: transparent; color: var(--violet); }
.lr-call:hover { background: var(--violet); color: #fff; }
:root[data-theme="dark"] .lr-call { background: rgba(139, 92, 246, .18); color: #c4b5fd; }
.lead-row .badge.red { padding: 4px 12px; }

/* Call Mode */
.callmode { max-width: 600px; }
.cm-progress { gap: 12px; background: var(--surface-2); padding: 10px 16px; border-radius: 14px; font-weight: 700; color: var(--ink); }
.cm-bar { flex: 1; height: 8px; }
.cm-card { padding: 22px; border-radius: 20px; }
.cm-name { font-size: 1.9rem; letter-spacing: -.02em; }
.cm-rating { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; }
.call-btn { display: flex; gap: 10px; font-size: 1.25rem; padding: 18px; border-radius: 16px; }
.call-btn .ic { width: 22px; height: 22px; }
.cm-pitch { background: #f6f2ff; border-radius: 16px; padding: 16px 18px; margin-top: 14px; }
:root[data-theme="dark"] .cm-pitch { background: rgba(124, 58, 237, .12); }
.cm-pitch h3 { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 1.05rem; font-family: var(--display); font-weight: 800; margin: 0 0 8px; }
.cm-pitch h3 .ic { color: var(--violet); width: 22px; height: 22px; }
.cm-pitch ul { padding-left: 22px; }
.cm-pitch li::marker { color: var(--violet); }
/* rotating call script */
.cs-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cs-head h3 { margin: 0; }
.cs-head .pill { font-size: .72rem; }
.cs-next { margin-left: auto; font-weight: 700; }
.cs-name { font-size: .82rem; color: var(--muted); margin: 6px 0 10px; }
.cs-goal { margin: 0 0 12px; padding: 9px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); line-height: 1.5; }
.cm-pitch ol.cs-steps { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; counter-reset: cs; }
.cs-steps li { counter-increment: cs; display: grid; gap: 2px; padding-left: 30px; position: relative; }
.cs-steps li::before { content: counter(cs); position: absolute; left: 0; top: 1px; width: 21px; height: 21px; border-radius: 50%; background: var(--grad); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.cs-label { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--violet); }
.cs-line { color: var(--ink); line-height: 1.55; font-size: 1rem; }
.cs-custom { white-space: pre-wrap; color: var(--ink); line-height: 1.6; margin-bottom: 12px; }
.cs-more { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.cs-more summary { cursor: pointer; font-weight: 700; color: var(--ink-2); font-size: .9rem; }
.cs-more ul { margin-top: 8px; }
.cs-obj { list-style: none; padding-left: 0 !important; }
.cs-obj li { display: grid; gap: 2px; }
.cs-obj li span { color: var(--ink-2); }
.cs-tip { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: .86rem; color: var(--ink-2); }
.cs-tip .ic { color: var(--violet); flex: none; margin-top: 2px; }
.notice.small, .muted.small { font-size: .82rem; }
#scripts-panel .hint code { white-space: nowrap; }
.my-script { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; display: grid; gap: 8px; }
.my-script textarea { width: 100%; font: inherit; }
.cm-site { display: inline-flex; align-items: center; gap: 6px; }
.cm-last { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cm-note-wrap { position: relative; margin-top: 14px; }
.cm-note-ic { position: absolute; left: 14px; top: 13px; color: var(--muted); }
.cm-note-wrap textarea { padding-left: 42px; border-radius: 14px; }
.cm-fu { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; color: var(--ink); }
.cm-fu span { font-weight: 700; }
.outcomes { gap: 10px; }
.outcome { display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 15px 16px; border-radius: 14px; background: #f3eefe; border-color: transparent; color: var(--ink); font-weight: 700; text-align: left; }
.outcome .ic { width: 22px; height: 22px; color: var(--violet); }
.outcome:hover { background: #e9e0fd; }
.o-interested, .o-meeting-scheduled, .o-closed-won { background: #e4f7ee; color: #065f46; }
.o-interested .ic, .o-meeting-scheduled .ic, .o-closed-won .ic { color: #059669; }
.o-interested:hover, .o-meeting-scheduled:hover, .o-closed-won:hover { background: #d3f1e3; }
.o-not-interested { background: #fdeaea; color: #991b1b; grid-column: 1 / -1; }
.o-not-interested .ic { color: #dc2626; }
.o-not-interested:hover { background: #fbdcdc; }
:root[data-theme="dark"] .outcome { background: rgba(139, 92, 246, .14); color: var(--ink); }
:root[data-theme="dark"] .o-interested, :root[data-theme="dark"] .o-meeting-scheduled, :root[data-theme="dark"] .o-closed-won { background: rgba(16, 185, 129, .15); color: #a7f3d0; }
:root[data-theme="dark"] .o-not-interested { background: rgba(239, 68, 68, .15); color: #fecaca; }

/* Pipeline */
.search-wrap { position: relative; flex: 1 1 300px; max-width: 480px; }
.search-wrap input { padding-left: 40px; border-radius: 999px; }
.search-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.pl-toolbar #f-site { border-radius: 999px; }
.board.simple .col { border-top: 4px solid var(--stage, var(--violet)); border-radius: 14px; background: #f6f5fd; }
:root[data-theme="dark"] .board.simple .col { background: rgba(23, 21, 44, .7); }
.col.stage-0 { --stage: #7c3aed; } .col.stage-1 { --stage: #6d4af0; } .col.stage-2 { --stage: #5458f0; }
.col.stage-3 { --stage: #3f64ee; } .col.stage-4 { --stage: #2563eb; } .col.stage-5 { --stage: #a3a0c2; }
.board.simple .col header { font-size: 1.02rem; color: var(--ink); font-family: var(--display); font-weight: 800; }
.board.simple .col header .count { background: color-mix(in srgb, var(--stage) 14%, transparent); color: var(--stage); font-family: Inter, sans-serif; }
.pcard { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; box-shadow: 0 1px 2px rgba(22, 19, 58, .05); }
.pcard .ic-tile { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.pcard .ic-tile .ic { width: 17px; height: 17px; }
.pc-body { min-width: 0; }
.chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-weight: 650; font-size: .72rem; }
.chip.gray { background: var(--gray-bg); color: var(--ink-2); }
.chip.blue { background: #e7efff; color: #1d4ed8; }
.chip.green { background: #e1f6ec; color: #047857; }
.chip.violet { background: #efe8ff; color: #6d28d9; }
.chip.red { background: #fdeaea; color: #b91c1c; }
:root[data-theme="dark"] .chip.blue { background: rgba(59, 130, 246, .18); color: #93c5fd; }
:root[data-theme="dark"] .chip.green { background: rgba(16, 185, 129, .16); color: #6ee7b7; }
:root[data-theme="dark"] .chip.violet { background: rgba(139, 92, 246, .2); color: #c4b5fd; }
:root[data-theme="dark"] .chip.red { background: rgba(239, 68, 68, .16); color: #fca5a5; }
.pc-meta .fu { display: inline-flex; align-items: center; gap: 3px; }

/* Lead details panel */
.dp-head { align-items: center; gap: 14px; }
.dp-logo { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 16px; background: var(--grad); color: #fff; }
.dp-logo .ic { width: 26px; height: 26px; }
.dp-title { flex: 1; min-width: 0; }
.dp-title h2 { font-size: 1.5rem; margin: 0; }
.dp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dp-actions .btn { justify-content: center; padding: 11px; }
.drawer section h3 { color: var(--ink); text-transform: none; letter-spacing: 0; font: 800 1.05rem var(--display); gap: 10px; }
.drawer section h3 .ic-tile { width: 32px; height: 32px; border-radius: 10px; }
.drawer section h3 .ic-tile .ic { width: 16px; height: 16px; }
.drawer section { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-top: 12px; }
.drawer section.danger-zone { background: transparent; border-style: dashed; }
.score-big { border-radius: 16px; }

/* Find */
.auto-panel { padding: 0; overflow: hidden; }
.auto-banner { display: flex; align-items: center; gap: 16px; padding: 22px 24px; background: var(--grad); color: #fff; position: relative; overflow: hidden; }
.auto-banner::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, .08); }
.auto-banner h2 { color: #fff; margin: 0 0 2px; font: 800 1.5rem var(--display); }
.auto-banner p { margin: 0; color: rgba(255, 255, 255, .88); font-size: .92rem; }
.auto-ic { width: 44px; height: 44px; stroke-width: 1.8; flex: none; }
.auto-body { padding: 20px 24px 22px; }
.fl { display: inline-flex; align-items: center; gap: 5px; }
.filters { background: var(--surface-2); border-radius: 14px; padding: 14px 16px; gap: 10px; }
#auto-status:not(:empty) { background: #f6f2ff; border-radius: 14px; padding: 14px 16px; }
:root[data-theme="dark"] #auto-status:not(:empty) { background: rgba(124, 58, 237, .1); }
.card-title { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.card-title h2 { margin: 0; }

/* Results */
.results-head { flex-wrap: wrap; }
.results-head .range-seg { margin: 0; }
.results-stats .stat2 .stat-n { font-size: 1.75rem; }
.results-stats .stat2 .ic-tile { width: 46px; height: 46px; }
.delta { margin-top: 2px; }

@media (max-width: 1100px) {
  .today-head { grid-template-columns: 1fr auto; }
  .goal-card { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; max-width: none; }
  .stats.stats4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .today-head { grid-template-columns: 1fr; gap: 12px; }
  .today-head h1 { font-size: 1.9rem; }
  .goal-card { grid-row: auto; }
  .head-actions { justify-content: stretch; }
  .head-actions .btn { flex: 1; }
  .head-results { display: inline-flex; }
  .stats.stats4 { gap: 10px; }
  .stat.stat2 { padding: 14px; gap: 10px; }
  .stat2 .ic-tile { width: 40px; height: 40px; }
  .stat2 .stat-n { font-size: 1.5rem; }
  .lead-row .ic-tile { display: none; }
  .dp-actions { grid-template-columns: 1fr; }
  .auto-banner { padding: 18px; }
  .auto-body { padding: 16px; }
}

/* =================== Subtle animations =================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes slideIn { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.anim-in { animation: fadeUp .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
.view-anim .grow-x, .view-anim .f-bar { transform-origin: left; animation: growX .9s cubic-bezier(.2, .7, .2, 1) both .15s; }
.view-anim .chart .bar-mark { transform-box: fill-box; transform-origin: bottom; animation: growY .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--d, 0) * 18ms + 150ms); }
.drawer:not(.hidden) .drawer-panel { animation: slideIn .32s cubic-bezier(.2, .7, .2, 1) both; }
.drawer:not(.hidden) .drawer-backdrop { animation: fadeIn .25s ease both; }
.ask-box { animation: popIn .2s ease both; }
.card, .pcard, .stat, .lead-row, .outcome, .btn, .lr-call, .goal-card, .step4 { transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease; }
a.stat:hover, .stat.money:hover { transform: translateY(-2px); }
.pcard:hover { transform: translateY(-1px); }
.outcome:hover { transform: translateY(-1px); }
.btn.primary:hover { transform: translateY(-1px); }
.btn:active, .outcome:active { transform: translateY(1px) scale(.99); }
.lr-call:hover { transform: scale(1.06); }
.nav-ico .ic { transition: transform .2s ease; }
#nav a:hover .nav-ico .ic { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}