/* Lead Radar. Brand theme is set on <html data-brand="..."> from config. One accent per brand. */
:root, [data-brand="guru_pay"] {
  --bg: #FFFFFF; --panel: #FFFFFF; --panel-2: #FDFBF6; --line: #ECE4D4; --line-2: #F4EEE2;
  --text: #15171A; --muted: #5F5C55; --faint: #9A958B;
  --accent: #B8914F; --accent-text: #8C6A2E; --accent-soft: #FBF4E6; --accent-line: #E6D2A8;
  --btn: linear-gradient(180deg, #D9B878 0%, #B8914F 100%); --btn-ink: #15171A; --btn-hover: linear-gradient(180deg, #E2C68D 0%, #C29C5A 100%);
  --btn-edge: inset 0 1px 0 rgba(255, 255, 255, .45), 0 1px 2px rgba(140, 106, 46, .25), 0 6px 16px -6px rgba(140, 106, 46, .45);
  --side: #FFFFFF; --side-2: #FBF4E6; --side-text: #15171A; --side-muted: #6B675F; --side-line: #F1EADC;
  --hot: #B4423C; --hot-soft: #FBEAE8; --ok: #2F7D4F; --ok-soft: #E5F3EA;
  --shadow: 0 1px 2px rgba(140, 106, 46, .06), 0 14px 34px -12px rgba(140, 106, 46, .22);
  --page-bg: radial-gradient(1100px 520px at 100% -8%, rgba(217, 184, 120, .20), transparent 60%),
             radial-gradient(900px 480px at -8% 108%, rgba(217, 184, 120, .14), transparent 60%), #FFFFFF;
  --art: radial-gradient(420px 300px at 80% 20%, rgba(217, 184, 120, .55), transparent 70%),
         radial-gradient(380px 300px at 10% 100%, rgba(240, 214, 160, .7), transparent 70%), #FFF9EE;
  --login-base: #FFFFFF; --login-text: #15171A; --login-sub: #3D3B37;
  --orb1: rgba(222, 186, 118, .60); --orb2: rgba(244, 220, 170, .75); --orb3: rgba(184, 145, 79, .22);
  --lines: rgba(184, 145, 79, .14); --noise: .06; --icon-tile: #FBF1DE;
  --card-glass: rgba(255, 255, 255, .78); --card-border: rgba(184, 145, 79, .30); --card-hi: rgba(255, 255, 255, .95);
  --card-shadow: 0 2px 6px rgba(140, 106, 46, .08), 0 40px 90px -30px rgba(140, 106, 46, .45);
}
[data-brand="og_insurance"] {
  --bg: #FFFFFF; --panel: #FFFFFF; --panel-2: #F8FAFE; --line: #E1E6F2; --line-2: #EEF1F8;
  --text: #0B1020; --muted: #4E5674; --faint: #9098B4;
  --accent: #1AA6D6; --accent-text: #0A7DA8; --accent-soft: #EAF7FD; --accent-line: #B8E3F4;
  --btn: linear-gradient(135deg, #0A84AF 0%, #3D63D8 55%, #6A3EDC 100%); --btn-ink: #FFFFFF; --btn-hover: linear-gradient(135deg, #0B93C2 0%, #4A70E2 55%, #7A4FE6 100%);
  --btn-edge: inset 0 1px 0 rgba(255, 255, 255, .28), 0 1px 2px rgba(40, 60, 160, .25), 0 8px 20px -8px rgba(90, 70, 220, .55);
  --side: #FFFFFF; --side-2: #EEF5FD; --side-text: #0B1020; --side-muted: #5A6382; --side-line: #E8ECF6;
  --hot: #C2413A; --hot-soft: #FCEBEA; --ok: #23784C; --ok-soft: #E4F4EA;
  --shadow: 0 1px 2px rgba(40, 60, 160, .06), 0 14px 34px -12px rgba(60, 70, 190, .22);
  --page-bg: radial-gradient(1100px 520px at 100% -8%, rgba(122, 79, 230, .12), transparent 60%),
             radial-gradient(900px 480px at -8% 108%, rgba(26, 166, 214, .12), transparent 60%), #FFFFFF;
  --art: radial-gradient(420px 300px at 85% 15%, rgba(122, 79, 230, .35), transparent 70%),
         radial-gradient(420px 320px at 10% 100%, rgba(26, 166, 214, .35), transparent 70%), #F6F8FF;
  --login-base: #FFFFFF; --login-text: #0B1020; --login-sub: #353C55;
  --orb1: rgba(140, 100, 245, .42); --orb2: rgba(62, 200, 240, .45); --orb3: rgba(90, 120, 255, .20);
  --lines: rgba(70, 90, 200, .09); --noise: .05; --icon-tile: #EAF7FD;
  --card-glass: rgba(255, 255, 255, .78); --card-border: rgba(90, 110, 220, .22); --card-hi: rgba(255, 255, 255, .95);
  --card-shadow: 0 2px 6px rgba(40, 60, 160, .08), 0 40px 90px -30px rgba(70, 60, 200, .40);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--page-bg); background-attachment: fixed; color: var(--text); font: 14px/1.5 "Geist", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; font-weight: 600; text-wrap: balance; }
h1 { font-size: 26px; line-height: 1.15; }
h2 { font-size: 20px; }
p { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono, .num { font-family: "Geist Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
a { color: var(--accent-text); }
button { font: inherit; cursor: pointer; color: inherit; }
.ph { font-size: 16px; line-height: 1; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--btn); color: var(--btn-ink); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Controls: radius scale is 8px for controls, 12px for surfaces, full for pills. */
input, select { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 11px; outline: none; transition: border-color .2s, box-shadow .2s; min-width: 0; }
input::placeholder { color: var(--faint); }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px;
  padding: 8px 14px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: background .2s, border-color .2s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--btn); color: var(--btn-ink); font-weight: 600; box-shadow: var(--btn-edge); }
.btn.primary:hover { background: var(--btn-hover); }
.btn.ghost { background: var(--panel); border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent-line); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn.wide { width: 100%; padding: 11px 14px; margin-top: 8px; }
.link { background: none; border: 0; color: var(--accent-text); padding: 4px 0; font-weight: 500; }
.link:hover { text-decoration: underline; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); }
.icon-btn:hover { color: var(--text); border-color: var(--accent-line); }

