/* ================================================================
   QRFlow — Enterprise QR Platform
   Design System & Global Styles
   Color Palette: var(--primary) / var(--primary) / var(--primary) / var(--c3) / var(--c2)
   ================================================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* User Dark Palette: #0A2647 / #144272 / #205295 / #2C74B3 */
  --c1: #0A2647;
  --c2: #144272;
  --c3: #205295;
  --c4: #2C74B3;

  --yellow:   #FDE68A;
  --orange:   #FDE68A;
  --pink:     #F9A8D4;
  --magenta:  #DCD6F7;
  --purple:   #A6D8FF;

  /* Solid Flat Colors (No Gradients) */
  --grad-main:    #2C74B3;
  --grad-warm:    #2C74B3;
  --grad-fire:    #2C74B3;
  --grad-cool:    #205295;
  --grad-full:    #2C74B3;

  /* Dark Theme Elements */
  --bg-primary:   #0A2647;
  --bg-secondary: #0E3057;
  --bg-card:      #144272;
  --bg-card-2:    #1A4F87;
  --input-bg:     #0F3863;
  --sidebar-bg:   #0E3057;
  --header-bg:    rgba(10, 38, 71, 0.95);

  --border:       #205295;
  --border-light: rgba(32, 82, 149, 0.5);
  --border-color: #205295;

  --primary:      #2C74B3;
  --accent:       #2C74B3;
  --brand-color:  #2C74B3;
  --primary-soft: rgba(44, 116, 179, 0.16);
  --primary-glow: rgba(44, 116, 179, 0.28);
  --accent-soft:  rgba(32, 82, 149, 0.18);
  --success:      #75E6DA;
  --success-soft: rgba(117, 230, 218, 0.16);
  --warning:      #FDE68A;
  --warning-soft: rgba(253, 230, 138, 0.16);
  --danger:       #F9A8D4;
  --danger-soft:  rgba(249, 168, 212, 0.16);
  --danger-color: #F9A8D4;
  --on-accent:    #FFFFFF;

  --text-main:    #FFFFFF;
  --text-muted:   #C8D9EA;
  --text-subtle:  #A9BDD4;
  --text-disabled:#7F96AE;
  --placeholder:  #9DB2CA;
  --soft-surface: rgba(244, 238, 255, 0.08);

  /* Shadows */
  --shadow-sm:    0 2px 8px rgba(10, 38, 71, 0.4);
  --shadow-md:    0 8px 24px rgba(10, 38, 71, 0.5);
  --shadow-lg:    0 20px 60px rgba(10, 38, 71, 0.6);

  --landing-nav-bg: rgba(10, 38, 71, 0.88);

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Sidebar */
  --sidebar-w: 240px;

  /* Transitions */
  --tr: 0.25s cubic-bezier(0.4,0,0.2,1);
}

[data-theme="light"] {
  /* User Light Palette: #F4EEFF / #DCD6F7 / #A6B1E1 / #424874 */
  --c1: #F4EEFF;
  --c2: #DCD6F7;
  --c3: #A6B1E1;
  --c4: #424874;

  --yellow:   #424874;
  --orange:   #424874;
  --pink:     #424874;
  --magenta:  #424874;
  --purple:   #424874;

  /* Solid Flat Colors (No Gradients) */
  --grad-main:    #424874;
  --grad-warm:    #424874;
  --grad-fire:    #424874;
  --grad-cool:    #A6B1E1;
  --grad-full:    #424874;

  /* Light Theme Elements - Solid, Distinct & High Contrast */
  --bg-primary:   #F4EEFF;
  --bg-secondary: #EBE4FA;
  --bg-card:      #DCD6F7;
  --bg-card-2:    #D2CBF3;
  --input-bg:     #E5DFFA;
  --sidebar-bg:   #DCD6F7;
  --header-bg:    rgba(244, 238, 255, 0.95);

  --border:       #A6B1E1;
  --border-light: rgba(166, 177, 225, 0.6);
  --border-color: #A6B1E1;

  --text-main:    #424874;
  --text-muted:   #5A608F;
  --text-subtle:  #7E85B5;

  --primary:      #424874;
  --accent:       #424874;
  --brand-color:  #424874;
  --primary-soft: rgba(66, 72, 116, 0.12);
  --primary-glow: rgba(66, 72, 116, 0.18);
  --accent-soft:  rgba(166, 177, 225, 0.35);
  --success:      #276749;
  --success-soft: rgba(39, 103, 73, 0.12);
  --warning:      #8A5A00;
  --warning-soft: rgba(138, 90, 0, 0.12);
  --danger:       #9F1239;
  --danger-soft:  rgba(159, 18, 57, 0.11);
  --danger-color: #9F1239;
  --on-accent:    #FFFFFF;
  --text-disabled:#8A90B8;
  --placeholder:  #747BAA;
  --soft-surface: rgba(66, 72, 116, 0.08);

  --shadow-sm:    0 2px 8px rgba(66, 72, 116, 0.12);
  --shadow-md:    0 8px 24px rgba(66, 72, 116, 0.18);
  --shadow-lg:    0 20px 60px rgba(66, 72, 116, 0.22);

  --landing-nav-bg: rgba(244, 238, 255, 0.92);
}

body, aside, header, main, div, button, input, select, textarea, table, tr, td, th, span, p, h1, h2, h3, h4, h5, h6, a, i {
  transition: background-color var(--tr), color var(--tr), border-color var(--tr), box-shadow var(--tr);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ---------- UTILITY ---------- */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }

/* ================================================================
   AUTH OVERLAY
   ================================================================ */
.auth-overlay {
  position: fixed; inset: 0;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.auth-bg-blobs {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.25;
  animation: blobPulse 8s ease-in-out infinite alternate;
}
.blob-1 { width:500px;height:500px; background:var(--purple); top:-100px; left:-150px; animation-delay:0s; }
.blob-2 { width:400px;height:400px; background:var(--pink); bottom:-80px; right:-100px; animation-delay:-3s; }
.blob-3 { width:300px;height:300px; background:var(--yellow); top:40%; left:40%; animation-delay:-5s; }

@keyframes blobPulse {
  from { transform: scale(1) translate(0,0); }
  to   { transform: scale(1.2) translate(30px,-20px); }
}

.auth-card {
  position: relative; z-index: 2;
  width: 100%; max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(32,82,149,0.1);
  animation: slideUp 0.6s cubic-bezier(0.4,0,0.2,1);
}

@keyframes slideUp {
  from { opacity:0; transform:translateY(40px); }
  to   { opacity:1; transform:translateY(0); }
}

.auth-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 32px;
}
.logo-icon {
  width: 48px; height: 48px;
  background: var(--grad-main);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff;
  box-shadow: 0 8px 24px rgba(32,82,149,0.4);
}
.logo-text {
  font-size: 28px; font-weight: 800; letter-spacing: -0.5px;
  color: var(--text-main);
}
.logo-flow { 
  background: var(--grad-main); 
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-title { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.auth-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }

.auth-error {
  background: rgba(44,116,179,0.12); border: 1px solid rgba(44,116,179,0.3);
  color: #ff6699; border-radius: var(--r-sm); padding: 10px 14px;
  font-size: 13px; margin-bottom: 16px;
}
.auth-success {
  background: var(--success-soft); border: 1px solid rgba(44,116,179,0.28);
  color: var(--success); border-radius: var(--r-sm); padding: 10px 14px;
  font-size: 13px; margin-bottom: 16px;
}

/* ================================================================
   PUBLIC LANDING PAGE
   ================================================================ */
.landing-page {
  min-height: 100vh;
  padding-top: 86px;
  background: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
}

.landing-nav {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  max-width: 1180px;
  margin: 0;
  padding: 22px 28px;
  background: var(--landing-nav-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 22px 22px;
  box-shadow: var(--shadow-md);
}

.landing-brand,
.landing-nav-links,
.landing-actions,
.landing-proof {
  display: flex;
  align-items: center;
}

.landing-brand { gap: 10px; }
.landing-nav-links { gap: 22px; }
.landing-nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.landing-nav-links a:hover { color: var(--text-main); }

.landing-login-btn,
.landing-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: 12px;
  padding: 10px 16px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  cursor: pointer;
}
.landing-login-btn:hover,
.landing-ghost-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(44,116,179,0.45);
  background: rgba(44,116,179,0.12);
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
  align-items: center;
  gap: 50px;
  max-width: 1180px;
  min-height: calc(100vh - 82px);
  margin: 0 auto;
  padding: 64px 28px 84px;
}

.landing-hero-copy {
  animation: landingSlideUp 0.75s ease both;
}

.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.landing-hero h1 {
  max-width: 760px;
  margin-top: 22px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: 0;
}

.landing-hero p {
  max-width: 620px;
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.7;
}

.landing-actions {
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.landing-proof {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.landing-proof span {
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
}
.landing-proof strong { color: var(--text-main); }

/* ================================================================
   STATIC ENTERPRISE DASHBOARD SHOWCASE (NO ANIMATIONS / MOTION-FREE)
   ================================================================ */
.landing-showcase {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.static-dashboard-card {
  position: relative;
  width: min(540px, 95vw);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.static-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.static-window-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}
.static-window-dots .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
}

.static-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
}
.static-title i {
  color: var(--purple);
}

.static-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
  background: rgba(0, 220, 100, 0.08);
  border: 1px solid rgba(0, 220, 100, 0.2);
  padding: 3px 10px;
  border-radius: 999px;
}

.static-card-body {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  padding: 24px;
  align-items: center;
}

.static-metrics-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.static-metric-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.metric-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--purple);
  font-size: 16px;
  flex-shrink: 0;
}

.metric-value {
  font-size: 17px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.1;
}

