/* Mailer UI — modern glass theme · green brand · light/dark · responsive */
:root {
  --brand: #00AA4D;
  --brand2: #00AA4D;
  --brand-rgb: 0, 170, 77;

  --bg: #edf3ef;
  --bg2: #f6f9f7;
  --panel: #ffffff;
  --panel2: #fafbfc;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --input-bg: #ffffff;
  --bar-bg: #eceef1;
  --btn-bg: #eef0f3;
  --chip-bg: #e6f9ee;
  --chip-border: #b7ecd0;
  --dropzone-bg: #f6fef9;
  --dropzone-border: #b7ecd0;

  --danger: #dc2626;
  --ok: #00AA4D;
  --warn: #d97706;
  --info: #0284c7;
  --radius: 14px;

  --sidebar: #101418;
  --sidebar-ink: #d1d5db;

  /* glass */
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-blur: 16px;
  --shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
  --shadow-hover: 0 16px 40px rgba(0, 170, 77, 0.12);
  --topbar-glass: rgba(237, 243, 239, 0.72);
}

html[data-theme="dark"] {
  --bg: #0a0e11;
  --bg2: #0e1418;
  --panel: #161d21;
  --panel2: #1b2328;
  --ink: #e8ecef;
  --muted: #96a3ab;
  --line: #283138;
  --input-bg: #1b2328;
  --bar-bg: #283138;
  --btn-bg: #242d33;
  --chip-bg: #12301f;
  --chip-border: #1d5233;
  --dropzone-bg: #101a15;
  --dropzone-border: #1d5233;
  --sidebar: #0a0e11;
  --sidebar-ink: #c3ccd3;

  --glass: rgba(22, 29, 33, 0.6);
  --glass-strong: rgba(22, 29, 33, 0.82);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.45);
  --topbar-glass: rgba(10, 14, 17, 0.72);
}

/* ---------- web fonts ---------- */
@font-face {
  font-family: 'Zona';
  src: url('../fonts/zona-pro-bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Helvetica Now';
  src: url('../fonts/helvetica-now-text-medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Helvetica Now';
  src: url('../fonts/helvetica-now-text-light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
img { max-width: 100%; height: auto; }
html, body { margin: 0; padding: 0; }
.fouc * { transition: none !important; animation: none !important; }
html {
  overflow-x: hidden;
  overflow-x: clip; /* clip without creating a scroll container (keeps sticky working) */
  min-height: 100%;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg2) 60%, var(--bg) 100%);
}
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
/* ambient glow blobs (the "glass" backdrop) */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 340px; height: 340px; top: -80px; right: -60px;
  background: radial-gradient(circle, rgba(var(--brand-rgb), 0.22), transparent 70%);
}
body::after {
  width: 300px; height: 300px; bottom: -60px; left: -60px;
  background: radial-gradient(circle, rgba(0, 170, 77, 0.16), transparent 70%);
}
html[data-theme="dark"] body::before { opacity: .5; }
html[data-theme="dark"] body::after { opacity: .45; }

/* ---------- snake divider — syncs with page load via JS ---------- */
.main::before {
  content: '';
  position: fixed;
  top: 0; bottom: 0; left: 230px;
  width: 3px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--brand), var(--brand2));
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  transition: clip-path 0.15s ease-out, opacity 0.2s ease;
}
.main.snake-grow::before {
  clip-path: inset(0 0 0% 0);
  opacity: 1;
}
.main.snake-done::before {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) { .main::before { transition: none; clip-path: inset(0 0 0% 0); } }
@media (max-width: 900px) { .main::before { left: 0; } }

a { color: var(--brand); text-decoration: none; transition: color .2s; }
a:hover { text-decoration: underline; }
/* Clickable recipient email in tables (opens the sent-email audit view) */
.email-link {
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; color: var(--brand); cursor: pointer;
  text-align: left; text-decoration: none;
}
.email-link:hover { text-decoration: underline; }

