/* ═══════════════════════════════════════════════════════════════════════════
   PulseIQ — FUNDED STARTUP PREMIUM LAYER v2.0
   Inspired by: Aceternity UI · Motion Primitives · Componentry
   Pattern references: Linear · Vercel · Stripe · Notion · Attio
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 0. DESIGN TOKENS (override root) ──────────────────────────────────── */
:root {
  /* Premium dark palette — richer than stock zinc-950 */
  --bg:             #050508;
  --surface:        rgba(12, 12, 18, 0.82);
  --surface-solid:  #0c0c12;
  --surface2:       rgba(22, 22, 34, 0.75);

  /* Signature accent: emerald + electric-violet duo */
  --primary:        #00d97e;
  --primary-mid:    #00b868;
  --primary-light:  rgba(0, 217, 126, 0.12);
  --accent:         #7c5af0;
  --accent-light:   rgba(124, 90, 240, 0.12);

  /* Typography */
  --text:     #f0f0fa;
  --muted:    #6b7080;

  /* Borders — ultra-thin like Linear */
  --border:          rgba(255, 255, 255, 0.07);
  --border-solid:    rgba(255, 255, 255, 0.12);

  /* Shadows — deep, diffuse */
  --shadow:    0 1px 3px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.35);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5), 0 16px 40px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.6), 0 32px 64px rgba(0,0,0,0.5);

  /* Glow accents */
  --glow-green:  rgba(0, 217, 126, 0.25);
  --glow-violet: rgba(124, 90, 240, 0.25);
  --glow-blue:   rgba(56, 189, 248, 0.20);

  /* Motion timing */
  --spring:  cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Sidebar width refined */
  --sw: 240px;
  --radius: 14px;
  --radius-xl: 20px;
}

/* ── 1. BASE RESET UPGRADES ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 217, 126, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 100% 80%, rgba(124, 90, 240, 0.05) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.025'/%3E%3C/svg%3E");
  background-attachment: fixed;
  color: var(--text);
}

/* ── 2. TYPOGRAPHY — Premium font stack ────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800&family=Geist+Mono:wght@400;500;600&display=swap');

h1, h2, h3, h4, h5, h6,
.pt, .mt, .sb-logo h1, .setup-hero-h, .logo {
  font-family: 'Geist', 'Space Grotesk', 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
}

body, button, input, select, textarea {
  font-family: 'Geist', 'Plus Jakarta Sans', sans-serif !important;
}

/* Monospace numerics */
.stat-v, .ov-rev-val, .report-stat-val,
td.number, .mono, .revenue-val, .pin-metric-val {
  font-family: 'Geist Mono', 'JetBrains Mono', monospace !important;
  font-variant-numeric: tabular-nums !important;
  letter-spacing: -0.03em;
}

/* ── 3. SIDEBAR — Premium SaaS sidebar like Linear ─────────────────────── */
.sidebar {
  background: rgba(6, 6, 10, 0.95) !important;
  border-right: 1px solid var(--border) !important;
  box-shadow: none !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  width: var(--sw) !important;
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 217, 126, 0.3) 30%,
    rgba(124, 90, 240, 0.2) 70%,
    transparent 100%
  );
  pointer-events: none;
}

.sb-logo {
  padding: 20px 16px 16px !important;
  border-bottom: 1px solid var(--border) !important;
}

.sb-logo h1 {
  font-size: 16px !important;
  background: linear-gradient(135deg, #00d97e 0%, #38d9f5 100%);
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

.sb-logo span {
  color: rgba(255,255,255,0.28) !important;
  font-size: 9px !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
}

.sb-logo-icon {
  background: linear-gradient(135deg, rgba(0,217,126,0.15) 0%, rgba(124,90,240,0.15) 100%) !important;
  border: 1px solid rgba(0,217,126,0.2) !important;
  border-radius: 10px !important;
}

/* Nav labels */
.nav-lbl {
  font-size: 9px !important;
  letter-spacing: 1.5px !important;
  color: rgba(255,255,255,0.22) !important;
  padding: 12px 12px 4px !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
}

/* Nav items */
.nav-item {
  border-radius: 8px !important;
  color: rgba(255,255,255,0.5) !important;
  font-size: 13px !important;
  font-weight: 450 !important;
  padding: 7px 10px !important;
  margin-bottom: 1px !important;
  border: 1px solid transparent !important;
  transition: all 0.15s var(--ease-out) !important;
  transform: none !important;
  letter-spacing: -0.01em !important;
}

.nav-item:hover {
  background: rgba(255,255,255,0.04) !important;
  color: rgba(255,255,255,0.85) !important;
  border-color: rgba(255,255,255,0.06) !important;
  transform: none !important;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(0,217,126,0.1) 0%, rgba(0,217,126,0.06) 100%) !important;
  color: #00d97e !important;
  border-color: rgba(0,217,126,0.18) !important;
  font-weight: 600 !important;
  box-shadow: 0 0 0 1px rgba(0,217,126,0.08) inset !important;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: linear-gradient(180deg, #00d97e, #38d9f5);
  border-radius: 0 2px 2px 0;
}

/* ── 4. MAIN CONTENT AREA ───────────────────────────────────────────────── */
.main {
  margin-left: var(--sw) !important;
  padding: 32px 36px !important;
  min-height: 100vh !important;
}

/* Page header */
.ph {
  margin-bottom: 32px !important;
}

.pt {
  font-size: 26px !important;
  font-weight: 700 !important;
  letter-spacing: -0.04em !important;
  color: #f4f4f8 !important;
  line-height: 1.15 !important;
}

.pt::after {
  display: none !important;
}

.ps {
  font-size: 13px !important;
  color: var(--muted) !important;
  font-weight: 400 !important;
  letter-spacing: -0.01em !important;
  margin-top: 4px !important;
}

/* ── 5. STAT CARDS — Aceternity-inspired glow cards ────────────────────── */
.stat {
  position: relative !important;
  background: rgba(12, 12, 18, 0.85) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  border-top: none !important;
  padding: 20px 22px !important;
  overflow: hidden !important;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--spring) !important;
}

/* Aceternity "border beam" — animated gradient top border */
.stat::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 60% !important;
  height: 1.5px !important;
  background: linear-gradient(90deg, transparent, var(--primary), transparent) !important;
  animation: beam-slide 3s ease-in-out infinite !important;
  z-index: 2 !important;
}

/* Aceternity "card spotlight" — radial glow on hover */
.stat::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(0, 217, 126, 0.06) 0%,
    transparent 70%
  ) !important;
  opacity: 0 !important;
  transition: opacity 0.3s !important;
  pointer-events: none !important;
  border-radius: inherit !important;
  z-index: 1 !important;
}

.stat:hover::after {
  opacity: 1 !important;
}

.stat:hover {
  border-color: rgba(0, 217, 126, 0.2) !important;
  box-shadow: 0 0 0 1px rgba(0,217,126,0.08), 0 8px 32px rgba(0,0,0,0.4) !important;
  transform: translateY(-2px) !important;
}

.stat-l {
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: var(--muted) !important;
  font-weight: 600 !important;
}

.stat-v {
  font-size: clamp(22px, 2.2vw, 30px) !important;
  font-weight: 700 !important;
  color: #f0f0fa !important;
  letter-spacing: -0.04em !important;
  margin-top: 8px !important;
  line-height: 1 !important;
}

/* ── 6. CARDS — tcard, ov-card, report-card ─────────────────────────────── */
.tcard, .ov-card, .report-card, .ws-report-card, .pin-card {
  background: rgba(10, 10, 16, 0.90) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  box-shadow: var(--shadow) !important;
  overflow: clip !important;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.2s var(--spring) !important;
  position: relative !important;
}