.metric-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.static-qr-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
}

.static-qr-frame {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.static-qr-svg {
  width: 100px;
  height: 100px;
  color: var(--text-main);
}

.static-qr-center-icon {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--primary);
  display: grid;
  place-items: center;
  color: var(--purple);
  font-size: 14px;
}

.static-qr-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.qr-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
}
.qr-url {
  font-size: 10px;
  color: var(--text-muted);
}

.static-card-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.footer-feature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
}
.footer-feature i {
  color: var(--purple);
}

@media (max-width: 640px) {
  .static-card-body {
    grid-template-columns: 1fr;
  }
  .static-card-footer {
    grid-template-columns: 1fr;
  }
}
.landing-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 76px 28px;
}
.landing-section-head {
  max-width: 760px;
  margin-bottom: 28px;
}
.landing-section-head h2,
.landing-final-cta h2 {
  margin-top: 14px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  font-weight: 900;
}

.landing-feature-grid,
.landing-plan-grid {
  gap: 16px;
}
.landing-feature-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
}
.landing-plan-grid {
  display: grid;
}
.landing-plan-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.landing-feature,
.landing-plan {
  min-height: 210px;
  padding: 24px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  color: var(--text-main);
}
.landing-plan {
  transform: translateY(0) scale(1);
  transition: transform var(--tr), border-color var(--tr), box-shadow var(--tr), background var(--tr);
  position: relative;
  overflow: hidden;
}
.landing-feature {
  animation: landingSlideUp 0.7s ease both;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  flex: 1 1 0;
  min-width: 0;
  z-index: 1;
  transform-origin: center center;
  transition: transform var(--tr), border-color var(--tr), box-shadow var(--tr), background var(--tr);
}
@media (hover: hover) and (pointer: fine) and (min-width: 961px) {
  .landing-feature:hover {
    transform: scale(1.075);
    border-color: var(--border);
    background: var(--bg-card-2);
    box-shadow: 0 24px 70px rgba(32,82,149,0.24);
    z-index: 4;
  }
}
.landing-feature:nth-child(2) { animation-delay: 0.08s; }
.landing-feature:nth-child(3) { animation-delay: 0.16s; }
.landing-feature:nth-child(4) { animation-delay: 0.24s; }
.landing-feature i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--grad-main);
  margin-bottom: 20px;
}
.landing-feature h3,
.landing-plan h3 { font-size: 18px; margin-bottom: 10px; }
.landing-feature p,
.landing-plan p,
.landing-final-cta p {
  color: var(--text-muted);
}
.landing-feature p {
  padding-bottom: 16px;
}
.landing-feature-more {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 14px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity var(--tr), transform var(--tr);
}
.landing-feature-more::after {
  content: '\f061';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--pink);
}
.landing-feature:hover .landing-feature-more,
.landing-feature:focus-visible .landing-feature-more {
  opacity: 1;
  transform: translateY(0);
}

.landing-feature-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4,4,9,0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.landing-feature-detail-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.landing-feature-detail-card {
  width: min(760px, calc(100vw - 48px));
  min-height: 330px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  padding: 30px;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,0.13);
  background:
    var(--bg-card);
  box-shadow: 0 34px 110px rgba(0,0,0,0.48);
  color: var(--text-main);
  transform: translateY(24px) scale(0.94);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.16,1,0.3,1), opacity 0.22s ease;
}
.landing-feature-detail-overlay.visible .landing-feature-detail-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.feature-detail-visual {
  position: relative;
  min-height: 260px;
  border-radius: 22px;
  overflow: hidden;
  background:
    var(--bg-card-2),
    rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.11);
}
.feature-detail-visual::before,
.feature-detail-visual::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.10);
}
.feature-detail-visual::before {
  width: 210px;
  height: 210px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.feature-detail-visual::after {
  width: 330px;
  height: 330px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.feature-detail-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: var(--grad-main);
  color: #fff;
  font-size: 42px;
  transform: translate(-50%, -50%) rotate(-6deg);
  box-shadow: 0 22px 50px rgba(44,116,179,0.34);
}
.feature-detail-lines {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 10px;
}
.feature-detail-lines span {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
}
.feature-detail-lines span:nth-child(2) { width: 72%; }
.feature-detail-lines span:nth-child(3) { width: 48%; }
.feature-detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.feature-detail-copy h3 {
  margin: 14px 0 12px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}
.feature-detail-copy p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 18px;
}
.feature-detail-copy ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feature-detail-copy li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  font-size: 14px;
}
.feature-detail-copy li::before {
  content: '\2713';
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0,220,100,0.16);
  color: var(--green);
  font-weight: 900;
  flex-shrink: 0;
}

.landing-slider-section {
  padding: 18px 0;
  border-block: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
}
.landing-marquee {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}
.landing-marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: landingMarquee 32s linear infinite;
}
.landing-marquee-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  padding-right: 14px;
}
.landing-marquee-group span {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-weight: 800;
}

.landing-plan-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.landing-plan strong {
  display: block;
  margin: 10px 0;
  font-size: 34px;
  line-height: 1;
}
.landing-price-stack {
  margin: 10px 0;
}
.landing-price-stack strong {
  margin: 3px 0 0;
}
.old-price {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: line-through;
  text-decoration-color: var(--primary);
  text-decoration-thickness: 2px;
  margin-bottom: 2px;
  opacity: 0.75;
}
.discount-badge, .app-discount-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 14px;
  border-radius: 999px;
  background: #FFD700;
  color: #0F172A !important;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid #FFE600;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.9), 0 0 32px rgba(255, 215, 0, 0.5), inset 0 1px 1px #FFF8BF;
  z-index: 5;
  animation: yellowBadgeGlowPulse 2.2s ease-in-out infinite alternate;
}

[data-theme="light"] .discount-badge,
[data-theme="light"] .app-discount-badge {
  background: #FFC700;
  color: #0F172A !important;
  border: 1px solid #FFD700;
  box-shadow: 0 0 16px rgba(255, 199, 0, 0.85), 0 0 30px rgba(255, 199, 0, 0.5), inset 0 1px 1px #FFF8BF;
}

@keyframes yellowBadgeGlowPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.8), 0 0 24px rgba(255, 215, 0, 0.4), inset 0 1px 1px #FFF8BF;
  }
  100% {
    transform: scale(1.05);
    box-shadow: 0 0 24px rgba(255, 215, 0, 1), 0 0 45px rgba(255, 215, 0, 0.8), inset 0 1px 2px #FFFFFF;
  }
}
.discount-plan::before {
  content: '';
  position: absolute;
  inset: -45% auto auto -35%;
  width: 150px;
  height: 220px;
  background: transparent;
  transform: rotate(24deg);
  opacity: 0.55;
  pointer-events: none;
}
.discount-plan:hover .discount-badge {
  background: #FFD700 !important;
  color: #0F172A !important;
  border-color: #FFE600 !important;
}
.app-subscription-card {
  transition: transform var(--tr), border-color var(--tr), box-shadow var(--tr), background var(--tr);
}
.app-price-stack {
  min-height: 58px;
  margin-bottom: 20px;
}
.app-current-price {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  color: var(--text-main);
  letter-spacing: -0.02em;
}
.app-price-currency {
  margin-left: 4px;
  font-size: 14px;
  color: var(--text-muted);
}
.app-discount-plan {
  border-color: rgba(166,177,225,0.18) !important;
}
.app-discount-plan::before {
  animation: discountShine 3.4s ease-in-out infinite;
}
.app-discount-badge {
  top: 12px;
  right: 12px;
  z-index: 2;
}
@keyframes discountShine {
  0%, 44% { transform: translateX(-70px) rotate(24deg); opacity: 0; }
  55% { opacity: 0.5; }
  100% { transform: translateX(370px) rotate(24deg); opacity: 0; }
}
@media (hover: hover) and (pointer: fine) {
  .app-subscription-card:hover {
    background: var(--bg-card-2) !important;
    border-color: rgba(44,116,179,0.38) !important;
    box-shadow: 0 20px 50px rgba(32,82,149,0.22) !important;
    transform: translateY(-6px) scale(1.02);
  }
  .app-subscription-card:hover .discount-badge {
    background: #FFD700 !important;
    color: #0F172A !important;
    border-color: #FFE600 !important;
  }
}
.landing-plan.featured {
  background: rgba(255,255,255,0.055);
  border-color: rgba(255,255,255,0.09);
  transform: translateY(0) scale(1);
}
@media (hover: hover) and (pointer: fine) {
  .landing-plan:hover,
  .landing-plan.featured:hover {
    background: var(--bg-card-2);
    border-color: rgba(44,116,179,0.35);
    box-shadow: 0 26px 75px rgba(32,82,149,0.28);
    transform: translateY(-8px) scale(1.035);
  }
}

.landing-final-cta {
  max-width: 980px;
  margin: 22px auto 90px;
  padding: 48px 28px;
  text-align: center;
  border-radius: 28px;
  background: var(--bg-card-2);
  border: 1px solid rgba(255,255,255,0.12);
}
.landing-final-cta p {
  max-width: 620px;
  margin: 14px auto 24px;
}

.landing-up-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 50%;
  background: var(--grad-main);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.92);
  transition: opacity var(--tr), transform var(--tr), box-shadow var(--tr);
  box-shadow: 0 14px 35px rgba(32,82,149,0.35);
}
.landing-up-button.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.landing-up-button:hover {
  box-shadow: 0 18px 45px rgba(44,116,179,0.38);
  transform: translateY(-2px) scale(1.03);
}