/* ---------- sidebar (glass) ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: 230px;
  background: linear-gradient(180deg, rgba(16, 20, 24, 0.9), rgba(10, 14, 17, 0.86));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--sidebar-ink);
  display: flex; flex-direction: column;
  padding: 18px 12px;
  z-index: 50;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 700; color: #fff;
  padding: 4px 10px 30px;
}
.brand-dot {
  width: 14px; height: 14px; border-radius: 4px;
  background: linear-gradient(135deg, var(--brand2), #00AA4D);
  box-shadow: 0 0 12px rgba(var(--brand-rgb), 0.7);
  display: inline-block;
}
.brand-link { display: flex; align-items: center; }
.brand-logo { height: 32px; width: auto; display: block; }
.brand-logo-wrap {
  position: relative;
  display: block;
  width: 108px;
  height: 32px;
}
.brand-logo-wrap .brand-logo {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease;
}
.brand-logo-wrap .brand-logo-hover { opacity: 0; }
.brand-logo-wrap .brand-logo-light { opacity: 0; }
.brand-logo-wrap .brand-logo-light-hover { opacity: 0; }
.brand-link:hover .brand-logo-wrap .brand-logo-base { opacity: 0; }
.brand-link:hover .brand-logo-wrap .brand-logo-hover { opacity: 1; }
html[data-theme="light"] .brand-link .brand-logo-wrap .brand-logo-base { opacity: 0; }
html[data-theme="light"] .brand-link .brand-logo-wrap .brand-logo-hover { opacity: 0; }
html[data-theme="light"] .brand-link .brand-logo-wrap .brand-logo-light { opacity: 1; }
html[data-theme="light"] .brand-link .brand-logo-wrap .brand-logo-light-hover { opacity: 0; }
html[data-theme="light"] .brand-link:hover .brand-logo-wrap .brand-logo-light { opacity: 0; }
html[data-theme="light"] .brand-link:hover .brand-logo-wrap .brand-logo-light-hover { opacity: 1; }
/* Sidebar nav always dark — keep dark logo variant in all modes */
html[data-theme="light"] .sidebar .brand-link .brand-logo-wrap .brand-logo-base { opacity: 1; }
html[data-theme="light"] .sidebar .brand-link .brand-logo-wrap .brand-logo-hover { opacity: 0; }
html[data-theme="light"] .sidebar .brand-link .brand-logo-wrap .brand-logo-light { opacity: 0; }
html[data-theme="light"] .sidebar .brand-link .brand-logo-wrap .brand-logo-light-hover { opacity: 0; }
html[data-theme="light"] .sidebar .brand-link:hover .brand-logo-wrap .brand-logo-base { opacity: 0; }
html[data-theme="light"] .sidebar .brand-link:hover .brand-logo-wrap .brand-logo-hover { opacity: 1; }
.brand-live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(0,170,77,.15); color: #00AA4D; font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 20px; line-height: 1; white-space: nowrap;
}
.brand-live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #00AA4D;
  animation: pulse-dot 2s infinite;
}
.brand-logo-lg { height: 46px; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; }
.login-avatar {
  width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(var(--brand-rgb), 0.4);
  overflow: hidden; color: #fff;
}
.login-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-link {
  display: flex; align-items: center; gap: 13px;
  color: var(--sidebar-ink);
  padding: 10px 12px; border-radius: 10px;
  font-weight: 500;
  transition: background .2s, color .2s, transform .2s;
}
.nav-link:hover {
  background: rgba(255,255,255,.07); color: #fff;
  transform: translateX(4px);
  text-decoration: none;
}
.nav-link.active {
  background: transparent;
  color: #fff;
}
.nav-link.active .ic {
  width: 18px; height: 18px;
  color: var(--brand);
}
.ic {
  position: relative;
  width: 18px; height: 18px;
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
}
.ic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ic .ic-base { filter: invert(0); transition: filter .2s; }
.ic .ic-hover { display: none; }
.nav-link:hover:not(.active) .ic .ic-base { display: none; }
.nav-link:hover:not(.active) .ic .ic-hover { display: block; }
.nav-link.active .ic .ic-base { display: none; }
.nav-link.active .ic .ic-hover { display: block; }
.nav-link { position: relative; }
.sidebar nav .nav-link { gap: 18px; }
.nav-dot {
  width: 8px; height: 8px;
  background: #f85149;
  border-radius: 50%;
  margin-left: auto;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(248,81,73,.6);
  animation: nav-dot-pulse 2s ease-in-out infinite;
}
@keyframes nav-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.2); }
}
@keyframes nav-dot-pulse-green {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px rgba(0,170,77,.8); }
  50% { opacity: .7; transform: scale(1.25); box-shadow: 0 0 14px rgba(0,170,77,1), 0 0 24px rgba(0,170,77,.6); }
}
/* "Leads ready" notification dot — green pulse plus a rotating snake ring. */
.nav-dot-leads {
  position: relative;
  background: #00aa4d;
  box-shadow: 0 0 8px rgba(0,170,77,.8);
  animation: nav-dot-pulse-green 2s ease-in-out infinite;
}
.nav-dot-leads::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #7dffb7;
  border-right-color: #00aa4d;
  animation: nav-dot-leads-snake 1.3s linear infinite;
}
@keyframes nav-dot-leads-snake { to { transform: rotate(360deg); } }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; }
.userbox { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border-radius: 10px; transition: background .2s; cursor: default; }
.userbox:hover { background: rgba(255,255,255,.07); }
.userlink { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.userlink .uname, .userlink .urole { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userbox:hover .uname { color: #fff; }
.userbox:hover .userlink { color: #fff; text-decoration: none; }
.userbox form { margin-left: auto; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; aspect-ratio: 1;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  overflow: hidden;
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.25);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-initials { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.logout svg { display: block; }
.uname { color: #fff; font-weight: 600; font-size: 13px; }
.urole { font-size: 11px; color: #9ca3af; }
.logout {
  background: none; border: none; color: #9ca3af;
  font-size: 18px; cursor: pointer; padding: 6px;
  transition: color .2s, transform .2s;
}
.logout:hover { color: #fff; transform: scale(1.15); }

/* ---------- theme toggle (icon button) ---------- */
.side-guest-row {
  display: flex; align-items: center; gap: 8px;
  padding: 0 4px; margin-top: 10px;
}

/* ---------- sidebar user (profile at top of sidebar) ---------- */
.sidebar-user { padding: 0 0 12px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 12px; }
.sidebar-user .userbox { padding: 4px 6px; }
.sidebar-user .userlink { width: 100%; }
.sidebar-user .urole { margin-top: 4px; }
/* Edit-pencil link to profile settings, centered vertically with the name/tag */
.sidebar-user .profile-edit-link {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px;
  color: #9ca3af;
}
.profile-edit-icon { display: block; }
/* Align the two main nav-item icons with the profile picture above so they
   share the same vertical center (icon + label stay on one row). */
.sidebar nav { align-items: stretch; }
.sidebar nav .nav-link { justify-content: flex-start; width: 100%; padding-top: 11px; padding-bottom: 11px; padding-left: 18px; }
.tier-block {
  display: inline-flex; align-items: center;
  font-family: 'Helvetica Now', 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 7px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase;
  line-height: 1; padding: 3px 7px 3px 5px; border-radius: 999px;
  border: 1px solid transparent; white-space: nowrap;
}
.tier-free { color: #aab0b8; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.tier-bronze {
  color: #e8a15c; background: rgba(205,127,50,.18);
  border-color: rgba(205,127,50,.55); text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.tier-silver {
  color: #e3e9f0; background: linear-gradient(135deg, rgba(192,192,192,.22), rgba(220,226,233,.14));
  border-color: rgba(200,210,220,.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.tier-gold {
  color: #ffe9a8; background: linear-gradient(135deg, rgba(255,200,40,.28), rgba(214,160,30,.18));
  border-color: rgba(255,215,0,.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.sidebar-mobile-logo { padding: 0 6px; }
.sidebar-mobile-logo .brand-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }

/* ---------- sidebar guest auth (signed-out, below theme toggle) ---------- */
.side-guest-row {
  display: flex; align-items: center; gap: 8px;
  padding: 0 4px; margin-top: 10px;
}
.side-guest-row-combined {
  flex-direction: row;
}
.side-guest-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  height: 38px; padding: 0; border-radius: 8px; font-size: 13px; font-weight: 600;
  text-decoration: none; text-align: center;
  background: rgba(255,255,255,.07); color: var(--sidebar-ink);
  border: 1px solid rgba(255,255,255,.1);
  transition: background .2s, border-color .2s, color .2s;
}
.side-guest-btn:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.18); color: #fff; }
.side-google-inline {
  flex: 1;
}
.side-google-inline iframe,
.side-google-inline div[role="button"] {
  width: 100% !important; height: 38px !important; border-radius: 8px !important;
}
.side-google-icon {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  cursor: pointer; transition: background .2s, border-color .2s;
}
.side-google-icon:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.18); }
.side-google-icon svg { width: 18px; height: 18px; }

/* ---------- topbar user ---------- */
.topbar-user-wrap { position: relative; }
.topbar-user {
  display: flex; align-items: center; text-decoration: none;
  transition: transform .2s; background: none; border: none; padding: 0; cursor: pointer;
}
.topbar-user:hover { transform: scale(1.05); }
.topbar-msg {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--glass);
  color: var(--ink); cursor: pointer; text-decoration: none;
  transition: transform .2s, border-color .2s, background .2s;
}
.topbar-msg:hover { transform: scale(1.05); border-color: var(--brand); background: var(--chip-bg); }
.topbar-msg .nav-dot {
  position: absolute; top: -1px; right: -1px;
  width: 9px; height: 9px; margin: 0;
  border: 2px solid var(--topbar-glass);
}
.topbar-msg .nav-dot[hidden] { display: none; }
.topbar-msg .cart-count {
  position: absolute; top: -5px; left: -6px;
  min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box;
  border-radius: 8px; background: var(--brand); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  border: 2px solid var(--topbar-glass);
}
.topbar-msg .cart-count[hidden] { display: none; }
.avatar-sm { width: 30px; height: 30px; }
.topbar-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 100;
  min-width: 240px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15);
  display: none; overflow: hidden;
}
.topbar-dropdown.open { display: block; }
.topbar-dropdown-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 16px; font-size: 13px; font-weight: 500; color: var(--ink);
  text-decoration: none; background: none; border: none; cursor: pointer;
  font-family: inherit; text-align: left;
  transition: background .15s;
}
.topbar-dropdown-item:hover { background: var(--glass); }
.topbar-dropdown-form { margin: 0; }
.topbar-dropdown-btn { border-top: 1px solid var(--line); }
.topbar-dropdown-item .tt-icon-sun { display: none; }
.topbar-dropdown-item .tt-icon-moon { display: none; }
html[data-theme="light"] .topbar-dropdown-item .tt-icon-sun { display: block; color: #f59e0b; }
html[data-theme="dark"] .topbar-dropdown-item .tt-icon-moon { display: block; color: #94a3b8; }
.theme-label-text { font-size: 13px; }
/* Theme toggle + Sign out share one 50/50 row at the bottom of the dropdown */
.topbar-dropdown-row { display: flex; }
.topbar-dropdown-row > .topbar-dropdown-cell {
  flex: 1 1 50%; width: auto;
  border-top: 1px solid var(--line); border-radius: 0;
}
.topbar-dropdown-row .topbar-dropdown-item { justify-content: center; padding: 10px 6px; white-space: nowrap; }
.topbar-dropdown-row .topbar-dropdown-btn { border-top: 0; border-left: 1px solid var(--line); }
/* Messages link inside the dropdown: mobile only (desktop/tablets use the topbar icon) */
.topbar-msg-item { display: none; }
@media (max-width: 640px) {
  .topbar-msg-item { display: flex; }
  #topbarMsgsBtn { display: none; }
}

/* ---------- main ---------- */
.main { margin-left: 230px; min-height: 100vh; display: flex; flex-direction: column; position: relative; z-index: 51; }
.topbar {
  position: sticky; top: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 28px 12px; flex-wrap: wrap;
  background: var(--topbar-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar h1 { font-size: 20px; margin: 0; letter-spacing: -.01em; font-family: 'Helvetica Now', 'Segoe UI', Roboto, Arial, sans-serif; font-weight: 300; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--glass);
  backdrop-filter: blur(10px);
  color: var(--ink); font-size: 18px; cursor: pointer;
  position: relative; z-index: 5;
  pointer-events: auto;
  touch-action: manipulation;
  transition: transform .2s, border-color .2s;
}
.nav-toggle:hover { transform: scale(1.06); border-color: var(--brand2); }
.nav-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
  z-index: 85; opacity: 0; pointer-events: none;
  visibility: hidden;
  transition: opacity .2s, visibility .2s;
}
.nav-backdrop.show { opacity: 1; pointer-events: auto; visibility: visible; }
.content { padding: 20px 28px 40px; display: flex; flex-direction: column; flex: 1; min-height: 0; width: 100%; overflow-wrap: break-word; }

/* ---------- full-screen app shell (Umami-style dashboard) ----------
   The document never scrolls: the sidebar and topbar stay pinned and only
   the content area scrolls internally, on every screen. Pairs with
   manifest.json (display: standalone) so an installed Adhere opens as a
   native full-screen app. */
html, body { height: 100%; }
body { overflow: hidden; overscroll-behavior: none; }
.main { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
.main .content { overflow-y: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; }
.main .content::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* ---------- mobile browser (not installed): let the document scroll ----------
   Installed (standalone) apps and desktop keep the pinned full-screen shell.
   A mobile BROWSER can't hide its URL bar unless the document scrolls, so on
   phones in a browser we release the height constraints and let the page flow
   to its natural height. Scroll-down then collapses the browser chrome, which
   is what reveals bottom bars like the lead generator's Next/count UI. */
html.browser-mobile, html.browser-mobile body { height: auto; min-height: 100%; }
html.browser-mobile body { overflow: visible; }
html.browser-mobile .main { height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; }
html.browser-mobile .main .content { overflow: visible; }
html.browser-mobile body[data-page="leads"] .main,
html.browser-mobile body[data-page="leads"] .content,
html.browser-mobile body[data-page="services"] .main,
html.browser-mobile body[data-page="services"] .content { overflow: visible; }
html.browser-mobile body[data-page="leads"] .lead-wizard-wrap,
html.browser-mobile body[data-page="services"] .lead-wizard-wrap { flex: 1 0 auto; min-height: 100vh; min-height: 100dvh; overflow: visible; }
html.browser-mobile body[data-page="leads"] .lead-step-scroll,
html.browser-mobile body[data-page="services"] .lead-step-scroll { flex: 1 1 auto; min-height: 0; overflow: visible; }

/* ---------- all small screens (≤900 px): release the pinned shell ----------
   Whether or not the browser-mobile class is present (standalone app, browser
   tab, embedded WebView) the page must flow and scroll at small widths.
   Pages that need a locked workspace (leads, services) re-lock via more
   specific rules later in this file. */
@media (max-width: 900px) {
  html, body { height: auto; min-height: 100%; }
  html { overscroll-behavior-y: none; }
  body { overflow: visible; }
  .main { height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; }
  .main .content { overflow: visible; }
}

/* ---------- cards (glass) ---------- */
.card {
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(var(--brand-rgb), 0.3);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.card-head h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; font-family: 'Helvetica Now', 'Segoe UI', Roboto, Arial, sans-serif; font-weight: 500; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px; margin-bottom: 18px;
}
/* Dashboard: delivery overview + circular lead-generation progress */
.dash-gen-row { display: flex; gap: 18px; align-items: stretch; }
.dash-gen-row > .card { flex: 1; min-width: 0; }
.delivery-stats { grid-template-columns: repeat(4, 1fr); }
.gen-progress-card { flex: 0 0 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gen-progress-card .card-head { margin-bottom: 8px; }
.gen-progress { position: relative; width: 112px; height: 112px; }
.gp-track { fill: none; stroke: var(--line); stroke-width: 12; }
.gp-fill { fill: none; stroke: var(--ink); stroke-width: 12; stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transition: stroke-dashoffset .4s ease; }
.gp-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; color: var(--ink); }
.gp-meta { margin-top: 6px; color: var(--muted); font-size: 12px; }
@media (max-width: 900px) {
  .dash-gen-row { flex-direction: column; }
  .gen-progress-card { flex: 1 1 auto; }
}
@media (max-width: 640px) {
  .delivery-stats { grid-template-columns: repeat(2, 1fr); }
}
.card.stat { margin-bottom: 0; padding: 16px; }
.card.stat:hover { transform: translateY(-3px); }
.stat-num { font-size: 24px; font-weight: 700; }
.stat-num.live { color: var(--ok); animation: pulse 2s infinite; }
.stat-num.err { color: var(--danger); }
.stat-label { color: var(--muted); font-size: 12px; margin-top: 2px; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.card > .table, .panel > .table { display: block; overflow-x: auto; }
.table th {
  text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted);
  padding: 8px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: 9px 10px; border-bottom: 1px solid var(--line);
  vertical-align: middle; font-size: 13px;
}
.table tbody tr { transition: background .18s; }
.table tbody tr:hover, .ct-main:hover + .ct-divider { background: rgba(var(--brand-rgb), 0.05); }
.ct-divider:hover, .ct-main:has(+ .ct-divider:hover) { background: rgba(var(--brand-rgb), 0.05); }
.table tr:last-child td { border-bottom: none; }
.table .empty { text-align: center; color: var(--muted); padding: 28px; }
.table .empty:hover { background: transparent; }
.table tbody tr.row-clickable { cursor: pointer; }
.table tbody tr.row-clickable:hover { background: rgba(var(--brand-rgb), 0.08); }
.btn-csv {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px;
  color: var(--muted); transition: background .15s, color .15s;
}
.btn-csv:hover { background: rgba(var(--brand-rgb), 0.1); color: var(--brand); }
.row-off { opacity: .55; }
.row-off + .ct-divider { opacity: .55; }
.table-scroll { overflow-x: auto; }
.td-actions { white-space: nowrap; text-align: right; }
.td-actions form, .td-actions .btn { display: inline-block; margin-left: 4px; }
.ct-email { font-weight: 500; }
.ct-main td { border-bottom: none; }
.ct-divider td { padding: 4px 10px 8px; border-bottom: 1px solid var(--line); }
.ct-actions-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ct-actions-row .badge { font-size: 11px; padding: 2px 7px; }
.ct-action-btns { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.lists-card .ct-divider .ct-actions-row { justify-content: flex-end; }
.lists-card .ct-divider .ct-action-btns { margin-left: auto; }
.view-card .ct-divider .ct-actions-row { width: fit-content; }
.view-card .ct-divider .ct-action-btns { }
.camp-card .ct-divider .ct-actions-row { justify-content: flex-end; }
.camp-card .ct-divider .ct-action-btns { margin-left: auto; }
.td-progress { min-width: 160px; }
.bar {
  height: 8px; background: var(--bar-bg); border-radius: 99px; overflow: hidden;
  width: 130px; display: inline-block; vertical-align: middle;
}
.bar.big { width: 100%; height: 10px; margin: 10px 0; }
.bar-fill {
  height: 100%; border-radius: 99px; transition: width .4s;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  box-shadow: 0 0 8px rgba(var(--brand-rgb), 0.5);
}
.bar-label { font-size: 12px; color: var(--muted); margin-left: 8px; }
.import-actions { display: flex; align-items: center; gap: 8px; }
.import-actions input[type="text"] { flex: 1; }
.confirm-row { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.confirm-row .cards { margin-bottom: 0; flex: 0 0 auto; }
.import-side { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.import-btn-row { display: flex; gap: 8px; }
#importStartBtn { flex: 1; }
@media (max-width: 640px) {
  .confirm-row { flex-direction: column; }
}
.import-progress { margin-top: 20px; }
.import-progress-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-weight: 600; }
.import-progress-stats { font-size: 13px; color: var(--muted); margin-top: 4px; }
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2.5px solid var(--border); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- tooltip ---------- */
.tip {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; background: var(--border);
  font-size: 10px; font-weight: 700; color: var(--muted); cursor: help;
  vertical-align: middle; margin-left: 4px; line-height: 1;
}
/* Inline popup stays hidden — it only holds the text; a JS-driven portal
   tooltip (.tip-tooltip) is mounted in <body> to avoid clipping by the card. */
.tip .tip-popup {
  display: none;
}

/* Portal tooltip rendered in document.body (escapes overflow:hidden cards). */
.tip-tooltip {
  display: block; position: fixed; z-index: 9999; max-width: 280px;
  padding: 10px 12px;
  background:
    linear-gradient(135deg, rgba(255,255,255,1), rgba(255,255,255,.97) 55%, rgba(255,255,255,1)),
    var(--card);
  border: 1px solid rgba(255,255,255,.75); border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,.28); font-size: 12px; font-weight: 400;
  line-height: 1.5; color: #1a1a1a; white-space: normal;
  pointer-events: none;
  -webkit-backdrop-filter: blur(8px) saturate(1.3);
  backdrop-filter: blur(8px) saturate(1.3);
  opacity: 0; transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
}
.tip-tooltip.show {
  opacity: 1; transform: translateY(0);
}

html[data-theme="dark"] .tip-tooltip {
  background:
    linear-gradient(135deg, rgba(36,36,42,1), rgba(27,27,32,.98) 55%, rgba(36,36,42,1)),
    var(--card);
  border-color: rgba(255,255,255,.22);
  color: #fff;
}
html[data-theme="dark"] .tip .tip-popup { color: #fff; }

.tip-tooltip a { color: var(--brand); font-weight: 600; text-decoration: underline; }
.tip-tooltip strong, .tip-tooltip b { font-weight: 700; }

/* ---------- preview tabs ---------- */
.preview-tabs {
  display: flex; gap: 0; border-bottom: 2px solid var(--line); margin-bottom: 0;
}
.preview-tab {
  padding: 6px 16px; border: none; background: none; font-size: 13px;
  font-weight: 600; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color .15s, border-color .15s;
}
.preview-tab:hover { color: var(--ink); }
.preview-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.preview-tab-body { padding-top: 10px; }
.preview-tab-body iframe {
  width: 100%; height: 380px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--input-bg);
}
.preview-tab-body pre {
  white-space: pre-wrap; background: var(--input-bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px; color: var(--ink); font-size: 13px;
  line-height: 1.55; max-height: 380px; overflow-y: auto; margin: 0;
}

/* ---------- badges ---------- */
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 99px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-running, .badge-completed, .badge-opened { background: rgba(0,170,77,.15); color: #00AA4D; }
.badge-accepted { background: #f3e8ff; color: #7e22ce; }
.badge-draft, .badge-paused { background: #e2e8f0; color: #475569; }
.badge-deferred { background: #fef9c3; color: #ca8a04; }
.badge-bounced { background: #f4e3d2; color: #92400e; }
.badge-failed { background: #fee2e2; color: var(--danger); }
.badge-info { background: #e0f2fe; color: #0369a1; }

html[data-theme="dark"] .badge-running, html[data-theme="dark"] .badge-completed,
html[data-theme="dark"] .badge-opened { background: rgba(0,170,77,.16); color: #00AA4D; }
html[data-theme="dark"] .badge-accepted { background: rgba(168,85,247,.18); color: #c084fc; }
html[data-theme="dark"] .badge-draft, html[data-theme="dark"] .badge-paused { background: rgba(148,163,184,.18); color: #cbd5e1; }
html[data-theme="dark"] .badge-deferred { background: rgba(234,179,8,.16); color: #eab308; }
html[data-theme="dark"] .badge-bounced { background: rgba(146,64,14,.22); color: #d2854c; }
html[data-theme="dark"] .badge-failed { background: rgba(239,68,68,.16); color: #f87171; }
html[data-theme="dark"] .badge-info { background: rgba(56,189,248,.18); color: #7dd3fc; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: 12px; margin-bottom: 5px; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=search], input[type=url], select, textarea {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: var(--input-bg); color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
input:hover, select:hover, textarea:hover { border-color: rgba(var(--brand-rgb), 0.4); }
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(var(--brand-rgb), .35); border-color: var(--brand2);
  box-shadow: 0 0 0 5px rgba(var(--brand-rgb), 0.08);
}
/* Dropdowns: glass aesthetic (transparent overlay + blur) */
select {
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: var(--glass-border);
  cursor: pointer;
}
textarea { resize: vertical; font-family: Consolas, Menlo, monospace; font-size: 13px; line-height: 1.5; }
textarea.code { min-height: 340px; }
.field { margin-bottom: 12px; }
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px;
}
.form-grid .span2 { grid-column: span 2; }
.form-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.form-row .form-row { margin: 0; }
.form-row .grow { flex: 1; min-width: 160px; }
.inline { display: inline; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.seg label {
  border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px;
  cursor: pointer; font-weight: 500; font-size: 11px; margin: 0;
  background: var(--input-bg);
  transition: background .2s, border-color .2s, transform .2s;
}
.seg label:hover { border-color: var(--brand2); transform: translateY(-1px); }
.seg label:has(input:checked) { background: var(--chip-bg); border-color: var(--brand2); color: var(--brand); }
.seg input { display: none; }
.step-arrow { color: var(--muted); font-size: 14px; line-height: 1; font-weight: 600; }
.step-loc-mobile { display: none; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; margin: 6px 0; }
.check input { width: 15px; height: 15px; accent-color: var(--brand); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border: 1px solid transparent; border-radius: 10px;
  padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--btn-bg); color: var(--ink);
  transition: transform .2s, box-shadow .2s, filter .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(.97); text-decoration: none; box-shadow: 0 6px 14px rgba(17,24,39,.08); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.3);
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 10px 22px rgba(var(--brand-rgb), 0.4); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--brand);
  color: var(--ink);
  box-shadow: none;
}
.btn-outline:hover {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.3);
}
body:not([data-page="dashboard"]) .topbar-actions .btn-primary {
  background: transparent;
  border: 1.5px solid var(--brand);
  color: var(--ink);
  box-shadow: none;
}
body:not([data-page="dashboard"]) .topbar-actions .btn-primary:hover {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.3);
}
html[data-theme="dark"] body:not([data-page="dashboard"]) .topbar-actions .btn-primary {
  color: #fff;
}
html[data-theme="dark"] body:not([data-page="dashboard"]) .topbar-actions .btn-primary:hover {
  color: #fff;
}
body:not([data-page="dashboard"]) .card-head .btn-primary {
  background: transparent;
  border: 1.5px solid var(--brand);
  color: var(--ink);
  box-shadow: none;
}
body:not([data-page="dashboard"]) .card-head .btn-primary:hover {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.3);
}
html[data-theme="dark"] body:not([data-page="dashboard"]) .card-head .btn-primary {
  color: #fff;
}
html[data-theme="dark"] body:not([data-page="dashboard"]) .card-head .btn-primary:hover {
  color: #fff;
}
.btn-danger { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: var(--danger); color: #fff; box-shadow: 0 8px 18px rgba(220,38,38,.3); }
.btn-ghost { background: var(--input-bg); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand2); color: var(--brand); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-plus { display: inline-block; font-size: 16px; font-weight: 700; line-height: 1; vertical-align: -2px; margin-right: 3px; }
.btn-block { width: 100%; }

html[data-theme="dark"] .btn-danger { background: rgba(239,68,68,.14); color: #f87171; border-color: rgba(239,68,68,.3); }
html[data-theme="dark"] .btn-danger:hover { background: var(--danger); color: #fff; }

/* ---------- misc ---------- */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.small, .muted, .stat-label, .urole, .bar-label, .help-desc, .dz-sub, .card-help { font-family: 'Helvetica Now', 'Segoe UI', Roboto, Arial, sans-serif; font-weight: 300; }
.flash {
  padding: 11px 14px; border-radius: 10px; margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-weight: 500;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}
.flash-success { background: rgba(0,170,77,.14); color: #00AA4D; border-color: rgba(0,170,77,.3); }
.flash-error { background: rgba(239,68,68,.1); color: #7f1d1d; border-color: rgba(239,68,68,.25); }
.flash-info { background: rgba(14,165,233,.1); color: #075985; border-color: rgba(14,165,233,.25); }
.flash-x { background: none; border: none; font-size: 16px; cursor: pointer; color: inherit; }
html[data-theme="dark"] .flash-success { color: #00AA4D; }
html[data-theme="dark"] .flash-error { color: #fca5a5; }
html[data-theme="dark"] .flash-info { color: #7dd3fc; }

.grid-2 { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.grid-2 > *, .cards > * { min-width: 0; } /* grid items must be allowed to shrink */
.lists-import-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}
.lists-import-grid .card { margin-bottom: 0; }
.lists-import-grid .att-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.lists-import-grid .att-item:hover { border-color: var(--brand2); background: var(--chip-bg); transform: translateY(-1px); }
.lists-import-grid .att-item .btn { flex-shrink: 0; }
.card-help pre, .card pre { background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 10px; overflow-x: auto; font-size: 12px; }
.cron-copy-row { display: flex; align-items: center; gap: 10px; }
.cron-copy-row pre { flex: 1; min-width: 0; margin: 0; padding: 10px 14px; }
.cron-copy-row pre code { white-space: normal; word-break: break-all; }
.cron-copy-row .btn { flex-shrink: 0; }
.cron-collapse { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cron-collapse summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; cursor: pointer; list-style: none;
  font-size: 13px; font-weight: 600; color: var(--brand);
  user-select: none; transition: background .15s;
}
.cron-collapse summary::-webkit-details-marker { display: none; }
.cron-collapse summary:hover { background: var(--chip-bg); }
.cron-collapse .cron-chev { transition: transform .2s; flex-shrink: 0; }
.cron-collapse[open] .cron-chev { transform: rotate(180deg); }
.cron-collapse .cron-collapse-body { padding: 4px 12px 12px; border-top: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.chip {
  background: var(--chip-bg); color: var(--brand); border: 1px solid var(--chip-border);
  padding: 3px 10px; border-radius: 99px; font-size: 12px; cursor: pointer;
  user-select: none;
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.chip:hover { transform: scale(1.06); filter: brightness(.96); box-shadow: 0 4px 10px rgba(var(--brand-rgb), 0.2); }
.chip-mail { background: rgba(0,170,77,.14); color: #00AA4D; border-color: rgba(0,170,77,.3); }
html[data-theme="dark"] .chip { color: #00AA4D; }
html[data-theme="dark"] .chip-mail { background: rgba(0,170,77,.16); color: #00AA4D; border-color: rgba(0,170,77,.35); }
.chip.muted { cursor: default; background: var(--btn-bg); color: var(--muted); border-color: var(--line); }
.chip.muted:hover { transform: none; box-shadow: none; filter: none; }
.pager { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.page-link {
  min-width: 30px; text-align: center; padding: 5px 9px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--input-bg);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.page-link:hover { transform: translateY(-2px); border-color: var(--brand2); text-decoration: none; }
.page-link.cur {
  background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(var(--brand-rgb), 0.35);
}
.panel {
  border: 1px dashed var(--line); border-radius: 10px;
  padding: 12px 16px; margin-bottom: 14px; background: var(--panel2);
}
.pointer { cursor: pointer; font-weight: 600; color: var(--brand); }
.filters {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
#txFilterForm { flex-wrap: nowrap; gap: 8px; }
#txFilterForm select { flex: 0 0 30%; min-width: 0; }
.chart-toggles { display: flex; gap: 12px; flex-wrap: wrap; }
.chart-toggles .check {
  margin: 0; font-size: 12px; cursor: pointer;
  padding: 6px 12px; border-radius: 99px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.chart-toggles .check:hover { border-color: var(--brand2); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(var(--brand-rgb), .12); }
.chart-toggles .check:has(input:checked) { background: var(--chip-bg); border-color: var(--brand2); color: var(--brand); }
.chart-toggles .check input {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  margin: 0; cursor: pointer; flex-shrink: 0;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
  transition: all .15s;
}
.chart-toggles .check input:checked {
  border-color: var(--brand);
  background: radial-gradient(circle, #fff 0 32%, transparent 34%), var(--brand);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .15), 0 0 10px rgba(var(--brand-rgb), .35);
}
.chart-wrap {
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 14px 16px;
  min-height: 320px;
  position: relative;
  box-shadow: var(--shadow);
}
.chart-wrap canvas, .tx-chart-box { display: block; width: 100%; }
#chartStatus { text-align: center; padding: 6px 0 0; }
#txTooltip {
  position: absolute; pointer-events: none; z-index: 5;
  padding: 8px 10px; border-radius: 10px;
  background: var(--glass-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  font-size: 12px; line-height: 1.5; color: var(--ink);
  opacity: 0; transition: opacity .12s; white-space: nowrap;
}

/* ---------- spinners & live state ---------- */
.spin {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: -2px; margin-right: 6px;
}
.spin[hidden] { display: none !important; }
.spin-green {
  border-color: rgba(var(--brand-rgb), .25); border-top-color: var(--brand);
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.live-pill {
  display: inline-flex; align-items: center;
  margin-top: 10px; padding: 7px 14px;
  border-radius: 99px; font-size: 13px; font-weight: 600;
  background: var(--chip-bg); color: var(--brand);
  border: 1px solid var(--chip-border);
}
.live-pill[hidden] { display: none; }
.live-pill.paused {
  background: var(--btn-bg);
  color: var(--muted);
  border-color: var(--line);
}
.bar-fill.live {
  background: linear-gradient(90deg, var(--brand), var(--brand2), var(--brand));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 0% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- modal (glass) ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(15,23,42,.5);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal[hidden] { display: none; }
.modal-box {
  background: var(--glass-strong); color: var(--ink);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  width: min(860px, 100%);
  max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; }
#confirmMsg { white-space: pre-line; }
.modal-sm { width: min(430px, 100%); }
.modal-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 18px; border-top: 1px solid var(--line);
}
.modal-body { flex: 1; overflow: auto; padding: 14px 18px; }
.modal-body iframe { width: 100%; height: 60vh; border: 1px solid var(--line); border-radius: 8px; background: var(--input-bg); }
.modal-body pre { white-space: pre-wrap; background: var(--panel2); padding: 12px; border-radius: 8px; }

/* ---------- help popover ---------- */
.help { position: relative; display: inline-block; vertical-align: middle; }
.help-q {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; margin-left: 6px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--btn-bg);
  color: var(--muted);
  font-size: 12px; font-weight: 700; font-family: inherit;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.help-q:hover, .help.open .help-q {
  background: var(--brand); color: #fff; border-color: transparent;
  transform: scale(1.08);
}
.help-pop {
  position: absolute; top: calc(100% + 10px); left: 0;
  width: 360px; max-width: calc(100vw - 48px);
  background: var(--glass-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(0,0,0,.22);
  padding: 16px;
  z-index: 130;
  opacity: 0; visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility .2s;
  cursor: default;
  font-weight: 400;
}
.help-pop::before {
  content: '';
  position: absolute; top: -7px; left: 22px;
  width: 12px; height: 12px;
  background: var(--glass-strong);
  border-left: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border);
  transform: rotate(45deg);
}
.help:hover .help-pop, .help.open .help-pop,
.help-q:focus-visible + .help-pop {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.help-title { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.help-desc { font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 12px; }
.help-desc code {
  background: var(--chip-bg); border: 1px solid var(--chip-border);
  color: var(--brand); border-radius: 4px; padding: 0 4px; font-size: 12px;
}
.help-video {
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line);
  background: #0f172a;
  margin-bottom: 12px;
}
.help-video video { display: block; width: 100%; }
.help-video-placeholder {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 16px; color: #94a3b8; font-size: 12px; line-height: 1.5;
}
.help-play {
  flex: 0 0 auto;
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--brand-rgb), 0.2);
  color: var(--brand2); font-size: 16px;
  box-shadow: 0 0 0 6px rgba(var(--brand-rgb), 0.12);
}
.help-video-placeholder code { color: #7dd3fc; }
.help-mini { overflow: hidden; border-radius: 8px; border: 1px solid var(--line); }
.help-sheet { width: 100%; border-collapse: collapse; font-size: 12px; }
.help-sheet th {
  background: rgba(var(--brand-rgb), 0.14); color: var(--brand);
  text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.help-sheet td {
  padding: 6px 9px; border-bottom: 1px solid var(--line); color: var(--ink);
}
.help-sheet tr:last-child td { border-bottom: none; }
.help-sheet td:first-child { border-right: 1px solid var(--line); }
.help-sheet td:nth-child(2) { border-right: 1px solid var(--line); }

/* ---------- attachments ---------- */
.att-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.att-item {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; background: var(--input-bg);
  transition: border-color .2s, background .2s;
}
.att-item:hover { border-color: var(--brand2); background: var(--chip-bg); }
.att-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.att-pin { opacity: .7; }

/* ---------- upload dropzone ---------- */
.dropzone {
  border: 2px dashed var(--dropzone-border);
  border-radius: 14px;
  background: var(--dropzone-bg);
  padding: 44px 20px;
  text-align: center;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.dropzone:hover, .dropzone.dragover, .dropzone:focus {
  background: var(--chip-bg);
  border-color: var(--brand2);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(var(--brand-rgb), 0.15);
  outline: none;
}
.dz-icon {
  font-size: 36px; color: var(--brand2); line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(var(--brand-rgb), 0.4));
}
.dz-title { font-weight: 600; font-size: 15px; margin: 12px 0 4px; }
.dz-sub { color: var(--muted); font-size: 13px; }
.dz-link { color: var(--brand); font-weight: 600; }
.dz-file {
  margin-top: 16px; display: inline-block;
  background: var(--chip-bg); border: 1px solid var(--chip-border); color: var(--brand);
  border-radius: 99px; padding: 6px 18px; font-size: 13px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(var(--brand-rgb), 0.15);
}
.dz-error { color: var(--danger); margin-top: 12px; font-size: 13px; font-weight: 600; }
.dz-progress { margin-top: 16px; text-align: center; }
.dz-progress .bar.big { margin: 6px 0; }
.dz-progress[hidden] { display: none; }

/* ---------- profile picture ---------- */
.profile-actions { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 200px; }
.profile-actions .form-row { margin: 0; flex-wrap: nowrap; }
.profile-actions input[type="file"] { width: auto; max-width: 100%; min-width: 0; }

/* ---------- profile two-column layout ---------- */
.profile-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; width: 100%; min-width: 0; margin-bottom: 20px; }
.profile-two-col .card { height: 100%; min-width: 0; padding: 20px; box-sizing: border-box; }
.profile-col-left { display: flex; flex-direction: column; gap: 0; order: 2; min-width: 0; }
.profile-col-right { display: flex; flex-direction: column; gap: 0; order: 1; min-width: 0; }

/* ---------- profile page tabs & grids ---------- */
body[data-page="profile"] {
  --profile-gap: 18px;
  --tab-ink: var(--muted);
  --tab-bg: var(--glass);
}
/* Container wrapper: sticky under the nav + anchors the right-edge fade mask */
.profile-tabs-wrapper {
  position: sticky;
  top: 0;
  z-index: 30;
  width: auto;
  background: var(--bg);
  margin: 0 -28px var(--profile-gap);
  padding: 0;
  border-bottom: 1px solid var(--line);
}
/* Horizontal scroll tab bar */
.profile-tabs {
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--tab-ink);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
  transition: all 0.15s ease-in-out;
}
.profile-tab:hover {
  color: var(--ink);
  background: var(--chip-bg);
}
.profile-tab.active {
  color: var(--brand);
  background: transparent;
  border-color: transparent;
  border-bottom-color: var(--brand);
  font-weight: 600;
  box-shadow: none;
}
.tab-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
/* Mobile: smaller tabs + right-edge overflow fade affordance */
@media (max-width: 768px) {
  .profile-tab {
    padding: 0.575rem 0.875rem;
    font-size: 0.8125rem;
  }
  .profile-tabs-wrapper::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 48px;
    background: linear-gradient(to right, transparent, var(--bg));
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.2s ease;
  }
}
.tab-panel {
  display: block;
  position: static;
  overflow: visible;
  isolation: isolate;
  min-height: 120px;
  padding-bottom: 32px;
}
.tab-panel[hidden] { display: none !important; }
.profile-settings-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--profile-gap); align-items: stretch;
}
.profile-settings-grid .card { margin: 0; height: 100%; min-width: 0; }
.profile-advert-limit {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 20px;
  background: var(--glass); color: var(--muted);
  font-size: 11px; font-weight: 700;
}
.advert-feature-count {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 20px;
  background: rgba(var(--brand-rgb), 0.12); color: var(--accent);
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.advert-feature-count.has-featured { background: rgba(255, 211, 77, 0.18); color: #b8860b; }
.biz-reindex-btn svg { vertical-align: -2px; margin-right: 4px; }
@media (min-width: 1200px) {
  .profile-settings-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .profile-settings-grid { grid-template-columns: 1fr; }
}

/* Profile page: bottom breathing space + guaranteed scrolling */
body[data-page="profile"] .content { padding-bottom: 48px; padding-top: 0; }
/* Profile settings: keep stacked glass cards flat so none render above the business details */
body[data-page="profile"] .card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body[data-page="profile"] .card:hover { transform: none; }
/* Referrals card anchors below the upper details/overview panel with owned spacing */
body[data-page="profile"] .card { margin-bottom: 12px; }
body[data-page="profile"] .profile-referrals-card {
  margin-top: 14px;
  position: static;
  clear: both;
}
@media (min-width: 901px) {
  /* Desktop profile: page-level scrolling (same model as mobile) so the
     inner .content scroll container can't re-stack/clip the stacked cards. */
  html:not(.browser-mobile) body[data-page="profile"] { overflow: visible; height: auto; }
  html:not(.browser-mobile) body[data-page="profile"] .main {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }
  html:not(.browser-mobile) body[data-page="profile"] .main .content {
    overflow: visible;
  }
}
@media (max-width: 900px) {
  .profile-tabs-wrapper { margin-left: -14px; margin-right: -14px; }
  body[data-page="profile"] .tab-panel { padding-bottom: 24px; }
}

/* ---------- profile type toggle ---------- */
.profile-type-bar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--input-bg); width: 100%; box-sizing: border-box;
}
.profile-type-label { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.profile-type-toggle { display: inline-flex; gap: 4px; margin-left: auto; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.profile-type-tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px;
  border: none; border-radius: 8px; background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background .15s, color .15s;
}
.profile-type-tab:hover:not(:disabled) { background: var(--panel); color: var(--ink); }
.profile-type-tab.active { background: var(--brand); color: #fff; }
.profile-type-tab:disabled { cursor: default; }
html[data-theme="dark"] .profile-type-tab.active { color: #fff; }

/* ---------- publish button & tooltip ---------- */
.biz-publish-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.biz-publish-status {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.biz-publish-status.published { background: rgba(34,197,94,.14); color: #16a34a; }
html[data-theme="dark"] .biz-publish-status.published { color: #4ade80; }
.biz-publish-status.unpublished { background: rgba(239,68,68,.14); color: #dc2626; }
html[data-theme="dark"] .biz-publish-status.unpublished { color: #f87171; }
.biz-publish-help-hint { display: inline-flex; align-items: center; gap: 6px; }
.biz-why-tooltip { position: relative; display: inline-flex; cursor: help; }
.biz-why-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; background: var(--border);
  font-size: 10px; font-weight: 700; color: var(--muted); line-height: 1;
}
.biz-why-popover {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  width: 260px; padding: 12px 14px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0,0,0,.22); font-size: 12px; line-height: 1.5;
  color: var(--ink); opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  cursor: default;
}
.biz-why-popover ul { margin: 6px 0 6px 16px; padding: 0; }
.biz-why-popover em { display: block; margin-top: 6px; font-style: normal; color: var(--muted); }
.biz-why-tooltip:hover .biz-why-popover,
.biz-why-tooltip:focus .biz-why-popover,
.biz-why-tooltip:focus-within .biz-why-popover { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- profile setup wizard ---------- */
.setup-overlay {
  position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(8, 11, 13, 0.86);
}
.setup-card {
  width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.4); color: var(--ink);
}
.setup-head { margin-bottom: 18px; }
.setup-title { font-size: 19px; font-weight: 700; color: var(--ink); }
.setup-subtitle { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.setup-progress { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.setup-progress-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.setup-progress-fill { height: 100%; width: 50%; border-radius: 999px; background: var(--brand); transition: width .25s ease; }
.setup-progress-text { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.setup-step { animation: setupFadeIn .18s ease; }
@keyframes setupFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.setup-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.setup-choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 18px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--input-bg); color: var(--ink); text-align: left; cursor: pointer;
  font-family: inherit; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.setup-choice:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(var(--brand-rgb),.14); transform: translateY(-1px); }
.setup-choice-icon {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; color: var(--brand);
  background: rgba(var(--brand-rgb),.1);
}
.setup-choice-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.setup-choice-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }
.setup-footer { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.setup-overlay .field { margin-bottom: 12px; }

/* ---------- profile advert slider ---------- */
.profile-advert-slider { position: relative; width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--glass); }
.profile-advert-slide { display: none; width: 100%; height: 100%; }
.profile-advert-slide.active { display: flex; align-items: center; justify-content: center; }
.profile-advert-slide img { width: 100%; height: 100%; object-fit: cover; }
.profile-advert-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 100%; color: var(--muted); }
.profile-advert-placeholder svg { opacity: .4; }
.profile-advert-placeholder span { font-size: 12px; }
.profile-advert-dots { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.profile-advert-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); border: none; cursor: pointer; transition: background .2s; }
.profile-advert-dot.active { background: var(--brand); }
.profile-advert-remove { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: background .2s; }
.profile-advert-remove:hover { background: rgba(220,50,50,.8); }
.profile-advert-edit-overlay {
  position: absolute; bottom: 10px; right: 10px; z-index: 2;
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 8px;
  background: rgba(0,0,0,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: #fff; border: 1px solid rgba(255,255,255,.15);
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.profile-advert-edit-overlay:hover { background: rgba(0,0,0,.65); border-color: rgba(255,255,255,.3); }

/* ---------- profile picture (clickable) ---------- */
.profile-pic-wrap { display: flex; align-items: center; gap: 16px; cursor: pointer; }
.profile-pic-wrap:hover .profile-avatar { border-color: var(--brand2); }
.profile-avatar {
  width: 76px; height: 76px; border-radius: 50%; aspect-ratio: 1;
  object-fit: cover; flex: 0 0 auto;
  border: 3px solid var(--brand);
  box-shadow: 0 8px 20px rgba(var(--brand-rgb), 0.3);
  transition: border-color .2s;
}
.profile-avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; font-size: 30px; font-weight: 700;
}
.profile-pic-info { flex: 1; }
.profile-pic-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.profile-pic-cats { font-size: 12px; color: var(--muted); margin-top: 2px; }
.profile-pic-hint { font-size: 11px; color: var(--brand); margin-top: 4px; }

/* ---------- business details inline edit ---------- */
.profile-linktree-editable { position: relative; }
.profile-linktree-edit-btn {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 6px;
  background: none; border: 1px solid var(--line); color: var(--muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s, border-color .2s;
}
.profile-linktree-edit-btn:hover { background: var(--glass); color: var(--brand); border-color: var(--brand); }
.profile-linktree-edit-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.profile-linktree-editable input,
.profile-linktree-editable select {
  width: 100%; padding: 6px 8px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--input-bg); color: var(--ink);
  font: inherit; font-size: 13px;
}
.profile-linktree-editable input:focus,
.profile-linktree-editable select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.profile-linktree-save-row { display: flex; gap: 6px; margin-top: 8px; }

/* ---------- multi-field (phone x3, email x3) ---------- */
.multi-field-group { display: flex; flex-direction: column; gap: 8px; }
.multi-field-row { display: flex; align-items: center; gap: 6px; }
.multi-field-row input { flex: 1; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--input-bg); color: var(--ink); font: inherit; font-size: 13px; }
.multi-field-row input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.multi-field-add {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 6px; border: 1px dashed var(--line);
  background: none; color: var(--brand); font: inherit; font-size: 12px;
  font-weight: 600; cursor: pointer; transition: background .2s;
}
.multi-field-add:hover { background: var(--glass); }
.multi-field-remove {
  width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0;
  background: none; border: 1px solid var(--line); color: var(--muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: background .2s, color .2s;
}
.multi-field-remove:hover { background: rgba(220,50,50,.1); color: #e74c3c; border-color: #e74c3c; }

/* ---------- profile linktree ---------- */
.profile-linktree { display: flex; flex-direction: column; gap: 0; }
.profile-linktree-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.profile-linktree-item:last-child { border-bottom: none; }
.profile-linktree-icon {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px;
  background: var(--chip-bg); border: 1px solid var(--chip-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
}
.profile-linktree-content { flex: 1; min-width: 0; }
.profile-linktree-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); margin-bottom: 2px; }
.profile-linktree-value { font-size: 13px; color: var(--ink); word-break: break-word; }
input[type="file"]::file-selector-button {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; border: none; border-radius: 8px;
  padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer;
  margin-right: 10px;
  box-shadow: 0 4px 10px rgba(var(--brand-rgb), 0.25);
  transition: filter .2s, transform .2s;
}
input[type="file"]::file-selector-button:hover { filter: brightness(1.05); transform: translateY(-1px); }

.dropzone-sm { padding: 26px 16px; }
.att-progress { margin-top: 14px; text-align: center; }
.att-progress .bar.big { margin: 6px 0; }
.att-progress[hidden] { display: none; }

/* ---------- media library (hosted email-body images) ---------- */
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.field-label-row label { margin-bottom: 0; }
.media-panel { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--panel2); }
.media-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 8px; }
.media-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 5px; background: var(--panel); min-width: 0; }
.media-item.media-insert { cursor: pointer; text-align: left; font-family: inherit; color: inherit; width: 100%; transition: border-color .2s, transform .2s; }
.media-item.media-insert:hover { border-color: var(--brand2); transform: translateY(-1px); }
.media-thumb { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; background: var(--input-bg); display: block; }
.media-insert .media-thumb { height: 70px; }
.media-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.media-btn-row { display: flex; gap: 6px; }
.media-btn-row .btn { flex: 1; text-align: center; }

.campaign-meta .meta-chunk { display: inline-block; margin-right: 14px; }

/* ---------- rich text editor (formatted text body) ---------- */
.rt-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 8px 10px;
  background: var(--panel2); border: 1px solid var(--line); border-bottom: none;
  border-radius: 10px 10px 0 0;
}
.rt-btn {
  min-width: 30px; height: 30px; padding: 0 9px;
  font-family: 'Helvetica Now', 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 13px; font-weight: 600; color: var(--ink);
  background: var(--input-bg); border: 1px solid var(--line); border-radius: 7px;
  cursor: pointer; transition: border-color .2s, transform .15s;
}
.rt-btn:hover { border-color: var(--brand2); color: var(--brand); transform: translateY(-1px); }
.rt-select {
  width: auto; height: 30px; padding: 0 6px; font-size: 12px;
  background: var(--input-bg); border: 1px solid var(--line); border-radius: 7px;
  color: var(--ink);
}
.rt-color {
  width: 36px; height: 30px; padding: 2px;
  background: var(--input-bg); border: 1px solid var(--line); border-radius: 7px;
  cursor: pointer;
}
.rt-sep { width: 1px; height: 20px; background: var(--line); margin: 0 2px; }
.rt-editor {
  min-height: 220px; max-height: 430px; overflow-y: auto;
  padding: 10px 12px; margin: 0;
  background: var(--input-bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 0 0 10px 10px;
  font-size: 14px; line-height: 1.6;
  transition: border-color .2s, box-shadow .2s;
}
.rt-editor:focus {
  outline: 2px solid rgba(var(--brand-rgb), .35); border-color: var(--brand2);
  box-shadow: 0 0 0 5px rgba(var(--brand-rgb), 0.08);
}
.rt-editor div { min-height: 1.2em; }
.rt-editor ul, .rt-editor ol { padding-left: 26px; margin: 4px 0; }
.rt-editor a { color: var(--brand); }

/* ---------- login (glass) ---------- */
.login-body {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: linear-gradient(135deg, #0c1a12 0%, #053d22 60%, #003d1c 100%);
}
.login-body::before {
  content: '';
  position: fixed; width: 560px; height: 560px; border-radius: 50%;
  top: -140px; right: -120px;
  background: radial-gradient(circle, rgba(0, 170, 77, 0.35), transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}
.login-card { background: var(--glass-strong); color: var(--ink); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border: 1px solid var(--glass-border); border-radius: 18px; padding: 36px; width: min(380px, 92vw); box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.login-brand { padding: 0 0 16px; color: var(--ink); }
.login-sub { color: var(--muted); margin: 22px 0 26px; text-align: center; }
.login-card label { margin-top: 12px; }
.login-card .btn { margin-top: 18px; }
.login-card .btn-primary:hover { transform: translateY(-2px); }

/* ---------- login split (two-column: media + auth form, follow magnificent.ai) ---------- */
.login-split-page { display: block; padding: 0; background: var(--bg); height: 100vh; max-height: 100vh; overflow: hidden; }
.login-split-page::before { display: none; }
.login-split {
  display: grid; grid-template-columns: 1fr 1fr;
  width: 100%; height: 100%; max-height: 100%; min-height: 0; overflow: hidden;
}
/* Left media column — same colour as the main background (theme-aware) */
.login-media-col {
  display: flex; align-items: center; justify-content: center;
  min-height: 0;
  padding: 0;
  background: var(--bg); overflow: hidden; position: relative;
}
.login-media-card {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 0; overflow: hidden;
  background: #e9f0ed;
  --login-map-land: #e9f0ed;
  --login-map-land-tint: #f3f7f4;
  --login-map-stroke: rgba(15, 23, 42, .10);
  --login-map-stroke-s: rgba(15, 23, 42, .20);
  --login-map-snap: rgba(0, 170, 77, .16);
}
.login-media-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* SA map background — inline outlines, pans to random town/province spot every 7s */
.login-map {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; overflow: hidden;
}
.login-map-pan {
  transform-box: view-box;
  transform-origin: 334.5px 283.5px;
  transition: transform 2600ms cubic-bezier(.22, .8, .36, 1);
  will-change: transform;
}
.login-map-pan.zoom { transition-duration: 3200ms; }
.login-map-fill .prov {
  fill: var(--login-map-land);
  stroke: var(--login-map-stroke);
  stroke-width: 1;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: fill .6s ease;
}
.login-map-fill .prov:nth-child(2n) { fill: var(--login-map-land-tint); }
.login-map-fill .prov.on {
  fill: var(--login-map-snap);
  stroke: var(--login-map-stroke-s);
}
/* Dark theme: dark map, white icon + text */
html[data-theme="dark"] .login-media-card {
  background: #0b0e0d;
  --login-map-land: #0d151c;
  --login-map-land-tint: #091017;
  --login-map-stroke: rgba(255, 255, 255, .08);
  --login-map-stroke-s: rgba(255, 255, 255, .16);
  --login-map-snap: rgba(0, 170, 77, .20);
}
html[data-theme="dark"] .login-media-scrim {
  background: linear-gradient(to bottom, rgba(10, 14, 17, .72), rgba(10, 14, 17, .16) 35%, rgba(10, 14, 17, .16) 65%, rgba(10, 14, 17, .78));
}
html[data-theme="dark"] .login-auth-icon {
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .45));
}
html[data-theme="dark"] .login-auth-icon .fil0 { fill: #fff; }
html[data-theme="dark"] .login-auth-title {
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .4);
}
@media (prefers-reduced-motion: reduce) {
  .login-map-pan { transition: none; transform: none !important; }
  .login-map-fill .prov.on { transition: none; }
}
.login-media-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(237, 243, 239, .78), rgba(237, 243, 239, .12) 34%, rgba(237, 243, 239, .12) 66%, rgba(237, 243, 239, .82));
}
.login-map-label {
  pointer-events: none;
  width: 100%; box-sizing: border-box; text-align: center;
  padding: 0 24px; margin: 18px auto 0;
  font-family: 'Zona', 'Helvetica Now', 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 1.1rem; font-weight: 600; letter-spacing: .01em;
  color: rgba(15, 23, 42, .88);
  text-shadow: 0 1px 10px rgba(255, 255, 255, .35);
  opacity: 0; transform: translateY(5px);
  transition: opacity .55s ease, transform .55s ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.login-map-label.in { opacity: 1; transform: translateY(0); }
html[data-theme="dark"] .login-map-label {
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .4);
}
/* Left-panel feature slider — two slides crossfade every 6s (JS toggles .active) */
.login-auth-slider {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.login-auth-slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transform: translateY(8px) scale(.88);
  transition: opacity .7s ease, transform .8s cubic-bezier(.22, .8, .36, 1);
}
.login-auth-slide.active {
  opacity: 1; visibility: visible; transform: translateY(0) scale(1);
}
.login-auth-icon {
  width: 180px; height: auto; max-width: 58%;
  overflow: visible;
  filter: drop-shadow(0 10px 22px rgba(15, 23, 42, .22));
}
.login-auth-icon .fil0 { fill: #10151a; }
.login-auth-title {
  margin-top: 72px;
  font-family: 'Zona', 'Helvetica Now', 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 1.6rem; font-weight: 700; letter-spacing: .01em;
  color: #10151a;
  text-shadow: 0 1px 10px rgba(255, 255, 255, .35);
}
.services-ring {
  transform-origin: 33.7px 36.4px; transform-box: view-box;
  animation: login-spin 6s linear infinite;
}
.login-magnet {
  transform-origin: center; transform-box: fill-box;
  animation: login-magnet-float 5s ease-in-out infinite;
}
.login-profile {
  transform-origin: center; transform-box: fill-box;
  animation: login-profile-attract 3.2s ease-in-out infinite;
}
.login-spark.login-spark-a {
  transform-origin: center; transform-box: fill-box;
  animation: login-spark-pulse-a 1.6s ease-in-out infinite;
}
.login-spark.login-spark-b {
  transform-origin: center; transform-box: fill-box;
  animation: login-spark-pulse-b 2.1s ease-in-out infinite;
}
@keyframes login-spin {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(72deg); }
  50% { transform: rotate(180deg); }
  75% { transform: rotate(288deg); }
  100% { transform: rotate(360deg); }
}
@keyframes login-magnet-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-7px) rotate(3deg); }
}
@keyframes login-profile-attract {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-12px, 10px) scale(1.08); }
}
@keyframes login-spark-pulse-a {
  0%, 100% { opacity: .2; transform: translate(0, 0) scale(.82); }
  50% { opacity: 1; transform: translate(-10px, 8px) scale(1.3); }
}
@keyframes login-spark-pulse-b {
  0%, 100% { opacity: .2; transform: translate(0, 0) scale(.9); }
  50% { opacity: 1; transform: translate(-14px, 12px) scale(1.2); }
}
@media (prefers-reduced-motion: reduce) {
  .login-auth-slide { transition: none; }
  .services-ring,
  .login-magnet, .login-profile, .login-spark { animation: none; }
}
/* Right auth column — clean, theme-aware background; card blends into it (no shadow) */
.login-form-col {
  display: flex; align-items: center; justify-content: center;
  min-height: 0;
  padding: 24px; background: var(--bg); overflow-y: auto;
}
.login-form-col .login-card {
  width: min(420px, 92vw); margin: 0;
  background: var(--bg); color: var(--ink);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border: none; box-shadow: none;
}
.login-form-col .login-brand { justify-content: center; padding: 0 0 28px; }
.login-form-col h2 {
  font-family: 'Helvetica Now', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700; text-align: center;
}
@media (max-width: 900px) {
  html.login-page, html.login-page body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  .login-split-page { height: 100vh; height: 100dvh; max-height: 100vh; overflow: hidden; }
  .login-split { grid-template-columns: 1fr; height: 100vh; height: 100dvh; max-height: 100vh; overflow: hidden; }
  /* map fills the whole screen and sits behind the form */
  .login-media-col {
    position: fixed; inset: 0; z-index: 0; height: 100%; width: 100%;
    display: flex; align-items: center; justify-content: center;
    min-height: 0; padding: 0; overflow: hidden; background: #e9f0ed;
  }
  html[data-theme="dark"] .login-media-col { background: #0b0e0d; }
  .login-media-scrim { display: none; }
  .login-form-col {
    position: relative; z-index: 1;
    order: 1; padding: 20px 16px;
    display: flex; align-items: stretch; justify-content: center;
    background: transparent; overflow-y: hidden;
  }
  .login-form-col .login-card {
    margin: auto; width: min(420px, 100%); padding: 24px 20px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
  }
  html[data-theme="dark"] .login-form-col .login-card { background: rgba(22, 29, 33, 0.6); }
  .login-auth-slider .login-auth-icon,
  .login-auth-title,
  .login-map-label { display: none; }
  /* sign-up and landscape: allow the card column to scroll over the fixed map */
  .login-signup .login-form-col { overflow-y: auto; }
  @media (orientation: landscape) {
    .login-form-col { overflow-y: auto; }
  }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0;
    transform: translateX(-105%);
    transition: transform .25s ease;
    box-shadow: none;
    z-index: 60;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.35); }
  .sidebar, .sidebar.open { z-index: 95; }
  .main { margin-left: 0; }
  .nav-toggle { display: inline-flex; }
  .topbar { padding: 12px 16px 10px; align-items: flex-start; }
  .topbar h1 { font-size: 17px; }
  .content { padding: 14px 14px 32px; }
  .grid-2 { grid-template-columns: 1fr; }
  .lists-import-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
  .chart-wrap { min-height: 260px; padding: 8px; }
  textarea.code { min-height: 240px; }
  .dropzone { padding: 28px 14px; }
  .modal-box { width: 100%; }
  .table { font-size: 12px; }
  .bar { width: 90px; }
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: span 1; }
  .cards { grid-template-columns: 1fr 1fr; }
  .cards .card.stat { padding: 12px; }
  .stat-num { font-size: 20px; }
  .topbar { flex-wrap: nowrap; align-items: center; }
  .topbar-left { flex: 1 1 auto; min-width: 0; }
  .topbar h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-actions { width: auto; flex: 0 0 auto; }
  .topbar-actions .btn { flex: none; }
  .filters .form-row { width: 100%; }
  .filters select { flex: 1; min-width: 120px; }
  #txFilterForm { flex-wrap: nowrap; }
  #txFilterForm select { flex: 0 0 30%; min-width: 0; }
  .card { padding: 14px 12px; }
  .card-head { flex-direction: column; align-items: stretch; }
  .card-head .form-row { width: 100%; margin: 6px 0 0; gap: 8px; row-gap: 8px; }
  .card-head .form-row form.inline { display: flex; flex: 1 1 auto; }
  .card-head .form-row form.inline .btn { flex: 1; text-align: center; }
  .card-head .form-row > .btn { flex: 1 1 auto; text-align: center; }
  .profile-two-col { grid-template-columns: 1fr; }
  .profile-col-left, .profile-col-right { order: unset; }
  .profile-type-bar { flex-wrap: wrap; gap: 8px; }
  .profile-type-toggle { margin-left: 0; width: 100%; }
  .profile-type-toggle form { flex: 1; }
  .profile-type-tab { width: 100%; justify-content: center; }
  .profile-type-pub { margin-left: 0 !important; width: 100%; }
  .profile-type-pub .btn { width: 100%; justify-content: center; }
  .setup-choice-grid { grid-template-columns: 1fr; }
  .setup-card { padding: 18px 16px; }
  .bar.big { height: 12px; width: 100%; }
  .live-pill { width: auto; max-width: 100%; justify-content: flex-start; text-align: left; }
  .live-pill .pill-detail { display: none; }
  /* Keep campaign action buttons compact like desktop instead of stretched full-width */
  body[data-page="campaigns/view"] .card-head .form-row { flex-wrap: wrap; }
  body[data-page="campaigns/view"] .card-head .form-row form.inline { flex: 0 0 auto; }
  body[data-page="campaigns/view"] .card-head .form-row form.inline .btn,
  body[data-page="campaigns/view"] .card-head .form-row > .btn { flex: 0 0 auto; white-space: nowrap; }
  .campaign-meta .meta-chunk { display: block; margin: 0 0 4px 0; }
  .td-actions { white-space: normal; }
  .td-actions .btn, .td-actions form { margin: 2px; }
  .pager { gap: 4px; }
  .profile-actions { min-width: 100%; }
  .view-card > .form-row { flex-direction: column; align-items: stretch; }
  .view-card > .form-row .form-row { flex-direction: row; }
  .placeholder-help { display: none; }
  .camp-card .ct-divider .ct-actions-row { justify-content: flex-start; overflow: visible; flex-wrap: wrap; }
  .camp-card .ct-divider .ct-action-btns { flex-wrap: wrap; justify-content: flex-start; margin-left: 0; }
}

/* Lead Generator wizard */
body[data-page="leads"] .main { height: 100vh; overflow: hidden; }
body[data-page="leads"] .content { overflow: hidden; }
.lead-wizard-wrap { max-width: none; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.lead-wizard-wrap .seg { margin-bottom: 12px; }
.lead-step { flex: 1; min-height: 0; display: none; flex-direction: column; }
.lead-step.active { display: flex; }
.lead-step-scroll { flex: 1; min-height: 0; }
.lead-step-nav { display: flex; gap: 10px; padding: 12px 0 0; flex-shrink: 0; border-top: 1px solid var(--line); margin-top: auto; max-width: 600px; }
.lead-step-nav .btn { flex: 1; }

/* Lead-wizard "Next" actions — green outline; wizard buttons stay green with
   white fill on hover, map Next button is white text by default and turns
   green while the snake outline loop runs after a location is selected. */
body[data-page="leads"] .lead-step-nav .btn-primary {
  background: transparent;
  border: 1.5px solid var(--brand);
  color: var(--brand);
  box-shadow: none;
}
body[data-page="leads"] #leadMapNext {
  background: transparent;
  border: 1.5px solid var(--brand);
  color: #212121;
  box-shadow: none;
  position: relative;
}
html[data-theme="dark"] body[data-page="leads"] .lead-step-nav .btn-primary {
  color: var(--brand);
}
html[data-theme="dark"] body[data-page="leads"] .lead-step-nav .btn-primary:hover,
html[data-theme="dark"] body[data-page="leads"] #leadMapNext:hover {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.3);
}
html[data-theme="dark"] body[data-page="leads"] #leadMapNext {
  color: #fff;
}
body[data-page="leads"] .lead-step-nav .btn-primary:hover,
body[data-page="leads"] #leadMapNext:hover {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.3);
}
body[data-page="leads"] #leadMapNext.snake-ready {
  color: var(--brand);
}

/* Step 2 "Next" stays muted (no green outline/text) until a target category or
   custom category is selected — same highlight gating as the map Next button. */
body[data-page="leads"] #leadStep2Next {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--muted);
  box-shadow: none;
}
html[data-theme="dark"] body[data-page="leads"] #leadStep2Next {
  color: var(--muted);
}
body[data-page="leads"] #leadStep2Next:hover {
  background: var(--panel);
  color: var(--ink);
  box-shadow: none;
}
body[data-page="leads"] #leadStep2Next.snake-ready {
  border-color: var(--brand);
  color: var(--brand);
}
body[data-page="leads"] #leadStep2Next.snake-ready:hover {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.3);
}
html[data-theme="dark"] body[data-page="leads"] #leadStep2Next.snake-ready {
  color: var(--brand);
}
html[data-theme="dark"] body[data-page="leads"] #leadStep2Next.snake-ready:hover {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.3);
}

.chip-preset { cursor: pointer; display: none; }
.chip-preset.selected { background: var(--chip-bg); border-color: var(--brand2); color: var(--brand); }
.lead-custom-cat { margin-top: 12px; }
.lead-sel-heading { font-weight: 600; font-size: .78em; color: var(--muted); margin: 10px 0 4px; text-transform: uppercase; letter-spacing: .5px; }
.lead-sel-heading:first-child { margin-top: 0; }
#selectedCats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip-selected { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; background: var(--chip-bg); border: 1px solid var(--chip-border); font-size: .88em; }
.chip-x { background: none; border: none; cursor: pointer; font-size: 1.1em; color: var(--muted); padding: 0 2px; }
.chip-x:hover { color: var(--danger); }

/* Saved category lists in wizard */
.lead-saved-lists { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.lead-saved-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 14px; border-radius: 8px;
  background: var(--chip-bg); border: 1px solid var(--chip-border);
  cursor: pointer; transition: background .15s, border-color .15s;
}
.lead-saved-item:hover { background: rgba(0,170,77,.1); border-color: var(--brand); }
.lead-saved-name { font-weight: 600; font-size: .88em; color: var(--ink); }
.lead-saved-count { font-size: .75em; color: var(--muted); }

/* Lead location layout */
.lead-sec-head { font-weight: 700; font-size: 1em; margin-bottom: 2px; }
.lead-map-wrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: row; }
/* Blurred backdrop shown behind the steps popup so the map reads as "hidden" behind it. */
.lead-backdrop {
  position: absolute; inset: 0; z-index: 9;
  background: rgba(15,23,42,.18);
  backdrop-filter: blur(7px) saturate(.9);
  -webkit-backdrop-filter: blur(7px) saturate(.9);
  opacity: 0; visibility: hidden;
  transition: opacity .35s ease;
  border-radius: inherit;
}
.lead-backdrop.on { opacity: 1; visibility: visible; }
/* Visitor checked "Don't show again": hide the intro overlay + backdrop before
   first paint so it never flashes on load (class set by an inline script that
   runs before the overlay markup is parsed). */
html.no-intro-overlay .lead-map-overlay,
html.no-intro-overlay .lead-backdrop { display: none !important; }
.lead-map-overlay {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  text-align: center; z-index: 100;
  transition: opacity 0.4s ease;
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 38px 42px 30px;
  width: min(94vw, 760px);
  max-height: calc(100% - 24px);
  overflow-y: auto;
  box-shadow: 0 16px 52px rgba(0,0,0,.2);
}
.lead-map-overlay-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; font-size: 1.45em; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px;
}
.lead-map-overlay-close:hover { color: var(--ink); background: rgba(0,0,0,.06); }
.lead-overlay-grid {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 32px;
  align-items: center; text-align: left;
}
.lead-overlay-intro { text-align: center; }
.lead-overlay-icon {
  display: block; width: 150px; height: auto; overflow: visible;
  margin: 0 auto 10px;
  filter: drop-shadow(0 12px 24px rgba(15,23,42,.18));
}
.lead-map-overlay .fil0 { fill: var(--ink); }
.lead-map-overlay-title {
  font-size: 1.6em; font-weight: 800; letter-spacing: .01em;
  color: var(--ink); margin-bottom: 8px;
}
.lead-map-overlay-desc { font-size: .94em; color: var(--muted); margin-bottom: 0; }
.lead-overlay-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px; text-align: left;
}
.lead-overlay-steps li {
  display: flex; align-items: center; gap: 12px;
  font-size: .98em; font-weight: 500; color: var(--ink);
  padding: 11px 14px; border-radius: 12px;
  background: rgba(127,127,127,.08);
}
.lead-overlay-step-no {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; font-size: .9em;
  display: inline-flex; align-items: center; justify-content: center;
}
.lead-overlay-actions {
  display: flex; gap: 14px; justify-content: center; align-items: stretch;
  margin-top: 22px;
}
.lead-overlay-actions .btn {
  flex: 1 1 0; min-width: 0;
  padding: 15px 22px; font-size: 1.05em; font-weight: 700;
}
.lead-overlay-actions .btn-primary { border-radius: 13px; }
.lead-overlay-actions .btn-outline { border-radius: 13px; }
.lead-overlay-hide {
  display: inline-flex; align-items: center; gap: 11px;
  margin-top: 16px; padding: 9px 16px; border-radius: 999px;
  background: rgba(127,127,127,.10);
  border: 1px solid rgba(127,127,127,.22);
  font-size: .9em; font-weight: 600; color: var(--ink);
  cursor: pointer; user-select: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.lead-overlay-hide:hover { border-color: var(--brand); }
.lead-overlay-hide input {
  position: relative; flex: none; width: 40px; height: 22px; margin: 0;
  appearance: none; -webkit-appearance: none; border-radius: 999px;
  background: rgba(127,127,127,.38); cursor: pointer; outline: none;
  transition: background .2s;
}
.lead-overlay-hide input::before {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4);
  transition: transform .2s;
}
.lead-overlay-hide input:checked { background: var(--brand); }
.lead-overlay-hide input:checked::before { transform: translateX(18px); }
.lead-overlay-hide:has(input:checked) {
  border-color: var(--brand); color: var(--brand);
  background: rgba(var(--brand-rgb), .12);
}
.lead-overlay-hide input:focus-visible { box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .3); }

/* --- Services intro overlay: compact, scannable variant --- */
.lead-map-overlay-svc {
  padding: 26px 30px 22px;
  width: min(94vw, 620px);
  text-align: left;
}
.lead-overlay-svc-body { display: grid; gap: 20px; }
.lead-overlay-svc-head { display: flex; align-items: center; gap: 18px; text-align: left; }
.lead-overlay-svc-logo {
  flex: none; width: 64px; height: auto; overflow: visible;
}
.lead-overlay-svc-head-text .lead-map-overlay-title { font-size: 1.4em; margin-bottom: 4px; }
.lead-overlay-svc-head-text .lead-map-overlay-desc { font-size: .92em; margin-bottom: 0; }
.lead-overlay-steps-svc {
  display: flex; gap: 12px;
}
.lead-overlay-steps-svc li {
  position: relative; flex: 1; flex-direction: column;
  text-align: center; gap: 7px;
  padding: 13px 10px;
}
.lead-overlay-steps-svc li:not(:first-child)::before {
  content: ''; position: absolute; left: -10px; top: 50%;
  width: 8px; height: 8px; opacity: .55;
  border-top: 2px solid var(--muted); border-right: 2px solid var(--muted);
  transform: translateY(-50%) rotate(45deg);
}
.lead-overlay-steps-svc .lead-overlay-step-no { width: 26px; height: 26px; font-size: .82em; }
.lead-overlay-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid rgba(127,127,127,.16);
}
.lead-overlay-footer .lead-overlay-hide { margin-top: 0; }
.lead-overlay-footer .lead-overlay-actions { margin-top: 0; }
.lead-overlay-footer .lead-overlay-actions .btn { flex: 0 0 auto; padding: 11px 20px; font-size: .98em; }

/* --- Leads intro overlay: split layout, stroke magnet, lean copy --- */
.lead-map-overlay-leads {
  padding: 26px 30px 22px;
  width: min(94vw, 620px);
  text-align: left;
}
.lead-overlay-leads-body { display: grid; gap: 22px; text-align: left; }
.lead-overlay-leads-head { display: flex; align-items: center; gap: 20px; text-align: left; }
.lead-overlay-leads-logo {
  flex: none; width: 64px; height: auto; overflow: visible;
}
.lead-overlay-leads-side { min-width: 0; display: grid; gap: 6px; }
.lead-overlay-leads-side .lead-map-overlay-title { font-size: 1.4em; margin-bottom: 0; }
.lead-overlay-leads-side .lead-map-overlay-desc { font-size: .92em; margin-bottom: 0; }
.lead-overlay-steps-leads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: left; }
.lead-overlay-steps-leads li {
  flex-direction: column; gap: 7px;
  text-align: center; padding: 13px 8px;
}

/* Country selector + search: top bar spanning the map width */
.lead-topbar {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 30;
  display: flex; align-items: center; gap: 8px;
}
.lead-country-select { position: relative; flex-shrink: 0; margin-left: auto; }
.lead-country-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 12px 0 8px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  font-family: 'Helvetica Now', 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 13px; font-weight: 500; color: var(--ink);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  transition: border-color .2s, transform .2s;
}
.lead-country-btn:hover { border-color: var(--brand); transform: translateY(-1px); }
.lead-country-flag {
  display: inline-flex; width: 24px; height: 16px; border-radius: 3px;
  overflow: hidden; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.lead-country-flag[hidden] { display: none; }
.lead-country-flag .lead-country-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 3px; }
.lead-country-chev { flex-shrink: 0; opacity: .7; }
.lead-country-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 180px; z-index: 40;
  background: var(--glass-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.16); overflow: hidden;
}
.lead-country-menu[hidden] { display: none; }
.lead-country-opt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border: none; background: none; cursor: pointer;
  font-family: 'Helvetica Now', 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 13px; font-weight: 500; color: var(--ink);
  text-align: left; transition: background .12s;
}
.lead-country-opt:hover { background: var(--chip-bg); }
.lead-country-opt + .lead-country-opt { border-top: 1px solid var(--line); }

/* Search inside map (just wider than the country selector) */
.lead-map-search { position: relative; flex: 0 0 240px; width: 240px; min-width: 0; border-radius: 10px; }
@media (min-width: 1024px) { .lead-map-search { flex: 0 1 33.333%; width: 33.333%; max-width: 520px; } }

/* ── Green comet ring for the "next step" indicators ──────────────
   Conic-gradient streak that sweeps around the element leaving a fading
   trail (green hex #00AA4D). Radius = parent 10px + 3px so the ring's
   outer corners stay concentric (matched) with the element's rounded
   corners instead of misaligning like `inherit` did. */
@property --ring-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

.lead-map-search::before,
body[data-page="leads"] #leadMapNext::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 13px;
  padding: 2px;
  background: conic-gradient(from var(--ring-angle, 0deg),
    #00AA4D 0deg,
    rgba(0,170,77,.55) 36deg,
    rgba(0,170,77,.22) 76deg,
    rgba(0,170,77,0) 110deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
}
@keyframes ring-spin {
  from { --ring-angle: 1080deg; }
  to { --ring-angle: 0deg; }
}
.lead-map-search.snake-ready::before,
body[data-page="leads"] #leadMapNext.snake-ready::before {
  opacity: 1;
  animation: ring-spin 4.5s linear infinite;
}

/* Step 2 "Add a specific niche" box shows the same comet ring briefly when the
   step opens, drawing attention to the custom-category input. */
body[data-page="leads"] #leadStep2 .lead-custom-cat-single { position: relative; }
body[data-page="leads"] #leadStep2 .lead-custom-cat-single::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 13px;
  padding: 2px;
  background: conic-gradient(from var(--ring-angle, 0deg),
    #00AA4D 0deg,
    rgba(0,170,77,.55) 36deg,
    rgba(0,170,77,.22) 76deg,
    rgba(0,170,77,0) 110deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
}
body[data-page="leads"] #leadStep2 .lead-custom-cat-single.snake-ready::before {
  opacity: 1;
  animation: ring-spin 4.5s linear infinite;
}
/* Sidebar "Sign in" button gets the same comet ring on mobile so guests are
   drawn to sign in when they open the navigation drawer. */
.side-guest-btn { position: relative; }
.side-guest-btn::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 11px;
  padding: 2px;
  background: conic-gradient(from var(--ring-angle, 0deg),
    #00AA4D 0deg,
    rgba(0,170,77,.65) 48deg,
    rgba(0,170,77,.28) 110deg,
    rgba(0,170,77,0) 200deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
  animation: side-ring-spin 1.2s linear infinite;
}
@keyframes side-ring-spin {
  from { --ring-angle: 360deg; }
  to { --ring-angle: 0deg; }
}
@media (max-width: 900px) {
  .sidebar.open .side-guest-btn::before {
    opacity: 1;
  }
}
.lead-search-toast {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--glass-strong); backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border); border-radius: 8px;
  padding: 8px 14px; font-size: 12px; font-weight: 500; color: var(--ink);
  white-space: nowrap; z-index: 50; pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  animation: toast-in .2s ease, toast-out .2s ease 1.8s forwards;
}
@keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(4px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; } }
.lead-map-search input {
  width: 100%; height: 38px; padding: 0 36px 0 36px; border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  font-family: 'Helvetica Now', 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 14px; font-weight: 500; color: var(--ink);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.lead-search-spinner {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(var(--brand-rgb), .25); border-top-color: var(--brand);
  animation: lead-spin .6s linear infinite;
  pointer-events: none;
}
.lead-search-spinner[hidden] { display: none; }
.lead-search-icon {
  position: absolute; top: 50%; left: 12px; transform: translateY(-50%);
  width: 17px; height: 17px; pointer-events: none; opacity: .9;
  color: var(--muted); z-index: 1;
}
.lead-map-search input::placeholder {
  color: var(--muted); font-weight: 300; opacity: .85;
}
.lead-map-search input:focus { outline: none; border-color: var(--brand); }
.lead-map-search input:disabled {
  opacity: .45; cursor: not-allowed; background: var(--bar-bg);
}
.lead-map-search .lead-loc-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  margin-top: 4px;
}

