/* Custom Select Display & Animation when open/active */
.cs-select-wrap.open .cs-select-menu,
.cs-select-wrap.active .cs-select-menu,
.cs-select-menu.active {
  display: flex !important;
  animation: csSelectPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  z-index: 10050 !important;
}

/* ==========================================================================
   🛡️ VETODRAFT — EXECUTIVE ENTERPRISE TYPOGRAPHY & SMOOTH MICRO-ANIMATIONS
   Spacious Modal • Sleek Minimal Vector Icons • Fluid Interactive Animations
   100% Flawless Mobile & Desktop Responsive • Tapered Gradient Accents
   ========================================================================== */

/* ==========================================================================
   ⚡ ZERO JITTER / ZERO LAYOUT SHIFT ENGINE
   ========================================================================== */

/* --------------------------------------------------------------------------
   DARK THEME (DEEP OBSIDIAN & ELECTRIC GRADIENT)
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  --bg-base: #07090e;
  --bg-surface: #0f141f;
  --bg-surface-hover: #161e2e;
  
  --glass-surface: rgba(15, 20, 31, 0.65);
  --glass-surface-hover: rgba(22, 30, 46, 0.85);
  --glass-navbar: rgba(15, 20, 31, 0.72);
  --glass-navbar-scrolled: rgba(10, 14, 24, 0.86);

  --veil-gradient: linear-gradient(to bottom, rgba(7, 9, 14, 0.96) 0%, rgba(7, 9, 14, 0.7) 55%, rgba(7, 9, 14, 0) 100%);

  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-scrolled: rgba(255, 255, 255, 0.22);
  --glass-inner-rim: inset 0 1px 1px 0 rgba(255, 255, 255, 0.35);
  
  --glass-drop-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.6), 
                       0 20px 48px -8px rgba(0, 0, 0, 0.8), 
                       0 36px 70px -12px rgba(0, 0, 0, 0.9);
                       
  --glass-drop-shadow-scrolled: 0 12px 28px -4px rgba(0, 0, 0, 0.7), 
                                0 25px 60px -8px rgba(0, 0, 0, 0.9), 
                                0 45px 90px -14px rgba(0, 0, 0, 0.95);

  --text-pure: #f5f5f7;
  --text-main: #f5f5f7;
  --text-muted: #86868b;
  --text-dim: #6e6e73;

  --gradient-text: linear-gradient(135deg, #60a5fa 0%, #818cf8 50%, #c084fc 100%);
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  --gradient-glow: rgba(99, 102, 241, 0.35);

  --badge-bg: rgba(15, 23, 42, 0.75);
  --badge-border: rgba(99, 102, 241, 0.4);
  --badge-text: #93c5fd;

  --logo-text-veto: #ffffff;
  --logo-text-draft: #818cf8;
  --logo-paper-stroke: #cbd5e1;
  --logo-line-stroke: #64748b;
  --logo-shield-stroke: #60a5fa;
  --logo-shield-fill: #07090e;

  /* Scanner Box Variables */
  --scanner-bg: rgba(15, 20, 31, 0.7);
  --scanner-border: rgba(255, 255, 255, 0.12);
  --dropzone-bg: rgba(255, 255, 255, 0.025);
  --dropzone-border: rgba(99, 102, 241, 0.35);
  --dropzone-hover-bg: rgba(99, 102, 241, 0.08);
  --dropzone-hover-border: #818cf8;
  --chip-bg: rgba(255, 255, 255, 0.04);
  --chip-border: rgba(255, 255, 255, 0.1);
  --chip-hover-bg: rgba(99, 102, 241, 0.12);

  /* Modal Variables */
  --modal-bg: rgba(13, 17, 27, 0.96);
  --modal-input-bg: rgba(255, 255, 255, 0.05);
  --modal-input-border: rgba(255, 255, 255, 0.14);
  --modal-input-focus: #818cf8;

  /* Dropdown Variables */
  --dropdown-bg: #0d121f;
  --dropdown-border: #1e293b;
  --dropdown-hover: #172033;

  /* Divider Gradients */
  --divider-vertical: linear-gradient(to bottom, rgba(99, 102, 241, 0) 0%, rgba(129, 140, 248, 0.8) 50%, rgba(99, 102, 241, 0) 100%);
  --divider-horizontal-left: linear-gradient(to right, transparent 0%, rgba(99, 102, 241, 0.5) 100%);
  --divider-horizontal-right: linear-gradient(to left, transparent 0%, rgba(99, 102, 241, 0.5) 100%);

  /* Border Radius Tokens */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-2xl: 36px;
  --radius-pill: 9999px;
}

/* --------------------------------------------------------------------------
   LIGHT THEME (WARM CREAM & MATCHED INDIGO)
   -------------------------------------------------------------------------- */
:root, [data-theme="light"] {
  --bg-base: #f5f0e6;
  --bg-surface: #ffffff;
  --bg-surface-hover: #fcfbfa;

  --glass-surface: rgba(255, 255, 255, 0.55);
  --glass-surface-hover: rgba(255, 255, 255, 0.75);
  --glass-navbar: rgba(255, 255, 255, 0.72);
  --glass-navbar-scrolled: rgba(255, 255, 255, 0.86);

  --veil-gradient: linear-gradient(to bottom, rgba(245, 240, 230, 0.96) 0%, rgba(245, 240, 230, 0.75) 55%, rgba(245, 240, 230, 0) 100%);

  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-border-scrolled: rgba(0, 0, 0, 0.15);
  --glass-inner-rim: inset 0 1.5px 1px 0 #ffffff;
  
  --glass-drop-shadow: 0 10px 28px -4px rgba(44, 38, 28, 0.12), 
                       0 20px 48px -8px rgba(44, 38, 28, 0.15);
                       
  --glass-drop-shadow-scrolled: 0 14px 32px -4px rgba(44, 38, 28, 0.15), 
                                0 28px 65px -8px rgba(44, 38, 28, 0.2);

  --text-pure: #1d1d1f;
  --text-main: #1d1d1f;
  --text-muted: #86868b;
  --text-dim: #a1a1a6;

  --gradient-text: linear-gradient(135deg, #2563eb 0%, #4f46e5 60%, #7c3aed 100%);
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  --gradient-glow: rgba(37, 99, 235, 0.25);

  --badge-bg: rgba(255, 255, 255, 0.8);
  --badge-border: rgba(37, 99, 235, 0.3);
  --badge-text: #2563eb;

  --logo-text-veto: #111827;
  --logo-text-draft: #4f46e5;
  --logo-paper-stroke: #374151;
  --logo-line-stroke: #9ca3af;
  --logo-shield-stroke: #2563eb;
  --logo-shield-fill: #ffffff;

  /* Scanner Box Variables (Light) */
  --scanner-bg: rgba(255, 255, 255, 0.7);
  --scanner-border: rgba(0, 0, 0, 0.08);
  --dropzone-bg: rgba(255, 255, 255, 0.6);
  --dropzone-border: rgba(79, 70, 229, 0.3);
  --dropzone-hover-bg: rgba(79, 70, 229, 0.05);
  --dropzone-hover-border: #4f46e5;
  --chip-bg: rgba(255, 255, 255, 0.85);
  --chip-border: rgba(0, 0, 0, 0.08);
  --chip-hover-bg: rgba(79, 70, 229, 0.08);

  --modal-bg: rgba(255, 255, 255, 0.98);
  --modal-input-bg: rgba(0, 0, 0, 0.03);
  --modal-input-border: rgba(0, 0, 0, 0.12);
  --modal-input-focus: #4f46e5;

  --dropdown-bg: #ffffff;
  --dropdown-border: #e2e8f0;
  --dropdown-hover: #f1f5f9;

  --divider-vertical: linear-gradient(to bottom, rgba(79, 70, 229, 0) 0%, rgba(79, 70, 229, 0.7) 50%, rgba(79, 70, 229, 0) 100%);
  --divider-horizontal-left: linear-gradient(to right, transparent 0%, rgba(79, 70, 229, 0.4) 100%);
  --divider-horizontal-right: linear-gradient(to left, transparent 0%, rgba(79, 70, 229, 0.4) 100%);
}

:root {
  --font-display: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-base: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  
  --transition-clean: background 0.35s cubic-bezier(0.25, 0.1, 0.25, 1), border-color 0.35s cubic-bezier(0.25, 0.1, 0.25, 1), color 0.3s ease, box-shadow 0.35s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.3s ease;
  --transition-spring: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.3s ease, box-shadow 0.35s ease;
  --transition-theme: none;
}

/* ==========================================================================
   ✨ GLOBAL SMOOTH PERFORMANCE ENGINE (ZERO-JITTER, SMOOTH SCROLL, 60FPS)
   ========================================================================== */
html {
  scrollbar-gutter: stable;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Slim Smooth Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 9999px;
  border: 1.5px solid transparent;
  background-clip: content-box;
  transition: background 0.15s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
  border: 1.5px solid transparent;
  background-clip: content-box;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.28);
  border: 1.5px solid transparent;
  background-clip: content-box;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.55);
  border: 1.5px solid transparent;
  background-clip: content-box;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Instant Zero-Layout-Shift Auth States */
html.is-auth-ready #btn-open-login,
html.is-auth-ready #btn-open-signup {
  display: none !important;
}

html.is-auth-ready #user-dropdown-container {
  display: inline-flex !important;
}

html:not(.is-auth-ready) #user-dropdown-container {
  display: none !important;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   TOP SCROLL DISSOLVE VEIL (SMOOTH, FEATHERED GRADIENT DISSOLVE)
   ========================================================================== */
.top-scroll-fade-veil {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 96px;
  background: linear-gradient(to bottom, var(--bg-base) 0%, rgba(7, 9, 14, 0.75) 45%, rgba(7, 9, 14, 0) 100%);
  pointer-events: none;
  z-index: 950;
  transition: opacity 0.3s ease;
}

[data-theme="light"] .top-scroll-fade-veil {
  background: linear-gradient(to bottom, #f5f0e6 0%, rgba(245, 240, 230, 0.85) 55%, rgba(245, 240, 230, 0) 100%);
}

/* ==========================================================================
   FLOATING FROSTED GLASS NAVBAR (ROCK-SOLID STABILITY ON PC & MOBILE)
   ========================================================================== */
.header-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 16px 20px 20px 20px;
}

.header-wrapper.scrolled {
  background: linear-gradient(to bottom, rgba(7, 9, 14, 0.85) 0%, rgba(7, 9, 14, 0.5) 65%, rgba(7, 9, 14, 0) 100%);
}

[data-theme="light"] .header-wrapper.scrolled {
  background: linear-gradient(to bottom, rgba(245, 240, 230, 0.94) 0%, rgba(245, 240, 230, 0.7) 65%, rgba(245, 240, 230, 0) 100%);
}

.floating-navbar {
  background: var(--glass-navbar);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  padding: 0 18px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--glass-inner-rim), var(--glass-drop-shadow);
  position: relative;
}

/* On scroll: ONLY surface and lighting change, ZERO height/padding jumps */
.header-wrapper.scrolled .floating-navbar {
  background: var(--glass-navbar-scrolled);
  border-color: var(--glass-border-scrolled);
  box-shadow: var(--glass-inner-rim), var(--glass-drop-shadow-scrolled);
}

/* 1. Duo-Tone Logo Anchor */
.brand-anchor {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  height: 100%;
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.brand-anchor:focus,
.brand-anchor:active,
.brand-anchor:focus-visible {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

.brand-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-clean);
}

.brand-anchor:hover .brand-logo-icon svg {
  transform: scale(1.05);
}

.logo-paper {
  stroke: var(--logo-paper-stroke);
}

.logo-line {
  stroke: var(--logo-line-stroke);
}

.logo-shield {
  fill: var(--logo-shield-fill);
  stroke: var(--logo-shield-stroke);
}

.logo-check {
  stroke: var(--logo-shield-stroke);
}

/* Sharp Brand Typography */
.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title-text {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.035em;
  display: flex;
  align-items: center;
  line-height: 1;
}

.brand-veto {
  color: var(--logo-text-veto);
  font-weight: 800;
}

.brand-draft {
  color: var(--logo-text-draft);
  font-weight: 800;
  margin-left: 0.5px;
}

/* Elegant Inline Faded Tagline Typography (Desktop Only) */
.brand-tagline-divider {
  color: var(--text-dim);
  opacity: 0.4;
  font-weight: 300;
  font-size: 13px;
  user-select: none;
  margin-left: 2px;
}

.brand-tagline-text {
  font-family: var(--font-base);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.015em;
  white-space: nowrap;
  opacity: 0.75;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.brand-anchor:hover .brand-tagline-text {
  color: var(--text-pure);
  opacity: 1;
}

[data-theme="light"] .brand-tagline-text {
  color: #64748b;
  opacity: 0.85;
}

[data-theme="light"] .brand-anchor:hover .brand-tagline-text {
  color: #1e293b;
  opacity: 1;
}

/* On Mobile & Tablet (≤ 860px): Hide Tagline completely so logo is clean and exact as before */
@media (max-width: 860px) {
  .brand-tagline-divider,
  .brand-tagline-text {
    display: none !important;
  }

  .brand-title-wrap {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0 !important;
  }

  .brand-title-text {
    font-size: 16.5px;
  }
}

/* 2. Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
  height: 100%;
}

/* Modern High-Visibility Tactile Theme Switcher with Hover Icon Motion */
/* Clean, Unboxed Plain Icon Theme Toggle (No Box, No Border) - Normal Monochrome & Perfect Alignment */
.theme-toggle-unboxed {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: 32px !important;
  height: 32px !important;
  position: relative !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  outline: none !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  border-radius: 8px !important;
  transition: background 0.18s ease, color 0.18s ease !important;
}

.theme-toggle-unboxed:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  transform: none !important;
}

[data-theme="light"] .theme-toggle-unboxed:hover {
  background: rgba(0, 0, 0, 0.06) !important;
  transform: none !important;
}

.theme-toggle-unboxed:active {
  transform: scale(0.95) !important;
}

.theme-icon-slot {
  width: 18px !important;
  height: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  pointer-events: none !important;
  transition: color 0.18s ease !important;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
}

.theme-icon-slot svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
}

/* Dark Mode: Clean Normal Monochrome Sun (No bright yellow, No glow) */
[data-theme="dark"] .theme-icon-sun {
  display: flex !important;
  color: #94a3b8 !important;
  filter: none !important;
}

[data-theme="dark"] .theme-icon-moon {
  display: none !important;
}

[data-theme="dark"] .theme-toggle-unboxed:hover .theme-icon-sun {
  color: #f1f5f9 !important;
  filter: none !important;
}

/* Light Mode: Clean Normal Monochrome Moon (No indigo, No glow) */
[data-theme="light"] .theme-icon-moon {
  display: flex !important;
  color: #64748b !important;
  filter: none !important;
}

[data-theme="light"] .theme-icon-sun {
  display: none !important;
}

[data-theme="light"] .theme-toggle-unboxed:hover .theme-icon-moon {
  color: #0f172a !important;
  filter: none !important;
}

.nav-divider {
  width: 1.5px;
  height: 22px;
  background: var(--divider-vertical);
  border-radius: var(--radius-pill);
  margin: 0 4px;
  flex-shrink: 0;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}

/* Language Dropdown */
.lang-dropdown-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.lang-toggle-btn {
  background: transparent;
  border: none;
  padding: 3px 6px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  transition: var(--transition-clean);
  outline: none;
  flex-shrink: 0;
}

.lang-toggle-btn:hover,
.lang-dropdown-container:hover .lang-toggle-btn {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .lang-toggle-btn:hover,
[data-theme="light"] .lang-dropdown-container:hover .lang-toggle-btn {
  background: rgba(0, 0, 0, 0.05);
}

.active-flag-icon-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.active-flag-icon-slot .lang-flag-badge {
  margin-right: 0;
}

.active-lang-code {
  font-family: var(--font-base);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 224px;
  background: var(--dropdown-bg);
  border: 1px solid var(--dropdown-border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 18px 40px -4px rgba(0, 0, 0, 0.85), 
              0 6px 16px rgba(0, 0, 0, 0.6);
  display: none;
  flex-direction: column;
  gap: 3px;
  z-index: 9999;
}

.lang-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
  background: transparent;
}

[data-theme="light"] .lang-dropdown-menu {
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.12), 
              0 4px 12px rgba(0, 0, 0, 0.05);
}

.lang-dropdown-menu.active {
  display: flex;
  animation: langDropdownPop 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes langDropdownPop {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.lang-menu-header {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 6px 8px 4px 8px;
}

.lang-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 10px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-clean);
}

.lang-option-item:hover {
  background: var(--dropdown-hover);
  color: var(--text-pure);
}

.lang-option-item.active {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.lang-flag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 16px;
  border-radius: 3.5px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  margin-right: 10px;
  flex-shrink: 0;
  background: #1e293b;
  transition: transform 0.2s ease;
}

[data-theme="light"] .lang-flag-badge {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  background: #e2e8f0;
}

.lang-option-item:hover .lang-flag-badge {
  transform: scale(1.08);
}

.flag-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lang-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.lang-name {
  font-size: 12.5px;
  font-weight: 600;
}

.lang-native {
  font-size: 10px;
  color: var(--text-dim);
}

.lang-check {
  display: none;
  color: #818cf8;
}

.lang-option-item.active .lang-check {
  display: block;
}



/* Buttons — Zero Load-Shift & Instant Fixed Bounds */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  line-height: 1;
  box-sizing: border-box;
  transform: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-ghost {
  background: transparent;
  color: var(--text-main);
  border-color: transparent;
  padding: 7px 14px;
}

.btn-ghost:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .btn-ghost:hover {
  background: rgba(0, 0, 0, 0.05);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--gradient-glow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 22px var(--gradient-glow);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-sm {
  padding: 7px 16px;
  font-size: 12.5px;
}

/* Mobile Hamburger Menu Button */
.mobile-hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 4px;
  color: var(--text-pure);
  outline: none;
  transition: var(--transition-clean);
  margin-left: 2px;
  flex-shrink: 0;
}

.mobile-hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hamburger-bar {
  width: 18px;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, width 0.2s ease;
}

.mobile-hamburger-btn.active .bar-top {
  transform: translateY(6px) rotate(45deg);
}

.mobile-hamburger-btn.active .bar-mid {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-hamburger-btn.active .bar-bot {
  transform: translateY(-6px) rotate(-45deg);
}

/* ==========================================================================
   MOBILE RIGHT-SIDE SWIPE DRAWER & BACKDROP OVERLAY
   ========================================================================== */
.mobile-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-offcanvas-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 84vw;
  height: 100vh;
  background: #0d121f;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.85);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  padding: 0;
}

[data-theme="light"] .mobile-offcanvas-drawer {
  background: #fdfbf7;
  border-left-color: rgba(0, 0, 0, 0.1);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18);
}

.mobile-offcanvas-drawer.active {
  transform: translateX(0);
}

.mobile-drawer-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  gap: 12px;
  min-height: 68px;
  box-sizing: border-box;
}

.mobile-drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.mobile-drawer-brand .brand-logo-icon {
  width: auto;
  height: auto;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-drawer-brand .brand-title-text {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  line-height: 1;
}

.mobile-drawer-brand .brand-veto {
  color: var(--logo-text-veto, #ffffff);
  font-weight: 700;
  background: none;
  -webkit-text-fill-color: initial;
  transition: color 0.4s ease;
}

.mobile-drawer-brand .brand-draft {
  color: var(--logo-text-draft, #818cf8);
  font-weight: 800;
  margin-left: 0.5px;
  transition: color 0.4s ease;
}

[data-theme="light"] .mobile-drawer-brand .brand-veto {
  color: var(--logo-text-veto, #111827);
}

[data-theme="light"] .mobile-drawer-brand .brand-draft {
  color: var(--logo-text-draft, #4f46e5);
}

/* Guest vs Logged-In Mobile Drawer Visibility */
body:not(.is-logged-in) .mobile-drawer-auth-only {
  display: none !important;
}

body.is-logged-in .mobile-drawer-auth-only {
  display: block;
}

body.is-logged-in a.mobile-drawer-auth-only,
body.is-logged-in button.mobile-drawer-auth-only {
  display: flex !important;
}

.mobile-drawer-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

[data-theme="light"] .mobile-drawer-close {
  background: rgba(0, 0, 0, 0.05);
}

.mobile-drawer-close:hover {
  color: var(--text-pure);
  transform: rotate(90deg) scale(1.1);
}

.mobile-drawer-body {
  padding: 16px 18px 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

/* User Identity at Drawer Top - Seamless / NO ENCLOSING BOX */
.mobile-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  flex: 1;
  min-width: 0;
}

[data-theme="light"] .mobile-user-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.mobile-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.mobile-user-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.mobile-user-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-pure);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.mobile-user-plan {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-primary, #6366f1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.mobile-auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-mobile-auth {
  width: 100%;
  height: 42px;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 12px;
  justify-content: center;
}

.mobile-drawer-section-title {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 4px 0 0 2px;
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 400;
  transition: var(--transition-clean);
}

.mobile-drawer-link:hover,
.mobile-drawer-link.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--brand-primary);
}

.mobile-drawer-link svg {
  color: var(--brand-primary);
  flex-shrink: 0;
}

.mobile-drawer-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 4px 0;
}

/* Logged-In User Profile Dropdown Container (Desktop PC) */
.user-dropdown-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.user-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  padding: 4px 10px 4px 5px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  outline: none;
  transition: var(--transition-clean);
}

.user-profile-pill:hover,
.user-dropdown-container:hover .user-profile-pill {
  background: var(--glass-surface-hover);
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.2);
}

.user-avatar {
  width: 26px;
  height: 26px;
  background: var(--gradient-primary);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-pure);
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chevron {
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.user-dropdown-container:hover .user-chevron,
.user-dropdown-menu.active ~ .user-profile-pill .user-chevron {
  transform: rotate(180deg);
  color: var(--text-pure);
}

/* Solid Floating User Account Dropdown Menu (Enlarged for Desktop) */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 310px;
  min-width: 310px;
  background: #0f141f;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 10px;
  display: none;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 9999;
}

[data-theme="light"] .user-dropdown-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 20px 48px rgba(44, 38, 28, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.user-dropdown-menu.active {
  display: flex;
  animation: userDropdownPop 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.user-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 6px;
}

[data-theme="light"] .user-menu-header {
  background: rgba(0, 0, 0, 0.04);
}

.user-menu-avatar {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.user-menu-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-menu-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-pure);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-email {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-plan-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #a5b4fc;
}

[data-theme="light"] .user-menu-plan-badge {
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
}

.plan-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  display: inline-block;
  flex-shrink: 0;
}

.user-menu-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 4px 0;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-main);
  text-decoration: none !important;
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.user-menu-item:hover {
  background: rgba(99, 102, 241, 0.09);
  color: var(--brand-primary);
  text-decoration: none !important;
}

[data-theme="dark"] .user-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.user-menu-item svg {
  color: var(--brand-primary);
  flex-shrink: 0;
}

.btn-menu-logout {
  color: #f87171 !important;
}

.btn-menu-logout svg {
  color: #f87171 !important;
}

.btn-menu-logout:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #ef4444 !important;
}

/* ==========================================================================
   STEP 2: HERO SECTION & DRAG-AND-DROP CONTRACT SCANNER CARD (COMPACT 1-SCREEN)
   ========================================================================== */
.hero-section {
  padding: 34px 0 16px 0;
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(129, 140, 248, 0.45);
  color: #f1f5f9;
  padding: 5px 15px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), 0 0 16px rgba(99, 102, 241, 0.2);
  transition: var(--transition-clean);
  cursor: default;
  position: relative;
  z-index: 2;
}

.hero-pill-badge:hover {
  border-color: rgba(129, 140, 248, 0.85);
  transform: translateY(-1.5px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

[data-theme="light"] .hero-pill-badge {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(99, 102, 241, 0.35);
  color: #1e293b;
  box-shadow: 0 4px 16px rgba(44, 38, 28, 0.12);
}

.badge-brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #818cf8;
}

.badge-brand-icon svg {
  width: 14px;
  height: 14px;
}

.badge-text-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
}

.badge-count-number {
  font-weight: 800;
  color: #60a5fa;
  letter-spacing: -0.02em;
  min-width: 44px;
  text-align: left;
  display: inline-block;
}

[data-theme="light"] .badge-count-number {
  color: #2563eb;
}

.badge-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a5b4fc;
  transition: transform 0.2s ease, color 0.2s ease;
  margin-left: 2px;
}

.hero-pill-badge:hover .badge-arrow {
  transform: translateX(2px);
  color: var(--text-pure);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--text-pure);
  margin-bottom: 8px;
}

.hero-title-fixed {
  font-weight: 800;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  font-weight: 800;
}

/* Fluid Animated Typewriter Caret */
.typing-cursor {
  display: inline-block;
  width: 2.5px;
  height: 0.88em;
  background: #818cf8;
  margin-left: 3px;
  vertical-align: -0.06em;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(129, 140, 248, 0.8);
  animation: cursorBlink 0.8s infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-subtitle {
  font-size: clamp(12.5px, 1.35vw, 14.5px);
  color: var(--text-muted);
  line-height: 1.48;
  max-width: 680px;
  margin: 0 auto 16px auto;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   STEP 2 (PART B): SCANNER WRAPPER & DRAG & DROP DROPZONE (COMPACT 1-SCREEN)
   ========================================================================== */
.scanner-wrapper {
  background: var(--scanner-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--scanner-border);
  border-radius: 28px;
  padding: 22px 24px;
  box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  text-align: left;
  transition: var(--transition-theme);
}

[data-theme="light"] .scanner-wrapper {
  box-shadow: 0 16px 40px -10px rgba(44, 38, 28, 0.15), inset 0 1px 1px #ffffff;
}

/* Dual Mode Tabs Bar Container */
.scanner-tabs-bar {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  margin-bottom: 16px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

[data-theme="light"] .scanner-tabs-bar {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}

/* Fluid Sliding Background Pill Glider */
.tab-pill-glider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  border-radius: var(--radius-pill);
  background: var(--gradient-primary, linear-gradient(135deg, #2563eb 0%, #4338ca 100%));
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  pointer-events: none;
  z-index: 1;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, width;
}

[data-theme="light"] .tab-pill-glider {
  background: linear-gradient(135deg, #2563eb 0%, #4338ca 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38);
}

.scanner-tab-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: transparent !important;
  border: none !important;
  color: var(--text-muted, #64748b);
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  box-shadow: none !important;
  transition: color 0.25s ease;
  white-space: nowrap;
}

[data-theme="light"] .scanner-tab-btn {
  color: #475569;
}

.scanner-tab-btn:hover {
  color: var(--text-pure, #0f172a);
}

[data-theme="light"] .scanner-tab-btn:hover {
  color: #0f172a;
}

.scanner-tab-btn.active {
  color: #ffffff !important;
}

[data-theme="light"] .scanner-tab-btn.active {
  color: #ffffff !important;
}

.tab-icon {
  flex-shrink: 0;
}

/* Clean Scanner Panes Viewport & Track */
.scanner-panes-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
  border-radius: 20px;
  padding: 4px 0;
  margin: 0;
}

.scanner-panes-track {
  display: block;
  width: 100%;
  position: relative;
}

.scanner-tab-pane {
  display: none !important;
  width: 100% !important;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-sizing: border-box;
}

.scanner-tab-pane.active {
  display: block !important;
  opacity: 1;
  transform: translateY(0);
}

/* Interactive Dropzone Box */
.dropzone-box {
  position: relative;
  border: 2px dashed var(--dropzone-border);
  background: var(--dropzone-bg);
  border-radius: 20px;
  padding: 18px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-clean);
  overflow: hidden;
  box-sizing: border-box;
}

.dropzone-box:hover,
.dropzone-box.dragover {
  border-color: var(--dropzone-hover-border);
  background: var(--dropzone-hover-bg);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.22);
}

.dropzone-inner-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.dropzone-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dropzone-icon-circle svg {
  width: 22px;
  height: 22px;
}

.dropzone-box:hover .dropzone-icon-circle {
  transform: scale(1.1);
  color: #ffffff;
  background: var(--gradient-primary);
}

.dropzone-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-pure);
}

.dropzone-meta {
  font-size: 11px;
  color: var(--text-dim);
}

.dropzone-browse-link {
  color: #818cf8;
  text-decoration: underline;
  cursor: pointer;
}

.dropzone-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

/* Selected File Display Pill */
.selected-file-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 12px 18px;
  border-radius: 20px;
  margin-top: 6px;
  position: relative;
  z-index: 10;
}

.file-info-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-icon {
  color: #818cf8;
  flex-shrink: 0;
}

.file-details {
  display: flex;
  flex-direction: column;
}

.file-name-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-pure);
}

.file-size-text {
  font-size: 11px;
  color: var(--text-dim);
}

.btn-remove-file {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-clean);
}

.btn-remove-file:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Pastezone Box */
.pastezone-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pastezone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.pastezone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.pastezone-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-paste-clipboard {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #818cf8;
  padding: 4px 11px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-paste-clipboard:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #ffffff;
  border-color: #6366f1;
  transform: translateY(-1px);
}

.pastezone-textarea {
  width: 100%;
  background: var(--dropzone-bg);
  border: 1px solid var(--dropzone-border);
  border-radius: 18px;
  padding: 12px 16px;
  color: var(--text-pure);
  font-family: var(--font-base);
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  min-height: 108px;
  outline: none;
  transition: var(--transition-clean);
}

.pastezone-textarea:focus {
  border-color: var(--modal-input-focus);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.pastezone-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  padding: 0 4px;
}

.pastezone-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: #10b981;
  font-weight: 600;
}

.btn-clear-text {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  cursor: pointer;
  padding: 3px 6px;
}

.btn-clear-text:hover {
  color: #ef4444;
}

/* Scanner Action Bar */
.scanner-action-bar {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.btn-scan-submit {
  padding: 9px 24px;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
  border-radius: var(--radius-pill);
}

/* 1-Click Predatory Sample Chips */
.sample-chips-container {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}

.sample-chips-header {
  margin-bottom: 8px;
}

.sample-label-text {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.sample-chips-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

.sample-chip-btn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  padding: 13px 15px;
  border-radius: 16px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-clean);
  outline: none;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.sample-chip-btn:hover {
  background: var(--chip-hover-bg);
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.chip-risk-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  margin-top: 4px;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  animation: radarPulse 2s infinite;
}

.chip-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.chip-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-pure);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 860px) {
  .sample-chips-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ==========================================================================
   HIGH-TECH SCANNING RADAR MODAL OVERLAY
   ========================================================================== */
.scanning-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.scanning-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.scanning-modal-card {
  background: var(--modal-bg);
  border: 1px solid var(--dropzone-border);
  border-radius: 28px;
  padding: 38px 32px;
  width: 100%;
  max-width: 460px;
  text-align: center;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 40px rgba(99, 102, 241, 0.25);
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.scanning-modal-overlay.active .scanning-modal-card {
  transform: scale(1);
}

.scanning-radar-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanning-radar-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(99, 102, 241, 0.6);
  animation: radarPulse 2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

.scanning-radar-beam {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border-top: 3px solid #60a5fa;
  border-right: 3px solid transparent;
  animation: radarSpin 1.2s linear infinite;
}

@keyframes radarSpin {
  to { transform: rotate(360deg); }
}

@keyframes radarPulse {
  0% { transform: scale(0.7); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.scanning-radar-icon {
  position: relative;
  z-index: 2;
}

.scanning-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-pure);
  margin-bottom: 6px;
}

.scanning-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.scanning-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 20px;
}

.scanning-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  border-radius: var(--radius-pill);
  transition: width 0.3s ease;
}

.scanning-status-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.scan-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-dim);
  transition: color 0.3s ease;
}

.scan-step-item.active {
  color: #93c5fd;
  font-weight: 600;
}

.scan-step-item.completed {
  color: #86efac;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}


/* ==========================================================================
   RESULTS ACTIVE STATE: HIDE HERO & MARKETING CONTENT
   ========================================================================== */
body.is-viewing-results .hero-section,
html.is-viewing-results .hero-section,
body.is-viewing-results #scanner-wrapper,
body.is-viewing-results #scanner-guest-teaser,
body.is-viewing-results .scanner-guest-teaser,
body.is-viewing-results #marketing-landing-content,
html.is-viewing-results #marketing-landing-content,
body.is-viewing-results .marketing-landing-content,
body.is-viewing-results .trust-banner-section,
body.is-viewing-results .bottom-cta-section,
body.is-viewing-results .landing-section:not(.results-section) {
  display: none !important;
}

body.is-viewing-results #results-section,
html.is-viewing-results #results-section {
  display: block !important;
}

/* ==========================================================================
   STEP 3: RESULTS SECTION & CLAUSES FEED
   ========================================================================== */
.results-section {
  padding: 10px 0 60px 0;
  max-width: 920px;
  margin: 36px auto 0 auto;
  scroll-margin-top: 110px;
}

.risk-overview-banner {
  background: var(--scanner-bg);
  border: 1px solid var(--scanner-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .risk-overview-banner {
  background: #ffffff;
  border-color: rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.risk-meter-col {
  display: flex;
  align-items: center;
  gap: 20px;
}

.risk-score-badge {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  border: 3px solid #ef4444;
  color: #fca5a5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.risk-score-badge.score-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #fca5a5;
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.45);
}

.risk-score-badge.score-warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #fcd34d;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.45);
}

.risk-score-badge.score-safe {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #6ee7b7;
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.45);
}

[data-theme="light"] .risk-score-badge.score-danger,
[data-theme="light"] .risk-score-badge {
  background: #fef2f2;
  border: 3px solid #dc2626;
  color: #991b1b;
  box-shadow: 0 0 16px rgba(220, 38, 38, 0.18);
}

[data-theme="light"] .risk-score-badge.score-warning {
  background: #fffbeb;
  border-color: #d97706;
  color: #92400e;
  box-shadow: 0 0 16px rgba(217, 119, 6, 0.18);
}

[data-theme="light"] .risk-score-badge.score-safe {
  background: #ecfdf5;
  border-color: #059669;
  color: #065f46;
  box-shadow: 0 0 16px rgba(5, 150, 105, 0.18);
}

.score-number {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.score-max {
  font-size: 10px;
  opacity: 0.8;
}

.risk-verdict-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: #ef4444;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  transition: color 0.25s ease;
}

.risk-verdict-title.verdict-danger {
  color: #ef4444;
}

.risk-verdict-title.verdict-warning {
  color: #f59e0b;
}

.risk-verdict-title.verdict-safe {
  color: #10b981;
}

[data-theme="light"] .risk-verdict-title.verdict-danger,
[data-theme="light"] .risk-verdict-title {
  color: #b91c1c;
}

[data-theme="light"] .risk-verdict-title.verdict-warning {
  color: #b45309;
}

[data-theme="light"] .risk-verdict-title.verdict-safe {
  color: #047857;
}

.risk-verdict-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 380px;
  line-height: 1.45;
}

[data-theme="light"] .risk-verdict-desc {
  color: #475569;
}

.risk-stats-col {
  display: flex;
  gap: 20px;
}

.risk-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

[data-theme="light"] .stat-label {
  color: #64748b;
}

.stat-val {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.stat-val-danger { color: #f87171; }
.stat-val-warning { color: #fbbf24; }
.stat-val-safe { color: #34d399; }

[data-theme="light"] .stat-val-danger { color: #dc2626; }
[data-theme="light"] .stat-val-warning { color: #b45309; }
[data-theme="light"] .stat-val-safe { color: #047857; }

.results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* 📱 Mobile Results Toolbar: Organized Clean Grid (No Background Boxes) */
@media (max-width: 768px) {
  .results-toolbar {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    margin-bottom: 20px !important;
  }

  .toolbar-left {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .toolbar-left .btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 10px 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    border-radius: 10px !important;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: var(--text-pure, #ffffff) !important;
    box-shadow: none !important;
  }

  [data-theme="light"] .toolbar-left .btn {
    background: transparent !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #0f172a !important;
  }

  .toolbar-right {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .toolbar-right #btn-copy-counter,
  .toolbar-right #btn-export-docx {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 10px 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    border-radius: 10px !important;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: var(--text-pure, #ffffff) !important;
    box-shadow: none !important;
  }

  [data-theme="light"] .toolbar-right #btn-copy-counter,
  [data-theme="light"] .toolbar-right #btn-export-docx {
    background: transparent !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #0f172a !important;
  }

  .toolbar-right #btn-export-pdf {
    grid-column: span 2 !important;
    width: 100% !important;
    justify-content: center !important;
    padding: 12px 16px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px var(--gradient-glow) !important;
  }
}

/* Results Filter Bar & Tone Switcher */
.chip-svg-icon, .tone-svg-icon {
  flex-shrink: 0;
  display: inline-block;
}

.filter-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tone-option-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.clauses-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.clause-card {
  background: var(--scanner-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition-clean);
  position: relative;
}

[data-theme="light"] .clause-card {
  background: #ffffff;
  border-color: rgba(226, 232, 240, 0.9);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.clause-card.danger {
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-left: 4px solid #ef4444;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28), 0 0 25px rgba(239, 68, 68, 0.07);
}

.clause-card.warning {
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-left: 4px solid #f59e0b;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28), 0 0 25px rgba(245, 158, 11, 0.07);
}

.clause-card.safe {
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-left: 4px solid #10b981;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28), 0 0 25px rgba(16, 185, 129, 0.07);
}

[data-theme="light"] .clause-card.danger {
  background: #ffffff;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-left: 4px solid #dc2626;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .clause-card.warning {
  background: #ffffff;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-left: 4px solid #d97706;
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .clause-card.safe {
  background: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-left: 4px solid #059669;
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
}

.clause-card-header,
.clause-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.clause-card-title-group {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex: 1 1 auto;
}

.clause-index {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

[data-theme="light"] .clause-index {
  color: #64748b;
}

.clause-title {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-pure);
  line-height: 1.35;
}

[data-theme="light"] .clause-title {
  color: #0f172a;
}

/* ==========================================================================
   ✨ MODERN LUMINOUS METADATA BADGE (LINEAR / STRIPE STYLE)
   ========================================================================== */
.clause-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 11px;
  border-radius: 8px;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: var(--transition-clean);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

/* 🔴 Danger / Critical Trap */
.clause-badge.danger {
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.clause-badge.danger .badge-dot {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.9);
}

/* 🟡 Warning */
.clause-badge.warning {
  background: rgba(245, 158, 11, 0.08);
  color: #fde047;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.clause-badge.warning .badge-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.9);
}

/* 🟢 Safe */
.clause-badge.safe {
  background: rgba(16, 185, 129, 0.08);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.clause-badge.safe .badge-dot {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.9);
}

/* ☀️ Light Theme: Crisp Clean Elevated Micro-Card */
[data-theme="light"] .clause-badge {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(226, 232, 240, 0.9);
}

[data-theme="light"] .clause-badge.danger {
  color: #991b1b;
  border: 1px solid #fecaca;
}

[data-theme="light"] .clause-badge.danger .badge-dot {
  background: #dc2626;
  box-shadow: 0 0 6px rgba(220, 38, 38, 0.5);
}

[data-theme="light"] .clause-badge.warning {
  color: #92400e;
  border: 1px solid #fed7aa;
}

[data-theme="light"] .clause-badge.warning .badge-dot {
  background: #d97706;
  box-shadow: 0 0 6px rgba(217, 119, 6, 0.5);
}

[data-theme="light"] .clause-badge.safe {
  color: #065f46;
  border: 1px solid #a7f3d0;
}

[data-theme="light"] .clause-badge.safe .badge-dot {
  background: #059669;
  box-shadow: 0 0 6px rgba(5, 150, 105, 0.5);
}

/* 🎯 High-Contrast Predatory Excerpt Box (Fixes Visibility Issue) */
.clause-original {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-left: 4px solid #ef4444;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  margin-bottom: 14px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.predatory-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #f87171;
}

.predatory-quote {
  color: #fecaca;
  font-weight: 500;
  font-style: italic;
}

/* ☀️ Light Theme: Crisp High-Contrast Crimson & Burgundy */
[data-theme="light"] .clause-original {
  background: #fef2f2;
  border: 1px solid #fecdd3;
  border-left: 4px solid #dc2626;
  box-shadow: 0 3px 12px rgba(220, 38, 38, 0.05);
}

[data-theme="light"] .predatory-label {
  color: #991b1b;
}

[data-theme="light"] .predatory-quote {
  color: #7f1d1d;
  font-weight: 400;
}

.clause-explanation {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.55;
}

[data-theme="light"] .clause-explanation {
  color: #334155;
}

/* 🟢 Counter Box - Safe Protective Counter-Proposal (Emerald Green & Rounded 12px) */
.counter-box {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-left: 4px solid #10b981;
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

[data-theme="light"] .counter-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #059669;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.05);
}

.counter-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.counter-box-title-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6ee7b7;
  flex-wrap: wrap;
}

[data-theme="light"] .counter-box-title-group {
  color: #065f46;
}

.badge-edited-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  letter-spacing: 0.03em;
}

.badge-edited-chip::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.9);
  display: inline-block;
}

[data-theme="light"] .badge-edited-chip {
  color: #059669;
  background: transparent !important;
  border: none !important;
}

[data-theme="light"] .badge-edited-chip::before {
  background: #059669;
  box-shadow: 0 0 5px rgba(5, 150, 105, 0.7);
}

.counter-box-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-quick-reset-clause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  color: #ffffff !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  opacity: 0.85;
  transition: var(--transition-clean);
  transform: none !important;
}

.btn-quick-reset-clause svg {
  stroke: #ffffff !important;
}

.btn-quick-reset-clause:hover {
  background: transparent !important;
  color: #ffffff !important;
  opacity: 1;
  transform: scale(1.18) !important;
}

.btn-quick-reset-clause:hover svg {
  stroke: #ffffff !important;
}

[data-theme="light"] .btn-quick-reset-clause {
  background: transparent !important;
  border: none !important;
  color: #0f172a !important;
  opacity: 0.85;
}

[data-theme="light"] .btn-quick-reset-clause svg {
  stroke: #0f172a !important;
}

/* Safe Harbor Legal Disclaimer Notice Card */
.audit-safeharbor-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(99, 102, 241, 0.07);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 12px;
  padding: 12px 18px;
  margin: 16px 0 20px 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .audit-safeharbor-card {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.safeharbor-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.safeharbor-text {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.55;
}

.safeharbor-text strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-pure, #ffffff);
  margin-bottom: 3px;
}

[data-theme="light"] .safeharbor-text strong {
  color: #0f172a;
}

[data-theme="light"] .btn-quick-reset-clause:hover {
  color: #000000 !important;
  opacity: 1;
}

[data-theme="light"] .btn-quick-reset-clause:hover svg {
  stroke: #000000 !important;
}

/* Edit & Copy Action Buttons - Styled with exact same solid button box as Reset to Default */
.btn-edit-clause-counter,
.btn-copy-clause-counter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff !important;
  background: #1e293b;
  border: 1px solid #334155;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: var(--transition-clean);
}

.btn-edit-clause-counter svg,
.btn-copy-clause-counter svg {
  stroke: #ffffff !important;
  transition: var(--transition-clean);
}

.btn-edit-clause-counter:hover,
.btn-copy-clause-counter:hover {
  background: #334155;
  color: #ffffff !important;
  border-color: #475569;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.btn-edit-clause-counter:hover svg,
.btn-copy-clause-counter:hover svg {
  stroke: #ffffff !important;
}

[data-theme="light"] .btn-edit-clause-counter,
[data-theme="light"] .btn-copy-clause-counter {
  background: #ffffff;
  color: #1e293b !important;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .btn-edit-clause-counter svg,
[data-theme="light"] .btn-copy-clause-counter svg {
  stroke: #1e293b !important;
}

[data-theme="light"] .btn-edit-clause-counter:hover,
[data-theme="light"] .btn-copy-clause-counter:hover {
  background: #f8fafc;
  color: #0f172a !important;
  border-color: #94a3b8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

[data-theme="light"] .btn-edit-clause-counter:hover svg,
[data-theme="light"] .btn-copy-clause-counter:hover svg {
  stroke: #0f172a !important;
}

.counter-text {
  font-size: 13.5px;
  color: var(--text-pure);
  line-height: 1.6;
}

[data-theme="light"] .counter-text {
  color: #0f172a;
}

/* Inline Clause Editor Form */
.counter-edit-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
  animation: fadeInEdit 0.2s ease-out;
}

@keyframes fadeInEdit {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.counter-edit-textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-pure);
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
  min-height: 85px;
  outline: none;
  transition: var(--transition-clean);
}

.counter-edit-textarea:focus {
  border-color: #34d399;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  background: rgba(15, 23, 42, 0.9);
}

[data-theme="light"] .counter-edit-textarea {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #bbf7d0;
}

[data-theme="light"] .counter-edit-textarea:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.counter-edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.counter-edit-left {
  display: flex;
  align-items: center;
}

.counter-edit-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Solid Non-Glass Reset to Default Button */
.btn-reset-clause-default {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  background: #1e293b;
  border: 1px solid #334155;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: var(--transition-clean);
}

.btn-reset-clause-default:hover {
  background: #334155;
  color: #ffffff;
  border-color: #475569;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

[data-theme="light"] .btn-reset-clause-default {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .btn-reset-clause-default:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.btn-cancel-clause-edit {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border-subtle);
  padding: 7px 13px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-clean);
}

.btn-cancel-clause-edit:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-pure);
}

[data-theme="light"] .btn-cancel-clause-edit {
  color: #64748b;
  border-color: #cbd5e1;
}

[data-theme="light"] .btn-cancel-clause-edit:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-save-clause-edit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
  transition: var(--transition-clean);
}

.btn-save-clause-edit:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

[data-theme="light"] .diff-equal {
  color: #334155;
}

/* ==========================================================================
   RESULTS BOTTOM CTA CARD
   ========================================================================== */
.results-bottom-cta-card {
  margin-top: 32px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  flex-wrap: wrap;
}

[data-theme="light"] .results-bottom-cta-card {
  background: #ffffff;
  border-color: rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.bottom-cta-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bottom-cta-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-pure);
}

[data-theme="light"] .bottom-cta-title {
  color: #0f172a;
}

.bottom-cta-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
}

[data-theme="light"] .bottom-cta-subtitle {
  color: #64748b;
}

.bottom-active-tone-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.active-tone-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

[data-theme="light"] .active-tone-label {
  color: #64748b;
}

.active-tone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  transition: var(--transition-clean);
}

.active-tone-badge.tone-diplomatic {
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

.active-tone-badge.tone-friendly {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.active-tone-badge.tone-firm {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

[data-theme="light"] .active-tone-badge.tone-diplomatic {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

[data-theme="light"] .active-tone-badge.tone-friendly {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

[data-theme="light"] .active-tone-badge.tone-firm {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}

.bottom-cta-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-copy-counter-bottom {
  box-shadow: 0 4px 16px var(--gradient-glow);
}

/* 📱 Mobile Optimized Results Bottom CTA Card (No Heavy Boxes & No Giant Blue Bar) */
@media (max-width: 768px) {
  .results-bottom-cta-card {
    padding: 16px 14px !important;
    margin-top: 24px !important;
    border-radius: 14px !important;
    gap: 12px !important;
  }

  .bottom-cta-info {
    display: none !important; /* Hides top text & SELECTED TONE indicator bar on mobile */
  }

  .bottom-active-tone-indicator {
    display: none !important;
  }

  .bottom-cta-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  /* Copy Counter & Word (.docx) - Side-by-side without blue bar or box */
  .bottom-cta-actions .btn-copy-counter-bottom,
  .bottom-cta-actions #btn-export-docx-bottom {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 10px 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    border-radius: 10px !important;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: var(--text-pure, #ffffff) !important;
    box-shadow: none !important;
  }

  [data-theme="light"] .bottom-cta-actions .btn-copy-counter-bottom,
  [data-theme="light"] .bottom-cta-actions #btn-export-docx-bottom {
    background: transparent !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #0f172a !important;
  }

  /* Download PDF - Full width primary button below */
  .bottom-cta-actions #btn-export-pdf-bottom {
    grid-column: span 2 !important;
    width: 100% !important;
    justify-content: center !important;
    padding: 12px 16px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px var(--gradient-glow) !important;
  }

  /* Scan Another - Clean text button below */
  .bottom-cta-actions #btn-reanalyze-bottom {
    grid-column: span 2 !important;
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 9px 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    color: var(--text-muted, #94a3b8) !important;
    box-shadow: none !important;
  }

  [data-theme="light"] .bottom-cta-actions #btn-reanalyze-bottom {
    background: transparent !important;
    border-color: transparent !important;
    color: #64748b !important;
  }
}

/* ==========================================================================
   AUTH MODAL & FORMS
   ========================================================================== */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal-card {
  background: var(--modal-bg);
  border: 1px solid var(--glass-border);
  border-radius: 26px;
  padding: 26px 28px 22px 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 65px -12px rgba(0, 0, 0, 0.85), inset 0 1px 1px rgba(255, 255, 255, 0.12);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  position: relative;
  max-height: 94vh;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.auth-modal-card::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.auth-modal-overlay.active .auth-modal-card {
  transform: scale(1) translateY(0);
}

.auth-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-clean);
  z-index: 10;
  pointer-events: auto;
}

.auth-close-btn * { pointer-events: none; }

.auth-close-btn svg {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-close-btn:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.auth-close-btn:hover svg {
  transform: rotate(90deg) scale(1.15);
}

.auth-close-btn:active {
  transform: scale(0.92);
}

.auth-view {
  animation: authViewFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes authViewFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Themed Confirmation Modal */
.themed-confirm-card {
  max-width: 440px;
  border-radius: 22px;
  padding: 24px;
}

.confirm-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.confirm-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.confirm-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 6px 0;
}

.confirm-message {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  border-top: 1px solid var(--glass-border);
  padding-top: 16px;
}

.auth-header {
  text-align: left;
  margin-bottom: 14px;
  padding-right: 32px;
}

.auth-title {
  font-family: var(--font-display) !important;
  font-size: 1.25rem !important;
  line-height: 1.28 !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: var(--text-pure);
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.auth-social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 0;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  width: 100%;
  border-radius: var(--radius-pill);
  background: var(--modal-input-bg);
  border: 1px solid var(--modal-input-border);
  color: var(--text-pure);
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-clean);
}

.btn-social:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .btn-social:hover {
  background: rgba(0, 0, 0, 0.05);
}

.btn-social:active {
  transform: scale(0.98);
}

.social-icon { flex-shrink: 0; }

.auth-divider-text {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 500;
  margin: 11px 0;
}

.auth-divider-text::before {
  content: '';
  flex: 1;
  height: 1.5px;
  background: var(--divider-horizontal-left);
  border-radius: var(--radius-pill);
}

.auth-divider-text::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: var(--divider-horizontal-right);
  border-radius: var(--radius-pill);
}

.auth-divider-text span { padding: 0 10px; }

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.auth-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: -0.01em;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input {
  width: 100%;
  height: 40px;
  background: var(--modal-input-bg);
  border: 1px solid var(--modal-input-border);
  color: var(--text-pure);
  font-family: var(--font-base);
  font-size: 13.5px;
  padding: 0 14px;
  border-radius: 14px;
  outline: none;
  transition: var(--transition-clean);
}

.auth-input:focus {
  border-color: var(--modal-input-focus);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  transform: translateY(-0.5px);
}

[data-theme="light"] .auth-input:focus { background: #ffffff; }

.auth-input::placeholder { color: var(--text-dim); }

.toggle-password-btn {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  transition: var(--transition-clean);
}

.toggle-password-btn:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.08);
}

.toggle-password-btn svg {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.toggle-password-btn:hover svg { transform: scale(1.15); }
.toggle-password-btn:active svg { transform: scale(0.9); }

.auth-link {
  color: #818cf8;
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-clean);
}

.auth-link:hover {
  color: #60a5fa;
  text-decoration: underline;
}

.auth-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.35;
  margin-top: 1px;
  user-select: none;
}

.auth-checkbox-label input[type="checkbox"] {
  accent-color: #6366f1;
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-auth-submit {
  width: 100%;
  height: 40px;
  font-size: 13.5px;
  font-weight: 700;
  margin-top: 3px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 16px var(--gradient-glow);
}

.btn-auth-submit:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 24px var(--gradient-glow);
}

.auth-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--glass-border);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.auth-footer button {
  background: transparent;
  border: none;
  padding: 0;
  margin-left: 4px;
}

.auth-alert {
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 600;
  display: none;
  margin-bottom: 14px;
  animation: authViewFadeIn 0.25s ease forwards;
}

.auth-alert.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

[data-theme="light"] .auth-alert.error {
  background: #fef2f2 !important;
  border: 1px solid #fecdd3 !important;
  color: #991b1b !important;
}

.auth-alert.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #86efac;
}

[data-theme="light"] .auth-alert.success {
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  color: #065f46 !important;
}

.auth-modal-card.profile-modal-card {
  max-width: 740px !important;
  width: 94%;
  min-height: auto !important;
  padding: 24px 28px 22px 28px;
  overflow: visible !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-modal-header {
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.profile-header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar-large {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #4f46e5;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--gradient-glow);
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.profile-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}

[data-theme="dark"] .profile-verified-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.profile-card-email {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Profile Tabs Navigation */
.profile-tabs-nav {
  display: flex;
  gap: 8px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.profile-tabs-nav::-webkit-scrollbar {
  display: none;
}

[data-theme="dark"] .profile-tabs-nav {
  background: transparent !important;
  border: none !important;
}

.profile-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.profile-tab-btn:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .profile-tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.profile-tab-btn.active {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px var(--gradient-glow) !important;
}

.profile-tab-content {
  display: none;
  min-height: auto;
}

.profile-tab-content.active {
  display: block;
  animation: fadeInProfileTab 0.25s ease-out;
}

@keyframes fadeInProfileTab {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  margin-bottom: 12px;
}

@media (max-width: 580px) {
  .profile-form-grid {
    grid-template-columns: 1fr;
  }
}

.custom-specialty-row,
.custom-payment-row {
  animation: fadeInProfileTab 0.2s ease-out;
}

.auth-select {
  height: 44px;
  padding: 0 14px;
  cursor: pointer;
}

/* Avatar Color Picker */
.avatar-color-picker {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.color-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.color-dot:hover {
  transform: scale(1.15);
}

.color-dot.active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--brand-primary), 0 2px 8px rgba(0,0,0,0.3);
  transform: scale(1.1);
}

.profile-action-row {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

/* Subscription Card */
.plan-showcase-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.06));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

[data-theme="light"] .plan-showcase-card {
  background: linear-gradient(135deg, #eef2ff, #faf5ff);
  border-color: #c7d2fe;
}

.plan-showcase-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.plan-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-primary);
  font-weight: 600;
  font-size: 14px;
}

.plan-status-tag {
  font-size: 11px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

[data-theme="dark"] .plan-status-tag {
  color: #6ee7b7;
}

.plan-price-large {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.plan-period {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.plan-expiry-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Usage Meter */
.usage-meter-box {
  background: var(--panel-surface, rgba(0, 0, 0, 0.03));
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

[data-theme="dark"] .usage-meter-box {
  background: rgba(255, 255, 255, 0.03);
}

.usage-meter-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.usage-title {
  color: var(--text-main);
}

.usage-val {
  color: var(--brand-primary);
}

.usage-progress-bar {
  width: 100%;
  height: 7px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 12px;
}

[data-theme="dark"] .usage-progress-bar {
  background: rgba(255, 255, 255, 0.1);
}

.usage-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #6366f1 60%, #a855f7 100%) !important;
  border-radius: var(--radius-pill);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.45);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.usage-stat-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border-top: 1px solid var(--glass-border);
  padding-top: 10px;
}

.usage-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-lbl {
  font-size: 10.5px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
}

.stat-num {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}

.text-emerald { color: #059669 !important; }
[data-theme="dark"] .text-emerald { color: #34d399 !important; }
.text-indigo { color: var(--brand-primary) !important; }

.billing-actions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Form Field Spacing in Profile Tabs */
.profile-tab-content .auth-field {
  margin-bottom: 14px;
}

.profile-tab-content .profile-form-grid .auth-field {
  margin-bottom: 0;
}

/* Negotiation Tone Picker Grid */
.tone-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.tone-radio-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--panel-surface, rgba(0,0,0,0.02));
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-theme="dark"] .tone-radio-card {
  background: rgba(255, 255, 255, 0.03);
}

.tone-radio-card.active,
.tone-radio-card:hover {
  border-color: var(--brand-primary);
  background: rgba(99, 102, 241, 0.06);
}

.tone-radio-card input {
  margin-top: 2px;
  accent-color: #6366f1;
}

.tone-radio-body strong {
  display: block;
  font-size: 12.5px;
  color: var(--text-main);
  margin-bottom: 3px;
  font-weight: 700;
}

.tone-radio-body p {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .tone-picker-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tone-radio-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    padding: 14px 16px;
  }

  .tone-radio-card input {
    margin: 0 0 6px 0;
  }

  .tone-radio-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .tone-radio-body strong {
    text-align: center;
  }

  .tone-radio-body p {
    text-align: center;
  }
}

.auth-textarea {
  height: auto !important;
  min-height: 105px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 14px;
  resize: vertical;
}

.settings-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.35;
}

/* Security & Privacy */
.nda-toggle-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 14px;
  padding: 14px 16px;
}

.nda-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-primary);
  margin-bottom: 4px;
}

.nda-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 0;
  max-width: 440px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.2);
  transition: 0.3s;
  border-radius: 24px;
}

[data-theme="dark"] .toggle-slider {
  background-color: rgba(255, 255, 255, 0.2);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--brand-primary);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.danger-zone-box {
  margin-top: 20px;
  border-top: 1px solid var(--glass-border);
  padding-top: 14px;
}

.danger-zone-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.danger-actions-row {
  display: flex;
  gap: 10px;
}

.text-danger {
  color: #dc2626 !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

/* ==========================================================================
   ✨ CUSTOM HIGH-END SLEEK THEMED SELECT DROPDOWNS (.cs-select-wrap)
   ========================================================================== */
.cs-select-wrap {
  position: relative;
  width: 100%;
  user-select: none;
}

.cs-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--input-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--input-border, rgba(255, 255, 255, 0.12));
  border-radius: var(--radius-sm, 10px);
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text-main, #e2e8f0);
  cursor: pointer;
  outline: none;
  text-align: left;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cs-select-trigger:hover {
  background: var(--input-bg-focus, rgba(255, 255, 255, 0.08));
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.cs-select-trigger.active,
.cs-select-trigger:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), 0 4px 14px rgba(99, 102, 241, 0.15);
}

.cs-select-val {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.cs-select-arrow {
  color: var(--text-muted, #94a3b8);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  flex-shrink: 0;
}

.cs-select-trigger.active .cs-select-arrow {
  transform: rotate(180deg);
  color: #818cf8;
}

.cs-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #0f1422;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 6px;
  max-height: 220px;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  gap: 3px;
  z-index: 10050;
  box-shadow: 0 18px 40px -4px rgba(0, 0, 0, 0.85), 0 6px 16px rgba(0, 0, 0, 0.6);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.cs-select-menu::-webkit-scrollbar {
  width: 5px;
}

.cs-select-menu::-webkit-scrollbar-track {
  background: transparent;
}

.cs-select-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

[data-theme="light"] .cs-select-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.05);
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

[data-theme="light"] .cs-select-menu::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

.cs-select-menu.active {
  display: flex;
  animation: csSelectPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes csSelectPop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.cs-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main, #cbd5e1);
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
}

.cs-select-option:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--text-pure, #ffffff);
}

[data-theme="light"] .cs-select-option:hover {
  background: rgba(99, 102, 241, 0.1);
  color: #1e1b4b;
}

.cs-select-option.active {
  background: rgba(99, 102, 241, 0.22);
  color: #818cf8;
  font-weight: 500;
}

[data-theme="light"] .cs-select-option.active {
  background: rgba(99, 102, 241, 0.14);
  color: #4f46e5;
}

.cs-select-check {
  display: none;
  flex-shrink: 0;
  color: #818cf8;
}

.cs-select-option.active .cs-select-check {
  display: inline-block;
}

[data-theme="light"] .cs-select-option.active .cs-select-check {
  color: #4f46e5;
}

/* ==========================================================================
   🔒 GUEST SCANNER TEASER CARD (WHEN LOGGED OUT)
   ========================================================================== */
.scanner-guest-teaser {
  margin-top: 10px;
  width: 100%;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.guest-teaser-card {
  position: relative;
  background: var(--glass-surface);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inner-rim), var(--glass-drop-shadow);
  border-radius: 28px;
  padding: 28px 24px;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  transition: var(--transition-clean);
}

.guest-teaser-card:hover {
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: var(--glass-inner-rim), 0 20px 40px rgba(99, 102, 241, 0.18);
}

.teaser-shield-glow {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 140px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.28) 0%, transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}

.teaser-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.teaser-lock-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.35);
  color: #93c5fd;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.35);
}

.teaser-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--text-pure);
  letter-spacing: -0.02em;
}

.teaser-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.48;
}

.teaser-features-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.teaser-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-main);
}

.teaser-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 360px;
}

.btn-teaser-signup {
  width: 100%;
  height: 44px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 20px var(--gradient-glow);
}

.btn-teaser-login {
  font-size: 12px;
  color: var(--text-dim);
  background: transparent;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: var(--transition-clean);
}

.btn-teaser-login:hover {
  color: #60a5fa;
  text-decoration: underline;
}

.teaser-sample-preview {
  width: 100%;
  border-top: 1px solid var(--glass-border);
  padding-top: 16px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.teaser-sample-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   🌟 LONG-FORM LANDING PAGE SECTIONS & ROUNDED STYLING
   ========================================================================== */

/* 1. Trust & Social Proof Banner */
.trust-banner-section {
  padding: 36px 0 24px 0;
  text-align: center;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 44px;
}

.trust-lead-text {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 18px;
}

.trust-badges-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.trust-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  transition: var(--transition-clean);
}

.trust-badge-item:hover {
  border-color: rgba(129, 140, 248, 0.45);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.15);
}

/* Common Section Headers */
.landing-section {
  padding: 56px 0;
}

.section-header-center {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 38px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.section-tag-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(129, 140, 248, 0.3);
  color: #93c5fd;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

[data-theme="light"] .section-tag-badge {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
  color: #2563eb;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 600;
  color: var(--text-pure);
  letter-spacing: -0.03em;
  line-height: 1.22;
}

.section-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* 2. Traps Section (Ultra Rounded Cards) */
.traps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.trap-card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: var(--transition-clean);
}

.trap-card:hover {
  transform: translateY(-3px);
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 14px 32px rgba(239, 68, 68, 0.15);
}

.trap-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trap-card-badge {
  align-self: flex-start;
  padding: 3px 10px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.trap-card-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-pure);
  line-height: 1.3;
}

.trap-card-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.48;
  flex: 1;
}

.trap-loss-stat {
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
  font-size: 11.5px;
  color: var(--text-dim);
}

.trap-loss-stat strong {
  color: #f87171;
}

/* 3. Workflow Steps Section (Ultra Rounded Steps) */
.workflow-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.workflow-step-card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: 26px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-clean);
}

.workflow-step-card:hover {
  transform: translateY(-3px);
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 16px 36px rgba(99, 102, 241, 0.18);
}

.step-number-badge {
  position: absolute;
  top: 4px;
  right: -14px;
  font-family: var(--font-display);
  font-size: 160px;
  font-weight: 900;
  line-height: 0.75;
  color: var(--text-pure);
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
  transition: var(--transition-clean);
  z-index: 0;
}

.workflow-step-card:hover .step-number-badge {
  opacity: 0.16;
  transform: scale(1.05) translate(4px, -4px);
}

.step-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.step-card-title {
  font-size: 17.5px;
  font-weight: 700;
  color: var(--text-pure);
  position: relative;
  z-index: 1;
}

.step-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

/* 4. Features Showcase Grid (Rounded Feature Capsules) */
.features-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.feature-item-card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition-clean);
}

.feature-item-card:hover {
  transform: translateY(-3px);
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 14px 30px rgba(99, 102, 241, 0.15);
}

.feature-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
}

.feature-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-pure);
}

.feature-text {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 5. Pricing Section (Ultra Rounded Cards & Pill Buttons) */
.pricing-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 7px 16px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
}

.toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.discount-badge {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #86efac;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  margin-left: 4px;
}

.pricing-toggle-switch {
  width: 44px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: #334155;
  border: none;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: background 0.3s ease;
}

.pricing-toggle-switch.active {
  background: #6366f1;
}

.toggle-knob {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pricing-toggle-switch.active .toggle-knob {
  transform: translateX(20px);
}

.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  align-items: stretch;
}

.pricing-card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transition: var(--transition-clean);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
}

.pricing-card-popular {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 14px 36px rgba(99, 102, 241, 0.22);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.09) 0%, var(--glass-surface) 100%);
}

.popular-ribbon,
.plan-ribbon {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.popular-ribbon {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
}

.starter-ribbon {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.agency-ribbon {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
}

.plan-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-pure);
}

.plan-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.42;
}

.plan-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 14px;
}

.price-currency {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-pure);
}

.price-amount {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  color: var(--text-pure);
  line-height: 1;
}

.price-period {
  font-size: 12.5px;
  color: var(--text-dim);
}

.btn-plan-select {
  width: 100%;
  height: 44px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: var(--radius-pill);
}

.plan-features-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
  flex: 1;
}

.plan-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-main);
  text-align: left;
  word-break: normal;
}

.plan-feature-item svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.plan-feature-item span {
  text-align: left;
  flex: 1;
  line-height: 1.4;
}

.feature-disabled {
  color: var(--text-dim);
  opacity: 0.5;
}

/* 6. Testimonials Section (Rounded Testimonial Cards) */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.testimonial-card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.testimonial-rating {
  font-size: 14px;
  line-height: 1;
}

.testimonial-quote {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.52;
  font-style: italic;
  flex: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--glass-border);
}

.author-avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-pure);
}

.author-role {
  font-size: 11px;
  color: var(--text-dim);
}

/* 7. FAQ Accordion Section (Smooth Rounded Accordion Items) */
.faq-accordion-container {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition-clean);
}

.faq-item {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
  cursor: pointer;
}

.faq-item:hover,
.faq-item.active {
  border-color: rgba(129, 140, 248, 0.5) !important;
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.16) !important;
}

[data-theme="light"] .faq-item:hover,
[data-theme="light"] .faq-item.active {
  border-color: #3b82f6 !important;
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.12) !important;
}

.faq-question-btn {
  width: 100%;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  border: none;
  color: var(--text-pure);
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.faq-chevron {
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  flex-shrink: 0;
}



.faq-answer-pane {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s ease, opacity 0.25s ease;
  padding: 0 22px;
  opacity: 0;
}



/* Dedicated Modal FAQ Hover */





.faq-answer-pane p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* 8. Bottom Action Banner (Mega Rounded Card) */
.bottom-cta-section {
  padding: 44px 0 64px 0;
}

.bottom-cta-card {
  position: relative;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%), var(--glass-surface);
  border: 1px solid rgba(129, 140, 248, 0.35);
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.2);
  border-radius: 32px;
  padding: 48px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  overflow: hidden;
}

.cta-glow-backdrop {
  position: absolute;
  width: 340px;
  height: 220px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, transparent 70%);
  filter: blur(40px);
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.bottom-cta-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4.5vw, 36px);
  font-weight: 800;
  color: var(--text-pure);
  letter-spacing: -0.03em;
}

.bottom-cta-subtitle {
  font-size: 14.5px;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.5;
}

.bottom-cta-btn-wrap {
  margin-top: 8px;
}

.bottom-cta-note {
  font-size: 12px;
  color: var(--text-dim);
}

/* 9. Luxury SaaS Footer */
.app-footer {
  border-top: 1px solid var(--glass-border);
  background: rgba(10, 15, 29, 0.7);
  padding: 50px 0 36px 0;
  backdrop-filter: blur(12px);
}

[data-theme="light"] .app-footer {
  background: rgba(248, 250, 252, 0.85);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 36px;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-mission-text {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 360px;
}

.footer-legal-notice {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 8px;
  line-height: 1.45;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 20px;
}

.footer-link-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 4px;
}

.footer-link {
  font-size: 12.5px;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-clean);
}

.footer-link:hover {
  color: #60a5fa;
}

.footer-lang-item {
  font-size: 12px;
  color: var(--text-dim);
}

/* ==========================================================================
   📱 100% BULLETPROOF MOBILE & TABLET RESPONSIVE RULES (320px - 768px)
   EVERYTHING IS 100% CENTER-ALIGNED ON PHONE / MOBILE SCREENS
   ========================================================================== */

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .header-wrapper { top: 12px; padding: 0 12px; }
  .floating-navbar { height: 52px; padding: 0 16px; }
  .brand-anchor { gap: 11px; }
  .header-actions { gap: 10px; }
  
  /* Show Mobile Hamburger and Hide Desktop Buttons */
  .btn-desktop-auth, .nav-divider {
    display: none !important;
  }

  .mobile-hamburger-btn {
    display: inline-flex;
    width: 34px;
    height: 34px;
  }

  /* 1. Hero & Teaser Section Center Alignment */
  .hero-section {
    padding: 26px 0 14px 0;
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: center !important;
  }
  
  .hero-pill-badge {
    margin: 0 auto 12px auto !important;
  }

  .hero-title {
    font-size: clamp(22px, 4.8vw, 32px);
    margin-bottom: 8px;
    text-align: center !important;
  }

  .hero-subtitle {
    font-size: 13.5px;
    line-height: 1.48;
    margin-bottom: 16px;
    padding: 0 6px;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .guest-teaser-card {
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px 18px !important;
  }

  .teaser-header {
    text-align: center !important;
    align-items: center !important;
  }

  .teaser-title, .teaser-subtitle {
    text-align: center !important;
  }

  .teaser-features-preview {
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .teaser-actions {
    margin: 0 auto;
    align-items: center !important;
  }

  .teaser-sample-preview {
    align-items: center !important;
    text-align: center !important;
  }

  .sample-chips-row {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .sample-chip-btn {
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
    flex-direction: column !important;
    gap: 6px !important;
    padding: 12px 14px !important;
  }

  .chip-risk-indicator {
    margin-top: 0 !important;
  }

  .chip-content {
    align-items: center !important;
    text-align: center !important;
  }

  /* 2. Trust Section Center Alignment */
  .trust-lead-text {
    text-align: center !important;
  }

  .trust-badges-grid {
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
  }

  /* 3. Section Headers Center Alignment */
  .section-header-center {
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .section-tag-badge {
    margin: 0 auto !important;
  }

  .section-title, .section-desc {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* 4. All Grids to 1-Column Stack with Center Alignment */
  .traps-grid,
  .workflow-steps-grid,
  .features-showcase-grid,
  .pricing-cards-grid,
  .testimonials-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    width: 100% !important;
  }

  /* Trap Cards Centered */
  .trap-card {
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px 18px !important;
  }

  .trap-card-icon {
    margin: 0 auto !important;
  }

  .trap-card-badge {
    align-self: center !important;
    margin: 0 auto !important;
  }

  .trap-card-title,
  .trap-card-text,
  .trap-loss-stat {
    text-align: center !important;
  }

  /* Workflow Steps Centered */
  .workflow-step-card {
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px 18px !important;
  }

  .step-icon-wrap {
    margin: 0 auto !important;
  }

  .step-number-badge {
    right: -8px !important;
    top: -6px !important;
    font-size: 96px !important;
    line-height: 0.8 !important;
  }

  .step-card-title,
  .step-card-desc {
    text-align: center !important;
  }

  /* Features Centered */
  .feature-item-card {
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 22px 18px !important;
  }

  .feature-icon-box {
    margin: 0 auto !important;
  }

  .feature-title,
  .feature-text {
    text-align: center !important;
  }

  /* Pricing Cards Centered */
  .pricing-card {
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 28px 20px !important;
  }

  .pricing-card-header {
    text-align: center !important;
    width: 100%;
  }

  .plan-title,
  .plan-desc {
    text-align: center !important;
  }

  .plan-price-wrap {
    justify-content: center !important;
    margin: 12px auto !important;
  }

  .plan-cta-wrap {
    width: 100%;
  }

  .plan-features-list {
    width: 100%;
    max-width: 300px;
    margin: 0 auto !important;
    text-align: left !important;
  }

  .plan-feature-item {
    display: flex !important;
    align-items: flex-start !important;
    text-align: left !important;
    gap: 10px !important;
  }

  .plan-feature-item svg {
    flex-shrink: 0 !important;
    margin-top: 2px !important;
  }

  .plan-feature-item span {
    text-align: left !important;
    flex: 1 !important;
    line-height: 1.4 !important;
  }

  /* Testimonials Centered */
  .testimonial-card {
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px 18px !important;
  }

  .testimonial-rating {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
    gap: 4px;
  }

  .testimonial-quote {
    text-align: center !important;
  }

  .testimonial-author {
    justify-content: center !important;
    text-align: center !important;
    width: 100%;
  }

  .author-info {
    align-items: center !important;
    text-align: center !important;
  }

  /* Bottom CTA Banner Centered */
  .bottom-cta-card {
    padding: 38px 20px !important;
    text-align: center !important;
    align-items: center !important;
  }

  .bottom-cta-title,
  .bottom-cta-subtitle,
  .bottom-cta-note {
    text-align: center !important;
  }

  .bottom-cta-btn-wrap {
    display: flex !important;
    justify-content: center !important;
  }

  /* Footer Centered */
  .footer-inner {
    grid-template-columns: 1fr !important;
    gap: 28px;
    text-align: center !important;
    align-items: center !important;
  }

  .footer-brand-col {
    align-items: center !important;
    text-align: center !important;
  }

  .footer-mission-text,
  .footer-legal-notice {
    text-align: center !important;
    margin: 0 auto !important;
  }

  .footer-links-grid {
    grid-template-columns: 1fr !important;
    gap: 24px;
    text-align: center !important;
  }

  .footer-link-col {
    align-items: center !important;
    text-align: center !important;
  }

  /* Scanner & Auth Modal */
  .scanner-wrapper { padding: 16px; border-radius: 20px; }
  .dropzone-box { padding: 22px 14px; }
  .risk-overview-banner { flex-direction: column; align-items: center; text-align: center; }
  .risk-stats-col { width: 100%; justify-content: space-between; border-top: 1px solid var(--glass-border); padding-top: 14px; }
  .auth-modal-card { padding: 30px 22px; }
}

@media (max-width: 520px) {
  .header-wrapper { top: 0; padding: 10px 8px 18px 8px; }
  .floating-navbar { height: 50px; padding: 0 14px; }
  .brand-anchor { gap: 10px; }
  .brand-title-text { font-size: 16px; }
  .brand-logo-icon svg { width: 20px; height: 20px; }
  .header-actions { gap: 8px; }
  .theme-toggle-unboxed { width: 26px; height: 26px; }
  .lang-toggle-btn { padding: 2px 5px; height: 26px; gap: 4px; }
  .lang-flag-badge { width: 18px; height: 13px; margin-right: 4px; }
  .active-lang-code { font-size: 10px; }

  .mobile-nav-drawer {
    left: 8px;
    right: 8px;
    top: calc(100% + 6px);
  }

  .hero-section { padding: 22px 0 12px 0; }
  .hero-pill-badge { font-size: 11px; padding: 5px 13px; gap: 6px; margin-bottom: 10px; max-width: 95%; }
  .hero-title { font-size: 23px; line-height: 1.16; letter-spacing: -0.025em; margin-bottom: 6px; }
  .hero-subtitle { font-size: 12.5px; line-height: 1.45; margin-bottom: 14px; padding: 0 4px; }

  .guest-teaser-card { padding: 20px 14px; border-radius: 20px; }
  .teaser-title { font-size: 16.5px; }
  .teaser-subtitle { font-size: 12px; }
  .teaser-features-preview { gap: 6px; }
  .teaser-feature-pill { font-size: 10.5px; padding: 3px 8px; }
  .btn-teaser-signup { font-size: 13px; height: 40px; }

  .scanner-wrapper { padding: 12px; border-radius: 18px; }
  .scanner-tab-btn { padding: 5px 10px; font-size: 11.5px; }
  .dropzone-box { padding: 18px 10px; border-radius: 16px; }
  .dropzone-icon-circle { width: 38px; height: 38px; }
  .dropzone-icon-circle svg { width: 18px; height: 18px; }
  .dropzone-title { font-size: 13.5px; }
  .dropzone-meta { font-size: 10px; }
  .btn-scan-submit { width: 100%; font-size: 13px; padding: 10px 18px; }

  .sample-chips-row { grid-template-columns: 1fr; gap: 8px; }
  .sample-chip-btn { padding: 10px 12px; border-radius: 16px; }

  .step-number-badge {
    font-size: 80px !important;
    right: -6px !important;
    top: -4px !important;
  }

  .auth-modal-card { padding: 24px 18px; border-radius: 20px; }
  .auth-title { font-size: 1.15rem !important; line-height: 1.28 !important; }
  .auth-subtitle { font-size: 12px; }
  .auth-social-row { gap: 8px; }
  .btn-social { height: 40px; font-size: 12.5px; }
  .auth-input { font-size: 16px; height: 42px; }
  .btn-auth-submit { height: 42px; font-size: 13.5px; }
  .lang-dropdown-menu { right: -4px; width: 200px; top: calc(100% + 14px); }
}

/* ==========================================================================
   GUEST TEASER & HERO SCANNER TRANSITION
   ========================================================================== */
.scanner-guest-teaser {
  width: 100%;
  max-width: 820px;
  margin: 32px auto 0 auto;
  position: relative;
}

.guest-teaser-card {
  position: relative;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: 28px !important;
  padding: 36px 32px;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  text-align: center;
  overflow: hidden;
}

.teaser-shield-glow {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 140px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, rgba(99, 102, 241, 0) 70%);
  pointer-events: none;
}

.teaser-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.teaser-lock-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
}

.teaser-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 6px;
}

.teaser-subtitle {
  font-size: clamp(13px, 1.3vw, 14.5px);
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.5;
}

.teaser-features-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.teaser-feature-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--modal-input-bg);
  border: 1px solid var(--modal-input-border);
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.teaser-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.btn-teaser-signup {
  padding: 13px 26px;
  font-size: 14.5px;
  font-weight: 700;
}

.btn-teaser-login {
  padding: 12px 20px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.teaser-sample-preview {
  border-top: 1px solid var(--border-soft);
  padding-top: 20px;
  margin-top: 8px;
}

.teaser-sample-label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ==========================================================================
   LOGGED-IN CLEAN WORKSPACE (HERO/SCANNER/RESULTS -> TRUST BANNER -> FOOTER)
   ========================================================================== */
body.is-logged-in #marketing-landing-content,
body.is-logged-in .marketing-landing-content,
body.is-logged-in .nav-link-item {
  display: none !important;
}

body.is-logged-in .scanner-wrapper {
  margin-bottom: 0px !important;
  padding-bottom: 16px !important;
}

body.is-logged-in .hero-section {
  padding-bottom: 0px !important;
  margin-bottom: 0px !important;
  min-height: auto;
}

body.is-logged-in .trust-banner-section {
  display: block !important;
  margin-top: 14px !important;
  padding-top: 10px !important;
  margin-bottom: 16px !important;
}

body.is-logged-in .app-footer {
  margin-top: 24px;
  border-top: 1px solid var(--border-soft);
}

@media (max-width: 640px) {
  .app-workspace-body .brand-tagline-divider,
  .app-workspace-body .brand-tagline-text {
    display: none;
  }
  .app-workspace-body .header-actions {
    gap: 6px;
  }
  .app-workspace-body .header-actions .btn {
    padding: 6px 8px;
    font-size: 11px;
  }
  .hide-on-mobile {
    display: none !important;
  }
}

/* ==========================================================================
   APP WORKSPACE & DEDICATED SCANNER INTERFACE
   ========================================================================== */
.app-workspace-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-main-content {
  flex: 1;
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 80px 20px;
}

.app-workspace-header {
  text-align: center;
  margin-bottom: 28px;
}

.app-hero-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-pure);
  margin-top: 12px;
  margin-bottom: 8px;
  line-height: 1.2;
}

.app-hero-subtitle {
  font-size: clamp(13px, 1.4vw, 15px);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.5;
}

.app-scanner-box {
  display: block !important;
  margin-bottom: 36px;
}

.app-results-container {
  margin-top: 24px;
}

/* Results Filter Bar & Tone Switcher */
.results-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

.filter-chips-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip-btn {
  background: var(--modal-input-bg);
  border: 1px solid var(--modal-input-border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-clean);
}

.filter-chip-btn:hover {
  color: var(--text-pure);
  border-color: rgba(99, 102, 241, 0.4);
}

.filter-chip-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
  color: #a5b4fc;
}

.filter-chip-btn.chip-danger.active {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #fca5a5;
}

.filter-chip-btn.chip-warning.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fcd34d;
}

.tone-switcher-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tone-label {
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tone-pill-toggle {
  display: flex;
  background: var(--modal-input-bg);
  border: 1px solid var(--modal-input-border);
  border-radius: var(--radius-pill);
  padding: 2px;
  gap: 2px;
}

.tone-option-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-clean);
}

.tone-option-btn.active {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--gradient-glow);
}

/* History List Feed */
.history-list-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  scrollbar-width: none;
}

.history-list-feed::-webkit-scrollbar {
  display: none;
}

.history-scan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--modal-input-bg);
  border: 1px solid var(--modal-input-border);
  border-radius: var(--radius-md);
  transition: var(--transition-clean);
}

.history-scan-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.history-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.history-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-pure);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-card-date {
  font-size: 11px;
  color: var(--text-dim);
}

.history-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.history-score-chip {
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}

.history-score-chip.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.history-score-chip.warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.history-score-chip.safe {
  background: rgba(16, 185, 129, 0.2);
  color: #86efac;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.history-empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-dim);
  font-size: 13px;
}

/* AI Engine Settings */
.settings-form-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.engine-badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.engine-status-pill {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  background: var(--modal-input-bg);
  border: 1px solid var(--modal-input-border);
  color: var(--text-muted);
}

.engine-status-pill.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #86efac;
}

.settings-hint {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
  margin-top: 4px;
}

/* ==========================================================================
   🏷️ SCANNED CONTRACT TITLE & INLINE EDITABLE BANNER
   ========================================================================== */
.scanned-contract-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--card-bg, rgba(255, 255, 255, 0.85));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg, 16px);
  padding: 12px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .scanned-contract-title-bar {
  background: rgba(30, 41, 59, 0.7);
}

.contract-title-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.contract-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--brand-primary);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.title-edit-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.title-display-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.scanned-contract-heading {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.01em;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.scanned-contract-heading:hover {
  background: rgba(99, 102, 241, 0.08);
}

.title-edit-active-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.contract-title-inline-input {
  background: var(--input-bg, #ffffff);
  border: 1.5px solid var(--brand-primary);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
  min-width: 280px;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

[data-theme="dark"] .contract-title-inline-input {
  background: rgba(15, 23, 42, 0.85);
  border-color: #6366f1;
}

.btn-edit-title {
  background: rgba(99, 102, 241, 0.12) !important;
  border: 1.5px solid rgba(99, 102, 241, 0.35) !important;
  color: #4f46e5 !important;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.18s ease;
}

[data-theme="dark"] .btn-edit-title {
  background: rgba(99, 102, 241, 0.22) !important;
  border-color: rgba(129, 140, 248, 0.5) !important;
  color: #c7d2fe !important;
}

.btn-edit-title:hover {
  color: #ffffff !important;
  background: #4f46e5 !important;
  border-color: #3730a3 !important;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.4) !important;
}

[data-theme="dark"] .btn-edit-title:hover {
  background: #6366f1 !important;
  border-color: #818cf8 !important;
  color: #ffffff !important;
}

.btn-edit-title svg {
  stroke: currentColor !important;
  stroke-width: 2.2px;
}

.btn-save-title-inline {
  padding: 6px 14px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  background: #2563eb !important;
  color: #ffffff !important;
  border: 1px solid #1d4ed8 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
  white-space: nowrap !important;
}

.btn-save-title-inline:hover {
  transform: translateY(-1px);
  background: #1d4ed8 !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.6) !important;
  color: #ffffff !important;
}

.btn-save-title-inline svg {
  stroke: #ffffff !important;
  stroke-width: 2.5px;
}

.btn-cancel-title-inline {
  padding: 6px 10px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border: 1.5px solid #fca5a5 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}

[data-theme="dark"] .btn-cancel-title-inline {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
}

.btn-cancel-title-inline:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #b91c1c !important;
}

.btn-cancel-title-inline svg {
  stroke: currentColor !important;
}

/* History Table & Modal Inline Renaming */
.table-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-edit-table-title {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: #4f46e5;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: all 0.15s ease;
}

[data-theme="dark"] .btn-edit-table-title {
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.3);
}

.table-title-row:hover .btn-edit-table-title {
  opacity: 1;
}

.btn-edit-table-title:hover {
  color: #ffffff !important;
  background: #4f46e5 !important;
  border-color: #3730a3 !important;
}

.table-title-edit-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-title-inline-input {
  background: var(--input-bg, #ffffff);
  border: 1.5px solid var(--brand-primary);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
  min-width: 220px;
}

[data-theme="dark"] .table-title-inline-input {
  background: rgba(15, 23, 42, 0.85);
}

.btn-save-table-title {
  padding: 4px 10px !important;
  font-size: 11.5px !important;
}

.btn-cancel-table-title {
  padding: 4px 8px !important;
  font-size: 11px !important;
}

.preview-title-display-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.preview-title-edit-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.preview-title-inline-input {
  background: var(--input-bg, #ffffff);
  border: 1.5px solid var(--brand-primary);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
  min-width: 280px;
}

[data-theme="dark"] .preview-title-inline-input {
  background: rgba(15, 23, 42, 0.85);
}

.exposure-cell-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.curr-pill-badge {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 1.5px 6.5px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: inline-block;
  white-space: nowrap;
}

[data-theme="dark"] .curr-pill-badge {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.35);
}

.scanned-contract-submeta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-dim);
}

.contract-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #059669;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  font-size: 11px;
}

[data-theme="dark"] .contract-privacy-badge {
  color: #34d399;
}

/* ==========================================================================
   📚 STANDALONE HISTORY PAGE STYLES (history.html)
   ========================================================================== */
.history-page-body {
  background-color: var(--bg-base);
  color: var(--text-main);
  min-height: 100vh;
}

.history-container {
  padding-top: 32px;
  padding-bottom: 64px;
}

.history-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.history-nav-link:hover {
  color: var(--text-main);
  background: var(--panel-surface, rgba(0,0,0,0.03));
}

.history-nav-link.active {
  color: var(--brand-primary);
  background: rgba(99, 102, 241, 0.08);
}

.history-header-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.history-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-primary);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  margin-bottom: 8px;
}

.history-main-heading {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin: 0 0 6px 0;
}

.history-sub-heading {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  max-width: 600px;
  line-height: 1.5;
}

.history-header-actions {
  display: flex;
  gap: 8px;
}

/* History Metrics Grid */
.history-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .history-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .history-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.history-metric-card {
  background: var(--card-bg, rgba(255, 255, 255, 0.8));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg, 16px);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.history-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.metric-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-icon-box.bg-blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.metric-icon-box.bg-emerald { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.metric-icon-box.bg-rose { background: rgba(244, 63, 94, 0.12); color: #f43f5e; }
.metric-icon-box.bg-indigo { background: rgba(99, 102, 241, 0.12); color: #6366f1; }

.metric-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.metric-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

/* History Controls Card */
.history-controls-card {
  background: var(--card-bg, rgba(255, 255, 255, 0.9));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg, 16px);
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.history-search-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.history-search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
}

.history-search-box .search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-dim);
  pointer-events: none;
}

.history-search-input {
  width: 100%;
  padding: 9px 36px 9px 36px;
  border-radius: 10px;
  background: var(--input-bg, #ffffff);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  font-size: 13.5px;
  outline: none;
  transition: all 0.2s ease;
}

.history-search-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn-clear-search {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 4px;
}

.history-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}

/* Native select fallback */
.history-select {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--input-bg, #ffffff);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.history-select.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ==========================================================================
   CUSTOM THEMED SELECT DROPDOWNS (Matches Theme with Smooth Rounded Curves)
   ========================================================================== */
.cs-custom-select {
  position: relative;
  display: inline-block;
}

.cs-select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-main);
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  user-select: none;
  white-space: nowrap;
}

[data-theme="dark"] .cs-select-trigger {
  background: rgba(15, 20, 31, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.cs-select-trigger:hover {
  border-color: var(--brand-primary, #6366f1);
  transform: translateY(-1px);
}

.cs-select-trigger:focus,
.cs-custom-select.active .cs-select-trigger {
  border-color: var(--brand-primary, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.cs-chevron {
  color: var(--text-dim);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.cs-custom-select.active .cs-chevron {
  transform: rotate(180deg);
  color: var(--brand-primary, #6366f1);
}

/* Custom Dropdown Container */
.cs-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1050;
  display: none;
  flex-direction: column;
  gap: 3px;
  transform-origin: top center;
  animation: csDropdownPop 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

[data-theme="dark"] .cs-select-dropdown {
  background: #151b28 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

.cs-custom-select.active .cs-select-dropdown {
  display: flex;
}

@keyframes csDropdownPop {
  0% {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cs-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #1e293b !important;
  font-family: var(--font-base);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: all 0.15s ease;
  outline: none;
}

.cs-select-option .opt-text {
  color: #1e293b !important;
  font-size: 13px;
}

[data-theme="dark"] .cs-select-option {
  color: #f8fafc !important;
}

[data-theme="dark"] .cs-select-option .opt-text {
  color: #f8fafc !important;
}

.cs-select-option:hover {
  background: rgba(99, 102, 241, 0.09) !important;
}

.cs-select-option:hover .opt-text {
  color: #4f46e5 !important;
}

[data-theme="dark"] .cs-select-option:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .cs-select-option:hover .opt-text {
  color: #ffffff !important;
}

.cs-select-option.active {
  background: rgba(99, 102, 241, 0.12) !important;
}

.cs-select-option.active .opt-text {
  color: #4f46e5 !important;
  font-weight: 700 !important;
}

[data-theme="dark"] .cs-select-option.active {
  background: rgba(99, 102, 241, 0.25) !important;
}

[data-theme="dark"] .cs-select-option.active .opt-text {
  color: #c7d2fe !important;
  font-weight: 700 !important;
}

.opt-check {
  margin-left: auto;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--brand-primary, #6366f1);
  flex-shrink: 0;
}

.cs-select-option.active .opt-check {
  opacity: 1;
  transform: scale(1);
}

.opt-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.opt-dot.dot-danger { background: #f43f5e; box-shadow: 0 0 6px rgba(244, 63, 94, 0.6); }
.opt-dot.dot-warning { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.6); }
.opt-dot.dot-safe { background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.6); }

.cs-dropdown-narrow {
  min-width: 90px;
}

/* ==========================================================================
   BUTTON CLICK & FEEDBACK ANIMATIONS
   ========================================================================== */
@keyframes btnClickPulse {
  0% { transform: scale(1); }
  25% { transform: scale(0.9); }
  55% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes btnEmptyShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.btn-pulse-active {
  animation: btnClickPulse 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.btn-shake-active {
  animation: btnEmptyShake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97) !important;
}

[data-theme="dark"] .history-sub-heading {
  color: #94a3b8;
}

[data-theme="dark"] .history-badge {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  color: #93c5fd;
}

[data-theme="dark"] .history-metric-card {
  background: rgba(15, 20, 31, 0.75);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .metric-label {
  color: #94a3b8;
}

[data-theme="dark"] .history-controls-card {
  background: rgba(15, 20, 31, 0.8);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .filter-lbl {
  color: #cbd5e1;
}

[data-theme="dark"] .history-search-input {
  background: rgba(7, 10, 18, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

[data-theme="dark"] .history-select {
  background: rgba(7, 10, 18, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

/* History Table Container */
.history-table-container {
  background: var(--card-bg, rgba(255, 255, 255, 0.95));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg, 16px);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

[data-theme="dark"] .history-table-container {
  background: rgba(15, 20, 31, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.history-table th {
  background: var(--panel-surface, rgba(0, 0, 0, 0.02));
  color: var(--text-dim);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}

[data-theme="dark"] .history-table th {
  background: rgba(10, 14, 24, 0.8);
  color: #94a3b8;
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.history-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
  vertical-align: middle;
}

[data-theme="dark"] .history-table td {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.history-table tr:last-child td {
  border-bottom: none;
}

.history-table-row {
  transition: background 0.15s ease;
}

.history-table-row:hover {
  background: var(--panel-surface, rgba(0, 0, 0, 0.02));
}

[data-theme="dark"] .history-table-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .item-contract-name {
  color: #f8fafc;
}

[data-theme="dark"] .item-contract-client {
  color: #94a3b8;
}

[data-theme="dark"] .col-date {
  color: #94a3b8;
}

.history-table-row.row-selected {
  background: rgba(99, 102, 241, 0.06);
}

.col-checkbox {
  width: 36px;
  text-align: center;
}

/* ==========================================================================
   ☑️ THEMED CUSTOM CHECKBOX (DARK & LIGHT THEME)
   ========================================================================== */
.history-item-checkbox,
#history-select-all,
.col-checkbox input[type="checkbox"],
input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 17px !important;
  height: 17px !important;
  border-radius: 5px !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.22) !important;
  outline: none !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  position: relative !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  flex-shrink: 0 !important;
}

.history-item-checkbox:hover,
#history-select-all:hover,
input[type="checkbox"]:hover {
  border-color: var(--brand-primary, #6366f1) !important;
  background: rgba(30, 41, 59, 0.95) !important;
  transform: scale(1.06);
}

.history-item-checkbox:focus-visible,
#history-select-all:focus-visible,
input[type="checkbox"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35) !important;
  border-color: var(--brand-primary, #6366f1) !important;
}

/* Checked State with Luminous Checkmark */
.history-item-checkbox:checked,
#history-select-all:checked,
input[type="checkbox"]:checked {
  background: var(--brand-primary, #6366f1) !important;
  border-color: var(--brand-primary, #6366f1) !important;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.45) !important;
}

.history-item-checkbox:checked::after,
#history-select-all:checked::after,
input[type="checkbox"]:checked::after {
  content: '' !important;
  position: absolute !important;
  left: 5px !important;
  top: 2px !important;
  width: 4px !important;
  height: 8px !important;
  border: solid #ffffff !important;
  border-width: 0 2px 2px 0 !important;
  transform: rotate(45deg) !important;
  display: block !important;
}

/* ☀️ Light Theme Checkbox */
[data-theme="light"] .history-item-checkbox,
[data-theme="light"] #history-select-all,
[data-theme="light"] .col-checkbox input[type="checkbox"],
[data-theme="light"] input[type="checkbox"] {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .history-item-checkbox:hover,
[data-theme="light"] #history-select-all:hover,
[data-theme="light"] input[type="checkbox"]:hover {
  background: #f8fafc !important;
  border-color: var(--brand-primary, #6366f1) !important;
}

[data-theme="light"] .history-item-checkbox:checked,
[data-theme="light"] #history-select-all:checked,
[data-theme="light"] input[type="checkbox"]:checked {
  background: var(--brand-primary, #6366f1) !important;
  border-color: var(--brand-primary, #6366f1) !important;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3) !important;
}

[data-theme="light"] .history-item-checkbox:checked::after,
[data-theme="light"] #history-select-all:checked::after,
[data-theme="light"] input[type="checkbox"]:checked::after {
  border-color: #ffffff !important;
}

.col-title {
  min-width: 240px;
}

.table-title-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-doc-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme="dark"] .table-doc-icon {
  background: rgba(255, 255, 255, 0.05);
}

.table-title-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-contract-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.item-contract-client {
  font-size: 11.5px;
  color: var(--text-dim);
}

.col-date {
  white-space: nowrap;
  font-size: 12px;
  color: var(--text-muted);
}

.risk-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
}

.risk-pill .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.risk-pill small {
  font-size: 10.5px;
  font-weight: 500;
  opacity: 0.85;
}

.risk-pill.badge-danger {
  background: rgba(244, 63, 94, 0.12);
  color: #e11d48;
  border: 1px solid rgba(244, 63, 94, 0.25);
}
.risk-pill.badge-danger .pill-dot { background: #e11d48; }

.risk-pill.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.risk-pill.badge-warning .pill-dot { background: #d97706; }

.risk-pill.badge-safe {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.risk-pill.badge-safe .pill-dot { background: #059669; }

.traps-count-cell {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.trap-danger-badge {
  background: rgba(244, 63, 94, 0.1);
  color: #e11d48;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
}

.trap-warning-badge {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
}

.exposure-text {
  font-size: 14px;
  font-weight: 600;
}

.exposure-text.text-danger {
  color: #e11d48;
}

.col-actions {
  white-space: nowrap;
}

.table-action-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon-delete {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-icon-delete:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* History Empty State */
.history-empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-icon-box {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.08);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

.history-empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 6px 0;
}

.history-empty-state p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0 0 18px 0;
}

/* Pagination Bar */
.history-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 4px;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme="dark"] .pagination-nav-btn {
  background: rgba(30, 41, 59, 0.6);
}

.pagination-nav-btn:hover:not(:disabled) {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.pagination-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-numbers {
  display: flex;
  gap: 4px;
}

.page-num-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

[data-theme="dark"] .page-num-btn {
  background: rgba(30, 41, 59, 0.6);
}

.page-num-btn:hover:not(.active) {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.page-num-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

/* Preview Modal / Drawer */
.history-preview-card {
  max-width: 680px;
  max-height: 88vh;
  overflow-y: auto;
  text-align: left;
  position: relative;
  padding: 24px 28px !important;
}

.history-preview-card .auth-close-btn {
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  z-index: 30 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid var(--glass-border) !important;
  color: var(--text-muted) !important;
}

[data-theme="dark"] .history-preview-card .auth-close-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #94a3b8 !important;
}

.history-preview-card .auth-close-btn:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: var(--text-pure, #ffffff) !important;
}

[data-theme="light"] .history-preview-card .auth-close-btn {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #64748b !important;
}

[data-theme="light"] .history-preview-card .auth-close-btn:hover {
  background: rgba(0, 0, 0, 0.12) !important;
  border-color: rgba(0, 0, 0, 0.2) !important;
  color: #0f172a !important;
}

.preview-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-right: 46px !important; /* Prevents score circle from touching close cross button */
  padding-bottom: 14px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 14px;
}

.preview-doc-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 4px;
}

.preview-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 4px 0;
}

.preview-modal-meta {
  font-size: 12px;
  color: var(--text-dim);
}

.preview-score-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.preview-score-circle.score-danger {
  background: rgba(244, 63, 94, 0.12);
  border: 2px solid #e11d48;
  color: #e11d48;
}

.preview-score-circle.score-warning {
  background: rgba(245, 158, 11, 0.12);
  border: 2px solid #d97706;
  color: #d97706;
}

.preview-score-circle.score-safe {
  background: rgba(16, 185, 129, 0.12);
  border: 2px solid #059669;
  color: #059669;
}

.preview-score-circle strong {
  font-size: 16px;
  line-height: 1;
}

.preview-score-circle small {
  font-size: 9px;
  font-weight: 600;
}

.preview-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.preview-stat-box {
  background: var(--panel-surface, rgba(0,0,0,0.02));
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preview-stat-box .p-lbl {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
}

.preview-stat-box .p-val {
  font-size: 15px;
  font-weight: 800;
}

.preview-clauses-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.preview-clause-card {
  background: var(--panel-surface, rgba(0,0,0,0.02));
  border: 1px solid var(--glass-border);
  border-left: 3.5px solid var(--brand-primary);
  border-radius: 12px;
  padding: 12px 14px;
}

.preview-clause-card.danger {
  border-left-color: #ef4444;
}

.preview-clause-card.warning {
  border-left-color: #f59e0b;
}

.preview-clause-card .clause-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.preview-clause-card .clause-excerpt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-muted);
  background: rgba(0,0,0,0.03);
  padding: 6px 10px;
  border-radius: 6px;
  margin: 6px 0;
  line-height: 1.4;
}

[data-theme="dark"] .preview-clause-card .clause-excerpt {
  background: rgba(0,0,0,0.3);
}

.preview-counter-box {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 6px;
}

.preview-counter-box strong {
  font-size: 11px;
  color: #059669;
  display: block;
  margin-bottom: 2px;
}

[data-theme="dark"] .preview-counter-box strong {
  color: #34d399;
}

.preview-counter-box p {
  font-size: 12px;
  color: var(--text-main);
  margin: 0;
  line-height: 1.4;
}

.preview-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center !important;
  align-items: center !important;
  gap: 10px !important;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
  width: 100% !important;
  text-align: center !important;
}

.preview-modal-actions .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

/* ==========================================================================
   🔔 THEMED NOTIFICATION & ALERT SUITE (MATCHES LIGHT & DARK THEME)
   ========================================================================== */
.cs-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 420px;
  width: calc(100vw - 48px);
}

.cs-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md, 14px);
  background: #ffffff;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.05);
  color: #0f172a;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

[data-theme="dark"] .cs-toast {
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

[data-theme="light"] .cs-toast {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.05) !important;
  color: #0f172a !important;
}

.cs-toast.active {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.cs-toast-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cs-toast-icon-success { background: rgba(16, 185, 129, 0.14); }
.cs-toast-icon-danger, .cs-toast-icon-error { background: rgba(244, 63, 94, 0.14); }
.cs-toast-icon-warning { background: rgba(245, 158, 11, 0.14); }
.cs-toast-icon-info { background: rgba(99, 102, 241, 0.14); }

.cs-toast-success { border-left: 3.5px solid #10b981; }
.cs-toast-danger, .cs-toast-error { border-left: 3.5px solid #ef4444; }
.cs-toast-warning { border-left: 3.5px solid #f59e0b; }
.cs-toast-info { border-left: 3.5px solid #6366f1; }

.cs-toast-body {
  flex: 1;
  word-break: break-word;
  color: inherit;
}

[data-theme="light"] .cs-toast-body {
  color: #0f172a !important;
}

[data-theme="dark"] .cs-toast-body {
  color: #f8fafc !important;
}

.cs-toast-body a {
  color: var(--brand-primary);
  font-weight: 700;
  text-decoration: underline;
  margin-left: 4px;
}

.cs-toast-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1;
  transition: all 0.15s ease;
}

.cs-toast-close:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .cs-toast-close {
  color: #64748b !important;
}

[data-theme="light"] .cs-toast-close:hover {
  color: #0f172a !important;
  background: #f1f5f9 !important;
}

[data-theme="dark"] .cs-toast-close {
  color: #94a3b8 !important;
}

[data-theme="dark"] .cs-toast-close:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

/* ==========================================================================
   🛡️ THEMED CONFIRMATION MODAL (.themed-confirm-card)
   ========================================================================== */
.themed-confirm-card {
  max-width: 440px !important;
  padding: 24px 26px !important;
  text-align: left;
}

.confirm-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.confirm-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.confirm-icon-badge.bg-rose {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.confirm-icon-badge.bg-indigo {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.confirm-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}

.confirm-message {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--glass-border);
}

[data-theme="light"] .themed-confirm-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 60px -10px rgba(15, 23, 42, 0.18) !important;
}

[data-theme="light"] .confirm-title {
  color: #0f172a !important;
}

[data-theme="light"] .confirm-message {
  color: #475569 !important;
}

[data-theme="light"] .confirm-actions {
  border-top: 1px solid #e2e8f0 !important;
}

/* History View Navigation Top Banner */
.history-view-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 20px;
  margin-bottom: 20px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-sm);
  animation: fadeInDown 0.3s ease;
}

[data-theme="dark"] .history-view-banner {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

.history-view-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-back-history {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  text-decoration: none !important;
  color: var(--text-pure, #ffffff) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid var(--glass-border) !important;
  transition: var(--transition-clean) !important;
  flex-shrink: 0 !important;
}

[data-theme="light"] .btn-back-history {
  color: #0f172a !important;
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
}

.btn-back-history:hover {
  background: rgba(99, 102, 241, 0.18) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
  color: var(--brand-primary, #6366f1) !important;
  transform: scale(1.05);
}

/* Minimalist borderless status text (no background box) */
.history-view-tag-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--text-pure, #ffffff) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
}

[data-theme="light"] .history-view-tag-pill {
  color: #0f172a !important;
}

.history-view-tag-pill .view-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: #10b981 !important;
  box-shadow: 0 0 10px #10b981 !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

.history-view-banner-right {
  display: flex;
  align-items: center;
}

.btn-new-scan-review {
  border-radius: var(--radius-pill, 9999px) !important;
  font-weight: 600 !important;
}

.btn-scan-another-text-mobile {
  display: none;
}

.history-view-banner[style*="display: none"] {
  display: none !important;
}

/* 📱 Mobile Optimized Single-Row History View Topbar */
@media (max-width: 768px) {
  .history-view-banner {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 12px !important;
    margin-bottom: 16px !important;
    gap: 8px !important;
    border-radius: 14px !important;
  }

  .history-view-banner[style*="display: none"] {
    display: none !important;
  }

  .history-view-banner-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  .btn-back-history {
    width: 34px !important;
    height: 34px !important;
  }

  .history-view-tag-pill {
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  .btn-new-scan-review {
    padding: 7px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 9999px !important;
    white-space: nowrap !important;
    height: 34px !important;
  }

  .btn-scan-another-text-desktop {
    display: none !important;
  }

  .btn-scan-another-text-mobile {
    display: inline !important;
  }
}

/* Saved State for Save Button */
.btn-is-saved {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #059669 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  font-weight: 700 !important;
}

[data-theme="dark"] .btn-is-saved {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
}

/* ==========================================================================
   📱 COMPREHENSIVE MOBILE-FIRST RESPONSIVE ENGINE (CENTER ALIGNMENT & TOUCH UX)
   ========================================================================== */

/* Dropdown Stacking Context Safety (Fixes Dropdown Opening Behind Cards) */
.history-controls-card {
  position: relative !important;
  z-index: 50 !important;
}

.history-search-row {
  position: relative !important;
  z-index: 55 !important;
}

.history-filter-group {
  position: relative !important;
  z-index: 60 !important;
}

.cs-custom-select {
  position: relative !important;
  z-index: 70 !important;
}

.cs-select-dropdown {
  z-index: 99999 !important;
}

.history-table-container {
  position: relative !important;
  z-index: 1 !important;
}

@media (max-width: 900px) {
  .btn-desktop-auth {
    display: none !important;
  }
  .mobile-hamburger-btn {
    display: flex !important;
  }
}

@media (max-width: 768px) {
  /* ========================================================================
     UNIVERSAL MOBILE CENTER ALIGNMENT & RESPONSIVE LAYOUT
     ======================================================================== */

  /* 1. Header & Title Banners */
  .history-header-banner,
  .scanned-contract-title-bar {
    flex-direction: column !important;
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 14px !important;
  }

  .history-title-group,
  .contract-title-meta {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .history-badge,
  .contract-type-badge {
    margin: 0 auto 6px auto !important;
    display: inline-flex !important;
    justify-content: center !important;
  }

  .title-display-wrap {
    justify-content: center !important;
    text-align: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .scanned-contract-submeta {
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    gap: 12px !important;
  }

  .history-header-actions {
    justify-content: center !important;
    width: 100% !important;
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
  }

  /* 2. Risk Overview Hero Banner */
  .risk-overview-banner {
    flex-direction: column !important;
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 20px !important;
    padding: 20px 16px !important;
  }

  .risk-meter-col {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    justify-content: center !important;
    gap: 14px !important;
    width: 100% !important;
  }

  .risk-grade-info {
    align-items: center !important;
    text-align: center !important;
  }

  .risk-verdict-title,
  .risk-verdict-desc {
    text-align: center !important;
    margin: 0 auto !important;
  }

  .risk-stats-col {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 16px !important;
    width: 100% !important;
  }

  .risk-stat-item {
    align-items: center !important;
    text-align: center !important;
    flex: 1 1 90px !important;
  }

  /* 3. Metric Cards 2x2 on Tablet / Mobile */
  .history-metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .history-metric-card {
    padding: 12px 14px !important;
    align-items: center !important;
    text-align: center !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .metric-body {
    align-items: center !important;
    text-align: center !important;
  }

  /* 4. Controls & Search on Mobile */
  .history-search-row {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .history-search-box {
    width: 100% !important;
    min-width: 100% !important;
  }

  .history-filter-group {
    width: 100% !important;
    justify-content: space-between !important;
  }

  .cs-custom-select {
    flex: 1 !important;
  }

  .cs-select-trigger {
    width: 100% !important;
    justify-content: space-between !important;
  }

  /* 6. Filter Chips & Counter Tone Row (Screenshot 3) */
  .results-filter-bar {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 14px !important;
    width: 100% !important;
    margin-bottom: 22px !important;
  }

  .filter-chips-group {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .filter-chip-btn {
    justify-content: center !important;
    text-align: center !important;
    font-size: 12.5px !important;
    padding: 7px 14px !important;
  }

  .tone-switcher-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    text-align: center !important;
  }

  .tone-label {
    text-align: center !important;
    margin: 0 auto !important;
    font-size: 11.5px !important;
  }

  .tone-pill-toggle {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto !important;
  }

  .tone-option-btn {
    flex: 1 !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 7px 10px !important;
    font-size: 12px !important;
  }

  /* 7. Clause Cards (Screenshot 2) */
  .clause-card,
  .preview-clause-card {
    padding: 18px 16px !important;
    text-align: center !important;
  }

  .clause-card-header,
  .preview-clause-card .clause-card-header,
  .clause-header {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .clause-card-title-group {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 4px !important;
    width: 100% !important;
  }

  .clause-index {
    text-align: center !important;
    margin: 0 auto !important;
  }

  .clause-title {
    text-align: center !important;
    margin: 0 auto !important;
  }

  .clause-badge,
  .clause-category-pill {
    margin: 0 auto !important;
    text-align: center !important;
    display: inline-flex !important;
  }

  .clause-explanation {
    text-align: center !important;
    line-height: 1.55 !important;
  }

  .clause-original {
    text-align: center !important;
    align-items: center !important;
    border-left: 1px solid rgba(239, 68, 68, 0.25) !important;
    border-top: 4px solid #ef4444 !important;
    padding: 14px !important;
  }

  .predatory-label {
    justify-content: center !important;
    margin: 0 auto !important;
    text-align: center !important;
  }

  .predatory-quote {
    text-align: center !important;
  }

  .clause-comparison-grid,
  .clause-diff-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .counter-box,
  .preview-counter-box {
    padding: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    align-items: center !important;
  }

  .counter-header {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .counter-label {
    justify-content: center !important;
    margin: 0 auto !important;
    text-align: center !important;
  }

  .counter-text {
    text-align: center !important;
  }

  .btn-copy-clause-counter {
    margin: 0 auto !important;
  }

  /* 9. Pagination on Mobile */
  .history-pagination {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: center !important;
    text-align: center !important;
  }

  .pagination-pages {
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
}

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

  .history-metric-card {
    flex-direction: row !important;
    text-align: left !important;
  }

  .history-metric-card .metric-body {
    align-items: flex-start !important;
    text-align: left !important;
  }

  .mobile-offcanvas-drawer {
    width: 100vw !important;
    max-width: 100vw !important;
  }
}

/* ==========================================================================
   PROFILE MODAL TABS: DESKTOP ROW & CLEAN 2X2 GRID ON MOBILE (NO CLIPPING)
   ========================================================================== */
.profile-tabs-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 0 14px 0;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--glass-border);
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.profile-tab-btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
  box-sizing: border-box;
}

.profile-tab-btn svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.profile-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.profile-tab-btn.active {
  background: var(--brand-primary, #6366f1) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35) !important;
  font-weight: 700;
}

@media (max-width: 600px) {
  .profile-tabs-nav {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    margin-bottom: 20px !important;
  }

  .profile-tab-btn {
    width: 100% !important;
    padding: 11px 10px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    justify-content: center !important;
    text-align: center !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
  }

  [data-theme="dark"] .profile-tab-btn {
    background: rgba(15, 23, 42, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #94a3b8 !important;
  }

  .profile-tab-btn svg {
    flex-shrink: 0 !important;
    width: 14px !important;
    height: 14px !important;
  }

  .profile-tab-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-main) !important;
  }

  .profile-tab-btn.active {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
    border-color: rgba(99, 102, 241, 0.6) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45) !important;
    font-weight: 700 !important;
  }

  /* Plan & Billing Tab Mobile Center Alignment */
  #tab-subscription .plan-showcase-top {
    justify-content: center !important;
    text-align: center !important;
  }

  #tab-subscription .plan-price-large {
    text-align: center !important;
  }

  #tab-subscription .plan-expiry-info {
    display: flex !important;
    justify-content: center !important;
    text-align: center !important;
  }

  #tab-subscription .usage-meter-header {
    text-align: center !important;
    justify-content: space-between !important;
  }

  #tab-subscription .usage-stat-pills {
    text-align: center !important;
  }

  #tab-subscription .usage-stat-item {
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  #tab-subscription .billing-actions-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
  }

  #tab-subscription .billing-actions-grid .btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* ==========================================================================
   SCANNER VERTICAL CENTERING & SCROLL-MARGIN ON MOBILE
   ========================================================================== */
#scanner-wrapper,
.scanner-wrapper,
#scanner-guest-teaser,
.scanner-guest-teaser,
.hero-section {
  scroll-margin-top: 80px !important;
  scroll-margin-block: 80px !important;
}

/* ==========================================================================
   SAVED CONTRACTS: INTEGRATED TABLE SEARCH & CORNER FILTERS PANEL
   ========================================================================== */
.history-table-header-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
  background: var(--panel-surface, rgba(0, 0, 0, 0.015));
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  position: relative;
  flex-wrap: wrap;
}

[data-theme="dark"] .history-table-header-controls {
  background: rgba(15, 23, 42, 0.45);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.history-table-header-controls .history-search-box {
  flex: 1;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.history-search-box .history-search-input {
  width: 100%;
  padding: 10px 44px 10px 38px;
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  font-family: var(--font-base);
  font-size: 13.5px;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

[data-theme="dark"] .history-search-box .history-search-input,
[data-theme="dark"] .history-search-input {
  background: rgba(15, 23, 42, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="dark"] .history-search-box .history-search-input::placeholder,
[data-theme="dark"] .history-search-input::placeholder {
  color: #94a3b8 !important;
}

.history-search-box .history-search-input:focus {
  border-color: var(--brand-primary, #6366f1) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18) !important;
}

.history-search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  z-index: 2;
}

[data-theme="dark"] .history-search-box .search-icon {
  color: #94a3b8 !important;
}

.history-search-box .btn-clear-search {
  position: absolute;
  right: 42px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.search-filter-icon-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--brand-primary, #6366f1);
  display: none; /* Hidden on desktop where filters are inline */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  z-index: 3;
}

[data-theme="dark"] .search-filter-icon-btn {
  background: rgba(99, 102, 241, 0.22) !important;
  border-color: rgba(129, 140, 248, 0.4) !important;
  color: #c7d2fe !important;
}

.search-filter-icon-btn:hover,
.search-filter-icon-btn.active {
  background: #4f46e5 !important;
  color: #ffffff !important;
  border-color: #4f46e5 !important;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.5) !important;
}

[data-theme="dark"] .search-filter-icon-btn:hover,
[data-theme="dark"] .search-filter-icon-btn.active {
  background: #6366f1 !important;
  color: #ffffff !important;
  border-color: #818cf8 !important;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.6) !important;
}

.search-filter-icon-btn .filters-active-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.9);
}

.history-filter-controls-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .history-table-header-controls {
    padding: 12px !important;
    gap: 8px !important;
    align-items: center !important;
  }

  .history-table-header-controls .history-search-box {
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .history-table-header-controls .history-search-box .history-search-input {
    font-size: 13px !important;
    padding: 9px 44px 9px 34px !important;
    height: 42px !important;
    width: 100% !important;
  }

  /* Embedded filter icon visible inside search bar on mobile */
  .search-filter-icon-btn {
    display: inline-flex !important;
  }

  /* Per-page filter hidden on mobile */
  .filter-group-pagesize,
  #filter-group-pagesize {
    display: none !important;
  }

  .history-filter-controls-wrap {
    display: none; /* Collapsed by default on mobile */
    width: 100% !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 12px 0 4px 0 !important;
    border-top: 1px solid var(--glass-border) !important;
    animation: filterSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .history-filter-controls-wrap.filters-panel-open {
    display: flex !important;
  }

  @keyframes filterSlideDown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .history-filter-group {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  .history-filter-group .filter-lbl {
    font-size: 12.5px !important;
    font-weight: 500 !important;
    color: var(--text-dim) !important;
    flex-shrink: 0 !important;
    min-width: 55px !important;
    text-align: left !important;
  }

  .history-filter-group .cs-custom-select {
    flex: 1 !important;
    display: block !important;
    width: 100% !important;
  }

  .history-filter-group .cs-select-trigger {
    width: 100% !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
  }

  /* 📱 Mobile: Hide label text on clause Edit & Copy buttons, show only icons */
  .btn-edit-clause-counter .btn-counter-label,
  .btn-copy-clause-counter .btn-counter-label {
    display: none !important;
  }

  .btn-edit-clause-counter,
  .btn-copy-clause-counter {
    padding: 6px 8px !important;
    gap: 0 !important;
    min-width: 30px !important;
    height: 28px !important;
    justify-content: center !important;
  }

  .btn-quick-reset-clause {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 4px !important;
    width: auto !important;
    height: auto !important;
    min-width: unset !important;
    transform: none !important;
  }

  /* 📱 Mobile: Saved Contracts Table Streamlined Card Layout (Zero Horizontal Overflow) */
  .history-table-container {
    overflow-x: hidden !important;
    width: 100% !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
  }

  .history-table {
    display: block !important;
    width: 100% !important;
  }

  .history-table thead {
    display: none !important;
  }

  .history-table tbody {
    display: block !important;
    width: 100% !important;
  }

  .history-table tr.history-table-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 14px !important;
    gap: 8px !important;
    border-bottom: 1px solid var(--glass-border) !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .history-table td {
    padding: 0 !important;
    border: none !important;
  }

  .history-table .col-checkbox {
    display: flex !important;
    align-items: center !important;
    width: auto !important;
    flex-shrink: 0 !important;
  }

  .history-table .col-title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .history-table .table-title-cell {
    gap: 8px !important;
  }

  .history-table .table-doc-icon {
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }

  .history-table .table-title-meta {
    min-width: 0 !important;
    flex: 1 !important;
  }

  .history-table .item-contract-name {
    font-size: 13px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 135px !important;
    display: block !important;
  }

  .history-table .item-contract-client {
    font-size: 11px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 135px !important;
    display: block !important;
  }

  /* Hide bulky non-essential columns on mobile */
  .history-table .col-date,
  .history-table .col-traps,
  .history-table .col-exposure {
    display: none !important;
  }

  /* Compact Score Pill */
  /* Clean Borderless Score on Mobile */
  .history-table .col-score {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
  }

  .history-table .col-score .risk-pill {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    font-size: 12px !important;
    gap: 4px !important;
    white-space: nowrap !important;
  }

  .history-table .col-score .risk-pill small {
    display: none !important;
  }

  /* Compact Action View / Delete Button on Mobile */
  .history-table .col-actions {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    justify-content: flex-end !important;
  }

  .history-table .table-action-btns {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  /* Default on mobile: Clean boxless Eye icon */
  .history-table .table-action-btns .btn-open-audit-preview {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    min-width: auto !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #ffffff !important;
  }

  [data-theme="light"] .history-table .table-action-btns .btn-open-audit-preview {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #0f172a !important;
  }

  .history-table .table-action-btns .btn-open-audit-preview span {
    display: none !important;
  }

  .history-table .table-action-btns .btn-icon-delete {
    display: none !important;
  }

  /* 🗑️ When marked/checked on mobile: Clean boxless White Delete trash icon! */
  .history-table tr.row-selected .table-action-btns .btn-open-audit-preview,
  .history-table .history-table-row.row-selected .table-action-btns .btn-open-audit-preview {
    display: none !important;
  }

  .history-table tr.row-selected .table-action-btns .btn-icon-delete,
  .history-table .history-table-row.row-selected .table-action-btns .btn-icon-delete {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #ffffff !important;
    transition: var(--transition-clean) !important;
    animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  [data-theme="light"] .history-table tr.row-selected .table-action-btns .btn-icon-delete,
  [data-theme="light"] .history-table .history-table-row.row-selected .table-action-btns .btn-icon-delete {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #0f172a !important;
  }
}

/* ==========================================================================
   LUXURY MODERN APP FOOTER
   ========================================================================== */
.app-footer {
  width: 100%;
  background: var(--bg-body, #0a0d14);
  border-top: 1px solid var(--border-soft, rgba(255, 255, 255, 0.08));
  padding: 56px 0 40px 0;
  margin-top: 60px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

[data-theme="light"] .app-footer {
  background: #f8fafc;
  border-top-color: #e2e8f0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.footer-main-grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 48px;
  align-items: flex-start;
  box-sizing: border-box;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
}

.footer-mission-text {
  font-size: 13.5px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.6;
  max-width: 400px;
  margin: 0;
}

.footer-bottom-bar {
  border-top: 1px solid var(--border-soft, rgba(255, 255, 255, 0.06));
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

[data-theme="light"] .footer-bottom-bar {
  border-top-color: #e2e8f0;
}

.footer-legal-notice {
  font-size: 12px;
  color: var(--text-dim, #64748b);
  line-height: 1.5;
  margin: 0;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-link-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link-heading {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-pure, #f8fafc);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

[data-theme="light"] .footer-link-heading {
  color: #0f172a;
}

.footer-link {
  font-size: 13px;
  color: var(--text-muted, #94a3b8);
  text-decoration: none;
  transition: color 0.2s ease;
  line-height: 1.4;
}

.footer-link:hover {
  color: var(--brand-primary, #6366f1);
}

.footer-lang-item {
  font-size: 12.5px;
  color: var(--text-dim, #64748b);
  line-height: 1.4;
}

@media (max-width: 860px) {
  .app-footer {
    padding: 44px 0 32px 0;
    margin-top: 40px;
  }

  .footer-main-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-links-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

@media (max-width: 480px) {
  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ==========================================================================
   DEDICATED MODALS ARCHITECTURE (PRICING, HOW IT WORKS, FAQ & SUPPORT)
   ========================================================================== */

.app-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.app-modal-dialog {
  background: #080c14;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  width: 100%;
  max-width: 660px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.95), 0 0 50px rgba(99, 102, 241, 0.1);
  transform: translate3d(0, 16px, 0);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  contain: layout;
}

.app-modal-overlay.active .app-modal-dialog {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

.modal-dialog-wide {
  max-width: 980px;
}

.modal-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(12, 17, 28, 0.92);
  flex-shrink: 0;
  z-index: 2;
  transform: translateZ(0);
}

.modal-header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.modal-header-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bg-indigo-subtle { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.bg-emerald-subtle { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.bg-purple-subtle { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

.modal-main-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-pure, #ffffff);
  margin: 0 0 4px 0;
  letter-spacing: -0.01em;
}

.modal-main-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}

.btn-modal-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted, #94a3b8);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-pure, #ffffff);
}

.modal-dialog-body {
  padding: 28px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.4) rgba(0, 0, 0, 0.1);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: scroll-position;
}

.modal-dialog-body::-webkit-scrollbar {
  width: 6px;
}

.modal-dialog-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.modal-dialog-body::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.35);
  border-radius: 4px;
}

.modal-dialog-body::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.6);
}

/* GPU Stabilized Modal Cards for Rock-Solid Jitter-Free Scrolling */
.current-tier-banner,
.pricing-modal-controls,
.pricing-cards-grid,
.pricing-card-box,
.how-steps-grid,
.how-step-card,
.interactive-demo-container,
.demo-preview-box,
.faq-support-grid,
.faq-accordion-col,
.faq-accordion-item,
.faq-support-form-col,
.legal-tabs-bar,
.legal-pane-content {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Light Theme Modal Dialog */
[data-theme="light"] .app-modal-dialog {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18);
}

[data-theme="light"] .modal-dialog-header {
  border-bottom-color: #e2e8f0;
  background: #f8fafc;
}

[data-theme="light"] .modal-main-title {
  color: #0f172a;
}

[data-theme="light"] .btn-modal-close {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

/* ==========================================================================
   1. PRICING MODAL ELEMENTS
   ========================================================================== */

.current-tier-banner {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

[data-theme="light"] .current-tier-banner {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.06) 0%, rgba(16, 185, 129, 0.04) 100%);
  border-color: #cbd5e1;
}

.current-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 6px;
}

[data-theme="light"] .current-tier-badge {
  color: #059669;
}

.pulse-green-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.current-tier-desc {
  font-size: 0.85rem;
  color: var(--text-muted, #94a3b8);
  margin: 0;
  max-width: 480px;
}

.current-tier-right {
  display: flex;
  gap: 16px;
}

.tier-stat-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft, rgba(255, 255, 255, 0.08));
  padding: 10px 16px;
  border-radius: 12px;
  text-align: center;
  min-width: 120px;
}

[data-theme="light"] .tier-stat-badge {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.tier-stat-badge .lbl {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
  margin-bottom: 2px;
}

.tier-stat-badge .val {
  font-size: 1.1rem;
  font-weight: 800;
}

.pricing-modal-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.billing-toggle-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-soft, rgba(255, 255, 255, 0.12));
}

[data-theme="light"] .billing-toggle-wrapper {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.billing-opt {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  transition: color 0.2s ease;
  user-select: none;
}

.billing-opt.active {
  color: var(--text-pure, #ffffff);
  font-weight: 700;
}

[data-theme="light"] .billing-opt.active {
  color: #0f172a;
}

.badge-save {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  margin-left: 4px;
}

/* High-Visibility Interactive Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 26px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2.5px;
  bottom: 2.5px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  border-color: #818cf8;
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.5);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
  background-color: #ffffff;
}

[data-theme="light"] .toggle-slider {
  background: #cbd5e1;
  border-color: #94a3b8;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .toggle-switch input:checked + .toggle-slider {
  background: #4f46e5;
  border-color: #4338ca;
}

/* Sleek Currency Selector - No Clunky Boxes */
.currency-pills-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  padding: 0;
  border: none;
}

.currency-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted, #94a3b8);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.currency-pill:hover {
  color: var(--text-pure, #ffffff);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.25);
}

.currency-pill.active {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  border-color: #818cf8;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
  font-weight: 700;
}

.currency-pill .currency-symbol {
  font-size: 0.95rem;
  font-weight: 700;
}

.currency-pill .currency-code {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

[data-theme="light"] .currency-pill {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

[data-theme="light"] .currency-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

[data-theme="light"] .currency-pill.active {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4338ca;
}

/* Profile Modal Dialog & Tabs Symmetry */
.auth-modal-card.profile-modal-card,
.profile-modal-card {
  max-width: 860px !important;
  width: 94% !important;
  padding: 28px 32px !important;
  box-sizing: border-box !important;
}

.profile-tabs-nav {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 0 0 24px 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.profile-tab-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  gap: 6px !important;
  padding: 10px 6px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  text-align: center !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

@media (max-width: 820px) {
  .profile-tabs-nav {
    display: flex !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    padding-bottom: 8px !important;
  }
  .profile-tab-btn {
    flex-shrink: 0 !important;
    width: auto !important;
    padding: 8px 12px !important;
  }
}

.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
  padding-top: 14px;
}

.pricing-cards-grid .pricing-card-box {
  background: #0d121f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  height: 100%;
  min-height: 520px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  transform: none !important;
  overflow: visible !important;
}

.pricing-card-box:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.pricing-card-box.highlighted-tier {
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.16) 0%, #0d121f 100%);
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 28px rgba(99, 102, 241, 0.18);
}

[data-theme="light"] .pricing-card-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .pricing-card-box.highlighted-tier {
  background: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.12);
}

.tier-popular-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #6366f1, #4f46e5);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 14px;
  border-radius: 12px;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.plan-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-pure, #ffffff);
  margin: 0 0 6px 0;
}

.plan-card-tagline {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  margin: 0 0 16px 0;
  min-height: 38px;
  line-height: 1.4;
}

.plan-card-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .plan-card-price-wrap {
  border-bottom-color: #e2e8f0;
}

.plan-perks-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.84rem;
}

.plan-perks-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-main, #e2e8f0);
}

.plan-perks-list li svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.plan-perks-list li span {
  flex: 1;
  text-align: left;
}

[data-theme="light"] .plan-perks-list li {
  color: #334155;
}

.plan-perks-list li.perk-disabled {
  color: var(--text-dim, #64748b);
  opacity: 0.65;
}

.plan-card-action {
  margin-top: auto;
  padding-top: 14px;
}

/* ==========================================================================
   2. HOW IT WORKS MODAL ELEMENTS
   ========================================================================== */

.how-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.how-step-card {
  background: #0d121f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  position: relative;
}

[data-theme="light"] .how-step-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.how-step-num {
  font-size: 2rem;
  font-weight: 900;
  color: rgba(99, 102, 241, 0.25);
  position: absolute;
  top: 14px;
  right: 18px;
}

.how-step-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

[data-theme="light"] .how-step-icon {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.how-step-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-pure, #ffffff);
  margin: 0 0 8px 0;
}

.how-step-desc {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.5;
  margin: 0;
}

.interactive-demo-container {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-soft, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

[data-theme="light"] .interactive-demo-container {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.interactive-demo-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}

.demo-clause-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.btn-demo-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft, rgba(255, 255, 255, 0.12));
  color: var(--text-secondary, #cbd5e1);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-demo-chip:hover, .btn-demo-chip.active {
  background: var(--brand-primary, #6366f1);
  border-color: var(--brand-primary, #6366f1);
  color: #ffffff;
}

.demo-preview-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.demo-clause-original, .demo-clause-redline {
  padding: 16px;
  border-radius: 12px;
  font-size: 0.84rem;
  line-height: 1.5;
}

.demo-clause-original {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.demo-clause-redline {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

[data-theme="light"] .demo-clause-original {
  color: #b91c1c;
}

[data-theme="light"] .demo-clause-redline {
  color: #047857;
}

.badge-danger-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.badge-safe-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

/* ==========================================================================
   3. FAQ & SUPPORT HUB MODAL ELEMENTS
   ========================================================================== */

.faq-support-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

.faq-col-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-pure, #ffffff);
  margin: 0 0 14px 0;
}

.faq-accordion-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.faq-accordion-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  background: #0d121f;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.faq-accordion-item.active {
  border-color: rgba(99, 102, 241, 0.45);
  background: #111827;
}

[data-theme="light"] .faq-accordion-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.faq-acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: none;
  border: none;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-pure, #ffffff);
  text-align: left;
  cursor: pointer;
  gap: 12px;
  line-height: 1.35;
}

[data-theme="light"] .faq-acc-trigger {
  color: #0f172a;
}

.faq-acc-trigger span {
  flex: 1;
  word-break: break-word;
}

.faq-acc-icon {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-accordion-item.active .faq-acc-icon {
  transform: rotate(180deg);
}

.faq-acc-body {
  padding: 0 16px 14px 16px;
  display: none;
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.55;
}

.faq-accordion-item.active .faq-acc-body {
  display: block;
}

.faq-support-form-col {
  background: #0d121f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  min-width: 0;
}

[data-theme="light"] .faq-support-form-col {
  background: #f8fafc;
  border-color: #e2e8f0;
}

#form-support-ticket .auth-field {
  margin-bottom: 10px;
}

#form-support-ticket .auth-label {
  font-size: 0.76rem;
  margin-bottom: 4px;
}

#form-support-ticket .auth-input {
  font-size: 0.82rem;
  padding: 8px 12px;
  height: 38px;
  box-sizing: border-box;
  width: 100%;
}

#form-support-ticket textarea.auth-input {
  height: 72px;
  min-height: 60px;
  resize: vertical;
}

#form-support-ticket .btn-primary {
  padding: 9px 16px;
  font-size: 0.84rem;
  margin-top: 4px;
}

.support-channels-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.support-channel-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
}

@media (max-width: 900px) {
  .faq-support-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ==========================================================================
   CLIENT PORTFOLIO TAG FILTER PILLS BAR
   ========================================================================== */

.client-tags-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-soft, rgba(255, 255, 255, 0.06));
  overflow-x: auto;
  scrollbar-width: none;
}

.client-tags-filter-bar::-webkit-scrollbar {
  display: none;
}

.client-tags-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
  margin-right: 4px;
  white-space: nowrap;
}

.client-tag-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft, rgba(255, 255, 255, 0.08));
  color: var(--text-secondary, #cbd5e1);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.client-tag-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-pure, #ffffff);
}

.client-tag-pill.active {
  background: var(--brand-primary, #6366f1);
  border-color: var(--brand-primary, #6366f1);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .client-tags-filter-bar {
  border-bottom-color: #e2e8f0;
}

[data-theme="light"] .client-tag-pill {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

[data-theme="light"] .client-tag-pill.active {
  background: #4f46e5;
  color: #ffffff;
}

/* ==========================================================================
   RESPONSIVE STYLES FOR DEDICATED MODALS
   ========================================================================== */

@media (max-width: 900px) {
  .pricing-cards-grid {
    grid-template-columns: 1fr;
  }
  .how-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .demo-preview-box {
    grid-template-columns: 1fr;
  }
  .faq-support-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-modal-dialog {
    border-radius: 16px;
    max-height: 95vh;
  }
  .modal-dialog-header {
    padding: 16px 20px;
  }
  .modal-dialog-body {
    padding: 20px 16px;
  }
  .current-tier-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .current-tier-right {
    width: 100%;
  }
  .tier-stat-badge {
    flex: 1;
  }
  .how-steps-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   LUXURY APP FOOTER STYLING & INTERACTION
   ========================================================================== */
.app-footer {
  background: #060911;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 60px 0 32px 0;
  margin-top: 60px;
  position: relative;
  z-index: 10;
}

[data-theme="light"] .app-footer {
  background: #f8fafc;
  border-top-color: #e2e8f0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.footer-main-grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 48px;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-mission-text {
  font-size: 0.86rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.6;
  max-width: 340px;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-link-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link-heading {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-pure, #ffffff);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

[data-theme="light"] .footer-link-heading {
  color: #0f172a;
}

.footer-link {
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
  cursor: pointer;
}

.footer-link:hover {
  color: #818cf8;
  transform: translateX(2px);
}

.footer-lang-item,
.footer-lang-btn {
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
  background: transparent;
  border: none;
  padding: 2px 0;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  display: block;
}

.footer-lang-btn:hover {
  color: #818cf8;
  transform: translateX(2px);
}

.footer-bottom-bar {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-theme="light"] .footer-bottom-bar {
  border-top-color: #e2e8f0;
}

.footer-legal-notice {
  font-size: 0.78rem;
  color: var(--text-dim, #64748b);
}

/* ==========================================================================
   LEGAL, PRIVACY & SECURITY TRUST CENTER MODAL
   ========================================================================== */
.legal-tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  margin-bottom: 20px;
  overflow-x: auto;
}

[data-theme="light"] .legal-tabs-nav {
  border-bottom-color: #e2e8f0;
}

.legal-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #94a3b8);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

[data-theme="light"] .legal-tab-btn {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

.legal-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

[data-theme="light"] .legal-tab-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.legal-tab-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: #6366f1;
  color: #818cf8;
}

[data-theme="light"] .legal-tab-btn.active {
  background: #e0e7ff;
  border-color: #6366f1;
  color: #4338ca;
}

.legal-pane {
  display: none;
  animation: fadeIn 0.2s ease forwards;
}

.legal-pane.active {
  display: block;
}

.legal-pane h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-pure, #ffffff);
  margin-bottom: 12px;
}

[data-theme="light"] .legal-pane h3 {
  color: #0f172a;
}

.legal-pane h4 {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-pure, #ffffff);
  margin: 18px 0 8px 0;
}

[data-theme="light"] .legal-pane h4 {
  color: #1e293b;
}

.legal-pane p {
  font-size: 0.86rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.6;
  margin-bottom: 10px;
}

[data-theme="light"] .legal-pane p {
  color: #475569;
}

.legal-pane ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.legal-pane li {
  font-size: 0.86rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.6;
  margin-bottom: 6px;
}

[data-theme="light"] .legal-pane li {
  color: #475569;
}

.legal-highlight-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}

[data-theme="light"] .legal-highlight-card {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.legal-highlight-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.whitepaper-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.whitepaper-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 14px;
}

[data-theme="light"] .whitepaper-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.whitepaper-card strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text-pure, #ffffff);
  margin-bottom: 6px;
}

[data-theme="light"] .whitepaper-card strong {
  color: #0f172a;
}

.whitepaper-card p {
  font-size: 0.8rem;
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .footer-main-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .whitepaper-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SAAS CHECKOUT MODAL & ORDER CONFIRMATION SUITE
   ========================================================================== */
.checkout-modal-dialog {
  max-width: 840px;
  width: 95%;
  background: var(--bg-card, #0f172a);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.12));
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(99, 102, 241, 0.15);
}

.checkout-modal-body {
  padding: 18px 24px 24px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 768px) {
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Summary Card */
.checkout-summary-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

[data-theme="light"] .checkout-summary-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.checkout-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .checkout-plan-header {
  border-bottom-color: #e2e8f0;
}

.checkout-plan-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(99, 102, 241, 0.18);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.35);
  margin-bottom: 4px;
}

.checkout-plan-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-pure, #ffffff);
  margin: 0;
}

[data-theme="light"] .checkout-plan-title {
  color: #0f172a;
}

.checkout-plan-price-display {
  text-align: right;
}

.checkout-currency-symbol {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-pure, #ffffff);
}

.checkout-price-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-pure, #ffffff);
}

[data-theme="light"] .checkout-currency-symbol,
[data-theme="light"] .checkout-price-val {
  color: #0f172a;
}

.checkout-price-cadence {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}

.checkout-billing-switch-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 6px 12px;
  border-radius: 10px;
}

[data-theme="light"] .checkout-billing-switch-wrap {
  background: #ffffff;
  border-color: #cbd5e1;
}

.checkout-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
}

.checkout-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted, #94a3b8);
}

.checkout-breakdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 2px 0;
}

[data-theme="light"] .checkout-breakdown-divider {
  background: #e2e8f0;
}

.checkout-total-row {
  font-size: 0.95rem;
  color: var(--text-pure, #ffffff);
}

[data-theme="light"] .checkout-total-row {
  color: #0f172a;
}

.checkout-trust-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 0.74rem;
  color: var(--text-muted, #94a3b8);
}

[data-theme="light"] .checkout-trust-box {
  border-top-color: #e2e8f0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Payment Card */
.checkout-payment-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.checkout-security-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(99, 102, 241, 0.12));
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 8px 12px;
  border-radius: 10px;
}

.security-banner-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.security-banner-text {
  display: flex;
  flex-direction: column;
  font-size: 0.76rem;
  color: #d1fae5;
}

[data-theme="light"] .security-banner-text {
  color: #065f46;
}

/* 2x2 Responsive Gateway Selector Grid */
.payment-method-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 480px) {
  .payment-method-selector {
    grid-template-columns: 1fr;
  }
}

.payment-method-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
}

[data-theme="light"] .payment-method-card {
  background: #ffffff;
  border-color: #cbd5e1;
}

.payment-method-card.active,
.payment-method-card:hover {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .payment-method-card.active {
  border-color: #4f46e5;
  background: rgba(79, 70, 229, 0.05);
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.08);
}

.payment-method-card input[type="radio"] {
  accent-color: #6366f1;
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.payment-method-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.payment-method-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-pure, #ffffff);
}

[data-theme="light"] .payment-method-title-row {
  color: #0f172a;
}

.card-brand-badges {
  display: flex;
  gap: 3px;
}

.badge-card-brand {
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-pure, #ffffff);
}

[data-theme="light"] .badge-card-brand {
  background: #e2e8f0;
  color: #334155;
}

.badge-upi-tag {
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.payment-method-sub {
  font-size: 0.70rem;
  color: var(--text-muted, #94a3b8);
}

.checkout-card-form,
.checkout-upi-form,
.checkout-paypal-form,
.checkout-razorpay-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkout-gateway-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .checkout-gateway-banner {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.checkout-gateway-banner.paypal-theme {
  background: rgba(255, 196, 57, 0.08);
  border-color: rgba(255, 196, 57, 0.35);
}

.checkout-gateway-banner.razorpay-theme {
  background: rgba(14, 116, 230, 0.08);
  border-color: rgba(14, 116, 230, 0.35);
}

.gateway-banner-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.paypal-banner-logo {
  background: #003087;
  color: #0079C1;
}

.razorpay-banner-logo {
  background: #0c2340;
  color: #0284c7;
}

.gateway-banner-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 0.80rem;
  color: var(--text-pure, #ffffff);
}

[data-theme="light"] .gateway-banner-text {
  color: #0f172a;
}

.gateway-banner-text span {
  font-size: 0.70rem;
  color: var(--text-muted, #94a3b8);
}

.btn-paypal-express {
  background: #ffc439 !important;
  color: #003087 !important;
  box-shadow: 0 6px 16px rgba(255, 196, 57, 0.35) !important;
  font-weight: 800 !important;
}

.btn-paypal-express:hover {
  background: #ffb700 !important;
}

.btn-razorpay-express {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35) !important;
}

.checkout-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.checkout-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.checkout-field-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}

.checkout-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.84rem;
  color: var(--text-pure, #ffffff);
  outline: none;
  transition: border-color 0.2s ease;
}

[data-theme="light"] .checkout-input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.checkout-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon-right {
  position: absolute;
  right: 10px;
  color: var(--text-muted, #94a3b8);
  pointer-events: none;
}

.checkout-action-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.btn-checkout-submit {
  padding: 11px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
  transition: all 0.2s ease;
}

.btn-checkout-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.45);
}

.checkout-fine-print {
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}

.checkout-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Success Receipt Modal */
.success-modal-dialog {
  position: relative;
  max-width: 480px;
  width: 90%;
  background: var(--bg-card, #0f172a);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  border-radius: 24px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 50px rgba(16, 185, 129, 0.2);
}

.btn-modal-close-corner {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
}

.success-icon-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-subtitle-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #10b981;
  margin-bottom: 6px;
}

.receipt-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  font-size: 0.86rem;
}

[data-theme="light"] .receipt-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.receipt-label {
  color: var(--text-muted, #94a3b8);
}

.badge-status-active {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

.receipt-code {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
}

.success-actions-row {
  margin-top: 10px;
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.08); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   ⚡ ZERO-FOUC AUTH PRE-RENDER (ELIMINATES GUEST FLASH ON REFRESH)
   ========================================================================== */
html.is-auth-ready #scanner-guest-teaser,
html.is-auth-ready #btn-open-login,
html.is-auth-ready #btn-open-signup,
html.is-auth-ready #mobile-auth-actions {
  display: none !important;
}

html.is-auth-ready #scanner-wrapper {
  display: block !important;
}

html.is-auth-ready #user-dropdown-container {
  display: inline-flex !important;
}

html.is-auth-ready #mobile-user-card {
  display: flex !important;
}

html.is-auth-ready #mobile-drawer-brand {
  display: none !important;
}

/* ==========================================================================
   👑 SUPER ADMIN COMMAND CENTER & ANALYTICS DASHBOARD STYLES
   ========================================================================== */
html.admin-html-page,
html:has(.admin-body),
.admin-body {
  background: var(--bg-main, #090d16);
  color: var(--text-pure, #ffffff);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

[data-theme="light"] html.admin-html-page,
[data-theme="light"] .admin-body {
  background: #f5f0e6 !important;
  color: #1c1917 !important;
}

.admin-app-wrapper {
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 1. PIN Lock Overlay */
.admin-pin-lock-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(99, 102, 241, 0.15), rgba(9, 13, 22, 0.98) 70%);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}

[data-theme="light"] .admin-pin-lock-overlay {
  background: #f5f0e6 !important;
  background-image: 
    radial-gradient(circle at 20% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 85%, rgba(168, 85, 247, 0.06) 0%, transparent 40%),
    linear-gradient(135deg, #f5f0e6 0%, #eae4d8 100%) !important;
  backdrop-filter: none !important;
}

.admin-pin-card {
  width: 100%;
  max-width: 440px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 38px 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.2);
  text-align: center;
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

[data-theme="light"] .admin-pin-card {
  background: #faf6ee !important;
  border: 1.5px solid rgba(44, 38, 28, 0.12) !important;
  box-shadow: 0 20px 50px rgba(44, 38, 28, 0.12), 0 4px 12px rgba(44, 38, 28, 0.05) !important;
  color: #1c1917 !important;
}

.admin-shield-icon, .admin-pin-logo {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(79, 70, 229, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.25);
}

.admin-pin-header {
  width: 100%;
  text-align: center;
}

.admin-pin-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 8px 0;
  color: var(--text-pure, #ffffff);
}

.admin-pin-header p {
  font-size: 0.86rem;
  color: var(--text-muted, #94a3b8);
  margin: 0 0 24px 0;
  line-height: 1.45;
}

.admin-pin-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.pin-input-wrap {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 14px;
}

.admin-pin-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1.8rem;
  text-align: center;
  letter-spacing: 14px;
  color: var(--text-pure, #ffffff);
  font-family: 'JetBrains Mono', monospace;
  outline: none;
  transition: all 0.2s ease;
  display: block;
}

[data-theme="light"] .admin-pin-input {
  background: #ffffff !important;
  border-color: rgba(44, 38, 28, 0.18) !important;
  color: #1c1917 !important;
  box-shadow: inset 0 2px 4px rgba(44, 38, 28, 0.04) !important;
}

.admin-pin-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.input-shake {
  animation: shake 0.4s ease-in-out;
  border-color: #ef4444 !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.pin-error-msg {
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 14px;
  width: 100%;
  text-align: center;
}

.btn-unlock-admin {
  width: 100% !important;
  box-sizing: border-box !important;
  height: 48px;
  padding: 0 20px;
  font-size: 0.94rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.35);
  transition: all 0.2s ease;
}

.btn-unlock-admin:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.45);
}

.pin-card-footer {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  width: 100%;
}

.footer-dot-sep {
  color: var(--text-dim, #64748b);
  opacity: 0.45;
  margin: 0 5px;
}

.footer-admin-link {
  color: var(--text-muted, #94a3b8);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-admin-link:hover {
  color: #6366f1;
  text-decoration: underline;
}

/* Clean Minimal Footer */
.app-site-footer-minimal {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px 0 32px 0;
  margin-top: 50px;
  text-align: center;
  background: transparent;
}

[data-theme="light"] .app-site-footer-minimal {
  border-top-color: #e2e8f0;
}

.footer-minimal-content {
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.6;
}

.footer-minimal-content strong {
  color: var(--text-pure, #ffffff);
  font-weight: 700;
}

[data-theme="light"] .footer-minimal-content strong {
  color: #0f172a;
}

.secret-admin-dot {
  color: inherit;
  text-decoration: none;
  cursor: default;
  display: inline;
}

.secret-admin-dot:hover {
  color: #6366f1;
  cursor: pointer;
}

.link-back-site {
  color: #6366f1;
  text-decoration: none;
  font-weight: 600;
  margin-top: 4px;
}

.link-back-site:hover {
  text-decoration: underline;
}

/* 2. Top Global Header */
.admin-top-header {
  height: 72px;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
}

[data-theme="light"] .admin-top-header {
  background: rgba(245, 240, 230, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(44, 38, 28, 0.1) !important;
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.admin-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.admin-brand-name {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.admin-badge-super {
  font-size: 0.64rem;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.28);
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

[data-theme="light"] .admin-badge-super {
  background: #eef2ff;
  color: #4f46e5;
  border-color: #c7d2fe;
}

.admin-live-pulse-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: #10b981;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-green 1.8s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-currency-selector {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .admin-currency-selector {
  background: #eae3d5 !important;
  border-color: rgba(44, 38, 28, 0.12) !important;
}

.admin-curr-btn {
  background: transparent;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-curr-btn.active {
  background: #6366f1;
  color: #ffffff;
}

/* 3. Main Admin Layout */
.admin-main-layout {
  display: flex;
  min-height: calc(100vh - 72px);
}

.admin-sidebar {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  flex: 0 0 260px;
  flex-shrink: 0;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.5);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 14px;
}

[data-theme="light"] .admin-sidebar {
  background: #eae4d8 !important;
  border-right: 1px solid rgba(44, 38, 28, 0.1) !important;
}

.admin-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
}

.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-pure, #ffffff);
}

[data-theme="light"] .admin-nav-item:hover {
  background: #ded5c3 !important;
  color: #1c1917 !important;
}

.admin-nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
  border-left: 3px solid #6366f1;
  color: #6366f1;
  font-weight: 700;
}

.nav-counter-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #94a3b8);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .nav-counter-badge {
  background: #dfd7c7 !important;
  color: #57534e !important;
  border-color: rgba(44, 38, 28, 0.1) !important;
}

.nav-counter-badge.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.25);
}

.admin-sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

[data-theme="light"] .admin-sidebar-footer {
  border-top: 1px solid rgba(44, 38, 28, 0.1) !important;
}

.admin-owner-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .admin-owner-card {
  background: #f5f0e6 !important;
  border: 1px solid rgba(44, 38, 28, 0.1) !important;
}

.admin-avatar {
  width: 34px;
  height: 34px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #818cf8;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme="light"] .admin-avatar {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4f46e5;
}

.admin-owner-info {
  display: flex;
  flex-direction: column;
}

.admin-owner-info strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-pure, #ffffff);
}

.admin-owner-info span {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}

.admin-owner-info span {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}

/* 4. Content Viewport */
.admin-content-viewport {
  flex: 1;
  min-width: 0;
  padding: 28px 32px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-main, #090d16);
}

[data-theme="light"] .admin-content-viewport {
  background: #f5f0e6 !important;
}

.admin-tab-pane {
  display: none;
}

.admin-tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

.tab-pane-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.pane-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 6px 0;
  color: var(--text-pure, #ffffff);
}

.pane-sub {
  font-size: 0.88rem;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}

/* 5. Metric Cards Grid */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
}

[data-theme="light"] .admin-stat-card {
  background: #faf6ee !important;
  border: 1px solid rgba(44, 38, 28, 0.09) !important;
  box-shadow: 0 4px 20px rgba(44, 38, 28, 0.05) !important;
}

.stat-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrap.bg-emerald { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.stat-icon-wrap.bg-blue { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.stat-icon-wrap.bg-indigo { background: rgba(99, 102, 241, 0.15); color: #6366f1; }
.stat-icon-wrap.bg-purple { background: rgba(168, 85, 247, 0.15); color: #a855f7; }

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 900;
  font-family: 'Inter', sans-serif;
  color: var(--text-pure, #ffffff);
  line-height: 1.2;
}

.stat-trend {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 4px;
  font-weight: 500;
}

.text-emerald { color: #10b981 !important; }
.text-purple { color: #a855f7 !important; }

/* 6. Overview Split Section */
.admin-overview-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.admin-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(8px);
}

[data-theme="light"] .admin-card {
  background: #faf6ee !important;
  border: 1px solid rgba(44, 38, 28, 0.09) !important;
  box-shadow: 0 4px 20px rgba(44, 38, 28, 0.05) !important;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.admin-card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-pure, #ffffff);
}

.card-header-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  padding: 3px 8px;
  border-radius: 6px;
}

.admin-card-sub {
  font-size: 0.82rem;
  color: var(--text-muted, #94a3b8);
  margin: 0 0 20px 0;
}

/* Gateway Progress Bars */
.admin-gateway-progress-row {
  margin-bottom: 16px;
}

.gw-row-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 6px;
  color: var(--text-pure, #ffffff);
}

.gw-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

[data-theme="light"] .gw-progress-bar-bg {
  background: #e2e8f0;
}

.gw-progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.live-activity-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Activity Feed */
.admin-activity-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

[data-theme="light"] .activity-feed-item {
  background: #f2ece0 !important;
  border: 1px solid rgba(44, 38, 28, 0.06) !important;
}

.feed-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feed-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.feed-info strong {
  font-size: 0.8rem;
  color: var(--text-pure, #ffffff);
}

.feed-info span {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}

.feed-badge-paid {
  font-size: 0.68rem;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

/* 7. Tables & Controls */
.admin-filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.admin-search-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.86rem;
  color: var(--text-pure, #ffffff);
  outline: none;
}

[data-theme="light"] .admin-search-input {
  background: #faf7f2 !important;
  border-color: rgba(44, 38, 28, 0.18) !important;
  color: #1c1917 !important;
}

.admin-select {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  color: var(--text-pure, #ffffff);
  outline: none;
  cursor: pointer;
}

.admin-select option, select option {
  background: #0f172a !important;
  color: #f8fafc !important;
  padding: 10px 14px;
}

[data-theme="light"] .admin-select {
  background: #faf7f2 !important;
  border-color: rgba(44, 38, 28, 0.18) !important;
  color: #1c1917 !important;
}

[data-theme="light"] .admin-select option, [data-theme="light"] select option {
  background: #faf6ee !important;
  color: #1c1917 !important;
}

/* Custom Elegant SaaS Select Dropdowns */
.custom-select-box {
  position: relative;
  display: inline-block;
  user-select: none;
  min-width: 190px;
}

.custom-select-box.sm {
  min-width: 110px;
}

.custom-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-pure, #ffffff);
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.custom-select-trigger.sm {
  padding: 5px 10px;
  font-size: 0.78rem;
  border-radius: 8px;
}

[data-theme="light"] .custom-select-trigger {
  background: #faf7f2 !important;
  border-color: rgba(44, 38, 28, 0.18) !important;
  color: #1c1917 !important;
  box-shadow: 0 1px 3px rgba(44, 38, 28, 0.04) !important;
}

.custom-select-trigger:hover,
.custom-select-box.open .custom-select-trigger {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.custom-select-arrow {
  color: var(--text-muted, #94a3b8);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.custom-select-box.open .custom-select-arrow {
  transform: rotate(180deg);
  color: #6366f1;
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 100%;
  width: max-content;
  max-width: 280px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  z-index: 1050;
  display: none;
  flex-direction: column;
  gap: 2px;
  animation: dropdownFade 0.15s ease-out;
}

[data-theme="light"] .custom-select-menu {
  background: #faf6ee !important;
  border: 1px solid rgba(44, 38, 28, 0.12) !important;
  box-shadow: 0 12px 36px rgba(44, 38, 28, 0.12) !important;
}

.custom-select-box.open .custom-select-menu {
  display: flex;
}

.custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  transition: all 0.15s ease;
}

.custom-select-option:hover {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
}

[data-theme="light"] .custom-select-option:hover {
  background: #eae3d5 !important;
  color: #4338ca !important;
}

.custom-select-option.selected {
  background: rgba(99, 102, 241, 0.18);
  color: #818cf8;
  font-weight: 700;
}

[data-theme="light"] .custom-select-option.selected {
  background: #eef2ff;
  color: #4f46e5;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-table-responsive {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}

.admin-table th {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="light"] .admin-table th {
  background: #ede7da !important;
  color: #57534e !important;
  border-bottom: 1px solid rgba(44, 38, 28, 0.12) !important;
}

.admin-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-pure, #ffffff);
  vertical-align: middle;
}

[data-theme="light"] .admin-table td {
  border-bottom: 1px solid rgba(44, 38, 28, 0.08) !important;
}

.table-user-cell {
  display: flex;
  flex-direction: column;
}

.table-user-cell strong {
  font-size: 0.84rem;
}

.table-user-cell span {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}

.status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
}

.status-pill.badge-emerald { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.status-pill.badge-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.status-pill.badge-indigo { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.status-pill.badge-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.status-pill.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.status-pill.badge-gray { background: rgba(255, 255, 255, 0.08); color: #94a3b8; }

.cycle-pill {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.admin-empty-table {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-muted, #94a3b8);
  font-size: 0.88rem;
}

/* 8. CMS Controls Grid */
.admin-cms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.cms-pricing-form-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cms-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cms-field-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}

.cms-input-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cms-input-duo:has(button) {
  grid-template-columns: 1fr auto;
}

.cms-input-duo button {
  white-space: nowrap;
  padding: 0 18px;
  height: 38px;
}

.admin-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  color: var(--text-pure, #ffffff);
  outline: none;
}

[data-theme="light"] .admin-input {
  background: #faf7f2 !important;
  border-color: rgba(44, 38, 28, 0.18) !important;
  color: #1c1917 !important;
}

.cms-switches-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cms-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  cursor: pointer;
}

[data-theme="light"] .cms-switch-row {
  background: #f2ece0 !important;
  border: 1px solid rgba(44, 38, 28, 0.06) !important;
}

.switch-info {
  display: flex;
  flex-direction: column;
}

.switch-info strong {
  font-size: 0.84rem;
  color: var(--text-pure, #ffffff);
}

.switch-info span {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}

.admin-toggle {
  width: 40px;
  height: 22px;
  accent-color: #6366f1;
  cursor: pointer;
}

/* 9. Ticket Modal Details */
#admin-ticket-modal-overlay,
#admin-gift-plan-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

#admin-ticket-modal-overlay.active,
#admin-gift-plan-modal-overlay.active {
  display: flex;
}

.admin-ticket-dialog {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: adminModalFade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

[data-theme="light"] .admin-ticket-dialog {
  background: #faf6ee !important;
  border: 1px solid rgba(44, 38, 28, 0.14) !important;
  box-shadow: 0 25px 60px rgba(44, 38, 28, 0.18) !important;
}

@keyframes adminModalFade {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.admin-ticket-dialog .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .admin-ticket-dialog .modal-header {
  border-bottom-color: #e2e8f0;
}

.admin-ticket-dialog .modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-pure, #ffffff);
}

.admin-ticket-dialog .btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.admin-ticket-dialog .btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-pure, #ffffff);
}

[data-theme="light"] .admin-ticket-dialog .btn-close-modal:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.admin-ticket-dialog .modal-body {
  padding: 24px;
  max-height: 65vh;
  overflow-y: auto;
}

.admin-ticket-dialog .modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .admin-ticket-dialog .modal-footer {
  border-top: 1px solid rgba(44, 38, 28, 0.1) !important;
  background: #f0eae0 !important;
}

.ticket-modal-detail-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tkt-detail-meta {
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tkt-detail-message-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
}

[data-theme="light"] .tkt-detail-message-box {
  background: #f5f0e6 !important;
  border: 1px solid rgba(44, 38, 28, 0.1) !important;
}

.table-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-select-sm {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  color: var(--text-pure, #ffffff);
}

[data-theme="light"] .admin-select-sm {
  background: #faf7f2 !important;
  border-color: rgba(44, 38, 28, 0.18) !important;
  color: #1c1917 !important;
}

/* Theme Toggle Icons & Smooth Dynamic Transitions */
.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-pure, #ffffff);
  transition: all 0.2s ease;
}

[data-theme="light"] .theme-toggle-btn {
  background: #eae3d5 !important;
  border-color: rgba(44, 38, 28, 0.12) !important;
  color: #1c1917 !important;
}

.theme-toggle-btn .sun-icon {
  display: block;
  color: #f59e0b;
}

.theme-toggle-btn .moon-icon {
  display: none;
  color: #6366f1;
}

[data-theme="light"] .theme-toggle-btn .sun-icon {
  display: none;
}

[data-theme="light"] .theme-toggle-btn .moon-icon {
  display: block;
}

.btn-outline-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-outline-danger:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

/* Fast, Butter-Smooth Universal Theme Switch Transitions Across Entire Website & Admin */
body, .admin-body, .app-header, .floating-navbar, .header-wrapper, .admin-top-header, .admin-sidebar, 
.admin-card, .admin-stat-card, .admin-table th, .admin-table td, 
.scanner-card, .clause-card, .clause-original, .counter-box,
.history-metric-card, .history-controls-card, .history-table-container,
.auth-modal-card, .profile-modal-card, .app-modal-dialog, .modal-dialog,
.custom-select-trigger, .custom-select-menu, .admin-pin-card,
.summary-card, .hero-section, .lang-dropdown-menu, .user-dropdown-menu {
  transition: background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              color 0.18s ease, 
              box-shadow 0.22s ease !important;
}

/* Gift Plan Modal Styles */
.admin-gift-plan-dialog {
  max-width: 500px;
  width: 100%;
  border-radius: 18px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

[data-theme="light"] .admin-gift-plan-dialog {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

.admin-gift-plan-dialog .modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .admin-gift-plan-dialog .modal-header {
  border-bottom-color: #e2e8f0;
}

.admin-gift-plan-dialog .btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  flex-shrink: 0;
}

.admin-gift-plan-dialog .btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-pure, #ffffff);
}

[data-theme="light"] .admin-gift-plan-dialog .btn-close-modal:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.modal-header-icon-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-header-icon-title h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-pure, #ffffff);
}

[data-theme="light"] .modal-header-icon-title h3 {
  color: #0f172a;
}

.modal-sub {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  margin: 2px 0 0 0;
}

.modal-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}

.modal-field-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}

.gift-tier-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gift-tier-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme="light"] .gift-tier-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.gift-tier-card:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.3);
}

.gift-tier-card.active {
  background: rgba(99, 102, 241, 0.14);
  border-color: #6366f1;
}

[data-theme="light"] .gift-tier-card.active {
  background: #eef2ff;
  border-color: #6366f1;
}

.tier-card-content {
  display: flex;
  flex-direction: column;
}

.tier-card-content strong {
  font-size: 0.84rem;
  color: var(--text-pure, #ffffff);
}

[data-theme="light"] .tier-card-content strong {
  color: #0f172a;
}

.tier-card-content span {
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}

.gift-cycle-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cycle-pill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cycle-pill-btn input {
  display: none;
}

[data-theme="light"] .cycle-pill-btn {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.cycle-pill-btn.active {
  background: #6366f1;
  color: #ffffff;
  border-color: #6366f1;
}

[data-theme="light"] .cycle-pill-btn.active {
  background: #6366f1;
  color: #ffffff;
  border-color: #6366f1;
}

/* ==========================================================================
   🔍 PRISTINE VISIBILITY & HIGH-CONTRAST TYPOGRAPHY SUITE (LIGHT & DARK THEMES)
   Fixes for:
   1. Interactive Engine Test Modal Tabs (.btn-demo-chip)
   2. "Save 35%" Discount Badges (.discount-badge, .badge-save)
   3. Dropzone Description Meta (.dropzone-meta, .dropzone-title, .dropzone-browse-link)
   4. Predatory Sample Contract Cards (.teaser-sample-label, .sample-chip-btn, .chip-title, .chip-subtitle)
   ========================================================================== */

/* 1. Interactive Demo Modal Chips & Preview */
.demo-clause-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.btn-demo-chip {
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-base);
  cursor: pointer;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* Dark Mode Chips */
.btn-demo-chip {
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn-demo-chip:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-demo-chip.active {
  background: #6366f1 !important;
  color: #ffffff !important;
  border-color: #6366f1 !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45) !important;
  font-weight: 700 !important;
}

/* Light Mode Chips (Crisp, High-Contrast Slate) */
[data-theme="light"] .btn-demo-chip {
  background: #ffffff !important;
  color: #334155 !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .btn-demo-chip:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
  transform: translateY(-1px) !important;
}

[data-theme="light"] .btn-demo-chip.active {
  background: #4f46e5 !important;
  color: #ffffff !important;
  border-color: #4f46e5 !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35) !important;
  font-weight: 700 !important;
}

/* Demo Preview Box */
.demo-preview-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
}

.demo-clause-original,
.demo-clause-redline {
  padding: 14px 16px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-clause-original p,
.demo-clause-redline p {
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

/* Dark Mode Demo Box */
.demo-preview-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-clause-original {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.demo-clause-original p {
  color: #fca5a5;
}

.demo-clause-redline {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.demo-clause-redline p {
  color: #6ee7b7;
}

.badge-danger-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  align-self: flex-start;
}

.badge-safe-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  align-self: flex-start;
}

/* Light Mode Demo Box (High-Contrast Clean Cards) */
[data-theme="light"] .demo-preview-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .demo-clause-original {
  background: #fef2f2 !important;
  border: 1.5px solid #fecaca !important;
}

[data-theme="light"] .demo-clause-original p {
  color: #991b1b !important;
  font-weight: 500 !important;
}

[data-theme="light"] .demo-clause-redline {
  background: #f0fdf4 !important;
  border: 1.5px solid #bbf7d0 !important;
}

[data-theme="light"] .demo-clause-redline p {
  color: #166534 !important;
  font-weight: 500 !important;
}

[data-theme="light"] .badge-danger-tag {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid #fca5a5 !important;
}

[data-theme="light"] .badge-safe-tag {
  background: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #86efac !important;
}

/* 2. "Save 35%" Discount Badges */
.discount-badge,
.badge-save {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 3px 9px !important;
  border-radius: 9999px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  line-height: 1 !important;
  margin-left: 6px !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

/* Dark Mode Discount Badge */
.discount-badge,
.badge-save {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #6ee7b7 !important;
  border: 1px solid rgba(16, 185, 129, 0.45) !important;
}

/* Light Mode Discount Badge (Vivid Dark Emerald on Light Mint) */
[data-theme="light"] .discount-badge,
[data-theme="light"] .badge-save {
  background: #d1fae5 !important;
  color: #065f46 !important;
  border: 1.5px solid #6ee7b7 !important;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.15) !important;
}

/* Pricing Toggle Switch Wrap */
.pricing-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  border-radius: 9999px;
  margin-top: 14px;
  transition: all 0.2s ease;
}

.toggle-label {
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

[data-theme="light"] .pricing-toggle-wrap {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.09) !important;
  box-shadow: 0 2px 8px -2px rgba(44, 38, 28, 0.08) !important;
}

[data-theme="light"] .toggle-label {
  color: #475569 !important;
}

[data-theme="light"] .toggle-label.active {
  color: #0f172a !important;
  font-weight: 600 !important;
}

/* 3. Dropzone Meta & Title (Zero Blurriness) */
.dropzone-box {
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.dropzone-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
}

.dropzone-meta {
  font-size: 12.5px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  margin-top: 6px !important;
  letter-spacing: 0.01em !important;
}

/* Dark Mode Dropzone */
.dropzone-box {
  background: rgba(15, 20, 31, 0.5) !important;
  border: 1.5px dashed rgba(99, 102, 241, 0.4) !important;
}

.dropzone-title {
  color: #ffffff !important;
}

.dropzone-browse-link {
  color: #818cf8 !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
}

.dropzone-meta {
  color: #94a3b8 !important;
}

/* Light Mode Dropzone (Crisp White Card with Indigo Dash & Sharp Text) */
[data-theme="light"] .dropzone-box {
  background: #ffffff !important;
  border: 1.5px dashed rgba(79, 70, 229, 0.45) !important;
  box-shadow: 0 4px 20px -4px rgba(79, 70, 229, 0.08) !important;
}

[data-theme="light"] .dropzone-box:hover {
  background: rgba(79, 70, 229, 0.03) !important;
  border-color: #4f46e5 !important;
}

[data-theme="light"] .dropzone-title {
  color: #0f172a !important;
}

[data-theme="light"] .dropzone-browse-link {
  color: #4338ca !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
}

[data-theme="light"] .dropzone-meta {
  color: #334155 !important;
  font-weight: 400 !important;
}

/* 4. Predatory Sample Contract Cards */
.teaser-sample-label,
.sample-label-text {
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  display: block !important;
  margin-bottom: 10px !important;
}

.sample-chip-btn {
  display: flex !important;
  align-items: center !important;
  text-align: left !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.chip-title {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  display: block !important;
  margin-bottom: 2px !important;
}

.chip-subtitle {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  display: block !important;
}

.chip-risk-indicator {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: #ef4444 !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6) !important;
  flex-shrink: 0 !important;
  margin-right: 12px !important;
}

/* Dark Mode Samples */
.teaser-sample-label,
.sample-label-text {
  color: #94a3b8 !important;
}

.sample-chip-btn {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.sample-chip-btn:hover {
  background: rgba(99, 102, 241, 0.12) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3) !important;
}

.chip-title {
  color: #ffffff !important;
}

.chip-subtitle {
  color: #94a3b8 !important;
}

/* Light Mode Samples (Pristine Solid White Cards with Deep Ink Contrast) */
[data-theme="light"] .teaser-sample-label,
[data-theme="light"] .sample-label-text {
  color: #334155 !important;
  font-weight: 600 !important;
}

[data-theme="light"] .sample-chip-btn {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px -2px rgba(44, 38, 28, 0.08) !important;
}

[data-theme="light"] .sample-chip-btn:hover {
  background: #ffffff !important;
  border-color: #6366f1 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px -3px rgba(99, 102, 241, 0.18) !important;
}

[data-theme="light"] .chip-title {
  color: #0f172a !important;
  font-weight: 600 !important;
}

[data-theme="light"] .chip-subtitle {
  color: #334155 !important;
  font-weight: 400 !important;
}

/* ==========================================================================
   📱 SUPER ADMIN PORTAL MOBILE & TABLET RESPONSIVE ENGINE (≤ 860px)
   ========================================================================== */
@media (max-width: 860px) {
  /* Admin Top Header */
  .admin-top-header {
    padding: 10px 14px !important;
    gap: 8px !important;
  }

  .admin-live-pulse-badge {
    display: none !important;
  }

  .admin-badge-super {
    display: none !important;
  }

  .admin-header-right {
    gap: 6px !important;
  }

  .admin-curr-btn {
    padding: 4px 8px !important;
    font-size: 11.5px !important;
  }

  #btn-admin-goto-site span {
    display: none !important;
  }

  #btn-admin-goto-site {
    padding: 6px 8px !important;
  }

  #btn-lock-admin-console {
    padding: 6px 10px !important;
    font-size: 12px !important;
  }

  /* Admin Main Layout -> Stack Sidebar as Horizontal Scrollable Tab Bar */
  .admin-main-layout {
    flex-direction: column !important;
  }

  .admin-sidebar {
    width: 100% !important;
    min-width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid var(--glass-border) !important;
    padding: 8px 12px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: var(--bg-surface) !important;
    position: sticky !important;
    top: 56px !important;
    z-index: 40 !important;
  }

  .admin-nav-menu {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    white-space: nowrap !important;
    width: max-content !important;
    padding-bottom: 2px !important;
  }

  .admin-nav-menu::-webkit-scrollbar {
    display: none !important;
  }

  .admin-nav-item {
    flex-shrink: 0 !important;
    padding: 8px 12px !important;
    font-size: 12.5px !important;
    border-radius: 8px !important;
  }

  .admin-nav-item span {
    white-space: nowrap !important;
  }

  /* Content Area */
  .admin-content-area {
    padding: 16px 12px 32px 12px !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  .admin-view-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .admin-view-title {
    font-size: 1.25rem !important;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .admin-stat-card {
    padding: 14px 12px !important;
  }

  .admin-stat-value {
    font-size: 1.35rem !important;
  }

  /* Tables & Ledger Mobile Fluidity */
  .admin-table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 10px !important;
    margin-top: 12px !important;
  }

  .admin-data-table {
    min-width: 650px !important;
  }

  .admin-filter-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .admin-filter-bar input,
  .admin-filter-bar select,
  .admin-filter-bar .custom-select-box {
    width: 100% !important;
  }

  .admin-cms-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

/* ==========================================================================
   ✨ GEMINI AI DEEP LEGAL INTELLIGENCE & CONTEXTUAL REASONING CARD
   ========================================================================== */
.gemini-insights-card {
  margin: 18px 0 24px 0;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.45), rgba(15, 23, 42, 0.75));
  border: 1px solid rgba(129, 140, 248, 0.3);
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
}

[data-theme="light"] .gemini-insights-card {
  background: linear-gradient(145deg, rgba(238, 242, 255, 0.9), rgba(248, 250, 252, 0.95));
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 10px 25px -8px rgba(99, 102, 241, 0.15);
}

.gemini-card-header {
  padding: 14px 20px;
  background: rgba(99, 102, 241, 0.12);
  border-bottom: 1px solid rgba(129, 140, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.gemini-badge-glow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #c7d2fe;
}

[data-theme="light"] .gemini-badge-glow {
  color: #4338ca;
}

.gemini-chip-model {
  font-size: 0.72rem;
  font-weight: 600;
  font-family: monospace;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(129, 140, 248, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(129, 140, 248, 0.35);
}

.gemini-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
}

.gemini-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  display: inline-block;
  animation: geminiPulse 2s infinite ease-in-out;
}

.gemini-pulse-dot.pulsing {
  background: #c084fc;
  box-shadow: 0 0 12px #c084fc;
  animation: geminiPulseFast 1s infinite alternate;
}

@keyframes geminiPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

@keyframes geminiPulseFast {
  0% { opacity: 0.5; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.2); }
}

.gemini-insights-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gemini-section-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gemini-block-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #e0e7ff;
  margin: 0;
}

[data-theme="light"] .gemini-block-title {
  color: #312e81;
}

.gemini-summary-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.4);
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin: 0;
}

[data-theme="light"] .gemini-summary-text {
  color: #334155;
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(99, 102, 241, 0.15);
}

.gemini-traps-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.gemini-trap-item {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.25);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gemini-trap-item.warning {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.25);
}

.gemini-trap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gemini-trap-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #fca5a5;
}

.gemini-trap-item.warning .gemini-trap-name {
  color: #fcd34d;
}

[data-theme="light"] .gemini-trap-name {
  color: #b91c1c;
}

[data-theme="light"] .gemini-trap-item.warning .gemini-trap-name {
  color: #b45309;
}

.gemini-trap-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.gemini-trap-item.warning .gemini-trap-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.gemini-trap-desc {
  font-size: 0.82rem;
  line-height: 1.45;
  color: #cbd5e1;
  margin: 0;
}

[data-theme="light"] .gemini-trap-desc {
  color: #475569;
}

.gemini-trap-fix {
  font-size: 0.8rem;
  color: #93c5fd;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .gemini-trap-fix {
  color: #1d4ed8;
  border-top-color: rgba(0, 0, 0, 0.08);
}

.gemini-leverage-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gemini-leverage-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #cbd5e1;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 10px 14px;
  border-radius: 8px;
}

[data-theme="light"] .gemini-leverage-item {
  color: #334155;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}

.gemini-leverage-icon {
  color: #10b981;
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 2px;
}

/* =========================================================================
   GDPR / CCPA COOKIE CONSENT BANNER
   ========================================================================= */
.cookie-consent-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 860px;
  width: calc(100% - 32px);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.2);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 999999;
  animation: slideUpCookie 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

[data-theme="light"] .cookie-consent-banner {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(99, 102, 241, 0.2);
}

@keyframes slideUpCookie {
  from {
    opacity: 0;
    transform: translate(-50%, 40px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.cookie-consent-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cookie-consent-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.cookie-consent-text strong {
  display: block;
  font-size: 0.95rem;
  color: #f8fafc;
  font-weight: 700;
  margin-bottom: 3px;
}

[data-theme="light"] .cookie-consent-text strong {
  color: #0f172a;
}

.cookie-consent-text p {
  font-size: 0.84rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
}

[data-theme="light"] .cookie-consent-text p {
  color: #64748b;
}

.cookie-consent-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cookie-consent-banner {
    flex-direction: column;
    align-items: stretch;
    bottom: 12px;
    padding: 16px;
    gap: 14px;
  }
  .cookie-consent-actions {
    justify-content: flex-end;
  }
}



/* Enhanced Top Nav Bar Height & Padding for Admin Console */
.admin-top-header {
  min-height: 72px !important;
}
.admin-top-header .brand-title-text {
  font-size: 1.18rem !important;
}
.admin-top-header .brand-logo-icon svg {
  width: 24px !important;
  height: 24px !important;
}
.admin-top-header .admin-badge-super {
  padding: 4px 10px !important;
  font-size: 0.70rem !important;
}
.admin-top-header .admin-live-pulse-badge {
  padding: 6px 14px !important;
  font-size: 0.80rem !important;
}
.admin-top-header .admin-curr-btn {
  padding: 6px 12px !important;
  font-size: 0.82rem !important;
}
.admin-top-header .btn-sm {
  padding: 8px 16px !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.admin-top-header #admin-theme-toggle {
  width: 38px !important;
  height: 38px !important;
}


/* Remove browser default up/down stepper arrows from all number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button,
.admin-input[type="number"]::-webkit-inner-spin-button,
.admin-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
  display: none !important;
}

input[type="number"],
.admin-input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}


/* Auth Input Error Shake & Visual Polish */
@keyframes authInputShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.auth-input.input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
  animation: authInputShake 0.32s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}


/* ==========================================================================
   SLEEK MODERN INLINE AUTH FIELD ERRORS (STRIPE & LINEAR STYLE)
   ========================================================================== */
.auth-alert {
  display: none !important;
}

.auth-field-error {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 11.8px;
  font-weight: 500;
  color: #f87171;
  margin-top: 6px;
  line-height: 1.35;
  animation: fieldErrorSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-field-error.active {
  display: flex !important;
}

[data-theme="light"] .auth-field-error {
  color: #dc2626;
}

@keyframes fieldErrorSlideIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-input.input-error {
  border-color: rgba(239, 68, 68, 0.8) !important;
  background: rgba(239, 68, 68, 0.05) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
  animation: authInputShake 0.32s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

[data-theme="light"] .auth-input.input-error {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.auth-link-inline {
  background: none;
  border: none;
  padding: 0;
  color: #818cf8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.18s ease;
}

.auth-link-inline:hover {
  color: #a5b4fc;
  text-decoration: underline;
}

[data-theme="light"] .auth-link-inline {
  color: #4f46e5;
}

[data-theme="light"] .auth-link-inline:hover {
  color: #4338ca;
}


/* ==========================================================================

/* ==========================================================================

/* ==========================================================================
   CARDS REDESIGN: WORLD-CLASS CLEAN RESTING STATE + GLOWY AMBIENT HOVER
   Applied to: 4-Trap Grid, Workflow Steps, Core Features, Bottom CTA Card
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TRAP CARDS (SECTION 2: 4 LETHAL CONTRACT TRAPS)
   -------------------------------------------------------------------------- */
.traps-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px !important;
  align-items: stretch !important;
  width: 100% !important;
  margin-top: 36px !important;
}

@media (max-width: 1024px) {
  .traps-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
}

@media (max-width: 640px) {
  .traps-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

.trap-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  text-align: left !important;
  padding: 24px 20px !important;
  border-radius: 18px !important;
  background: var(--glass-surface, rgba(15, 23, 42, 0.65)) !important;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08)) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
  position: relative !important;
  overflow: hidden !important;
  height: 100% !important;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.28s ease, 
              border-color 0.28s ease, 
              background 0.28s ease !important;
}

[data-theme="light"] .trap-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

/* Ambient Radial Glow on Hover (Like attached screenshot) */
.trap-card:hover {
  transform: translateY(-4px) !important;
  background: radial-gradient(ellipse at 50% 0%, rgba(239, 68, 68, 0.16), rgba(15, 23, 42, 0.85) 75%) !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  box-shadow: 0 20px 40px -12px rgba(239, 68, 68, 0.22), 0 0 0 1px rgba(239, 68, 68, 0.2) !important;
}

[data-theme="light"] .trap-card:hover {
  background: radial-gradient(ellipse at 50% 0%, rgba(239, 68, 68, 0.09), #ffffff 75%) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  box-shadow: 0 20px 40px -12px rgba(239, 68, 68, 0.16), 0 0 0 1px rgba(239, 68, 68, 0.14) !important;
}

/* Integrated Header Row (Icon + Category Badge in one clean line) */
.trap-card-top-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  margin-bottom: 16px !important;
}

/* Clean Squircle Icon */
.trap-card-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.18) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ef4444 !important;
  margin-bottom: 0 !important;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.06) !important;
  transition: background 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.25s ease, 
              box-shadow 0.25s ease, 
              color 0.25s ease, 
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
}

.trap-card-icon svg {
  width: 20px !important;
  height: 20px !important;
  stroke: #ef4444 !important;
  transition: stroke 0.25s ease !important;
}

[data-theme="light"] .trap-card-icon {
  background: #fef2f2 !important;
  border-color: #fee2e2 !important;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.04) !important;
}

/* Color-Fill Hover on Icon */
.trap-card:hover .trap-card-icon {
  transform: scale(1.06) !important;
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  border-color: #dc2626 !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.38) !important;
  color: #ffffff !important;
}

.trap-card:hover .trap-card-icon svg {
  stroke: #ffffff !important;
}

/* Sleek Category Tag */
.trap-card-badge {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  margin: 0 !important;
}

[data-theme="light"] .trap-card-badge {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
}

/* Card Content Typography */
.trap-card-title {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  margin-bottom: 8px !important;
  min-height: 44px !important;
  display: flex !important;
  align-items: flex-start !important;
  color: var(--text-pure, #0f172a) !important;
}

.trap-card-text {
  font-size: 13px !important;
  line-height: 1.55 !important;
  color: var(--text-muted, #64748b) !important;
  margin-bottom: 18px !important;
  flex-grow: 1 !important;
}

/* Micro Stat Box Footer */
.trap-loss-stat {
  margin-top: auto !important;
  padding: 8px 12px !important;
  background: rgba(239, 68, 68, 0.04) !important;
  border: 1px solid rgba(239, 68, 68, 0.12) !important;
  border-radius: 8px !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 11.5px !important;
  line-height: 1.3 !important;
}

[data-theme="light"] .trap-loss-stat {
  background: #fef2f2 !important;
  border-color: #fee2e2 !important;
}

.trap-stat-label {
  color: var(--text-muted, #64748b) !important;
  font-weight: 500 !important;
}

.trap-stat-value {
  color: #ef4444 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .trap-stat-value {
  color: #dc2626 !important;
}

/* --------------------------------------------------------------------------
   2. HOW IT WORKS WORKFLOW CARDS (SECTION 3)
   -------------------------------------------------------------------------- */
.workflow-step-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  padding: 28px 22px !important;
  border-radius: 18px !important;
  background: var(--glass-surface, rgba(15, 23, 42, 0.65)) !important;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08)) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
  position: relative !important;
  overflow: hidden !important;
  height: 100% !important;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.28s ease, 
              border-color 0.28s ease, 
              background 0.28s ease !important;
}

[data-theme="light"] .workflow-step-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

/* Ambient Indigo Glow on Hover */
.workflow-step-card:hover {
  transform: translateY(-4px) !important;
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.16), rgba(15, 23, 42, 0.85) 75%) !important;
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 20px 40px -12px rgba(99, 102, 241, 0.22), 0 0 0 1px rgba(99, 102, 241, 0.2) !important;
}

[data-theme="light"] .workflow-step-card:hover {
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.09), #ffffff 75%) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
  box-shadow: 0 20px 40px -12px rgba(99, 102, 241, 0.16), 0 0 0 1px rgba(99, 102, 241, 0.14) !important;
}

.step-icon-wrap {
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
  background: rgba(99, 102, 241, 0.08) !important;
  border: 1px solid rgba(99, 102, 241, 0.2) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 16px !important;
  color: #6366f1 !important;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.06) !important;
  transition: background 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.25s ease, 
              box-shadow 0.25s ease, 
              color 0.25s ease, 
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
}

.step-icon-wrap svg {
  width: 20px !important;
  height: 20px !important;
  stroke: #6366f1 !important;
  transition: stroke 0.25s ease !important;
}

[data-theme="light"] .step-icon-wrap {
  background: #eef2ff !important;
  border-color: #e0e7ff !important;
  color: #4f46e5 !important;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.04) !important;
}

[data-theme="light"] .step-icon-wrap svg {
  stroke: #4f46e5 !important;
}

.workflow-step-card:hover .step-icon-wrap {
  transform: scale(1.06) !important;
  background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
  border-color: #4f46e5 !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.38) !important;
  color: #ffffff !important;
}

.workflow-step-card:hover .step-icon-wrap svg {
  stroke: #ffffff !important;
}

.step-number-badge {
  position: absolute !important;
  top: 14px !important;
  right: 18px !important;
  font-family: var(--font-display, sans-serif) !important;
  font-size: 3.5rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  color: var(--text-pure, #ffffff) !important;
  opacity: 0.08 !important;
  pointer-events: none !important;
  user-select: none !important;
  transition: opacity 0.25s ease !important;
}

[data-theme="light"] .step-number-badge {
  color: #0f172a !important;
  opacity: 0.08 !important;
}

.workflow-step-card:hover .step-number-badge {
  opacity: 0.16 !important;
}

.step-card-title {
  margin-bottom: 8px !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
}

.step-card-desc {
  font-size: 13px !important;
  line-height: 1.6 !important;
  color: var(--text-muted, #64748b) !important;
}

/* --------------------------------------------------------------------------
   3. CORE FEATURES SHOWCASE GRID (SECTION 4)
   -------------------------------------------------------------------------- */
.feature-item-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  padding: 24px 20px !important;
  border-radius: 18px !important;
  background: var(--glass-surface, rgba(15, 23, 42, 0.65)) !important;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08)) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
  height: 100% !important;
  position: relative !important;
  overflow: hidden !important;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.28s ease, 
              border-color 0.28s ease, 
              background 0.28s ease !important;
}

[data-theme="light"] .feature-item-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

/* Ambient Blue Glow on Hover */
.feature-item-card:hover {
  transform: translateY(-4px) !important;
  background: radial-gradient(ellipse at 50% 0%, rgba(59, 130, 246, 0.16), rgba(15, 23, 42, 0.85) 75%) !important;
  border-color: rgba(59, 130, 246, 0.45) !important;
  box-shadow: 0 20px 40px -12px rgba(59, 130, 246, 0.22), 0 0 0 1px rgba(59, 130, 246, 0.2) !important;
}

[data-theme="light"] .feature-item-card:hover {
  background: radial-gradient(ellipse at 50% 0%, rgba(59, 130, 246, 0.09), #ffffff 75%) !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
  box-shadow: 0 20px 40px -12px rgba(59, 130, 246, 0.16), 0 0 0 1px rgba(59, 130, 246, 0.14) !important;
}

.feature-icon-box {
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
  background: rgba(59, 130, 246, 0.08) !important;
  border: 1px solid rgba(59, 130, 246, 0.2) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 16px !important;
  color: #3b82f6 !important;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.06) !important;
  transition: background 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.25s ease, 
              box-shadow 0.25s ease, 
              color 0.25s ease, 
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
}

.feature-icon-box svg {
  width: 20px !important;
  height: 20px !important;
  stroke: #3b82f6 !important;
  transition: stroke 0.25s ease !important;
}

[data-theme="light"] .feature-icon-box {
  background: #eff6ff !important;
  border-color: #dbeafe !important;
  color: #2563eb !important;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.04) !important;
}

[data-theme="light"] .feature-icon-box svg {
  stroke: #2563eb !important;
}

.feature-item-card:hover .feature-icon-box {
  transform: scale(1.06) !important;
  background: linear-gradient(135deg, #3b82f6, #6366f1) !important;
  border-color: #2563eb !important;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.38) !important;
  color: #ffffff !important;
}

.feature-item-card:hover .feature-icon-box svg {
  stroke: #ffffff !important;
}

.feature-title {
  margin-bottom: 8px !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
}

.feature-text {
  font-size: 13px !important;
  line-height: 1.55 !important;
  color: var(--text-muted, #64748b) !important;
}

/* --------------------------------------------------------------------------
   4. BOTTOM CTA CARD (PREMIUM GLOWY BANNER)
   -------------------------------------------------------------------------- */
.bottom-cta-card {
  border-radius: 24px !important;
  padding: 48px 32px !important;
  position: relative !important;
  overflow: hidden !important;
  background: var(--glass-surface, rgba(15, 23, 42, 0.7)) !important;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08)) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15) !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.3s ease, 
              border-color 0.3s ease, 
              background 0.3s ease !important;
}

[data-theme="light"] .bottom-cta-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05) !important;
}

/* Gorgeous Ambient Glow on Hover */
.bottom-cta-card:hover {
  transform: translateY(-4px) !important;
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.18), rgba(15, 23, 42, 0.85) 75%) !important;
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 24px 48px -12px rgba(99, 102, 241, 0.24), 0 0 0 1px rgba(99, 102, 241, 0.2) !important;
}

[data-theme="light"] .bottom-cta-card:hover {
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.14), #ffffff 75%) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
  box-shadow: 0 24px 48px -12px rgba(99, 102, 241, 0.18), 0 0 0 1px rgba(99, 102, 241, 0.15) !important;
}




/* ==========================================================================
   ⚡ ULTRA-FAST, JITTERLESS & REDESIGNED TYPOGRAPHY ENGINE
   ========================================================================== */

/* 1. Universal Sharp Antialiasing & True ClearType Hinting */
html, body, *, *::before, *::after {
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
}

/* 2. COMPLETE JITTER REMOVAL: No translateY/scale Jumps on Hover or Active */
button:hover, button:active,
.btn:hover, .btn:active,
.btn-primary:hover, .btn-primary:active,
.btn-secondary:hover, .btn-secondary:active,
.pricing-card:hover, .feature-card:hover,
.sample-chip-btn:hover, .sample-chip-btn:active,
.stat-card:hover, .history-card:hover,
.summary-metric-card:hover, .action-btn:hover, .action-btn:active {
  transform: none !important; /* Eliminates all subpixel jumping and blur-shifts */
}

/* Fast, smooth, jitterless color and shadow transitions */
button, .btn, .pricing-card, .feature-card, .sample-chip-btn, .stat-card, .history-card {
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease !important;
}

/* Smooth Modern Modals */
.app-modal-overlay {
  /* controlled by master ultra-luxury transitions */
}

/* Disable Continuous Background Loop Animations */
.status-live-dot, .pulse-dot, .live-badge-dot, .scan-progress-bar.active, .progress-bar-fill.scanning {
  animation: none !important;
}

/* ==========================================================================
   📐 REDESIGNED TYPOGRAPHY HIERARCHY, OPACITY & PERFECT ALIGNMENT
   ========================================================================== */

/* --- Primary Headings --- */
h1, .hero-title {
  font-family: var(--font-display) !important;
  font-size: clamp(2rem, 4vw, 2.75rem) !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.025em !important;
  text-align: center !important;
}

h2, .section-title {
  font-family: var(--font-display) !important;
  font-size: clamp(1.5rem, 3vw, 2rem) !important;
  font-weight: 700 !important;
  line-height: 1.22 !important;
  letter-spacing: -0.02em !important;
}

h3, .modal-title, .step-card-title, .feature-title {
  font-family: var(--font-display) !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
}

/* --- Body & Subtitle Text: Refined Opacity & Readable Contrast --- */
p, .hero-subtitle, .section-subtitle, .step-card-desc, .feature-text {
  font-family: var(--font-base) !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
}

[data-theme="light"] p,
[data-theme="light"] .hero-subtitle,
[data-theme="light"] .section-subtitle {
  color: #475569 !important; /* Balanced Slate-600 */
}

[data-theme="light"] .step-card-desc,
[data-theme="light"] .feature-text {
  color: #64748b !important; /* Muted Feeka Slate-500 */
}

[data-theme="dark"] p,
[data-theme="dark"] .hero-subtitle,
[data-theme="dark"] .section-subtitle {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .step-card-desc,
[data-theme="dark"] .feature-text {
  color: #94a3b8 !important;
}

/* --- Perfect Button Vertical & Horizontal Alignment --- */
.btn, .btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  vertical-align: middle !important;
}

.btn svg {
  flex-shrink: 0 !important;
  vertical-align: middle !important;
}

.btn span {
  display: inline-block !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

/* --- Profile Plan & Upgrade Button ("View All Packages & Upgrades") --- */
#btn-upgrade-plan {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  height: 42px !important;
  padding: 0 20px !important;
  font-family: var(--font-base) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  background: #4f46e5 !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25) !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

#btn-upgrade-plan:hover {
  background: #4338ca !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35) !important;
}

#btn-download-invoice {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  height: 42px !important;
  padding: 0 16px !important;
  font-family: var(--font-base) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 10px !important;
}

.billing-actions-grid {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-top: 16px !important;
}

/* --- Usage Stat Pills in Profile Modal --- */
.usage-stat-pills {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 14px !important;
  align-items: stretch !important;
  border-top: 1px solid var(--glass-border) !important;
  padding-top: 14px !important;
  margin-top: 14px !important;
}

.usage-stat-item {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  text-align: left !important;
}

.usage-stat-item .stat-lbl {
  font-family: var(--font-base) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #64748b !important;
  margin-bottom: 4px !important;
  display: block !important;
}

.usage-stat-item .stat-num {
  font-family: var(--font-display) !important;
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
  display: block !important;
}

/* --- Sample Chips: Feeka, Crisp, Balanced Alignment --- */
.teaser-sample-label,
.sample-label-text,
.sample-chips-header span {
  font-family: var(--font-base) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  text-align: center !important;
  display: block !important;
  margin-bottom: 12px !important;
}

[data-theme="light"] .teaser-sample-label,
[data-theme="light"] .sample-label-text {
  color: #64748b !important;
}

[data-theme="dark"] .teaser-sample-label,
[data-theme="dark"] .sample-label-text {
  color: #94a3b8 !important;
}

.sample-chip-btn {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  text-align: left !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

[data-theme="light"] .sample-chip-btn {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .sample-chip-btn:hover {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

.chip-content {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

.chip-title {
  font-family: var(--font-display) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.3 !important;
  display: block !important;
  margin-bottom: 2px !important;
}

[data-theme="light"] .chip-title {
  color: #1e293b !important;
}

[data-theme="dark"] .chip-title {
  color: #f8fafc !important;
}

.chip-subtitle {
  font-family: var(--font-base) !important;
  font-size: 11.5px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  display: block !important;
}

[data-theme="light"] .chip-subtitle {
  color: #64748b !important;
}

[data-theme="dark"] .chip-subtitle {
  color: #94a3b8 !important;
}

.chip-risk-indicator {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: #ef4444 !important;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.45) !important;
  flex-shrink: 0 !important;
}

/* --- Trusted By Social Proof Bar --- */
.trust-lead-text {
  font-family: var(--font-base) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  text-align: center !important;
  margin: 24px 0 16px !important;
}

.proof-chip, .badge-pill-link {
  font-family: var(--font-base) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  border-radius: 9999px !important;
}


/* Ensure Mobile Hamburger is strictly hidden on desktop screens */
@media (min-width: 861px) {
  .mobile-hamburger-btn,
  #btn-mobile-menu-toggle {
    display: none !important;
  }
}


/* ==========================================================================
   🎯 USER REFINEMENTS: FAQ CLICK-ONLY, SAMPLE BOXES, DROPZONE GLOW, TOGGLE HOVER
   ========================================================================== */

/* --- 1. FAQ ACCORDION: NO HOVER OPEN, SMOOTH SLOW EXPAND ON CLICK --- */
.faq-answer-pane,
.faq-accordion-body {
  max-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 22px !important;
  padding-right: 22px !important;
  transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.38s ease, padding 0.38s ease !important;
}

.faq-item.active .faq-answer-pane,
.faq-accordion-item.active .faq-accordion-body {
  max-height: 500px !important;
  opacity: 1 !important;
  padding-top: 0 !important;
  padding-bottom: 20px !important;
  padding-left: 22px !important;
  padding-right: 22px !important;
}

.faq-chevron {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease !important;
}

.faq-item.active .faq-chevron,
.faq-accordion-item.active .faq-chevron {
  transform: rotate(180deg) !important;
  color: #6366f1 !important;
}

/* FAQ item subtle hover (border only, strictly NO expanding) */
.faq-item:hover,
.faq-accordion-item:hover {
  border-color: rgba(99, 102, 241, 0.35) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

/* --- 2. SAMPLE BOXES ALIGNMENT & COMPACT PARENT BOX --- */
#scanner-guest-teaser {
  max-width: 760px !important;
  margin: 0 auto !important;
  width: 100% !important;
}

.guest-teaser-card {
  padding: 24px 26px 22px 26px !important; /* Made more compact from 36px 32px */
  border-radius: 22px !important;
}

.teaser-sample-preview {
  padding-top: 14px !important;
  margin-top: 8px !important;
  border-top: 1px solid var(--glass-border) !important;
  width: 100% !important;
}

.sample-chips-row {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 12px !important;
  width: 100% !important;
}

.sample-chip-btn {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  padding: 13px 15px !important;
  border-radius: 12px !important;
  text-align: left !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}

[data-theme="light"] .sample-chip-btn {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .sample-chip-btn:hover {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

/* Crisp, Solid Red Status Dot (Aligned with title line) */
.chip-risk-indicator {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: #ef4444 !important;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6) !important;
  flex-shrink: 0 !important;
  margin-top: 5px !important; /* Perfectly aligned with title text */
  opacity: 1 !important;
  display: inline-block !important;
}

.chip-content {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  text-align: left !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.chip-title {
  font-family: var(--font-display) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  margin-bottom: 3px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

[data-theme="light"] .chip-title {
  color: #1e293b !important;
}

[data-theme="dark"] .chip-title {
  color: #f8fafc !important;
}

.chip-subtitle {
  font-family: var(--font-base) !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

[data-theme="light"] .chip-subtitle {
  color: #64748b !important;
}

[data-theme="dark"] .chip-subtitle {
  color: #94a3b8 !important;
}

/* --- 3. LOGGED-IN CONTRACT DROPZONE: DROP SHADOW + HOVER GLOW ANIMATION --- */
.dropzone-box {
  border: 1.5px dashed rgba(99, 102, 241, 0.45) !important;
  border-radius: 18px !important;
  padding: 24px 20px !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.04) !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease !important;
}

[data-theme="light"] .dropzone-box {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.04) !important;
}

.dropzone-box:hover,
.dropzone-box.dragover {
  border-color: #6366f1 !important;
  background: rgba(99, 102, 241, 0.035) !important;
  box-shadow: 0 0 28px rgba(99, 102, 241, 0.35), 0 12px 35px -5px rgba(99, 102, 241, 0.18) !important;
}

[data-theme="dark"] .dropzone-box {
  background: rgba(15, 23, 42, 0.6) !important;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.06) !important;
}

[data-theme="dark"] .dropzone-box:hover,
[data-theme="dark"] .dropzone-box.dragover {
  border-color: #818cf8 !important;
  background: rgba(99, 102, 241, 0.08) !important;
  box-shadow: 0 0 32px rgba(99, 102, 241, 0.45), 0 12px 40px -5px rgba(0, 0, 0, 0.6) !important;
}

/* --- 4. MONTHLY / ANNUAL TOGGLE PILL: CLICKABLE HOVER EFFECT --- */
.pricing-toggle-wrap,
.billing-toggle-wrapper {
  cursor: pointer !important;
  user-select: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 6px 16px !important;
  border-radius: 9999px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.05) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

[data-theme="light"] .pricing-toggle-wrap,
[data-theme="light"] .billing-toggle-wrapper {
  background: #ffffff !important;
}

.pricing-toggle-wrap:hover,
.billing-toggle-wrapper:hover {
  border-color: #6366f1 !important;
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.22), 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

.pricing-toggle-wrap *,
.billing-toggle-wrapper * {
  cursor: pointer !important;
  user-select: none !important;
}

.pricing-toggle-switch {
  cursor: pointer !important;
  transition: background-color 0.25s ease, box-shadow 0.2s ease !important;
}

.pricing-toggle-wrap:hover .pricing-toggle-switch {
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4) !important;
}


/* ==========================================================================
   💎 BOTTOM CTA BANNER: PURE GLASSMORPHISM & ELEGANT DROP SHADOW (NO BLUE BLOB)
   ========================================================================== */

/* 1. Completely Remove Bluish Gradient Blob from Center */
.cta-glow-backdrop {
  display: none !important;
}

/* 2. Pure Frosted Glass Card with Multi-Layer Drop Shadow */
.bottom-cta-card {
  position: relative !important;
  border-radius: 28px !important;
  padding: 52px 36px 44px 36px !important;
  text-align: center !important;
  overflow: hidden !important;
  max-width: 960px !important;
  margin: 0 auto !important;
  transform: none !important;
  transition: box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease !important;
}

/* Light Mode Glassmorphism */
[data-theme="light"] .bottom-cta-card,
.bottom-cta-card {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.85) !important;
  /* Premium Soft Multi-Layer Drop Shadow + Glass Rim Highlight */
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.07),
              0 8px 20px -4px rgba(0, 0, 0, 0.04),
              inset 0 1px 2px 0 rgba(255, 255, 255, 0.95) !important;
}

[data-theme="light"] .bottom-cta-card:hover,
.bottom-cta-card:hover {
  transform: none !important;
  background: rgba(255, 255, 255, 0.82) !important;
  border-color: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 28px 65px -12px rgba(0, 0, 0, 0.1),
              0 12px 28px -4px rgba(0, 0, 0, 0.05),
              inset 0 1px 2px 0 rgba(255, 255, 255, 1) !important;
}

/* Dark Mode Glassmorphism */
[data-theme="dark"] .bottom-cta-card {
  background: rgba(15, 23, 42, 0.65) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 25px 55px -10px rgba(0, 0, 0, 0.55),
              0 10px 24px -4px rgba(0, 0, 0, 0.35),
              inset 0 1px 1px 0 rgba(255, 255, 255, 0.12) !important;
}

[data-theme="dark"] .bottom-cta-card:hover {
  transform: none !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 30px 65px -12px rgba(0, 0, 0, 0.65),
              0 12px 28px -4px rgba(0, 0, 0, 0.4),
              inset 0 1px 1px 0 rgba(255, 255, 255, 0.16) !important;
}

/* Clean Typography inside CTA Card */
.bottom-cta-title {
  font-family: var(--font-display) !important;
  font-size: clamp(24px, 4vw, 32px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
  line-height: 1.2 !important;
  margin-bottom: 8px !important;
}

[data-theme="light"] .bottom-cta-title {
  color: #0f172a !important;
}

[data-theme="dark"] .bottom-cta-title {
  color: #f8fafc !important;
}

.bottom-cta-subtitle {
  font-family: var(--font-base) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
  max-width: 540px !important;
  margin: 0 auto 16px auto !important;
}

[data-theme="light"] .bottom-cta-subtitle {
  color: #64748b !important;
}

[data-theme="dark"] .bottom-cta-subtitle {
  color: #94a3b8 !important;
}

.bottom-cta-note {
  font-family: var(--font-base) !important;
  font-size: 11.5px !important;
  font-weight: 400 !important;
  color: #94a3b8 !important;
  letter-spacing: 0.02em !important;
  margin-top: 14px !important;
}

/* ==========================================================================
   🌐 SEAMLESS INSTANT REFRESH & ROCK-SOLID NON-RESIZING BOXES
   ========================================================================== */

/* 1. Global Typography: Universal Inter / System Stack (Instant, Crisp, High-Legibility) */
html, body, button, input, select, textarea {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
  letter-spacing: normal !important;
}

[data-theme="light"] body {
  background-color: #f5f0e6 !important;
  color: #1e293b !important;
}

[data-theme="dark"] body {
  background-color: #07090e !important;
  color: #f1f5f9 !important;
}

/* Headings */
h1, h2, h3, h4, h5, h6,
.section-title, .feature-title, .step-card-title, .trap-card-title,
.plan-card-title, .plan-title, .brand-title-text {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: -0.015em !important;
  line-height: 1.25 !important;
}

/* Hero Headline: Fixed stable height (Eliminates box jumping up/down) */
.hero-title {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
  font-size: clamp(28px, 4vw, 44px) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
  max-width: 860px !important;
  margin: 0 auto 14px auto !important;
  text-align: center !important;
  min-height: 110px !important;
  height: auto !important;
}

#typewriter-text {
  display: inline-block !important;
  min-height: 1.25em !important;
}

[data-theme="light"] .hero-title { color: #0f172a !important; }
[data-theme="dark"] .hero-title { color: #f8fafc !important; }

/* Subtitles & Descriptions */
.hero-subtitle,
.teaser-subtitle,
.section-subtitle,
.section-desc,
.feature-text,
.step-card-desc,
.trap-card-text,
.plan-desc,
.plan-card-tagline {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  letter-spacing: normal !important;
  font-weight: 400 !important;
}

[data-theme="light"] .hero-subtitle,
[data-theme="light"] .teaser-subtitle,
[data-theme="light"] .section-subtitle,
[data-theme="light"] .section-desc,
[data-theme="light"] .feature-text,
[data-theme="light"] .step-card-desc,
[data-theme="light"] .trap-card-text,
[data-theme="light"] .plan-desc,
[data-theme="light"] .plan-card-tagline {
  color: #475569 !important;
}

[data-theme="dark"] .hero-subtitle,
[data-theme="dark"] .teaser-subtitle,
[data-theme="dark"] .section-subtitle,
[data-theme="dark"] .section-desc,
[data-theme="dark"] .feature-text,
[data-theme="dark"] .step-card-desc,
[data-theme="dark"] .trap-card-text,
[data-theme="dark"] .plan-desc,
[data-theme="dark"] .plan-card-tagline {
  color: #94a3b8 !important;
}

/* 2. REDESIGNED HERO GUEST TEASER CARD (Modern High-Tech SaaS Dropzone) */
#scanner-guest-teaser,
.scanner-guest-teaser {
  max-width: 780px !important;
  width: 100% !important;
  margin: 0 auto !important;
}

.guest-teaser-card {
  max-width: 780px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border-radius: 28px !important;
  padding: 32px 30px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  transform: none !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
}

[data-theme="light"] .guest-teaser-card {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border: 1.5px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 16px 45px -10px rgba(45, 38, 30, 0.1), 0 4px 12px -2px rgba(45, 38, 30, 0.04) !important;
}

[data-theme="light"] .guest-teaser-card:hover {
  transform: none !important;
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 24px 60px -10px rgba(99, 102, 241, 0.18), 0 0 30px rgba(99, 102, 241, 0.08) !important;
}

[data-theme="dark"] .guest-teaser-card {
  background: rgba(15, 23, 42, 0.8) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 20px 55px -12px rgba(0, 0, 0, 0.65) !important;
}

[data-theme="dark"] .guest-teaser-card:hover {
  transform: none !important;
  border-color: rgba(99, 102, 241, 0.5) !important;
  box-shadow: 0 28px 70px -12px rgba(99, 102, 241, 0.3), 0 0 40px rgba(99, 102, 241, 0.18) !important;
}

/* Teaser Header & Emblem */
.teaser-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 10px !important;
}

.teaser-lock-icon,
[data-theme="light"] .teaser-lock-icon,
[data-theme="dark"] .teaser-lock-icon {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
  border: 1px solid #4338ca !important;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  margin: 0 auto !important;
}

.teaser-lock-icon svg,
[data-theme="light"] .teaser-lock-icon svg,
[data-theme="dark"] .teaser-lock-icon svg {
  stroke: #ffffff !important;
  width: 22px !important;
  height: 22px !important;
}

.teaser-title {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  letter-spacing: -0.015em !important;
  margin: 0 !important;
}

.teaser-subtitle {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  max-width: 580px !important;
  margin: 0 auto !important;
}

/* Interactive Dropzone Frame */
.teaser-dropzone-frame {
  width: 100% !important;
  box-sizing: border-box !important;
  border-radius: 20px !important;
  padding: 24px 20px !important;
  border: 2px dashed rgba(99, 102, 241, 0.3) !important;
  transition: border-color 0.25s ease, background 0.25s ease !important;
}

[data-theme="light"] .teaser-dropzone-frame {
  background: rgba(248, 250, 252, 0.8) !important;
}

[data-theme="dark"] .teaser-dropzone-frame {
  background: rgba(15, 23, 42, 0.6) !important;
}

.teaser-dropzone-inner {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
  text-align: center !important;
}

.teaser-drop-icon-bubble {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #6366f1 !important;
  background: rgba(99, 102, 241, 0.1) !important;
  border: 1px solid rgba(99, 102, 241, 0.2) !important;
}

.teaser-drop-headings {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.teaser-drop-title {
  font-size: 14.5px !important;
  font-weight: 600 !important;
}

[data-theme="light"] .teaser-drop-title { color: #1e293b !important; }
[data-theme="dark"] .teaser-drop-title { color: #f1f5f9 !important; }

.teaser-drop-meta {
  font-size: 12px !important;
  color: #64748b !important;
}

.btn-teaser-signup {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  height: 46px !important;
  padding: 0 28px !important;
  border-radius: 9999px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  background: linear-gradient(135deg, #4f46e5, #4338ca) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35) !important;
  cursor: pointer !important;
  margin-top: 4px !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-teaser-signup:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.45) !important;
}

/* Trust Bar & Login Row */
.teaser-bottom-bar {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
}

.teaser-trust-pills {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 8px 16px !important;
}

.teaser-trust-tag {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #475569 !important;
}

[data-theme="dark"] .teaser-trust-tag { color: #94a3b8 !important; }

.teaser-login-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  color: #64748b !important;
}

.teaser-login-btn-link {
  background: transparent !important;
  border: none !important;
  color: #4f46e5 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 0 !important;
  cursor: pointer !important;
  text-decoration: underline !important;
}

[data-theme="dark"] .teaser-login-btn-link { color: #818cf8 !important; }

/* Redesigned 1-Click Samples Section */
.teaser-sample-preview {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  padding-top: 16px !important;
  border-top: 1px solid rgba(226, 232, 240, 0.8) !important;
}

[data-theme="dark"] .teaser-sample-preview {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

.teaser-sample-divider {
  text-align: center !important;
}

.teaser-sample-divider span {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #64748b !important;
}

.sample-chips-row {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.sample-chip-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  padding: 14px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  background: #ffffff !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px -2px rgba(45, 38, 30, 0.04) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
  gap: 8px !important;
}

[data-theme="dark"] .sample-chip-btn {
  background: #151d2e !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.4) !important;
}

.sample-chip-btn:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
  box-shadow: 0 10px 24px -4px rgba(45, 38, 30, 0.1) !important;
}

[data-theme="dark"] .sample-chip-btn:hover {
  box-shadow: 0 10px 26px -4px rgba(0, 0, 0, 0.7) !important;
}

.chip-top-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

.chip-pill-badge {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  padding: 2px 8px !important;
  border-radius: 9999px !important;
}

.chip-pill-danger {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
}

.chip-arrow-icon {
  font-size: 13px !important;
  color: #94a3b8 !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
}

.sample-chip-btn:hover .chip-arrow-icon {
  transform: translateX(2px) !important;
  color: #4f46e5 !important;
}

.chip-content {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.chip-title {
  font-size: 13.5px !important;
  font-weight: 600 !important;
}

[data-theme="light"] .chip-title { color: #1e293b !important; }
[data-theme="dark"] .chip-title { color: #f1f5f9 !important; }

.chip-subtitle {
  font-size: 12px !important;
  color: #64748b !important;
  line-height: 1.4 !important;
}

/* 3. COLOR-FILLED ICONS ON ALL CARDS (Traps, Steps, Features) */
.trap-card-icon,
[data-theme="light"] .trap-card-icon,
[data-theme="dark"] .trap-card-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  flex-shrink: 0 !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.trap-card-icon svg,
[data-theme="light"] .trap-card-icon svg,
[data-theme="dark"] .trap-card-icon svg {
  width: 22px !important;
  height: 22px !important;
  stroke: #ffffff !important;
  stroke-width: 2.2 !important;
}

.trap-card:nth-child(1) .trap-card-icon,
[data-theme="light"] .trap-card:nth-child(1) .trap-card-icon,
[data-theme="dark"] .trap-card:nth-child(1) .trap-card-icon {
  background: linear-gradient(135deg, #f43f5e, #e11d48) !important;
  border: 1px solid #be123c !important;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35) !important;
}

.trap-card:nth-child(2) .trap-card-icon,
[data-theme="light"] .trap-card:nth-child(2) .trap-card-icon,
[data-theme="dark"] .trap-card:nth-child(2) .trap-card-icon {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  border: 1px solid #b91c1c !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
}

.trap-card:nth-child(3) .trap-card-icon,
[data-theme="light"] .trap-card:nth-child(3) .trap-card-icon,
[data-theme="dark"] .trap-card:nth-child(3) .trap-card-icon {
  background: linear-gradient(135deg, #e11d48, #be123c) !important;
  border: 1px solid #9f1239 !important;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.38) !important;
}

.trap-card:nth-child(4) .trap-card-icon,
[data-theme="light"] .trap-card:nth-child(4) .trap-card-icon,
[data-theme="dark"] .trap-card:nth-child(4) .trap-card-icon {
  background: linear-gradient(135deg, #ea580c, #c2410c) !important;
  border: 1px solid #9a3412 !important;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35) !important;
}

.step-icon-wrap,
[data-theme="light"] .step-icon-wrap,
[data-theme="dark"] .step-icon-wrap {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
  border: 1px solid #4338ca !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.32) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  margin-bottom: 16px !important;
  flex-shrink: 0 !important;
}

.step-icon-wrap svg,
[data-theme="light"] .step-icon-wrap svg,
[data-theme="dark"] .step-icon-wrap svg {
  stroke: #ffffff !important;
  width: 20px !important;
  height: 20px !important;
}

.feature-icon-box,
[data-theme="light"] .feature-icon-box,
[data-theme="dark"] .feature-icon-box {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #3b82f6, #6366f1) !important;
  border: 1px solid #2563eb !important;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.32) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  margin-bottom: 16px !important;
  flex-shrink: 0 !important;
}

.feature-icon-box svg,
[data-theme="light"] .feature-icon-box svg,
[data-theme="dark"] .feature-icon-box svg {
  stroke: #ffffff !important;
  width: 20px !important;
  height: 20px !important;
}

/* 4. TILE BOXES & HOVER STABILITY: Zero Scaling Glitches */
.feature-item-card,
.workflow-step-card,
.trap-card,
.pricing-cards-grid .pricing-card-box,
.pricing-card,
.testimonial-card,
.sample-chip-btn,
.dropzone-box {
  border-radius: 24px !important;
  box-sizing: border-box !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease !important;
}

[data-theme="light"] .feature-item-card,
[data-theme="light"] .workflow-step-card,
[data-theme="light"] .trap-card,
[data-theme="light"] .pricing-cards-grid .pricing-card-box,
[data-theme="light"] .pricing-card,
[data-theme="light"] .testimonial-card,
[data-theme="light"] .dropzone-box {
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 10px 28px -4px rgba(45, 38, 30, 0.08), 0 3px 8px -2px rgba(45, 38, 30, 0.03) !important;
}

[data-theme="light"] .feature-item-card:hover,
[data-theme="light"] .workflow-step-card:hover,
[data-theme="light"] .trap-card:hover,
[data-theme="light"] .pricing-cards-grid .pricing-card-box:hover,
[data-theme="light"] .pricing-card:hover,
[data-theme="light"] .testimonial-card:hover,
[data-theme="light"] .dropzone-box:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(99, 102, 241, 0.35) !important;
  box-shadow: 0 18px 36px -6px rgba(45, 38, 30, 0.12), 0 4px 12px -2px rgba(45, 38, 30, 0.04), 0 0 14px rgba(99, 102, 241, 0.08) !important;
}

[data-theme="dark"] .feature-item-card,
[data-theme="dark"] .workflow-step-card,
[data-theme="dark"] .trap-card,
[data-theme="dark"] .pricing-cards-grid .pricing-card-box,
[data-theme="dark"] .pricing-card,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .dropzone-box {
  background: #111726 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 12px 32px -6px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] .feature-item-card:hover,
[data-theme="dark"] .workflow-step-card:hover,
[data-theme="dark"] .trap-card:hover,
[data-theme="dark"] .pricing-cards-grid .pricing-card-box:hover,
[data-theme="dark"] .pricing-card:hover,
[data-theme="dark"] .testimonial-card:hover,
[data-theme="dark"] .dropzone-box:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 20px 48px -6px rgba(0, 0, 0, 0.75), 0 0 18px rgba(99, 102, 241, 0.2) !important;
}

/* 5. PRICING CHECKLIST: 100% UNIFORM WEIGHT & CRISP RENDER */
.plan-features-list,
.plan-perks-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin: 18px 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.plan-feature-item,
.plan-perks-list li {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  font-weight: 450 !important;
  letter-spacing: normal !important;
}

.plan-feature-item span,
.plan-feature-item span strong,
.plan-perks-list li span,
.plan-perks-list li span strong {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
  font-size: 14px !important;
  font-weight: 450 !important;
  line-height: 1.5 !important;
  letter-spacing: normal !important;
}

[data-theme="light"] .plan-feature-item span,
[data-theme="light"] .plan-feature-item span strong,
[data-theme="light"] .plan-perks-list li span,
[data-theme="light"] .plan-perks-list li span strong {
  color: #1e293b !important;
}

[data-theme="dark"] .plan-feature-item span,
[data-theme="dark"] .plan-feature-item span strong,
[data-theme="dark"] .plan-perks-list li span,
[data-theme="dark"] .plan-perks-list li span strong {
  color: #f1f5f9 !important;
}

.plan-feature-item svg[stroke="currentColor"],
.plan-perks-list li.perk-disabled svg {
  opacity: 0.35 !important;
}

.plan-feature-item svg[stroke="currentColor"] + span,
.plan-perks-list li.perk-disabled span {
  opacity: 0.45 !important;
  color: #94a3b8 !important;
}

/* 6. ZERO UPWARD SCROLL ANIMATION (Content is completely stable & static) */
.apple-reveal,
.apple-reveal.is-revealed,
.section-header-center,
.trap-card,
.workflow-step-card,
.feature-item-card,
.pricing-card {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Native Scrollbar */
::-webkit-scrollbar {
  width: 7px !important;
  height: 7px !important;
}
::-webkit-scrollbar-track {
  background: transparent !important;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35) !important;
  border-radius: 9999px !important;
  border: 1.5px solid transparent !important;
  background-clip: content-box !important;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.65) !important;
}

section[id],
div[id] {
  scroll-margin-top: 88px !important;
}

/* Refined Login Alignment & No Underline */
.teaser-login-row {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  color: #64748b !important;
  text-align: center !important;
  margin: 0 auto !important;
}

.teaser-login-label {
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  color: #64748b !important;
  margin: 0 !important;
  padding: 0 !important;
}

[data-theme="dark"] .teaser-login-label {
  color: #94a3b8 !important;
}

.teaser-login-btn-link {
  background: transparent !important;
  border: none !important;
  color: #4f46e5 !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  font-weight: 600 !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  text-decoration: none !important; /* NO UNDERLINE */
  outline: none !important;
  transition: color 0.18s ease !important;
}

.teaser-login-btn-link:hover {
  text-decoration: none !important;
  color: #3730a3 !important;
}

[data-theme="dark"] .teaser-login-btn-link {
  color: #818cf8 !important;
}

[data-theme="dark"] .teaser-login-btn-link:hover {
  color: #a5b4fc !important;
}

/* Sample Cards & Badges (No Arrow, Clean SaaS Badges) */
.chip-top-row {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
}

.chip-pill-warning {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #b45309 !important;
  border: 1px solid rgba(245, 158, 11, 0.28) !important;
}

[data-theme="dark"] .chip-pill-warning {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}

.chip-pill-danger {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
}

[data-theme="dark"] .chip-pill-danger {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}

.chip-pill-purple {
  background: rgba(147, 51, 234, 0.1) !important;
  color: #7e22ce !important;
  border: 1px solid rgba(147, 51, 234, 0.25) !important;
}

[data-theme="dark"] .chip-pill-purple {
  background: rgba(147, 51, 234, 0.18) !important;
  color: #c084fc !important;
  border-color: rgba(147, 51, 234, 0.35) !important;
}

.sample-chip-btn .chip-subtitle {
  font-size: 12px !important;
  color: #64748b !important;
  line-height: 1.45 !important;
}

[data-theme="dark"] .sample-chip-btn .chip-subtitle {
  color: #94a3b8 !important;
}

/* ==========================================================================
   ✨ CRISP RAZOR-SHARP RENDERING & ZERO-JUMP TYPEWRITER
   ========================================================================== */

/* 1. Eliminate Text Pixelation & Jagged Font Edges */
.hero-title,
.hero-title *,
.gradient-text,
#typewriter-text {
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
}

/* Replace jagged gradient text-clip with ultra-crisp rich indigo color */
.hero-title .gradient-text,
.hero-title #typewriter-text {
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: initial !important;
  color: #4f46e5 !important;
  font-weight: 700 !important;
  display: inline !important;
}

[data-theme="dark"] .hero-title .gradient-text,
[data-theme="dark"] .hero-title #typewriter-text {
  color: #818cf8 !important;
}

/* 2. Hero Title Container: Fixed stable height prevents ANY jumping when typing */
.hero-title {
  min-height: 124px !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  margin: 0 auto 16px auto !important;
  text-align: center !important;
  line-height: 1.25 !important;
}

.typing-cursor {
  display: inline-block !important;
  width: 2.5px !important;
  height: 1em !important;
  background-color: #4f46e5 !important;
  margin-left: 4px !important;
  vertical-align: -0.1em !important;
  border-radius: 1px !important;
  animation: cursorBlink 0.75s infinite !important;
}

[data-theme="dark"] .typing-cursor {
  background-color: #818cf8 !important;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 3. Perfect Login Row Alignment & Zero Underline */
.teaser-bottom-bar {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  margin-top: 2px !important;
}

.teaser-login-row {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  color: #64748b !important;
  text-align: center !important;
  margin: 0 auto !important;
}

.teaser-login-label {
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  color: #64748b !important;
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle !important;
}

[data-theme="dark"] .teaser-login-label {
  color: #94a3b8 !important;
}

.teaser-login-btn-link {
  background: transparent !important;
  border: none !important;
  color: #4f46e5 !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  font-weight: 600 !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  text-decoration: none !important; /* NO UNDERLINE */
  display: inline-block !important;
  vertical-align: middle !important;
  transition: color 0.18s ease !important;
  outline: none !important;
}

.teaser-login-btn-link:hover,
.teaser-login-btn-link:focus {
  text-decoration: none !important;
  color: #3730a3 !important;
}

[data-theme="dark"] .teaser-login-btn-link {
  color: #818cf8 !important;
}

[data-theme="dark"] .teaser-login-btn-link:hover {
  color: #a5b4fc !important;
}

/* 4. Sample Cards: Remove arrows, crisp badges, easy phrases */
.chip-arrow-icon {
  display: none !important;
}

.chip-top-row {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  margin-bottom: 2px !important;
}

.chip-pill-warning {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #b45309 !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

[data-theme="dark"] .chip-pill-warning {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}

.chip-pill-danger {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(239, 68, 68, 0.28) !important;
}

[data-theme="dark"] .chip-pill-danger {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}

.chip-pill-purple {
  background: rgba(147, 51, 234, 0.1) !important;
  color: #7e22ce !important;
  border: 1px solid rgba(147, 51, 234, 0.28) !important;
}

[data-theme="dark"] .chip-pill-purple {
  background: rgba(147, 51, 234, 0.18) !important;
  color: #c084fc !important;
  border-color: rgba(147, 51, 234, 0.35) !important;
}

.sample-chip-btn .chip-subtitle {
  font-size: 12px !important;
  color: #64748b !important;
  line-height: 1.45 !important;
}

[data-theme="dark"] .sample-chip-btn .chip-subtitle {
  color: #94a3b8 !important;
}

/* 5. Smooth Shield Glow: No Pixelated Texture */
.teaser-shield-glow {
  position: absolute !important;
  top: -30px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 280px !important;
  height: 120px !important;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0) 70%) !important;
  filter: none !important;
  pointer-events: none !important;
}

/* Typewriter Cursor Inline Fix */
.hero-title {
  display: block !important;
  min-height: 120px !important;
  text-align: center !important;
  margin: 0 auto 16px auto !important;
  line-height: 1.25 !important;
}

.typewriter-container {
  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  vertical-align: baseline !important;
}

.typing-cursor {
  display: inline-block !important;
  width: 3px !important;
  height: 0.88em !important;
  background-color: #4f46e5 !important;
  margin-left: 4px !important;
  vertical-align: -0.02em !important;
  border-radius: 1.5px !important;
  animation: cursorBlink 0.75s infinite !important;
}

[data-theme="dark"] .typing-cursor {
  background-color: #818cf8 !important;
}

/* ==========================================================================
   🎯 REMOVE TEASER LOGO & COMPACT UPWARD ALIGNMENT
   ========================================================================== */
.teaser-shield-glow,
.teaser-lock-icon {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.guest-teaser-card {
  padding: 24px 28px 22px 28px !important;
  gap: 16px !important;
}

.teaser-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.teaser-title-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.teaser-title {
  font-size: 21px !important;
  font-weight: 700 !important;
  letter-spacing: -0.015em !important;
  margin: 0 !important;
  line-height: 1.25 !important;
}

[data-theme="light"] .teaser-title { color: #0f172a !important; }
[data-theme="dark"] .teaser-title { color: #f8fafc !important; }

.teaser-subtitle {
  font-size: 13.5px !important;
  line-height: 1.45 !important;
  max-width: 580px !important;
  margin: 0 !important;
}

[data-theme="light"] .teaser-subtitle { color: #475569 !important; }
[data-theme="dark"] .teaser-subtitle { color: #94a3b8 !important; }

.teaser-dropzone-frame {
  padding: 20px 18px !important;
  margin: 0 !important;
}

/* ==========================================================================
   📐 SPACIOUS BREATHING ROOM BETWEEN HERO TEXT AND SCANNER BOX
   ========================================================================== */
.hero-subtitle {
  margin: 0 auto 32px auto !important;
  max-width: 680px !important;
}

#scanner-guest-teaser,
.scanner-guest-teaser,
#scanner-wrapper,
.scanner-wrapper {
  margin-top: 28px !important;
}

/* ==========================================================================
   🚨 100% UNIFIED COLOR FOR ALL 4 TRAP CARDS (NO ORANGE, SINGLE SLEEK RED)
   ========================================================================== */
.trap-card-icon,
.trap-card:nth-child(n) .trap-card-icon,
.trap-card:nth-child(1) .trap-card-icon,
.trap-card:nth-child(2) .trap-card-icon,
.trap-card:nth-child(3) .trap-card-icon,
.trap-card:nth-child(4) .trap-card-icon,
[data-theme="light"] .trap-card .trap-card-icon,
[data-theme="light"] .trap-card:nth-child(n) .trap-card-icon,
[data-theme="dark"] .trap-card .trap-card-icon,
[data-theme="dark"] .trap-card:nth-child(n) .trap-card-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  border: 1px solid #b91c1c !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.32) !important;
  color: #ffffff !important;
  flex-shrink: 0 !important;
}

.trap-card-icon svg,
.trap-card:nth-child(n) .trap-card-icon svg,
[data-theme="light"] .trap-card .trap-card-icon svg,
[data-theme="dark"] .trap-card .trap-card-icon svg {
  width: 22px !important;
  height: 22px !important;
  stroke: #ffffff !important;
  stroke-width: 2.2 !important;
}

.trap-card:hover .trap-card-icon {
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45) !important;
  transform: scale(1.04) !important;
}

/* Unified Badges for All 4 Trap Cards */
.trap-card-badge,
.trap-card:nth-child(n) .trap-card-badge,
[data-theme="light"] .trap-card-badge,
[data-theme="light"] .trap-card:nth-child(n) .trap-card-badge {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #dc2626 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.24) !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  margin: 0 !important;
}

[data-theme="dark"] .trap-card-badge,
[data-theme="dark"] .trap-card:nth-child(n) .trap-card-badge {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}

/* ==========================================================================
   🔢 ENLARGED STEP NUMBERS (1, 2, 3) WITH HIGHER OPACITY
   ========================================================================== */
.step-number-badge {
  position: absolute !important;
  top: 8px !important;
  right: 18px !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 4.8rem !important; /* Made significantly larger and prominent */
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: -0.04em !important;
  pointer-events: none !important;
  user-select: none !important;
  z-index: 1 !important;
  transition: opacity 0.25s ease, transform 0.25s ease !important;
}

[data-theme="light"] .step-number-badge {
  color: #6366f1 !important;
  opacity: 0.22 !important; /* Increased opacity for clear visibility */
}

[data-theme="dark"] .step-number-badge {
  color: #818cf8 !important;
  opacity: 0.25 !important; /* Increased opacity for clear visibility */
}

.workflow-step-card:hover .step-number-badge {
  opacity: 0.38 !important;
  transform: translateY(-2px) !important;
}

/* ==========================================================================
   🚨 UNIFIED TRAP CARDS: 100% UNIFORM SLEEK RED (ZERO ORANGE)
   ========================================================================== */
.trap-card-icon,
.trap-card:nth-child(n) .trap-card-icon,
[data-theme="light"] .trap-card .trap-card-icon,
[data-theme="dark"] .trap-card .trap-card-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  border: 1px solid #b91c1c !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.32) !important;
  color: #ffffff !important;
  flex-shrink: 0 !important;
}

.trap-card-icon svg,
.trap-card:nth-child(n) .trap-card-icon svg,
[data-theme="light"] .trap-card .trap-card-icon svg,
[data-theme="dark"] .trap-card .trap-card-icon svg {
  width: 22px !important;
  height: 22px !important;
  stroke: #ffffff !important;
  stroke-width: 2.2 !important;
}

.trap-card:hover .trap-card-icon {
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45) !important;
}

.trap-card-badge,
.trap-card:nth-child(n) .trap-card-badge,
[data-theme="light"] .trap-card-badge,
[data-theme="light"] .trap-card:nth-child(n) .trap-card-badge {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #dc2626 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.24) !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  margin: 0 !important;
}

[data-theme="dark"] .trap-card-badge,
[data-theme="dark"] .trap-card:nth-child(n) .trap-card-badge {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}

/* ==========================================================================
   🔒 100% ROCK-SOLID HERO HEADLINE (ZERO VERTICAL JITTER)
   ========================================================================== */
.hero-title {
  display: block !important;
  height: 114px !important;
  min-height: 114px !important;
  max-height: 114px !important;
  text-align: center !important;
  margin: 0 auto 16px auto !important;
  line-height: 1.25 !important;
  overflow: visible !important;
}

.typewriter-container {
  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  min-height: 1.25em !important;
  height: 1.25em !important;
  vertical-align: baseline !important;
}

#typewriter-text {
  display: inline-block !important;
  min-height: 1.25em !important;
  min-width: 10px !important;
  vertical-align: baseline !important;
}

/* ==========================================================================
   ✨ BOTTOM CTA CARD: EXACT SAME GLASS & HOVER ANIMATION AS HERO DROP BOX
   ========================================================================== */
.bottom-cta-card {
  max-width: 820px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border-radius: 28px !important;
  padding: 44px 32px 38px 32px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  gap: 16px !important;
  margin: 0 auto !important;
  transform: none !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
  overflow: hidden !important;
  position: relative !important;
}

[data-theme="light"] .bottom-cta-card {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border: 1.5px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 16px 45px -10px rgba(45, 38, 30, 0.1), 0 4px 12px -2px rgba(45, 38, 30, 0.04) !important;
}

[data-theme="light"] .bottom-cta-card:hover {
  transform: none !important;
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 24px 60px -10px rgba(99, 102, 241, 0.18), 0 0 30px rgba(99, 102, 241, 0.08) !important;
}

[data-theme="dark"] .bottom-cta-card {
  background: rgba(15, 23, 42, 0.8) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 20px 55px -12px rgba(0, 0, 0, 0.65) !important;
}

[data-theme="dark"] .bottom-cta-card:hover {
  transform: none !important;
  border-color: rgba(99, 102, 241, 0.5) !important;
  box-shadow: 0 28px 70px -12px rgba(99, 102, 241, 0.3), 0 0 40px rgba(99, 102, 241, 0.18) !important;
}

/* ==========================================================================
   💳 COMPACT PRICING CARDS & CLEAR VISIBILITY FOR STARTER DISABLED ITEMS
   ========================================================================== */
.pricing-cards-grid {
  gap: 16px !important;
  max-width: 1060px !important;
  margin: 0 auto !important;
}

.pricing-card {
  padding: 24px 22px 20px 22px !important;
  gap: 14px !important;
  border-radius: 22px !important;
}

.pricing-card-header {
  margin-bottom: 0 !important;
}

.pricing-card .plan-title {
  font-size: 18px !important;
  margin-bottom: 4px !important;
}

.pricing-card .plan-desc {
  font-size: 13px !important;
  line-height: 1.4 !important;
  margin-bottom: 12px !important;
  min-height: 36px !important;
}

.pricing-card .plan-price-wrap {
  margin-bottom: 12px !important;
}

.pricing-card .plan-cta-wrap button,
.pricing-card .plan-cta-wrap a {
  height: 42px !important;
  font-size: 13.5px !important;
}

.plan-features-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin: 14px 0 0 0 !important;
  padding: 14px 0 0 0 !important;
  border-top: 1px solid rgba(226, 232, 240, 0.8) !important;
}

[data-theme="dark"] .plan-features-list {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

.plan-feature-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

/* Clear Visibility for Disabled Items (No washed out opacity) */
.plan-feature-item svg[stroke="currentColor"],
.plan-feature-item.item-disabled svg,
.plan-perks-list li.perk-disabled svg {
  opacity: 0.65 !important;
  color: #94a3b8 !important;
  stroke: #94a3b8 !important;
}

.plan-feature-item svg[stroke="currentColor"] + span,
.plan-feature-item.item-disabled span,
.plan-perks-list li.perk-disabled span {
  opacity: 0.78 !important;
  color: #64748b !important;
  text-decoration: none !important;
}

[data-theme="dark"] .plan-feature-item svg[stroke="currentColor"] + span,
[data-theme="dark"] .plan-feature-item.item-disabled span,
[data-theme="dark"] .plan-perks-list li.perk-disabled span {
  color: #94a3b8 !important;
  opacity: 0.85 !important;
}

/* ==========================================================================
   💳 BEAUTIFUL COMPACT PRICING TIERS
   ========================================================================== */
.pricing-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
  max-width: 1040px !important;
  margin: 0 auto !important;
  align-items: stretch !important;
}

.pricing-card {
  padding: 26px 24px 22px 24px !important;
  border-radius: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 16px !important;
  box-sizing: border-box !important;
}

.pricing-card-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  margin: 0 !important;
}

.pricing-card .plan-title {
  font-size: 19px !important;
  font-weight: 700 !important;
  margin: 0 0 6px 0 !important;
}

.pricing-card .plan-desc {
  font-size: 13.5px !important;
  line-height: 1.45 !important;
  margin: 0 0 14px 0 !important;
  min-height: 40px !important;
}

.pricing-card .plan-price-wrap {
  display: flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  margin: 0 0 16px 0 !important;
}

.pricing-card .plan-price-wrap .price-amount {
  font-size: 40px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

.pricing-card .plan-price-wrap .price-period {
  font-size: 13px !important;
  color: #64748b !important;
}

.pricing-card .plan-cta-wrap {
  width: 100% !important;
  margin: 0 0 4px 0 !important;
}

.pricing-card .plan-cta-wrap button {
  width: 100% !important;
  height: 44px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

.plan-features-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 16px 0 0 0 !important;
  border-top: 1px solid rgba(226, 232, 240, 0.85) !important;
  width: 100% !important;
  flex: 1 !important;
}

[data-theme="dark"] .plan-features-list {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

.plan-feature-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 13.5px !important;
  line-height: 1.4 !important;
  font-weight: 500 !important;
  text-align: left !important;
}

.plan-feature-item svg {
  flex-shrink: 0 !important;
}

.plan-feature-item span {
  font-size: 13.5px !important;
}


/* ==========================================================================
   ✨ STATE B: LOGGED-IN SCANNER CARD REDESIGN (MATCHING GUEST TEASER LUXURY)
   ========================================================================== */
#scanner-wrapper,
.scanner-wrapper {
  max-width: 820px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border-radius: 28px !important;
  padding: 24px 28px 22px 28px !important;
  display: none;
  flex-direction: column !important;
  gap: 16px !important;
  margin: 28px auto 0 auto !important;
  transform: none !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
  overflow: hidden !important;
  position: relative !important;
}

[data-theme="light"] #scanner-wrapper,
[data-theme="light"] .scanner-wrapper {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border: 1.5px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 20px 48px -12px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03), inset 0 1px 1px #ffffff !important;
}

[data-theme="light"] #scanner-wrapper:hover,
[data-theme="light"] .scanner-wrapper:hover {
  transform: none !important;
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 24px 60px -10px rgba(99, 102, 241, 0.18), 0 0 30px rgba(99, 102, 241, 0.08) !important;
}

[data-theme="dark"] #scanner-wrapper,
[data-theme="dark"] .scanner-wrapper {
  background: rgba(15, 23, 42, 0.8) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 20px 55px -12px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] #scanner-wrapper:hover,
[data-theme="dark"] .scanner-wrapper:hover {
  transform: none !important;
  border-color: rgba(99, 102, 241, 0.5) !important;
  box-shadow: 0 28px 70px -12px rgba(99, 102, 241, 0.3), 0 0 40px rgba(99, 102, 241, 0.18) !important;
}

/* --- Apple Segmented Control Tab Bar --- */
.scanner-tabs-bar {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  align-self: flex-start !important;
  gap: 4px !important;
  padding: 4px !important;
  border-radius: 14px !important;
  margin: 0 0 4px 0 !important;
  overflow: hidden !important;
}

[data-theme="light"] .scanner-tabs-bar {
  background: rgba(241, 245, 249, 0.9) !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
}

[data-theme="dark"] .scanner-tabs-bar {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.scanner-tab-btn {
  position: relative !important;
  z-index: 2 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 8px 18px !important;
  border-radius: 10px !important;
  background: transparent !important;
  border: none !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: color 0.2s ease !important;
}

[data-theme="light"] .scanner-tab-btn {
  color: #64748b !important;
}

[data-theme="light"] .scanner-tab-btn.active,
[data-theme="light"] .scanner-tab-btn[aria-selected="true"] {
  color: #0f172a !important;
}

[data-theme="dark"] .scanner-tab-btn {
  color: #94a3b8 !important;
}

[data-theme="dark"] .scanner-tab-btn.active,
[data-theme="dark"] .scanner-tab-btn[aria-selected="true"] {
  color: #ffffff !important;
}

/* Sliding Tab Glider */
.tab-pill-glider {
  position: absolute !important;
  top: 4px !important;
  bottom: 4px !important;
  left: 0 !important;
  border-radius: 10px !important;
  pointer-events: none !important;
  z-index: 1 !important;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), width 0.24s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

[data-theme="light"] .tab-pill-glider {
  background: #ffffff !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

[data-theme="dark"] .tab-pill-glider {
  background: #1e293b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* --- Dropzone Frame --- */
#dropzone-box,
.dropzone-box {
  border-radius: 20px !important;
  padding: 28px 24px 24px 24px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  cursor: pointer !important;
  position: relative !important;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
}

[data-theme="light"] #dropzone-box,
[data-theme="light"] .dropzone-box {
  background: rgba(248, 250, 252, 0.75) !important;
  border: 1.5px dashed rgba(203, 213, 225, 0.95) !important;
}

[data-theme="light"] #dropzone-box:hover,
[data-theme="light"] .dropzone-box:hover,
[data-theme="light"] #dropzone-box.dragover,
[data-theme="light"] .dropzone-box.dragover {
  border-color: #6366f1 !important;
  background: rgba(99, 102, 241, 0.04) !important;
}

[data-theme="dark"] #dropzone-box,
[data-theme="dark"] .dropzone-box {
  background: rgba(15, 23, 42, 0.5) !important;
  border: 1.5px dashed rgba(255, 255, 255, 0.18) !important;
}

[data-theme="dark"] #dropzone-box:hover,
[data-theme="dark"] .dropzone-box:hover,
[data-theme="dark"] #dropzone-box.dragover,
[data-theme="dark"] .dropzone-box.dragover {
  border-color: #818cf8 !important;
  background: rgba(99, 102, 241, 0.1) !important;
}

.dropzone-icon-circle {
  width: 52px !important;
  height: 52px !important;
  border-radius: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 12px auto !important;
  transition: transform 0.2s ease !important;
}

[data-theme="light"] .dropzone-icon-circle {
  background: rgba(99, 102, 241, 0.1) !important;
  color: #6366f1 !important;
  border: 1px solid rgba(99, 102, 241, 0.2) !important;
}

[data-theme="dark"] .dropzone-icon-circle {
  background: rgba(99, 102, 241, 0.2) !important;
  color: #818cf8 !important;
  border: 1px solid rgba(99, 102, 241, 0.35) !important;
}

.dropzone-box:hover .dropzone-icon-circle {
  transform: translateY(-2px) scale(1.05) !important;
}

.dropzone-title {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 15.5px !important;
  font-weight: 600 !important;
  margin: 0 0 6px 0 !important;
  line-height: 1.4 !important;
}

[data-theme="light"] .dropzone-title { color: #0f172a !important; }
[data-theme="dark"] .dropzone-title { color: #f8fafc !important; }

.dropzone-browse-link {
  color: #4f46e5 !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
  cursor: pointer !important;
}

[data-theme="dark"] .dropzone-browse-link {
  color: #818cf8 !important;
}

.dropzone-meta {
  font-size: 13px !important;
  color: #64748b !important;
  line-height: 1.45 !important;
  margin: 0 !important;
}

[data-theme="dark"] .dropzone-meta {
  color: #94a3b8 !important;
}

/* --- Direct Paste Zone --- */
.pastezone-box {
  border-radius: 20px !important;
  padding: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  box-sizing: border-box !important;
}

[data-theme="light"] .pastezone-box {
  background: rgba(248, 250, 252, 0.75) !important;
  border: 1.5px solid rgba(226, 232, 240, 0.95) !important;
}

[data-theme="dark"] .pastezone-box {
  background: rgba(15, 23, 42, 0.5) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
}

.pastezone-textarea {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  resize: vertical !important;
  min-height: 120px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

[data-theme="light"] .pastezone-textarea { color: #0f172a !important; }
[data-theme="dark"] .pastezone-textarea { color: #f8fafc !important; }

/* --- Action Button --- */
.scanner-action-bar {
  margin-top: 10px !important;
  display: flex !important;
  justify-content: flex-end !important;
  width: 100% !important;
}

.btn-scan-submit {
  height: 46px !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  padding: 0 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* --- Logged-In Sample Cards --- */
#section-traps {
  margin-top: 6px !important;
  padding-top: 16px !important;
  border-top: 1px solid rgba(226, 232, 240, 0.8) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

[data-theme="dark"] #section-traps {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

#scanner-sample-chips .sample-chip, .sample-chips-container .sample-chip, #scanner-sample-chips .sample-chips-header, .sample-chips-container .sample-chips-header, #section-traps .sample-chips-header {
  margin-bottom: 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: #64748b !important;
}

[data-theme="dark"] #scanner-sample-chips .sample-chip, .sample-chips-container .sample-chip, #scanner-sample-chips .sample-chips-header, .sample-chips-container .sample-chips-header, #section-traps .sample-chips-header {
  color: #94a3b8 !important;
}

#scanner-sample-chips .sample-chip, .sample-chips-container .sample-chip, #scanner-sample-chips .sample-chips-row, .sample-chips-container .sample-chips-row, #section-traps .sample-chips-row {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 12px !important;
  width: 100% !important;
}

#scanner-sample-chips .sample-chip, .sample-chips-container .sample-chip, #section-traps .sample-chip-btn {
  border-radius: 16px !important;
  padding: 14px 14px 12px 14px !important;
  text-align: left !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

[data-theme="light"] #scanner-sample-chips .sample-chip, .sample-chips-container .sample-chip, #section-traps .sample-chip-btn {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1.5px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
}

[data-theme="light"] #scanner-sample-chips .sample-chip, .sample-chips-container .sample-chip, #section-traps .sample-chip-btn:hover {
  border-color: rgba(99, 102, 241, 0.45) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px -4px rgba(99, 102, 241, 0.15) !important;
}

[data-theme="dark"] #scanner-sample-chips .sample-chip, .sample-chips-container .sample-chip, #section-traps .sample-chip-btn {
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] #scanner-sample-chips .sample-chip, .sample-chips-container .sample-chip, #section-traps .sample-chip-btn:hover {
  border-color: rgba(99, 102, 241, 0.5) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px -4px rgba(99, 102, 241, 0.28) !important;
}

#scanner-sample-chips .sample-chip, .sample-chips-container .sample-chip, #section-traps .sample-chip-btn .chip-title {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin: 0 !important;
}

[data-theme="light"] #scanner-sample-chips .sample-chip, .sample-chips-container .sample-chip, #section-traps .sample-chip-btn .chip-title { color: #0f172a !important; }
[data-theme="dark"] #scanner-sample-chips .sample-chip, .sample-chips-container .sample-chip, #section-traps .sample-chip-btn .chip-title { color: #f8fafc !important; }

#scanner-sample-chips .sample-chip, .sample-chips-container .sample-chip, #section-traps .sample-chip-btn .chip-subtitle {
  font-size: 12px !important;
  line-height: 1.35 !important;
  color: #64748b !important;
  margin: 0 !important;
}

[data-theme="dark"] #scanner-sample-chips .sample-chip, .sample-chips-container .sample-chip, #section-traps .sample-chip-btn .chip-subtitle { color: #94a3b8 !important; }

/* ==========================================================================
   💾 SAVE BUTTON MICRO-ANIMATION & SUCCESS FEEDBACK
   ========================================================================== */
.btn-saved-success {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  border-color: #059669 !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4) !important;
  color: #ffffff !important;
  animation: savePulse 0.4s ease-out !important;
}

@keyframes savePulse {
  0% { transform: scale(0.97); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.save-check-icon {
  animation: checkPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes checkPop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   🔔 ULTRA-SLEEK THEME-BASED FLOATING ALERT TOAST SYSTEM
   ========================================================================== */
.cs-toast-container {
  position: fixed !important;
  bottom: 28px !important;
  right: 28px !important;
  z-index: 100000 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  pointer-events: none !important;
}

.cs-toast {
  pointer-events: auto !important;
  border-radius: 18px !important;
  padding: 12px 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 300px !important;
  max-width: 440px !important;
  box-sizing: border-box !important;
  opacity: 0 !important;
  transform: translateY(16px) scale(0.96) !important;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

[data-theme="light"] .cs-toast {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1.5px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.15), 0 4px 12px -2px rgba(15, 23, 42, 0.05) !important;
}

[data-theme="dark"] .cs-toast {
  background: rgba(15, 23, 42, 0.92) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 20px 55px -10px rgba(0, 0, 0, 0.65) !important;
}

.cs-toast.active {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

.cs-toast-icon-box {
  width: 32px !important;
  height: 32px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.cs-toast-icon-success {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
}

.cs-toast-icon-danger,
.cs-toast-icon-error {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
}

.cs-toast-icon-warning {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #f59e0b !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
}

.cs-toast-icon-info {
  background: rgba(99, 102, 241, 0.12) !important;
  color: #6366f1 !important;
  border: 1px solid rgba(99, 102, 241, 0.25) !important;
}

.cs-toast-body {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  flex: 1 !important;
}

[data-theme="light"] .cs-toast-body { color: #0f172a !important; }
[data-theme="dark"] .cs-toast-body { color: #f8fafc !important; }

.cs-toast-close {
  background: transparent !important;
  border: none !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  opacity: 0.5 !important;
  color: inherit !important;
  transition: opacity 0.15s ease, background 0.15s ease !important;
}

.cs-toast-close:hover {
  opacity: 1 !important;
}

[data-theme="light"] .cs-toast-close:hover {
  background: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="dark"] .cs-toast-close:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* --- Form Field Error Alerts --- */
.auth-field-error {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  margin-top: 6px !important;
  display: none;
}

.auth-field-error.active {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  animation: toastSlideIn 0.2s ease-out !important;
}

@media (max-width: 768px) {
  #scanner-sample-chips .sample-chip, .sample-chips-container .sample-chip, #scanner-sample-chips .sample-chips-row, .sample-chips-container .sample-chips-row, #section-traps .sample-chips-row {
    grid-template-columns: 1fr !important;
  }
}


/* ==========================================================================
   🎯 PRICING TILES SPOTLIGHT FOCUS HOVER ANIMATION (SCALE + BLUR + POP)
   ========================================================================== */
.pricing-cards-grid {
  perspective: 1000px;
}

.pricing-cards-grid .pricing-card {
  position: relative !important;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: transform, opacity, filter, box-shadow !important;
}

/* Dim & blur unhovered tiles when hovering over any tile */
.pricing-cards-grid:has(.pricing-card:hover) .pricing-card:not(:hover),
.pricing-cards-grid .pricing-card.is-dimmed {
  transform: scale(0.96) translateY(4px) !important;
  opacity: 0.55 !important;
  filter: blur(1.5px) !important;
}

/* Scale up, pop forward and highlight the active hovered tile */
.pricing-cards-grid .pricing-card:hover,
.pricing-cards-grid .pricing-card.is-spotlight {
  transform: scale(1.045) translateY(-8px) !important;
  opacity: 1 !important;
  filter: blur(0px) !important;
  z-index: 20 !important;
}

[data-theme="light"] .pricing-cards-grid .pricing-card:hover,
[data-theme="light"] .pricing-cards-grid .pricing-card.is-spotlight {
  border-color: rgba(99, 102, 241, 0.55) !important;
  box-shadow: 0 28px 65px -12px rgba(99, 102, 241, 0.22), 0 0 35px rgba(99, 102, 241, 0.1) !important;
}

[data-theme="dark"] .pricing-cards-grid .pricing-card:hover,
[data-theme="dark"] .pricing-cards-grid .pricing-card.is-spotlight {
  border-color: rgba(99, 102, 241, 0.6) !important;
  box-shadow: 0 30px 75px -12px rgba(99, 102, 241, 0.35), 0 0 40px rgba(99, 102, 241, 0.2) !important;
}


/* ==========================================================================
   🔒 STRICT LOGGED-IN WORKSPACE (ZERO MARKETING CONTENT BELOW SCANNER)
   ========================================================================== */
html.is-auth-ready #marketing-landing-content,
html.is-auth-ready .marketing-landing-content,
html.is-logged-in #marketing-landing-content,
html.is-logged-in .marketing-landing-content,
body.is-logged-in #marketing-landing-content,
body.is-logged-in .marketing-landing-content,
body.is-logged-in #section-traps-guest,
body.is-logged-in #section-how-it-works,
body.is-logged-in #section-pricing,
body.is-logged-in #section-testimonials,
body.is-logged-in #section-faq {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}


/* ==========================================================================
   🔒 STRICT STATE A (GUEST LANDING) vs STATE B (LOGGED-IN WORKSPACE)
   ========================================================================== */
html:not(.is-auth-ready):not(.is-logged-in) #scanner-guest-teaser,
html:not(.is-auth-ready):not(.is-logged-in) .scanner-guest-teaser,
html:not(.is-auth-ready):not(.is-logged-in) body #scanner-guest-teaser,
html:not(.is-auth-ready):not(.is-logged-in) body .scanner-guest-teaser {
  display: block !important;
}

html:not(.is-auth-ready):not(.is-logged-in) #scanner-wrapper,
html:not(.is-auth-ready):not(.is-logged-in) .scanner-wrapper,
html:not(.is-auth-ready):not(.is-logged-in) body #scanner-wrapper,
html:not(.is-auth-ready):not(.is-logged-in) body .scanner-wrapper {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

html.is-auth-ready #scanner-guest-teaser,
html.is-auth-ready .scanner-guest-teaser,
html.is-logged-in #scanner-guest-teaser,
html.is-logged-in .scanner-guest-teaser,
body.is-logged-in #scanner-guest-teaser,
body.is-logged-in .scanner-guest-teaser {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

html.is-auth-ready #scanner-wrapper,
html.is-auth-ready .scanner-wrapper,
html.is-logged-in #scanner-wrapper,
html.is-logged-in .scanner-wrapper,
body.is-logged-in #scanner-wrapper,
body.is-logged-in .scanner-wrapper {
  display: flex !important;
}


/* ==========================================================================
   🔒 ABSOLUTE STRICT WORKSPACE ISOLATION (LOGGED-IN VS GUEST LANDING)
   ========================================================================== */

/* When Logged In: Hide all marketing sections, teasers, and CTAs completely */
html.is-auth-ready #marketing-landing-content,
html.is-auth-ready .marketing-landing-content,
html.is-auth-ready .bottom-cta-section,
html.is-auth-ready .landing-section:not(.hero-section):not(.results-section),
html.is-auth-ready #scanner-guest-teaser,
html.is-auth-ready .scanner-guest-teaser,
html.is-auth-ready #section-traps,
html.is-auth-ready #section-traps-guest,
html.is-auth-ready #section-how-it-works,
html.is-auth-ready #section-features,
html.is-auth-ready #section-pricing,
html.is-auth-ready #section-testimonials,
html.is-auth-ready #section-faq,
html.is-auth-ready .nav-link-item,
html.is-logged-in #marketing-landing-content,
html.is-logged-in .marketing-landing-content,
html.is-logged-in .bottom-cta-section,
html.is-logged-in .landing-section:not(.hero-section):not(.results-section),
html.is-logged-in #scanner-guest-teaser,
html.is-logged-in .scanner-guest-teaser,
html.is-logged-in #section-traps,
html.is-logged-in #section-traps-guest,
html.is-logged-in #section-how-it-works,
html.is-logged-in #section-features,
html.is-logged-in #section-pricing,
html.is-logged-in #section-testimonials,
html.is-logged-in #section-faq,
html.is-logged-in .nav-link-item,
body.is-logged-in #marketing-landing-content,
body.is-logged-in .marketing-landing-content,
body.is-logged-in .bottom-cta-section,
body.is-logged-in .landing-section:not(.hero-section):not(.results-section),
body.is-logged-in #scanner-guest-teaser,
body.is-logged-in .scanner-guest-teaser,
body.is-logged-in #section-traps,
body.is-logged-in #section-traps-guest,
body.is-logged-in #section-how-it-works,
body.is-logged-in #section-features,
body.is-logged-in #section-pricing,
body.is-logged-in #section-testimonials,
body.is-logged-in #section-faq,
body.is-logged-in .nav-link-item {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

html.is-auth-ready #scanner-wrapper,
html.is-auth-ready .scanner-wrapper,
html.is-logged-in #scanner-wrapper,
html.is-logged-in .scanner-wrapper,
body.is-logged-in #scanner-wrapper,
body.is-logged-in .scanner-wrapper {
  display: flex !important;
  visibility: visible !important;
  height: auto !important;
  max-height: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* When Logged Out: Strict Guest Landing Display */
html:not(.is-auth-ready):not(.is-logged-in) #scanner-wrapper,
html:not(.is-auth-ready):not(.is-logged-in) .scanner-wrapper,
html:not(.is-auth-ready):not(.is-logged-in) body #scanner-wrapper,
html:not(.is-auth-ready):not(.is-logged-in) body .scanner-wrapper {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

html:not(.is-auth-ready):not(.is-logged-in) #scanner-guest-teaser,
html:not(.is-auth-ready):not(.is-logged-in) .scanner-guest-teaser,
html:not(.is-auth-ready):not(.is-logged-in) body #scanner-guest-teaser,
html:not(.is-auth-ready):not(.is-logged-in) body .scanner-guest-teaser {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  max-height: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

html:not(.is-auth-ready):not(.is-logged-in) #marketing-landing-content,
html:not(.is-auth-ready):not(.is-logged-in) .marketing-landing-content,
html:not(.is-auth-ready):not(.is-logged-in) body #marketing-landing-content,
html:not(.is-auth-ready):not(.is-logged-in) body .marketing-landing-content {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  max-height: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* === MASTER BULLETPROOF MOBILE & TABLET RESPONSIVE ENGINE === */

/* ==========================================================================
   📱 MASTER BULLETPROOF MOBILE & TABLET RESPONSIVE ENGINE (320px - 768px)
   ZERO EFFECT ON DESKTOP — 100% OPTIMIZED FOR ALL PHONES & TABLETS
   ========================================================================== */

@media (max-width: 768px) {
  /* 1. Global Overflow Prevention & Container Spacing */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .container {
    padding: 0 14px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 2. Floating Navbar on Mobile */
  .header-wrapper {
    top: 8px !important;
    padding: 0 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .floating-navbar {
    height: 54px !important;
    padding: 0 14px !important;
    border-radius: 9999px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .brand-anchor {
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  .brand-title-text {
    font-size: 16px !important;
  }

  .header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  /* STRICT HIDE: Desktop auth buttons and user pills must NEVER crowd mobile navbar */
  .header-actions .btn-desktop-auth,
  .floating-navbar .btn-desktop-auth,
  .floating-navbar .nav-divider,
  .header-actions .nav-divider,
  #btn-open-login.btn-desktop-auth,
  #btn-open-signup.btn-desktop-auth,
  #user-dropdown-container.btn-desktop-auth,
  .user-dropdown-container.btn-desktop-auth {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
  }

  /* Mobile Hamburger */
  .mobile-hamburger-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
  }

  /* Theme and Language toggles in navbar */
  .theme-toggle-unboxed {
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0 !important;
  }

  .lang-toggle-btn {
    padding: 3px 5px !important;
    height: 28px !important;
    gap: 4px !important;
  }

  .lang-dropdown-menu {
    right: -4px !important;
    left: auto !important;
    width: 210px !important;
    top: calc(100% + 8px) !important;
    transform-origin: top right !important;
  }

  /* 3. Hero & Teaser Section */
  .hero-section {
    padding: 24px 0 16px 0 !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .hero-pill-badge {
    margin: 0 auto 14px auto !important;
    font-size: 11.5px !important;
    padding: 4px 12px !important;
    max-width: 95% !important;
  }

  .hero-title {
    font-size: clamp(24px, 7vw, 32px) !important;
    line-height: 1.2 !important;
    letter-spacing: -0.025em !important;
    margin-bottom: 12px !important;
    padding: 0 4px !important;
  }

  .hero-subtitle {
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    max-width: 96% !important;
    margin: 0 auto 20px auto !important;
    padding: 0 6px !important;
  }

  .scanner-guest-teaser {
    margin-top: 18px !important;
    padding: 0 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .guest-teaser-card {
    padding: 24px 16px !important;
    border-radius: 22px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .guest-teaser-title {
    font-size: 19px !important;
    margin-bottom: 8px !important;
  }

  .guest-teaser-subtitle {
    font-size: 12.5px !important;
    margin-bottom: 18px !important;
  }

  .teaser-upload-dropzone {
    padding: 24px 16px !important;
    border-radius: 16px !important;
  }

  .teaser-sample-chips-row,
  .sample-chips-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .sample-chip-card,
  .sample-chip-btn {
    width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 100% !important;
    box-sizing: border-box !important;
  }

  .guest-teaser-trust-bullets {
    flex-direction: column !important;
    gap: 8px !important;
    align-items: center !important;
  }

  /* 4. Authenticated Scanner Card */
  .scanner-wrapper {
    margin: 18px auto 0 auto !important;
    padding: 0 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .scanner-card {
    padding: 22px 16px !important;
    border-radius: 22px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .scanner-tabs-bar {
    display: flex !important;
    gap: 6px !important;
    margin-bottom: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .scanner-tab-btn {
    flex: 1 !important;
    padding: 8px 10px !important;
    font-size: 12.5px !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .dropzone-box {
    padding: 28px 14px !important;
    border-radius: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dropzone-title {
    font-size: 14.5px !important;
  }

  .dropzone-subtext {
    font-size: 12px !important;
  }

  .btn-scanner-submit {
    height: 48px !important;
    font-size: 14px !important;
    width: 100% !important;
  }

  /* 5. Trust Banner Section */
  .trust-banner-section {
    padding: 24px 0 !important;
    text-align: center !important;
  }

  .trust-banner-label {
    font-size: 11px !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 14px !important;
    padding: 0 10px !important;
  }

  .trust-pills-wrap,
  .trust-badges-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 0 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .trust-pill {
    font-size: 11.5px !important;
    padding: 6px 12px !important;
  }

  /* 6. Predatory Traps Section (Single Column) */
  .traps-section {
    padding: 36px 0 20px 0 !important;
  }

  .traps-grid {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    max-width: 500px !important;
    margin: 0 auto !important;
    padding: 0 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .trap-card {
    padding: 20px 18px !important;
    border-radius: 20px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .trap-card-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 14px !important;
    width: 100% !important;
  }

  .trap-card-title {
    font-size: 16.5px !important;
    margin-bottom: 8px !important;
  }

  .trap-card-desc {
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin-bottom: 16px !important;
  }

  .trap-card-risk-badge {
    padding: 8px 12px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
  }

  /* 7. How It Works / Workflow Section */
  .workflow-section {
    padding: 36px 0 20px 0 !important;
  }

  .workflow-steps-grid {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    max-width: 500px !important;
    margin: 0 auto !important;
    padding: 0 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .step-card {
    padding: 22px 18px !important;
    border-radius: 20px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    position: relative !important;
  }

  .step-card-num {
    font-size: 38px !important;
    top: 14px !important;
    right: 18px !important;
    line-height: 1 !important;
  }

  .step-card-icon-wrap {
    margin-bottom: 14px !important;
  }

  .step-card-title {
    font-size: 16.5px !important;
    margin-bottom: 8px !important;
    padding-right: 40px !important;
  }

  .step-card-desc {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  /* 8. Features Showcase Section */
  .features-section {
    padding: 36px 0 20px 0 !important;
  }

  .features-showcase-grid {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    max-width: 500px !important;
    margin: 0 auto !important;
    padding: 0 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .feature-card {
    padding: 20px 18px !important;
    border-radius: 20px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .feature-title {
    font-size: 16px !important;
    margin-bottom: 6px !important;
  }

  .feature-text {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  /* 9. Pricing Cards Section (FULL WIDTH, VERTICAL STACK ON MOBILE) */
  .pricing-section {
    padding: 36px 0 20px 0 !important;
  }

  .pricing-cards-grid {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    max-width: 440px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 4px !important;
    box-sizing: border-box !important;
  }

  .pricing-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 26px 20px !important;
    border-radius: 24px !important;
  }

  .pricing-card.pricing-card-popular {
    order: -1 !important; /* Pro tier featured on top on mobile */
  }

  .plan-title {
    font-size: 18px !important;
  }

  .price-amount {
    font-size: 32px !important;
  }

  .plan-features-list .plan-feature-item {
    font-size: 13px !important;
    gap: 8px !important;
  }

  .btn-plan-select {
    height: 46px !important;
    font-size: 14px !important;
    width: 100% !important;
  }

  /* 10. Testimonials & FAQs */
  .testimonials-section,
  .faq-section {
    padding: 36px 0 20px 0 !important;
  }

  .testimonials-grid {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    max-width: 500px !important;
    margin: 0 auto !important;
    padding: 0 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .testimonial-card {
    padding: 20px 18px !important;
    border-radius: 20px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .faq-accordion-wrap,
  .faq-support-grid {
    max-width: 500px !important;
    margin: 0 auto !important;
    padding: 0 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .faq-item {
    border-radius: 16px !important;
    margin-bottom: 10px !important;
  }

  .faq-question-btn {
    padding: 16px 14px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
  }

  .faq-answer-body {
    padding: 0 14px 16px 14px !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  /* 11. Results Section on Mobile */
  .results-section {
    padding: 20px 0 !important;
  }

  .results-score-grid,
  .results-metrics-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-bottom: 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .metric-card {
    padding: 14px 12px !important;
    border-radius: 16px !important;
  }

  .metric-value {
    font-size: 20px !important;
  }

  .metric-label {
    font-size: 11px !important;
  }

  .results-filter-bar {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 8px !important;
    padding-bottom: 8px !important;
    margin-bottom: 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .results-filter-bar::-webkit-scrollbar {
    display: none !important;
  }

  .filter-pill-btn {
    flex-shrink: 0 !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
  }

  .clause-card {
    padding: 18px 14px !important;
    border-radius: 18px !important;
    margin-bottom: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .clause-diff-view {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  .clause-original-col,
  .clause-counter-col {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .clause-actions-row {
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .clause-actions-row button,
  .clause-actions-row .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .results-bottom-cta-card {
    padding: 22px 16px !important;
    border-radius: 20px !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .results-bottom-cta-actions {
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .results-bottom-cta-actions .btn {
    width: 100% !important;
  }

  /* 12. All Modals on Mobile */
  .auth-modal-card,
  .app-modal-dialog,
  .modal-dialog,
  .admin-gift-plan-dialog {
    width: calc(100% - 20px) !important;
    max-width: 440px !important;
    margin: 10px auto !important;
    padding: 22px 18px !important;
    border-radius: 22px !important;
    max-height: 90vh !important;
    box-sizing: border-box !important;
  }

  .auth-title {
    font-size: 1.15rem !important;
    line-height: 1.3 !important;
  }

  .auth-subtitle {
    font-size: 12px !important;
    margin-bottom: 14px !important;
  }

  .modal-main-title {
    font-size: 1.15rem !important;
    line-height: 1.3 !important;
  }

  .modal-main-subtitle {
    font-size: 12px !important;
  }

  .modal-tier-cards-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }

  .modal-tier-card {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .pricing-modal-tabs {
    flex-direction: column !important;
    gap: 8px !important;
  }

  /* 13. App Footer on Mobile */
  .app-footer {
    padding: 36px 0 24px 0 !important;
  }

  .footer-main-grid,
  .footer-links-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    text-align: center !important;
    align-items: center !important;
  }

  .footer-col {
    align-items: center !important;
    text-align: center !important;
  }

  .footer-col-title {
    margin-bottom: 10px !important;
    font-size: 14px !important;
  }

  .footer-links-list {
    align-items: center !important;
    gap: 8px !important;
  }

  .footer-bottom-bar {
    margin-top: 28px !important;
    padding-top: 18px !important;
    flex-direction: column !important;
    gap: 10px !important;
    text-align: center !important;
  }
}


@media (max-width: 768px) {
    /* ==========================================================================
     CENTER-ALIGN SPECIFIC SECTIONS ON MOBILE (AS REQUESTED)
     ========================================================================== */
  /* ==========================================================================
     CENTER-ALIGN SPECIFIC SECTIONS ON MOBILE (AS REQUESTED)
     ========================================================================== */

  /* 1. Sample Contract Chips (Image 1) */
  .sample-chip-btn,
  .sample-chip-card {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px 14px !important;
  }

  .chip-top-row {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 8px !important;
  }

  .chip-pill-badge {
    margin: 0 auto !important;
    display: inline-flex !important;
  }

  .chip-content {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }

  .chip-title {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin-bottom: 4px !important;
    font-size: 15px !important;
  }

  .chip-subtitle {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    font-size: 12.5px !important;
    line-height: 1.4 !important;
  }

  /* 2. Predatory Traps Cards (Image 2) */
  .trap-card {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 24px 18px 20px 18px !important;
  }

  .trap-card-top-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
    width: 100% !important;
  }

  .trap-card-icon {
    margin: 0 auto !important;
  }

  .trap-card-badge {
    margin: 0 auto !important;
    display: inline-flex !important;
  }

  .trap-card-title {
    text-align: center !important;
    width: 100% !important;
    font-size: 17px !important;
    margin-bottom: 10px !important;
  }

  .trap-card-text {
    text-align: center !important;
    width: 100% !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    margin-bottom: 16px !important;
  }

  .trap-loss-stat {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    text-align: center !important;
    padding: 10px 14px !important;
  }

  .trap-stat-label,
  .trap-stat-value {
    text-align: center !important;
  }

  /* 3. Workflow / How It Works Step Cards (Image 3) */
  .workflow-step-card,
  .step-card {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 26px 18px 22px 18px !important;
  }

  .step-icon-wrap,
  .step-card-icon-wrap {
    margin: 0 auto 16px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .step-card-title {
    text-align: center !important;
    width: 100% !important;
    padding-right: 0 !important;
    font-size: 17px !important;
    margin-bottom: 10px !important;
  }

  .step-card-desc {
    text-align: center !important;
    width: 100% !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
  }

  /* 4. Features Showcase Cards (Image 4) */
  .feature-item-card,
  .feature-card {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 24px 18px 20px 18px !important;
  }

  .feature-icon-box {
    margin: 0 auto 16px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .feature-title {
    text-align: center !important;
    width: 100% !important;
    font-size: 16.5px !important;
    margin-bottom: 8px !important;
  }

  .feature-text {
    text-align: center !important;
    width: 100% !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
  }

  /* 5. Pricing Card Header (Image 5) */
  .pricing-card-header {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }

  .plan-title {
    text-align: center !important;
    width: 100% !important;
    font-size: 19px !important;
    margin-bottom: 6px !important;
  }

  .plan-desc {
    text-align: center !important;
    width: 100% !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    margin-bottom: 14px !important;
  }

  .plan-price-wrap {
    justify-content: center !important;
    text-align: center !important;
    display: flex !important;
    align-items: baseline !important;
    width: 100% !important;
  }

  .plan-cta-wrap {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  .btn-plan-select {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

@media (max-width: 400px) {
  .floating-navbar {
    padding: 0 10px !important;
    height: 50px !important;
  }

  .brand-title-text {
    font-size: 15px !important;
  }

  .header-actions {
    gap: 4px !important;
  }

  .hero-title {
    font-size: 22px !important;
  }

  .results-score-grid,
  .results-metrics-grid {
    grid-template-columns: 1fr !important;
  }
}



/* ==========================================================================
   DEDICATED ZERO-GLITCH MOBILE ENGINE (CENTER ALIGNED & NO OVERLAP)
   ========================================================================== */
@media (max-width: 768px) {
  /* 1. Hero Hide on Scan */
  body.is-viewing-results .hero-section,
  html.is-viewing-results .hero-section {
    display: none !important;
  }

  body.is-viewing-results #results-section,
  html.is-viewing-results #results-section {
    display: block !important;
    margin-top: 10px !important;
    padding-top: 10px !important;
  }

  /* 2. Trap Cards: REMOVE PILL BADGES on Mobile (User Request: "mobile ma ye pills hta do yaha se") */
  .trap-card-badge {
    display: none !important;
  }
  .trap-card .trap-card-icon-wrap {
    margin: 0 auto 12px auto !important;
  }

  /* 3. Pricing Packages: ZERO BLUR (User Request: "pricing packages blury ha fix kro fast") */
  .pricing-cards-grid:has(.pricing-card:hover) .pricing-card:not(:hover),
  .pricing-cards-grid .pricing-card.is-dimmed,
  .pricing-cards-grid .pricing-card,
  .pricing-card,
  .pricing-card-box,
  .modal-tier-card,
  .pricing-toggle-wrap,
  .billing-toggle-wrapper {
    filter: none !important;
    -webkit-filter: none !important;
    opacity: 1 !important;
    transform: none !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
  }

  #pricing-modal-overlay .modal-tier-card,
  #pricing-modal-overlay .pricing-card-box,
  #pricing-modal-overlay .app-modal-dialog,
  #pricing-modal-overlay .modal-dialog-body {
    filter: none !important;
    -webkit-filter: none !important;
    transform: none !important;
    -webkit-font-smoothing: antialiased !important;
  }

  /* 4. Results Section: Middle / Center Alignment (User Request: "bs mobile ma allignment middle kro thats it") */
  .results-section {
    padding: 10px 0 40px 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .scanned-contract-title-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 10px !important;
    padding: 18px 14px !important;
    border-radius: 20px !important;
    margin-bottom: 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .contract-title-meta {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .contract-type-badge {
    margin: 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .title-display-wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-align: center !important;
    width: 100% !important;
  }

  .scanned-contract-heading {
    text-align: center !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    width: 100% !important;
  }

  .btn-edit-title {
    margin: 0 auto !important;
  }

  .scanned-contract-submeta {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-align: center !important;
    width: 100% !important;
  }

  /* Gemini AI Deep Legal Intelligence Card on Mobile */
  .gemini-insights-card {
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 20px !important;
    margin: 16px 0 20px 0 !important;
    overflow: hidden !important;
  }

  .gemini-card-header {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding: 14px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .gemini-badge-glow {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    gap: 8px !important;
    width: 100% !important;
    font-size: 14px !important;
    font-weight: 700 !important;
  }

  .gemini-insights-body {
    padding: 16px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .gemini-section-block {
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .gemini-block-title {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    gap: 8px !important;
    width: 100% !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 10px !important;
  }

  .gemini-summary-text {
    text-align: center !important;
    font-size: 13.5px !important;
    line-height: 1.6 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
  }

  .gemini-traps-list {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .gemini-trap-card {
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    padding: 16px 14px !important;
    border-radius: 16px !important;
  }

  .gemini-trap-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
    width: 100% !important;
  }

  .gemini-trap-title {
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
  }

  .gemini-trap-badge {
    margin: 0 auto !important;
    display: inline-block !important;
  }

  .gemini-trap-clause,
  .gemini-trap-risk {
    text-align: center !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
    width: 100% !important;
  }

  .gemini-leverage-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .gemini-leverage-list li {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 14px !important;
    border-radius: 14px !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
  }

  /* Clauses Feed: Middle Aligned */
  .clauses-feed {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .clause-card {
    text-align: center !important;
    padding: 20px 16px !important;
    border-radius: 20px !important;
    margin-bottom: 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .clause-meta-row,
  .clause-header-meta {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .clause-index-badge,
  .clause-risk-badge,
  .clause-category-tag {
    margin: 0 auto !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .clause-title {
    text-align: center !important;
    font-size: 16.5px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    width: 100% !important;
    margin: 6px auto !important;
  }

  .clause-summary-text,
  .clause-risk-explanation {
    text-align: center !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
    width: 100% !important;
  }

  .clause-diff-view {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .clause-original-col,
  .clause-counter-col {
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    padding: 14px !important;
    border-radius: 14px !important;
  }

  .diff-col-header,
  .excerpt-tag {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
  }

  .clause-original-col p,
  .clause-counter-col p,
  .clause-original-text,
  .clause-redline-text {
    text-align: center !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
  }

  .clause-actions-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: 12px !important;
  }

  .clause-actions-row button,
  .clause-actions-row .btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* Results Filter Bar & Tone Toggle */
  .results-filter-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 18px !important;
  }

  .filter-chips-group {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .tone-pill-toggle {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
  }

  /* 5. Dedicated Mobile UI for Navigation Modals (User Request: "ye sb kholne pe inka ui mobile ke lye alag se design krle no overlap no glitches") */
  .auth-modal-overlay,
  .app-modal-overlay,
  .scanning-modal-overlay {
    padding: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .auth-modal-card,
  .profile-modal-card,
  .history-modal-card,
  .app-modal-dialog,
  .modal-dialog-wide,
  .modal-dialog {
    width: calc(100% - 10px) !important;
    max-width: 440px !important;
    margin: 6px auto !important;
    padding: 22px 16px 18px 16px !important;
    border-radius: 22px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    box-sizing: border-box !important;
    position: relative !important;
  }

  .auth-modal-card::-webkit-scrollbar,
  .app-modal-dialog::-webkit-scrollbar,
  .modal-dialog-body::-webkit-scrollbar {
    display: none !important;
  }

  .auth-close-btn,
  .btn-modal-close,
  .modal-close-btn {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 50 !important;
    background: rgba(120, 120, 128, 0.12) !important;
    border: 1px solid rgba(120, 120, 128, 0.2) !important;
    padding: 0 !important;
    cursor: pointer !important;
  }

  /* Profile Modal Mobile UI */
  .profile-header-meta {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
    padding-top: 8px !important;
    width: 100% !important;
  }

  .profile-avatar-badge {
    margin: 0 auto !important;
  }

  .profile-user-name {
    text-align: center !important;
    font-size: 1.18rem !important;
    font-weight: 700 !important;
    margin: 2px auto !important;
  }

  .profile-sub-badge {
    margin: 0 auto !important;
    display: inline-flex !important;
  }

  .profile-modal-tabs,
  .auth-tabs-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 4px 2px 10px 2px !important;
    margin-bottom: 16px !important;
    justify-content: flex-start !important;
    border-bottom: 1px solid var(--glass-border) !important;
  }

  .profile-modal-tabs::-webkit-scrollbar,
  .auth-tabs-nav::-webkit-scrollbar {
    display: none !important;
  }

  .profile-tab-btn,
  .auth-tab-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    padding: 8px 14px !important;
    border-radius: 12px !important;
  }

  .profile-form-group,
  .auth-input-group {
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    margin-bottom: 14px !important;
  }

  .profile-form-group label,
  .auth-input-group label {
    text-align: center !important;
    display: block !important;
    font-size: 12px !important;
    margin-bottom: 6px !important;
  }

  .profile-form-group input,
  .profile-form-group select,
  .cs-select-trigger,
  .auth-input-field {
    text-align: center !important;
    text-align-last: center !important;
    width: 100% !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
  }

  .color-dots-row {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    margin: 8px auto !important;
  }

  .btn-save-trigger,
  #btn-save-profile,
  #btn-upgrade-plan {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 12px !important;
    font-size: 14px !important;
    border-radius: 14px !important;
  }

  /* Saved Contracts Modal Mobile UI */
  .history-modal-card {
    min-height: 340px !important;
  }

  .history-header {
    text-align: center !important;
    margin-bottom: 16px !important;
    padding-right: 32px !important;
    padding-left: 32px !important;
  }

  .history-title {
    font-size: 1.15rem !important;
    text-align: center !important;
  }

  .history-subtitle {
    font-size: 12px !important;
    text-align: center !important;
  }

  .history-list-items {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .history-item-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 8px !important;
    padding: 14px !important;
    border-radius: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Pricing Modal Mobile UI */
  .modal-dialog-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
    padding: 4px 30px 14px 30px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .modal-header-brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .modal-header-icon-wrap {
    margin: 0 auto !important;
  }

  .modal-main-title {
    text-align: center !important;
    font-size: 1.18rem !important;
    font-weight: 700 !important;
    width: 100% !important;
  }

  .modal-main-subtitle {
    text-align: center !important;
    font-size: 12px !important;
    width: 100% !important;
  }

  .modal-dialog-body {
    padding: 0 !important;
    overflow-y: visible !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .pricing-modal-active-card,
  .billing-summary-card {
    text-align: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 16px !important;
    border-radius: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .pricing-modal-tabs {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    margin: 14px auto !important;
    width: 100% !important;
  }

  .pricing-toggle-wrap,
  .billing-toggle-wrapper {
    margin: 0 auto !important;
    justify-content: center !important;
  }

  #pricing-modal-currencies {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .modal-tier-cards-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .pricing-card-box,
  .modal-tier-card {
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    padding: 20px 16px !important;
    border-radius: 18px !important;
    filter: none !important;
    -webkit-filter: none !important;
  }

  .btn-select-tier {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 12px !important;
    border-radius: 12px !important;
  }

  /* How It Works Modal Mobile UI */
  .how-steps-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .how-step-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 18px 14px !important;
    border-radius: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
  }

  .how-step-title {
    text-align: center !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    margin: 8px auto !important;
    width: 100% !important;
  }

  .how-step-desc {
    text-align: center !important;
    font-size: 12.5px !important;
    line-height: 1.55 !important;
    width: 100% !important;
  }

  .modal-dialog-footer {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 16px !important;
  }

  .modal-dialog-footer .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 12px !important;
    border-radius: 14px !important;
  }

  /* FAQ Modal Mobile UI */
  .faq-support-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .faq-accordion-item {
    border-radius: 14px !important;
    padding: 12px 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }

  .faq-accordion-trigger {
    text-align: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
  }

  .faq-accordion-body {
    text-align: center !important;
    font-size: 12.5px !important;
    line-height: 1.55 !important;
    padding-top: 8px !important;
  }
}



/* ==========================================================================
   ✦ SLEEK MINIMALIST EXECUTIVE UI (PC & MOBILE) - ZERO BOXY CLUTTER
   ========================================================================== */

/* 1. EXECUTIVE RISK OVERVIEW BANNER (Sleek Dashboard, No Box Clutter) */
.risk-overview-banner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
  padding: 22px 28px !important;
  border-radius: 16px !important;
  background: rgba(15, 23, 42, 0.65) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.35) !important;
}

[data-theme="light"] .risk-overview-banner {
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04) !important;
}

.risk-meter-col {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  flex: 1 1 auto !important;
}

.risk-score-badge {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  border: 3px solid #ef4444 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.22) !important;
}

[data-theme="light"] .risk-score-badge {
  background: #fff1f2 !important;
  border: 3px solid #dc2626 !important;
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.12) !important;
}

.score-number {
  font-family: var(--font-display, inherit) !important;
  font-size: 25px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  color: #ef4444 !important;
}

[data-theme="light"] .score-number {
  color: #dc2626 !important;
}

.score-max {
  font-size: 10px !important;
  font-weight: 600 !important;
  opacity: 0.65 !important;
  margin-top: 1px !important;
  color: inherit !important;
}

.risk-grade-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.risk-verdict-title {
  font-family: var(--font-display, inherit) !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

.risk-verdict-desc {
  font-size: 13px !important;
  line-height: 1.5 !important;
  color: #94a3b8 !important;
  max-width: 440px !important;
  margin: 0 !important;
}

[data-theme="light"] .risk-verdict-desc {
  color: #475569 !important;
}

/* Right Stat Cluster with Clean Vertical Dividers */
.risk-stats-col {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 12px !important;
  padding: 10px 16px !important;
}

[data-theme="light"] .risk-stats-col {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

.risk-stat-item {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  padding: 0 14px !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  text-align: left !important;
}

[data-theme="light"] .risk-stat-item {
  border-right: 1px solid #e2e8f0 !important;
}

.risk-stat-item:last-child {
  border-right: none !important;
  padding-right: 0 !important;
}

.risk-stat-item:first-child {
  padding-left: 0 !important;
}

.stat-label {
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #94a3b8 !important;
  white-space: nowrap !important;
}

[data-theme="light"] .stat-label {
  color: #64748b !important;
}

.stat-val {
  font-family: var(--font-display, inherit) !important;
  font-size: 16.5px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

/* 2. SLEEK MINIMALIST CLAUSE CARDS (No Heavy Double/Triple Box Borders) */
.clause-card {
  background: rgba(15, 23, 42, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 16px !important;
  padding: 22px 24px !important;
  margin-bottom: 16px !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12) !important;
  border-left: none !important; /* Eliminate chunky vertical side block */
}

[data-theme="light"] .clause-card {
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03) !important;
}

.clause-card-header,
.clause-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

.clause-card-title-group {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 8px !important;
}

.clause-index {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

[data-theme="light"] .clause-index {
  color: #64748b !important;
}

.clause-title {
  font-size: 15.5px !important;
  font-weight: 700 !important;
  color: var(--text-pure, #ffffff) !important;
  letter-spacing: -0.01em !important;
}

[data-theme="light"] .clause-title {
  color: #0f172a !important;
}

/* Clean Category Tag */
.clause-badge {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* Predatory Excerpt: Sleek Minimalist Callout (Not a heavy box!) */
.clause-original {
  background: rgba(239, 68, 68, 0.04) !important;
  border: none !important;
  border-left: 3px solid #ef4444 !important;
  border-radius: 0 8px 8px 0 !important;
  padding: 10px 14px !important;
  margin-bottom: 12px !important;
  box-shadow: none !important;
}

[data-theme="light"] .clause-original {
  background: #fef2f2 !important;
  border-left: 3px solid #dc2626 !important;
}

.predatory-label {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  color: #ef4444 !important;
  margin-bottom: 4px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

[data-theme="light"] .predatory-label {
  color: #dc2626 !important;
}

.predatory-quote {
  font-size: 13px !important;
  line-height: 1.55 !important;
  color: #fca5a5 !important;
  font-style: italic !important;
  display: block !important;
}

[data-theme="light"] .predatory-quote {
  color: #991b1b !important;
}

.clause-explanation {
  font-size: 13px !important;
  line-height: 1.55 !important;
  color: #94a3b8 !important;
  margin-bottom: 14px !important;
}

[data-theme="light"] .clause-explanation {
  color: #334155 !important;
}

/* Counter-Offer Callout: Sleek Minimalist Callout (Not a heavy box!) */
.counter-box {
  background: rgba(16, 185, 129, 0.04) !important;
  border: none !important;
  border-left: 3px solid #10b981 !important;
  border-radius: 0 8px 8px 0 !important;
  padding: 12px 16px !important;
  box-shadow: none !important;
}

[data-theme="light"] .counter-box {
  background: #f0fdf4 !important;
  border-left: 3px solid #059669 !important;
}

.counter-box-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 8px !important;
}

.counter-box-title-group {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  color: #10b981 !important;
  text-transform: uppercase !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

[data-theme="light"] .counter-box-title-group {
  color: #059669 !important;
}

.counter-text {
  font-size: 13.5px !important;
  line-height: 1.55 !important;
  color: var(--text-pure, #ffffff) !important;
  margin: 0 !important;
}

[data-theme="light"] .counter-text {
  color: #0f172a !important;
}

/* Sleek Icon Buttons for Edit & Copy */
.counter-box-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.btn-edit-clause-counter,
.btn-copy-clause-counter,
.btn-quick-reset-clause {
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
}

.btn-edit-clause-counter svg,
.btn-copy-clause-counter svg,
.btn-quick-reset-clause svg {
  stroke: currentColor !important;
  width: 13px !important;
  height: 13px !important;
}

[data-theme="light"] .btn-edit-clause-counter,
[data-theme="light"] .btn-copy-clause-counter,
[data-theme="light"] .btn-quick-reset-clause {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}

.btn-edit-clause-counter:hover,
.btn-copy-clause-counter:hover,
.btn-quick-reset-clause:hover {
  background: rgba(99, 102, 241, 0.12) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
  color: #818cf8 !important;
}

[data-theme="light"] .btn-edit-clause-counter:hover,
[data-theme="light"] .btn-copy-clause-counter:hover,
[data-theme="light"] .btn-quick-reset-clause:hover {
  background: #eef2ff !important;
  border-color: #6366f1 !important;
  color: #4f46e5 !important;
}

/* 3. SLEEK MINIMALIST GEMINI INTELLIGENCE CARD (No Box Clutter) */
.gemini-insights-card {
  border-radius: 16px !important;
  background: rgba(15, 23, 42, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 22px 26px !important;
}

[data-theme="light"] .gemini-insights-card {
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.03) !important;
}

.gemini-traps-grid,
.gemini-traps-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 14px !important;
}

.gemini-trap-item,
.gemini-trap-card {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px !important;
  padding: 16px 18px !important;
  box-shadow: none !important;
}

[data-theme="light"] .gemini-trap-item,
[data-theme="light"] .gemini-trap-card {
  background: #f8fafc !important;
  border: 1px solid #f1f5f9 !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03) !important;
}

.gemini-trap-badge {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
}

.gemini-leverage-list {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px !important;
  padding: 8px 18px !important;
  list-style: none !important;
  margin: 0 !important;
}

[data-theme="light"] .gemini-leverage-list {
  background: #f8fafc !important;
  border: 1px solid #f1f5f9 !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03) !important;
}

.gemini-leverage-item {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  border-radius: 0 !important;
  padding: 12px 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
}

[data-theme="light"] .gemini-leverage-item {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}

.gemini-leverage-item:last-child {
  border-bottom: none !important;
}

.gemini-leverage-icon {
  flex-shrink: 0 !important;
  margin-top: 2px !important;
}

/* ==========================================================================
   MOBILE-SPECIFIC ENHANCEMENTS: CENTER ALIGNED & ZERO OVERLAP
   ========================================================================== */
@media (max-width: 768px) {
  /* On Mobile: Middle Align the Sleek Callouts */
  .risk-overview-banner {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 20px 16px !important;
  }

  .risk-meter-col {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
  }

  .risk-grade-info {
    align-items: center !important;
    text-align: center !important;
  }

  .risk-stats-col {
    width: 100% !important;
    justify-content: space-around !important;
    text-align: center !important;
  }

  .risk-stat-item {
    align-items: center !important;
    text-align: center !important;
    padding: 0 8px !important;
  }

  .clause-card {
    text-align: center !important;
    padding: 18px 14px !important;
  }

  .clause-card-header,
  .clause-header {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .clause-card-title-group {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .clause-title {
    text-align: center !important;
  }

  .clause-original {
    text-align: center !important;
    border-left: none !important;
    border-top: 3px solid #ef4444 !important;
    border-radius: 8px !important;
    padding: 12px 14px !important;
  }

  [data-theme="light"] .clause-original {
    border-left: none !important;
    border-top: 3px solid #dc2626 !important;
  }

  .predatory-label {
    justify-content: center !important;
    text-align: center !important;
  }

  .predatory-quote {
    text-align: center !important;
  }

  .clause-explanation {
    text-align: center !important;
  }

  .counter-box {
    text-align: center !important;
    border-left: none !important;
    border-top: 3px solid #10b981 !important;
    border-radius: 8px !important;
    padding: 14px 14px !important;
  }

  [data-theme="light"] .counter-box {
    border-left: none !important;
    border-top: 3px solid #059669 !important;
  }

  .counter-box-header {
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .counter-box-title-group {
    justify-content: center !important;
    text-align: center !important;
  }

  .counter-text {
    text-align: center !important;
  }

  .counter-box-actions {
    justify-content: center !important;
    margin-top: 6px !important;
  }
}



/* ==========================================================================
   ✦ SAMPLE CHIPS DISPLAY FIX & CENTERED REANALYZE BUTTON
   ========================================================================== */
#scanner-wrapper .sample-chips-container,
#scanner-wrapper #scanner-sample-chips,
.sample-chips-container,
#scanner-sample-chips {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
}

/* Ensure .sample-chips-row inside scanner is always visible */
#scanner-wrapper .sample-chips-row,
#scanner-sample-chips .sample-chips-row {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (max-width: 768px) {
  #scanner-wrapper .sample-chips-row,
  #scanner-sample-chips .sample-chips-row {
    display: flex !important;
    flex-direction: column !important;
  }
}

/* Center Align "Scan Another Contract" Button on PC & Mobile */
.results-reanalyze-bottom-wrap {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  width: 100% !important;
  margin: 36px auto 24px auto !important;
  padding: 0 !important;
  clear: both !important;
}

.btn-reanalyze-center {
  margin: 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 11px 26px !important;
  border-radius: 9999px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: var(--text-pure, #0f172a) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .btn-reanalyze-center {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06) !important;
}

.btn-reanalyze-center:hover {
  transform: translateY(-2px) !important;
  background: rgba(99, 102, 241, 0.12) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
  color: #6366f1 !important;
}


/* === GLOBAL FINAL FIXES: PC TRAP CARDS, TRUST BANNER & DISABLED SAVE BUTTON === */

/* 1. SAVE PROFILE BUTTON: DISABLED & FADED UNTIL FORM EDITED */
#btn-save-profile:disabled,
#btn-save-profile.btn-disabled,
.btn-save-trigger:disabled,
.btn-save-trigger.btn-disabled {
  opacity: 0.42 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  background: rgba(99, 102, 241, 0.45) !important;
  color: rgba(255, 255, 255, 0.72) !important;
  box-shadow: none !important;
  transform: none !important;
  filter: grayscale(18%) !important;
  transition: all 0.25s ease !important;
}

[data-theme="light"] #btn-save-profile:disabled,
[data-theme="light"] #btn-save-profile.btn-disabled,
[data-theme="light"] .btn-save-trigger:disabled,
[data-theme="light"] .btn-save-trigger.btn-disabled {
  opacity: 0.45 !important;
  background: #a5b4fc !important;
  color: #ffffff !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

/* 2. TRUST BANNER: VISIBLE WHEN LOGGED IN ON SCANNER / HOME SCREEN */
.trust-banner-section,
body.is-logged-in .trust-banner-section,
html.is-logged-in .trust-banner-section {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin-top: 24px !important;
  margin-bottom: 24px !important;
  clear: both !important;
}

body.is-viewing-results .trust-banner-section,
html.is-viewing-results .trust-banner-section {
  display: none !important;
}

/* 3. PC / DESKTOP (MIN-WIDTH: 769px): RESTORE SLEEK EXECUTIVE TRAP CARDS (NO BOXY CENTERING) */
@media (min-width: 769px) {
  .trap-card {
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 26px 22px !important;
  }

  .trap-card-top-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin-bottom: 16px !important;
    gap: 0 !important;
  }

  .trap-card-icon {
    margin: 0 !important;
  }

  .trap-card-badge {
    margin: 0 !important;
    display: inline-flex !important;
    align-self: center !important;
  }

  .trap-card-title {
    text-align: left !important;
    width: 100% !important;
    font-size: 16.5px !important;
    margin-bottom: 8px !important;
  }

  .trap-card-text {
    text-align: left !important;
    width: 100% !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin-bottom: 14px !important;
  }

  .trap-loss-stat {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: left !important;
    width: 100% !important;
    padding: 10px 14px !important;
  }

  .trap-stat-label {
    text-align: left !important;
  }

  .trap-stat-value {
    text-align: right !important;
  }

  /* Desktop Workflow and Feature Cards */
  .workflow-step-card,
  .step-card,
  .feature-item-card,
  .feature-card {
    text-align: left !important;
    align-items: flex-start !important;
  }

  .step-card-title,
  .step-card-desc,
  .feature-title,
  .feature-text {
    text-align: left !important;
  }

  .step-icon-wrap,
  .feature-icon-box {
    margin: 0 0 16px 0 !important;
  }

  .pricing-card-header {
    text-align: left !important;
    align-items: flex-start !important;
  }

  .plan-title,
  .plan-desc {
    text-align: left !important;
  }
}


/* ==========================================================================
   📱 MOBILE-ONLY: REFINED PERFECTION SPACING & FLOATING NAVBAR BREATHING ROOM
   STRICTLY APPLIES TO MOBILE ONLY (max-width: 768px) - ZERO IMPACT ON PC
   ========================================================================== */
@media (max-width: 768px) {
  /* 1. Floating Navbar Spacing: Graceful breathing room from top of screen */
  .header-wrapper {
    top: 10px !important;
    padding: 10px 12px 6px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 2. Hero Section: Balanced, elegant vertical padding */
  .hero-section {
    padding-top: 16px !important;
    padding-bottom: 12px !important;
  }

  /* 3. Hero Pill Badge: Balanced margin & padding */
  .hero-pill-badge {
    margin: 0 auto 11px auto !important;
    padding: 5px 14px !important;
    font-size: 11.5px !important;
  }

  /* 4. Hero Headline: Auto-height (no ghost 114px gap), perfectly balanced margin */
  .hero-title {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 auto 12px auto !important;
    padding: 0 4px !important;
    font-size: clamp(22px, 6.6vw, 28px) !important;
    line-height: 1.22 !important;
  }

  .typewriter-container {
    height: auto !important;
    min-height: 0 !important;
  }

  /* 5. Subtitle: Comfortable breathing room before scanner drop card */
  .hero-subtitle {
    margin: 0 auto 18px auto !important;
    padding: 0 6px !important;
    font-size: 13.5px !important;
    line-height: 1.48 !important;
    max-width: 93% !important;
  }

  /* 6. Scanner & Teaser Card Spacing */
  #scanner-guest-teaser,
  .scanner-guest-teaser,
  #scanner-wrapper,
  .scanner-wrapper {
    margin-top: 4px !important;
  }

  /* Logged-in App Hero Spacing */
  .app-hero-title {
    margin-top: 8px !important;
    margin-bottom: 8px !important;
  }

  .app-hero-subtitle {
    margin: 0 auto 14px auto !important;
  }

  .app-scanner-box {
    margin-top: 4px !important;
  }
}


/* Ensure All Modals Sit Above Mobile Drawer (Drawer = 99999) */
.auth-modal-overlay,
.app-modal-overlay,
.scanning-modal-overlay {
  z-index: 100005 !important;
}


/* ==========================================================================
   📱 MOBILE-ONLY: SUBSCRIPTION PACKAGES MODAL ALIGNMENT & CRISP HIGH-RES PRICES
   STRICTLY APPLIES TO MOBILE ONLY (max-width: 768px) - ZERO IMPACT ON PC
   ========================================================================== */
@media (max-width: 768px) {
  /* 1. Eliminate ANY and ALL Blur/Dim on Pricing Cards & Price Numbers */
  .pricing-card,
  .pricing-card-box,
  .modal-tier-card,
  .pricing-cards-grid .pricing-card,
  .pricing-cards-grid .pricing-card.is-dimmed,
  .pricing-cards-grid .pricing-card.is-spotlight,
  .pricing-cards-grid:has(.pricing-card:hover) .pricing-card:not(:hover),
  .plan-card-box,
  .plan-price-wrap,
  .price-amount,
  .price-currency,
  .price-period,
  .plan-title,
  .plan-card-title,
  .price-num,
  .cur-sym {
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    transform: none !important;
    -webkit-transform: none !important;
    opacity: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
  }

  /* 2. Subscription Packages Modal Dialog Container */
  #pricing-modal-overlay .app-modal-dialog,
  .pricing-modal-overlay .app-modal-dialog {
    width: 95% !important;
    max-width: 440px !important;
    margin: 10px auto !important;
    padding: 20px 16px !important;
    border-radius: 22px !important;
    box-sizing: border-box !important;
  }

  /* 3. Modal Header Alignment: Clean, Centered & Balanced */
  #pricing-modal-overlay .modal-dialog-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    position: relative !important;
    padding-bottom: 14px !important;
    width: 100% !important;
  }

  #pricing-modal-overlay .modal-header-brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
  }

  #pricing-modal-overlay .modal-header-icon-wrap {
    margin: 0 auto 10px auto !important;
  }

  #pricing-modal-overlay .modal-main-title {
    text-align: center !important;
    font-size: 20px !important;
    line-height: 1.25 !important;
    margin-bottom: 4px !important;
  }

  #pricing-modal-overlay .modal-main-subtitle {
    text-align: center !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    margin: 0 auto !important;
    max-width: 94% !important;
  }

  #pricing-modal-overlay .btn-modal-close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 10 !important;
  }

  /* 4. Active Plan Banner Alignment */
  #pricing-modal-overlay .current-tier-banner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 16px 14px !important;
    border-radius: 16px !important;
    margin-bottom: 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 14px !important;
  }

  #pricing-modal-overlay .current-tier-left {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
  }

  #pricing-modal-overlay .current-tier-badge {
    margin: 0 auto 8px auto !important;
    display: inline-flex !important;
    align-self: center !important;
    font-size: 12px !important;
  }

  #pricing-modal-overlay .current-tier-desc {
    text-align: center !important;
    margin: 0 auto !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    max-width: 95% !important;
  }

  #pricing-modal-overlay .current-tier-right {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    gap: 10px !important;
    justify-content: center !important;
  }

  #pricing-modal-overlay .tier-stat-badge {
    flex: 1 !important;
    text-align: center !important;
    padding: 10px 8px !important;
    border-radius: 12px !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #pricing-modal-overlay .tier-stat-badge .lbl {
    font-size: 11px !important;
    margin-bottom: 4px !important;
    text-align: center !important;
  }

  #pricing-modal-overlay .tier-stat-badge .val {
    font-size: 18px !important;
    text-align: center !important;
    font-weight: 800 !important;
  }

  /* 5. Controls: Billing Toggle & Currency Row */
  #pricing-modal-overlay .pricing-modal-controls {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
    width: 100% !important;
  }

  #pricing-modal-overlay .billing-toggle-wrapper {
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #pricing-modal-overlay .currency-pills-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto !important;
  }

  #pricing-modal-overlay .currency-pill {
    flex: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 7px 4px !important;
    font-size: 12px !important;
  }

  /* 6. Pricing Plan Cards: Centered Headers, Balanced Content, Perfectly Aligned Features */
  #pricing-modal-overlay .pricing-cards-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
    align-items: center !important;
    padding-top: 6px !important;
  }

  #pricing-modal-overlay .pricing-card-box,
  .pricing-card {
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto !important;
    text-align: center !important;
    padding: 24px 18px !important;
    border-radius: 20px !important;
    box-sizing: border-box !important;
  }

  .pricing-card-header {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }

  .plan-card-title,
  .plan-title {
    text-align: center !important;
    font-size: 20px !important;
    margin-bottom: 6px !important;
    width: 100% !important;
  }

  .plan-card-tagline,
  .plan-desc {
    text-align: center !important;
    font-size: 13px !important;
    margin: 0 auto 14px auto !important;
    max-width: 90% !important;
    line-height: 1.45 !important;
  }

  .plan-card-price,
  .plan-price-wrap {
    display: flex !important;
    align-items: baseline !important;
    justify-content: center !important;
    text-align: center !important;
    margin: 0 auto 16px auto !important;
    width: 100% !important;
  }

  .price-amount {
    font-size: 34px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    color: #0f172a !important;
  }

  [data-theme="dark"] .price-amount {
    color: #f8fafc !important;
  }

  .price-currency,
  .cur-sym {
    font-size: 22px !important;
    font-weight: 700 !important;
  }

  .plan-cta-wrap,
  .plan-btn {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  .btn-plan-select,
  .plan-btn {
    width: 100% !important;
    max-width: 320px !important;
    margin: 0 auto 16px auto !important;
  }

  /* Plan Feature List: Centered Box, Left-Aligned Text */
  .plan-features-list,
  .plan-perks-list {
    margin: 0 auto 14px auto !important;
    max-width: 290px !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 9px !important;
    padding: 0 !important;
    list-style: none !important;
    text-align: left !important;
  }

  .plan-feature-item,
  .plan-perks-list li {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    text-align: left !important;
  }
}


/* ==========================================================================
   MOBILE-ONLY REFINEMENTS: 5 USER REPORTED FIXES (PHONE VIEW ONLY)
   1. Profile Modal Alignment & Badge Centering
   2. Saved Contracts Navbar Clean (Hide + Scan New) & Filter Box Overflow Fix
   3. How It Works Interactive Demo Vertical 1-Column Stack
   4. Close Button Cross (X) - Remove Circle, Corner Alignment
   5. Scanner Tab Bar Breathing Room & "Paste Agreement" Right Spacing
   ========================================================================== */

/* Scanner Tabs Bar: Right Breathing Room so button never touches curved border */
.scanner-tabs-bar {
  padding: 5px 12px 5px 6px !important;
}

@media (max-width: 768px) {
  /* --------------------------------------------------------------------------
     1. PROFILE & SUBSCRIPTION MODAL ALIGNMENT (PHONE)
     -------------------------------------------------------------------------- */
  .profile-modal-card {
    max-height: 88vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 22px 16px 20px 16px !important;
    border-radius: 22px !important;
    box-sizing: border-box !important;
    width: calc(100% - 16px) !important;
    margin: 10px auto !important;
  }

  .profile-modal-header {
    border-bottom: 1px solid var(--glass-border) !important;
    padding-bottom: 14px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
  }

  .profile-header-meta {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  .profile-avatar-large,
  #profile-card-avatar {
    margin: 0 auto 4px auto !important;
  }

  .profile-header-meta > div:not(.profile-avatar-large) {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
  }

  .profile-name-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
    text-align: center !important;
  }

  .profile-modal-title,
  #profile-card-name {
    text-align: center !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    white-space: normal !important;
    display: block !important;
    width: 100% !important;
  }

  .profile-verified-badge,
  #profile-status-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 2px auto 0 auto !important;
    font-size: 11.5px !important;
    padding: 3px 10px !important;
  }

  .profile-card-email,
  #profile-card-email {
    display: block !important;
    text-align: center !important;
    margin-top: 4px !important;
    font-size: 13px !important;
    color: var(--text-muted) !important;
  }

  .profile-tabs-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 4px 2px 10px 2px !important;
    margin-bottom: 16px !important;
    border-bottom: 1px solid var(--glass-border) !important;
  }

  .profile-tabs-nav::-webkit-scrollbar {
    display: none !important;
  }

  .profile-tab-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    padding: 8px 14px !important;
  }

  .profile-form-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .agency-branding-box,
  .security-box {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .nda-toggle-card {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 14px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* --------------------------------------------------------------------------
     2. SAVED CONTRACTS NAVBAR & FILTER OVERFLOW FIX (PHONE)
     -------------------------------------------------------------------------- */
  /* Remove "+ Scan New Contract" button from mobile navbar in history */
  #btn-nav-new-scan,
  .history-page-body #btn-nav-new-scan,
  .floating-navbar #btn-nav-new-scan {
    display: none !important;
  }

  /* Keep Saved Contracts Controls inside box when Filters button is tapped */
  .history-table-header-controls {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px !important;
    gap: 10px !important;
  }

  .history-table-header-controls .history-search-box {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .history-table-header-controls .history-search-box .history-search-input {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 9px 44px 9px 34px !important;
    height: 42px !important;
    font-size: 13px !important;
  }

  .history-filter-controls-wrap {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 10px 0 2px 0 !important;
  }

  .history-filter-controls-wrap.filters-panel-open {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .history-filter-group {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  .history-filter-group .cs-custom-select {
    flex: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .history-filter-group .cs-select-dropdown {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    left: 0 !important;
    right: 0 !important;
  }

  /* --------------------------------------------------------------------------
     3. HOW IT WORKS INTERACTIVE CLAUSE DEMO 1-COLUMN STACK (PHONE)
     -------------------------------------------------------------------------- */
  .interactive-demo-container {
    padding: 14px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 18px !important;
  }

  .interactive-demo-header {
    margin-bottom: 12px !important;
  }

  .interactive-demo-header strong {
    font-size: 14px !important;
    line-height: 1.35 !important;
  }

  .interactive-demo-header span {
    font-size: 12px !important;
  }

  .demo-clause-picker {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    margin-bottom: 12px !important;
  }

  .btn-demo-chip {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 9px 14px !important;
    font-size: 12.5px !important;
    box-sizing: border-box !important;
  }

  .demo-preview-box {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .demo-clause-original,
  .demo-clause-redline {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 14px !important;
  }

  .demo-clause-original p,
  .demo-clause-redline p {
    font-size: 12.5px !important;
    line-height: 1.5 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    margin-top: 8px !important;
  }

  .badge-danger-tag,
  .badge-safe-tag {
    display: inline-block !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
  }

  /* --------------------------------------------------------------------------
     4. MODAL CLOSE CROSS (X) - REMOVE CIRCLE, CORNER ALIGNMENT (PHONE)
     -------------------------------------------------------------------------- */
  .auth-modal-card,
  .profile-modal-card,
  .app-modal-dialog,
  .modal-dialog,
  .pricing-modal-card,
  .history-preview-card,
  .drawer-dialog {
    position: relative !important;
  }

  .btn-modal-close,
  .auth-close-btn,
  .btn-close-modal,
  .btn-modal-close-corner {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-muted, #94a3b8) !important;
    z-index: 10000 !important;
    cursor: pointer !important;
    transform: none !important;
  }

  .btn-modal-close svg,
  .auth-close-btn svg,
  .btn-close-modal svg,
  .btn-modal-close-corner svg {
    width: 19px !important;
    height: 19px !important;
    stroke: currentColor !important;
    stroke-width: 2.2 !important;
  }

  .btn-modal-close:hover,
  .auth-close-btn:hover,
  .btn-close-modal:hover,
  .btn-modal-close-corner:hover {
    background: transparent !important;
    color: var(--text-pure, #ffffff) !important;
  }

  [data-theme="light"] .btn-modal-close,
  [data-theme="light"] .auth-close-btn,
  [data-theme="light"] .btn-close-modal,
  [data-theme="light"] .btn-modal-close-corner {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #64748b !important;
  }

  [data-theme="light"] .btn-modal-close:hover,
  [data-theme="light"] .auth-close-btn:hover,
  [data-theme="light"] .btn-close-modal:hover,
  [data-theme="light"] .btn-modal-close-corner:hover {
    background: transparent !important;
    color: #0f172a !important;
  }

  /* --------------------------------------------------------------------------
     5. SCANNER TAB BAR BREATHING ROOM & "PASTE AGREEMENT" RIGHT SPACING (PHONE)
     -------------------------------------------------------------------------- */
  .scanner-tabs-bar {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 5px 12px 5px 6px !important;
    gap: 8px !important;
    border-radius: 16px !important;
    margin-bottom: 16px !important;
  }

  .scanner-tab-btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 8px 10px !important;
    font-size: 12.5px !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
  }

  .scanner-tab-btn span {
    white-space: nowrap !important;
  }
}

@media (max-width: 768px) {
  .profile-modal-card {
    padding-bottom: 36px !important;
  }
  .profile-action-row {
    margin-top: 18px !important;
    padding-bottom: 16px !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
  }
  .profile-action-row .btn,
  #btn-save-profile,
  #btn-save-negotiation-prefs,
  #btn-save-agency-branding {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
  }
}

@media (max-width: 768px) {
  .auth-modal-card.profile-modal-card,
  .profile-modal-card {
    max-height: 86vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 40px !important;
  }
}


/* ==========================================================================
   CRITICAL FIXES FOR:
   1. Inactive Overlay Blur Bleed Prevention (Fixes stuck blurry background)
   2. Profile & Subscription Tabs & Full Mobile Friendly Content
   3. Saved Contracts Filter Button Perfect Vertical Centering
   4. Scanner Tabs Bar Glider & Right Padding Alignment
   ========================================================================== */

/* 1. Inactive Overlay Blur Fix: Completely disable backdrop-filter & visibility when not active */
.auth-modal-overlay:not(.active),
.app-modal-overlay:not(.active),
.mobile-drawer-overlay:not(.active),
.scanning-modal-overlay:not(.active) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.auth-modal-overlay.active,
.app-modal-overlay.active,
.mobile-drawer-overlay.active,
.scanning-modal-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

/* 4. Scanner Tabs Bar: Desktop Balanced Spacing & Glider Gap */
.scanner-tabs-bar {
  gap: 12px !important;
  padding: 5px 18px 5px 5px !important;
  border-radius: 16px !important;
}

.scanner-tab-btn {
  padding: 8px 16px !important;
  gap: 8px !important;
}

/* 3. Saved Contracts Search Box (PC Desktop Default - Filter Button Hidden) */
.history-search-box {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.history-search-box .history-search-input {
  width: 100% !important;
  height: 44px !important;
  line-height: 44px !important;
  padding: 0 16px 0 38px !important;
  box-sizing: border-box !important;
  border-radius: 12px !important;
}

/* Hide filter button on PC desktop where inline filters are already visible */
.search-filter-icon-btn,
.history-search-box .search-filter-icon-btn,
#btn-toggle-filters {
  display: none !important;
}

.history-search-box .search-icon {
  position: absolute !important;
  left: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  -webkit-transform: translateY(-50%) !important;
  z-index: 10 !important;
  pointer-events: none !important;
}

@media (max-width: 768px) {
  /* --------------------------------------------------------------------------
     1. MOBILE DRAWER & OVERLAYS
     -------------------------------------------------------------------------- */
  .mobile-drawer-overlay {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }
  .mobile-drawer-overlay:not(.active) {
    display: none !important;
  }

  /* --------------------------------------------------------------------------
     2. PROFILE & SUBSCRIPTION: ALL TABS 100% MOBILE FRIENDLY
     -------------------------------------------------------------------------- */
  /* Tabs Nav Bar: Generous padding so the first tab pill is never cut on left */
  .profile-tabs-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 8px 14px 12px 14px !important;
    box-sizing: border-box !important;
    margin: 0 0 16px 0 !important;
    border-bottom: 1px solid var(--glass-border) !important;
  }

  .profile-tabs-nav::-webkit-scrollbar {
    display: none !important;
  }

  .profile-tab-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    padding: 8px 14px !important;
    border-radius: 9999px !important;
  }

  /* Tab 2: Subscription & Billing */
  .plan-showcase-card {
    padding: 16px !important;
    border-radius: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .plan-showcase-top {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

  .plan-price-large {
    font-size: 24px !important;
    margin-bottom: 8px !important;
  }

  .usage-meter-box {
    padding: 14px !important;
    border-radius: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 16px !important;
  }

  .usage-meter-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    margin-bottom: 8px !important;
  }

  /* Usage stat pills: Stack cleanly vertically on mobile instead of crammed 3 columns */
  .usage-stat-pills {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding-top: 12px !important;
    border-top: 1px solid var(--glass-border) !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .usage-stat-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 14px !important;
    background: rgba(0, 0, 0, 0.03) !important;
    border-radius: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  [data-theme="dark"] .usage-stat-item {
    background: rgba(255, 255, 255, 0.04) !important;
  }

  .usage-stat-item .stat-lbl {
    font-size: 12px !important;
    color: var(--text-secondary) !important;
  }

  .usage-stat-item .stat-num {
    font-size: 13px !important;
    font-weight: 700 !important;
  }

  /* Billing Action buttons */
  .billing-actions-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .billing-actions-grid .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 11px 16px !important;
    font-size: 13px !important;
  }

  /* Tab 3: Saved Contracts inside Profile Modal */
  .profile-contracts-header-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    text-align: center !important;
    padding: 14px !important;
    box-sizing: border-box !important;
  }

  #btn-profile-tab-new-scan {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Tab 4: Negotiation Defaults */
  .tone-picker-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .tone-radio-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    text-align: left !important;
    gap: 12px !important;
    padding: 14px !important;
    border-radius: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .tone-radio-card input {
    margin-top: 3px !important;
    flex-shrink: 0 !important;
  }

  .tone-radio-body strong {
    display: block !important;
    font-size: 13.5px !important;
    margin-bottom: 3px !important;
  }

  .tone-radio-body p {
    font-size: 12px !important;
    line-height: 1.4 !important;
    margin: 0 !important;
  }

  /* Tab 5: Agency Branding & Tab 6: Security & NDA */
  .agency-branding-box,
  .security-box {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .security-box .auth-field {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .security-box .auth-field input {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* --------------------------------------------------------------------------
     3. SAVED CONTRACTS (history.html) OVERFLOW & FILTER BUTTON FIX
     -------------------------------------------------------------------------- */
  .history-search-box .history-search-input {
    padding: 0 46px 0 38px !important;
  }

  .search-filter-icon-btn,
  .history-search-box .search-filter-icon-btn,
  #btn-toggle-filters {
    display: flex !important;
    position: absolute !important;
    right: 6px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    -webkit-transform: translateY(-50%) !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
  }

  .history-container,
  .history-table-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .client-tags-filter-bar {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 10px 14px !important;
    flex-wrap: nowrap !important;
  }

  .client-tags-filter-bar::-webkit-scrollbar {
    display: none !important;
  }

  .client-tag-pill {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  /* --------------------------------------------------------------------------
     4. SCANNER TAB BAR & WRAPPER (Mobile View - Zero Overlap & Perfect Spacing)
     -------------------------------------------------------------------------- */
  #scanner-wrapper,
  .scanner-wrapper {
    padding: 18px 12px 16px 12px !important;
    border-radius: 20px !important;
    margin: 12px auto 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .scanner-tabs-bar {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 4px !important;
    gap: 6px !important;
    border-radius: 14px !important;
    margin-bottom: 16px !important;
    position: relative !important;
  }

  .scanner-tab-btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 7px 8px !important;
    font-size: 12px !important;
    gap: 6px !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
  }

  .scanner-tab-btn span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 12px !important;
  }

  .scanner-tab-btn svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
  }

  }



@media (max-width: 360px) {
  .scanner-tab-btn {
    padding: 6px 4px !important;
    font-size: 11px !important;
    gap: 4px !important;
  }
  .scanner-tab-btn span {
    font-size: 11px !important;
  }
  .scanner-tab-btn svg {
    width: 13px !important;
    height: 13px !important;
  }
}


/* Desktop default: Hide mobile tab span */
.tab-text-mobile {
  display: none !important;
}

@media (max-width: 768px) {
  .tab-text-desktop {
    display: none !important;
  }
  .tab-text-mobile {
    display: inline !important;
  }
}


/* ==========================================================================
   ⚡ ULTRA-SMOOTH BUTTERY DOWNLOAD BUTTON MICRO-ANIMATION & TICK SYSTEM
   ========================================================================== */
#btn-export-pdf,
#btn-export-pdf-bottom,
#btn-export-docx,
#btn-export-docx-bottom {
  min-width: 140px;
  justify-content: center;
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.btn-download-animating {
  position: relative !important;
  overflow: hidden !important;
  pointer-events: none !important;
  will-change: transform, background-color, box-shadow;
}

.btn-download-animating.btn-download-loading {
  opacity: 0.96 !important;
  transform: scale(0.98) !important;
}

.btn-download-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: btnDownloadSpin 0.65s linear infinite;
  margin-right: 7px;
  vertical-align: middle;
  flex-shrink: 0;
}

@keyframes btnDownloadSpin {
  to { transform: rotate(360deg); }
}

.btn-download-animating.btn-download-success {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.4) !important;
  transform: scale(1.02) !important;
}

.btn-download-tick-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  vertical-align: middle;
  animation: btnTickSmoothPop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes btnTickSmoothPop {
  0% {
    transform: scale(0) rotate(-20deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.25) rotate(4deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.btn-download-tick-svg {
  display: block;
}

.btn-download-tick-svg polyline {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: btnTickDraw 0.3s ease-out 0.05s forwards;
}

@keyframes btnTickDraw {
  to {
    stroke-dashoffset: 0;
  }
}

.btn-download-text {
  vertical-align: middle;
  font-weight: 600;
  letter-spacing: -0.15px;
}


/* --------------------------------------------------------------------------
   CURRENCY SWITCHER DROPDOWN (MATCHING LANGUAGE SELECTOR)
   -------------------------------------------------------------------------- */
.curr-dropdown-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.curr-toggle-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  padding: 3px 8px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: var(--text-pure);
  border-radius: var(--radius-pill);
  transition: var(--transition-clean);
  outline: none;
  font-family: var(--font-base);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.curr-toggle-btn:hover,
.curr-dropdown-container.open .curr-toggle-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--glass-border-scrolled);
}

[data-theme="light"] .curr-toggle-btn {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.6);
  color: #1d1d1f;
}

[data-theme="light"] .curr-toggle-btn:hover,
[data-theme="light"] .curr-dropdown-container.open .curr-toggle-btn {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.2);
}

.active-curr-symbol {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-indigo, #6366f1);
}

.active-curr-code {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.curr-chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.curr-dropdown-container.open .curr-chevron {
  transform: rotate(180deg);
}

.curr-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 210px;
  background: var(--dropdown-bg, #ffffff);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.25);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 10000;
  animation: csSelectPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

[data-theme="dark"] .curr-dropdown-menu {
  background: #0f141f;
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .curr-dropdown-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 12px 36px -4px rgba(44, 38, 28, 0.16);
}

.curr-dropdown-container.open .curr-dropdown-menu {
  display: flex !important;
}

.curr-menu-header {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 6px 10px 4px;
}

.curr-option-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
  color: var(--text-main);
  outline: none;
}

.curr-option-item:hover {
  background: rgba(99, 102, 241, 0.1);
}

.curr-option-item.active {
  background: rgba(99, 102, 241, 0.16);
  font-weight: 700;
}

.curr-symbol-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  background: rgba(99, 102, 241, 0.15);
  color: var(--brand-indigo, #6366f1);
  flex-shrink: 0;
}

.curr-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.curr-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.curr-code {
  font-size: 10px;
  color: var(--text-muted);
}

.curr-check {
  color: var(--brand-indigo, #6366f1);
  opacity: 0;
  flex-shrink: 0;
}

.curr-option-item.active .curr-check {
  opacity: 1;
}