@keyframes landingSlideUp {
  from { opacity: 0; transform: translateY(34px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes landingSlideIn {
  from { opacity: 0; transform: translateX(48px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes landingFloat {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-14px); }
}
.landing-floating-card {
  transform: none;
}
.landing-floating-card.card-a,
.landing-floating-card.card-b,
.landing-floating-card.card-c {
  animation-name: landingSmallFloat;
}
@keyframes landingSmallFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes landingRotate {
  to { transform: rotate(360deg); }
}
@keyframes landingMarquee {
  to { transform: translateX(-50%); }
}

@media (max-width: 960px) {
  .landing-hero {
    grid-template-columns: 1fr;
    padding-top: 42px;
  }
  .landing-showcase {
    min-height: 480px;
  }
  .landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .landing-feature {
    flex: initial;
  }
}

@media (max-width: 640px) {
  .landing-nav {
    padding: 16px;
  }
  .landing-nav-links a {
    display: none;
  }
  .landing-hero {
    padding: 34px 18px 56px;
  }
  .landing-hero h1 {
    font-size: 42px;
  }
  .landing-hero p {
    font-size: 16px;
  }
  .landing-showcase {
    min-height: 420px;
  }
  .landing-phone {
    width: min(300px, 88vw);
    min-height: 390px;
  }
  .landing-floating-card {
    display: none;
  }
  .landing-feature-grid,
  .landing-plan-grid {
    display: grid;
    grid-template-columns: 1fr;
  }
  .landing-plan.featured {
    transform: none;
  }
}

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--text-muted); margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  background: rgba(10, 38, 71, 0.36);
  color: var(--text-main);
  border: 1px solid rgba(166, 216, 255, 0.18);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color var(--tr), box-shadow var(--tr), background-color var(--tr);
}
.form-control:focus {
  background: rgba(10, 38, 71, 0.52);
  border-color: rgba(166, 216, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(166,216,255,0.12);
}
select.form-control option {
  background-color: var(--bg-card);
  color: var(--text-main);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.input-icon-wrap {
  position: relative; display: flex; align-items: center;
}
.input-icon-wrap > i:first-child {
  position: absolute; left: 14px;
  color: var(--text-muted); font-size: 14px; pointer-events: none;
  z-index: 1;
}
.input-icon-wrap input {
  width: 100%; padding: 12px 14px 12px 40px;
  background: rgba(10, 38, 71, 0.36); border: 1px solid rgba(166, 216, 255, 0.18);
  border-radius: var(--r-sm); color: var(--text-main);
  font-family: 'Outfit', sans-serif; font-size: 14px;
  transition: border-color var(--tr), box-shadow var(--tr), background-color var(--tr);
  outline: none;
}
.input-icon-wrap input:focus {
  background: rgba(10, 38, 71, 0.52);
  border-color: rgba(166, 216, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(166,216,255,0.12);
}
.form-control::placeholder,
.input-icon-wrap input::placeholder,
textarea::placeholder,
input::placeholder {
  color: var(--placeholder);
  opacity: 1;
}
.toggle-pw {
  position: absolute; right: 12px;
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 14px; padding: 4px;
  transition: color var(--tr);
}
.toggle-pw:hover { color: var(--text-main); }

[data-theme="light"] .form-control,
[data-theme="light"] .input-icon-wrap input {
  background: rgba(255,255,255,0.58);
  border-color: rgba(66,72,116,0.18);
}
[data-theme="light"] .form-control:focus,
[data-theme="light"] .input-icon-wrap input:focus {
  background: rgba(255,255,255,0.84);
  border-color: rgba(66,72,116,0.42);
  box-shadow: 0 0 0 3px rgba(66,72,116,0.1);
}

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  background: var(--grad-main);
  border: none; border-radius: var(--r-sm);
  color: #fff; font-family: 'Outfit', sans-serif;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform var(--tr), box-shadow var(--tr), opacity var(--tr);
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(32,82,149,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(32,82,149,0.45); }
.btn-primary:active { transform: translateY(0); }
.btn-primary.full-width { width: 100%; }
.btn-primary.large { padding: 16px 28px; font-size: 15px; border-radius: var(--r-md); }
.btn-primary.sm { padding: 8px 16px; font-size: 13px; }
.btn-primary:disabled {
  opacity: 0.5; cursor: not-allowed; transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  background: var(--bg-card-2); border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  color: var(--text-main); font-family: 'Outfit', sans-serif;
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: all var(--tr);
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }
.btn-secondary.sm { padding: 8px 16px; font-size: 13px; }

.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  background: var(--danger-soft); border: 1px solid rgba(249,168,212,0.28);
  border-radius: var(--r-sm);
  color: var(--danger); font-family: 'Outfit', sans-serif;
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: all var(--tr);
}
.btn-danger:hover { background: rgba(249,168,212,0.24); border-color: rgba(249,168,212,0.42); }
.btn-warning {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 12px;
  background: var(--warning-soft); border: 1px solid rgba(166,177,225,0.35);
  border-radius: var(--r-sm); color: var(--warning);
  font-family: 'Outfit', sans-serif; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all var(--tr); white-space: nowrap;
}
.btn-warning:hover { background: rgba(253,230,138,0.24); border-color: rgba(253,230,138,0.4); }

.link-btn {
  background: none; border: none; color: var(--purple);
  font-family: 'Outfit', sans-serif; font-size: 13px;
  cursor: pointer; font-weight: 700;
  transition: color var(--tr);
}
.link-btn:hover { color: var(--text-main); }

.auth-switch {
  text-align: center; margin-top: 20px;
  color: var(--text-muted); font-size: 13px;
}
.auth-switch.compact { margin-top: 12px; }
.auth-switch button {
  background: none; border: none; color: var(--primary);
  font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 800;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.auth-switch button:hover { color: var(--text-main); opacity: 0.85; }
.recovery-option-btn {
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}
.profile-account-settings {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  background: rgba(32,82,149,0.04);
}
.profile-account-settings h4 {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--text-main);
}
.profile-left-sticky {
  position: relative !important;
  top: auto;
  align-self: start;
  z-index: 2;
  min-height: var(--profile-fixed-height, auto);
}
.profile-left-fixed-inner {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-left-sticky.is-scroll-fixed .profile-left-fixed-inner {
  position: fixed !important;
  top: 20px !important;
  left: var(--profile-fixed-left, 272px);
  width: var(--profile-fixed-width, 380px);
  z-index: 40;
}
.profile-leaderboard-privacy-card {
  padding: 16px 18px;
}
.profile-leaderboard-privacy-card > label:first-child {
  display: block;
  margin-bottom: 10px;
  color: var(--text-main);
  font-weight: 800;
}

@media (min-width: 901px) {
  #page-profile .profile-left-sticky {
    position: relative !important;
    top: auto;
    align-self: flex-start;
  }
  #page-profile .profile-left-sticky.is-scroll-fixed .profile-left-fixed-inner {
    position: fixed !important;
    top: 20px !important;
  }
  #page-profile .profile-layout-grid .profile-editor-panel {
    grid-column: 2;
  }
}
.leaderboard-privacy-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text-main);
  font-weight: 700;
}
.leaderboard-privacy-toggle input { display: none; }
.leaderboard-privacy-check {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(255,255,255,0.12);
  border: 1px solid var(--border);
  position: relative;
  transition: var(--tr);
  flex-shrink: 0;
}
.leaderboard-privacy-check::after {
  content: '\2713';
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: var(--tr);
}
.leaderboard-privacy-toggle input:checked + .leaderboard-privacy-check {
  background: var(--pink);
  border-color: var(--pink);
  box-shadow: 0 0 12px rgba(44,116,179,0.35);
}
.leaderboard-privacy-toggle input:checked + .leaderboard-privacy-check::after {
  opacity: 1;
  transform: scale(1);
}
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.leaderboard-row {
  width: 100%;
  display: grid;
  grid-template-columns: 70px 70px minmax(0, 1fr) 140px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.025);
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  transition: var(--tr);
}
.leaderboard-row:hover {
  transform: translateY(-2px);
  border-color: rgba(32,82,149,0.45);
  background: rgba(32,82,149,0.08);
}
.leaderboard-rank {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-muted);
}
.leaderboard-rank.top-rank {
  color: var(--orange);
}
.leaderboard-avatar-frame {
  border-radius: 50%;
  padding: 4px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.leaderboard-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-main);
  color: #fff;
  overflow: hidden;
}
.leaderboard-user strong,
.leaderboard-user span,
.leaderboard-scans strong,
.leaderboard-scans span {
  display: block;
}
.leaderboard-user strong { font-size: 15px; }
.leaderboard-user span,
.leaderboard-scans span {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}
.leaderboard-scans {
  text-align: right;
}
.leaderboard-scans strong {
  font-size: 22px;
  color: var(--text-main);
}
.leaderboard-profile-modal {
  width: min(380px, calc(100vw - 32px)) !important;
  max-width: 360px;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}
.leaderboard-profile-closebar {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 5;
}
.leaderboard-profile-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
}
.leaderboard-profile-banner {
  height: 92px;
}
.leaderboard-profile-body {
  text-align: center;
  padding: 0 20px 20px;
}
.leaderboard-profile-avatar {
  display: flex;
  justify-content: center;
  transform: translateY(-43px);
  margin-bottom: -32px;
}
.leaderboard-profile-body h2 {
  margin: 0;
  font-size: 18px;
}
.leaderboard-profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.leaderboard-profile-stats span,
.leaderboard-profile-stats strong {
  display: block;
}
.leaderboard-profile-stats span {
  color: var(--text-muted);
  font-size: 11px;
}
.leaderboard-profile-stats strong {
  font-size: 15px;
}
.leaderboard-profile-stats strong {
  margin-top: 4px;
  color: var(--text-main);
  font-size: 18px;
}