/* Bottom bar inside map */
.lead-map-bottom {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-top: 1px solid var(--glass-border);
  border-radius: 0 0 12px 12px;
  gap: 8px;
  flex-shrink: 0;
}
.lead-history-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 8px;
  border: 1px solid var(--glass-border); background: var(--glass-strong);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--ink); font-size: .82em; font-weight: 500;
  cursor: pointer; transition: all .15s; flex-shrink: 0;
  text-decoration: none;
}
.lead-history-btn:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.lead-history-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.lead-history-btn svg { flex-shrink: 0; }
.lead-history-btn .nav-dot-leads { margin-left: auto; flex-shrink: 0; }
.lead-session-progress { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.lead-session-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--bar-bg); overflow: hidden; min-width: 60px; }
.lead-session-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--brand), var(--brand2)); transition: width .4s; width: 0; position: relative; overflow: hidden; }
.lead-session-text { font-size: 12px; color: var(--muted); white-space: nowrap; flex-shrink: 0; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
/* Animated sheen so in-flight progress reads as "working", not frozen. */
@keyframes lead-fill-sweep { 0% { transform: translateX(-130%); } 100% { transform: translateX(430%); } }
.lead-session-fill::after, .lead-progress-fill::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 34%;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.45), rgba(255,255,255,0));
  animation: lead-fill-sweep 1.6s linear infinite;
}
.lead-map-bottom .btn { flex-shrink: 0; }
.lead-map-chips-wrap {
  flex: 1; min-width: 0; max-width: calc(100% - 180px); position: relative; overflow: hidden;
}
.lead-map-chips-scroll {
  display: flex; flex-wrap: nowrap; gap: 6px;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0;
  touch-action: pan-x;
  cursor: grab;
  user-select: none;
  max-height: 34px;
  white-space: nowrap;
}
.lead-map-chips-scroll::-webkit-scrollbar { display: none; }
.lead-map-chips-scroll:active { cursor: grabbing; }
.lead-map-chips-scroll .chip-selected {
  flex-shrink: 0; white-space: nowrap;
  background: transparent; color: #000; border-color: var(--brand);
}
html[data-theme="dark"] .lead-map-chips-scroll .chip-selected { color: #fff; }
.lead-map-chips-scroll .chip-x { color: rgba(0,0,0,.5); }
.lead-map-chips-scroll .chip-x:hover { color: var(--brand); }
html[data-theme="dark"] .lead-map-chips-scroll .chip-x { color: rgba(255,255,255,.7); }
html[data-theme="dark"] .lead-map-chips-scroll .chip-x:hover { color: #fff; }
#leadMap { width: 100%; flex: 1; border-radius: 12px; border: 1px solid var(--line); min-height: 260px; position: relative; overflow: hidden; }

/* Category tabs scroll wrapper */
.cat-tabs-wrap { position: relative; }
.cat-tabs-scroll {
  display: flex; gap: 4px; overflow-x: auto; padding: 0 4px 10px; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; cursor: grab;
  scroll-padding: 0 4px; touch-action: pan-y;
}
.cat-tabs-scroll::-webkit-scrollbar { display: none; }
.cat-tabs-scroll.dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; }

.cat-tabs-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); display: flex; align-items: center;
  justify-content: center; cursor: pointer; transition: all .15s; box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.cat-tabs-arrow:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.cat-tabs-arrow.hidden { opacity: 0; pointer-events: none; }
.cat-tabs-arrow svg { width: 16px; height: 16px; }
.cat-tabs-arrow.left { left: 2px; }
.cat-tabs-arrow.right { right: 2px; }

.cat-tab {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); cursor: pointer; transition: all .15s;
  min-width: 80px; flex-shrink: 0; font-size: .78em; color: var(--ink);
  position: relative;
}
.cat-tab:hover { border-color: var(--brand2); background: var(--chip-bg); transform: translateY(-1px); }
.cat-tab:active { transform: scale(.97); }
.cat-tab.active { border-color: var(--brand); background: var(--brand); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(var(--brand-rgb), .25); }
.cat-tab.active .cat-tab-icon svg { stroke: #fff; }
.cat-tab.has-selected { border-color: var(--brand); }
.cat-tab.has-selected .cat-tab-icon svg { stroke: var(--brand); }
.cat-tab.active.has-selected .cat-tab-icon svg { stroke: #fff; }

.cat-tab-icon { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.cat-tab-icon svg { width: 22px; height: 22px; }
.cat-tab-name { font-weight: 600; white-space: nowrap; line-height: 1.2; }
.cat-tab-count {
  position: absolute; top: 4px; right: 4px; font-size: .65em; font-weight: 700;
  background: var(--brand); color: #fff; border-radius: 50%; width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.cat-tab.active .cat-tab-count { background: #fff; color: var(--brand); }

/* Category panels */
.cat-panel-wrap { position: relative; min-height: 60px; overflow: hidden; }

.cat-panel { display: none; animation: catPanelDrop .3s ease-out; }
.cat-panel.active { display: block; }
@keyframes catPanelDrop {
  0% { opacity: 0; transform: translateY(-12px); }
  100% { opacity: 1; transform: translateY(0); }
}

.cat-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; margin-bottom: 10px;
}
.cat-panel-title { font-weight: 600; font-size: .92em; color: var(--ink); }
.cat-panel-title strong { color: var(--brand); font-weight: 700; }
.cat-select-all-wrap {
  display: inline-flex; align-items: center; gap: 6px; background: var(--input-bg);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
}
.cat-select-all-toggle { display: none; }
.cat-select-all {
  border: none; background: none; color: var(--muted); font-size: .78em;
  font-weight: 600; cursor: pointer; padding: 0; user-select: none;
}
.cat-select-all-wrap:has(.cat-select-all-toggle:checked) {
  border-color: var(--brand);
  background: rgba(0,170,77,.12);
}
.cat-select-all-wrap:has(.cat-select-all-toggle:checked) .cat-select-all { color: var(--brand); }

/* Filter + custom niche input (per panel, below main icons) */
.cat-panel .lead-custom-cat { margin: 0 0 12px; }
.cat-panel .lead-custom-cat input {
  flex: 1; min-width: 0; max-width: none; padding: 8px 12px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--input-bg);
  font-size: .86em; color: var(--ink);
}
.cat-panel .lead-custom-cat input:focus { border-color: var(--brand); outline: none; }

/* Dense flex-wrap pill cluster (sub-categories) */
.cat-panel-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
}

.cat-chip {
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--chip-bg); font-size: .82em; color: var(--ink);
  cursor: pointer; transition: all .12s; white-space: nowrap; text-align: left;
}
.cat-chip:hover { border-color: var(--brand); background: rgba(var(--brand-rgb), .06); }
.cat-chip.selected {
  border-color: var(--brand);
  background: rgba(var(--brand-rgb), .12);
  color: var(--brand);
  font-weight: 600;
}
.cat-chip.filtered-out { display: none; }