/* Sign-in: full-bleed layered background (glow orbs, faded grid, grain) under a frosted card. */
.login { position: relative; isolation: isolate; overflow: hidden; min-height: 100dvh; background: var(--login-base); color: var(--login-text);
  display: grid; grid-template-rows: auto 1fr; padding: 32px clamp(20px, 5vw, 72px) 48px; }
.login-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); }
.o1 { width: 680px; height: 680px; right: -160px; top: -220px; background: var(--orb1); }
.o2 { width: 600px; height: 600px; left: -200px; bottom: -260px; background: var(--orb2); }
.o3 { width: 420px; height: 420px; left: 38%; top: 40%; background: var(--orb3); }
.lines { position: absolute; inset: 0; background-image: linear-gradient(var(--lines) 1px, transparent 1px), linear-gradient(90deg, var(--lines) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse 75% 65% at 40% 45%, #000 25%, transparent 75%); mask-image: radial-gradient(ellipse 75% 65% at 40% 45%, #000 25%, transparent 75%); }
.noise { position: absolute; inset: 0; opacity: var(--noise);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.login-mark { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 17px; }
.login-mark img { height: 40px; width: 40px; object-fit: contain; border-radius: 10px; }
.login-wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 400px); gap: clamp(32px, 6vw, 104px); align-items: center; max-width: 1240px; width: 100%; margin: 0 auto; }
.login-copy h1 { font-size: clamp(38px, 4.2vw, 60px); line-height: 1.04; letter-spacing: -.04em; font-weight: 650; color: var(--login-text); max-width: 14ch; }
.login-sub { color: var(--login-sub); font-size: 18px; line-height: 1.55; margin-top: 20px; max-width: 44ch; text-wrap: pretty; }
.login-points { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 14px; }
.login-points li { display: flex; gap: 14px; align-items: center; font-size: 16px; font-weight: 500; color: var(--login-text); }
.login-points i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--icon-tile); color: var(--accent); font-size: 18px; flex: none;
  box-shadow: inset 0 0 0 1px var(--accent-line); }