.tcard:hover, .ov-card:hover, .report-card:hover, .ws-report-card:hover {
  border-color: rgba(255,255,255,0.12) !important;
  box-shadow: 0 0 0 1px rgba(0,217,126,0.06), 0 12px 40px rgba(0,0,0,0.5) !important;
  transform: translateY(-2px) !important;
}

/* Card header separator — subtle gradient */
.ov-card-h, .ttoolbar {
  background: rgba(255,255,255,0.018) !important;
  border-bottom: 1px solid var(--border) !important;
}

.ov-card-h h3 {
  font-size: 14px !important;
  letter-spacing: -0.02em !important;
  font-weight: 600 !important;
  color: rgba(240,240,250,0.9) !important;
}

/* ── 7. BUTTONS — Premium CTAs ──────────────────────────────────────────── */
.btn-p, .setup-btn {
  background: linear-gradient(135deg, #00d97e 0%, #00b868 100%) !important;
  color: #050508 !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: -0.01em !important;
  border-radius: 10px !important;
  border: none !important;
  padding: 10px 20px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 0 0 1px rgba(0,217,126,0.3) inset !important;
  transition: all 0.15s var(--ease-out) !important;
  position: relative !important;
  overflow: hidden !important;
}

.btn-p::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  pointer-events: none;
  border-radius: inherit;
}

.btn-p:hover, .setup-btn:hover {
  box-shadow: 0 0 20px rgba(0,217,126,0.35), 0 4px 12px rgba(0,0,0,0.3) !important;
  transform: translateY(-1px) !important;
  filter: brightness(1.08) !important;
}

.btn-p:active, .setup-btn:active {
  transform: translateY(0) scale(0.98) !important;
  box-shadow: none !important;
}

/* Secondary button */
.btn-c, .btn-e, .btn-d, .ov-quick-btn, .fin-period {
  border-radius: 9px !important;
  font-weight: 500 !important;
  font-size: 12.5px !important;
  letter-spacing: -0.01em !important;
  transition: all 0.15s !important;
}

.ov-quick-btn {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  color: rgba(240,240,250,0.7) !important;
}

.ov-quick-btn:hover {
  background: rgba(255,255,255,0.07) !important;
  border-color: rgba(0,217,126,0.2) !important;
  color: #00d97e !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3) !important;
}

/* ── 8. TABLE — Clean data tables like Stripe ───────────────────────────── */
.tcard {
  border-radius: 16px !important;
}

.ttoolbar {
  padding: 12px 16px !important;
}

th {
  background: rgba(8, 8, 14, 0.95) !important;
  color: rgba(107, 112, 128, 0.9) !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 11px 14px !important;
}

td {
  padding: 12px 14px !important;
  border-bottom: 1px solid rgba(255,255,255,0.04) !important;
  color: rgba(240,240,250,0.88) !important;
  font-size: 13px !important;
}

tr:last-child td {
  border-bottom: none !important;
}

tr:hover td {
  background: rgba(255,255,255,0.025) !important;
}

tr:nth-child(even) td {
  background: rgba(255,255,255,0.012) !important;
}

/* Search input */
.search {
  background: rgba(8, 8, 14, 0.8) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 9px !important;
  color: var(--text) !important;
  font-size: 13px !important;
  padding: 9px 14px !important;
}

.search:focus {
  outline: none !important;
  border-color: rgba(0,217,126,0.35) !important;
  box-shadow: 0 0 0 3px rgba(0,217,126,0.08) !important;
  background: rgba(10,10,18,0.95) !important;
}

/* ── 9. FORM INPUTS ──────────────────────────────────────────────────────── */
.fg input, .fg select, .fg textarea,
.fr input, .fr select,
.slicer-select, .slicer-input, input[type="date"] {
  background: rgba(8, 8, 14, 0.7) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 9px !important;
  color: var(--text) !important;
  font-size: 13px !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
}

.fg input:focus, .fg select:focus, .fg textarea:focus,
.fr input:focus, .fr select:focus,
.slicer-select:focus, .slicer-input:focus, input[type="date"]:focus {
  border-color: rgba(0,217,126,0.4) !important;
  box-shadow: 0 0 0 3px rgba(0,217,126,0.08) !important;
  background: rgba(10,10,18,0.95) !important;
  outline: none !important;
}