/* ================================================================
   MAIN APP LAYOUT
   ================================================================ */
.main-app {
  display: flex; min-height: 100vh;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--tr);
}

.sidebar-header {
  display: flex; align-items: center; gap: 10px;
  min-height: 70px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.logo-icon-sm {
  width: 36px; height: 36px;
  background: var(--grad-main);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff;
  box-shadow: 0 4px 12px rgba(32,82,149,0.4);
  flex-shrink: 0;
}
.logo-text-sm { font-size: 20px; font-weight: 800; }

.sidebar-nav {
  flex: 1; padding: 10px 12px 16px;
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto;
  align-items: stretch;
  justify-content: flex-start;
}

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  background: none; border: none;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 500;
  cursor: pointer; width: 100%; text-align: left;
  transition: all var(--tr);
  position: relative;
}
.nav-item i { font-size: 16px; width: 20px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }
.nav-item.active {
  background: rgba(32,82,149,0.15);
  color: #fff;
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--grad-main);
  border-radius: 0 3px 3px 0;
}
.nav-item.active i { color: var(--purple); }

.sidebar-bottom {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.user-chip {
  flex: 1; display: flex; align-items: center; gap: 10px;
  min-width: 0;
}
.user-avatar {
  width: 36px; height: 36px;
  background: var(--grad-main);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.user-avatar.frame-basic-gold,
.user-avatar.frame-basic-silver,
.user-avatar.frame-neon-gradient,
.user-avatar.frame-rainbow-rotate {
  padding: 2px;
}
.user-avatar.frame-rainbow-rotate::before {
  border-width: 2.5px;
}
.user-info { min-width: 0; }
.user-info span {
  display: block; font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-info small { color: var(--text-muted); font-size: 11px; }
.logout-btn {
  width: 34px; height: 34px;
  background: rgba(44,116,179,0.1); border: 1px solid rgba(44,116,179,0.2);
  border-radius: var(--r-sm); color: var(--pink);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
  transition: all var(--tr);
}
.logout-btn:hover { background: rgba(44,116,179,0.2); }

/* ---------- TOPBAR (mobile) ---------- */
.topbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; height: 60px;
  background: var(--bg-secondary); border-bottom: 1px solid var(--border);
  z-index: 99;
  align-items: center; justify-content: space-between;
  padding: 0 16px;
}
.menu-toggle, .topbar-logout {
  background: none; border: none; color: var(--text-muted);
  font-size: 18px; cursor: pointer; padding: 8px;
  transition: color var(--tr);
}
.menu-toggle:hover, .topbar-logout:hover { color: var(--text-main); }
.topbar-logo { display: flex; align-items: center; gap: 8px; }

/* ---------- PAGE CONTENT ---------- */
.page-content {
  margin-left: var(--sidebar-w);
  flex: 1; min-height: 100vh;
  padding: 32px;
  background: var(--bg-primary);
}

.page { display: none; animation: fadeIn 0.35s ease; }
.page.active { display: block; }
@keyframes fadeIn {
  from { opacity:0; transform:translateY(12px); }
  to   { opacity:1; transform:translateY(0); }
}

.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px; gap: 16px; flex-wrap: wrap;
}
.page-title { font-size: 28px; font-weight: 800; line-height: 1.2; }
.page-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

/* ================================================================
   DASHBOARD — STATS GRID
   ================================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex; align-items: center; gap: 16px;
  position: relative; overflow: hidden;
  transition: transform var(--tr), box-shadow var(--tr);
}
.stat-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-yellow::before { background: var(--grad-warm); }
.stat-orange::before { background: var(--grad-fire); }
.stat-pink::before   { background: var(--primary); }
.stat-purple::before { background: var(--grad-cool); }

.stat-icon {
  width: 48px; height: 48px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.stat-yellow .stat-icon { background: var(--warning-soft); color: var(--yellow); }
.stat-orange .stat-icon { background: var(--warning-soft); color: var(--orange); }
.stat-pink   .stat-icon { background: rgba(44,116,179,0.15); color: var(--pink); }
.stat-purple .stat-icon { background: rgba(32,82,149,0.15); color: var(--purple); }

.stat-value {
  font-size: 28px; font-weight: 800;
  line-height: 1;
  background: var(--grad-full); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* ================================================================
   CHARTS
   ================================================================ */
.charts-row {
  display: grid; grid-template-columns: 1fr 320px; gap: 16px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
}
.chart-card.big { grid-column: 1 / -1; }
.chart-card.chart-small {}

.chart-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.chart-header h3 { font-size: 15px; font-weight: 600; }
.chart-badge {
  font-size: 11px; padding: 4px 10px;
  background: rgba(32,82,149,0.15); color: var(--purple);
  border-radius: 20px; font-weight: 500;
}

.chart-wrapper { position: relative; }
.chart-wrapper canvas { max-height: 200px; }
.chart-doughnut-wrap { display: flex; justify-content: center; }
.chart-doughnut-wrap canvas { max-height: 160px; max-width: 160px; }

.big-chart canvas { max-height: 280px; }

.device-legend {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 16px; justify-content: center;
}
.legend-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--text-main);
}
.legend-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.08);
}

/* ================================================================
   BOTTOM ROW
   ================================================================ */
.bottom-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}

.list-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
}
.list-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.list-card-header h3 { font-size: 15px; font-weight: 600; }

.cities-list { display: flex; flex-direction: column; gap: 12px; }
.city-item {
  display: flex; align-items: center; gap: 12px;
}
.city-bar-wrap { flex: 1; }
.city-bar-bg {
  height: 6px; background: rgba(221,241,255,0.18);
  border-radius: 3px; overflow: hidden;
}
.city-bar-fill {
  height: 100%; border-radius: 3px;
  background: var(--grad-main);
  box-shadow: 0 0 16px rgba(221,241,255,0.28);
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.city-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--text-main); }
.city-count { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.recent-qr-list { display: flex; flex-direction: column; gap: 10px; }
.recent-qr-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--bg-card-2); border-radius: var(--r-sm);
  cursor: pointer; transition: background var(--tr);
}
.recent-qr-item:hover { background: rgba(255,255,255,0.06); }
.rqi-icon {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.rqi-info { flex: 1; min-width: 0; }
.rqi-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rqi-meta { font-size: 11px; color: var(--text-muted); }

.empty-state-sm {
  text-align: center; color: var(--text-muted);
  padding: 24px; font-size: 13px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

.loading-state {
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px; padding: 60px 20px;
  color: var(--text-muted);
}
.loading-state.sm { padding: 20px; }
.spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   QR CODES PAGE
   ================================================================ */
.filter-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.search-wrap {
  position: relative; flex: 1; min-width: 200px;
}
.search-wrap i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 14px; pointer-events: none;
}
.search-wrap input {
  width: 100%; padding: 10px 14px 10px 40px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text-main);
  font-family: 'Outfit', sans-serif; font-size: 14px; outline: none;
  transition: border-color var(--tr);
}
.search-wrap input:focus { border-color: var(--purple); }
.search-wrap input::placeholder { color: var(--text-subtle); }

.filter-pills { display: flex; gap: 6px; }
.pill {
  padding: 8px 16px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); font-family: 'Outfit', sans-serif;
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all var(--tr);
}
.pill.active, .pill:hover {
  background: rgba(32,82,149,0.15); border-color: var(--purple);
  color: var(--purple);
}

.view-toggle { display: flex; gap: 4px; }
.view-btn {
  width: 36px; height: 36px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text-muted);
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--tr);
}
.view-btn.active { background: rgba(32,82,149,0.15); border-color: var(--purple); color: var(--purple); }

/* QR Grid */
.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.qr-grid.list-view { grid-template-columns: 1fr; }

.qr-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
  cursor: pointer; transition: all var(--tr);
  position: relative; overflow: hidden;
}
.qr-card::after {
  content: ''; position: absolute;
  inset: 0; border-radius: var(--r-lg);
  background: var(--grad-main); opacity: 0;
  transition: opacity var(--tr);
  pointer-events: none;
}
.qr-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.qr-card:hover::after { opacity: 0.03; }

.qr-card-canvas {
  display: flex; justify-content: center; margin-bottom: 14px;
}
.qr-card-canvas canvas, .qr-card-canvas img {
  border-radius: var(--r-sm); max-width: 100%;
}
.qr-grid:not(.list-view) .qr-card-canvas {
  align-items: center;
  height: 160px;
  min-height: 160px;
}
.qr-grid:not(.list-view) .qr-card-canvas > div {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 160px;
}
.qr-grid:not(.list-view) .qr-card-canvas img,
.qr-grid:not(.list-view) .qr-card-canvas canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.qr-card-name {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 6px;
}
.qr-card-meta {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.qr-grid:not(.list-view) .qr-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.qr-grid:not(.list-view) .qr-card-name {
  text-align: center;
  margin-top: auto;
}
.qr-grid:not(.list-view) .qr-card-meta {
  justify-content: center;
}

.badge-dynamic, .badge-solution, .badge-static, .badge-active, .badge-inactive {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 800;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-dynamic {
  background: rgba(166,216,255,0.16);
  color: #DDF1FF;
  border-color: rgba(166,216,255,0.24);
}
.badge-static  {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: rgba(253,230,138,0.24);
}
.badge-solution {
  background: rgba(220,214,247,0.15);
  color: #F4EEFF;
  border-color: rgba(220,214,247,0.22);
}
.badge-active  {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(117,230,218,0.24);
}
.badge-inactive {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(249,168,212,0.22);
}

[data-theme="light"] .badge-dynamic {
  background: rgba(66,72,116,0.12);
  color: #424874;
  border-color: rgba(66,72,116,0.18);
}
[data-theme="light"] .badge-solution {
  background: rgba(90,96,143,0.12);
  color: #424874;
  border-color: rgba(90,96,143,0.18);
}

/* List view card */
.qr-grid.list-view .qr-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
}
.qr-grid.list-view .qr-card-canvas { margin-bottom: 0; flex-shrink: 0; }
.qr-grid.list-view .qr-card-canvas canvas { width: 48px; height: 48px; }
.qr-grid.list-view .qr-card-body { flex: 1; min-width: 0; }

.qr-card-actions {
  display: flex; gap: 6px; margin-top: 12px;
}
.qr-grid:not(.list-view) .qr-card-actions { justify-content: center; }
.qr-grid.list-view .qr-card-actions { margin-top: 0; }

.icon-btn {
  width: 30px; height: 30px;
  background: rgba(244,238,255,0.08); border: 1px solid rgba(166,216,255,0.18);
  border-radius: 6px; cursor: pointer; color: var(--text-muted);
  font-size: 12px; display: flex; align-items: center; justify-content: center;
  transition: all var(--tr);
}
.icon-btn:hover { background: rgba(166,216,255,0.16); color: var(--text-main); border-color: rgba(166,216,255,0.36); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); border-color: rgba(249,168,212,0.32); }