.login-card { background: var(--card-glass); border: 1px solid var(--card-border); border-radius: 20px; padding: 34px 32px 26px;
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%); box-shadow: inset 0 1px 0 var(--card-hi), var(--card-shadow); }
.login-card form { display: grid; gap: 6px; }
.login-card h2 { font-size: 26px; color: var(--login-text); }
.login-card .muted { margin: 4px 0 18px; color: var(--muted); }
.login-card label { font-weight: 500; font-size: 13px; margin-top: 8px; color: var(--login-text); }
.login-card input { padding: 12px 13px; border-radius: 10px; }
.login-card .link { justify-self: start; margin-top: 4px; }
.msg { min-height: 20px; font-size: 13px; color: var(--muted); }
.msg.err { color: var(--hot); }

/* Shell */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100dvh; }
.side { border-right: 1px solid var(--side-line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); background: var(--side); color: var(--side-text); display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100dvh; }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 22px; }
.side-brand img { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; }
.side-brand span { display: block; font-weight: 600; font-size: 15px; line-height: 1.2; }
.side-brand small { color: var(--side-muted); font-size: 12px; }
#nav { display: grid; gap: 2px; overflow-y: auto; align-content: start; }
.nav-group { color: var(--side-muted); font-size: 12px; font-weight: 500; padding: 16px 12px 6px; }
.nav { display: flex; flex: none; white-space: nowrap; gap: 11px; align-items: center; text-align: left; background: none; border: 0; color: var(--side-muted);
  padding: 8px 12px; border-radius: 8px; font-weight: 500; transition: background .15s, color .15s; }
.nav:hover { color: var(--side-text); background: var(--side-2); }
.nav.active { background: var(--side-2); color: var(--side-text); box-shadow: inset 2px 0 0 var(--accent); }
.nav.active .ph { color: var(--accent); }
.nav .tag { margin-left: auto; font-size: 11px; color: var(--side-muted); border: 1px solid var(--side-line); padding: 0 6px; border-radius: 4px; }
.side-foot { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 14px 10px 4px; border-top: 1px solid var(--side-line); }
.avatar { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--btn); color: var(--btn-ink); font-weight: 600; font-size: 13px; flex: none; }
.who { min-width: 0; display: grid; }
.who span { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .link { justify-self: start; color: var(--side-muted); font-size: 12px; padding: 0; }

.main { padding: 30px 36px 48px; min-width: 0; max-width: 1480px; width: 100%; }
.view { animation: rise .35s cubic-bezier(.16, 1, .3, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.page-head .muted { margin-top: 4px; }

/* Stats strip: one surface, columns divided by hairlines. */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; overflow: hidden; background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 20px; box-shadow: var(--shadow); }
.stats::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--btn); }
.stat { padding: 18px 20px; }
.stat + .stat { border-left: 1px solid var(--line-2); }
.stat span { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.stat span .ph { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-text); font-size: 15px; }
.stat b { display: block; font: 600 26px/1.15 "Geist Mono", monospace; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat.hot b { color: var(--hot); }
.stat .sk { margin-top: 12px; width: 60%; height: 18px; }

/* Saved views */
.presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.preset { border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 500;
  display: inline-flex; gap: 7px; align-items: center; transition: all .15s; }
.preset:hover { color: var(--text); border-color: var(--accent-line); }
.preset.on { background: var(--btn); color: var(--btn-ink); border-color: transparent; box-shadow: var(--btn-edge); }
.preset .ph { font-size: 15px; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { position: relative; flex: 1 1 240px; }
.search .ph { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { width: 100%; padding-left: 34px; }
#f-city { width: 130px; }
.check { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 13px; padding: 0 4px; }
.check input { accent-color: var(--accent); }
.active { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-height: 12px; margin: 10px 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 10px; border-radius: 999px; background: var(--accent-soft);
  color: var(--text); font-size: 12px; border: 1px solid var(--accent-line); }
.chip button { background: none; border: 0; padding: 2px; display: grid; color: var(--muted); }
.chip button:hover { color: var(--text); }
.active .link { font-size: 12px; margin-left: 4px; }

/* Table */
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: auto; box-shadow: var(--shadow); }
.grid { width: 100%; border-collapse: collapse; }
.grid th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--panel-2); padding: 10px 16px;
  border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.grid td:nth-child(6) { white-space: nowrap; }
.grid td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid tbody tr[data-id] { cursor: pointer; transition: background .12s; }
.grid tbody tr[data-id]:hover { background: var(--accent-soft); }
.grid th.num, .grid td.num { text-align: right; }
.biz { font-weight: 600; }
.sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.contact { display: grid; gap: 3px; font-size: 13px; white-space: nowrap; }
.contact span { display: inline-flex; align-items: center; gap: 6px; }
.contact .ph { color: var(--faint); font-size: 14px; }
.none { color: var(--faint); font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--accent-soft); color: var(--text); white-space: nowrap; border: 1px solid transparent; }
.pill.hot { background: var(--hot-soft); color: var(--hot); }
.pill.hot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.dim { background: transparent; border-color: var(--line); color: var(--muted); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 14px; font-size: 13px; }
.pager span { margin-right: 6px; }
.pager .btn { padding: 6px 8px; }

