/* ============================================================
   WTechni Analytics — Design System 2.0
   Sidebar layout · Dark mode · Premium cards
   ============================================================ */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #eef2ff;
  --primary-mid: #6366f1;
  --primary-ring: #818cf8;
  --primary-soft: #c7d2fe;
  --primary-faint: #a5b4fc;
  --primary-glow: rgba(79, 70, 229, .45);
  --primary-2: #6d28d9;
  --accent: #10b981;
  --accent-light: #d1fae5;
  --violet: #7c3aed;
  --danger: #ef4444;
  --warn: #f59e0b;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-softer: #f1f5f9;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .07), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 24px 60px -12px rgba(15, 23, 42, .18);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --side-w: 232px;
  --side-bg: #0f172a;
  --side-bg2: #1e293b;
  --side-text: #94a3b8;
  --side-text-active: #f8fafc;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; font-size: 14px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- public nav (landing) ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: -.02em; }
.nav-logo:hover { text-decoration: none; }
.nav-logo .logo-mark { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-2); font-weight: 500; font-size: 14.5px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: 12px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 10px; font-weight: 600; font-size: 14.5px; padding: 10px 18px; transition: all .15s ease; text-decoration: none !important; }
.btn-primary { background: linear-gradient(135deg, var(--primary), #6d28d9); color: #fff !important; box-shadow: 0 4px 16px -4px rgba(79,70,229,.55); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 8px 22px -6px rgba(79,70,229,.6); }
.btn-ghost { background: transparent; color: var(--text-2) !important; }
.btn-ghost:hover { background: var(--bg-softer); color: var(--text) !important; }
.btn-outline { background: var(--bg); color: var(--text) !important; border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--text-3); }
.btn-danger { background: #fee2e2; color: #b91c1c !important; }
.btn-danger:hover { background: #fecaca; }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 7px 13px; font-size: 13.5px; border-radius: 8px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- hero ---------- */
.hero { padding: 84px 0 60px; background:
  radial-gradient(60% 90% at 15% 0%, var(--primary-light) 0%, rgba(238,242,255,0) 60%),
  radial-gradient(50% 80% at 95% 10%, #ecfdf5 0%, rgba(236,253,245,0) 55%); }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--text-2); margin-bottom: 24px; }
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-light); }
.hero h1 { font-size: clamp(38px, 6vw, 62px); line-height: 1.06; letter-spacing: -.035em; font-weight: 800; max-width: 760px; }
.hero h1 .grad { background: linear-gradient(90deg, var(--primary), var(--primary-2) 55%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { margin-top: 22px; font-size: 19px; color: var(--text-2); max-width: 640px; }
.hero-actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note { margin-top: 14px; font-size: 13.5px; color: var(--text-3); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }

/* dashboard preview card */
.preview { background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.preview-bar { display: flex; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.preview-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.preview-bar span:nth-child(1) { background: #fca5a5; } .preview-bar span:nth-child(2) { background: #fcd34d; } .preview-bar span:nth-child(3) { background: #6ee7b7; }
.preview-body { padding: 18px; }
.preview-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.preview-kpi { background: var(--bg-soft); border-radius: 10px; padding: 10px 12px; }
.preview-kpi b { display: block; font-size: 18px; letter-spacing: -.02em; }
.preview-kpi span { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.preview-live { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.preview-live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.4);} 70% { box-shadow: 0 0 0 8px rgba(16,185,129,0);} 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0);} }
.preview-rows { display: flex; flex-direction: column; gap: 8px; }
.preview-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.preview-row .bar { height: 6px; border-radius: 99px; background: var(--primary-light); position: relative; overflow: hidden; grid-column: 1 / -1; }
.preview-row .bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--primary), var(--primary-ring)); border-radius: 99px; }
.preview-row .name { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-row .val { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- sections ---------- */
.section { padding: 84px 0; }
.section.alt { background: var(--bg-soft); }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head .eyebrow { color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 12.5px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; margin-top: 10px; line-height: 1.15; }
.section-head p { color: var(--text-2); margin-top: 14px; font-size: 16.5px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: all .2s; }
.feature:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--primary-soft); }
.feature .icon { width: 42px; height: 42px; border-radius: 11px; background: var(--primary-light); display: grid; place-items: center; font-size: 20px; margin-bottom: 16px; }
.feature h3 { font-size: 16.5px; margin-bottom: 8px; letter-spacing: -.01em; }
.feature p { color: var(--text-2); font-size: 14.5px; }

.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.compare th, .compare td { padding: 14px 18px; text-align: center; font-size: 14.5px; border-bottom: 1px solid var(--border); }
.compare th { background: var(--bg-soft); font-weight: 700; }
.compare td:first-child, .compare th:first-child { text-align: left; font-weight: 500; color: var(--text-2); }
.compare .us { background: var(--primary-light); font-weight: 700; color: var(--primary-dark); }
.compare .yes { color: var(--accent); font-weight: 700; }
.compare .no { color: var(--text-3); }
.compare tr:last-child td { border-bottom: none; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 30px; display: flex; flex-direction: column; position: relative; }
.plan.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow-lg); }
.plan .tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 99px; letter-spacing: .04em; }
.plan h3 { font-size: 17px; }
.plan .price { font-size: 40px; font-weight: 800; letter-spacing: -.03em; margin: 12px 0 2px; }
.plan .price small { font-size: 15px; color: var(--text-3); font-weight: 500; }
.plan .desc { color: var(--text-2); font-size: 14px; margin-bottom: 18px; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.plan li { display: flex; gap: 9px; font-size: 14.5px; color: var(--text-2); }
.plan li::before { content: "✓"; color: var(--accent); font-weight: 700; }
.plan .btn { margin-top: auto; }

.faq { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px; }
.faq summary { font-weight: 600; cursor: pointer; font-size: 15.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::after { content: "+"; font-size: 20px; color: var(--text-3); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 12px; color: var(--text-2); font-size: 14.5px; }

.footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--text-3); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer a { color: var(--text-2); }

/* ---------- auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; background:
  radial-gradient(50% 70% at 20% 0%, var(--primary-light) 0%, rgba(238,242,255,0) 60%),
  radial-gradient(40% 60% at 90% 10%, #ecfdf5 0%, rgba(236,253,245,0) 55%), #fff; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 36px; }
.auth-card h1 { font-size: 24px; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-2); font-size: 14.5px; margin-bottom: 24px; }
.auth-card .alt { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-2); }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-input, .form-select { width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); outline: none; transition: border .15s, box-shadow .15s; }
.form-input:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.form-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 13.5px; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; display: none; }
.form-error.show { display: block; }
.form-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; font-size: 13.5px; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; display: none; }
.form-ok.show { display: block; }
.hint { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }

/* ============================================================
   APP SHELL — sidebar + topbar (Design 2.0)
   ============================================================ */
.app-body { background: var(--bg-soft); min-height: 100vh; }
.app-body.has-sidebar { display: flex; }
.app-body main, .app-body .app-shell { flex: 1; min-width: 0; }
.app-shell { display: flex; flex-direction: column; min-height: 100vh; }

/* ---------- sidebar ---------- */
.sidebar { width: var(--side-w); min-width: var(--side-w); background: linear-gradient(180deg, var(--side-bg) 0%, #111c33 100%); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 45; }
.side-logo { display: flex; align-items: center; gap: 10px; padding: 20px 20px 16px; font-weight: 800; font-size: 17px; color: #fff; letter-spacing: -.02em; }
.side-logo:hover { text-decoration: none; }
.side-logo .logo-mark { width: 26px; height: 26px; }
.side-site { padding: 0 14px 6px; }
.side-select { width: 100%; padding: 9px 30px 9px 11px; border: 1px solid rgba(148,163,184,.25); border-radius: 10px; background: rgba(148,163,184,.1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; font-weight: 600; font-size: 13px; color: #e2e8f0; cursor: pointer; outline: none; }
.side-select option { color: #0f172a; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; flex: 1; overflow-y: auto; }
.side-sep { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #64748b; padding: 14px 10px 6px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--side-text); font-weight: 600; font-size: 13.5px; transition: all .14s; position: relative; }
.side-nav a:hover { background: rgba(148,163,184,.12); color: var(--side-text-active); text-decoration: none; }
.side-nav a.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 4px 14px -4px var(--primary-glow); }
.side-nav a .nav-ico { width: 20px; text-align: center; font-size: 15px; }
.side-nav a .nav-badge { margin-left: auto; background: var(--accent); color: #052e1f; font-size: 10.5px; font-weight: 800; border-radius: 99px; padding: 1px 8px; }
.side-foot { padding: 12px; border-top: 1px solid rgba(148,163,184,.15); display: flex; flex-direction: column; gap: 10px; }
.side-theme { display: flex; align-items: center; gap: 9px; background: rgba(148,163,184,.1); border: 1px solid rgba(148,163,184,.2); color: var(--side-text); padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 13px; }
.side-theme:hover { background: rgba(148,163,184,.18); color: #fff; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; cursor: pointer; }
.side-user:hover { background: rgba(148,163,184,.12); }
.side-user .avatar { width: 32px; height: 32px; font-size: 13px; border: none; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }
.side-user .su-name { font-size: 12.5px; font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .su-mail { font-size: 11px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- dark theme ---------- */
body[data-theme="dark"] { --bg: #0b1220; --bg-soft: #0e1626; --bg-softer: #1a2436; --text: #e2e8f0; --text-2: #aab6c8; --text-3: #64748b; --border: #223049; --primary-light: rgba(99,102,241,.16); --accent-light: rgba(16,185,129,.16); --shadow: 0 1px 3px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.5); --shadow-lg: 0 24px 60px -12px rgba(0,0,0,.6); }

/* ---------- color palettes (user-selectable) ---------- */
body[data-palette="violet"] { --primary:#7c3aed; --primary-dark:#6d28d9; --primary-light:#f5f3ff; --primary-mid:#8b5cf6; --primary-ring:#a78bfa; --primary-soft:#ddd6fe; --primary-faint:#c4b5fd; --primary-glow:rgba(124,58,237,.45); --primary-2:#9333ea; }
body[data-theme="dark"][data-palette="violet"] { --primary-light: rgba(139,92,246,.16); }
body[data-palette="blue"] { --primary:#2563eb; --primary-dark:#1d4ed8; --primary-light:#eff6ff; --primary-mid:#3b82f6; --primary-ring:#60a5fa; --primary-soft:#bfdbfe; --primary-faint:#93c5fd; --primary-glow:rgba(37,99,235,.45); --primary-2:#1e40af; }
body[data-theme="dark"][data-palette="blue"] { --primary-light: rgba(59,130,246,.16); }
body[data-palette="sky"] { --primary:#0284c7; --primary-dark:#0369a1; --primary-light:#f0f9ff; --primary-mid:#0ea5e9; --primary-ring:#38bdf8; --primary-soft:#bae6fd; --primary-faint:#7dd3fc; --primary-glow:rgba(2,132,199,.45); --primary-2:#0891b2; }
body[data-theme="dark"][data-palette="sky"] { --primary-light: rgba(14,165,233,.16); }
body[data-palette="emerald"] { --primary:#059669; --primary-dark:#047857; --primary-light:#ecfdf5; --primary-mid:#10b981; --primary-ring:#34d399; --primary-soft:#a7f3d0; --primary-faint:#6ee7b7; --primary-glow:rgba(5,150,105,.45); --primary-2:#0d9488; }
body[data-theme="dark"][data-palette="emerald"] { --primary-light: rgba(16,185,129,.16); }
body[data-palette="rose"] { --primary:#e11d48; --primary-dark:#be123c; --primary-light:#fff1f2; --primary-mid:#f43f5e; --primary-ring:#fb7185; --primary-soft:#fecdd3; --primary-faint:#fda4af; --primary-glow:rgba(225,29,72,.45); --primary-2:#9f1239; }
body[data-theme="dark"][data-palette="rose"] { --primary-light: rgba(244,63,94,.16); }
body[data-palette="amber"] { --primary:#d97706; --primary-dark:#b45309; --primary-light:#fffbeb; --primary-mid:#f59e0b; --primary-ring:#fbbf24; --primary-soft:#fde68a; --primary-faint:#fcd34d; --primary-glow:rgba(217,119,6,.45); --primary-2:#c2410c; }
body[data-theme="dark"][data-palette="amber"] { --primary-light: rgba(245,158,11,.16); }
body[data-palette="slate"] { --primary:#475569; --primary-dark:#334155; --primary-light:#f1f5f9; --primary-mid:#64748b; --primary-ring:#94a3b8; --primary-soft:#cbd5e1; --primary-faint:#94a3b8; --primary-glow:rgba(71,85,105,.45); --primary-2:#1e293b; }
body[data-theme="dark"][data-palette="slate"] { --primary-light: rgba(100,116,139,.18); }
body[data-theme="dark"] .topbar { background: rgba(11,18,32,.9); }
body[data-theme="dark"] .panel, body[data-theme="dark"] .kpi, body[data-theme="dark"] .site-card, body[data-theme="dark"] .funnel-block, body[data-theme="dark"] .modal { background: #101a2c; }
body[data-theme="dark"] .panel-head .metric-tabs button.active { background: var(--bg-softer); color: var(--text); }
body[data-theme="dark"] .row:hover { background: var(--bg-softer); }
body[data-theme="dark"] .date-btn, body[data-theme="dark"] .btn-outline { background: #101a2c; }
body[data-theme="dark"] .chip { background: #101a2c; }
body[data-theme="dark"] .setup-banner { background: linear-gradient(135deg, rgba(79,70,229,.18), rgba(16,185,129,.14)); border-color: rgba(99,102,241,.4); }
body[data-theme="dark"] .map-canvas { background: #0e1626; }
body[data-theme="dark"] .snippet { background: #060b16; }
body[data-theme="dark"] .fs-bar-wrap { background: var(--bg-softer); }
body[data-theme="dark"] .form-input, body[data-theme="dark"] .form-select { background: #101a2c; color: var(--text); }
body[data-theme="dark"] .auth-card, body[data-theme="dark"] .feature, body[data-theme="dark"] .plan, body[data-theme="dark"] .faq details, body[data-theme="dark"] .compare { background: #101a2c; }
body[data-theme="dark"] .compare th { background: var(--bg-softer); }
body[data-theme="dark"] .preview { background: #101a2c; }
body[data-theme="dark"] .preview-kpi { background: var(--bg-softer); }
body[data-theme="dark"] .hero-badge, body[data-theme="dark"] .date-pop, body[data-theme="dark"] .filter-pop { background: #101a2c; }

/* ---------- topbar ---------- */
.topbar { background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 46; }
.topbar-inner { display: flex; align-items: center; gap: 16px; height: 58px; padding: 0 24px; }
.topbar .nav-logo { font-size: 16px; }
.topbar-spacer { flex: 1; }
.realtime-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-light); border: 1px solid rgba(16,185,129,.35); border-radius: 99px; padding: 5px 12px; cursor: pointer; }
.realtime-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-light); color: var(--primary-dark); display: grid; place-items: center; font-weight: 700; font-size: 14px; cursor: pointer; border: 1px solid rgba(99,102,241,.4); }

.app-main { max-width: 1280px; margin: 0 auto; padding: 22px 24px 60px; width: 100%; }

/* site switcher (inline fallback) + date */
.dash-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.select { padding: 9px 34px 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; font-weight: 600; font-size: 13.5px; color: var(--text); cursor: pointer; }
.date-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font-weight: 600; font-size: 13.5px; }
.date-btn:hover { border-color: var(--text-3); }
.date-pop { position: absolute; top: 46px; left: 0; right: auto; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 14px; width: 320px; z-index: 60; display: none; }
@media (max-width: 640px) { .date-pop { width: min(320px, calc(100vw - 40px)); } }
.date-pop.open { display: block; }
.date-pop .presets { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 12px; }
.date-pop .presets button { text-align: left; padding: 8px 10px; border: none; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 500; color: var(--text-2); }
.date-pop .presets button:hover { background: var(--bg-softer); }
.date-pop .presets button.active { background: var(--primary-light); color: var(--primary-dark); font-weight: 700; }
body[data-theme="dark"] .date-pop .presets button.active { color: var(--primary-faint); }
.date-pop input[type=date] { width: 100%; margin-bottom: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); }
.date-pop .dp-sep { font-size: 11.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }

/* palette picker (Settings → Account → Appearance) */
.pal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
@media (max-width: 640px) { .pal-grid { grid-template-columns: repeat(2, 1fr); } }
.pal-swatch { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--border); border-radius: 12px; background: var(--bg); transition: all .15s; text-align: left; }
.pal-swatch:hover { border-color: var(--text-3); transform: translateY(-1px); }
.pal-swatch.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.pal-dots { display: flex; flex-direction: column; gap: 4px; flex: none; }
.pal-dots i { width: 16px; height: 16px; border-radius: 50%; display: block; }
.pal-swatch .pal-name { font-size: 13px; font-weight: 700; color: var(--text); }
.pal-swatch .pal-sub { font-size: 11px; color: var(--text-3); font-weight: 500; }

/* saved reports */
.saved-reports { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.saved-reports .sr-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.saved-report { display: inline-flex; align-items: center; gap: 7px; background: var(--primary-light); color: var(--primary-dark); border: 1px solid rgba(99,102,241,.35); border-radius: 99px; padding: 4px 7px 4px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
body[data-theme="dark"] .saved-report { color: var(--primary-faint); }
.saved-report:hover { filter: brightness(1.05); }
.saved-report .sr-del { border: none; background: rgba(99,102,241,.18); color: inherit; width: 17px; height: 17px; border-radius: 50%; font-size: 11px; line-height: 1; display: grid; place-items: center; }
.saved-report .sr-del:hover { background: #fee2e2; color: var(--danger); }

/* filter chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.chip b { color: var(--primary-dark); font-weight: 700; }
body[data-theme="dark"] .chip b { color: var(--primary-faint); }
.chip button { border: none; background: var(--bg-softer); color: var(--text-3); width: 18px; height: 18px; border-radius: 50%; font-size: 12px; line-height: 1; display: grid; place-items: center; }
.chip button:hover { background: #fee2e2; color: var(--danger); }
.add-filter { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--primary); background: none; border: 1px dashed rgba(99,102,241,.5); border-radius: 99px; padding: 5px 12px; }
.add-filter:hover { background: var(--primary-light); }
.filter-pop { position: absolute; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 12px; z-index: 70; width: 260px; display: none; }
.filter-pop.open { display: block; }
.filter-pop label { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; display: block; margin: 8px 0 4px; }

/* ---------- KPI cards ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 16px 13px; position: relative; overflow: hidden; transition: all .16s; }
.kpi::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--primary-2)); opacity: .85; }
.kpi:nth-child(2)::before { background: linear-gradient(90deg, #06b6d4, #3b82f6); }
.kpi:nth-child(3)::before { background: linear-gradient(90deg, var(--accent), #34d399); }
.kpi:nth-child(4)::before { background: linear-gradient(90deg, #f59e0b, #f97316); }
.kpi:nth-child(5)::before { background: linear-gradient(90deg, #ef4444, #f472b6); }
.kpi:nth-child(6)::before { background: linear-gradient(90deg, #8b5cf6, #d946ef); }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi .label { font-size: 11.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.kpi .value { font-size: 25px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: 12px; font-weight: 700; margin-top: 3px; display: inline-flex; align-items: center; gap: 4px; background: var(--bg-soft); padding: 1px 8px; border-radius: 99px; }
body[data-theme="dark"] .kpi .delta { background: var(--bg-softer); }
.delta.up { color: #059669; } .delta.down { color: var(--danger); } .delta.flat { color: var(--text-3); }

/* ---------- panels ---------- */
.grid-2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; margin-bottom: 16px; }
.panel { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .16s; }
.panel:hover { box-shadow: var(--shadow); }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid var(--border); gap: 10px; flex-wrap: wrap; }
.panel-head h3 { font-size: 14.5px; letter-spacing: -.01em; display: flex; align-items: center; gap: 7px; }
.panel-head .actions { display: flex; gap: 8px; align-items: center; }
.panel-head .metric-tabs { display: flex; gap: 2px; background: var(--bg-softer); border-radius: 9px; padding: 3px; }
.panel-head .metric-tabs button { border: none; background: transparent; padding: 5px 10px; font-size: 12px; font-weight: 700; color: var(--text-3); border-radius: 7px; }
.panel-head .metric-tabs button.active { background: var(--bg); color: var(--text); box-shadow: 0 1px 2px rgba(15,23,42,.1); }
.panel-head .metric-tabs button.active::after { content: " ↓"; font-size: 10px; }
.panel-body { padding: 14px 18px 16px; }
.chart-wrap { position: relative; height: 320px; padding: 10px 6px 4px; }

/* breakdown rows */
.rows { display: flex; flex-direction: column; }
.row { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.row:hover { background: var(--bg-soft); }
.row .name { font-size: 13.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; z-index: 2; font-weight: 500; }
.row .val { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; z-index: 2; display: flex; gap: 12px; align-items: baseline; }
.row .val .sub { color: var(--text-3); font-weight: 500; font-size: 12px; }
.row .bar-bg { position: absolute; left: 0; top: 3px; bottom: 3px; border-radius: 7px; background: var(--primary-light); z-index: 1; transition: width .3s; }
.row .pct { color: var(--text-3); font-weight: 600; font-size: 12px; min-width: 44px; text-align: right; }
.rows .empty { color: var(--text-3); font-size: 13.5px; padding: 18px 4px; text-align: center; }

/* events table */
.ev-row { cursor: default; }
.ev-name { font-weight: 600; color: var(--text); }
.props-table { width: 100%; font-size: 13px; margin-top: 8px; border-collapse: collapse; }
.props-table td { padding: 5px 8px; border-top: 1px dashed var(--border); color: var(--text-2); }
.props-table td:last-child { text-align: right; font-weight: 600; }

/* ---------- realtime page ---------- */
.rt-hero { display: grid; grid-template-columns: 340px 1fr; gap: 16px; margin-bottom: 16px; }
.rt-counter { background: linear-gradient(135deg, #059669, #10b981 60%, #34d399); color: #fff; border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; justify-content: center; box-shadow: 0 12px 30px -10px rgba(16,185,129,.55); position: relative; overflow: hidden; }
.rt-counter::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.12); }
.rt-counter .rc-label { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .9; }
.rt-counter .rc-num { font-size: 62px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rt-counter .rc-sub { font-size: 13px; font-weight: 600; opacity: .92; }
.rt-chart-panel { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.rt-chart-panel h3 { font-size: 14.5px; margin-bottom: 8px; }
.rt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rt-live-dot { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-weight: 700; font-size: 12.5px; }
.rt-live-dot .dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; animation: pulse 1.6s infinite; }

/* ---------- sites page ---------- */
.sites-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.site-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: all .15s; cursor: pointer; }
.site-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: rgba(99,102,241,.5); }
.site-card h3 { font-size: 16px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-card .domain { color: var(--text-3); font-size: 13px; font-family: var(--mono); }
.site-card .stats { display: flex; gap: 18px; margin-top: 14px; }
.site-card .stats div b { display: block; font-size: 19px; letter-spacing: -.02em; }
.site-card .stats div span { font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.site-card .spark { margin-top: 12px; height: 40px; }
.public-tag { font-size: 10.5px; background: var(--accent-light); color: #047857; border-radius: 99px; padding: 2px 8px; font-weight: 700; letter-spacing: .03em; }
body[data-theme="dark"] .public-tag { color: #34d399; }

/* settings */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.snippet { font-family: var(--mono); font-size: 12.5px; background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 14px; overflow-x: auto; line-height: 1.6; position: relative; }
.snippet .copy { position: absolute; top: 8px; right: 8px; background: #1e293b; color: #94a3b8; border: none; border-radius: 7px; padding: 4px 10px; font-size: 11.5px; font-weight: 700; }
.snippet .copy:hover { color: #fff; }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(2,6,23,.55); backdrop-filter: blur(3px); z-index: 80; display: none; place-items: center; padding: 20px; }
.modal-back.open { display: grid; }
.modal { background: var(--bg); border-radius: 18px; width: 100%; max-width: 460px; padding: 28px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; }
.modal h2 { font-size: 20px; margin-bottom: 4px; letter-spacing: -.02em; }
.modal .sub { color: var(--text-2); font-size: 14px; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* toast */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--text); color: var(--bg); padding: 11px 20px; border-radius: 12px; font-size: 14px; font-weight: 600; z-index: 99; opacity: 0; transition: all .25s; box-shadow: var(--shadow-lg); }
body[data-theme="dark"] .toast { background: #e2e8f0; color: #0b1220; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* misc */
.muted { color: var(--text-3); font-size: 13px; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.badge { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.badge.est { background: #fef3c7; color: #92400e; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .sites-grid { grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .rt-grid { grid-template-columns: 1fr; }
  .rt-hero { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
@media (max-width: 620px) {
  .features { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .sites-grid { grid-template-columns: 1fr; }
  .preview-kpis { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 36px; }
  .app-main { padding: 16px 14px 60px; }
}

/* ---------- onboarding setup banner ---------- */
.setup-banner { background: linear-gradient(135deg, rgba(79,70,229,.1), rgba(16,185,129,.09)); border: 1px solid rgba(99,102,241,.35); border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; }
.setup-inner { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }

/* ---------- world map ---------- */
.map-canvas { position: relative; width: 100%; aspect-ratio: 2 / 1; border-radius: 10px; overflow: hidden; background: var(--bg-soft); }
.map-canvas img { width: 100%; height: 100%; display: block; user-select: none; }
body[data-theme="dark"] .map-canvas img { filter: invert(.88) hue-rotate(180deg) saturate(1.1); }
.map-bubble { position: absolute; transform: translate(-50%, -50%); background: radial-gradient(circle, var(--primary-ring) 0%, var(--primary) 70%); border-radius: 50%; border: 2px solid rgba(255,255,255,.85); box-shadow: 0 1px 6px var(--primary-glow); cursor: default; }
.map-bubble span { position: absolute; left: 50%; top: -18px; transform: translateX(-50%); font-size: 10px; font-weight: 700; color: var(--primary); opacity: 0; transition: opacity .15s; white-space: nowrap; }
.map-bubble:hover span { opacity: 1; }

/* ---------- goals ---------- */
.goal-type { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: #fef3c7; color: #92400e; border-radius: 5px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
body[data-theme="dark"] .goal-type { background: rgba(245,158,11,.18); color: #fbbf24; }

/* ---------- funnels ---------- */
.funnel-block { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; background: var(--bg); }
.funnel-step { display: grid; grid-template-columns: 1fr; gap: 3px; padding: 6px 0; }
.fs-label { font-size: 13px; font-weight: 600; }
.fs-bar-wrap { background: var(--bg-softer); border-radius: 6px; height: 14px; overflow: hidden; }
.fs-bar { height: 100%; background: linear-gradient(90deg, var(--primary-mid), var(--primary)); border-radius: 6px; }
.fs-val { font-size: 12.5px; color: var(--text-2); }

/* ---------- sites list ---------- */
.online-tag { display: inline-block; font-size: 11px; font-weight: 700; color: #059669; background: #d1fae5; border-radius: 6px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; animation: pulse-dot 2s infinite; }
body[data-theme="dark"] .online-tag { background: rgba(16,185,129,.18); color: #34d399; }
@keyframes pulse-dot { 0%,100% { opacity: 1 } 50% { opacity: .7 } }

/* ---------- print (PDF export via browser print) ---------- */
@media print {
  .sidebar, .topbar, .chips, .saved-reports, .setup-banner, .panel-head .actions, .rt-badge, .toast, .modal-back { display: none !important; }
  .app-shell { display: block; }
  .app-main { max-width: 100%; padding: 0; }
  body { background: #fff; color: #000; }
  .panel, .kpi { break-inside: avoid; box-shadow: none; }
}

/* ============================================================
   Settings 2.0 — tabs, toggles, notifications, wizard
   ============================================================ */
.set-wrap { max-width: 980px; }
.set-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.set-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.set-tab { background: none; border: none; padding: 9px 13px; font-size: 13.5px; font-weight: 600; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -2px; border-radius: 8px 8px 0 0; }
.set-tab:hover { color: var(--text); background: var(--bg-soft); }
.set-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.set-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.set-card > h3 { font-size: 15.5px; margin-bottom: 3px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.set-card > .set-desc { color: var(--text-3); font-size: 13px; margin-bottom: 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--bg-softer); flex-wrap: wrap; }
.set-row:first-of-type { border-top: none; }
.set-row .grow { flex: 1; min-width: 200px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.badge-ok { background: var(--accent-light); color: #065f46; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-off { background: var(--bg-softer); color: var(--text-3); }
body[data-theme="dark"] .badge-ok { background: rgba(16,185,129,.15); color: #6ee7b7; }
body[data-theme="dark"] .badge-warn { background: rgba(245,158,11,.15); color: #fcd34d; }

/* toggle switch */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .sl { position: absolute; inset: 0; background: #cbd5e1; border-radius: 99px; transition: .18s; cursor: pointer; }
.switch .sl:before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .18s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .sl { background: var(--primary); }
.switch input:checked + .sl:before { transform: translateX(18px); }
.switch input:disabled + .sl { opacity: .5; cursor: not-allowed; }

/* lists (shields, members, links, keys) */
.set-list { display: flex; flex-direction: column; }
.set-list .li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--bg-softer); font-size: 14px; flex-wrap: wrap; }
.set-list .li:first-child { border-top: none; }
.set-list .li .mut { color: var(--text-3); font-size: 12.5px; }
.icon-btn { background: none; border: none; color: var(--text-3); font-size: 15px; padding: 4px 7px; border-radius: 7px; }
.icon-btn:hover { background: #fee2e2; color: var(--danger); }
.add-inline { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.add-inline .form-input { flex: 1; min-width: 160px; }
.form-input, .form-select { background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 8px 12px; font-size: 14px; color: var(--text); }
.form-input:focus, .form-select:focus { outline: 2px solid var(--primary-light); border-color: var(--primary); }
body[data-theme="dark"] .form-input:focus { outline-color: rgba(79,70,229,.35); }

/* notifications */
.notif-wrap { position: relative; }
.notif-btn { position: relative; background: none; border: 1px solid var(--border); border-radius: 10px; font-size: 16px; padding: 6px 10px; }
.notif-btn:hover { background: var(--bg-soft); }
.notif-badge { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; min-width: 17px; height: 17px; border-radius: 99px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.notif-pop { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: 360px; max-width: 92vw; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden; }
.notif-pop.open { display: block; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--border); }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { padding: 11px 14px; border-bottom: 1px solid var(--bg-softer); cursor: pointer; }
.notif-item:hover { background: var(--bg-soft); }
.notif-item.unread { background: var(--primary-light); }
body[data-theme="dark"] .notif-item.unread { background: rgba(79,70,229,.15); }
.notif-item .nt { font-size: 13.5px; font-weight: 600; }
.notif-item .nb { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.notif-item .nts { font-size: 11px; color: var(--text-3); margin-top: 3px; }

/* installation wizard */
.wiz-methods { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.wiz-method { border: 1.5px solid var(--border); background: var(--bg); border-radius: 10px; padding: 9px 16px; font-weight: 600; font-size: 14px; color: var(--text-2); }
.wiz-method:hover { border-color: var(--primary); color: var(--primary); }
.wiz-method.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
body[data-theme="dark"] .wiz-method.active { background: rgba(79,70,229,.18); }
.wiz-verify { text-align: center; padding: 30px 10px; }
.wiz-verify .big { font-size: 40px; }
.wiz-verify h3 { font-size: 19px; margin: 10px 0 4px; }
.wiz-steps { counter-reset: st; margin: 12px 0; }
.wiz-steps li { list-style: none; counter-increment: st; padding: 7px 0 7px 34px; position: relative; font-size: 14px; color: var(--text-2); }
.wiz-steps li:before { content: counter(st); position: absolute; left: 0; top: 6px; width: 22px; height: 22px; background: var(--primary-light); color: var(--primary); border-radius: 50%; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
body[data-theme="dark"] .wiz-steps li:before { background: rgba(79,70,229,.2); }
.spin { display: inline-block; width: 34px; height: 34px; border: 3px solid var(--bg-softer); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pulse-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .4 } 50% { opacity: 1 } }

/* danger zone */
.danger-card { border-color: #fecaca !important; }
body[data-theme="dark"] .danger-card { border-color: rgba(239,68,68,.35) !important; }
.danger-card > h3 { color: var(--danger); }

/* funnel modal stats */
.fun-step { padding: 10px 0; border-top: 1px solid var(--bg-softer); }
.fun-step:first-child { border-top: none; }
.fun-bar { height: 8px; background: var(--bg-softer); border-radius: 99px; margin-top: 6px; overflow: hidden; }
.fun-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-2)); border-radius: 99px; }

/* ---------- platform admin: users & data ---------- */
.adm-user { border-bottom: 1px solid var(--border); }
.adm-user:last-child { border-bottom: none; }
.adm-row { display: flex; gap: 16px; align-items: center; padding: 14px 18px; flex-wrap: wrap; transition: background .12s; }
.adm-row:hover { background: var(--bg-soft); }
.adm-badge { font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 99px; letter-spacing: .04em; flex-shrink: 0; }
.adm-nums { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.adm-nums span { white-space: nowrap; }
.adm-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.adm-sites { border-top: 1px dashed var(--border); background: var(--bg-softer); }
.adm-site-row { display: flex; gap: 14px; align-items: center; padding: 10px 18px 10px 30px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.adm-site-row:last-child { border-bottom: none; }
.adm-live { color: #16a34a; font-weight: 700; }

/* ================= Billing UI ================= */
.bill-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.bill-plan { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 18px; display: flex; flex-direction: column; transition: all .16s; }
.bill-plan:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.bill-plan-current { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.12); }
.bill-plan-tag { position: absolute; top: -10px; right: 14px; background: #4f46e5; color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; border-radius: 99px; padding: 3px 10px; }
.bill-plan h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -.01em; }
.bill-plan-price { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.bill-plan-price small { font-size: 13px; font-weight: 600; color: var(--text-3); }
.bill-feats { list-style: none; margin: 10px 0 16px; padding: 0; flex: 1; }
.bill-feats li { font-size: 13px; padding: 3.5px 0 3.5px 22px; position: relative; color: var(--text-2); }
.bill-feats li::before { content: "✓"; position: absolute; left: 2px; color: #16a34a; font-weight: 800; }
.bill-meter { margin: 2px 0; }
.bill-meter-track { height: 7px; border-radius: 99px; background: var(--bg-softer); margin-top: 5px; overflow: hidden; }
.bill-meter-fill { height: 100%; border-radius: 99px; transition: width .4s ease; }
.bill-alert { border-radius: var(--radius); padding: 13px 16px; font-size: 13.5px; margin-bottom: 14px; line-height: 1.55; }
.bill-alert-warn { background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; }
.bill-alert-info { background: #ede9fe; border: 1px solid #ddd6fe; color: #5b21b6; }
body[data-theme="dark"] .bill-alert-warn { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.4); color: #fcd34d; }
body[data-theme="dark"] .bill-alert-info { background: rgba(139,92,246,.12); border-color: rgba(139,92,246,.4); color: #c4b5fd; }
body[data-theme="dark"] .bill-plan { background: #101a2c; }
.bill-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bill-table th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.bill-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.bill-table tbody tr:hover { background: var(--bg-soft); }
.bill-pay-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin: 12px 0; }
.bill-pay-title { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 6px; }
.bill-pay-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 3px 0; }
.bill-pay-row span:first-child { color: var(--text-3); min-width: 62px; font-size: 12.5px; }
.bill-pay-note { font-size: 13px; background: var(--bg); border: 1px dashed var(--border); border-radius: 10px; padding: 9px 12px; margin-top: 10px; line-height: 1.5; }
.bill-pay-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
@media (max-width: 640px) { .bill-plans { grid-template-columns: 1fr; } .bill-table { display: block; overflow-x: auto; white-space: nowrap; } }