/* ================================================================
   CREATE QR PAGE
   ================================================================ */
.create-layout {
  display: grid; grid-template-columns: 1fr 380px;
  gap: 24px; align-items: start;
}

.create-form-panel { display: flex; flex-direction: column; gap: 8px; }
.create-preview-panel {
  position: relative;
  min-height: var(--create-preview-fixed-height, auto);
}
.create-preview-fixed-inner {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.create-preview-panel.is-scroll-fixed .create-preview-fixed-inner {
  position: fixed;
  top: 24px;
  left: var(--create-preview-fixed-left, auto);
  width: var(--create-preview-fixed-width, 380px);
  z-index: 35;
}

.form-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
}
.section-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; margin-bottom: 16px;
  color: var(--text-muted);
}
.step-badge {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--grad-main);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}

.type-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.type-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 18px; border-radius: var(--r-md);
  background: rgba(255,255,255,0.035); border: 2px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: all var(--tr);
}
.type-card i { font-size: 22px; }
.type-card span { font-size: 14px; font-weight: 600; }
.type-card small { font-size: 11px; text-align: center; }
.type-card:hover {
  border-color: rgba(166,177,225,0.52);
  background: rgba(166,177,225,0.10);
  color: var(--text-main);
  transform: translateY(-1px);
}
.type-card.active {
  border-color: #A6B1E1;
  background: linear-gradient(135deg, rgba(44,116,179,0.40), rgba(166,177,225,0.18));
  color: #FFFFFF;
  box-shadow: 0 0 0 1px rgba(166,177,225,0.20), 0 14px 34px rgba(10,38,71,0.26);
}
.type-card.active i,
.type-card.active span {
  color: #FFFFFF;
}
.type-card.active small {
  color: rgba(255,255,255,0.78);
}

.solution-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.solution-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 10px; border-radius: var(--r-sm);
  background: rgba(255,255,255,0.035); border: 2px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  font-family: 'Outfit', sans-serif; text-align: center;
  transition: all var(--tr);
}
.solution-card i { font-size: 18px; }
.solution-card span { font-size: 11px; font-weight: 500; }
.solution-card:hover {
  border-color: rgba(166,177,225,0.46);
  background: rgba(166,177,225,0.09);
  color: var(--text-main);
  transform: translateY(-1px);
}
.solution-card.active {
  border-color: #A6B1E1;
  background: linear-gradient(135deg, rgba(44,116,179,0.38), rgba(166,177,225,0.16));
  color: #FFFFFF;
  box-shadow: 0 0 0 1px rgba(166,177,225,0.18), 0 12px 26px rgba(10,38,71,0.22);
}
.solution-card.active i,
.solution-card.active span {
  color: #FFFFFF;
}
.solution-card.disabled {
  opacity: 0.72;
  cursor: not-allowed;
  color: var(--text-disabled);
  background: rgba(244,238,255,0.035);
}

.design-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.color-picker-group label { 
  display: block; font-size: 12px; color: var(--text-muted);
  margin-bottom: 8px; font-weight: 500;
}
.color-picker-wrap {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.color-picker-wrap input[type="color"] {
  width: 40px; height: 40px;
  border: 2px solid var(--border-light);
  border-radius: var(--r-sm); cursor: pointer;
  background: none; padding: 2px;
}
.color-picker-wrap span { font-size: 13px; color: var(--text-muted); font-family: monospace; }
.quick-colors { display: flex; gap: 6px; flex-wrap: wrap; }
.color-dot {
  width: 22px; height: 22px; border-radius: 50%;
  cursor: pointer; border: 2px solid transparent;
  transition: transform var(--tr), border-color var(--tr);
}
.color-dot:hover { transform: scale(1.2); border-color: rgba(255,255,255,0.4); }

.contrast-warning {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--warning-soft); border: 1px solid rgba(166,177,225,0.3);
  color: var(--yellow); font-size: 13px; margin-top: 12px;
}

/* Preview Panel */
.preview-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px; text-align: center;
}
.preview-label {
  font-size: 11px; font-weight: 600; color: var(--text-subtle);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px;
}
.qr-preview-frame {
  background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 20px;
  display: flex; justify-content: center; align-items: center;
  min-height: 240px; margin-bottom: 16px;
}
.qr-canvas-wrap canvas { border-radius: 8px; }
.qr-canvas-wrap .placeholder {
  color: var(--text-subtle); font-size: 13px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.qr-canvas-wrap .placeholder i { font-size: 40px; }

.preview-info { margin-bottom: 16px; }
.preview-name { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.preview-type { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }

.solution-info-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px;
  display: flex; align-items: flex-start; gap: 12px;
}
.solution-info-icon {
  font-size: 18px; color: var(--purple); flex-shrink: 0; padding-top: 2px;
}
.solution-info-card strong { font-size: 13px; display: block; margin-bottom: 4px; }
.solution-info-card p { font-size: 12px; color: var(--text-muted); }

/* ================================================================
   ANALYTICS PAGE
   ================================================================ */
.analytics-layout { display: flex; flex-direction: column; gap: 20px; }

#page-analytics .chart-card,
#page-analytics .analytics-stat {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-secondary));
  border-color: var(--border-light);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

#page-analytics .chart-header h3,
#page-analytics .as-value,
#page-analytics .city-name {
  color: var(--text-main);
  text-shadow: none;
}

#page-analytics .as-label,
#page-analytics .legend-item,
#page-analytics .city-count {
  color: var(--text-muted);
}

#page-analytics .chart-wrapper {
  border-radius: 16px;
}

.analytics-stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px;
}
.analytics-stat {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
  display: flex; align-items: center; gap: 16px;
}
.as-icon {
  width: 48px; height: 48px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, #2C74B3, #A6D8FF) !important;
  box-shadow: 0 10px 24px rgba(44,116,179,0.24);
}
.as-value { font-size: 24px; font-weight: 800; }
.as-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.mini-charts-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}

.period-selector { display: flex; gap: 4px; }
.period-btn {
  padding: 6px 14px; border-radius: 20px;
  background: var(--primary-soft); border: 1px solid var(--border-light);
  color: var(--text-muted); font-family: 'Outfit', sans-serif;
  font-size: 12px; font-weight: 800; cursor: pointer;
  transition: background var(--tr), border-color var(--tr), color var(--tr), transform var(--tr), box-shadow var(--tr);
}
.period-btn:hover {
  background: var(--accent-soft);
  border-color: var(--primary);
  color: var(--text-main);
  transform: translateY(-1px);
}
.period-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-accent);
  box-shadow: 0 10px 26px var(--primary-glow);
}

.cities-bar-list { display: flex; flex-direction: column; gap: 14px; }

[data-theme="light"] .legend-item { color: var(--text-main); }
[data-theme="light"] .city-bar-bg { background: rgba(66,72,116,0.12); }
[data-theme="light"] .city-name { color: var(--text-main); }
[data-theme="light"] .city-count { color: var(--text-muted); }
[data-theme="light"] .period-btn {
  background: rgba(66,72,116,0.08);
  border-color: rgba(66,72,116,0.16);
  color: var(--text-muted);
}
[data-theme="light"] .period-btn:hover {
  background: rgba(66,72,116,0.14);
  border-color: rgba(66,72,116,0.28);
  color: var(--text-main);
}
[data-theme="light"] .period-btn.active {
  background: #424874;
  color: #fff;
}

[data-theme="light"] #page-analytics .chart-card,
[data-theme="light"] #page-analytics .analytics-stat {
  background: linear-gradient(180deg, #F9F6FF, #EDE7FB);
  border-color: rgba(66, 72, 116, 0.18);
}

[data-theme="light"] #page-analytics .chart-wrapper canvas {
  filter: saturate(1.05) contrast(1.04);
}

[data-theme="light"] #page-analytics .as-icon {
  background: #424874 !important;
  color: #FFFFFF;
  box-shadow: 0 10px 22px rgba(66, 72, 116, 0.18);
}

/* ================================================================
   BULK CSV PAGE
   ================================================================ */
.bulk-layout { display: flex; flex-direction: column; gap: 20px; max-width: 680px; }

.bulk-upload-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.bulk-header { text-align: center; }
.bulk-icon {
  width: 64px; height: 64px;
  background: var(--grad-cool); border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #fff; margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(32,82,149,0.3);
}
.bulk-header h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.bulk-header p { color: var(--text-muted); font-size: 14px; }