.lead-custom-cat input { max-width: 280px; }

.lead-qty-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chip-qty {
  cursor: pointer; padding: 12px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); text-align: center; transition: all .15s;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.chip-qty:hover { border-color: var(--brand2); }
.chip-qty.active { background: var(--chip-bg); border-color: var(--brand2); font-weight: 600; }
.chip-qty-num { font-size: 1em; font-weight: 600; color: var(--ink); }
.chip-qty.active .chip-qty-num { color: var(--brand); }
.chip-qty-price { font-size: .82em; color: var(--muted); }
.chip-qty.active .chip-qty-price { color: var(--brand2); }
.chip-free { border-color: #00AA4D; }
.chip-free .chip-qty-price { color: #00AA4D; font-weight: 600; }
.chip-free:hover { border-color: #00AA4D; background: rgba(0,170,77,.06); }
.chip-free.chip-used { border-color: var(--line); }
.chip-free.chip-used .chip-qty-price { color: var(--muted); font-weight: 400; }
html[data-theme="dark"] .chip-qty-num { color: #fff; }
html[data-theme="dark"] .chip-qty.active .chip-qty-num { color: var(--brand); }

.lead-qty-row { display: flex; align-items: center; gap: 10px; }
.qty-step-btn {
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--ink); font-size: 22px; line-height: 1;
  cursor: pointer; transition: border-color .15s, background .15s; display: flex; align-items: center; justify-content: center;
}
.qty-step-btn:hover:not(:disabled) { border-color: var(--brand2); background: var(--chip-bg); }
.qty-step-btn:disabled { opacity: .45; cursor: not-allowed; }
.qty-input {
  width: 130px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--input-bg); color: var(--ink); font-size: 16px; font-weight: 600; text-align: center;
}
.qty-input:disabled { opacity: .5; }
.qty-input[readonly] { opacity: 1; cursor: default; }
.qty-range {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 14px;
  margin-top: 14px;
  accent-color: var(--brand2); cursor: pointer;
}
.qty-range:disabled { opacity: .45; cursor: not-allowed; }


.lead-free-badge { display: inline-block; padding: 1px 6px; border-radius: 4px; background: var(--brand); color: #fff; font-size: .75em; font-weight: 700; margin-left: 4px; }
.lead-price-display { text-align: center; }
.lead-price-card { display: inline-block; padding: 16px 32px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); }
.lead-price-label { font-size: .85em; color: var(--muted); margin-bottom: 4px; }
.lead-price-value { font-size: 28px; font-weight: 700; color: var(--brand); }
.lead-summary { margin-top: 8px; }
.lead-nav { display: flex; gap: 10px; justify-content: flex-end; padding: 10px 0 0; flex-shrink: 0; }

/* Loading spinner */
.lead-spinner {
  display: inline-block; width: 14px; height: 14px; flex-shrink: 0;
  border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: lead-spin .6s linear infinite;
  vertical-align: middle; margin-right: 4px;
}
@keyframes lead-spin { to { transform: rotate(360deg); } }
.lead-progress-bar { width: 100%; height: 8px; border-radius: 4px; background: var(--bar-bg); overflow: hidden; margin-bottom: 10px; display: none; }
.lead-progress-fill { height: 100%; width: 0; border-radius: 4px; background: var(--brand); transition: width .4s ease; position: relative; overflow: hidden; }
.lead-progress-stage { font-size: .92em; color: var(--muted); text-align: center; }

/* --- Location autocomplete --- */
.lead-loc-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 1000;
  background: var(--glass-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15); max-height: 300px; overflow-y: auto;
  margin-top: 4px;
}
.lead-loc-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--line);
  transition: background .12s;
}
.lead-loc-item:last-child { border-bottom: none; }
.lead-loc-item:hover { background: var(--chip-bg); }
.lead-loc-item strong { font-size: .95em; color: var(--ink); }
.lead-loc-item span { font-size: .82em; color: var(--muted); }
.lead-loc-empty { color: var(--muted); font-size: .9em; text-align: center; cursor: default; }
.lead-loc-empty:hover { background: none; }
.lead-type-badge { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: .7em; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; margin-left: 6px; vertical-align: middle; }
.lead-type-badge.badge-province { background: rgba(0,170,77,.13); color: #00AA4D; }
.lead-type-badge.badge-mainplace { background: rgba(0,170,77,.13); color: #00AA4D; }

/* Step nav right-justified button */
.seg-right-btn { margin-left: auto; }

/* Previous Generations fullscreen modal */
.lead-gens-modal {
  display: none; position: fixed; inset: 0; left: 230px; z-index: 9999;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  padding: 20px;
}
.lead-gens-modal.open { display: flex; }
.lead-gens-modal-inner {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; width: 100%; max-width: 960px;
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 16px 48px rgba(0,0,0,.2);
}
.lead-gens-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.lead-gens-modal-head h3 { margin: 0; font-size: 1.1em; }
.lead-gens-modal-close {
  background: none; border: none; font-size: 1.5em;
  color: var(--muted); cursor: pointer; padding: 4px 8px;
  line-height: 1;
}
.lead-gens-modal-close:hover { color: var(--ink); }
.lead-gens-modal-body {
  overflow: auto; padding: 16px 20px; flex: 1;
}
.lead-gens-mobile-row { display: none; }
.lead-gens-country {
  display: inline-block; margin-left: 4px; padding: 1px 6px;
  border-radius: 4px; background: var(--chip-bg); color: var(--brand);
  font-size: .7em; font-weight: 700; vertical-align: middle;
}
.lead-gens-mobile-date { font-size: .85em; color: var(--muted); margin-left: 8px; }
.lead-gens-mobile-actions { margin-left: auto; display: inline-flex; gap: 6px; }

/* Lead results page - 100vh no scroll */
body[data-page="leads/results"] .content {
  overflow: hidden;
  padding: 12px 28px 12px;
}
body[data-page="leads/results"] .card {
  margin-bottom: 12px;
}
body[data-page="leads/results"] .card:last-child {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}
body[data-page="leads/results"] .card:last-child > div[style*="overflow-x"] {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
}
body[data-page="leads/results"] .card:last-child .card-head {
  flex-shrink: 0;
}

@media (max-width: 900px) {
  body[data-page="leads/results"] .content {
    padding: 10px 14px 10px;
  }
  body[data-page="leads/results"] .card-head {
    flex-wrap: wrap;
    gap: 8px;
  }
  body[data-page="leads/results"] .card-head > div {
    display: flex;
    gap: 6px;
  }
}

@media (max-width: 900px) {
  .main { margin-left: 0; min-height: 100vh; display: flex; flex-direction: column; }
  body[data-page="leads"] .main,
  body[data-page="services"] .main { height: 100vh; overflow: hidden; }
  .lead-wizard-wrap { max-width: 100%; flex: 1; min-height: 0; overflow: hidden; }
.lead-step { flex: 1; min-height: 0; }
  .lead-map-wrap { position: relative; flex: 1; min-height: 0; width: 100%; border-radius: 0; border: none; }
  #leadMap { width: 100%; height: 100%; flex: none; border-radius: 0; border: none; }
  .lead-map-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 95; }
  .lead-map-bottom { border-radius: 0; }
  /* Map view full-bleed up to 900px too (large/landscape phones, tablets) */
  body[data-page="leads"] .main .content,
  body[data-page="services"] .main .content { padding: 0; }
  body[data-page="leads"] .lead-wizard-wrap > .lead-step:not(#leadStep1),
  body[data-page="services"] .lead-wizard-wrap > .lead-step:not(#leadStep1) { padding: 8px 12px; }
  .maplibregl-ctrl-top-right { top: 10px; }
  .lead-gens-modal { padding: 10px; left: 0; }
  .lead-gens-modal-inner { max-height: 95vh; }
/* Step tabs: horizontal scroll, active tab centered */
  .lead-wizard-wrap .seg { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 6px; flex-shrink: 0; padding: 8px 8px 4px; scroll-behavior: smooth; }
  .lead-wizard-wrap .seg::-webkit-scrollbar { display: none; }
  .lead-wizard-wrap .seg label { flex-shrink: 0; white-space: nowrap; padding: 5px 8px; font-size: .78em; cursor: pointer; border: 1px solid var(--line); transition: all .2s; }
  .lead-wizard-wrap .seg label.active { color: var(--brand); border-color: var(--brand); background: transparent; font-weight: 600; }
  .lead-wizard-wrap .seg label.completed { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
  .lead-step-item.completed { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
  .lead-wizard-wrap .lead-step-item.active { background: transparent; color: var(--brand); border-color: var(--brand); font-weight: 600; }
  .step-loc-desktop { display: none; }
  .step-loc-mobile { display: inline; }
  /* Step nav: fixed to the bottom, content scrolls above it */
  .lead-step { overflow: hidden; }
  .lead-step-scroll { padding-bottom: 78px; overflow-y: auto; }
  .lead-step-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    margin: 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    background: var(--panel);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 18px rgba(0,0,0,.08);
  }
}
@media (max-width: 640px) {
  .main { margin-left: 0; min-height: 100vh; display: flex; flex-direction: column; }
  body[data-page="leads"] .main,
  body[data-page="services"] .main { height: 100vh; overflow: hidden; }
  .lead-wizard-wrap { max-width: 100%; flex: 1; min-height: 0; overflow: hidden; }
.lead-step { flex: 1; min-height: 0; }
  .lead-map-wrap { position: relative; flex: 1; min-height: 0; width: 100%; border-radius: 0; border: none; }
  #leadMap { width: 100%; height: 100%; flex: none; border-radius: 0; border: none; }
  .lead-map-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 95; }
  .lead-map-bottom { border-radius: 0; }
  .lead-qty-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  /* Map view is full-bleed on phones: drop the wizard's content padding so the
     map touches the screen edges and bottom. (Steps 2/3 keep breathing room via
     their own padding below.) */
  body[data-page="leads"] .main .content,
  body[data-page="services"] .main .content { padding: 0; }
  body[data-page="leads"] .lead-wizard-wrap > .lead-step:not(#leadStep1),
  body[data-page="services"] .lead-wizard-wrap > .lead-step:not(#leadStep1) { padding: 8px 12px; }
  /* Search expands to fill the row beside the country flag on phones */
  .lead-map-search { flex: 1 1 auto; width: auto; min-width: 0; }
  /* Compact flag-only country button on phones, pinned right of the search */
  .lead-country-btn { padding: 0 8px; }
  .lead-country-btn .lead-country-name { display: none; }
  .lead-country-btn .lead-country-chev { display: none; }
  .lead-country-menu { left: auto; right: 0; }
  /* Results page: let the "Generating leads…" banner wrap on small screens */
  body[data-page="leads/results"] .flash-info { flex-wrap: wrap; }
  .lead-gens-modal-body { padding: 10px; }
  .lead-step-scroll { overflow-y: auto; }
  .lead-gens-modal-body .table { font-size: .82em; }
  .lead-gens-table thead { display: none; }
  .lead-gens-table tbody { display: block; }
  .lead-gens-table tbody tr { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .lead-gens-table tbody tr:first-child { padding-top: 0; }
  .lead-gens-table td { border: none; padding: 1px 0; font-size: .88em; }
  .lead-gens-table td:first-child { font-weight: 600; }
  .lead-gens-table .lead-gens-mobile-hide { display: none; }
  .lead-gens-table .lead-gens-mobile-row { display: flex !important; flex-basis: 100%; border-bottom: none; padding-top: 0; gap: 8px; align-items: center; }
  .lead-gens-table .lead-gens-mobile-row td { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
}

/* ---------- lead generator mobile: kill the white band on scroll ---------- */
body[data-page="leads"] { overscroll-behavior: none; background: var(--bg); }
body[data-page="leads"] .main,
body[data-page="services"] .main { background: var(--bg); }
body[data-page="services"] { overscroll-behavior: none; background: var(--bg); }
.lead-map-wrap { background: var(--bg); }
/* MapLibre attribution/logo are white by default — make them glassy */
.maplibregl-ctrl-attrib,
.maplibregl-ctrl-attrib.maplibregl-compact { background: var(--glass) !important; }
.maplibregl-ctrl-logo { filter: invert(0); }
body[data-page="leads"] .maplibregl-ctrl-group,
body[data-page="leads"] .maplibregl-ctrl-compass { display: none !important; }
html[data-theme="dark"] .maplibregl-ctrl-attrib,
html[data-theme="dark"] .maplibregl-ctrl-attrib.maplibregl-compact { background: var(--glass) !important; }

@media (max-width: 900px) {
  body[data-page="leads"] .main,
  body[data-page="services"] .main { height: 100vh; height: 100dvh; }
  .lead-map-wrap {
    position: relative;
  }
}
@media (max-width: 640px) {
  body[data-page="leads"] .main,
  body[data-page="services"] .main { height: 100vh; height: 100dvh; }
  .lead-map-wrap {
    position: relative;
  }
}

/* Responsive category tabs */
@media (max-width: 640px) {
  .cat-tabs-arrow { width: 28px; height: 28px; }
  .cat-tabs-arrow svg { width: 14px; height: 14px; }
  .cat-tabs-arrow.left { left: 0; }
  .cat-tabs-arrow.right { right: 0; }
  .cat-tab { padding: 8px 10px; min-width: 68px; font-size: .72em; }
  .cat-tab-icon { font-size: 1.1em; }
}

/* ============================================================
   adhere.co.za — top bar + hamburger overlay nav
   ============================================================ */
.main { margin-left: 0; }
.main::before { display: none; }

.app-topbar {
  height: 50px;
  padding: 0 16px;
  flex-wrap: nowrap;
}
.app-topbar h1 { font-size: 16px; font-weight: 300; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.app-brand { padding: 0; }
.app-brand .brand-logo-wrap { width: 94px; height: 28px; }
.app-brand .brand-logo { height: 28px; }
.app-brand .brand-logo-wrap .brand-logo-hover { opacity: 0; }
.app-brand .brand-logo-wrap .brand-logo-light { opacity: 0; }
.app-brand .brand-logo-wrap .brand-logo-light-hover { opacity: 0; }
.app-brand:hover .brand-logo-wrap .brand-logo-base { opacity: 0; }
.app-brand:hover .brand-logo-wrap .brand-logo-hover { opacity: 1; }
html[data-theme="light"] .app-brand .brand-logo-base { opacity: 0; }
html[data-theme="light"] .app-brand .brand-logo-hover { opacity: 0; }
html[data-theme="light"] .app-brand .brand-logo-light { opacity: 1; }
html[data-theme="light"] .app-brand .brand-logo-light-hover { opacity: 0; }
html[data-theme="light"] .app-brand:hover .brand-logo-light { opacity: 0; }
html[data-theme="light"] .app-brand:hover .brand-logo-light-hover { opacity: 1; }
/* Topbar nav always dark on desktop — keep dark logo variant */
@media (min-width: 901px) {
  html[data-theme="light"] .app-topbar .app-brand .brand-logo-wrap .brand-logo-base { opacity: 1; }
  html[data-theme="light"] .app-topbar .app-brand .brand-logo-wrap .brand-logo-hover { opacity: 0; }
  html[data-theme="light"] .app-topbar .app-brand .brand-logo-wrap .brand-logo-light { opacity: 0; }
  html[data-theme="light"] .app-topbar .app-brand .brand-logo-wrap .brand-logo-light-hover { opacity: 0; }
  html[data-theme="light"] .app-topbar .app-brand:hover .brand-logo-wrap .brand-logo-base { opacity: 0; }
  html[data-theme="light"] .app-topbar .app-brand:hover .brand-logo-wrap .brand-logo-hover { opacity: 1; }
}

.icon-btn, .hamburger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--glass);
  color: var(--ink); cursor: pointer; position: relative; z-index: 5;
  transition: transform .2s, border-color .2s;
  padding: 0;
}
.icon-btn:hover, .hamburger:hover { border-color: var(--brand2); }
.icon-btn:focus-visible, .hamburger:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Install-as-app banner: gets Adhere out of the browser chrome entirely. */
.app-install-banner {
  position: fixed; right: 14px; left: auto; bottom: calc(14px + env(safe-area-inset-bottom)); margin: 0;
  width: fit-content; min-width: min(92vw, 350px); max-width: min(calc(100% - 28px), 440px);
  z-index: 210;
  display: flex; flex-direction: column; gap: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 14px 44px rgba(0,0,0,.28);
  padding: 12px 14px 8px;
  animation: appInstallSlideUp .35s ease;
}
.app-install-banner[hidden] { display: none; }
.app-install-head { display: flex; gap: 12px; align-items: center; }
.app-install-icon {
  flex: none;
  width: 38px; height: 38px; border-radius: 10px;
  overflow: hidden;
  background: #00AA4D;
  box-shadow: 0 1px 4px rgba(0,0,0,.16);
}
.app-install-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.app-install-icon svg { display: block; width: 38px; height: 38px; }
.app-install-cta-icon {
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 7px;
}
.app-install-cta-icon svg { display: block; }
.app-install-text { flex: 1; min-width: 0; }
.app-install-title { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.app-install-sub { font-size: 12px; color: var(--muted); line-height: 1.4; }
.app-install-actions { flex: none; display: flex; align-items: center; gap: 6px; margin-top: 4px; }
/* Notification dot peeking out of the top-left corner, same effect as Plans */
.app-install-banner::after {
  content: "";
  position: absolute; top: -9px; left: -9px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #00AA4D;
  box-shadow: 0 0 5px rgba(0,170,77,.8);
  animation: nav-dot-pulse-green 1.5s ease-in-out infinite;
  pointer-events: none;
}
.app-install-never {
  align-self: flex-start;
  border: 0; background: none; padding: 6px 2px 2px;
  color: var(--muted); font-size: 11px;
  text-decoration: underline; cursor: pointer;
}
.app-install-never:hover { color: var(--ink); }
#appInstallCta, #appInstallClose { flex: 1 1 0; min-width: 0; min-height: 40px; padding: 10px 18px; font-size: 13px; }
/* Install CTA: outlined green, fills green on hover (mirrors topbar pattern) */
#appInstallCta {
  position: relative;
  background: transparent;
  border: 1.5px solid var(--brand);
  color: var(--ink);
  box-shadow: none;
}
#appInstallCta:hover {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.3);
}
html[data-theme="dark"] #appInstallCta { color: #fff; }
html[data-theme="dark"] #appInstallCta:hover { color: #fff; }
/* Snake loading ring around the Install CTA — plays once for 8s on show */
#appInstallCta::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 13px;
  padding: 2px;
  background: conic-gradient(from var(--ring-angle, 0deg),
    #00AA4D 0deg,
    rgba(0,170,77,.55) 36deg,
    rgba(0,170,77,.22) 76deg,
    rgba(0,170,77,0) 110deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: app-install-ring 8s linear 1 forwards;
}
@keyframes app-install-ring {
  0% { --ring-angle: 1080deg; opacity: 1; }
  90% { --ring-angle: 108deg; opacity: 1; }
  100% { --ring-angle: 0deg; opacity: 0; }
}
/* Mobile: stack the card into rows so the text wraps and reads naturally —
   icon + text on the first row, full-width buttons on the next, and the
   "Don't show again" link underneath. */
@media (max-width: 639px) {
  .app-install-banner {
    left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
    width: auto; max-width: none;
  }
  .app-install-head { flex-wrap: wrap; gap: 10px; align-items: flex-start; }
  .app-install-text { flex: 1 1 0; }
  .app-install-sub { font-size: 12.5px; line-height: 1.5; }
  .app-install-actions {
    flex: 1 1 100%; width: 100%;
    display: flex; align-items: stretch; gap: 8px;
  }
  .app-install-actions .btn { flex: 1 1 0; min-width: 0; }
}
@keyframes appInstallSlideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.icon-btn-sun { display: none; }
.icon-btn-moon { display: none; }
.icon-btn-auto { display: none; }
html[data-theme="light"] .icon-btn-sun { display: block; }
html[data-theme="dark"] .icon-btn-moon { display: block; }

.hamburger { display: inline-flex; flex-direction: column; gap: 4px; }
.hb-bar { width: 16px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s, opacity .2s; }
.hamburger.open .hb-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open .hb-bar:nth-child(2) { opacity: 0; }
.hamburger.open .hb-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* overlay menu (drawer from the right) */
.nav-backdrop { z-index: 95; }
.side-menu {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 300px; max-width: 86vw;
  background: linear-gradient(180deg, rgba(16,20,24,.97), rgba(10,14,17,.95));
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-left: 1px solid rgba(255,255,255,.08);
  color: var(--sidebar-ink);
  z-index: 100;
  transform: translateX(105%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  box-shadow: -12px 0 40px rgba(0,0,0,.35);
  visibility: hidden;
}
.side-menu.open { transform: translateX(0); visibility: visible; }
.side-menu-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.side-menu-title { color: #fff; font-weight: 700; font-size: 16px; font-family: 'Zona', 'Segoe UI', Roboto, Arial, sans-serif; }
.side-menu-close { background: none; border: none; color: var(--sidebar-ink); font-size: 26px; cursor: pointer; line-height: 1; padding: 4px; }
.side-menu-close:hover { color: #fff; }
.side-menu-scroll { flex: 1; overflow-y: auto; padding: 10px 12px 18px; }
.side-link {
  display: flex; align-items: center; gap: 11px;
  color: var(--sidebar-ink); padding: 9px 12px; border-radius: 10px;
  font-weight: 500; font-size: 14px; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; font-family: inherit;
  transition: background .2s, color .2s, transform .2s;
}
.side-link:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; transform: translateX(-3px); }
.side-link.active { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; box-shadow: 0 6px 16px rgba(var(--brand-rgb),.35); }
.side-link-sub { padding-left: 28px; font-size: 13px; }
.side-group-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px;
  color: #7c8691; margin: 14px 12px 4px;
}
a.side-group-title:hover { color: #fff; }
.side-link-soon { opacity: .45; cursor: default; pointer-events: none; }
.side-link-soon:hover { background: none; color: var(--sidebar-ink); transform: none; }
.side-link .side-ic { width: 16px; height: 16px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.side-logout { margin: 0; }
.side-logout .side-link { color: #f2a0a0; }
.side-logout .side-link:hover { background: rgba(220,38,38,.12); color: #fff; }
.side-menu-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08);
}
.side-menu-user .uname { display: block; }
.side-menu-user .urole { display: block; }

/* immersive map on the landing page */
/* Services statistic map gets the same full-bleed treatment as the leads map:
   no outer .content gutter on the framed services view (mirrors data-page=leads). */
body[data-page="services"] .content { padding: 8px 12px; }
body[data-page="services"] .lead-wizard-wrap .seg { margin-bottom: 8px; }
body[data-page="leads"] .content { padding: 8px 12px; }
body[data-page="leads"] .lead-wizard-wrap .seg { margin-bottom: 8px; }

@media (max-width: 640px) {
  .app-topbar { height: 54px; padding: 0 12px; }
  .app-topbar h1 { font-size: 13px; }
  .app-brand .brand-logo-wrap { width: 110px; height: 36px; }
  .app-brand .brand-logo { height: 36px; }
  .icon-btn, .hamburger { width: 36px; height: 36px; }
}

/* Wizard notice modal (required step) */
.lead-notice-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 140;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.lead-notice-backdrop[hidden] { display: none; }
.lead-notice {
  width: 100%; max-width: 380px;
  background: var(--glass-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 26px 28px;
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
  text-align: center;
}
.lead-notice-step {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; font-weight: 700; font-size: 1.15em;
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 8px 20px rgba(var(--brand-rgb), .4);
}
.lead-notice-title { font-size: 1.15em; font-weight: 700; margin-bottom: 6px; }
.lead-notice-msg { font-size: .9em; color: var(--muted); line-height: 1.55; margin: 0 0 20px; }
.lead-notice-actions { display: flex; gap: 10px; justify-content: center; }

/* Theme picker (side menu) */
.theme-picker { display: flex; gap: 6px; padding: 2px 12px 6px; }
.tp-btn {
  flex: 1; padding: 7px 8px; border-radius: 9px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--sidebar-ink); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s;
  font-family: inherit;
}
.tp-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.tp-btn.active { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(var(--brand-rgb),.35); }

/* ============================================================
   Traditional desktop layout — sidebar (left) + top bar
   Mobile keeps the slim top bar + hamburger drawer.
   ============================================================ */
.nav-backdrop { z-index: 80; }

.nav-link.nav-sub { padding-left: 26px; font-size: 13px; }
.nav-link.nav-soon { opacity: .45; cursor: default; pointer-events: none; }
.nav-link.nav-soon:hover { background: none; color: var(--sidebar-ink); transform: none; }

@media (min-width: 901px) {
  .main { margin-left: 230px; }
  .app-topbar .app-brand { display: none; }
  .hamburger { display: none; }
  .sidebar-mobile-logo { display: none; }
}

@media (max-width: 900px) {
  .main { margin-left: 0; }
  body[data-page="leads"] .sidebar { display: flex; } /* usable as an off-canvas drawer */
  .app-topbar .app-brand { display: flex; }
  .hamburger { display: inline-flex; }
  .sidebar .brand { display: none; }
  .sidebar-user { padding-top: 8px; }
}

/* ---------- auth pages extras ---------- */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Google Sign-In button container — matches form input width, no overflow/offset */
.google-btn-wrap {
  display: flex; justify-content: center; align-items: center;
  width: 100%; margin: 0; padding: 0; overflow: hidden;
}
.google-btn-wrap > div,
.google-btn-wrap .S9gUrf-YoZ4jf {
  margin: 0 !important; padding: 0 !important;
  display: flex; justify-content: center; align-items: center; width: 100%;
}
.google-btn-wrap iframe { display: block; margin: 0; }
.password-wrap { position: relative; }
.password-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; display: inline-flex; }
.password-toggle .eye-off { display: none; }
.password-toggle.visible .eye-on { display: none; }
.password-toggle.visible .eye-off { display: block; }
.strength-bar { display: flex; gap: 4px; margin-top: 6px; }
.strength-segment { flex: 1; height: 4px; border-radius: 3px; background: var(--bar-bg); transition: background .2s; }
.strength-segment.weak { background: #dc2626; }
.strength-segment.fair { background: #d97706; }
.strength-segment.good { background: #0ea5e9; }
.strength-segment.strong { background: var(--brand); }
.strength-text { font-size: 12px; margin-top: 4px; color: var(--muted); }
.strength-text.weak { color: #dc2626; } .strength-text.fair { color: #d97706; } .strength-text.good { color: #0ea5e9; } .strength-text.strong { color: var(--brand); }

/* Profile settings: wide referrals column + stacked appearance/password column */
.profile-settings-col { display: flex; flex-direction: column; min-width: 0; }

/* Theme picker on light panels (profile page) */
.theme-picker-light { padding: 0; }
.theme-picker-light .tp-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
}
.theme-picker-light .tp-btn .tp-ico { width: 16px; height: 16px; }
.tp-btn-light { border: 1px solid var(--line); background: var(--btn-bg); color: var(--ink); }
.tp-btn-light:hover { background: var(--bar-bg); color: var(--ink); }
.tp-btn-light.active { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(var(--brand-rgb), .3); }

/* Powered-by watermark (above the map bottom bar) */
.lead-powered {
  position: absolute; bottom: 54px; left: 50%; transform: translateX(-50%);
  z-index: 22;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 99px;
  background: transparent; border: 1px solid transparent;
  opacity: .38; cursor: default;
  transition: opacity .2s, background .2s, border-color .2s, transform .2s;
  pointer-events: auto;
}
.lead-powered:hover {
  opacity: 1;
  background: var(--glass-strong);
  border-color: var(--glass-border);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transform: translateX(-50%) translateY(-2px);
}
.lead-powered-label {
  font-size: 9px;
  font-family: 'Helvetica Now', 'Segoe UI', Roboto, Arial, sans-serif;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: .25px;
  line-height: 1;
}
.lead-powered-mark { width: 12px; height: 12px; display: block; }
html[data-theme="light"] .lead-powered-mark { filter: invert(1); }

/* ============ Adhere Auto Mailer showcase ============ */
.mailer-showcase { max-width: 860px; margin: 0 auto; width: 100%; }
.mailer-hero { text-align: center; padding: 34px 10px 26px; }
.mailer-hero-pill {
  display: inline-block; padding: 4px 14px; border-radius: 99px;
  background: var(--chip-bg); border: 1px solid var(--chip-border);
  color: var(--brand); font-size: 12px; font-weight: 700; letter-spacing: .4px;
}
.mailer-hero-title { font-size: clamp(26px, 4vw, 38px); line-height: 1.15; margin: 14px 0 12px; font-family: 'Zona', 'Segoe UI', Roboto, Arial, sans-serif; }
.mailer-hero-sub { color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 620px; margin: 0 auto 22px; }
.mailer-hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.mailer-hero-cta .btn { min-width: 220px; }
.mailer-hero-note { margin: 12px 0 0; font-size: 12px; }
.mailer-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.mailer-feature { display: flex; gap: 12px; align-items: flex-start; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.mailer-f-ic { font-size: 20px; line-height: 1; }
.mailer-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.mailer-step { display: flex; gap: 10px; align-items: flex-start; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.mailer-step-n {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff;
  font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center;
}
.mailer-price-row { display: flex; justify-content: center; }
.mailer-price-card { max-width: 420px; width: 100%; text-align: center; border: 1px solid var(--chip-border); background: var(--panel2); border-radius: 14px; padding: 22px; }
.mailer-price-amt { font-size: 30px; font-weight: 700; font-family: 'Zona', 'Segoe UI', Roboto, Arial, sans-serif; }
.mailer-price-amt .muted { font-size: 14px; font-weight: 500; }
.mailer-price-list { list-style: none; margin: 16px 0; padding: 0; text-align: left; display: inline-block; }
.mailer-price-list li { padding: 5px 0 5px 24px; position: relative; color: var(--ink); }
.mailer-price-list li::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
@media (max-width: 640px) { .mailer-features { grid-template-columns: 1fr; } }

/* Collapsible nav groups (sidebar) */
.side-group-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 9px 12px; margin-top: 12px;
  background: none; border: none; cursor: pointer;
  color: #7c8691; font-family: inherit; text-align: left;
  border-radius: 10px; transition: background .2s, color .2s;
}
.side-group-toggle:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-group-toggle:hover .side-group-title { color: #fff; }
.side-group-toggle.open .side-group-title { color: #fff; }
.side-group-toggle .side-group-title { margin: 0; }
.side-group-chev { transition: transform .2s; flex: 0 0 auto; }
.side-group-toggle.open .side-group-chev { transform: rotate(180deg); }
.side-group-body { display: none; padding: 2px 0 6px; }
.side-group-body.open { display: block; }
.side-group-body .nav-link { padding-left: 26px; font-size: 13px; color: #8b95a1; }
.side-group-body .nav-link:hover { color: #fff; }
.side-group-body .nav-link.active { color: #fff; }
.nav-link.nav-sub { color: #8b95a1; }
.nav-link.nav-sub:hover { color: #fff; }

/* Selected-areas silhouette panel (desktop, step 1) */
.lead-map-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lead-map-side {
  flex: 0 0 232px; width: 232px; margin-left: 10px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 12px; display: flex; flex-direction: column; overflow: hidden;
}
.lead-side-head { padding: 10px 12px; font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--glass-border); }
.lead-side-scroll {
  flex: 1; display: flex; gap: 8px; overflow-x: auto; padding: 10px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.lead-side-card {
  flex: 0 0 150px; scroll-snap-align: start;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px; text-align: center;
}
.lead-side-svg { width: 100%; height: 58px; display: block; }
.lead-side-name { font-size: 12px; font-weight: 600; margin-top: 6px; line-height: 1.25; }
.lead-side-type { font-size: 10px; }
.lead-side-empty { padding: 20px 12px; text-align: center; color: var(--muted); font-size: 12px; }
@media (max-width: 900px) {
  .lead-map-side { display: none; }
  .lead-map-main { height: 100%; }
}

/* Auth pages: brand logo adapts to the effective theme (auto follows sunrise/sunset) */
.login-brand .brand-logo-wrap { width: 156px; height: 46px; }
.login-brand .brand-logo { height: 46px; }
.login-brand .brand-logo-light { display: none; }
.login-brand .brand-logo-light-hover { display: none; }
.login-brand .brand-logo-wrap .brand-logo-hover { opacity: 0; }
.login-brand .brand-logo-wrap .brand-logo-light { opacity: 0; }
.login-brand .brand-logo-wrap .brand-logo-light-hover { opacity: 0; }
.login-brand:hover .brand-logo-wrap .brand-logo-base { opacity: 0; }
.login-brand:hover .brand-logo-wrap .brand-logo-hover { opacity: 1; }
html[data-theme="light"] .login-brand .brand-logo-base { opacity: 0; }
html[data-theme="light"] .login-brand .brand-logo-hover { opacity: 0; }
html[data-theme="light"] .login-brand .brand-logo-light { opacity: 1; display: block; }
html[data-theme="light"] .login-brand .brand-logo-light-hover { opacity: 0; display: block; }
html[data-theme="light"] .login-brand:hover .brand-logo-light { opacity: 0; }
html[data-theme="light"] .login-brand:hover .brand-logo-light-hover { opacity: 1; }

/* Intro popup: single column, compact icon so it fits on one mobile screen */
@media (max-width: 900px) {
  .lead-map-overlay { width: min(88vw, 400px); padding: 20px 16px 16px; }
  .lead-overlay-grid { grid-template-columns: 1fr; gap: 4px; text-align: center; }
  .lead-overlay-icon { width: 74px; margin: 0 auto 4px; }
  .lead-map-overlay-title { font-size: 1.16em; margin-bottom: 4px; }
  .lead-map-overlay-desc { font-size: .84em; margin-bottom: 4px; }
  .lead-overlay-steps { gap: 5px; }
  .lead-overlay-steps li { padding: 6px 9px; font-size: .84em; gap: 9px; }
  .lead-overlay-step-no { width: 22px; height: 22px; font-size: .75em; }
  .lead-overlay-hide { margin-top: 8px; font-size: .82em; padding: 7px 12px; }
  .lead-overlay-hide input { width: 36px; height: 20px; }
  .lead-overlay-hide input::before { top: 2px; left: 2px; width: 16px; height: 16px; }
  .lead-overlay-hide input:checked::before { transform: translateX(16px); }
  .lead-overlay-actions { margin-top: 12px; gap: 10px; }
  .lead-overlay-actions .btn { padding: 12px 16px; font-size: .95em; }
  .lead-map-overlay-svc { padding: 18px 16px 14px; }
  .lead-overlay-svc-body { gap: 14px; }
  .lead-overlay-svc-head { flex-direction: column; gap: 8px; text-align: center; }
  .lead-overlay-svc-logo { width: 52px; }
  .lead-overlay-svc-head-text .lead-map-overlay-title { font-size: 1.14em; }
  .lead-overlay-steps-svc { flex-direction: column; gap: 6px; }
  .lead-overlay-steps-svc li { flex-direction: row; text-align: left; padding: 7px 11px; gap: 9px; }
  .lead-overlay-steps-svc li:not(:first-child)::before { display: none; }
  .lead-overlay-steps-svc .lead-overlay-step-no { width: 22px; height: 22px; font-size: .75em; }
  .lead-overlay-footer { flex-direction: column; align-items: stretch; margin-top: 12px; padding-top: 12px; }
  .lead-overlay-footer .lead-overlay-actions { justify-content: stretch; }
  .lead-overlay-footer .lead-overlay-actions .btn { flex: 1 1 0; }
  .lead-overlay-leads-body { gap: 16px; }
  .lead-overlay-leads-head { flex-direction: column; gap: 8px; text-align: center; }
  .lead-overlay-leads-logo { width: 56px; }
  .lead-overlay-leads-side { text-align: center; }
  .lead-overlay-steps-leads { text-align: center; }
}

/* Steps 2 & 3: 50/50 columns — content left, selected-areas slider right */
.lead-step-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; flex: 1; min-height: 0; }
.lead-step-main-col { min-width: 0; display: flex; flex-direction: column; min-height: 0; max-width: 600px; }
.lead-step-main-col .lead-step-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.lead-step-main-col .lead-step-scroll > .card { flex: 1; display: flex; flex-direction: column; }
.lead-step-main-col .lead-step-scroll > .card > .lead-summary { flex: 1; }
#leadStep2 .lead-step-scroll { overflow-y: auto; }
.lead-step-side-col { min-width: 0; display: flex; min-height: 0; }
.lead-step-side-col .lead-map-side { flex: 1; width: auto; margin: 0; }

/* Step 2 — Target Audience: two columns. Left = "Target a specific niche" (search
   bar). Right = "Popular services" (category tabs to filter/select through). */
.lead-target-tabs-col, .lead-target-who-col {
  min-width: 0; display: flex; flex-direction: column; min-height: 0;
}
.lead-target-who-col { padding-right: 14px; border-right: 1px solid var(--line); }
.lead-target-tabs-col { gap: 4px; padding-left: 14px; }

/* Tabs column → two stacked zones: tabs grid (≈70%, vertical scroll) over the
   active tab's selectable services (≈30%). */
.lead-target-tabs-row { flex: 0 0 70%; min-height: 0; display: flex; flex-direction: column; }
.lead-target-chips-row { flex: 1 1 30%; min-height: 0; display: flex; flex-direction: column; }
.lead-target-tabs-row .cat-tabs-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.lead-target-tabs-row .cat-tabs-scroll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  align-content: start;
  overflow-y: auto;
  padding: 4px 4px 2px;
  cursor: default;
  scrollbar-width: thin;
}
.lead-target-tabs-row .cat-tabs-scroll::-webkit-scrollbar { display: block; width: 6px; }
.lead-target-tabs-row .cat-tabs-scroll::-webkit-scrollbar-thumb { visibility: hidden; border-radius: 3px; background: rgba(128,128,128,.45); }
.lead-target-tabs-row .cat-tabs-scroll:hover::-webkit-scrollbar-thumb { visibility: visible; }
.lead-target-chips-row .cat-panel-wrap { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 4px 6px; }
.lead-target-chips-row.cat-collapsed { display: none; }

/* Who column — header/search centered both ways; selected results follow under.
   Margin-auto centering keeps the top reachable when content overflows. */
.lead-target-who-col { overflow-y: auto; }
.lead-target-who-col .lead-step-scroll {
  flex: 0 0 auto; width: 100%; margin: auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.lead-target-who-col #savedCatsLoad,
.lead-target-who-col #selectedCatsWrap { width: 100%; max-width: 420px; }
.lead-target-who-col .lead-custom-cat-single { width: 100%; max-width: 340px; }
.lead-target-who-col .chips { justify-content: center; }

#leadStep2 .lead-custom-cat-single { margin-top: 14px; }
#leadStep2 .lead-custom-cat-single input { flex: 1; max-width: none; }
/* Steps 2 + 3 back/next: full-width glass bar spanning both columns, matching
   step 1's bottom bar. */
#leadStep2 .lead-step-nav, #leadStep3 .lead-step-nav {
  justify-content: flex-end; max-width: none; width: 100%; margin-left: 0;
  padding: 10px 12px;
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-top: 1px solid var(--glass-border);
  border-radius: 0 0 12px 12px;
}
#leadStep2 .lead-step-nav .btn, #leadStep3 .lead-step-nav .btn { flex: 1 1 0; min-width: 0; white-space: nowrap; }

/* Step 2 on phones: breathing room above the "Target a specific niche" header,
   compact category tabs (so the "choose specific services" chips are not cut
   off), and Back/Next matching step 1's compact buttons. */
@media (max-width: 640px) {
  #leadStep2 .lead-step-2col { gap: 8px; }
  #leadStep2 .lead-target-who-col { padding-top: 8px; gap: 10px; }
  #leadStep2 .lead-target-who-col .lead-sec-head { margin-top: 4px; }
  #leadStep2 .lead-target-tabs-col { gap: 4px; }
  .lead-target-tabs-row { flex: 0 0 auto; }
  .lead-target-tabs-row .cat-tabs-scroll { height: 150px; }
  .lead-target-chips-row { flex: 1 1 auto; min-height: 0; }
  #leadStep2 .lead-step-nav, #leadStep3 .lead-step-nav { max-width: none; }
  #leadStep2 .lead-step-nav .btn, #leadStep3 .lead-step-nav .btn { padding: 6px 13px; font-size: 12px; border-radius: 8px; }
}

/* Leads history page: saved category lists (left) + lead generation history (right) */
.lead-gen-2col { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; margin-top: 20px; align-items: start; }
.lead-gen-col { min-width: 0; }
@media (max-width: 900px) {
  .lead-gen-2col { grid-template-columns: 1fr; }
  .lead-gen-col-right { order: -1; }
}

@media (max-width: 900px) {
  .lead-step-2col { grid-template-columns: 1fr; gap: 10px; }
  .lead-step-side-col { display: none; }
  #leadStep2 .lead-step-2col { overflow-y: auto; }
  #leadStep2 .lead-step-2col .lead-step-scroll { overflow: visible; }
  .lead-target-who-col { padding-right: 0; border-right: none; }
  .lead-target-tabs-col { padding-left: 0; }
}



/* Nav breathing room + sidebar bottom */
.sidebar nav { gap: 5px; }
.sidebar-groups { margin-top: 8px; }
.sidebar-foot { order: 10; margin-top: auto; }
.admin-nav { order: 9; margin-top: 8px; }
.nav-link { padding-top: 11px; padding-bottom: 11px; }
.side-group-toggle { margin-top: 14px; padding-top: 10px; padding-bottom: 10px; }
.side-group-body { padding-top: 4px; padding-bottom: 8px; }

/* Step 3 right column: categories (20vh) above areas (flex) */
.lead-step-side-col { flex-direction: column; gap: 12px; }
.lead-side-cats {
  flex: 0 0 20vh; min-height: 100px;
  display: flex; flex-direction: column;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 12px; overflow: hidden;
}
.lead-side-cats-body {
  flex: 1; overflow-y: auto; padding: 10px 12px;
  display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start;
}
.lead-side-areas { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.lead-side-areas .lead-map-side { flex: 1; }
/* One area card per view — horizontal scroll with peek */
.lead-step-side-col .lead-side-scroll {
  flex: 1; display: flex; gap: 8px; overflow-x: auto; padding: 10px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; cursor: grab; position: relative; touch-action: pan-x;
  mask-image: linear-gradient(to right, #000 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent 100%);
}
.lead-step-side-col .lead-side-scroll::-webkit-scrollbar { display: none; }
.lead-step-side-col .lead-side-scroll.dragging { cursor: grabbing; user-select: none; scroll-snap-type: none; }
.lead-step-side-col .lead-side-scroll:active { cursor: grabbing; }
.lead-step-side-col .lead-side-scroll .lead-side-card { flex: 0 0 calc(50% - 4px); scroll-snap-align: start; }
.lead-step-side-col .lead-side-svg { height: 180px; display: flex; align-items: center; justify-content: center; }
.lead-step-side-col .lead-side-svg svg { max-height: 100%; }

/* Scanning line animation */
.lead-scan-line {
  position: absolute; left: 0; right: 0; height: 2px; z-index: 10;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  box-shadow: 0 0 12px var(--brand), 0 0 24px var(--brand);
  animation: lead-scan 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes lead-scan {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: calc(100% - 2px); opacity: 0; }
}

/* Circular progress in sidebar */
.sidebar-progress {
  display: none; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px 0; gap: 8px; order: -1;
}
.sidebar-progress.active { display: flex; }
.sidebar-progress-ring { position: relative; width: 56px; height: 56px; }
.sidebar-progress-ring svg { transform: rotate(-90deg); }
.sidebar-progress-ring circle {
  fill: none; stroke-width: 4; stroke-linecap: round;
}
.sidebar-progress-bg { stroke: rgba(255,255,255,.1); }
.sidebar-progress-fill {
  stroke: var(--brand);
  stroke-dasharray: 150.8;
  stroke-dashoffset: 150.8;
  transition: stroke-dashoffset .5s ease;
}
.sidebar-progress-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
}
.sidebar-progress { order: unset; }
.sidebar-progress-label { font-size: 11px; color: rgba(255,255,255,.6); text-align: center; }

/* Sidebar wallet widget */
.sidebar-wallet {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px; margin: 6px 0;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  text-decoration: none; color: inherit;
  transition: background .2s;
}
.sidebar-wallet:hover { background: rgba(255,255,255,.09); text-decoration: none; color: inherit; }
.sidebar-wallet-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
  color: rgba(255,255,255,.5);
}
.sidebar-wallet-title { font-weight: 600; }
.sidebar-wallet-amt {
  font-size: 20px; font-weight: 700; color: #00AA4D;
  line-height: 1.2;
}
.sidebar-wallet-plan { font-size: 12px; color: rgba(255,255,255,.6); }
.sidebar-wallet-bar {
  height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.1);
  overflow: hidden; margin-top: 2px;
}
.sidebar-wallet-bar-fill {
  height: 100%; border-radius: 2px;
  background: var(--brand);
  transition: width .4s ease;
}
.sidebar-wallet-usage { font-size: 11px; color: rgba(255,255,255,.45); }
.sidebar-wallet-topup {
  font-size: 12px; font-weight: 600; color: var(--brand);
  margin-top: 2px;
}
.sidebar-wallet-enable {
  background: none; border: none; padding: 0; margin-top: 2px;
  text-align: left; cursor: pointer; font-family: inherit;
  font-size: 12px; font-weight: 600; color: var(--brand);
}
.sidebar-wallet-enable:hover { text-decoration: underline; }

/* ============================================================
   Insights hub
   ============================================================ */
.insights-hub { max-width: 900px; margin: 0 auto; padding: 0 20px 48px; }

.insights-hero { text-align: center; padding: 40px 0 32px; }
.insights-hero-badge { margin-bottom: 12px; }
.insights-hero-pill {
  display: inline-block; padding: 5px 14px; border-radius: 20px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .3px;
}
.insights-hero-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 700;
  color: var(--heading); margin: 0 0 12px; line-height: 1.25;
}
.insights-hero-sub { color: var(--muted); font-size: 15px; max-width: 600px; margin: 0 auto; line-height: 1.6; }

.insights-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; margin-top: 8px;
}

.insights-card {
  display: flex; flex-direction: column; gap: 8px; padding: 24px !important;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  text-decoration: none; color: inherit;
}
a.insights-card { cursor: pointer; }
.insights-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  border-color: var(--brand);
  text-decoration: none; color: inherit;
}
.insights-card-tag {
  display: inline-block; align-self: flex-start;
  padding: 3px 10px; border-radius: 6px;
  background: rgba(var(--brand-rgb), .08); color: var(--brand);
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px;
}
.insights-card-title { font-size: 16px; font-weight: 600; color: var(--heading); margin: 0; line-height: 1.4; }
.insights-card-snippet { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 0; flex: 1; }
.insights-card-link { font-size: 13px; font-weight: 500; color: var(--brand); margin-top: auto; }

.insights-cta {
  text-align: center; margin-top: 40px; padding: 32px;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 14px;
}
.insights-cta p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }

@media (max-width: 600px) {
  .insights-grid { grid-template-columns: 1fr; }
  .insights-card { padding: 18px !important; }
}

/* ---------- Insight article ---------- */
.insight-article { max-width: 740px; margin: 0 auto; padding: 0 20px 56px; }
.insight-article-head { padding: 32px 0 24px; }
.insight-back {
  display: inline-block; font-size: 13px; font-weight: 500; color: var(--brand);
  margin-bottom: 18px; text-decoration: none;
}
.insight-back:hover { text-decoration: underline; }
.insight-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.insight-tag {
  display: inline-block; padding: 3px 10px; border-radius: 6px;
  background: rgba(var(--brand-rgb), .08); color: var(--brand);
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px;
}
.insight-reading { font-size: 13px; color: var(--muted); }
.insight-title {
  font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700;
  color: var(--heading); margin: 0 0 10px; line-height: 1.3;
}
.insight-subtitle { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; }

.insight-article-body { line-height: 1.75; color: var(--ink); font-size: 15.5px; }
.insight-article-body h2 {
  font-size: 1.25rem; font-weight: 700; color: var(--heading);
  margin: 36px 0 12px; padding-top: 12px;
}
.insight-article-body h3 {
  font-size: 1.05rem; font-weight: 600; color: var(--heading);
  margin: 28px 0 10px;
}
.insight-article-body p { margin: 0 0 16px; }
.insight-article-body ul, .insight-article-body ol {
  margin: 0 0 16px; padding-left: 24px;
}
.insight-article-body li { margin-bottom: 8px; }
.insight-article-body strong { color: var(--heading); }
.insight-article-body code {
  background: var(--chip-bg); padding: 2px 6px; border-radius: 4px;
  font-size: 13.5px; font-family: 'SF Mono', 'Consolas', monospace;
}
.insight-article-body pre {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; overflow-x: auto; margin: 0 0 16px;
}
.insight-article-body pre code { background: none; padding: 0; font-size: 13px; }
.insight-article-body blockquote {
  border-left: 3px solid var(--brand); margin: 0 0 16px;
  padding: 12px 18px; background: rgba(var(--brand-rgb), .04); border-radius: 0 8px 8px 0;
}
.insight-article-body a { color: var(--brand); font-weight: 500; }
.insight-article-body img {
  max-width: 100%; border-radius: 10px; margin: 16px 0;
}
.insight-article-body .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
  margin-right: 8px; vertical-align: middle;
}
.insight-article-body .step-box {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 12px; padding: 18px 20px; margin: 0 0 16px;
}

.insight-article-cta { margin: 40px 0; }
.insight-cta-card {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; border-radius: 14px; padding: 32px; text-align: center;
}
.insight-cta-card h3 { margin: 0 0 8px; font-size: 1.2rem; color: #fff; }
.insight-cta-card p { margin: 0 0 18px; font-size: 14px; opacity: .9; }
.insight-cta-card .btn-primary {
  background: #fff; color: var(--brand); border: none; font-weight: 600;
}
.insight-cta-card .btn-primary:hover { filter: brightness(.95); }

.insight-article-nav {
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.insight-nav-link {
  font-size: 13.5px; font-weight: 500; color: var(--brand);
  text-decoration: none; max-width: 48%;
}
.insight-nav-link:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .insight-article { padding: 0 16px 40px; }
  .insight-article-body { font-size: 15px; }
  .insight-cta-card { padding: 24px 18px; }
}

/* ============================================================
   Admin dashboard
   ============================================================ */
.admin-dash { padding: 0 20px 48px; }
.admin-stats { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin-bottom: 20px; }
.admin-stat-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 12px; padding: 18px 14px; text-align: center;
  cursor: default; transition: border-color .15s, box-shadow .15s;
}
.admin-stat-card.clickable { cursor: pointer; display: block; }
.admin-stat-card.clickable:hover { border-color: var(--brand); box-shadow: 0 2px 12px rgba(0,170,77,.12); }
.admin-stat-card.active { border-color: var(--brand); background: rgba(0,170,77,.06); }
.admin-stat-num { font-size: 26px; font-weight: 700; color: var(--heading); line-height: 1.2; }
.admin-stat-card.online .admin-stat-num { color: #00AA4D; }
.admin-stat-label { font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .4px; }

/* Users panel */
.admin-users-panel { display: none; margin-bottom: 20px; }
.admin-users-panel.open { display: block; }
.admin-users-panel .table-scroll { max-height: 420px; overflow-y: auto; }
.admin-user-email { font-weight: 600; }
.admin-user-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Registered users list page */
.admin-user-row td { transition: background .12s; }
.admin-user-row:hover td { background: rgba(var(--brand-rgb), .04); }
.admin-user-row .btn { white-space: nowrap; }

/* Admin user edit page */
.admin-edit-header { }

/* User profile card modal */
.admin-profile-backdrop {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9998;
  background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn .15s;
}
.admin-profile-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  width: 100%; max-width: 480px; max-height: 85vh; overflow-y: auto;
  padding: 28px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.admin-profile-close {
  position: absolute; top: 12px; right: 16px; background: none; border: none;
  font-size: 22px; color: var(--muted); cursor: pointer; line-height: 1;
}
.admin-profile-close:hover { color: var(--ink); }
.admin-profile-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.admin-profile-avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--glass);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: var(--brand); flex-shrink: 0;
  overflow: hidden;
}
.admin-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin-profile-name { font-size: 1.1em; font-weight: 700; color: var(--heading); }
.admin-profile-email { font-size: .85em; color: var(--muted); }
.admin-profile-badges { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-profile-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 16px;
}
.admin-profile-stat {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 10px; padding: 12px; text-align: center;
}
.admin-profile-stat-num { font-size: 18px; font-weight: 700; color: var(--heading); }
.admin-profile-stat-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; margin-top: 2px; }
.admin-profile-details { margin-bottom: 16px; }
.admin-profile-row {
  display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px solid var(--glass-border); font-size: .88em;
}
.admin-profile-row:last-child { border-bottom: none; }
.admin-profile-row-label { color: var(--muted); }
.admin-profile-row-value { font-weight: 500; color: var(--ink); text-align: right; max-width: 60%; word-break: break-word; }
.admin-profile-ledger { margin-bottom: 16px; }
.admin-profile-ledger-title { font-size: .85em; font-weight: 600; color: var(--heading); margin-bottom: 8px; }
.admin-profile-ledger-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--glass-border); font-size: .82em;
}
.admin-profile-ledger-row:last-child { border-bottom: none; }
.ledger-type { font-weight: 500; }
.ledger-type.spend { color: #e74c3c; }
.ledger-type.grant { color: #00AA4D; }
.ledger-type.refund { color: #3498db; }
.admin-profile-actions { display: flex; gap: 8px; margin-top: 8px; }

#adminMap { width: 100%; height: 450px; border-radius: 0 0 12px 12px; border: 1px solid var(--line); border-top: none; }

.admin-map-status {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  max-width: 82%; padding: 6px 12px; border-radius: 999px; text-align: center;
  font-size: 12px; font-weight: 600; color: var(--heading);
  background: rgba(255,255,255,.85); border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(0,0,0,.12); pointer-events: none; z-index: 2;
}
html[data-theme="dark"] .admin-map-status { background: rgba(20,25,40,.88); }

.admin-map-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  padding: 10px 14px; font-size: 12px; color: var(--muted);
}
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

.admin-dot-online {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #00AA4D; margin-right: 4px; vertical-align: middle;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

@media (max-width: 640px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-stat-num { font-size: 22px; }
  #adminMap { height: 300px; }
  .ref-mirror-grid { grid-template-columns: 1fr; }
  .advert-admin-grid { grid-template-columns: 1fr; }
  .product-admin-grid { grid-template-columns: 1fr; }
  .policy-grid { grid-template-columns: 1fr; }
}

/* Billing grid: balance + payment methods side by side */
.billing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.billing-balance-card { display: flex; flex-direction: column; justify-content: center; }
.billing-balance-amt { font-size: 32px; font-weight: 700; color: #00AA4D; }
.billing-balance-label { font-size: 13px; margin-top: 2px; }
.billing-topup-form { display: flex; gap: 10px; align-items: flex-end; }
.billing-topup-btn { flex: 0 0 auto; white-space: nowrap; }
.billing-pm-card .card-head { margin-bottom: 14px; }
.billing-pm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--glass-border); }
.billing-pm-info { display: flex; align-items: center; gap: 10px; }
.billing-pm-icon { flex: 0 0 auto; }
.billing-pm-last4 { font-size: 14px; font-weight: 600; }
.billing-pm-meta { font-size: 12px; }
.billing-pm-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.billing-pm-remove { color: #f85149; }
.billing-pm-empty { padding: 16px 0; text-align: center; }
.billing-modal-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 20px; }
.billing-modal-backdrop[hidden] { display: none !important; }
.billing-modal { background: var(--card-bg, #161b22); border: 1px solid var(--glass-border); border-radius: 12px; padding: 28px; max-width: 380px; width: 100%; text-align: center; }
.billing-modal h3 { margin-bottom: 8px; }
.billing-modal-actions { margin-top: 20px; }

/* Lead wizard payment modal */
.lead-pay-summary { background: rgba(255,255,255,.05); border-radius: 8px; padding: 12px 16px; margin: 12px 0; }
.lead-pay-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }

@media (max-width: 700px) {
  .billing-grid { grid-template-columns: 1fr; }
}

/* Lead category lists dropdown */
.lead-custom-cat { margin-bottom: 16px; }
.lead-custom-cat-row { display: flex; gap: 6px; align-items: center; }
.lead-custom-cat-row input { flex: 1; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--input-bg); font-size: .88em; }
.lead-save-row { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.lead-save-row input { flex: 1; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--input-bg); font-size: .88em; }
.lead-cat-dropdown { position: relative; flex: 0 0 auto; }
.lead-cat-dropdown-menu { position: absolute; top: 100%; right: 0; z-index: 20; min-width: 260px; max-height: 320px; overflow-y: auto; margin-top: 4px; background: rgba(22, 27, 34, 0.97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.lead-cat-menu-empty { padding: 16px 12px; text-align: center; }
.lead-cat-menu-item { padding: 10px 12px; border-radius: 8px; cursor: pointer; transition: background .15s; }
.lead-cat-menu-item:hover { background: rgba(255,255,255,.07); }
.lead-cat-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lead-cat-menu-name { font-size: 13px; font-weight: 600; }
.lead-cat-menu-del { background: none; border: none; color: #7c8691; cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 4px; border-radius: 4px; transition: color .15s, background .15s; flex: 0 0 auto; }
.lead-cat-menu-del:hover { color: #f85149; background: rgba(248,81,73,.12); }
.lead-cat-menu-cats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip-sm { display: inline-block; padding: 2px 8px; font-size: 11px; border-radius: 6px; background: rgba(255,255,255,.06); color: #c9d1d9; white-space: nowrap; }

/* Saved Categories management page */
.cat-preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-preset-check { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; transition: background .15s; }
.cat-preset-check:hover { background: rgba(255,255,255,.06); }
.cat-preset-check input { accent-color: #00AA4D; }
.cat-saved-lists { display: flex; flex-direction: column; gap: 12px; }
.cat-saved-item { padding: 14px 0; border-bottom: 1px solid var(--glass-border); }
.cat-saved-item:last-child { border-bottom: none; }
.cat-saved-head { display: flex; align-items: center; justify-content: space-between; }
.cat-saved-actions { display: flex; gap: 4px; }
@media (max-width: 640px) { .cat-preset-grid { grid-template-columns: 1fr; } }

/* Legal pages (privacy, terms) */
.legal-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.legal-tab {
  padding: 10px 18px; font-size: .88em; font-weight: 500; color: var(--muted);
  text-decoration: none; border-bottom: 2px solid transparent; transition: all .15s; cursor: pointer;
}
.legal-tab:hover { color: var(--ink); opacity: 1; }
.legal-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.legal-content { line-height: 1.7; color: var(--ink); }
.legal-content h2 { font-size: 1.15em; font-weight: 700; margin: 28px 0 8px; color: var(--ink); }
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { font-size: 1em; font-weight: 600; margin: 18px 0 6px; color: var(--ink); }
.legal-content p { margin: 0 0 12px; }
.legal-content ul { margin: 0 0 14px; padding-left: 22px; }
.legal-content li { margin-bottom: 4px; }
.legal-content a { color: var(--brand); text-decoration: underline; }
.legal-content a:hover { opacity: .85; }
.legal-footer { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--glass-border); }

/* Loading overlay */
#loadingOverlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: var(--panel); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
}
.loading-spinner {
  width: 40px; height: 40px; border: 3px solid var(--line);
  border-top-color: var(--brand); border-radius: 50%;
  animation: spin .7s linear infinite;
}
.loading-text { font-size: .9em; color: var(--muted); }

/* Top page-load progress bar — syncs activity while Leads/Services load */
.page-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 10001;
  pointer-events: none;
}
.page-progress[hidden] { display: none; }
.page-progress-bar {
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden;
}
.page-progress-bar::before {
  content: '';
  display: block;
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 45%;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 10px rgba(var(--brand-rgb), .7);
  will-change: transform;
  animation: progress-sweep 1.1s ease-in-out infinite;
}
@keyframes progress-sweep {
  0%   { transform: translateX(-115%); }
  100% { transform: translateX(365%); }
}
.page-progress.done .page-progress-bar::before {
  width: 100%;
  transform: translateX(0);
  animation: none;
  transition: width .3s ease, transform .3s ease;
}

/* Business pins on map */
.biz-pin {
  width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s;
  position: relative; background: var(--panel);
  box-shadow: 0 3px 12px rgba(0,0,0,.3);
  touch-action: manipulation;
}
.biz-pin:hover { transform: scale(1.18); box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.biz-pin-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.biz-pin-initials {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff; background: var(--brand);
  border-radius: 50%;
}
/* Snake ring — green sweep around the circle for 6s when the profile comes
   into view, then fades out (see .snake-on). Same green for every tier. */
.biz-pin-ring {
  position: absolute; inset: -4px; border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from var(--ring-angle, 0deg),
    #00AA4D 0deg,
    rgba(0,170,77,.55) 36deg,
    rgba(0,170,77,.22) 76deg,
    rgba(0,170,77,0) 110deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s ease;
}
@keyframes pin-ring-spin {
  from { --ring-angle: 1080deg; }
  to { --ring-angle: 0deg; }
}
.biz-pin.snake-on .biz-pin-ring {
  opacity: 1;
  animation: pin-ring-spin 6s linear 1 forwards;
}
.biz-pin[data-tier="gold"] { width: 14px; height: 14px; }
/* Gold avatar pins stay small (closer to the dot size) until silver profiles
   appear (z ≥ 8), when gold grows to the full size to match silver. */
.biz-pin[data-tier="gold"] .biz-pin-initials { font-size: 7px; }
.biz-pin[data-tier="gold"].biz-pin-full { width: 40px; height: 40px; }
/* Dot state — silver/bronze show a small plain green dot below their zoom
   threshold, layered under the gold profiles. */
.biz-pin-dot {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center;
  pointer-events: none;
}
.biz-pin-dot::after {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand);
}
.biz-pin-dot-mode .biz-pin-dot { display: flex; }
.biz-pin-dot-mode .biz-pin-img,
.biz-pin-dot-mode .biz-pin-initials,
.biz-pin-dot-mode .biz-pin-ring { display: none; }
.biz-pin-dot-mode { background: transparent; box-shadow: none; pointer-events: none; }
.biz-pin-dot-mode:hover { box-shadow: none; }

/* Business profile overlay */
.biz-overlay-card {
  position: fixed; z-index: 10000;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 0; width: 360px; max-height: 80vh;
  box-shadow: 0 12px 36px rgba(0,0,0,.18);
  display: flex; flex-direction: column; overflow: hidden;
}
@media (min-width: 901px) {
  .biz-overlay-card.biz-overlay-dual { width: 1000px; max-width: calc(100vw - 48px); flex-direction: row; height: 640px; }
  .biz-overlay-card.biz-overlay-dual .biz-overlay-main { flex: 0 0 35%; }
  .biz-overlay-card.biz-overlay-dual .biz-overlay-showcase { flex: 1 1 65%; }
}
.biz-overlay-main { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; overflow: hidden; }
.biz-overlay-showcase {
  flex: 1; border-left: 1px solid var(--line);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--glass);
}
@media (max-width: 900px) {
  .biz-overlay-card.biz-overlay-dual {
    flex-direction: column;
    width: calc(100vw - 24px);
    max-width: 720px;
    height: auto;
    max-height: 92vh;
    overflow-y: auto;
  }
  .biz-overlay-card.biz-overlay-dual .biz-overlay-main { flex: none; max-height: none; overflow: visible; }
  .biz-overlay-card.biz-overlay-dual .biz-overlay-main .biz-overlay-scroll { overflow: visible; }
  .biz-overlay-card.biz-overlay-dual .biz-overlay-showcase {
    flex: none;
    border-left: none;
    border-top: 1px solid var(--line);
    max-height: none;
    overflow: visible;
  }
  .biz-overlay-card.biz-overlay-dual .biz-overlay-showcase-scroll { overflow: visible; }
}
.biz-overlay-showcase-scroll { overflow-y: auto; flex: 1; padding: 12px; scrollbar-width: none; -ms-overflow-style: none; }
.biz-overlay-showcase-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
.biz-overlay-loading,
.biz-overlay-empty {
  font-size: 11px; color: var(--muted); text-align: center; padding: 16px 8px;
}
/* Ad slider */
.biz-ad-slider { display: flex; flex-direction: column; margin-bottom: 12px; }
.biz-ad-slider-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.biz-ad-slide { width: 100%; border-radius: 8px; overflow: hidden; background: var(--chip-bg, #f0f0f0); transition: opacity .15s; }
.biz-ad-slide:hover { opacity: .95; }
.biz-ad-slide-img {
  width: 100%; height: 0; padding-top: 100%; position: relative; overflow: hidden;
  background: var(--chip-bg, #f0f0f0);
}
.biz-ad-slide-img img {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  object-fit: cover;
  object-position: center;
  display: block;
}
.biz-ad-slide-fallback {
  width: 100%; height: 0; padding-top: 100%; position: relative;
  background: var(--chip-bg, #f0f0f0);
}
.biz-ad-slide-fallback > div, .biz-ad-slide-fallback.sq-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 48px; font-weight: 700; color: var(--muted);
}
.biz-ad-slide-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.biz-ad-slide-title { font-size: 14px; font-weight: 700; color: var(--heading); margin-bottom: 4px; }
.biz-ad-slide-desc {
  font-size: 12px; color: var(--muted); line-height: 1.4; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.biz-ad-slide-link { font-size: 12px; color: var(--brand); text-decoration: none; font-weight: 600; }
.biz-ad-slide-link:hover { text-decoration: underline; }
.biz-ad-nav {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 0 0;
}
.biz-ad-arrow {
  width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--glass); color: var(--ink); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.biz-ad-arrow:hover:not(:disabled) { background: var(--hover-bg, rgba(0,0,0,.06)); }
.biz-ad-arrow:disabled { opacity: .3; cursor: default; }
.biz-ad-dots { display: flex; gap: 4px; }
.biz-ad-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--line); cursor: pointer; transition: background .15s;
}
.biz-ad-dot.active { background: var(--brand); }
.biz-ad-dots button.biz-ad-dot {
    padding: 0;
    margin: 0;
    border: none;
    -webkit-appearance: none;
    appearance: none;
    align-self: center;
    flex: 0 0 6px;
}
/* Advert overlay view button */
/* Store section */
.biz-store-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 6px; }
.biz-store-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { .biz-store-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Recent posts + advert slider two-column block */
.biz-showcase-duo {
  display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 12px;
}
@media (min-width: 900px) { .biz-showcase-duo { grid-template-columns: 1fr 1fr; } }
.biz-showcase-col { min-width: 0; }
/* Advert slider: collapse to a "Show more Ads" toggle on mobile, always open on desktop */
.biz-ads-collapsible { display: block; }
.biz-ads-toggle { display: none; }
@media (max-width: 899px) {
  .biz-ads-collapsible { display: none; }
  .biz-ads-collapsible.expanded { display: block; }
  .biz-ads-toggle {
    display: block; width: 100%; margin-bottom: 12px; padding: 8px 10px;
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    color: var(--brand); background: var(--chip-bg, rgba(0,0,0,.04));
    border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
    transition: background .15s;
  }
  .biz-ads-toggle:hover { background: var(--hover-bg, rgba(0,0,0,.08)); }
}
.biz-posts-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; border: 1px dashed var(--line); border-radius: 10px;
  padding: 24px 12px; color: var(--muted); font-size: 12px; text-align: center;
  min-height: 160px; opacity: .8;
}
/* Profile post card (traditional post look) */
.biz-post-card {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--panel2, var(--panel)); display: flex; flex-direction: column;
}
.biz-post-card-media { width: 100%; aspect-ratio: 4/3; overflow: hidden; background: var(--chip-bg, #f0f0f0); }
.biz-post-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.biz-post-card-body { padding: 10px 12px 12px; }
.biz-post-card-title { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--heading); line-height: 1.3; }
.biz-post-card-desc {
  margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
/* Text-only status update: centred within the column, matches the advert height */
.biz-showcase-posts { display: flex; flex-direction: column; }
.biz-showcase-posts .biz-post-card,
.biz-showcase-posts .biz-post-text { flex: 1; }
.biz-post-text {
  display: flex; flex-direction: column; align-items: stretch; justify-content: space-between;
  gap: 8px; min-height: 160px; flex: 1;
  border: 1px solid var(--line); border-radius: 10px; padding: 16px 16px 12px;
  background: var(--panel2, var(--panel));
}
.biz-post-text-inner {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 6px;
}
.biz-post-text-title { font-size: 14px; font-weight: 700; color: var(--heading); line-height: 1.35; }
.biz-post-text-desc { font-size: 12px; color: var(--muted); line-height: 1.6; white-space: pre-line; }
/* Featured advert: column head (title left, date right) */
.biz-featured-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 6px;
}
.biz-featured-date { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }
/* Featured advert: stats (heart + views) under the description, aligned bottom-right */
.biz-post-card-body {
  display: flex; flex-direction: column; flex: 1;
}
.biz-featured-corner {
  margin-top: auto;
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 6px 8px 2px; border-radius: 20px;
}
.biz-post-like {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; padding: 2px; cursor: pointer;
  color: var(--muted); font-size: 12px; font-weight: 600;
  transition: color .15s, transform .15s;
}
.biz-post-like svg { width: 24px; height: 24px; }
.biz-post-like:hover { color: #e74c3c; transform: scale(1.1); }
.biz-post-like.liked { color: #e74c3c; }
.biz-post-like.liked svg { fill: #e74c3c; }
.biz-post-views {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--muted); font-size: 12px; font-weight: 600;
}
.biz-post-views svg { width: 24px; height: 24px; }
/* Status updates timeline popup */
.status-timeline-backdrop {
  position: fixed; inset: 0; z-index: 10010; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.status-timeline-card {
  position: relative; width: 100%; max-width: 560px; height: 640px; max-height: calc(100vh - 48px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--glass-strong); border: 1px solid var(--glass-border); border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
}
.status-timeline-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.status-timeline-head-title { font-size: 15px; font-weight: 700; color: var(--heading); }
.status-timeline-close {
  width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.08);
  color: var(--ink); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.status-timeline-close:hover { background: rgba(220,50,50,.18); color: #e74c3c; }
.status-timeline-scroll { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.status-timeline-item { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel2, var(--panel)); }
.status-timeline-media { width: 100%; max-height: 320px; overflow: hidden; background: var(--chip-bg, #f0f0f0); }
.status-timeline-media img { width: 100%; max-height: 320px; display: block; object-fit: cover; }
.status-timeline-body { padding: 12px 14px; }
.status-timeline-title { font-size: 14px; font-weight: 700; color: var(--heading); margin-bottom: 4px; }
.status-timeline-desc { font-size: 13px; color: var(--ink); line-height: 1.55; white-space: pre-line; }
.status-timeline-date { margin-top: 8px; font-size: 11px; }
.biz-showcase-more { display: flex; justify-content: center; padding: 6px 0 2px; }
.biz-showcase-more-btn {
  padding: 6px 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--glass); color: var(--ink); font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.biz-showcase-more-btn:hover { border-color: var(--brand); color: var(--brand); }
.biz-store-item {
  display: flex; flex-direction: column; justify-content: space-between;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel2, var(--panel));
  padding: 10px; overflow: hidden; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
  text-decoration: none; color: inherit; min-width: 0;
}
.biz-store-item:hover { border-color: var(--brand); background: rgba(var(--brand-rgb), .05); box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.biz-store-item-img {
  position: relative; width: 100%; aspect-ratio: 1/1;
  overflow: hidden; background: #0a0e11; border-radius: 8px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.biz-store-item-img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; transition: transform .25s; }
.biz-store-item:hover .biz-store-item-img img { transform: scale(1.04); }
.biz-store-item-name {
  font-size: 12px; font-weight: 600; color: var(--heading); line-height: 1.35;
  margin-top: 8px; min-height: 32px; padding-left: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; cursor: pointer; overflow-wrap: anywhere;
}
.biz-store-item-foot {
  margin-top: 8px; padding: 8px 2px 0; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.biz-store-item-price { font-size: 13px; font-weight: 700; color: var(--brand); min-width: 0; overflow-wrap: anywhere; }
.biz-store-item-price-na { opacity: .5; color: var(--muted); }
.biz-store-item-view-btn {
  padding: 5px 12px; border-radius: 7px; border: 1px solid rgba(var(--brand-rgb), .35);
  background: rgba(var(--brand-rgb), .12); color: var(--brand);
  font-size: 11px; font-weight: 600; cursor: pointer; flex-shrink: 0;
  transition: background .15s, color .15s, border-color .15s;
}
.biz-store-item-view-btn:hover { background: var(--brand); color: #fff; }
.biz-store-count { font-weight: 600; opacity: .6; margin-left: 4px; }
.biz-store-item-actions { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.biz-store-item-cart-btn {
  flex: 1; padding: 4px 8px; border-radius: 6px; border: none;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 600;
  cursor: pointer; transition: background .15s, opacity .15s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.biz-store-item-cart-btn:hover { background: #00883c; }
.biz-store-item-cart-btn:active { opacity: .7; }
.biz-store-item-cart-btn.added { background: #00AA4D; pointer-events: none; }
.biz-store-item-cart-btn.added::after { content: ' ✓'; }
.biz-store-item-view-cart {
  font-size: 10px; font-weight: 600; color: var(--brand); background: none;
  border: 1px solid var(--brand); border-radius: 6px; padding: 3px 8px;
  cursor: pointer; text-decoration: none; transition: background .15s, color .15s;
  white-space: nowrap;
}
.biz-store-item-view-cart:hover { background: var(--brand); color: #fff; }
.biz-cart-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 10px; font-weight: 700;
  line-height: 1; margin-left: 6px;
}
.biz-cart-badge.hidden { display: none; }
.biz-overlay-cart-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-top: 1px solid var(--line); margin-top: 8px;
  background: var(--glass); border-radius: 0 0 0 8px;
}
.biz-overlay-cart-footer .cart-total { font-size: 14px; font-weight: 700; color: var(--brand); }
.biz-overlay-cart-checkout-btn {
  padding: 6px 14px; border-radius: 6px; border: none;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: background .15s;
}
.biz-overlay-cart-checkout-btn:hover { background: #00883c; }
.biz-overlay-cart-checkout-btn:disabled { opacity: .5; cursor: not-allowed; }
.biz-overlay-no-payfast { font-size: 11px; color: var(--muted); }
.biz-overlay-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 20px; color: var(--muted);
  cursor: pointer; line-height: 1; padding: 4px; z-index: 2;
}
.biz-overlay-close:hover { color: var(--ink); }
.biz-overlay-scroll { overflow-y: auto; flex: 1; padding: 20px; scrollbar-width: none; -ms-overflow-style: none; }
.biz-overlay-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
.biz-overlay-header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.biz-overlay-head-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.biz-overlay-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.biz-overlay-avatar {
  width: 56px; height: 56px; border-radius: 50%; overflow: hidden;
  flex-shrink: 0; background: var(--brand);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.biz-overlay-avatar img { width: 100%; height: 100%; object-fit: cover; }
.biz-overlay-initials {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: #fff;
}
.biz-overlay-tier {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: .3px;
}
.biz-overlay-demo {
  background: #00AA4D; color: #fff; border: none; cursor: pointer;
  font-family: inherit; transition: filter .15s ease;
}
.biz-overlay-demo:hover { filter: brightness(1.1); }
html[data-theme="dark"] .biz-overlay-demo { background: #00C256; color: #fff; }
.biz-overlay-activate {
  margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--line);
  border-left: 3px solid #00AA4D; border-radius: 8px; background: var(--panel2, #fff);
}
.biz-overlay-activate-title { font-size: 13px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.biz-overlay-activate-note { font-size: 12px; color: var(--muted); margin: 0 0 12px; line-height: 1.5; }
.biz-overlay-activate-form { display: flex; gap: 8px; flex-wrap: wrap; }
.biz-overlay-activate-form input {
  flex: 1 1 120px; min-width: 120px; padding: 8px 10px; font-size: 13px; letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: 600; border: 1px solid var(--line);
  border-radius: 6px; background: var(--input-bg); color: var(--text);
}
.biz-overlay-activate-form button {
  padding: 8px 14px; border: none; border-radius: 6px; background: #00AA4D; color: #fff;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.biz-overlay-activate-form button:hover { filter: brightness(1.08); }
.biz-overlay-activate-hint { font-size: 11px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }
.biz-overlay-activate-btn {
  display: inline-block; padding: 8px 16px; border-radius: 6px; background: #00AA4D; color: #fff;
  font-size: 13px; font-weight: 700; text-decoration: none;
}
.biz-overlay-activate-btn:hover { filter: brightness(1.08); color: #fff; }
.biz-overlay-activate-loading { font-size: 12px; color: var(--muted); }
.biz-overlay-share {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; color: var(--muted);
  background: var(--glass); border: 1px solid var(--line);
  border-radius: 6px; padding: 3px 9px; cursor: pointer;
  transition: all .15s ease;
}
.biz-overlay-share:hover { color: var(--brand); border-color: var(--brand); }
.biz-overlay-share.copied { color: #00AA4D; border-color: #00AA4D; }
.biz-overlay-actions {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 14px 0 6px; margin-top: 16px; border-top: 1px solid var(--line);
}
.biz-overlay-share,
.biz-overlay-dir,
.biz-overlay-profile,
.biz-overlay-fav {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 6px 9px;
}
.biz-overlay-dir,
.biz-overlay-profile {
  font-size: 11px; font-weight: 600; color: var(--muted);
  background: var(--glass); border: 1px solid var(--line);
  border-radius: 6px; cursor: pointer; transition: all .15s ease;
  text-decoration: none;
}
.biz-overlay-dir:hover,
.biz-overlay-profile:hover { color: var(--brand); border-color: var(--brand); text-decoration: none; }
.biz-overlay-fav {
  font-size: 11px; font-weight: 600; color: var(--muted);
  background: var(--glass); border: 1px solid var(--line);
  border-radius: 6px; cursor: pointer; transition: all .15s ease;
}
.biz-overlay-fav:hover { color: #d97706; border-color: #d97706; }
.biz-overlay-fav.active { color: #f59e0b; border-color: #f59e0b; background: rgba(245,158,11,.1); }
.biz-overlay-fav.active svg { fill: #f59e0b; }
.biz-overlay-fav-count { font-variant-numeric: tabular-nums; }
.biz-overlay-backdrop {
  position: fixed; inset: 0; z-index: 9990;
  background: rgba(0,0,0,.25);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: bizOverlayBackdropIn .18s ease;
}
@keyframes bizOverlayBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.biz-overlay-socials { display: flex; flex-wrap: wrap; gap: 8px; }
.biz-overlay-social {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--ink);
  text-decoration: none; background: var(--glass);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 11px; transition: all .15s ease;
}
.biz-overlay-social:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-1px); }
.badge-gold { background: rgba(255,215,0,.15); color: #b8860b; }
.badge-silver { background: rgba(192,192,192,.15); color: #666; }
.badge-bronze { background: rgba(205,127,50,.15); color: #8B4513; }
.badge-demo { background: rgba(52,152,219,.15); color: #2980b9; }
html[data-theme="dark"] .badge-gold { background: rgba(255,215,0,.12); color: #FFD700; }
html[data-theme="dark"] .badge-silver { background: rgba(192,192,192,.12); color: #C0C0C0; }
html[data-theme="dark"] .badge-bronze { background: rgba(205,127,50,.12); color: #CD7F32; }
html[data-theme="dark"] .badge-demo { background: rgba(52,152,219,.12); color: #5dade2; }
.biz-overlay-name { font-size: 16px; font-weight: 700; color: var(--heading); margin: 0; line-height: 1.25; }
.biz-overlay-tagline { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.4; }
.biz-overlay-location { font-size: 12px; color: var(--muted); margin: 0; display: flex; align-items: center; gap: 4px; }
.biz-overlay-location svg { flex-shrink: 0; }
.biz-overlay-section { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.biz-overlay-section-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin: 0 0 8px; }
.biz-overlay-about { font-size: 13px; color: var(--ink); line-height: 1.5; margin: 0; }
.biz-overlay-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.biz-overlay-chip {
  font-size: 12px; padding: 4px 10px; border-radius: 6px;
  background: var(--chip-bg); color: var(--ink); border: 1px solid var(--line);
}

/* Standalone product page */
.product-page-wrap { max-width: 860px; margin: 0 auto; padding: 20px; }
.product-page-wrap .back-link { display: inline-block; margin-bottom: 14px; color: var(--brand); text-decoration: none; font-size: 14px; font-weight: 600; }
.product-page-wrap .back-link:hover { text-decoration: underline; }
.product-page-card { padding: 0; overflow: hidden; }
.product-page-name { font-size: 22px; font-weight: 700; color: var(--heading); margin: 0 0 6px; }
.product-page-price { font-size: 20px; font-weight: 700; color: var(--brand); margin-bottom: 12px; }
.product-page-desc { font-size: 14px; color: var(--ink); line-height: 1.6; margin: 0 0 14px; }
.product-page-meta { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.product-page-meta strong { color: var(--ink); }
.product-page-seller { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.product-page-seller-link { font-size: 14px; font-weight: 600; color: var(--brand); text-decoration: none; }
.product-page-seller-link:hover { text-decoration: underline; }
.product-page-cart-btn { width: 100%; margin-top: 16px; padding: 12px; font-size: 15px; font-weight: 600; border: none; border-radius: 8px; cursor: pointer; background: var(--brand); color: #fff; transition: background .15s; }
.product-page-cart-btn:hover { background: var(--brand2); }

/* Product detail overlay — 2-column layout */
.prod-detail-overlay {
  position: fixed; inset: 0; z-index: 10001; background: rgba(0,0,0,.6);
  display: flex; justify-content: center; align-items: center; padding: 24px;
}
.prod-detail-card {
  background: var(--panel); border-radius: 16px; width: 100%; max-width: 1080px;
  max-height: 90vh; overflow: hidden; position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
}
.prod-detail-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: rgba(0,0,0,.35); color: #fff; border: none; border-radius: 50%;
  width: 36px; height: 36px; font-size: 20px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.prod-detail-close:hover { background: rgba(0,0,0,.6); }
.prod-detail-body { display: flex; min-width: 0; max-height: 90vh; }
.prod-detail-left { flex: 0 0 42%; position: relative; background: #0a0e11; min-width: 0; overflow: hidden; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.prod-detail-slider { position: relative; flex: 1; min-height: 260px; width: 100%; overflow: hidden; }
.prod-detail-slide { position: absolute; inset: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.prod-detail-slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
.prod-detail-media-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 14px; border-top: 1px solid var(--line);
  background: var(--panel2, var(--panel)); flex-shrink: 0;
}
.prod-media-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--glass); color: var(--ink); font-size: 13px; font-weight: 600;
  font-family: inherit; cursor: pointer; text-decoration: none; line-height: 1.2; text-align: center;
  transition: border-color .15s, background .15s, color .15s;
}
.prod-media-btn:hover { border-color: var(--brand); color: var(--brand); background: rgba(var(--brand-rgb), .07); }
.prod-media-btn svg { flex-shrink: 0; }
.prod-media-btn-ready { border-color: var(--brand); color: var(--brand); background: rgba(var(--brand-rgb), .08); }
.prod-detail-right { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--panel); }
.prod-detail-scroll { flex: 1 1 auto; overflow-y: auto; min-height: 0; padding: 44px 44px 10px 32px; }
.prod-detail-scroll::-webkit-scrollbar { width: 8px; }
.prod-detail-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.prod-detail-scroll::-webkit-scrollbar-track { background: transparent; }
.prod-meta-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.prod-brand { font-size: 13px; color: var(--muted); font-weight: 500; }
.prod-type { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: .4px; }
.prod-type.digital { background: rgba(108,92,231,.12); color: #6c5ce7; }
.prod-type.physical { background: rgba(46,204,113,.12); color: #27ae60; }
.prod-title { font-size: 26px; font-weight: 700; color: var(--ink); margin: 0 0 16px; line-height: 1.2; }
.prod-price-block { background: #0a0e11; border-radius: 12px; padding: 18px 20px; margin-bottom: 20px; }
.prod-price-main { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -.5px; }
.prod-price-meta { display: flex; align-items: center; gap: 12px; margin-top: 6px; font-size: 13px; color: rgba(255,255,255,.7); }
.prod-stock { font-weight: 600; color: #2ecc71; }
.prod-trust { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.prod-trust-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.prod-trust-item svg { flex-shrink: 0; }
.prod-accordion { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; background: var(--panel2, var(--panel)); }
.prod-accordion-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: transparent; border: none; color: var(--ink); font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer; text-align: left; }
.prod-accordion-trigger svg { flex-shrink: 0; color: var(--muted); transition: transform .2s; }
.prod-accordion-trigger.open svg { transform: rotate(180deg); }
.prod-accordion-content { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.prod-accordion-body { padding: 0 18px 16px; font-size: 14px; line-height: 1.6; color: var(--text); white-space: pre-wrap; }
.prod-accordion-body.muted { color: var(--muted); }
.prod-accordion-section { padding: 0 18px 14px; }
.prod-accordion-section h4 { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin: 12px 0 6px; }
.prod-accordion-section:first-child h4 { margin-top: 0; }
.prod-accordion-section p { font-size: 14px; color: var(--text); line-height: 1.6; margin: 0; }
.prod-actions { flex-shrink: 0; padding: 18px 32px 22px; border-top: 1px solid var(--line); background: var(--panel2, var(--panel)); display: flex; flex-direction: column; gap: 10px; }
.prod-actions .btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 20px; font-size: 15px; font-weight: 600; border-radius: 10px; }
.prod-cart-row { display: flex; gap: 10px; align-items: stretch; }
.prod-cart-row .prod-add-to-cart { flex: 3 1 0; width: auto; }
.prod-cart-row .prod-view-cart {
  flex: 1 1 0; display: none;
  align-items: center; justify-content: center; gap: 8px;
  padding: 14px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--glass);
  color: var(--ink); font-size: 13px; font-weight: 600; text-align: center;
  text-decoration: none; white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s;
}
.prod-cart-row .prod-view-cart svg { flex-shrink: 0; }
.prod-cart-row .prod-view-cart:hover { border-color: var(--brand); color: var(--brand); background: rgba(var(--brand-rgb), .08); }
.prod-cart-row.has-cart .prod-view-cart { display: inline-flex; }
@media (max-width: 480px) {
  .prod-cart-row .prod-view-cart span { display: none; }
  .prod-cart-row .prod-view-cart { font-size: 0; padding: 14px 0; }
}
.prod-add-cart { background: var(--brand); color: #fff; border: none; }
.prod-add-cart:hover { background: var(--brand2); }
.prod-add-cart:disabled { opacity: .7; cursor: not-allowed; }
.prod-whatsapp { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
.prod-whatsapp:hover { background: rgba(var(--brand-rgb), .08); }
.prod-secure { margin: 0; font-size: 11px; color: var(--muted); text-align: center; line-height: 1.4; }
.prod-secure svg { width: 12px; height: 12px; margin-right: 4px; vertical-align: middle; }
.prod-detail-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  background: rgba(0,0,0,.35); color: #fff; border: none; border-radius: 50%;
  width: 40px; height: 40px; font-size: 22px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.prod-detail-arrow:hover { background: rgba(0,0,0,.6); }
.prod-detail-prev { left: 12px; }
.prod-detail-next { right: 12px; }
.prod-detail-dots {
  position: absolute; bottom: 14px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px;
}
.prod-detail-dot {
  width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer;
}
.prod-detail-dot.active { background: #fff; }
@media (max-width: 768px) {
  .prod-detail-card { overflow-y: auto; }
  .prod-detail-body { flex-direction: column; max-height: none; }
  .prod-detail-left { flex: none; width: 100%; border-right: none; border-bottom: 1px solid var(--line); }
  .prod-detail-slider { height: 280px; flex: none; min-height: 0; }
  .prod-detail-right { max-height: none; }
  .prod-detail-scroll { padding: 50px 24px 16px; flex: none; overflow: visible; }
  .prod-actions { padding: 16px 24px 20px; }
}
@keyframes spin { to { transform: rotate(360deg); } }
.biz-overlay-signal { margin-top: 16px; padding: 14px 14px 16px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.biz-overlay-signal-intro { font-size: 12px; color: var(--muted); margin: 2px 0 10px; }
.biz-overlay-signal textarea {
  width: 100%; min-height: 70px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--glass); color: var(--ink);
  font-family: inherit; font-size: 13px; resize: vertical; margin-bottom: 10px; box-sizing: border-box;
}
.biz-overlay-signal textarea:focus { outline: none; border-color: var(--brand); }
.biz-overlay-signal-btns { display: flex; gap: 10px; }
.biz-overlay-signal-btns .btn { flex: 1; padding: 9px 0; font-size: 13px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; font-family: inherit; }
.biz-overlay-signal-btns .btn-primary { background: var(--brand); color: #fff; }
.biz-overlay-signal-btns .btn-primary:hover { background: var(--brand2); }
.biz-overlay-signal-btns .btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.biz-overlay-signal-btns .btn-ghost:hover { background: var(--glass); }
.biz-overlay-signal-done { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: var(--glass); border: 1px solid var(--line); font-size: 12px; color: var(--ink); }
.biz-overlay-signal-done a { color: var(--brand); font-weight: 600; text-decoration: none; }
.biz-overlay-signal-done a:hover { text-decoration: underline; }
.biz-overlay-signal-guest { text-align: center; padding: 12px 0; }
.biz-overlay-signal-guest a { color: var(--brand); font-weight: 600; text-decoration: none; }
.biz-overlay-signal-guest a:hover { text-decoration: underline; }
.biz-overlay-footer {
  padding: 12px 20px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 8px;
}
.biz-overlay-footer a {
  font-size: 12px; font-weight: 600; color: var(--brand); text-decoration: none;
  display: flex; align-items: center; gap: 4px;
}
.biz-overlay-footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .biz-pin { width: 32px; height: 32px; }
  .biz-pin-initials { font-size: 13px; }
  .biz-pin-ring { inset: -3px; }
  .biz-pin[data-tier="gold"].biz-pin-full { width: 32px; height: 32px; }
  .biz-overlay-card { width: calc(100vw - 24px); max-height: 92vh; height: auto; }
  .biz-overlay-card.biz-overlay-dual { width: calc(100vw - 24px); flex-direction: column; height: auto; }
  .biz-overlay-showcase { border-left: none; border-top: 1px solid var(--line); max-height: none; }
}

/* Advert view page */
.advert-view-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 20px;
  max-width: 700px;
  margin: 0 auto;
}
.advert-view-header {
  margin-bottom: 16px;
}
.advert-view-header h1 {
  margin: 0 0 6px;
  font-size: 1.3rem;
}
.advert-view-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.advert-view-desc {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* Advert hero container — fixed height, contained */
.advert-hero {
  width: 100%;
  max-width: 100%;
  max-height: 50vh;
  min-height: 200px;
  background: var(--chip-bg, #f0f0f0);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
  min-width: 0;
}
.advert-hero-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 50vh;
  object-fit: contain;
  display: block;
}

.advert-view-actions {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
}
.advert-biz-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--glass, rgba(0,0,0,0.04));
  border: 1px solid var(--line);
  border-radius: 10px;
}
.advert-biz-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.advert-view-page .signal-box {
  padding: 16px;
  background: var(--glass, rgba(0,0,0,0.04));
  border: 1px solid var(--line);
  border-radius: 10px;
}
.advert-view-page .signal-box h3 {
  margin: 0 0 10px;
  font-size: 1em;
}
.advert-view-page .signal-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* === Signal Service === */
.signal-page { max-width: 800px; }
.signal-form-grid { display: flex; flex-direction: column; gap: 18px; }
.signal-step { transition: opacity .2s; }

.signal-category-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px; margin-top: 10px;
}
.signal-cat-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); cursor: pointer; transition: all .15s;
  color: var(--ink); font-size: 12px; text-align: center;
}
.signal-cat-btn:hover { border-color: var(--brand); background: var(--card); }
.signal-cat-btn.active { border-color: var(--brand); background: rgba(0,170,77,.08); box-shadow: 0 0 0 1px var(--brand); }
.signal-cat-icon { width: 28px; height: 28px; color: var(--muted); }
.signal-cat-btn.active .signal-cat-icon { color: var(--brand); }
.signal-cat-name { font-weight: 500; line-height: 1.2; }

.signal-droplet { position: relative; width: 60px; height: 60px; }
.signal-droplet-inner {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--brand); border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.signal-droplet-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid var(--brand); opacity: 0;
  animation: droplet-pulse 2s ease-out infinite;
}
@keyframes droplet-pulse {
  0% { transform: scale(.4); opacity: .8; }
  100% { transform: scale(1.2); opacity: 0; }
}

.signal-summary-card {
  padding: 12px 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; font-size: 14px; line-height: 1.6;
}
.signal-success {
  padding: 12px 16px; background: rgba(0,170,77,.1); border: 1px solid rgba(0,170,77,.3);
  border-radius: 10px; color: #00AA4D; font-weight: 500;
}
.signal-error {
  padding: 12px 16px; background: rgba(231,76,60,.1); border: 1px solid rgba(231,76,60,.3);
  border-radius: 10px; color: #e74c3c; font-weight: 500;
}

/* Signal received */
.signal-received-list { display: flex; flex-direction: column; gap: 14px; }
.signal-notif-card { transition: box-shadow .15s; }
.signal-notif-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.signal-notif-header { display: flex; align-items: center; gap: 12px; }
.signal-notif-meta { flex: 1; }
.signal-notif-meta strong { display: block; font-size: 15px; }
.signal-notif-meta .muted { font-size: 13px; }
.signal-notif-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.signal-notif-tier { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; }
.badge-gold { background: rgba(255,215,0,.15); color: #b8860b; }
.badge-silver { background: rgba(192,192,192,.15); color: #666; }
.badge-bronze { background: rgba(205,127,50,.15); color: #8B4513; }
.badge-demo { background: rgba(52,152,219,.15); color: #2980b9; }
html[data-theme="dark"] .badge-gold { background: rgba(255,215,0,.12); color: #FFD700; }
html[data-theme="dark"] .badge-silver { background: rgba(192,192,192,.12); color: #C0C0C0; }
html[data-theme="dark"] .badge-bronze { background: rgba(205,127,50,.12); color: #CD7F32; }
html[data-theme="dark"] .badge-demo { background: rgba(52,152,219,.12); color: #5dade2; }
.signal-notif-contact { margin-top: 10px; }
.signal-notif-actions { margin-top: 10px; display: flex; align-items: center; gap: 10px; }

/* Signal detail */
.signal-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .signal-detail-grid { grid-template-columns: 1fr; } }
.signal-notif-list { display: flex; flex-direction: column; gap: 8px; }
.signal-notif-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--glass-border); }
.signal-notif-item:last-child { border-bottom: none; }
.signal-notif-info { flex: 1; }
.signal-notif-info strong { display: block; font-size: 14px; }
.signal-notif-info .muted { font-size: 12px; }
.signal-notif-status { display: flex; align-items: center; gap: 6px; }

/* Signal messages */
.signal-messages { max-height: 400px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.signal-msg { max-width: 75%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.signal-msg-sent { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.signal-msg-received { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.signal-msg-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 12px; }
.signal-msg-sent .signal-msg-header { color: rgba(255,255,255,.8); }
.signal-msg-received .signal-msg-header { color: var(--muted); }
.signal-msg-body { word-break: break-word; }
.signal-msg-unread { background: var(--brand); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 600; }
.signal-chat-card { padding: 0; overflow: hidden; }
.signal-chat-input { padding: 12px; border-top: 1px solid var(--line); }
.signal-msg-context { margin-bottom: 12px; padding: 8px 12px; background: var(--card); border-radius: 8px; border: 1px solid var(--line); }

/* Products */
.product-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--glass-border);
}
.product-item:last-child { border-bottom: none; }
.product-info { flex: 1; }
.product-info strong { font-size: 14px; }
.product-actions { display: flex; gap: 4px; }

/* ===== Leads / Service mode select (topbar, next to search) ===== */
#leadSearchMode.lead-searchmode,
.lead-searchmode {
  height: 32px; width: 12%; min-width: 0; max-width: none; flex: 0 0 12%;
  border-radius: 8px; border: 1px solid var(--line);
  background: var(--input-bg); color: var(--text); padding: 0 8px 0 6px;
  font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  #leadSearchMode.lead-searchmode,
  .lead-searchmode {
    width: auto; flex: 0 0 auto; min-width: 90px;
    font-size: 13px; padding: 0 10px 0 8px;
  }
}

/* ===== Service search results (dropdown cards) ===== */
.lead-biz-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.lead-biz-item:last-child { border-bottom: 0; }
.lead-biz-item:hover { background: var(--input-bg); }
.lead-biz-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; background: var(--brand); overflow: hidden;
}
.lead-biz-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lead-biz-meta { flex: 1; min-width: 0; }
.lead-biz-name { font-weight: 600; }
.lead-biz-cat { font-size: .82em; color: var(--muted); }

/* ===== Service-mode static step indicator (matches .seg chip aesthetics) ===== */
.lead-steps-static { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.lead-step-item {
  border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px;
  font-weight: 500; font-size: 11px; line-height: 1.4; margin: 0;
  background: var(--input-bg); color: var(--muted);
  transition: background .2s, border-color .2s, transform .2s;
}
.lead-step-item:hover { border-color: var(--brand2); transform: translateY(-1px); }
.lead-step-item.active { background: var(--chip-bg); border-color: var(--brand2); color: var(--brand); font-weight: 600; }

/* ===== Service-mode business logo chips (quick-browse row) ===== */
.lead-biz-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 12px 5px 5px; border: 1px solid var(--line); border-radius: 999px;
    background: var(--card-bg); cursor: pointer; flex-shrink: 0; max-width: 200px;
}
.lead-biz-chip:hover { border-color: var(--brand); }
.lead-biz-chip-avatar {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85em; color: #fff; background: var(--brand);
    overflow: hidden;
}
.lead-biz-chip-name { font-size: .85em; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- service business list popup ---------- */
.svc-biz-list-popup {
  position: absolute; bottom: 56px; left: 12px; z-index: 25;
  width: auto; min-width: 220px; max-width: 380px; max-height: 320px;
  background: var(--glass-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  overflow: hidden; display: flex; flex-direction: column;
  transition: max-width .2s ease, width .2s ease;
}
.svc-biz-list-popup.expanded { width: 380px; }
/* Directory panel: anchored bottom-right and wider than the nearby list */
.svc-biz-list-popup.directory { left: auto; right: 12px; width: 460px; max-width: 460px; }
.svc-biz-list-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.svc-biz-list-title { font-size: 13px; font-weight: 700; color: var(--ink); font-family: 'Helvetica Now', 'Segoe UI', Roboto, Arial, sans-serif; white-space: nowrap; }
.svc-biz-list-caret {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-right: 2px;
  color: var(--muted); font-size: 16px; font-weight: 700; line-height: 1;
  transition: transform .18s ease;
}
.svc-biz-list-popup.expanded .svc-biz-list-caret { transform: rotate(90deg); }
.svc-biz-list-count {
  min-width: 18px; height: 18px; padding: 0 6px; margin-left: 6px;
  border-radius: 9px; background: var(--glass); color: var(--muted);
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.svc-biz-list-spacer { flex: 1; }
.svc-biz-list-filter { display: none; }
.svc-biz-list-close {
  width: 24px; height: 24px; border-radius: 6px; border: none; background: none;
  color: var(--muted); cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.svc-biz-list-close:hover { background: rgba(220,50,50,.1); color: #e74c3c; }
#svcBizListHead { cursor: pointer; user-select: none; }
.svc-biz-list-popup:not(.expanded) .svc-biz-list-spacer,
.svc-biz-list-popup:not(.expanded) .svc-biz-list-filter { display: none; }
.svc-biz-list-popup:not(.expanded) .svc-biz-list-close { margin-left: 8px; }
.svc-biz-list-popup.expanded .svc-biz-list-filter { display: block; }
.svc-biz-list-popup.expanded .svc-biz-list-close { margin-left: 0; }
#svcBizListPopup:not(.expanded) .svc-biz-list-body { display: none; }
#svcBizListPopup:not(.expanded) .svc-biz-list-filter { display: none; }
#svcBizListPopup.expanded .svc-biz-list-hint { display: none; }
.svc-biz-list-body {
  flex: 1; overflow-y: auto; padding: 6px 0;
}
.svc-biz-list-empty { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }
.svc-biz-list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; cursor: pointer; transition: background .12s;
}
.svc-biz-list-item:hover { background: var(--glass); }
.svc-biz-list-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.svc-biz-list-avatar.tier-gold { background: linear-gradient(135deg, #f59e0b, #d97706); }
.svc-biz-list-avatar.tier-silver { background: linear-gradient(135deg, #9ca3af, #6b7280); }
.svc-biz-list-avatar.tier-bronze { background: linear-gradient(135deg, #d97706, #92400e); }
.svc-biz-list-avatar.tier-demo { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.svc-biz-list-info { flex: 1; min-width: 0; }
.svc-biz-list-name { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-biz-list-meta { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-biz-list-tier {
  flex-shrink: 0; font-size: 10px; font-weight: 700; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px; letter-spacing: .3px;
}
.svc-biz-list-tier.tier-gold { background: #fef3c7; color: #92400e; }
.svc-biz-list-tier.tier-silver { background: #f3f4f6; color: #374151; }
.svc-biz-list-tier.tier-bronze { background: #fef3c7; color: #92400e; }
.svc-biz-list-tier.tier-demo { background: #dbeafe; color: #1d4ed8; }
html[data-theme="dark"] .svc-biz-list-tier.tier-gold { background: rgba(245,158,11,.15); color: #f59e0b; }
html[data-theme="dark"] .svc-biz-list-tier.tier-silver { background: rgba(156,163,175,.15); color: #9ca3af; }
html[data-theme="dark"] .svc-biz-list-tier.tier-bronze { background: rgba(217,119,6,.15); color: #d97706; }
html[data-theme="dark"] .svc-biz-list-tier.tier-demo { background: rgba(59,130,246,.15); color: #60a5fa; }
.svc-biz-list-section { padding: 4px 14px 2px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.svc-biz-list-section .svc-biz-list-count { min-width: 14px; height: 14px; padding: 0 4px; margin-left: 4px; font-size: 10px; }

/* Breadcrumb trail — map strip + directory panel (hybrid slug navigation) */
.svc-crumb-strip {
  position: absolute; top: 58px; left: 12px; z-index: 22;
  display: flex; align-items: center; flex-wrap: nowrap; gap: 2px;
  max-width: calc(100% - 24px); max-height: 34px; overflow: hidden;
  padding: 4px 10px;
  background: var(--glass-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  font-size: 12px; line-height: 1.4;
}
.svc-crumb-strip[hidden] { display: none; }
.svc-crumb {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 5px; border: none; background: none; cursor: pointer;
  color: var(--brand); font-size: 12px; font-weight: 600;
  font-family: inherit; white-space: nowrap; border-radius: 5px;
  max-width: 150px; overflow: hidden; text-overflow: ellipsis;
  transition: background .15s, color .15s;
}
.svc-crumb:hover { background: var(--glass); }
.svc-crumb-current { color: var(--ink); cursor: default; font-weight: 600; }
.svc-crumb-current:hover { background: none; }
.svc-crumb-sep { color: var(--muted); padding: 0 1px; font-weight: 700; flex-shrink: 0; }
.svc-biz-list-crumbs {
  flex-shrink: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 2px;
  padding: 6px 14px 8px; border-bottom: 1px solid var(--glass-border);
  font-size: 12px;
}
.svc-biz-list-crumbs[hidden] { display: none; }
@media (max-width: 640px) {
  .svc-crumb-strip { top: 56px; left: 10px; right: 10px; max-width: none; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .svc-crumb-strip::-webkit-scrollbar { display: none; }
  .svc-crumb { max-width: 110px; }
}
@media (max-width: 480px) {
  .lead-map-bottom .lead-history-btn .lead-history-label { display: none; }
  .lead-map-bottom .lead-history-btn { padding: 5px 8px; }
}

/* In-app advert viewer */
.ad-view-backdrop {
  position: fixed; inset: 0; z-index: 10002; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.ad-view-card {
  position: relative; width: 100%; max-width: 640px; max-height: 88vh; overflow: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  background: var(--panel); border: 1px solid var(--glass-border); border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
}
.ad-view-card::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* Advert viewer: two-column top row + full-width bottom row on desktop */
.ad-view-card.ad-view-dual { display: flex; flex-direction: column; overflow: hidden; }
.ad-view-grid {
  display: flex; flex-direction: column; align-items: flex-start; min-height: 0;
  flex: 1 1 auto; overflow: hidden;
}
@media (min-width: 901px) {
  .ad-view-card.ad-view-dual {
    width: 1000px; max-width: calc(100vw - 48px);
    max-height: calc(100vh - 48px);
  }
  .ad-view-grid { flex-direction: row; }
  .ad-view-grid .ad-view-main { flex: 0 0 45%; min-width: 0; overflow: hidden; }
  .ad-view-grid .ad-view-side {
    flex: 1 1 55%; min-width: 0; align-self: stretch; border-left: 1px solid var(--line);
    overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none;
  }
  .ad-view-grid .ad-view-side::-webkit-scrollbar { display: none; width: 0; height: 0; }
}
.ad-view-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(0,0,0,.12); color: var(--ink); cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.ad-view-close:hover { background: rgba(220,50,50,.2); color: #e74c3c; }
.ad-view-main { display: flex; }
.ad-view-side {
  display: flex; flex-direction: column; padding: 0;
}
.ad-view-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.ad-view-img { width: 100%; }
.ad-view-img img {
  width: 100%; height: auto; object-fit: contain; display: block;
  max-height: 76vh;
}
.ad-view-img-fallback {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 200px; font-size: 64px; font-weight: 700; color: var(--muted);
  background: var(--chip-bg);
}
.ad-view-logo {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none;
  background: var(--chip-bg); border: 2px solid var(--glass-border);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.ad-view-logo-fallback {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; font-size: 18px; font-weight: 700;
  color: var(--accent); background: rgba(var(--brand-rgb), .1);
  border: 2px solid var(--glass-border); flex: none;
}
.ad-view-head-name {
  min-width: 0;
  font-size: 14px; font-weight: 700; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ad-view-body { padding: 16px 20px 24px; }
.ad-view-title { margin: 0 0 8px; font-size: 20px; line-height: 1.25; color: var(--ink); }
.ad-view-desc { font-size: 14px; line-height: 1.55; color: var(--muted); white-space: pre-wrap; margin-bottom: 16px; }
/* Advert viewer: full-width bottom row under both columns */
.ad-view-bottom {
  width: 100%; box-sizing: border-box; background: var(--panel);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 12px 20px;
}
.ad-view-bottom .ad-view-seller { border-top: none; padding: 0; }
.ad-view-bottom .ad-view-actions { margin-top: 0; }
.ad-view-seller {
  display: flex; align-items: center; gap: 8px; padding: 10px 0;
  color: var(--ink);
  font-size: 13px; font-weight: 600;
}
.ad-view-like.biz-post-like { font-size: 14px; }
.ad-view-like.biz-post-like svg { width: 26px; height: 26px; }
.ad-view-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.ad-view-actions .btn { text-decoration: none; }
@media (max-width: 900px) {
  .ad-view-card.ad-view-dual { overflow: hidden; }
  .ad-view-grid { overflow: hidden; }
  .ad-view-grid .ad-view-main { flex: 0 0 auto; align-self: stretch; }
  .ad-view-grid .ad-view-side {
    flex: 1 1 auto; min-height: 0; max-height: none; align-self: stretch;
    border-top: 1px solid var(--line);
    overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none;
  }
  .ad-view-grid .ad-view-side::-webkit-scrollbar { display: none; width: 0; height: 0; }
}
@media (max-width: 640px) {
  .ad-view-card { max-height: 92vh; }
  .ad-view-img img { max-height: 38vh; }
}

/* Popup head wraps + hides the hint below desktop so the filter/close never
   overhang the right edge of the panel. */
/* On phones/tablets the "Businesses nearby" popup hugs the viewport edges
   instead of the fixed 380px desktop width; this block sits after the base
   rules so it overrides width:380px/left:12px that would otherwise push the
   expanded list off the right side of the screen. */
@media (max-width: 900px) {
  .svc-biz-list-popup { left: 12px; right: 12px; width: auto; min-width: 0; max-width: none; max-height: 260px; }
  .svc-biz-list-popup.expanded { left: 12px; right: 12px; width: auto; max-width: none; }
  .svc-biz-list-popup.directory { left: 12px; right: 12px; width: auto; max-width: none; max-height: 300px; }
  .svc-biz-list-head { row-gap: 6px; }
  .svc-biz-list-filter { margin-left: auto; }
}

/* ===== Business overlay "view full profile" link ===== */
.biz-overlay-link {
    display: block; margin-top: 12px; text-align: center;
    color: var(--brand); font-weight: 600; text-decoration: none;
}
.biz-overlay-link:hover { text-decoration: underline; }

/* ===== Business profile (service wizard + dedicated page) ===== */
.business-profile-wrap { max-width: 1040px; margin: 0 auto; padding: 16px; }
.business-profile-wrap .profile-two-col { align-items: flex-start; }
.business-profile-wrap .profile-two-col .profile-col-left,
.business-profile-wrap .profile-two-col .profile-col-right { gap: 20px; }
.business-profile-wrap .profile-two-col .adverts-slider-wrap { padding: 2px 0 6px; }
.back-link { display: inline-block; margin-bottom: 12px; color: var(--brand); text-decoration: none; }
.business-profile-head { display: flex; gap: 16px; align-items: flex-start; }
.business-profile-id { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding-top: 2px; }
.biz-message-fab {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand); color: #fff; border: none; cursor: pointer;
    box-shadow: var(--shadow); transition: transform .15s, background .15s;
}
.biz-message-fab:hover { transform: translateY(-1px); background: var(--brand2); }
.biz-message-fab svg { flex-shrink: 0; }
.profile-action-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 16px; padding: 14px 0 6px; border-top: 1px solid var(--line);
}
.profile-action-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: var(--glass); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; cursor: pointer;
  transition: all .15s ease;
}
.profile-action-btn:hover { color: var(--brand); border-color: var(--brand); }
.profile-action-btn svg { flex-shrink: 0; }
.profile-action-btn.profile-fav-btn:hover { color: #d97706; border-color: #d97706; }
.profile-action-btn.profile-fav-btn.active { color: #f59e0b; border-color: #f59e0b; background: rgba(245,158,11,.1); }
.profile-action-btn.profile-fav-btn.active svg { fill: #f59e0b; }
.profile-action-btn.profile-activate-btn:hover { color: #16a34a; border-color: #16a34a; }
.demo-activate-chip { font-family: inherit; transform: translateY(-1px); background: rgba(0,170,77,.15); color: #00AA4D; border-color: rgba(0,170,77,.35); }
.demo-activate-chip:hover { filter: brightness(1.05); text-decoration: underline; }
.badge-demo { background: rgba(0,170,77,.15); color: #00AA4D; border-color: rgba(0,170,77,.35); }
html[data-theme="dark"] .demo-activate-chip,
html[data-theme="dark"] .badge-demo { background: rgba(0,170,77,.16); color: #00C256; }
.profile-fav-count { font-variant-numeric: tabular-nums; }
.business-profile-avatar {
    width: 64px; height: 64px; aspect-ratio: 1; border-radius: 50%;
    flex: 0 0 64px; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.6em; color: #fff; background: var(--brand);
}
.business-profile-avatar img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    max-width: none; object-fit: cover; border-radius: 50%;
}
.biz-cart-icon {
    position: relative; background: none; border: none; cursor: pointer;
    padding: 4px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--text); transition: color .15s, background .15s;
    margin-left: 4px;
}
.biz-cart-icon:hover { color: var(--brand); background: rgba(var(--brand-rgb), .1); }
.biz-cart-icon svg { display: block; }
.biz-cart-badge {
    position: absolute; top: 0; right: 0; min-width: 16px; height: 16px;
    border-radius: 8px; background: var(--brand); color: #fff;
    font-size: 9px; font-weight: 700; display: flex; align-items: center;
    justify-content: center; padding: 0 3px; line-height: 1;
}
.business-profile-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.business-profile-tagline { margin: 6px 0 0; color: var(--muted); }
.business-profile-section { margin-top: 20px; }
.business-profile-section h3 { margin: 0 0 8px; font-size: 1em; }
.business-body { white-space: pre-wrap; color: var(--text); line-height: 1.5; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 8px; }
.product-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }

/* ===== Product store cards (profile) ===== */
.profile-two-col .product-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    overflow: hidden;
    min-width: 0;
}
.profile-two-col .product-store-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: var(--input-bg);
    transition: border-color .15s, box-shadow .15s;
}
.profile-two-col .product-store-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.profile-two-col .product-store-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-width: 0;
}
.profile-two-col .product-store-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    display: block;
}
.profile-two-col .product-store-fallback {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--brand-rgb), 0.06);
    color: var(--muted);
}
.product-store-info {
    padding: 10px;
}
.product-store-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-store-price {
    font-size: 12px;
    font-weight: 600;
    color: var(--brand);
    margin-top: 2px;
}
.product-store-desc {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-line-clamp: 2;
    overflow: hidden;
}
.product-store-delivery {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
    display: block;
    white-space: pre-wrap;
    margin-bottom: 4px;
}
.product-store-returns {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
    display: block;
    white-space: pre-wrap;
}
.product-card-name { font-weight: 600; }
.product-card-price { color: var(--brand); font-weight: 600; margin-top: 4px; }
.product-card-desc { font-size: .85em; color: var(--muted); margin-top: 6px; }
.signal-box { border-top: 1px solid var(--line); padding-top: 16px; }
.signal-actions { display: flex; gap: 8px; margin-top: 10px; }
.textarea {
    width: 100%; padding: 10px 12px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--input-bg); color: var(--text);
    font: inherit; resize: vertical; box-sizing: border-box;
}

/* ===== Mailer benefit (billing + showcase) ===== */
.mailer-benefit-card {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--input-bg);
}
.mailer-included-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    margin-bottom: 18px; padding: 16px 18px; border: 1px solid var(--brand); border-radius: 14px; background: rgba(0,170,77,.08);
}

/* ===== Advert thumbnails (profile) ===== */
.profile-two-col .advert-thumb-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.profile-two-col .advert-thumb-grid::-webkit-scrollbar { display: none; }
.profile-two-col .advert-thumb-item {
    position: relative;
    flex: 0 0 auto;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--line);
    background: var(--input-bg);
}
.advert-thumb-item img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    display: block;
}
.advert-thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(var(--brand-rgb), 0.08);
}
.advert-thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.35);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .2s;
}
.advert-thumb-item:hover .advert-thumb-overlay { opacity: 1; }
.advert-thumb-edit {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.22);
    backdrop-filter: blur(4px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,.3);
    transition: background .15s, transform .15s;
}
.advert-thumb-edit:hover { background: rgba(255,255,255,.35); transform: scale(1.1); }
.advert-thumb-edit svg {
    width: 22px;
    height: 22px;
}
.advert-thumb-feature {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(4px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,.3);
    transition: background .15s, transform .15s, color .15s;
    z-index: 2;
}
.advert-thumb-feature svg { width: 20px; height: 20px; }
.advert-thumb-feature:hover { background: rgba(0,0,0,.6); transform: scale(1.1); }
.advert-thumb-feature.active { color: #ffd34d; }
.advert-thumb-feature.active:hover { color: #ffd34d; }
.advert-thumb-title {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.advert-thumb-desc {
    margin-top: 3px;
    font-size: 10.5px;
    line-height: 1.35;
    color: rgba(255,255,255,.85);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.advert-thumb-actions {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}
.advert-thumb-actions button {
    background: rgba(255,255,255,.2);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    cursor: pointer;
    line-height: 1;
}
.advert-thumb-actions button:hover { background: rgba(255,255,255,.35); }

/* Advert create-more placeholder */
.profile-advert-create-more {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border: 2px dashed var(--line);
    border-radius: 10px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
    transition: border-color .2s, color .2s;
}
.profile-advert-create-more:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.profile-advert-create-more svg {
    flex-shrink: 0;
    opacity: .6;
}
.profile-advert-create-more:hover svg { opacity: 1; }

/* Advert drop zone (inside modal) */
.profile-advert-drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px 20px;
    border: 2px dashed rgba(var(--brand-rgb), 0.38);
    outline: 1px dashed rgba(var(--brand-rgb), 0.25);
    outline-offset: -8px;
    border-radius: 12px;
    cursor: pointer;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    background: var(--dropzone-bg);
    transition: border-color .2s, background .2s, box-shadow .2s, transform .15s;
}
.profile-advert-drop-zone:hover {
    border-color: var(--brand);
    background: var(--chip-bg);
    box-shadow: 0 4px 16px rgba(var(--brand-rgb), 0.12);
    transform: translateY(-1px);
}
.profile-advert-drop-zone:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-color: var(--brand);
}
.profile-advert-drop-zone.is-dragover,
.profile-advert-drop-zone.dragover {
    border-color: var(--brand);
    background: var(--chip-bg);
    box-shadow: 0 6px 20px rgba(var(--brand-rgb), 0.18);
    transform: scale(1.01);
    color: var(--ink);
}
.profile-advert-drop-zone svg { opacity: .65; color: var(--brand); }
.profile-advert-drop-zone:hover svg { opacity: 1; }
.profile-advert-drop-zone p { margin: 0; line-height: 1.5; }
.profile-advert-drop-zone .dz-title { font-weight: 700; color: var(--ink); font-size: 14px; }
.profile-advert-drop-zone .dz-hint { font-size: 12px; color: var(--muted); }

/* Adverts slider (profile) - always horizontal */
#advertsList {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
/* Settings: adverts grid (4 per row, wraps, title + desc snippet) */
#advertsList .adverts-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 6px;
}
#advertsList .advert-grid-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--input-bg);
    cursor: pointer;
    isolation: isolate;
    transition: border-color .15s;
}
#advertsList .advert-grid-card:hover { border-color: var(--brand); }
#advertsList .advert-grid-media {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}
#advertsList .advert-grid-media img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
#advertsList .advert-thumb-feature {
    position: absolute; top: 8px; left: 8px;
    width: 34px; height: 34px; border-radius: 50%;
    border: none; background: rgba(0,0,0,.55);
    color: #fff; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 3;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    transition: background .15s, transform .15s, color .15s;
}
#advertsList .advert-thumb-feature svg { width: 18px; height: 18px; }
#advertsList .advert-thumb-feature:hover { background: rgba(0,0,0,.75); transform: scale(1.08); }
#advertsList .advert-thumb-feature.active { color: #ffd34d; }
#advertsList .advert-thumb-overlay {
    position: absolute; inset: 0; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.3);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    opacity: 0; transition: opacity .2s;
}
#advertsList .advert-grid-card:hover .advert-thumb-overlay { opacity: 1; }
#advertsList .advert-thumb-edit {
    width: 40px; height: 40px; border-radius: 50%;
    border: none; background: rgba(255,255,255,.28);
    color: #fff; display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    transition: background .15s, transform .15s;
}
#advertsList .advert-thumb-edit:hover { background: rgba(255,255,255,.5); transform: scale(1.08); }
#advertsList .advert-thumb-edit svg { width: 19px; height: 19px; }
#advertsList .advert-grid-body { padding: 10px 12px 12px; }
#advertsList .advert-grid-title {
    font-size: 13px; font-weight: 700; color: var(--heading);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px;
}
#advertsList .advert-grid-desc {
    font-size: 12px; color: var(--muted); line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-width: 900px) {
    #advertsList .adverts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    #advertsList .adverts-grid { grid-template-columns: 1fr; }
}
/* Business profile adverts slider */
.adverts-slider-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 10px 0 6px;
}
.adverts-slider-track {
    display: flex !important;
    flex-flow: row nowrap !important;
    flex-direction: row !important;
    align-items: stretch;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scroll-padding: 4px;
    padding: 4px 96px 8px 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}
.adverts-slider-track::-webkit-scrollbar { display: none; }
.adverts-slider-track .advert-thumb-item {
    flex: 0 0 320px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
    height: 320px;
    scroll-snap-align: start;
    opacity: .85;
    cursor: pointer;
    transition: opacity .2s, transform .15s, box-shadow .15s, border-color .15s;
}
.adverts-slider-track .advert-thumb-item:hover {
    opacity: 1;
    transform: translateY(-2px);
    border-color: var(--brand);
    box-shadow: 0 6px 18px rgba(var(--brand-rgb), .45);
}
.adverts-slider-track .advert-thumb-item.active { opacity: 1; }

/* Advert modal two-column */
.advert-modal-card {
    border-radius: var(--radius);
    overflow: hidden;
}
.advert-modal-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}
.advert-modal-body {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 20px;
    align-items: stretch;
}
.advert-modal-left {
    flex: 1 1 0 !important;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.advert-modal-right {
    flex: 1 1 0 !important;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.advert-modal-left .advert-drop-zone-field,
.advert-modal-left .advert-modal-img-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    align-self: center;
    flex: none;
}
.advert-drop-zone-field {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    padding: 20px;
}
.advert-modal-img-wrap {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: var(--glass);
    border: 1px solid var(--line);
}
.advert-modal-img-wrap img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    display: block;
}
.advert-modal-img-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    left: auto;
    bottom: auto;
    display: flex;
    gap: 6px;
}
.advert-modal-img-actions button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    transition: background .15s, transform .15s;
}
.advert-modal-img-actions button:hover { transform: scale(1.08); }
.advert-modal-img-actions svg {
    width: 15px;
    height: 15px;
}
.advert-modal-img-replace { background: rgba(0,0,0,.55); color: #fff; }
.advert-modal-img-replace:hover { background: rgba(0,0,0,.75); }
.advert-modal-img-delete {
    background: rgba(220,38,38,.85);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}
.advert-modal-img-delete:hover { background: rgba(220,38,38,1); }
.advert-modal-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    margin-top: 16px;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .advert-modal-body { flex-direction: column !important; flex-wrap: wrap !important; }
    .advert-modal-left { flex: none !important; width: 100%; }
    .advert-modal-right { flex: none !important; width: 100%; }
    .advert-drop-zone-field, .advert-modal-img-wrap { height: auto; aspect-ratio: 1 / 1; max-width: 260px; }
}

/* Advert empty state */
.profile-advert-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}
.profile-advert-empty p { margin: 0; }

/* ===== Advert modal mobile responsive ===== */
@media (max-width: 540px) {
    #advertModal { padding: 0; align-items: flex-end; }
    #advertModal .card { max-width: 100%; border-radius: 14px 14px 0 0; max-height: 85vh; }
}
@media (min-width: 541px) and (max-height: 600px) {
    #advertModal .card { max-height: 80vh; }
}

/* ===== Profile mobile: single column ===== */
@media (max-width: 700px) {
    .profile-two-col { grid-template-columns: 1fr; }
    .profile-col-left, .profile-col-right { max-width: 100%; order: unset; }
    .profile-type-btns { flex-wrap: wrap; }
  .content { padding: 14px 14px 32px; }
}

/* ===== Category picker modal ===== */
.cat-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    max-height: 50vh;
    overflow-y: auto;
    padding: 4px 0;
}
.cat-picker-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--input-bg);
    cursor: pointer;
    font-size: 12px;
    text-align: center;
    transition: border-color .15s, background .15s;
    user-select: none;
}
.cat-picker-item:hover { border-color: var(--accent); }
.cat-picker-item.selected {
    border-color: var(--brand);
    background: rgba(var(--brand-rgb), 0.1);
}
.cat-picker-item .cat-picker-icon { font-size: 22px; line-height: 1; }
.cat-picker-item .cat-picker-name { line-height: 1.2; }
.cat-custom-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--brand); background: rgba(var(--brand-rgb), .1);
  color: var(--ink); font-size: 12px; cursor: pointer; user-select: none;
}
.cat-custom-chip:hover { background: rgba(220, 50, 50, .16); border-color: var(--danger); color: var(--danger); }

@media (max-width: 480px) {
  .product-modal-body { flex-direction: column !important; }
  .product-modal-body > div:first-child { flex: none !important; width: 100% !important; }
}


/* ---------- profile: post & adverts tab ---------- */
.post-adverts-grid {
  display: grid; grid-template-columns: 1fr;
  gap: var(--profile-gap, 18px); align-items: start;
}
.post-adverts-grid > .card { margin: 0; min-width: 0; }
.settings-post-preview {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--glass); display: flex; flex-direction: column;
}
.settings-post-preview-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: var(--input-bg); }
.settings-post-preview-body { padding: 12px 14px; }
.settings-post-preview-title { font-size: 14px; font-weight: 700; color: var(--heading); margin-bottom: 4px; }
.settings-post-preview-desc { font-size: 13px; color: var(--muted); line-height: 1.5; white-space: pre-line; }
.settings-post-preview-meta { margin-top: 8px; }
.settings-posts-list { display: flex; flex-direction: column; gap: 12px; }
.settings-post-actions { display: flex; gap: 8px; padding: 0 14px 12px; }

/* ---------- profile: products ---------- */
.products-card-head { justify-content: space-between; flex-wrap: nowrap; gap: 10px; }
.products-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.products-add-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.product-search-wrap { position: relative; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--input-bg); overflow: hidden; }
.product-search-wrap:focus-within { border-color: var(--brand); }
.product-search-wrap > svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; z-index: 1; }
.product-search-wrap input { width: 170px; padding: 6px 10px 6px 30px; border: none; background: transparent; border-radius: 0; font-size: 12px; outline: none; }
.product-search-wrap .products-add-btn { height: 100%; min-height: 32px; border-radius: 0; border-left: 1px solid var(--line); margin-left: 8px; flex: 0 0 auto; box-sizing: border-box; }
select.pm-select { width: auto; max-width: 150px; flex: 0 0 auto; padding: 6px 28px 6px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; }
select.pm-select-wide { width: 100%; max-width: 100%; font-weight: 500; padding: 9px 11px; font-size: 14px; }
.products-section-card {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    min-width: 0;
    box-sizing: border-box;
}
.products-section-card .product-card-grid { width: 100%; max-width: 100%; box-sizing: border-box; }
.product-card-grid {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}
.product-store-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--glass);
    cursor: pointer;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.product-store-card:hover {
    cursor: pointer;
    transform: translateY(-2px);
    border-color: rgba(var(--brand-rgb), .5);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}
html[data-theme="dark"] .product-store-card:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, .5); }
.product-store-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.product-store-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
    box-sizing: border-box;
}
.product-store-fallback {
    color: var(--muted);
    opacity: .55;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.product-store-badge { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; background: rgba(0, 0, 0, .55); color: #fff; }
.product-store-count { position: absolute; bottom: 8px; right: 8px; padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 600; background: rgba(0, 0, 0, .55); color: #fff; }
.product-store-info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 60px; flex: 1; }
.product-store-name { font-weight: 600; font-size: 12px; line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-store-price { font-weight: 700; font-size: 13px; color: var(--brand); }
.product-store-policy { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); min-width: 0; }
.product-store-policy > svg { flex: 0 0 auto; opacity: .7; }
.product-store-policy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 20px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; font-size: 13px; }
@media (max-width: 1200px) {
  .product-card-grid { grid-template-columns: repeat(5, minmax(0,1fr)) !important; }
}
@media (max-width: 960px) {
  .product-card-grid { grid-template-columns: repeat(4, minmax(0,1fr)) !important; }
}
@media (max-width: 700px) {
  .products-section-card { margin-left: 0; margin-right: 0; }
  .product-card-grid { grid-template-columns: repeat(3, minmax(0,1fr)) !important; gap: 10px; }
}
@media (max-width: 480px) {
  .product-card-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}

/* ===== Biz overlay cart icon ===== */
.biz-cart-icon-btn {
    background: none; border: none; cursor: pointer;
    padding: 4px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--text); transition: color .15s, background .15s;
    margin-left: 4px;
}
.biz-cart-icon-btn:hover { color: var(--brand); background: rgba(var(--brand-rgb), .1); }
.biz-cart-icon-btn svg { display: block; }
.biz-cart-icon-badge {
    position: absolute; top: 0; right: 0; min-width: 16px; height: 16px;
    border-radius: 8px; background: var(--brand); color: #fff;
    font-size: 9px; font-weight: 700; display: flex; align-items: center;
    justify-content: center; padding: 0 3px; line-height: 1;
}

/* ===== Biz showcase cart view ===== */
.biz-showcase-cart-view { padding: 12px; }
.biz-showcase-cart-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid var(--line);
}
.biz-showcase-cart-item-name { font-weight: 600; font-size: 13px; }
.biz-showcase-cart-item-qty { font-size: 12px; color: var(--muted); }
.biz-showcase-cart-item-price { font-weight: 700; color: var(--brand); }
.biz-showcase-cart-total {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 12px; padding-top: 12px; border-top: 2px solid var(--line);
    font-size: 16px; font-weight: 700;
}
.biz-showcase-cart-back {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: none; cursor: pointer; color: var(--brand);
    font-size: 13px; font-weight: 600; padding: 4px 0; margin-bottom: 8px;
}

/* ===== Inline product detail popup ===== */
.biz-product-detail-inline {
    display: flex; gap: 16px; background: var(--input-bg);
    border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
    margin: 8px 0;
}
.biz-product-detail-left {
    flex: 0 0 200px; width: 200px; min-height: 200px;
    background: var(--glass); display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.biz-product-detail-left img { width: 100%; height: 100%; object-fit: cover; }
.biz-product-detail-right { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.biz-product-detail-right h3 { margin: 0; font-size: 16px; color: var(--text); }
.biz-product-detail-right .biz-pd-price { font-size: 20px; font-weight: 700; color: var(--brand); }
.biz-product-detail-right .biz-pd-desc { font-size: 13px; color: var(--text); line-height: 1.5; }
.biz-product-detail-right .biz-pd-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.biz-pd-back {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: none; cursor: pointer; color: var(--brand);
    font-size: 13px; font-weight: 600; padding: 4px 0; margin-bottom: 8px;
}

/* ===== Messages: two-column chat ===== */
.msg-page {
    position: relative;
    display: flex;
    height: calc(100vh - 120px);
    min-height: 420px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--panel);
}

/* Close (go back) button pinned to the top-right corner of the messages page */
.msg-close {
    position: absolute; top: 10px; right: 10px; z-index: 6;
    width: 30px; height: 30px; border-radius: 50%;
    border: 1px solid var(--line); background: var(--glass);
    color: var(--ink); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform .2s, border-color .2s, background .2s, color .2s;
}
.msg-close:hover { transform: scale(1.05); border-color: #e74c3c; background: rgba(231,76,60,.12); color: #e74c3c; }

/* ---- Column 1: conversations list ---- */
.msg-list {
    width: 350px;
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-right: 1px solid var(--line);
    background: var(--panel);
    overflow-y: auto;
}
.msg-list-head {
    position: sticky; top: 0; z-index: 2;
    padding: 16px 16px 12px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}
.msg-list-head h2 { margin: 0; font-size: 18px; }
.msg-list-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    color: var(--ink); text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition: background .15s;
    position: relative;
}
.msg-list-item:hover { background: var(--panel2); }
.msg-list-item.active { background: var(--chip-bg); border-left: 3px solid var(--brand); }
.msg-list-item .avatar { box-shadow: none; flex-shrink: 0; }
.msg-list-meta {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 2px;
}
.msg-list-name {
    font-weight: 600; font-size: 13px; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.msg-list-preview {
    font-size: 12px; color: var(--muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.msg-empty {
    padding: 24px 16px; color: var(--muted); font-size: 13px; text-align: center;
}

/* ---- Column 2: active thread ---- */
.msg-thread {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column;
    background: var(--panel);
}
.msg-thread-empty {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; color: var(--muted); text-align: center; padding: 24px;
}
.msg-thread-head {
    display: flex; align-items: center;
    gap: 12px; padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
    flex-shrink: 0;
}
.msg-thread-person {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: var(--ink); min-width: 0;
}
.msg-thread-person .avatar { box-shadow: none; flex-shrink: 0; }
.msg-thread-person strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* ---- Message bubbles ---- */
.msg-thread-body {
    flex: 1; min-height: 0;
    overflow-y: auto;
    padding: 16px;
    display: flex; flex-direction: column; gap: 10px;
}
.msg-bubble {
    display: flex; align-items: flex-end; gap: 8px;
    max-width: 72%;
}
.msg-bubble .msg-bubble-avatar { flex-shrink: 0; box-shadow: none; }
.msg-bubble-theirs { align-self: flex-start; }
.msg-bubble.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-bubble-bubble {
    padding: 8px 12px;
    border-radius: 14px;
    background: #2A2A2A;
    color: var(--ink);
    word-break: break-word;
    min-width: 0;
}
.msg-bubble-theirs .msg-bubble-bubble { border-bottom-left-radius: 4px; color: #fff; }
.msg-bubble.mine .msg-bubble-bubble {
    background: var(--brand);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.msg-bubble-text { font-size: 14px; line-height: 1.4; }
.msg-bubble-time {
    font-size: 10px; opacity: .75; margin-top: 4px; text-align: right;
    white-space: nowrap;
}
.msg-bubble-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 4px;
}
.msg-read-receipt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: .8;
}
.msg-read-receipt svg { width: 14px; height: 14px; }

/* ---- Input area ---- */
.msg-compose {
    display: flex; align-items: flex-end; gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    background: var(--panel);
    flex-shrink: 0;
}
.msg-compose textarea {
    flex: 1; min-width: 0; resize: none;
    background: var(--input-bg); color: var(--ink);
    border: 1px solid var(--line); border-radius: 10px;
    font: inherit; padding: 10px 12px; line-height: 1.4;
    max-height: 120px;
}
.msg-compose textarea:focus { outline: none; border-color: var(--brand); }
.msg-compose .btn { flex-shrink: 0; }

/* ---- Conversations list nav dot (unread) ---- */
.msg-list-item .nav-dot { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); }

/* ---- Responsive: stack columns on small screens ---- */
@media (max-width: 720px) {
    .msg-page { flex-direction: column; height: auto; min-height: 0; }
    .msg-list { width: 100%; flex: none; border-right: none; border-bottom: 1px solid var(--line); max-height: 240px; }
    .msg-thread { min-height: 420px; }
    .msg-bubble { max-width: 88%; }
}

/* ===== Billing: Plan Cards ===== */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 16px;
  perspective: 1000px;
}
@media (max-width: 900px) {
  .plan-grid { grid-template-columns: 1fr; }
}

.plan-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 26px 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: transform .15s ease-out, box-shadow .2s ease, border-color .2s ease, background .2s ease;
  transform-style: preserve-3d;
}
.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(var(--brand-rgb), .45);
}

/* Restrained metallic accent per tier (theme-aware) */
.plan-card[data-tier="bronze"] {
  border-color: rgba(176, 110, 50, .34);
  background: linear-gradient(180deg, rgba(205, 127, 50, .05), transparent 46%), var(--panel);
}
.plan-card[data-tier="gold"] {
  border-color: rgba(200, 158, 30, .38);
  background: linear-gradient(180deg, rgba(218, 165, 32, .06), transparent 46%), var(--panel);
}
.plan-card[data-tier="silver"] {
  border-color: rgba(var(--brand-rgb), .4);
  box-shadow: 0 0 0 1px rgba(var(--brand-rgb), .16), 0 14px 34px rgba(var(--brand-rgb), .12);
  background: linear-gradient(180deg, rgba(var(--brand-rgb), .08), transparent 46%), var(--panel);
}
.plan-card[data-tier="silver"]:hover {
  box-shadow: 0 0 0 1px rgba(var(--brand-rgb), .22), 0 20px 44px rgba(var(--brand-rgb), .2);
  transform: translateY(-4px);
}
html[data-theme="dark"] .plan-card[data-tier="bronze"] { border-color: rgba(205, 127, 50, .5); }
html[data-theme="dark"] .plan-card[data-tier="gold"]   { border-color: rgba(218, 165, 32, .5); }
html[data-theme="dark"] .plan-card[data-tier="silver"] { border-color: rgba(var(--brand-rgb), .5); }

/* Tier header: icon beside tier name */
.plan-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.plan-tier-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  object-fit: contain;
  box-sizing: border-box;
  padding: 6px;
  border-radius: 14px;
  background: var(--panel2);
  border: 1px solid var(--line);
}
.plan-card[data-tier="bronze"] .plan-tier-icon { border-color: rgba(205, 127, 50, .4); }
.plan-card[data-tier="silver"] .plan-tier-icon { border-color: rgba(163, 171, 185, .5); }
.plan-card[data-tier="gold"]   .plan-tier-icon { border-color: rgba(218, 165, 32, .45); }
.plan-head-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
.plan-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: capitalize;
  color: var(--ink);
  line-height: 1.1;
}
.plan-popular {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #fff;
  background: var(--brand);
  padding: 4px 10px;
  border-radius: 99px;
  line-height: 1.2;
  box-shadow: 0 0 0 1px rgba(var(--brand-rgb), .4), 0 3px 10px rgba(var(--brand-rgb), .35);
}

/* Bronze-only free-trial ribbon (top-right, crossing corner) */
.plan-trial-ribbon {
  position: absolute;
  top: 24px;
  right: -50px;
  width: 200px;
  transform: rotate(45deg);
  z-index: 3;
  background: linear-gradient(180deg, #CD7F32, #B87333 55%, #8C5E2C);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2px;
  text-transform: uppercase;
  padding: 5px 0;
  box-shadow: 0 4px 14px rgba(140, 94, 44, .45);
  border: 1px solid rgba(255, 255, 255, .28);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}
.plan-trial-ribbon span {
  display: block;
  line-height: 1.2;
  padding-left: 10px;
}
html[data-theme="dark"] .plan-trial-ribbon {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .55);
}

/* Small accent/divider under header */
.plan-accent {
  height: 3px;
  width: 44px;
  border-radius: 99px;
  margin-bottom: 22px;
}
.plan-card[data-tier="bronze"] .plan-accent { background: linear-gradient(90deg, #B87333, #8C5E2C); }
.plan-card[data-tier="silver"] .plan-accent { background: linear-gradient(90deg, #9CA3AF, #C9CDD3); }
.plan-card[data-tier="gold"]   .plan-accent { background: linear-gradient(90deg, #DAA520, #B8860B); }

.plan-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.plan-price-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.plan-currency {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}
.plan-amount {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--ink);
  line-height: 1;
}
.plan-amount .plan-cents {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  vertical-align: super;
}
.plan-period {
  font-size: 15px;
  color: var(--muted);
  margin-left: 4px;
  font-weight: 500;
  align-self: flex-start;
  margin-top: 11px;
}
.plan-yearly-original {
  display: none;
  align-items: baseline;
  gap: 2px;
  margin-top: -4px;
  padding-left: 2px;
}
.plan-price[data-yearly-original] .plan-yearly-original {
  display: inline-flex;
}
.plan-amount-original {
  font-size: 20px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: line-through;
  line-height: 1;
}
.plan-amount-original .plan-cents {
  font-size: 14px;
  font-weight: 500;
  vertical-align: super;
}

/* Divider between price and features */
.plan-price-divider {
  height: 1px;
  background: var(--line);
  margin: 22px 0 16px;
}

/* Glare/glint sweep on card hover */
.plan-card::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
  transform: skewX(-20deg);
  opacity: 0;
  transition: left .6s ease, opacity .3s ease;
  pointer-events: none;
  border-radius: 16px 0 0 16px;
}
.plan-card:hover::before {
  left: 150%;
  opacity: 1;
  transition: left .8s ease, opacity 0s;
}

/* Specular glare highlight - follows mouse position */
.plan-glare {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255,255,255,0.06), transparent 55%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 1;
}
.plan-card:hover .plan-glare {
  opacity: 1;
}
html[data-theme="dark"] .plan-glare {
  background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255,255,255,0.02), transparent 55%);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
}
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
  border-bottom: 1px solid var(--line);
}
.plan-features li:last-child { border-bottom: none; }
.plan-features li svg { margin-top: 2px; }
.plan-features li span { color: var(--ink); }

.plan-cta-form { margin-top: auto; }
.plan-cta-form .btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
}

.billing-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}
.billing-toggle-label { font-size: 12px; color: var(--muted); }
.toggle-switch {
  display: inline-flex;
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
}
.toggle-switch input[type="radio"] { display: none; }
.toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  transition: all .15s ease;
  white-space: nowrap;
}
.toggle-btn .muted { font-size: 11px; }
.toggle-switch input[type="radio"]:checked + .toggle-btn {
  background: var(--brand);
  color: #fff;
}
.toggle-switch input[type="radio"]:checked + .toggle-btn .muted { color: rgba(255,255,255,.8); }
.toggle-switch input[type="radio"]:focus-visible + .toggle-btn { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Active subscription card enhancements */
.mailer-benefit-card {
  background: linear-gradient(135deg, rgba(0,170,77,.08), rgba(0,170,77,.02));
  border: 1px solid rgba(0,170,77,.2);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.mailer-benefit-card .att-info { flex: 1; }
.mailer-benefit-card .att-name {
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.mailer-benefit-card .att-meta { font-size: 12px; line-height: 1.5; }
.mailer-benefit-card .btn-sm { flex-shrink: 0; margin-top: 4px; }

/* Plans alert dot — green pulsing indicator for unsubscribed / first-time visitors */
.plans-alert-dot {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #00AA4D;
  margin-left: 6px;
  vertical-align: middle;
  box-shadow: 0 0 5px rgba(0,170,77,.8);
  animation: nav-dot-pulse-green 1.5s ease-in-out infinite;
  transition: opacity .3s ease, transform .3s ease;
}
.plans-alert-dot.hidden {
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
}

/* Profile view count (eye + number) */
.biz-overlay-views {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1;
}
.profile-views-count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  vertical-align: middle;
  line-height: 1;
}
.profile-views-count svg {
  display: inline-block;
  vertical-align: middle;
  opacity: 0.7;
}

/* ==========================================
   CART PAGE — Redesigned two-column layout
   ========================================== */

.cart-page-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  box-sizing: border-box;
  width: 100%;
}

/* Header */
.cart-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.cart-back-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
.cart-back-link:hover { color: var(--brand); }
.cart-page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.cart-page-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--chip-bg);
  padding: 3px 10px;
  border-radius: 20px;
}

/* Empty state */
.cart-empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--muted);
}
.cart-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
}
.cart-empty-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 20px;
}

/* Grid layout */
.cart-grid {
  display: grid;
  grid-template-columns: minmax(0, 13fr) minmax(0, 7fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .cart-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .cart-summary-col { order: -1; }
}

/* Items column */
.cart-items-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* Vendor card */
.cart-vendor-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.cart-vendor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--chip-bg);
  border-bottom: 1px solid var(--line);
}
.cart-vendor-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cart-vendor-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-vendor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-vendor-avatar span {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.cart-vendor-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.cart-vendor-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-vendor-name:hover { color: var(--brand); }
.cart-vendor-tagline {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-vendor-total {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
  flex-shrink: 0;
}

/* Items list */
.cart-items-list {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Item row */
.cart-item-row {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  align-items: flex-start;
  transition: opacity .25s, transform .25s, box-shadow .15s;
}
.cart-item-row:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cart-item-img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(var(--brand-rgb), 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
}
.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.cart-item-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.cart-item-unit-price {
  font-size: 12px;
  color: var(--muted);
}
.cart-item-line-total {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* Actions column — trash on top right, total under it, qty below */
.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
  align-self: stretch;
}

/* Quantity stepper */
.cart-qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--input-bg);
}
.cart-qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s, color .12s;
  line-height: 1;
  padding: 0;
}
.cart-qty-btn:hover {
  background: var(--chip-bg);
  color: var(--brand);
}
.cart-qty-input {
  width: 40px;
  height: 32px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: none;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  outline: none;
  -moz-appearance: textfield;
  padding: 0;
}
.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Remove button */
.cart-item-remove {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--muted);
  border-radius: 6px;
  transition: color .15s, background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item-remove:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

/* ==========================================
   SUMMARY SIDEBAR
   ========================================== */
.cart-summary-col {
  position: sticky;
  top: 80px;
  min-width: 0;
}
.cart-summary-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.cart-summary-title {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

/* Free shipping promo bar */
.cart-shipping-promo {
  background: rgba(var(--brand-rgb), 0.06);
  border: 1px solid rgba(var(--brand-rgb), 0.15);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.cart-shipping-achieved {
  background: rgba(var(--brand-rgb), 0.1);
  border-color: rgba(var(--brand-rgb), 0.25);
  color: var(--brand);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-shipping-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 10px;
}
.cart-shipping-text strong { color: var(--brand); }
.cart-shipping-bar-track {
  width: 100%;
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.cart-shipping-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  border-radius: 3px;
  transition: width .4s ease;
}

/* Summary lines */
.cart-summary-lines {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.cart-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
  padding: 5px 0;
}
.cart-summary-line span:last-child {
  font-weight: 600;
  color: var(--text);
}
.cart-summary-muted {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

/* Total */
.cart-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

/* Checkout buttons */
.cart-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.cart-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: filter .15s, box-shadow .15s;
}
.cart-summary-unconfigured {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 10px;
  background: var(--input-bg);
  border-radius: 8px;
}

/* Secure payment note */
.cart-summary-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin: 0;
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .cart-item-row {
    flex-wrap: wrap;
    gap: 10px;
  }
  .cart-item-img {
    width: 64px;
    height: 64px;
  }
  .cart-item-actions {
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    align-self: auto;
  }
  .cart-qty-stepper { flex-shrink: 0; }
  .cart-vendor-header { flex-wrap: wrap; }
  .cart-page-wrap { padding: 16px 12px 32px; }
  .cart-summary-card { padding: 18px; }
}

/* ==========================================
   CHECKOUT PAGE — Two-column layout
   ========================================== */

.co-page-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  box-sizing: border-box;
  width: 100%;
}

/* Breadcrumb */
.co-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 13px;
}
.co-breadcrumb-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}
.co-breadcrumb-link:hover { text-decoration: underline; }
.co-breadcrumb-sep { color: var(--muted); }
.co-breadcrumb-current { font-weight: 600; color: var(--text); }

/* Grid */
.co-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) {
  .co-grid { grid-template-columns: 1fr; }
  .co-summary-col { order: -1; }
}

/* Form column */
.co-form-col {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}
.co-form-col form {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 0;
  width: 100%;
  min-width: 0;
}

/* Cards */
.co-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.co-card-title {
  margin: 0 0 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.co-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(var(--brand-rgb), 0.12);
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Fields */
.co-field {
  margin-bottom: 16px;
}
.co-field:last-child { margin-bottom: 0; }
.co-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.co-label-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  opacity: 0.7;
}
.co-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
  font-family: inherit;
}
.co-input::placeholder { color: var(--muted); opacity: 0.5; }
.co-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.1);
}
.co-input--email { max-width: 100%; }
.co-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.co-textarea {
  resize: vertical;
  min-height: 60px;
  line-height: 1.5;
}
.co-field-hint {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  opacity: 0.7;
}

/* Field row layouts */
.co-field-row {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.co-field-row:last-child { margin-bottom: 0; }
.co-field-row .co-field { margin-bottom: 0; }
.co-field-row--2 { grid-template-columns: 1fr 1fr; }
.co-field-row--3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) {
  .co-field-row--2,
  .co-field-row--3 { grid-template-columns: 1fr; }
}

/* Digital products note */
.co-digital-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(var(--brand-rgb), 0.06);
  border: 1px solid rgba(var(--brand-rgb), 0.15);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
}

/* ==========================================
   CHECKOUT SUMMARY SIDEBAR
   ========================================== */
.co-summary-col {
  position: sticky;
  top: 80px;
  min-width: 0;
}
.co-summary-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.co-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.co-summary-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.co-summary-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: rgba(var(--brand-rgb), 0.08);
  border: 1px solid rgba(var(--brand-rgb), 0.18);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Summary items */
.co-summary-items {
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 16px;
}
.co-summary-items::-webkit-scrollbar { width: 4px; }
.co-summary-items::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
.co-summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.co-summary-item + .co-summary-item {
  border-top: 1px solid var(--line);
}
.co-summary-item-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(var(--brand-rgb), 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
}
.co-summary-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.co-summary-item-info {
  flex: 1;
  min-width: 0;
}
.co-summary-item-name {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.co-summary-item-qty {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.co-summary-item-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

/* Divider */
.co-summary-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 14px 0;
}

/* Price rows */
.co-summary-prices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.co-summary-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}
.co-summary-price-val {
  font-weight: 600;
  color: var(--text);
}
.co-summary-price-free {
  font-size: 13px;
  color: var(--brand);
  font-weight: 500;
}

/* Total */
.co-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

/* Place Order Button */
.co-place-order-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s, box-shadow .15s;
  box-shadow: 0 4px 12px rgba(var(--brand-rgb), 0.3);
  font-family: inherit;
}
.co-place-order-btn:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 18px rgba(var(--brand-rgb), 0.4);
}
.co-place-order-btn:active {
  transform: translateY(1px);
}

/* Test mode badge */
.co-test-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 8px;
  font-size: 12px;
  color: #b45309;
  text-align: center;
}

/* Secure note */
.co-secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin: 14px 0 0;
}
.co-secure-note strong { font-weight: 600; }

/* Responsive */
@media (max-width: 640px) {
  .co-page-wrap { padding: 16px 12px 32px; }
  .co-card { padding: 18px; }
  .co-summary-card { padding: 18px; }
  .co-summary-header { flex-wrap: wrap; }
}