/* ── 10. MODAL — Premium overlay like Vercel ────────────────────────────── */
.overlay {
  background: rgba(2, 2, 6, 0.8) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.modal {
  background: rgba(10, 10, 16, 0.97) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 20px !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 32px 64px rgba(0,0,0,0.7) !important;
  border-top: 1.5px solid rgba(0,217,126,0.3) !important;
  backdrop-filter: blur(32px) !important;
  -webkit-backdrop-filter: blur(32px) !important;
}

.mh {
  border-bottom: 1px solid var(--border) !important;
  padding: 20px 24px 16px !important;
}

.mt {
  font-size: 17px !important;
  letter-spacing: -0.03em !important;
}

/* ── 11. BADGE SYSTEM ────────────────────────────────────────────────────── */
.badge {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  padding: 3px 9px !important;
  border-radius: 6px !important;
  letter-spacing: 0.02em !important;
}

.bg { background: rgba(0,217,126,0.1) !important; color: #00d97e !important; border: 1px solid rgba(0,217,126,0.2) !important; }
.br { background: rgba(239,68,68,0.1) !important; color: #f87171 !important; border: 1px solid rgba(239,68,68,0.2) !important; }
.by { background: rgba(245,158,11,0.1) !important; color: #fbbf24 !important; border: 1px solid rgba(245,158,11,0.2) !important; }
.bb { background: rgba(124,90,240,0.12) !important; color: #a78bfa !important; border: 1px solid rgba(124,90,240,0.25) !important; }

/* ── 12. LOGIN SCREEN — Funded startup hero login ───────────────────────── */
#login-screen {
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(0,217,126,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(124,90,240,0.06) 0%, transparent 55%),
    #050508 !important;
}

#login-screen > div {
  background: rgba(10, 10, 18, 0.92) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 22px !important;
  box-shadow:
    0 0 0 1px rgba(0,217,126,0.06),
    0 32px 80px rgba(0,0,0,0.7),
    0 0 60px rgba(0,217,126,0.04) !important;
  backdrop-filter: blur(32px) !important;
  -webkit-backdrop-filter: blur(32px) !important;
}

/* Shimmer text effect for app name */
.login-logo-text {
  background: linear-gradient(
    90deg,
    #f0f0fa 0%,
    #00d97e 40%,
    #38d9f5 60%,
    #f0f0fa 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer-text 4s linear infinite;
}

/* ── 13. LOADING SPLASH — Premium animated ───────────────────────────────── */
#app-loading {
  background:
    radial-gradient(ellipse 50% 40% at 50% 30%, rgba(0,217,126,0.06) 0%, transparent 60%),
    #050508 !important;
}

/* ── 14. TOAST — Minimal like Linear ────────────────────────────────────── */
.toast {
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08) !important;
  padding: 12px 18px !important;
}

.toast.success {
  background: linear-gradient(135deg, rgba(0,217,126,0.15) 0%, rgba(0,184,104,0.1) 100%) !important;
  border: 1px solid rgba(0,217,126,0.3) !important;
  color: #00d97e !important;
}

.toast.error {
  background: linear-gradient(135deg, rgba(239,68,68,0.15) 0%, rgba(220,38,38,0.1) 100%) !important;
  border: 1px solid rgba(239,68,68,0.3) !important;
  color: #f87171 !important;
}

/* ── 15. SLICER / FILTER BARS ────────────────────────────────────────────── */
.slicer-bar {
  background: rgba(10, 10, 16, 0.85) !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  box-shadow: var(--shadow) !important;
}

.slicer-chip {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  color: rgba(240,240,250,0.55) !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  transition: all 0.14s !important;
}

.slicer-chip:hover:not(.active) {
  background: rgba(255,255,255,0.07) !important;
  color: rgba(240,240,250,0.85) !important;
  border-color: rgba(255,255,255,0.12) !important;
  transform: none !important;
}

.slicer-chip.active {
  background: rgba(0,217,126,0.1) !important;
  color: #00d97e !important;
  border-color: rgba(0,217,126,0.25) !important;
  font-weight: 700 !important;
  box-shadow: 0 0 12px rgba(0,217,126,0.1) !important;
}

.fin-period.active {
  background: rgba(0,217,126,0.1) !important;
  color: #00d97e !important;
  border-color: rgba(0,217,126,0.25) !important;
  box-shadow: 0 0 12px rgba(0,217,126,0.1) !important;
  font-weight: 700 !important;
}

/* ── 16. HEALTH SCORE CARD — Glow treatment ─────────────────────────────── */
.hs-card {
  background: linear-gradient(
    135deg,
    rgba(0,217,126,0.08) 0%,
    rgba(10,10,16,0.95) 50%,
    rgba(124,90,240,0.06) 100%
  ) !important;
  border: 1px solid rgba(0,217,126,0.15) !important;
  border-radius: 18px !important;
  box-shadow:
    0 0 30px rgba(0,217,126,0.06),
    0 12px 32px rgba(0,0,0,0.4) !important;
}

.hs-score-big {
  color: #00d97e !important;
  font-size: 42px !important;
  letter-spacing: -0.05em !important;
}

/* ── 17. REVENUE CARDS ───────────────────────────────────────────────────── */
.ov-rev-card.inc {
  background: rgba(0,217,126,0.06) !important;
  border-color: rgba(0,217,126,0.15) !important;
}
.ov-rev-card.exp {
  background: rgba(239,68,68,0.06) !important;
  border-color: rgba(239,68,68,0.15) !important;
}
.ov-rev-card.net {
  background: rgba(124,90,240,0.06) !important;
  border-color: rgba(124,90,240,0.15) !important;
}
.ov-rev-card.inc .ov-rev-val { color: #00d97e !important; }
.ov-rev-card.net .ov-rev-val { color: #a78bfa !important; }

/* ── 18. TABS ────────────────────────────────────────────────────────────── */
.tab-btn, .lead-tab, .contest-type-chip, .ws-tab-btn,
.contest-detail-tab, .btp-subtab {
  transition: all 0.14s !important;
  border-radius: 8px !important;
}

.tab-btn.active, .lead-tab.active {
  background: rgba(0,217,126,0.1) !important;
  color: #00d97e !important;
  border-color: rgba(0,217,126,0.2) !important;
}

.ws-tab-btn.active {
  color: #00d97e !important;
  border-bottom-color: #00d97e !important;
}

/* ── 19. PROGRESS BARS ───────────────────────────────────────────────────── */
.pin-progress, .cp-bar-wrap, .goal-progress-wrap,
.payment-bar, .contest-days-bar {
  background: rgba(255,255,255,0.06) !important;
  border-radius: 99px !important;
}

.pin-fill, .cp-bar, .goal-progress-fill {
  background: linear-gradient(90deg, #00d97e, #38d9f5) !important;
  box-shadow: 0 0 10px rgba(0,217,126,0.3) !important;
}

/* ── 20. SCROLLBAR — Minimal ─────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px !important;
  height: 4px !important;
}
::-webkit-scrollbar-track {
  background: transparent !important;
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08) !important;
  border-radius: 99px !important;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0,217,126,0.25) !important;
}

/* ── 21. MOTION PRIMITIVES — Section entrance animations ─────────────────── */

/* Stagger entrance for stat cards */
@keyframes fade-up-in {
  0%   { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* Section active transition — spring-based */
.sec.active {
  animation: fade-up-in 0.32s var(--spring) both !important;
}

/* Stagger children */
.stats .stat:nth-child(1) { animation: fade-up-in 0.3s 0.02s var(--spring) both; }
.stats .stat:nth-child(2) { animation: fade-up-in 0.3s 0.06s var(--spring) both; }
.stats .stat:nth-child(3) { animation: fade-up-in 0.3s 0.10s var(--spring) both; }
.stats .stat:nth-child(4) { animation: fade-up-in 0.3s 0.14s var(--spring) both; }
.stats .stat:nth-child(5) { animation: fade-up-in 0.3s 0.18s var(--spring) both; }
.stats .stat:nth-child(6) { animation: fade-up-in 0.3s 0.22s var(--spring) both; }

/* ── 22. ACETERNITY BORDER BEAM ANIMATION ────────────────────────────────── */
@keyframes beam-slide {
  0%   { left: -60%; }
  100% { left: 160%; }
}

/* Rotating glow border for key stat cards */
.stat:first-child {
  background: rgba(10, 10, 16, 0.9) !important;
}

/* ── 23. SHIMMER TEXT (ACETERNITY) ───────────────────────────────────────── */
@keyframes shimmer-text {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* ── 24. MOTION COUNTER ANIMATION ────────────────────────────────────────── */
@keyframes count-in {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.stat-v {
  animation: count-in 0.4s 0.2s var(--spring) both;
}

/* ── 25. MODAL SPRING ENTRANCE ────────────────────────────────────────────── */
@keyframes modal-spring {
  0%   { opacity: 0; transform: translateY(24px) scale(0.95); }
  60%  { opacity: 1; }
  100% { transform: translateY(0) scale(1); }
}

.overlay.open .modal {
  animation: modal-spring 0.35s var(--spring) both !important;
}

/* ── 26. ACETERNITY CARD GLOW HOVER (JS-assisted spotlight) ──────────────── */
/* CSS variables --mouse-x and --mouse-y are set by pulseiq-premium.js */
.stat, .ov-card, .tcard, .report-card {
  --mouse-x: 50%;
  --mouse-y: 50%;
}

/* ── 27. STATUS DOT PULSES ────────────────────────────────────────────────── */
@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,217,126,0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(0,217,126,0); }
}

/* ── 28. NOTIFICATION BADGE ──────────────────────────────────────────────── */
.notif-badge {
  font-size: 9.5px !important;
  padding: 2px 7px !important;
  border-radius: 5px !important;
}

/* ── 29. SIDEBAR CENTER SWITCH ────────────────────────────────────────────── */
.sb-center-switch {
  padding: 10px 14px !important;
  border-top: 1px solid var(--border) !important;
}

.sb-center-switch select {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 8px !important;
  color: rgba(240,240,250,0.7) !important;
  font-size: 12px !important;
}

/* ── 30. DISC / FOOT BUTTONS ─────────────────────────────────────────────── */
.disc-btn {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 8px !important;
  color: rgba(255,255,255,0.4) !important;
  font-size: 13px !important;
  transition: all 0.14s !important;
}

.disc-btn:hover {
  background: rgba(255,255,255,0.06) !important;
  color: rgba(255,255,255,0.75) !important;
  border-color: rgba(255,255,255,0.12) !important;
}

/* ── 31. EMPTY STATES ────────────────────────────────────────────────────── */
.empty {
  color: var(--muted) !important;
}

.empty .ei, .ov-empty-icon {
  animation: none !important;
  font-size: 36px !important;
  opacity: 0.35 !important;
}

/* ── 32. SLICER RESET ─────────────────────────────────────────────────────── */
.slicer-reset {
  background: rgba(239,68,68,0.08) !important;
  border-color: rgba(239,68,68,0.15) !important;
  color: #f87171 !important;
  border-radius: 8px !important;
}

/* ── 33. MOBILE OVERRIDES ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .main {
    margin-left: 0 !important;
    padding: 56px 14px 28px !important;
  }

  .stat::before {
    animation: none !important;
  }
}

/* ── 34. BODY COMPOSITION CARDS ───────────────────────────────────────────── */
.body-profile {
  background: linear-gradient(135deg, rgba(0,217,126,0.15) 0%, rgba(0,184,104,0.08) 100%) !important;
  border: 1px solid rgba(0,217,126,0.2) !important;
  border-radius: 16px !important;
}

/* ── 35. PREMIUM INLINE GLOBAL ACCENTS ────────────────────────────────────── */

/* Green success accent */
.text-success, .ov-link { color: #00d97e !important; }

/* Inline stat icon glow */
.stat-ic {
  font-size: 20px !important;
  opacity: 0.8 !important;
  margin-bottom: 10px !important;
  display: block !important;
}

/* ── 36. "FUNDED STARTUP" GLOW RING on brand logo ─────────────────────────── */
.sb-logo-icon {
  box-shadow: 0 0 16px rgba(0,217,126,0.15), 0 0 0 1px rgba(0,217,126,0.12) !important;
  animation: logo-breathe 4s ease-in-out infinite;
}

@keyframes logo-breathe {
  0%, 100% { box-shadow: 0 0 16px rgba(0,217,126,0.15), 0 0 0 1px rgba(0,217,126,0.12); }
  50%       { box-shadow: 0 0 28px rgba(0,217,126,0.30), 0 0 0 1px rgba(0,217,126,0.22); }
}

/* ── 37. ACETERNITY "SHIMMER BUTTON" EFFECT ──────────────────────────────── */
@keyframes btn-shimmer {
  0%   { transform: translateX(-100%) skewX(-15deg); }
  100% { transform: translateX(300%) skewX(-15deg); }
}

.btn-p::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: skewX(-15deg);
  animation: btn-shimmer 3s ease-in-out infinite;
  pointer-events: none;
  border-radius: inherit;
}

/* ── 38. AGENT CARDS ──────────────────────────────────────────────────────── */
.agent-card {
  background: rgba(10,10,16,0.88) !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.2s var(--spring) !important;
}

.agent-card:hover {
  border-color: rgba(0,217,126,0.2) !important;
  box-shadow: 0 0 20px rgba(0,217,126,0.07), 0 8px 32px rgba(0,0,0,0.4) !important;
  transform: translateY(-2px) !important;
}

.agent-run-btn {
  background: linear-gradient(135deg, #7c5af0, #9c6bf8) !important;
  border-radius: 9px !important;
  font-size: 12.5px !important;
  box-shadow: 0 0 16px rgba(124,90,240,0.2) !important;
}

.agent-run-btn:hover {
  opacity: 1 !important;
  filter: brightness(1.1) !important;
  box-shadow: 0 0 24px rgba(124,90,240,0.35) !important;
}

/* ── 39. LOYALTY BANNERS ─────────────────────────────────────────────────── */
.loyalty-gold   { background: linear-gradient(135deg, #92700a, #d4a21a, #92700a) !important; }
.loyalty-purple { background: linear-gradient(135deg, #5b21b6, #7c5af0) !important; }

/* ── 40. FOCUS VISIBLE — accessibility ───────────────────────────────────── */
:focus-visible {
  outline: none !important;
  border-color: rgba(0,217,126,0.5) !important;
  box-shadow: 0 0 0 3px rgba(0,217,126,0.12) !important;
}

/* ── 41. WA (WhatsApp) BUTTON ─────────────────────────────────────────────── */
.wa-btn {
  background: #075e54 !important;
  border-radius: 7px !important;
  font-size: 11.5px !important;
}
.wa-btn:hover { background: #128c7e !important; }

/* ── 42. PAGE TITLE GRADIENT ACCENT ──────────────────────────────────────── */
.pt {
  background: linear-gradient(135deg, #f0f0fa 0%, rgba(240,240,250,0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Fallback for non-webkit */
@supports not (-webkit-background-clip: text) {
  .pt { color: #f0f0fa !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 1 — STAT CARDS REDESIGN v2 (MORE DRAMATIC)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Grid ── */
.stats {
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
}
@media (max-width: 1200px) { .stats { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 900px)  { .stats { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 600px)  { .stats { grid-template-columns: 1fr !important; } }

/* ── Card — dramatic dark panel with colored top border ── */
.stat {
  position: relative !important;
  background: linear-gradient(160deg, rgba(16,16,28,0.97) 0%, rgba(10,10,18,0.97) 100%) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-top: 2px solid var(--stat-accent, #00d97e) !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  overflow: visible !important;
  cursor: default !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4) !important;
  transition: transform 0.22s cubic-bezier(0.175,0.885,0.32,1.275), box-shadow 0.22s, border-color 0.22s !important;
  min-height: 78px !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 4px !important;
  box-sizing: border-box !important;
}

/* Each card gets a unique accent color for its top border */
.stats .stat:nth-child(1) { --stat-accent: #00d97e; --stat-glow: rgba(0,217,126,0.15); }
.stats .stat:nth-child(2) { --stat-accent: #38d9f5; --stat-glow: rgba(56,217,245,0.15); }
.stats .stat:nth-child(3) { --stat-accent: #f59e0b; --stat-glow: rgba(245,158,11,0.15); }
.stats .stat:nth-child(4) { --stat-accent: #7c5af0; --stat-glow: rgba(124,90,240,0.15); }
.stats .stat:nth-child(5) { --stat-accent: #f87171; --stat-glow: rgba(248,113,113,0.15); }
.stats .stat:nth-child(6) { --stat-accent: #34d399; --stat-glow: rgba(52,211,153,0.15); }

/* Glow behind the top border */
.stat::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
  height: 100% !important;
  border-radius: inherit !important;
  background: linear-gradient(180deg, var(--stat-glow, rgba(0,217,126,0.12)) 0%, rgba(10,10,18,0.2) 100%) !important;
  pointer-events: none !important;
  z-index: 0 !important;
  animation: none !important;
}

/* Sliding beam — on top of the glow */
.stat::after {
  content: '' !important;
  position: absolute !important;
  top: -1px !important;
  left: -60% !important;
  width: 50% !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent, #fff, transparent) !important;
  opacity: 0.25 !important;
  animation: beam-slide 4s ease-in-out infinite !important;
  animation-delay: var(--stat-beam-delay, 0s) !important;
  z-index: 4 !important;
}

.stats .stat:nth-child(1)::after { --stat-beam-delay: 0.0s; }
.stats .stat:nth-child(2)::after { --stat-beam-delay: 0.5s; }
.stats .stat:nth-child(3)::after { --stat-beam-delay: 1.0s; }
.stats .stat:nth-child(4)::after { --stat-beam-delay: 1.5s; }
.stats .stat:nth-child(5)::after { --stat-beam-delay: 0.3s; }
.stats .stat:nth-child(6)::after { --stat-beam-delay: 0.8s; }

/* ── Icon pill ── */
.stat-ic {
  font-size: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 10px !important;
  margin-bottom: 12px !important;
  padding: 0 !important;
  position: relative !important;
  z-index: 2 !important;
}

/* ── Label ── */
.stat-l {
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: rgba(180,180,200,0.85) !important;
  margin-bottom: 2px !important;
  display: block !important;
  position: relative !important;
  z-index: 2 !important;
  padding: 0 !important;
}

/* ── Value — THE HERO NUMBER ── */
.stat-v {
  font-family: 'Geist Mono', 'JetBrains Mono', monospace !important;
  font-size: clamp(16px, 1.8vw, 25px) !important;
  font-weight: 800 !important;
  letter-spacing: -0.04em !important;
  color: #ffffff !important;
  line-height: 1.3 !important;
  display: block !important;
  position: relative !important;
  z-index: 2 !important;
  padding: 2px 0 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* Status color + glow */
.stat-v[style*="danger"]  { color: #f87171 !important; text-shadow: 0 0 20px rgba(248,113,113,0.4) !important; }
.stat-v[style*="success"] { color: #00d97e !important; text-shadow: 0 0 20px rgba(0,217,126,0.4) !important; }
.stat-v[style*="accent"]   { color: #fbbf24 !important; text-shadow: 0 0 20px rgba(251,191,36,0.35) !important; }
.stat-v[style*="primary"]  { color: #00d97e !important; text-shadow: 0 0 20px rgba(0,217,126,0.4) !important; }

/* ── Hover ── */
.stat:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 0 0 1px var(--stat-accent, #00d97e), 0 16px 48px rgba(0,0,0,0.55), 0 0 30px var(--stat-glow, rgba(0,217,126,0.1)) !important;
  border-color: var(--stat-accent, #00d97e) !important;
}

/* ── Stagger ── */
.stats .stat:nth-child(1) { animation: fade-up-in 0.3s 0.02s var(--spring) both; }
.stats .stat:nth-child(2) { animation: fade-up-in 0.3s 0.07s var(--spring) both; }
.stats .stat:nth-child(3) { animation: fade-up-in 0.3s 0.12s var(--spring) both; }
.stats .stat:nth-child(4) { animation: fade-up-in 0.3s 0.17s var(--spring) both; }
.stats .stat:nth-child(5) { animation: fade-up-in 0.3s 0.22s var(--spring) both; }
.stats .stat:nth-child(6) { animation: fade-up-in 0.3s 0.27s var(--spring) both; }

/* ── Revenue row cards — Phase 1 polish ── */
.ov-rev-row {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 14px !important;
  margin-bottom: 20px !important;
}

@media (max-width: 700px) {
  .ov-rev-row { grid-template-columns: 1fr !important; }
}

.ov-rev-card {
  border-radius: 16px !important;
  padding: 18px 20px !important;
  position: relative !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: transform 0.2s var(--spring), box-shadow 0.2s !important;
}

.ov-rev-card .ov-rev-lbl {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: rgba(200, 200, 220, 0.75) !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: visible !important;
}

.ov-rev-card .ov-rev-val {
  font-family: 'Geist Mono', 'JetBrains Mono', monospace !important;
  font-size: clamp(16px, 1.6vw, 24px) !important;
  font-weight: 800 !important;
  letter-spacing: -0.04em !important;
  line-height: 1.25 !important;
  display: block !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  padding: 2px 0 !important;
}

.ov-rev-card.inc { background: rgba(0, 217, 126, 0.09) !important; border: 1px solid rgba(0, 217, 126, 0.22) !important; }
.ov-rev-card.exp { background: rgba(248, 113, 113, 0.09) !important; border: 1px solid rgba(248, 113, 113, 0.22) !important; }
.ov-rev-card.net { background: rgba(167, 139, 250, 0.14) !important; border: 1px solid rgba(167, 139, 250, 0.35) !important; }

.ov-rev-card.inc .ov-rev-val { color: #00d97e !important; text-shadow: 0 0 24px rgba(0,217,126,0.35) !important; }
.ov-rev-card.exp .ov-rev-val { color: #f87171 !important; text-shadow: 0 0 24px rgba(248,113,113,0.35) !important; }
.ov-rev-card.net .ov-rev-val { color: #e9d5ff !important; text-shadow: 0 0 24px rgba(192,132,252,0.45) !important; }

.ov-rev-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 2 — PREMIUM LOGIN SCREEN
   Inspired by: Linear · Vercel · Loom login screens
   ═══════════════════════════════════════════════════════════════════ */

/* ── Animated Orbs ── */
.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.login-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,217,126,0.18) 0%, transparent 70%);
  top: -150px; left: -100px;
  animation: orb-drift-1 12s ease-in-out infinite alternate;
}
.login-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(124,90,240,0.16) 0%, transparent 70%);
  bottom: -100px; right: -80px;
  animation: orb-drift-2 15s ease-in-out infinite alternate;
}
.login-orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(56,217,245,0.10) 0%, transparent 70%);
  top: 40%; left: 60%;
  animation: orb-drift-3 18s ease-in-out infinite alternate;
}

@keyframes orb-drift-1 { from { transform: translate(0,0) scale(1); } to { transform: translate(60px, 40px) scale(1.1); } }
@keyframes orb-drift-2 { from { transform: translate(0,0) scale(1); } to { transform: translate(-50px,-30px) scale(1.08); } }
@keyframes orb-drift-3 { from { transform: translate(0,0) scale(1); } to { transform: translate(-40px, 50px) scale(0.95); } }

/* ── Grid noise overlay ── */
.login-grid-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── Card ── */
.login-card {
  position: relative; z-index: 2;
  background: rgba(10, 10, 18, 0.82);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 44px 40px 36px;
  width: 100%; max-width: 420px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 40px 80px -20px rgba(0,0,0,0.8), 0 0 60px rgba(0,217,126,0.05);
  color: var(--text);
  animation: fade-up-in 0.5s 0.1s var(--spring) both;
}

/* ── Brand section ── */
.login-brand {
  text-align: center;
  margin-bottom: 36px;
  position: relative;
}

.login-build-badge {
  position: absolute; top: -22px; right: -10px;
  background: #ef4444; color: #fff;
  font-size: 9px; font-weight: 900;
  padding: 3px 8px; border-radius: 10px;
  letter-spacing: 1.5px; text-transform: uppercase;
}

/* ── Logo pulse ring ── */
.login-logo-wrap {
  position: relative;
  width: 68px; height: 68px;
  margin: 0 auto 18px;
}

.login-pulse-ring {
  position: absolute; inset: -8px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,217,126,0.35);
  animation: pulse-ring 2.5s ease-out infinite;
}
.login-pulse-ring::after {
  content: '';
  position: absolute; inset: -8px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,217,126,0.15);
  animation: pulse-ring 2.5s ease-out 0.8s infinite;
}

@keyframes pulse-ring {
  0%   { transform: scale(0.85); opacity: 1; }
  100% { transform: scale(1.3);  opacity: 0; }
}

.login-logo-icon {
  width: 68px; height: 68px;
  border-radius: 20px;
  background: linear-gradient(135deg, #00d97e 0%, #2563eb 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  box-shadow: 0 12px 32px -6px rgba(0,217,126,0.45);
  position: relative; z-index: 2;
}

.login-logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 30px; font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.login-logo-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: #00d97e;
  background: rgba(0,217,126,0.08);
  border: 1px solid rgba(0,217,126,0.2);
  border-radius: 20px;
  padding: 4px 12px;
}
.login-tag-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #00d97e;
  box-shadow: 0 0 6px #00d97e;
  animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ── Form elements ── */
.login-step-title {
  font-size: 17px; font-weight: 700; color: #fff;
  margin-bottom: 6px;
}
.login-step-sub {
  font-size: 13px; color: var(--muted);
  margin-bottom: 24px; line-height: 1.65;
}

.login-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(160,160,180,0.8);
  display: block; margin-bottom: 8px;
}

.login-input {
  width: 100%; box-sizing: border-box;
  padding: 14px 16px;
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  font-size: 14px; font-family: inherit;
  margin-bottom: 14px;
  outline: none;
  background: rgba(255,255,255,0.04);
  color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.login-input::placeholder { color: rgba(255,255,255,0.25); }
.login-input-focus,
.login-input:focus {
  border-color: #00d97e !important;
  box-shadow: 0 0 0 3px rgba(0,217,126,0.15) !important;
}

.login-otp-input {
  font-size: 28px !important;
  letter-spacing: 12px !important;
  text-align: center !important;
  font-weight: 800 !important;
}

/* ── Remember me ── */
.login-remember {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; cursor: pointer; user-select: none;
  font-size: 13px; color: rgba(255,255,255,0.7); font-weight: 500;
}
.login-checkbox { width: 16px; height: 16px; accent-color: #00d97e; cursor: pointer; }

/* ── CTA Button ── */
.login-btn-primary {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #00d97e 0%, #00b868 100%);
  color: #03120a;
  border: none;
  border-radius: 12px;
  font-size: 15px; font-weight: 800;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 6px 24px -4px rgba(0,217,126,0.5);
  transition: transform 0.2s var(--spring), box-shadow 0.2s;
  position: relative; overflow: hidden;
  margin-bottom: 0;
}
.login-btn-primary::after {
  content: '';
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: shimmer-sweep 3s ease-in-out infinite;
}
@keyframes shimmer-sweep { 0%{left:-100%} 60%,100%{left:150%} }

.login-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px -4px rgba(0,217,126,0.6);
}
.login-btn-primary:active { transform: translateY(0); }

.login-btn-arrow {
  font-size: 18px;
  transition: transform 0.2s;
}
.login-btn-primary:hover .login-btn-arrow { transform: translateX(3px); }

/* ── Ghost button ── */
.login-btn-ghost {
  width: 100%; margin-top: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 10px 16px;
  color: var(--muted); font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: background 0.2s, border-color 0.2s;
}
.login-btn-ghost:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.14); }

/* ── Error ── */
.login-error {
  margin-top: 12px; padding: 12px 16px;
  background: rgba(239,68,68,0.1);
  border-radius: 10px; font-size: 13px;
  color: #f87171;
  border-left: 3px solid #f87171;
  font-weight: 500;
}

/* ── OTP state header ── */
.login-otp-header { text-align: center; margin-bottom: 22px; }
.login-otp-icon { font-size: 40px; margin-bottom: 10px; }
.login-email-highlight { color: #00d97e; font-weight: 700; }

/* ── Footer ── */
.login-footer {
  margin-top: 28px; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.07);
  text-align: center;
  font-size: 11px; color: rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
}
.login-footer strong { color: rgba(255,255,255,0.55); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════
   PHASE 3 — BENTO GRID DASHBOARD
   Inspired by: Apple product feature grids · Linear · Vercel Analytics
   ═══════════════════════════════════════════════════════════════════ */

/* ── Bento Main Grid Layout ── */
.ov-grid {
  display: grid !important;
  grid-template-columns: 1.4fr 1fr !important;
  gap: 18px !important;
  align-items: start !important;
}

@media (max-width: 1024px) {
  .ov-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── Bento Card Base ── */
.ov-card, .tcard {
  background: linear-gradient(160deg, rgba(16,16,28,0.92) 0%, rgba(10,10,18,0.92) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px !important;
  padding: 0 !important;
  overflow: clip !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35) !important;
  transition: transform 0.22s var(--spring), box-shadow 0.22s, border-color 0.22s !important;
  position: relative !important;
}

.ov-card:hover, .tcard:hover {
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 217, 126, 0.05) !important;
  transform: translateY(-2px) !important;
}

/* Card Header */
.ov-card-h {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 18px 22px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

.ov-card-h h3 {
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: -0.02em !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.ov-count {
  background: rgba(0, 217, 126, 0.12) !important;
  color: #00d97e !important;
  border: 1px solid rgba(0, 217, 126, 0.25) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  padding: 2px 10px !important;
  border-radius: 20px !important;
}

/* Card Body */
.ov-card-body {
  padding: 20px 22px !important;
}

/* Rows inside Bento Cards */
.ov-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  transition: background 0.15s !important;
  margin-bottom: 4px !important;
}

.ov-row:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}

.ov-row-name {
  font-weight: 600 !important;
  font-size: 13.5px !important;
  color: #f0f0fa !important;
}

.ov-row-sub {
  font-size: 11px !important;
  color: var(--muted) !important;
  margin-top: 2px !important;
}

.ov-empty {
  text-align: center !important;
  padding: 24px 0 !important;
  color: rgba(255, 255, 255, 0.35) !important;
  font-size: 13px !important;
}

/* ── 7-Day Attendance Bars ── */
.ov-bars {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 10px !important;
  height: 100px !important;
  padding-top: 14px !important;
}

.ov-bar-col {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  height: 100% !important;
  justify-content: flex-end !important;
}

.ov-bar-val {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--muted) !important;
  margin-bottom: 6px !important;
}

.ov-bar {
  width: 100% !important;
  max-width: 28px !important;
  background: linear-gradient(180deg, #00d97e 0%, rgba(0, 217, 126, 0.3) 100%) !important;
  border-radius: 6px 6px 3px 3px !important;
  transition: height 0.4s var(--spring), background 0.2s !important;
  min-height: 4px !important;
  box-shadow: 0 0 12px rgba(0, 217, 126, 0.2) !important;
}

.ov-bar-col:hover .ov-bar {
  background: linear-gradient(180deg, #38d9f5 0%, #00d97e 100%) !important;
  box-shadow: 0 0 16px rgba(56, 217, 245, 0.4) !important;
}

.ov-bar-lbl {
  font-size: 10.5px !important;
  color: var(--muted) !important;
  margin-top: 8px !important;
  font-weight: 600 !important;
}

/* ── Quick Actions Row ── */
.ov-quick {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin-bottom: 18px !important;
}

.ov-quick-btn {
  background: rgba(16, 16, 28, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 10px 16px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #f0f0fa !important;
  cursor: pointer !important;
  transition: all 0.2s var(--spring) !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.ov-quick-btn:hover {
  background: rgba(0, 217, 126, 0.12) !important;
  border-color: rgba(0, 217, 126, 0.3) !important;
  color: #00d97e !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0, 217, 126, 0.2) !important;
}

/* ── Global Search Input ── */
#ov-global-search {
  background: rgba(16, 16, 28, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  padding: 14px 18px !important;
  font-size: 14px !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.2s !important;
}

#ov-global-search:focus {
  border-color: #00d97e !important;
  box-shadow: 0 0 0 3px rgba(0, 217, 126, 0.15), 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

#ov-global-results {
  background: rgba(12, 12, 20, 0.96) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 4 — PREMIUM SIDEBAR UPGRADE
   Inspired by: Linear · Vercel · Stripe Dashboard Navigation
   ═══════════════════════════════════════════════════════════════════ */

/* ── Sidebar Container ── */
.sidebar {
  background: rgba(7, 7, 12, 0.96) !important;
  backdrop-filter: blur(24px) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4) !important;
}

/* ── Logo Section ── */
.sb-logo {
  padding: 20px 16px 16px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.sb-logo-inner {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.sb-logo-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #00d97e 0%, #2563eb 100%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px !important;
  box-shadow: 0 4px 16px rgba(0, 217, 126, 0.3) !important;
}

.sb-logo h1 {
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin: 0 !important;
  letter-spacing: -0.03em !important;
}

.sb-logo span {
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  color: #00d97e !important;
}

/* ── Greeting Badge ── */
.sb-greeting {
  padding: 12px 16px !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  margin-bottom: 8px !important;
}

#sb-greeting-time {
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: var(--muted) !important;
}

.sb-greeting-name {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin-top: 2px !important;
}

/* ── Nav Group Labels ── */
.nav-lbl {
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  color: rgba(160, 160, 180, 0.6) !important;
  padding: 10px 14px 6px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  transition: color 0.15s !important;
}

.nav-lbl:hover {
  color: rgba(255, 255, 255, 0.9) !important;
}

.nav-arrow {
  font-size: 10px !important;
  transition: transform 0.2s var(--spring) !important;
}

.nav-lbl.collapsed .nav-arrow {
  transform: rotate(-90deg) !important;
}

/* ── Nav Items ── */
.nav-item {
  width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 9px 14px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: rgba(200, 200, 220, 0.8) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
  margin-bottom: 2px !important;
  position: relative !important;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
}

/* Active Nav Item — Signature Glow */
.nav-item.active {
  background: rgba(0, 217, 126, 0.12) !important;
  color: #00d97e !important;
  font-weight: 700 !important;
  border: 1px solid rgba(0, 217, 126, 0.25) !important;
  box-shadow: 0 0 16px rgba(0, 217, 126, 0.15) !important;
}

.nav-item.active::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 6px !important;
  bottom: 6px !important;
  width: 3px !important;
  background: #00d97e !important;
  border-radius: 0 4px 4px 0 !important;
  box-shadow: 0 0 8px #00d97e !important;
}

.nav-item .ic {
  font-size: 15px !important;
  width: 20px !important;
  text-align: center !important;
}

/* ── Active Center Switcher ── */
.sb-center-switch {
  padding: 12px 14px !important;
  margin: 10px 12px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 12px !important;
}

.sb-center-switch label {
  font-size: 9.5px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: var(--muted) !important;
  display: block !important;
  margin-bottom: 6px !important;
}

.sb-center-switch select {
  width: 100% !important;
  background: rgba(10, 10, 18, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  outline: none !important;
  cursor: pointer !important;
}

.sb-center-switch select:focus {
  border-color: #00d97e !important;
}

/* ── Sidebar Footer ── */
.sb-foot {
  padding: 12px 14px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: rgba(0, 0, 0, 0.2) !important;
}

.sb-foot-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
}

.disc-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
  color: var(--muted) !important;
}

.disc-btn:hover {
  background: rgba(0, 217, 126, 0.12) !important;
  border-color: rgba(0, 217, 126, 0.3) !important;
  color: #00d97e !important;
  transform: translateY(-1px) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 5 — COMMAND BAR & GLOBAL UI POLISH
   Inspired by: Linear Header · Notion Search · Stripe Tables
   ═══════════════════════════════════════════════════════════════════ */

/* ── Sticky Page Header (.ph) ── */
.ph {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 0 20px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  margin-bottom: 24px !important;
}

.pt {
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  letter-spacing: -0.04em !important;
  color: #ffffff !important;
  margin-bottom: 4px !important;
}

.ps {
  font-size: 13px !important;
  color: var(--muted) !important;
}

/* ── Primary Action Buttons ── */
.btn-p {
  background: linear-gradient(135deg, #00d97e 0%, #00b868 100%) !important;
  color: #03120a !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 10px 18px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: all 0.2s var(--spring) !important;
  box-shadow: 0 4px 16px rgba(0, 217, 126, 0.35) !important;
}

.btn-p:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(0, 217, 126, 0.5) !important;
}

.btn-c {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 10px 18px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #f0f0fa !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.btn-c:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* ── Glassmorphic Data Tables ── */
.twrap {
  border-radius: 16px !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  scroll-behavior: smooth !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(10, 10, 18, 0.7) !important;
}
.twrap table {
  width: auto !important;
  min-width: 1500px !important;
}

table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 13px !important;
}

thead th {
  background: rgba(255, 255, 255, 0.03) !important;
  color: rgba(160, 160, 180, 0.8) !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  padding: 14px 18px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  text-align: left !important;
}

tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  transition: background 0.15s !important;
}

tbody tr:hover {
  background: rgba(0, 217, 126, 0.04) !important;
}

tbody td {
  padding: 14px 18px !important;
  color: #f0f0fa !important;
  vertical-align: middle !important;
}

/* ── Modals & Dialogs ── */
.overlay {
  background: rgba(3, 3, 6, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

.modal {
  background: linear-gradient(160deg, rgba(16,16,28,0.96) 0%, rgba(10,10,18,0.96) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 24px !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 217, 126, 0.08) !important;
  padding: 28px !important;
  animation: fade-up-in 0.3s var(--spring) both !important;
}

.mh {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding-bottom: 16px !important;
  margin-bottom: 20px !important;
}

.mt {
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
}

/* ── Global Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(5, 5, 8, 0.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 217, 126, 0.4);
}

/* ── 43. FINANCE SECTION PREMIUM SPACING & RESPONSIVE LAYOUT ── */
#sec-finance {
  display: none;
  padding: 16px 12px 48px !important;
}

#sec-finance.active {
  display: block !important;
}

#sec-finance .ph {
  margin-bottom: 28px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 20px !important;
  padding: 6px 4px !important;
}

#sec-finance .ph > div:last-child {
  display: flex !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

#sec-finance .ph button {
  padding: 10px 18px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25) !important;
}

#sec-finance .tcard {
  padding: 24px 28px !important;
  margin-bottom: 24px !important;
  border-radius: 20px !important;
  background: rgba(14, 14, 26, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4) !important;
}

#sec-finance .tcard > div {
  gap: 14px 18px !important;
}

#sec-finance input[type="date"] {
  background: rgba(8, 8, 14, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #f0f0fa !important;
  border-radius: 10px !important;
  padding: 9px 14px !important;
  font-size: 13px !important;
  min-width: 135px !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

#sec-finance input[type="date"]:focus {
  border-color: #00d97e !important;
  box-shadow: 0 0 12px rgba(0, 217, 126, 0.25) !important;
  outline: none !important;
}

#sec-finance .fin-period {
  padding: 9px 16px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

#sec-finance .stats#fin-stats {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px !important;
  margin-bottom: 24px !important;
}

#sec-finance .stats#fin-stats .stat {
  padding: 22px 24px !important;
  border-radius: 18px !important;
  margin: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(14, 14, 26, 0.88) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

#sec-finance .stats#fin-stats .stat .stat-l {
  font-size: 13px !important;
  margin-bottom: 8px !important;
  color: var(--muted) !important;
}

#sec-finance .stats#fin-stats .stat .stat-v {
  font-size: 22px !important;
  font-weight: 800 !important;
}

#sec-finance #fin-breakdown {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
  gap: 24px !important;
  margin-bottom: 24px !important;
}

#sec-finance .ttoolbar {
  padding-bottom: 16px !important;
  margin-bottom: 20px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  display: flex !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

#sec-finance table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

#sec-finance th {
  padding: 16px 20px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  color: var(--muted) !important;
}

#sec-finance td {
  padding: 18px 20px !important;
  font-size: 13.5px !important;
}

#sec-finance td .acts {
  display: flex !important;
  gap: 8px !important;
}

@media (max-width: 768px) {
  #sec-finance {
    padding: 8px 4px 28px !important;
  }

  #sec-finance .ph {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
    margin-bottom: 20px !important;
  }

  #sec-finance .ph > div:last-child {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  #sec-finance .ph button {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 11px 10px !important;
    font-size: 12px !important;
  }

  #sec-finance .tcard {
    padding: 18px 16px !important;
    margin-bottom: 16px !important;
    border-radius: 16px !important;
  }

  #sec-finance .stats#fin-stats {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
  }

  #sec-finance .stats#fin-stats .stat {
    padding: 16px 14px !important;
  }

  #sec-finance #fin-breakdown {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  #sec-finance .ttoolbar {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #sec-finance .ttoolbar .search {
    width: 100% !important;
  }
}

/* ── 44. MOBILE QUICK TAB SWITCHER ── */
.mobile-quick-nav {
  display: none;
}

@media (max-width: 768px) {
  /* ── 1. Zero out sidebar-width so .main margin-left collapses to 0 ── */
  :root {
    --sw: 0px !important;
  }

  /* ── 2. Kill backdrop-filter on every element that sets it in premium CSS.
     Must use SAME specificity as the original rule so source order (later = wins).
     Android WebKit renders backdrop-filter as solid black — must be none on mobile. ── */

  /* sidebar has it at specificity 0,1,0 — match it */
  .sidebar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #07070c !important;
    box-shadow: 4px 0 24px rgba(0,0,0,0.8) !important;
  }

  /* overlay, modal, login panel */
  .overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .modal {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #0a0a10 !important;
  }
  #login-screen > div {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(10,10,18,0.99) !important;
  }

  /* tcard and any other blurred containers */
  .tcard {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #111118 !important;
  }

  /* ── 3. Kill ALL infinite/fill-mode animations on mobile.
     These burn GPU, delay first paint, and leave elements at opacity:0. ── */
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  /* Re-enable only fast functional transitions (button tap feedback) */
  .nav-item, .mq-item, .btn-p, button {
    transition: background 0.15s ease !important;
  }

  /* ── 4. Layout: .main must not overflow or shift ── */
  .main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* ── 5. Sections: force visible, no transform offset ── */
  .sec, .sec.active {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    position: static !important;
    left: auto !important;
    margin-left: 0 !important;
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }

  /* ── 6. Stat cards: solid background (no blur) ── */
  .stat, .stat:first-child, .stats .stat {
    background: #1a1a2e !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* ── 7. Stat values and labels: always visible ── */
  .stat-v, .stat-label, .stat-ic {
    opacity: 1 !important;
    transform: none !important;
  }

  /* ── 8. Quick action buttons ── */
  .ov-quick-btn {
    background: rgba(30,30,50,0.9) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
  }

  .mobile-quick-nav {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 10px 12px !important;
    margin: -12px -12px 16px -12px !important;
    background: rgba(10, 10, 18, 0.98) !important;
    /* backdrop-filter disabled on mobile — causes black box artifacts on Android WebKit */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
    position: sticky !important;
    top: 0 !important;
    /* z-index below .menu-btn (z-index: 200) so hamburger remains tappable */
    z-index: 190 !important;
    scrollbar-width: none !important;
  }
  .mobile-quick-nav::-webkit-scrollbar {
    display: none !important;
  }
  .mq-item {
    flex: 0 0 auto !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #e2e8f0 !important;
    padding: 8px 14px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
  }
  .mq-item.active {
    background: linear-gradient(135deg, #00d97e 0%, #059669 100%) !important;
    color: #ffffff !important;
    border-color: #00d97e !important;
    box-shadow: 0 4px 12px rgba(0, 217, 126, 0.35) !important;
  }

  /* Disable stat-card stagger animations on mobile — fill-mode:both leaves cards at
     opacity:0 if animation is interrupted (power-saving, scroll during load, etc.) */
  .stats .stat:nth-child(1),
  .stats .stat:nth-child(2),
  .stats .stat:nth-child(3),
  .stats .stat:nth-child(4),
  .stats .stat:nth-child(5),
  .stats .stat:nth-child(6) {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* Disable ALL section entrance animations on mobile.
     Both secIn (index.html) and fade-up-in (premium CSS) start at opacity:0.
     We kill animations on .sec, .sec.active, AND their direct parent .main
     so no inherited opacity/transform can keep the content invisible. */
  .sec, .sec.active {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }

  /* Kill any inherited animation on .main that could affect its children */
  .main {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* count-in animation on .stat-v starts at opacity:0 — was missing from original
     mobile fix, leaving stat values permanently invisible on mobile */
  .stat-v {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* backdrop-filter is disabled on mobile to prevent WebKit black-box artifacts,
     but that leaves rgba(12,12,18,0.85) stat backgrounds invisible on dark page.
     Use solid colors so cards are actually visible. */
  .stat {
    background: #1a1a2e !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
  }

  /* Quick action buttons nearly invisible without backdrop-filter */
  .ov-quick-btn {
    background: rgba(30, 30, 50, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
  }
}

/* ── Desktop Performance: laptop/desktop only (mobile untouched) ── */
@media (min-width: 769px) {
  /* Smooth GPU-accelerated table scroll */
  .twrap {
    will-change: scroll-position !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Reduce heavy backdrop-filter blur on desktop — mobile already disables it entirely */
  .sidebar,
  .modal,
  .overlay {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }

  /* GPU layer for sidebar (prevents repaint on scroll) */
  .sidebar {
    transform: translateZ(0) !important;
    contain: layout style !important;
  }

  /* Promote animated cards to compositor layer only on hover to avoid excess layers */
  .tcard:hover,
  .stat:hover,
  .ov-card:hover {
    will-change: transform !important;
  }

  /* Contain layout of each section so reflows don't cascade across tabs */
  .sec {
    contain: layout !important;
  }
  .sec.active {
    contain: none !important;
  }

  /* ── Scroll-jank fix #1: background-attachment:fixed forces a full-viewport
     repaint of the gradient + SVG-noise background on EVERY scroll frame.
     Paint it once on a fixed, composited pseudo-element instead — visually
     identical, zero repaint cost while scrolling. ── */
  body {
    background-image: none !important;
    background-attachment: scroll !important;
  }
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-color: var(--bg);
    background-image:
      radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 217, 126, 0.06) 0%, transparent 70%),
      radial-gradient(ellipse 50% 40% at 100% 80%, rgba(124, 90, 240, 0.05) 0%, transparent 60%),
      url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.025'/%3E%3C/svg%3E");
  }

  /* ── Scroll-jank fix #2: every stat card ran an infinite "beam" animation
     that animates `left` (layout + paint each frame, forever). Pause them by
     default; the beam sweeps only while the card is hovered. ── */
  .stat::before,
  .stat::after,
  .ov-card::before,
  .ov-card::after {
    animation-play-state: paused !important;
  }
  .stat:hover::before,
  .stat:hover::after,
  .ov-card:hover::before,
  .ov-card:hover::after {
    animation-play-state: running !important;
  }

  /* ── Scroll-jank fix #3: sidebar backdrop blur re-blurs on every frame the
     content behind it scrolls. Its background is already 96% opaque, so the
     blur is invisible — drop it and go near-solid. ── */
  .sidebar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(7, 7, 12, 0.98) !important;
  }
}