.csv-format-box {
  background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 16px;
}
.csv-format-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px;
}
.csv-format-code {
  display: block; font-family: 'Courier New', monospace;
  font-size: 12px; color: var(--text-muted);
  line-height: 1.8; margin-bottom: 12px;
  white-space: pre-wrap; word-break: break-all;
}

.drop-zone {
  border: 2px dashed var(--border-light); border-radius: var(--r-lg);
  padding: 40px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  cursor: pointer; transition: all var(--tr);
}
.drop-zone i { font-size: 36px; color: var(--text-subtle); }
.drop-zone p { color: var(--text-muted); font-size: 14px; }
.drop-zone span { color: var(--text-subtle); font-size: 12px; }
.drop-zone.drag-over {
  border-color: var(--purple);
  background: rgba(32,82,149,0.05);
}
.drop-zone.drag-over i { color: var(--purple); }

.bulk-file-info {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: rgba(32,82,149,0.1); border: 1px solid rgba(32,82,149,0.2);
  border-radius: var(--r-sm);
}
.bulk-file-info i { color: var(--purple); }
.bulk-file-info span { flex: 1; font-size: 13px; font-weight: 500; }
.remove-file {
  background: none; border: none; color: var(--text-subtle);
  cursor: pointer; font-size: 14px; padding: 4px;
  transition: color var(--tr);
}
.remove-file:hover { color: var(--pink); }

.bulk-results {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 24px;
  animation: fadeIn 0.4s ease;
}
.bulk-result-header { margin-bottom: 16px; }
.bulk-result-header h3 { font-size: 16px; font-weight: 700; }
.bulk-result-stats {
  display: flex; gap: 16px; margin-bottom: 20px;
}
.br-stat {
  flex: 1; padding: 16px; border-radius: var(--r-md);
  display: flex; align-items: center; gap: 12px;
  flex-direction: column; text-align: center;
}
.br-stat.success { background: var(--success-soft); border: 1px solid rgba(0,220,100,0.2); }
.br-stat.error   { background: rgba(44,116,179,0.1); border: 1px solid rgba(44,116,179,0.2); }
.br-stat.success i { color: var(--success); font-size: 24px; }
.br-stat.error i   { color: var(--pink); font-size: 24px; }
.br-stat span { font-size: 28px; font-weight: 800; }
.br-stat small { font-size: 12px; color: var(--text-muted); }

.bulk-error-list { display: flex; flex-direction: column; gap: 8px; }
.bulk-error-item {
  padding: 10px 14px; border-radius: var(--r-sm);
  background: rgba(44,116,179,0.08); border: 1px solid rgba(44,116,179,0.15);
  font-size: 12px; color: var(--text-muted);
}
.bulk-error-item strong { color: var(--pink); }

/* ================================================================
   SETTINGS PAGE
   ================================================================ */
.settings-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}

.settings-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
}
.settings-card-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.settings-icon {
  width: 44px; height: 44px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; flex-shrink: 0;
}
.settings-card-header h3 { font-size: 15px; font-weight: 700; }

.settings-field { margin-bottom: 16px; }
.settings-field label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; display: block; }
.settings-value { font-size: 14px; font-weight: 500; color: var(--text-main); }
.settings-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

.cname-row { display: flex; align-items: center; gap: 10px; }
.cname-status {}

.subscription-info { display: flex; flex-direction: column; gap: 12px; }
.sub-plan-name {
  font-size: 22px; font-weight: 800;
  background: var(--grad-warm); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.sub-status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
}
.sub-status-badge.active { background: var(--success-soft); color: var(--success); }
.sub-status-badge.trial  { background: var(--warning-soft); color: var(--yellow); }
.sub-status-badge.suspended { background: rgba(44,116,179,0.15); color: var(--pink); }

.sub-limits { display: flex; gap: 16px; }
.sub-limit {
  flex: 1; padding: 12px; border-radius: var(--r-sm);
  background: var(--bg-card-2); border: 1px solid var(--border);
  text-align: center;
}
.sub-limit-val { font-size: 18px; font-weight: 700; }
.sub-limit-key { font-size: 11px; color: var(--text-muted); }

/* ================================================================
   MODAL
   ================================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  overflow-y: auto;
  animation: fadeIn 0.2s ease;
}
.modal-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--r-xl); width: 100%; max-width: 460px;
  box-shadow: var(--shadow-lg);
  animation: modalSlide 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}
@keyframes modalSlide {
  from { opacity:0; transform:scale(0.95) translateY(20px); }
  to   { opacity:1; transform:scale(1) translateY(0); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--tr);
}
.modal-close:hover { background: rgba(44,116,179,0.15); color: var(--pink); }

.modal-body {
  padding: 24px;
  display: flex; gap: 20px; flex-direction: column; align-items: center;
}
.modal-qr-preview {
  background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 16px;
  display: flex; justify-content: center;
}
.modal-qr-info { width: 100%; }
.info-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  gap: 12px;
}
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 12px; color: var(--text-muted); font-weight: 500; flex-shrink: 0; }
.info-value { font-size: 13px; font-weight: 500; text-align: right; word-break: break-all; }
.info-value.long { font-size: 12px; color: var(--text-muted); }
.info-value.copyable {
  cursor: pointer; color: var(--purple);
  transition: color var(--tr);
}
.info-value.copyable:hover { color: var(--magenta); }

.modal-footer {
  display: flex; gap: 10px; padding: 16px 24px;
  border-top: 1px solid var(--border);
}
.modal-footer button { flex: 1; }

#qrDetailModal .modal-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 40px);
}
#qrDetailModal .modal-header,
#qrDetailModal .modal-footer {
  flex: 0 0 auto;
}
#qrDetailModal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#qrDetailModal .modal-qr-preview {
  flex: 0 0 auto;
  max-width: 100%;
}
#qrDetailModal .modal-qr-preview > div {
  max-width: min(240px, calc(100vw - 120px));
}
#qrDetailModal .modal-qr-preview canvas,
#qrDetailModal .modal-qr-preview img {
  max-width: 100%;
  height: auto !important;
  object-fit: contain;
}

@media (max-height: 720px) {
  #qrDetailModal .modal-body {
    gap: 14px;
    padding: 18px 24px;
  }
  #qrDetailModal .modal-qr-preview {
    padding: 12px;
  }
  #qrDetailModal .modal-qr-preview > div {
    max-width: min(200px, calc(100vw - 120px));
  }
  #qrDetailModal .modal-qr-preview canvas,
  #qrDetailModal .modal-qr-preview img {
    max-width: min(200px, calc(100vw - 120px));
  }
  #qrDetailModal .modal-header,
  #qrDetailModal .modal-footer {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

/* ================================================================
   TOAST NOTIFICATIONS
   ================================================================ */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 2000;
  display: flex; flex-direction: column; gap: 8px;
  align-items: flex-end;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--r-md); box-shadow: var(--shadow-md);
  font-size: 13px; font-weight: 500;
  min-width: 240px; max-width: 340px;
  animation: toastIn 0.3s cubic-bezier(0.4,0,0.2,1);
  border-left: 3px solid var(--purple);
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--pink); }
.toast.warning { border-left-color: var(--yellow); }
.toast i { font-size: 15px; }
.toast.success i { color: var(--success); }
.toast.error   i { color: var(--pink); }
.toast.warning i { color: var(--yellow); }
@keyframes toastIn {
  from { opacity:0; transform:translateX(40px); }
  to   { opacity:1; transform:translateX(0); }
}

