/* Nexus Sales — design system v2. One file, no build step. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); }
:root {
  --navy: #0f1530; --navy-2: #1a2147; --navy-3: #262f62;
  --brand: #e94560; --brand-ink: #c42b47; --brand-soft: #fdecef;
  --brand-2: #7b5cff; --brand-grad: linear-gradient(135deg, #ff6a83 0%, #e94560 42%, #a243c9 100%);
  --hero-grad: radial-gradient(1200px 380px at 0% 0%, rgba(233,69,96,.55), transparent 60%), radial-gradient(900px 420px at 100% 0%, rgba(123,92,255,.55), transparent 55%), linear-gradient(135deg, #10163a 0%, #1b2154 55%, #26205a 100%);
  --bg: #f4f5fb; --paper: #ffffff; --paper-2: #f8f9fd; --paper-3: #eef0f8;
  --ink: #141a33; --ink-2: #3a4363; --muted: #69718f; --faint: #9ca3bb;
  --line: #e2e5f0; --line-2: #edeff6;
  --blue: #2563c9; --blue-soft: #e8f0fd;
  --green: #138a5b; --green-soft: #e1f5eb;
  --amber: #b26a00; --amber-soft: #fff3dc;
  --red: #c62f3d; --red-soft: #fde9eb;
  --violet: #6a4bc4; --violet-soft: #efeafb;
  --teal: #0e8a8a; --teal-soft: #dff5f4;
  --radius: 14px; --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20,28,60,.05), 0 2px 8px rgba(20,28,60,.05);
  --shadow-md: 0 4px 14px rgba(20,28,60,.08), 0 1px 3px rgba(20,28,60,.06);
  --shadow-lg: 0 18px 50px rgba(20,28,60,.20);
  --sidebar: 244px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1022; --paper: #131a30; --paper-2: #182039; --paper-3: #1e2744; --ink: #e8ebf5; --ink-2: #c4c9dc; --muted: #929ab5;
    --faint: #6b7391; --line: #262f4b; --line-2: #1f2842; --blue-soft: #1a2a4b; --green-soft: #12312a; --teal-soft: #11302f;
    --amber-soft: #382b12; --red-soft: #3a1b22; --violet-soft: #29224a; --brand-soft: #3a1924;
    --blue: #6aa2f0; --green: #3cc48d; --amber: #f0a92e; --red: #f06d7a; --violet: #a68cf5; --teal: #3cc6c4;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 6px 18px rgba(0,0,0,.35); --shadow-lg: 0 18px 50px rgba(0,0,0,.55); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1022; --paper: #131a30; --paper-2: #182039; --paper-3: #1e2744; --ink: #e8ebf5; --ink-2: #c4c9dc; --muted: #929ab5;
  --faint: #6b7391; --line: #262f4b; --line-2: #1f2842; --blue-soft: #1a2a4b; --green-soft: #12312a; --teal-soft: #11302f;
  --amber-soft: #382b12; --red-soft: #3a1b22; --violet-soft: #29224a; --brand-soft: #3a1924;
  --blue: #6aa2f0; --green: #3cc48d; --amber: #f0a92e; --red: #f06d7a; --violet: #a68cf5; --teal: #3cc6c4;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 6px 18px rgba(0,0,0,.35); --shadow-lg: 0 18px 50px rgba(0,0,0,.55); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14.5px/1.5 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.015em; }
h1 { font-size: 24px; font-weight: 750; }
h2 { font-size: 15.5px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; }
p { margin: 0 0 10px; }
[x-cloak] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: color-mix(in srgb, var(--brand) 25%, transparent); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: radial-gradient(420px 260px at 0% 0%, rgba(233,69,96,.22), transparent 70%), radial-gradient(360px 300px at 100% 100%, rgba(123,92,255,.22), transparent 70%), linear-gradient(180deg, #10163a 0%, #0c1130 100%); color: #c3cae4; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2a335f transparent; }
.sidebar .brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 14px; color: #fff; font-weight: 800; font-size: 18.5px; letter-spacing: -.02em; }
.sidebar .brand:hover { text-decoration: none; }
.sidebar .brand img { width: 32px; height: 32px; filter: drop-shadow(0 4px 12px rgba(233,69,96,.45)); }
.sidebar .brand span b { background: linear-gradient(90deg, #ff7d93, #c18bff); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.nav-group { padding: 4px 12px; }
.nav-group .label { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #6f7aa3; padding: 14px 10px 6px; font-weight: 700; }
.nav-link { position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 11px; border-radius: 10px; color: #c3cae4; font-weight: 520; font-size: 14px; transition: background .15s, color .15s; }
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav-link.active { background: linear-gradient(90deg, rgba(233,69,96,.22), rgba(123,92,255,.14)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.nav-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-grad); }
.nav-link svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav-link.active svg { color: #ff8da0; }
.nav-link .count { margin-left: auto; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 0 7px; box-shadow: 0 0 0 3px rgba(233,69,96,.18); }
.sidebar .me { margin: auto 12px 12px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); display: flex; gap: 10px; align-items: center; font-size: 13px; }
.sidebar .me a { color: #aab3d6; }
.sidebar .role-pill { display: inline-block; margin: 0 20px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #ffd0d8; background: rgba(233,69,96,.16); border: 1px solid rgba(233,69,96,.3); padding: 2px 9px; border-radius: 20px; align-self: flex-start; }
.sidebar .role-pill.partner-pill { text-transform: none; letter-spacing: 0; font-size: 12px; color: #c9f3ec; background: rgba(45,212,191,.14); border-color: rgba(45,212,191,.35); max-width: calc(100% - 40px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 11px 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.topbar .search { flex: 1; max-width: 540px; display: flex; align-items: center; gap: 9px; background: var(--paper); border: 1px solid var(--line); border-radius: 11px; padding: 8px 13px; color: var(--muted); cursor: text; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.topbar .search:hover { border-color: color-mix(in srgb, var(--brand-2) 40%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-2) 10%, transparent); }
.topbar .search kbd { margin-left: auto; }
.topbar .menu-btn { display: none; }
.topbar .spacer { flex: 1; }
.content { padding: 26px 28px 70px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
kbd { font: 11px var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--muted); background: var(--paper-2); }

/* ---------- hero band (dashboards) ---------- */
.hero { position: relative; overflow: hidden; border-radius: 20px; background: var(--hero-grad); color: #fff; padding: 26px 28px; margin-bottom: 20px; box-shadow: 0 20px 50px -20px rgba(40,30,110,.55); isolation: isolate; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, rgba(0,0,0,.8), transparent 85%); -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.8), transparent 85%); }
.hero h1 { font-size: 27px; font-weight: 780; letter-spacing: -.025em; }
.hero .sub { color: #c9cdf0; margin-top: 4px; }
.hero a:not(.btn) { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.4); }
.hero .hero-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.hero .btn { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.1); color: #fff; backdrop-filter: blur(6px); box-shadow: none; }
.hero .btn:hover { background: rgba(255,255,255,.18); }
.hero .btn-primary { background: #fff; color: #1b2154; border-color: #fff; }
.hero .btn-primary:hover { background: #f1f0ff; filter: none; }
.hero-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.hero-kpi { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.13); border-radius: 14px; padding: 14px 16px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; gap: 14px; align-items: center; min-width: 0; }
.hero-kpi > div { min-width: 0; }
.hero-kpi .k { font-size: 12.5px; color: #c9cdf0; font-weight: 550; }
.hero-kpi .v { font-size: 26px; font-weight: 780; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.hero-kpi .v small { font-size: 14px; font-weight: 600; color: #b7bce6; }
.hero-kpi .d { font-size: 12px; color: #b7bce6; }
.hero-kpi .ring-wrap { flex: none; }
.ring { --p: 0; --c: #ff7d93; width: 54px; height: 54px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255,255,255,.14) 0); display: grid; place-items: center; position: relative; flex: none; }
.ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #1b2154; }
.ring span { position: relative; font-size: 12px; font-weight: 750; color: #fff; }
.ring.done { --c: #3ddc97; }
.ring.light { --c: var(--brand); background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line-2) 0); }
.ring.light::before { background: var(--paper); }
.ring.light span { color: var(--ink); }
.ring.light.done { --c: var(--green); }
.ring.lg { width: 92px; height: 92px; }
.ring.lg::before { inset: 9px; }
.ring.lg span { font-size: 18px; }

/* ---------- surfaces ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.lift { transition: transform .18s ease, box-shadow .18s ease; }
.card.lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h2 { display: flex; align-items: center; gap: 9px; }
.hi { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.hi svg { width: 15px; height: 15px; }
.hi.blue { background: var(--blue-soft); color: var(--blue); } .hi.green { background: var(--green-soft); color: var(--green); }
.hi.violet { background: var(--violet-soft); color: var(--violet); } .hi.amber { background: var(--amber-soft); color: var(--amber); }
.hi.teal { background: var(--teal-soft); color: var(--teal); } .hi.red { background: var(--red-soft); color: var(--red); }
.card-head .meta { color: var(--muted); font-size: 13px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.split-wide { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.split-3 { display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.stack > * + * { margin-top: 18px; }
.mb { margin-bottom: 18px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 600; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--line-2); margin: 12px 0; }
.empty { text-align: center; color: var(--muted); padding: 30px 18px; }
.empty .big { font-size: 15px; color: var(--ink-2); font-weight: 650; margin-bottom: 4px; }
.empty .art { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-soft), var(--violet-soft)); color: var(--brand); }
.empty .art svg { width: 26px; height: 26px; }

/* ---------- stats ---------- */
.stat { padding: 16px 18px; position: relative; overflow: hidden; }
.stat .k { color: var(--muted); font-size: 12.5px; font-weight: 550; display: flex; align-items: center; gap: 8px; }
.stat .v { font-size: 26px; font-weight: 760; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat .v small { font-size: 14px; font-weight: 600; color: var(--muted); }
.stat .d { font-size: 12px; color: var(--muted); margin-top: 3px; }
.stat .spark { position: absolute; right: 14px; top: 14px; width: 92px; height: 30px; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 20px; background: var(--line-2); color: var(--ink-2); }
.delta.up { background: var(--green-soft); color: var(--green); }
.delta.down { background: var(--red-soft); color: var(--red); }
.meter { height: 7px; background: var(--line-2); border-radius: 6px; overflow: hidden; margin-top: 9px; }
.meter > i { display: block; height: 100%; background: var(--brand-grad); border-radius: 6px; }
.meter.green > i { background: linear-gradient(90deg, #26b37a, #138a5b); }
.meter.blue > i { background: linear-gradient(90deg, #5c9bf0, #2563c9); }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 600 13.5px var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .08s, filter .15s; box-shadow: 0 1px 1px rgba(20,28,60,.04); }
.btn:hover { background: var(--paper-2); text-decoration: none; border-color: color-mix(in srgb, var(--ink) 18%, var(--line)); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 35%, transparent); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -6px rgba(233,69,96,.6); }
.btn-primary:hover { background: var(--brand-grad); filter: brightness(1.07); border-color: transparent; }
.btn-dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); border-color: var(--navy-2); }
.btn-danger { color: var(--red); }
.btn-success { background: linear-gradient(135deg, #22b07a, #128553); color: #fff; border-color: transparent; }
.btn-success:hover { filter: brightness(1.06); background: linear-gradient(135deg, #22b07a, #128553); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--paper-3); border-color: transparent; }
.btn-icon { width: 36px; padding: 0; }
.btn svg { width: 16px; height: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; }
.field > label, .label-text { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url],
input[type=date], input[type=time], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; font: 14px var(--font); color: var(--ink); background: var(--paper); border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 11px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: color-mix(in srgb, var(--brand-2) 70%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-2) 14%, transparent); }
textarea { min-height: 90px; resize: vertical; line-height: 1.45; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 16px; height: 16px; }
input[type=range] { accent-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.errors { background: var(--red-soft); color: var(--red); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 13.5px; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 650; padding: 2px 9px; border-radius: 20px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.teal { background: var(--teal-soft); color: var(--teal); }
.badge.brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge.live { background: var(--red); color: #fff; }
.badge.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
.badge.brand-callradius { background: var(--blue-soft); color: var(--blue); }
.badge.brand-clickradius { background: var(--teal-soft); color: var(--teal); }
.badge.brand-both { background: var(--violet-soft); color: var(--violet); }
/* Which company a booking page / meeting is for (CallRadius, ClickRadius or both). Text only: no unapproved logos. */
.brandmark { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-bottom: 14px; font-size: 18px; letter-spacing: -.01em; color: var(--blue); }
.brandmark b { font-weight: 800; }
.brandmark i { font-style: normal; color: var(--faint); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--faint); flex: none; }
.dot.green { background: var(--green); } .dot.amber { background: var(--amber); } .dot.red { background: var(--red); } .dot.blue { background: var(--blue); }
.dot.live { background: #22c55e; animation: ping 1.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 80%, 100% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } }
@keyframes pulse { 50% { opacity: .35; } }
.avatar { --h: 262; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, hsl(var(--h) 78% 64%), hsl(calc(var(--h) + 40) 68% 50%)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 750; flex: none; letter-spacing: .01em; text-shadow: 0 1px 1px rgba(0,0,0,.15); }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.lg { width: 48px; height: 48px; font-size: 17px; }
.avatar.xl { width: 72px; height: 72px; font-size: 24px; }
.avatars { display: inline-flex; }
.avatars .avatar { box-shadow: 0 0 0 2px var(--paper); }
.avatars .avatar + .avatar { margin-left: -8px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--paper-2); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--paper-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.good { color: var(--green); font-weight: 650; } .table td.warn { color: var(--amber); font-weight: 650; } .table td.bad { color: var(--red); font-weight: 650; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 20px; border-bottom: 1px solid var(--line-2); transition: background .12s; }
.list > li:hover { background: var(--paper-2); }
.list > li:last-child { border-bottom: none; }
.list .grow { flex: 1; min-width: 0; }
.kind-icon { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--line-2); color: var(--ink-2); }
.kind-icon svg { width: 16px; height: 16px; }
.kind-icon.call { background: var(--green-soft); color: var(--green); }
.kind-icon.email { background: var(--blue-soft); color: var(--blue); }
.kind-icon.meeting { background: var(--violet-soft); color: var(--violet); }
.kind-icon.task { background: var(--amber-soft); color: var(--amber); }
.kind-icon.alert { background: var(--red-soft); color: var(--red); }
.kind-icon.teal { background: var(--teal-soft); color: var(--teal); }
.kind-icon.brand { background: var(--brand-soft); color: var(--brand); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 14px; border: none; background: none; font: 600 13.5px var(--font); color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs a.active, .tabs button.active { color: var(--ink); border-bottom-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.seg { display: inline-flex; background: var(--paper-3); border-radius: 10px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg a, .seg button { flex: none; }
.seg a, .seg button { border: none; background: none; padding: 5px 12px; border-radius: 8px; font: 600 12.5px var(--font); color: var(--muted); cursor: pointer; }
.seg a:hover { text-decoration: none; color: var(--ink); }
.seg .active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.hero .seg { background: rgba(255,255,255,.1); }
.hero .seg a, .hero .seg button { color: #c9cdf0; }
.hero .seg .active { background: #fff; color: #1b2154; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters select, .filters input { width: auto; min-width: 140px; height: 36px; padding: 5px 10px; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0 20px; }
.timeline li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.timeline li:last-child { border-bottom: none; }
.timeline .when { color: var(--muted); font-size: 12px; }
.timeline .body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); margin-top: 3px; }

/* ---------- live activity feed ---------- */
.feed { list-style: none; margin: 0; padding: 8px 20px 12px; }
.feed li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 11px; align-items: start; padding: 8px 0; font-size: 13px; position: relative; }
.feed li::before { content: ""; position: absolute; left: 14px; top: 40px; bottom: -8px; width: 2px; background: var(--line-2); }
.feed li:last-child::before { display: none; }
.feed .when { color: var(--faint); font-size: 11.5px; white-space: nowrap; }
.feed .kind-icon { width: 30px; height: 30px; border-radius: 50%; }

/* ---------- leaderboard / podium ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; padding: 18px 20px 6px; }
.podium .p { text-align: center; min-width: 0; }
.podium .p .avatar { margin: 0 auto 6px; }
.podium .p .name { font-weight: 650; font-size: 13px; }
.podium .p .amt { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.podium .block { margin-top: 8px; border-radius: 12px 12px 4px 4px; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff; }
.podium .p1 .block { height: 86px; background: linear-gradient(180deg, #f7b733, #e08a00); box-shadow: 0 10px 24px -10px rgba(224,138,0,.7); }
.podium .p2 .block { height: 62px; background: linear-gradient(180deg, #a9b3c9, #7d879f); }
.podium .p3 .block { height: 46px; background: linear-gradient(180deg, #d79a6a, #a86a3d); }
.rank { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 750; background: var(--paper-3); color: var(--ink-2); flex: none; }

/* ---------- heatmap (activity by day) ---------- */
.heat { display: grid; gap: 3px; font-size: 10.5px; color: var(--muted); }
.heat .cell { aspect-ratio: 1; border-radius: 4px; background: var(--paper-3); min-width: 0; }
.heat .cell[data-l="1"] { background: var(--seq-250); } .heat .cell[data-l="2"] { background: var(--seq-350); }
.heat .cell[data-l="3"] { background: var(--seq-450); } .heat .cell[data-l="4"] { background: var(--seq-650); }

/* ---------- pipeline board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.col-head { padding: 12px 13px 10px; border-bottom: 1px solid var(--line); border-top: 3px solid var(--seq-450); border-radius: var(--radius) var(--radius) 0 0; }
.col-head .t { font-weight: 700; font-size: 13.5px; display: flex; justify-content: space-between; }
.col-head .s { font-size: 12px; color: var(--muted); }
.board .col:nth-child(1) .col-head { border-top-color: var(--seq-250); }
.board .col:nth-child(2) .col-head { border-top-color: var(--seq-350); }
.board .col:nth-child(3) .col-head { border-top-color: var(--seq-450); }
.board .col:nth-child(4) .col-head { border-top-color: var(--seq-550); }
.board .col:nth-child(n+5) .col-head { border-top-color: var(--seq-650); }
.col-body { padding: 9px; overflow-y: auto; min-height: 80px; flex: 1; }
.deal-card { background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 10px; padding: 10px 11px; margin-bottom: 9px; cursor: grab; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
.deal-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.deal-card.stale-1 { border-left-color: var(--amber); }
.deal-card.stale-2 { border-left-color: var(--red); }
.deal-card .n { font-weight: 650; font-size: 13.5px; }
.deal-card .c { font-size: 12.5px; color: var(--muted); }
.deal-card .f { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12.5px; }
.sortable-ghost { opacity: .4; }

/* ---------- calendar ---------- */
.week { display: grid; grid-template-columns: 56px repeat(7, minmax(110px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; background: var(--paper); box-shadow: var(--shadow); }
.week .hd { position: sticky; top: 0; background: var(--paper-2); border-bottom: 1px solid var(--line); padding: 9px; font-size: 12.5px; font-weight: 650; text-align: center; z-index: 2; }
.week .hd.today { color: var(--brand-ink); background: var(--brand-soft); }
.week .hours { border-right: 1px solid var(--line); }
.week .hour { height: 48px; font-size: 11px; color: var(--faint); text-align: right; padding-right: 6px; transform: translateY(-7px); }
.week .day { position: relative; border-right: 1px solid var(--line-2); background-image: repeating-linear-gradient(to bottom, transparent 0 47px, var(--line-2) 47px 48px); }
.week .ev { position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 4px 7px; font-size: 11.5px; overflow: hidden; background: var(--violet-soft); color: var(--violet); border-left: 3px solid var(--violet); box-shadow: var(--shadow); }
.week .ev.busy { background: var(--line-2); color: var(--ink-2); border-left-color: var(--faint); }
.week .ev.gbusy { background: repeating-linear-gradient(135deg, var(--line) 0 5px, var(--line-2) 5px 10px); color: var(--ink-2); border-left-color: var(--faint); box-shadow: none; }
.week .ev.cancelled { opacity: .45; text-decoration: line-through; }
.week .ev a { color: inherit; }

/* ---------- toast / modal / palette ---------- */
.flash { margin: 0 0 18px; padding: 11px 15px; border-radius: 12px; background: var(--green-soft); color: var(--green); font-weight: 600; border: 1px solid color-mix(in srgb, var(--green) 25%, transparent); }
.overlay { position: fixed; inset: 0; background: rgba(8,11,28,.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; }
.modal { background: var(--paper); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 620px; max-height: 84vh; overflow: auto; border: 1px solid var(--line); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); }
.palette input { border: none; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 16px; padding: 16px 20px; box-shadow: none !important; }
.palette .res a { display: flex; gap: 10px; padding: 10px 20px; color: var(--ink); align-items: center; }
.palette .res a.sel, .palette .res a:hover { background: var(--violet-soft); text-decoration: none; }
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--navy); color: #fff; padding: 11px 17px; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 80; font-weight: 600; border: 1px solid rgba(255,255,255,.1); }
.toast.err { background: var(--red); }

/* ---------- auth / public pages ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--hero-grad); position: relative; isolation: isolate; }
.auth-wrap::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 24px 24px; }
.auth-card { width: 100%; max-width: 420px; background: var(--paper); border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.55); padding: 32px 30px 24px; }
.auth-card .logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; margin-bottom: 20px; color: var(--ink); letter-spacing: -.02em; }
.auth-card .logo img { width: 36px; height: 36px; }
.auth-card .logo b { color: var(--brand); font-weight: 650; }
.auth-card .btn { width: 100%; height: 42px; }
.public { min-height: 100vh; background: radial-gradient(900px 360px at 0% -10%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 70%), radial-gradient(800px 360px at 100% -10%, color-mix(in srgb, var(--brand-2) 12%, transparent), transparent 70%), var(--bg); }
.public-wrap { max-width: 980px; margin: 0 auto; padding: 32px 16px 60px; }
.book-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; }
.book-side { padding: 26px; border-right: 1px solid var(--line); }
.book-main { padding: 26px; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.days button { border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 9px 6px; cursor: pointer; font: 600 13px var(--font); color: var(--ink); transition: border-color .12s, background .12s; }
.days button:hover { border-color: var(--blue); }
.days button.sel { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.days button small { display: block; color: var(--muted); font-weight: 500; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 14px; }
.slots button { border: 1px solid var(--blue); color: var(--blue); background: var(--paper); border-radius: 10px; padding: 10px 4px; font: 650 13.5px var(--font); cursor: pointer; transition: background .12s, color .12s; }
.slots button:hover { background: var(--blue-soft); }
.slots button.sel { background: var(--blue); color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .hero-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split-3, .split-wide { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 268px; z-index: 70; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .topbar { padding: 9px 12px; }
  .topbar .menu-btn { display: inline-flex; }
  .topbar .search kbd { display: none; }
  .content { padding: 16px 14px 70px; }
  .hero { padding: 20px 18px; border-radius: 16px; }
  .hero h1 { font-size: 22px; }
  .hero-kpi { padding: 12px; gap: 10px; }
  .hero-kpi .v { font-size: 21px; }
  .hero-kpi .ring { width: 44px; height: 44px; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-grid { grid-template-columns: minmax(0, 1fr); }
  .book-side { border-right: none; border-bottom: 1px solid var(--line); }
  .hide-sm { display: none !important; }
  .week { grid-template-columns: 44px repeat(7, minmax(84px, 1fr)); }
  .board { grid-auto-columns: minmax(230px, 85vw); }
  .col { max-height: none; }
  .stat .spark { display: none; }
}
@media (max-width: 480px) {
  .hero-kpis { gap: 8px; }
  .hero-kpi .ring-wrap { display: none; }
  .hero-kpi .v { font-size: 20px; }
  .card-head .meta { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .sidebar, .topbar { display: none; } .shell { display: block; } }

/* ---------- charts (palette validated with the dataviz checker: light + dark) ---------- */
:root {
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4;
  --seq-250: #86b6ef; --seq-350: #5598e7; --seq-450: #2a78d6; --seq-550: #1c5cab; --seq-650: #104281;
  --chart-grid: #e8eaf0; --chart-axis: #6b7491;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181;
    --seq-250: #184f95; --seq-350: #1c5cab; --seq-450: #256abf; --seq-550: #3987e5; --seq-650: #6da7ec;
    --chart-grid: #263049; --chart-axis: #9098b3;
  }
}
:root[data-theme="dark"] {
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181;
  --seq-250: #184f95; --seq-350: #1c5cab; --seq-450: #256abf; --seq-550: #3987e5; --seq-650: #6da7ec;
  --chart-grid: #263049; --chart-axis: #9098b3;
}
.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 320px; }
.chart-box.short { height: 180px; }
.chart-table { margin-top: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legend i.line { height: 2px; width: 14px; border-radius: 1px; vertical-align: 3px; }
.funnel-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 90px; gap: 10px; align-items: center; padding: 5px 0; font-size: 13px; }
.funnel-bar { height: 24px; border-radius: 6px; background: var(--seq-450); min-width: 2px; }
.topbar .search svg { width: 17px; height: 17px; flex: none; }
.topbar .btn svg { width: 17px; height: 17px; }
.public-wrap > .card { overflow: hidden; box-shadow: var(--shadow-md); }
.public-wrap > .card::before { content: ""; display: block; height: 5px; background: var(--brand-grad); }
.book-side { background: linear-gradient(180deg, var(--paper-2), var(--paper)); }
.co-mark { --h: 220; width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff; background: linear-gradient(135deg, hsl(var(--h) 70% 58%), hsl(calc(var(--h) + 35) 65% 45%)); box-shadow: 0 6px 14px -6px hsl(var(--h) 60% 40% / .6); flex: none; margin-right: 4px; }
/* Personal signup links (account, prospect and deal pages) */
.signup-link { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.signup-link:first-of-type { border-top: 0; padding-top: 0; }
.signup-url { word-break: break-all; }
.handoff-line { display: flex; align-items: flex-start; gap: 10px; }
.handoff-line .grow { min-width: 0; }