/* Loading and empty states */
.sk { display: block; height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--line-2), var(--line), var(--line-2)); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { padding: 56px 24px; text-align: center; color: var(--muted); }
.empty .ph { font-size: 28px; color: var(--faint); display: block; margin: 0 auto 10px; }
.empty b { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }

/* Modules in progress */
.soon { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.soon-copy { padding: 32px; }
.soon-copy .status { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 500; color: var(--accent-text); margin-bottom: 14px; }
.soon-copy h2 { font-size: 22px; margin-bottom: 8px; }
.soon-copy p { color: var(--muted); max-width: 52ch; }
.soon-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.soon-list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.soon-list .ph { color: var(--accent); font-size: 18px; margin-top: 1px; }
.soon-list b { font-weight: 600; display: block; }
.soon-list span { color: var(--muted); font-size: 13px; }
.soon-art { background: var(--art); position: relative; display: grid; place-items: center; min-height: 260px; color: var(--art-text); }
.soon-art i { font-size: 96px; opacity: .9; }
[data-brand="guru_pay"] .soon-art i { color: #B8914F; }
[data-brand="og_insurance"] .soon-art i { color: var(--accent); }

/* Drawer */
.scrim { position: fixed; inset: 0; background: rgba(10, 12, 20, .32); z-index: 20; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(500px, 100%); background: var(--panel); border-left: 1px solid var(--line);
  padding: 28px; overflow: auto; z-index: 21; box-shadow: -24px 0 60px rgba(10, 12, 20, .18); animation: slide .3s cubic-bezier(.16, 1, .3, 1); }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer .close { position: absolute; top: 20px; right: 20px; }
.drawer h3 { font-size: 22px; line-height: 1.2; margin: 0 48px 6px 0; }
.drawer .lede { color: var(--muted); margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 20px 0 8px; }
.actions .btn { padding: 10px; }
.block { border-top: 1px solid var(--line-2); padding-top: 16px; margin-top: 18px; }
.block h4 { margin: 0 0 10px; font-size: 13px; font-weight: 600; }
.dl { display: grid; grid-template-columns: 120px 1fr; gap: 8px 14px; margin: 0; font-size: 13px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; word-break: break-word; }
pre.raw { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font: 12px/1.5 "Geist Mono", monospace; overflow: auto; max-height: 280px; margin: 0; }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .soon { grid-template-columns: 1fr; }
  .soon-art { min-height: 160px; order: -1; }
}
@media (max-width: 860px) {
  .login { padding: 24px 20px 40px; }
  .login-wrap { grid-template-columns: 1fr; gap: 28px; align-content: start; padding-top: 36px; }
  .login-copy h1 { font-size: 34px; }
  .login-sub { font-size: 16px; }
  .login-points { display: none; }
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; z-index: 10; height: auto; flex-direction: row; align-items: center; gap: 4px; padding: 10px 12px; overflow-x: auto; }
  .side-brand { padding: 0 8px 0 0; } .side-brand div { display: none; }
  #nav { display: flex; overflow: visible; } .nav-group, .nav .tag { display: none; }
  .nav { padding: 8px 10px; }
  .presets { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
  .preset { flex: none; }
  .side-foot { display: none; }
  .main { padding: 20px 16px 40px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .filters > * { flex: 1 1 calc(50% - 8px); } .search { flex-basis: 100%; } #f-city { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