.email-verification-notice {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 1900;
  display: flex;
  gap: 12px;
  width: min(380px, calc(100vw - 32px));
  padding: 16px;
  border-radius: 18px;
  background: rgba(22,22,31,0.94);
  border: 1px solid rgba(166,177,225,0.28);
  box-shadow: 0 18px 60px rgba(0,0,0,0.45), 0 0 34px var(--warning-soft);
  backdrop-filter: blur(14px);
  animation: toastIn 0.3s cubic-bezier(0.4,0,0.2,1);
}
.email-verification-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--grad-warm);
}
.email-verification-content { min-width: 0; }
.email-verification-content strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}
.email-verification-content p {
  margin: 5px 0 12px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.email-verification-content button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid rgba(166,177,225,0.34);
  border-radius: 10px;
  background: var(--warning-soft);
  color: var(--orange);
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.email-verification-content button:disabled {
  opacity: 0.7;
  cursor: wait;
}

@media (max-width: 640px) {
  .email-verification-notice {
    right: 16px;
    bottom: 82px;
  }
}

/* ================================================================
   SIDEBAR MOBILE OVERLAY
   ================================================================ */
.sidebar-overlay {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
}

/* ================================================================
   AUDIT USER MANAGEMENT
   ================================================================ */
.audit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
  margin-top: 20px;
  align-items: start;
}
.audit-role-card { width: 100%; }
.audit-role-card .form-group,
.audit-role-card > .btn-primary {
  max-width: 560px;
}
.audit-users-card { min-width: 0; }
.audit-users-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 15px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.audit-users-card .table-responsive {
  width: 100%;
  overflow-x: visible;
}
.audit-user-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}
.audit-user-table th:nth-child(1) { width: 10%; }
.audit-user-table th:nth-child(2) { width: 14%; }
.audit-user-table th:nth-child(3) { width: 12%; }
.audit-user-table th:nth-child(4) { width: 8%; }
.audit-user-table th:nth-child(5) { width: 8%; }
.audit-user-table th:nth-child(6) { width: 12%; }
.audit-user-table th:nth-child(7) { width: 15%; }
.audit-user-table th:nth-child(8) { width: 21%; }
.audit-user-table th,
.audit-user-table td {
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: normal;
}
.audit-user-table th {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: normal;
}
.audit-user-table tbody tr:last-child td { border-bottom: 0; }
.audit-role-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.audit-role-controls .form-control {
  flex: 1 1 110px;
  min-width: 0;
}
.audit-ban-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.audit-ban-status.active { color: var(--success); background: var(--success-soft); }
.audit-ban-status.temporary { color: var(--orange); background: var(--warning-soft); }
.audit-ban-status.permanent { color: var(--pink); background: rgba(44,116,179,0.12); }
.audit-mail-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.audit-mail-status.verified {
  color: var(--success);
  background: var(--success-soft);
}
.audit-mail-status.unverified {
  color: var(--warning);
  background: var(--warning-soft);
}
.audit-mail-action {
  margin-top: 7px;
}
.audit-mail-action .btn-secondary {
  height: 29px;
  padding: 0 9px;
  font-size: 10px;
}
.audit-action-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.audit-duration-controls,
.audit-action-buttons {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
.audit-duration-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 58px;
}
.audit-duration-field span {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 600;
}
.audit-duration-field input {
  width: 58px;
  height: 31px;
  padding: 4px 6px;
  text-align: center;
  font-size: 11px;
}
.audit-action-buttons .btn-danger,
.audit-action-buttons .btn-secondary {
  height: 31px;
  padding: 0 10px;
  font-size: 10px;
  white-space: nowrap;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .bottom-row { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .analytics-stats-row { grid-template-columns: 1fr; }
  .mini-charts-row { grid-template-columns: 1fr; }
  .audit-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .create-layout { grid-template-columns: 1fr; }
  .create-preview-panel { position: static; min-height: 0; }
  .create-preview-panel.is-scroll-fixed .create-preview-fixed-inner { position: static; width: 100%; }
  .profile-left-sticky { position: static !important; }
  .leaderboard-row {
    grid-template-columns: 48px 58px minmax(0, 1fr);
  }
  .leaderboard-scans {
    grid-column: 3;
    text-align: left;
  }
  .design-row { grid-template-columns: 1fr; }
  .audit-users-card { padding: 18px !important; }
  .audit-user-table,
  .audit-user-table tbody,
  .audit-user-table tr,
  .audit-user-table td {
    display: block;
    width: 100%;
  }
  .audit-user-table thead { display: none; }
  .audit-user-table tbody tr {
    padding: 4px 14px;
    margin-bottom: 14px;
    background: rgba(255,255,255,0.015);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
  }
  .audit-user-table tbody tr:last-child { margin-bottom: 0; }
  .audit-user-table td {
    display: grid;
    grid-template-columns: minmax(115px, 145px) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 12px 0;
  }
  .audit-user-table td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
  }
  .audit-user-table td:last-child { border-bottom: 0; }
  .audit-user-table td.audit-empty-row {
    display: block;
    border-bottom: 0;
  }
  .audit-user-table td.audit-empty-row::before { content: none; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .topbar { display: flex; }
  .page-content {
    margin-left: 0; padding: 80px 16px 24px;
  }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-title { font-size: 22px; }
  .auth-card { padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .solution-grid { grid-template-columns: repeat(3, 1fr); }
  .modal-card { max-width: 100%; border-radius: var(--r-lg); }
  .sub-limits { flex-direction: column; }
  .audit-users-header { align-items: flex-start; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-pills { justify-content: center; }
  .qr-grid { grid-template-columns: 1fr 1fr; }
  .type-grid { grid-template-columns: 1fr 1fr; }
  .solution-grid { grid-template-columns: repeat(3, 1fr); }
  .audit-role-card,
  .audit-users-card { padding: 16px !important; }
  .audit-users-header { flex-direction: column; }
  .audit-users-header .btn-secondary { width: 100%; }
  .audit-user-table td {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* ---------- CUSTOM SELECT DROPDOWN ---------- */
.custom-select-wrapper {
  position: relative;
  width: 100%;
  user-select: none;
}

.custom-select-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 10px 14px;
  background: rgba(10, 38, 71, 0.36);
  color: var(--text-main, #F4EEFF);
  border: 1px solid rgba(166,216,255,0.18);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-select-trigger:hover {
  border-color: rgba(166,216,255,0.36);
}

.custom-select-wrapper.open .custom-select-trigger {
  border-color: var(--purple, var(--c2));
  box-shadow: 0 0 0 3px rgba(166,216,255,0.12);
}

.custom-select-trigger i {
  font-size: 11px;
  color: var(--text-muted, #94A3B8);
  transition: transform 0.2s ease;
}

.custom-select-wrapper.open .custom-select-trigger i {
  transform: rotate(180deg);
}

.custom-options-container {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: #0E3057;
  border: 1px solid rgba(166,216,255,0.2);
  border-radius: 8px;
  box-shadow: var(--shadow-lg, 0 20px 60px rgba(0,0,0,0.5));
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  max-height: 160px;
  overflow-y: auto;
  padding: 6px;
}

.custom-select-wrapper.open .custom-options-container {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-option {
  padding: 8px 12px;
  color: var(--text-main, #F4EEFF);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-option:hover {
  background: rgba(166,216,255,0.14);
  color: #fff;
  padding-left: 16px;
}

.custom-option.selected {
  background: var(--purple, var(--c2));
  color: #061E36;
  font-weight: 800;
}

[data-theme="light"] .custom-select-trigger {
  background: rgba(255,255,255,0.58);
  border-color: rgba(66,72,116,0.18);
}
[data-theme="light"] .custom-options-container {
  background: #F4EEFF;
  border-color: rgba(66,72,116,0.18);
}
[data-theme="light"] .custom-option.selected {
  background: var(--primary);
  color: #fff;
}

/* ================================================================
   MOBILE RESPONSIVE HARDENING — no horizontal scroll
   ================================================================ */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

img,
canvas,
svg,
video,
iframe {
  max-width: 100%;
}

.main-app,
.page-content,
.page,
.chart-card,
.modal-card,
.landing-page {
  min-width: 0;
  max-width: 100%;
}

.auth-overlay .auth-card {
  max-width: 440px;
}

@media (max-width: 900px) {
  .page-content {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .page-header .btn-primary,
  .page-header .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .landing-nav,
  .landing-actions,
  .landing-proof,
  .toolbar,
  .filter-bar,
  .qr-toolbar,
  .audit-users-header {
    max-width: 100%;
    flex-wrap: wrap;
  }

  .landing-nav {
    padding-left: 16px;
    padding-right: 16px;
  }

  .landing-nav-links {
    display: none;
  }

  .landing-actions,
  .landing-proof {
    justify-content: center;
  }

  .landing-actions > *,
  .landing-proof > * {
    min-width: 0;
  }

  .landing-hero,
  .landing-feature-grid,
  .landing-plan-grid,
  .stats-grid,
  .charts-row,
  .bottom-row,
  .analytics-stats-row,
  .mini-charts-row,
  .settings-layout,
  .create-layout,
  .audit-layout,
  .design-row,
  #pricingGrid,
  #page-profile > div[style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #page-profile > div[style*="grid-template-columns"] {
    gap: 18px !important;
  }

  .profile-left-sticky {
    position: static !important;
    width: 100%;
  }

  .profile-preview-card,
  .profile-leaderboard-privacy-card,
  .profile-account-settings {
    width: 100%;
  }

  .qr-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)) !important;
  }

  .type-grid,
  .solution-grid,
  .visual-select-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .data-table {
    width: 100%;
    min-width: 0;
  }

  .modal-overlay {
    padding: 12px;
  }

  .modal-card {
    width: min(100%, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 24px);
  }

  .modal-body,
  .design-studio-layout {
    max-width: 100%;
  }

  .design-studio-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .studio-preview-pane {
    position: static !important;
  }

  .leaderboard-row {
    grid-template-columns: 44px 56px minmax(0, 1fr) !important;
    gap: 10px;
    padding: 12px;
  }

  .leaderboard-scans {
    grid-column: 3;
    text-align: left;
  }

  .leaderboard-profile-modal {
    width: min(360px, calc(100vw - 32px)) !important;
    max-width: calc(100vw - 32px) !important;
  }
}

@media (max-width: 600px) {
  .page-content {
    padding: 72px 12px 22px;
  }

  .page-title {
    font-size: 24px;
    line-height: 1.15;
  }

  .page-subtitle {
    font-size: 13px;
  }

  .auth-card {
    width: calc(100vw - 24px);
    max-width: 440px;
    padding: 24px 16px;
  }

  .landing-hero,
  .landing-section,
  .landing-final-cta {
    padding-left: 16px;
    padding-right: 16px;
  }

  .landing-hero h1 {
    font-size: clamp(34px, 12vw, 52px);
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .landing-showcase {
    transform: scale(0.82);
    transform-origin: top center;
    margin-bottom: -70px;
  }

  .stats-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .qr-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .qr-card,
  .chart-card,
  .settings-card,
  .profile-account-settings {
    border-radius: 16px;
  }

  .qr-card-actions,
  .qr-card-meta,
  .filter-pills {
    justify-content: center;
    flex-wrap: wrap;
  }

  .type-grid,
  .solution-grid,
  .visual-select-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .form-row,
  .bulk-result-stats,
  .leaderboard-profile-stats {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .leaderboard-row {
    grid-template-columns: 40px 52px minmax(0, 1fr) !important;
  }

  .leaderboard-scans strong {
    font-size: 18px;
  }

  .email-verification-notice {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: none;
  }
}

.custom-option.disabled:hover {
  background: transparent !important;
  color: var(--text-muted, #94A3B8) !important;
  padding-left: 12px !important;
}

/* ---------- DESIGN STUDIO ---------- */
@media (max-width: 600px) {
  .design-studio-layout {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
}

/* ---------- BULK SELECT FLOATING BAR & CHECKBOXES ---------- */
.bulk-actions-bar {
  opacity: 0;
  pointer-events: none;
}

.bulk-actions-bar.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) !important;
}

.qr-card-select-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: none;
}

.bulk-select-active .qr-card-select-overlay {
  display: block;
}

.qr-card-select-overlay input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--purple, var(--c2));
  cursor: pointer;
  border-radius: 4px;
}

.qr-card.bulk-selected {
  border-color: var(--purple, var(--c2)) !important;
  box-shadow: 0 0 0 2px rgba(44, 116, 179, 0.4) !important;
}

.qr-list-select-overlay {
  display: none;
  margin-right: 12px;
  align-items: center;
}

.bulk-select-active .qr-list-select-overlay {
  display: flex;
}

.qr-list-select-overlay input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--purple, var(--c2));
  cursor: pointer;
}

/* Bold/Italic active state toggles in Design Studio */
#studioBtnBold.active, #studioBtnItalic.active {
  border-color: var(--purple, var(--c2)) !important;
  background: rgba(44, 116, 179, 0.15) !important;
  color: #fff !important;
}

/* Visual Select Grid Components */
.visual-select-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}
.visual-select-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
  margin-bottom: 18px;
}
.visual-select-card {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  border: 2px solid var(--border-color);
  background: var(--bg-card-2, var(--bg-card-2));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  user-select: none;
}
.visual-select-card:hover {
  border-color: var(--purple, var(--c2));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 116, 179, 0.15);
}
.visual-select-card.active {
  border-color: var(--purple, var(--c2));
  background: rgba(44, 116, 179, 0.12);
  box-shadow: 0 0 0 2px rgba(44, 116, 179, 0.25);
}
.visual-select-card.active i, .visual-select-card.active svg path, .visual-select-card.active svg rect {
  color: var(--purple, var(--c2)) !important;
  fill: var(--purple, var(--c2)) !important;
}
.visual-select-card i {
  font-size: 26px;
  color: var(--text-muted, #94A3B8);
  transition: color 0.2s;
}
.visual-select-card svg {
  width: 32px;
  height: 32px;
  transition: all 0.2s;
}
.visual-select-card svg [fill="#94A3B8"] {
  fill: var(--text-muted) !important;
}
.visual-select-card svg [stroke="#94A3B8"] {
  stroke: var(--text-muted) !important;
}
.simulator-opt-btn i[style*="#2C74B3"],
[style*="color:#2C74B3"] {
  color: var(--purple) !important;
}
.visual-select-card span {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted, #94A3B8);
  text-align: center;
  margin-top: 6px;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 90%;
  overflow: hidden;
}
.visual-select-card.active span {
  color: var(--text-main, #ffffff);
}
.visual-select-card .card-check {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 10px;
  color: var(--purple, var(--c2));
  display: none;
}
.visual-select-card.active .card-check {
  display: block;
}

/* Profile frames */
.frame-none { border: none !important; }
.frame-basic-gold { border: 3.5px solid var(--primary) !important; box-shadow: 0 0 10px rgba(166,177,225,0.45); }
.frame-basic-silver { border: 3.5px solid #b0bec5 !important; box-shadow: 0 0 10px rgba(176,190,197,0.5); }
.frame-neon-gradient { border: 3.5px solid transparent !important; background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box, var(--grad-main) border-box !important; box-shadow: 0 0 15px var(--pink); }
.frame-rainbow-rotate {
  position: relative;
  border: none !important;
  background: var(--bg-card) !important;
}

.frame-rainbow-rotate img {
  position: relative;
  z-index: 2;
}

.frame-rainbow-rotate::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  border: 3.5px solid transparent;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box, var(--grad-full) border-box !important;
  pointer-events: none;
  animation: borderRotate 4s linear infinite;
}

@media (min-width: 601px) {
  #page-profile .profile-left-sticky {
    position: relative !important;
    top: auto;
    align-self: flex-start;
  }
}

@media (max-width: 600px) {
  #page-profile .profile-left-sticky {
    position: static !important;
  }
}

@media (max-width: 640px) {
  .landing-page {
    padding-top: 74px;
  }

  .landing-nav {
    width: calc(100% - 20px);
    padding: 14px 14px;
    border-radius: 0 0 18px 18px;
  }

  .landing-up-button {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }

  .landing-feature-detail-overlay {
    display: none;
  }
}

@media (min-width: 601px) {
  #page-profile .profile-layout-grid > .profile-left-sticky {
    position: relative !important;
    top: auto !important;
    align-self: start !important;
    transform: none !important;
  }
  #page-profile .profile-layout-grid > .profile-left-sticky.is-scroll-fixed .profile-left-fixed-inner {
    position: fixed !important;
    top: 20px !important;
  }
}

@media (max-width: 760px) {
  .landing-feature-detail-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .feature-detail-visual {
    min-height: 190px;
  }
}

@keyframes borderRotate {
  100% { filter: hue-rotate(360deg); }
}

/* Simulator Styles */
.simulator-opt-btn:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--primary) !important;
}
#simulatorPill:hover {
  background: rgba(28, 28, 39, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 15px rgba(44, 116, 179, 0.15) !important;
}

.premium-link {
  transition: var(--tr);
}
.premium-link:hover {
  color: var(--primary) !important;
  opacity: 0.8;
  transform: scale(1.02);
}


/* Visual frame thumbnail icon box */
.frame-thumb-box {
  width: 32px;
  height: 38px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 16px;
}


/* Custom Range Slider Styling */
.custom-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  outline: none;
  cursor: pointer;
  transition: var(--tr);
}

.custom-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.custom-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}

.custom-range-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

[data-theme="light"] .discount-plan:hover .discount-badge,
[data-theme="light"] .app-subscription-card:hover .discount-badge {
  background: #FFC700 !important;
  color: #0F172A !important;
  border-color: #FFD700 !important;
}


/* ================================================================
   TOP NAVBAR (Desktop & Tablet: > 768px)
   ================================================================ */
@media (min-width: 769px) {
  .main-app {
    flex-direction: column;
    min-height: 100vh;
  }

  .sidebar {
    width: 100%;
    height: 60px;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    z-index: 1000;
    gap: 0;
  }

  .sidebar-header {
    border-bottom: none;
    padding: 0;
    min-height: auto;
    margin-right: 20px;
    flex-shrink: 0;
  }

  .sidebar-nav {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    padding: 0;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    min-width: 0;
    height: 100%;
  }
  .sidebar-nav::-webkit-scrollbar { display: none; }

  .nav-item {
    width: auto;
    padding: 7px 11px;
    font-size: 13px;
    white-space: nowrap;
    border-radius: var(--r-sm);
    gap: 7px;
    flex-shrink: 0;
    height: 36px;
    display: inline-flex;
    align-items: center;
  }
  .nav-item span { font-size: 12.5px; }

  .nav-item.active::before {
    left: 50%;
    top: auto;
    bottom: -2px;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    border-radius: 3px 3px 0 0;
  }

  /* Hide old sidebar-bottom on desktop */
  .sidebar-bottom { display: none !important; }

  .page-content {
    margin-left: 0;
    padding: 28px 36px;
    width: 100%;
  }

  .topbar { display: none !important; }

  /* ---------- NAVBAR USER AREA (right side) ---------- */
  .navbar-user-area {
    position: relative;
    flex-shrink: 0;
    margin-left: 16px;
  }

  .navbar-avatar-btn {
    background: none;
    border: 2px solid transparent;
    border-radius: 50%;
    padding: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .navbar-avatar-btn:hover {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(118,56,250,0.15);
  }
  .navbar-avatar-btn .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 13px;
    cursor: pointer;
  }

  /* ---------- DROPDOWN CARD ---------- */
  .navbar-user-dropdown {
    position: fixed;
    top: 68px;
    right: 16px;
    width: 240px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.28), 0 4px 12px rgba(0,0,0,0.14);
    z-index: 9999;
    padding: 8px;
    animation: nudFadeIn 0.18s ease;
    backdrop-filter: blur(12px);
  }
  .navbar-user-dropdown.hidden { display: none; }

  @keyframes nudFadeIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }

  .nud-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 12px;
  }
  .nud-avatar {
    width: 40px;
    height: 40px;
    font-size: 15px;
    flex-shrink: 0;
  }
  .nud-info { min-width: 0; }
  .nud-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nud-role {
    display: block;
    font-size: 11px;
    color: var(--purple);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
  }

  .nud-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
  }

  .nud-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: none;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 9px;
    text-align: left;
    transition: background 0.15s, color 0.15s;
  }
  .nud-item:hover {
    background: rgba(255,255,255,0.07);
    color: var(--text-main);
  }
  .nud-item i { width: 16px; text-align: center; font-size: 13px; }

  .nud-theme {
    justify-content: space-between;
  }
  .nud-theme > span { flex: 1; }
  .nud-theme-toggle-pill {
    width: 34px;
    height: 18px;
    background: rgba(255,255,255,0.12);
    border-radius: 9px;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
  }
  .nud-theme-toggle-knob {
    width: 14px;
    height: 14px;
    background: var(--text-muted);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s, background 0.2s;
  }
  [data-theme="light"] .nud-theme-toggle-pill { background: rgba(118,56,250,0.2); }
  [data-theme="light"] .nud-theme-toggle-knob { background: var(--purple); transform: translateX(16px); }

  .nud-logout { color: var(--pink); }
  .nud-logout:hover { background: rgba(255,0,105,0.08); color: var(--pink); }
}


/* OnyQR — Navbar logo image */
.navbar-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(27,58,92,0.25));
}
@media (min-width: 769px) {
  .navbar-logo-img { width: 30px; height: 30px; }
}
