/**
 * ==============================================================================
 * OmniWire BizHub - Absolute 3D Cyber Design System & Production Stylesheet
 * 100% Robotic Typography: 'Orbitron' (Display) + 'Chakra Petch' (UI) + 'Share Tech Mono' (HUD)
 * High-Contrast Color Engine: [data-theme="dark"] & [data-theme="light"]
 * Persistent Sticky Desktop Sidebar & Slide-Over Mobile Drawer
 * ==============================================================================
 */

/* ==============================================================================
   UNIFIED DEEP OBSIDIAN & MIDNIGHT FINTECH COLOR ENGINE
   High-Contrast Tokens across all modes (Zero Harsh White, High Visibility)
   ============================================================================== */
:root, [data-theme="light"], .light-mode {
  --bg-canvas: #0B1120 !important;
  --bg-surface: #111A2E !important;
  --bg-card: #18233C !important;
  --bg-option: #1E2D4A !important;
  --bg-option-hover: #263859 !important;
  --text-main: #FFFFFF !important;
  --text-title: #FFFFFF !important;
  --text-heading: #818CF8 !important;
  --text-body: #94A3B8 !important;
  --text-sub: #94A3B8 !important;
  --text-question: #FFFFFF !important;
  --border-glow: rgba(99, 102, 241, 0.2) !important;
  --border-color: rgba(99, 102, 241, 0.2) !important;
  --box-shadow-3d: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 1px 1px rgba(99, 102, 241, 0.15);

  --brand-primary: #818CF8;
  --brand-primary-hover: #6366F1;
  --brand-gradient: linear-gradient(135deg, #6366F1 0%, #4F46E5 50%, #818CF8 100%);
  --brand-glow-lg: 0 8px 20px -4px rgba(99, 102, 241, 0.4);
  --card-radius: 16px;
  --btn-radius: 10px;
  --input-radius: 10px;
}

[data-theme="dark"], :root:not(.light-mode):not([data-theme="light"]) {
  --bg-canvas: #080C14 !important;
  --bg-surface: #0D1322 !important;
  --bg-card: #141C2E !important;
  --bg-option: #192338 !important;
  --bg-option-hover: #22304C !important;
  --text-main: #F8FAFC !important;
  --text-title: #F8FAFC !important;
  --text-heading: #6366F1 !important;
  --text-body: #A0AEC0 !important;
  --text-sub: #A0AEC0 !important;
  --text-question: #FFFFFF !important;
  --border-glow: rgba(99, 102, 241, 0.25) !important;
  --border-color: rgba(99, 102, 241, 0.25) !important;
  --box-shadow-3d: 0 14px 35px -8px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(255,255,255,0.08);

  --brand-primary: #6366F1;
  --brand-primary-hover: #4F46E5;
  --brand-gradient: linear-gradient(135deg, #6366F1 0%, #4F46E5 50%, #818CF8 100%);
  --brand-glow-lg: 0 8px 24px -4px rgba(99, 102, 241, 0.45);
  --card-radius: 16px;
  --btn-radius: 10px;
  --input-radius: 10px;
}

/* ==============================================================================
   MANDATORY GLOBAL TYPOGRAPHY: 100% ROBOTIC / SCI-FI CYBER AESTHETIC
   ============================================================================== */
/* Orbitron to ALL titles, headings, brand text, metric displays, and tab buttons */
h1, h2, h3, h4, h5, h6,
.title, .brand-text, .brand-title, .metric-value, .tab-btn, .admin-tab-btn,
.nav-section-title, .arcade-tab-btn, .game-title, .modal-title, .page-title {
  font-family: 'Orbitron', monospace, sans-serif !important;
  letter-spacing: 0.03em !important;
}

/* Chakra Petch to ALL body text, buttons, labels, and form controls */
body, p, span, a, input, select, textarea, label, button, .nav-link,
.quiz-opt, .quiz-option, .quiz-opt-btn, .form-input, .form-select, .form-textarea, .btn {
  font-family: 'Chakra Petch', sans-serif !important;
}

/* Share Tech Mono to numbers, code, formulas, KPIs, and badges */
.mono-num, code, pre, .font-mono, .metric-val, .kpi-num, .badge, .hud-val {
  font-family: 'Share Tech Mono', monospace !important;
}

/* ==============================================================================
   Reset & Base Standards (Zero Double Scrollbars)
   ============================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  min-height: 100vh;
}

html {
  font-size: 16px;
  line-height: 1.65;
  scroll-behavior: smooth;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-canvas);
  color: var(--text-sub);
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Eliminate Double Scrollbars in workspace cards & panels */
.app-main, .cv-editor-panel, .tool-card {
  overflow: visible !important;
}

/* ==============================================================================
   CRITICAL HEADING VISIBILITY IN ALL THEMES
   ============================================================================== */
h1, h2, h3, h4, .title, .page-title {
  color: var(--text-title) !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

h1 { font-size: 1.85rem; font-weight: 800; }
h2 { font-size: 1.4rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

.text-heading, .heading-accent {
  color: var(--text-heading) !important;
}

p {
  margin-bottom: 0.85rem;
  color: var(--text-sub);
  line-height: 1.65;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--brand-primary-hover);
}

/* ==============================================================================
   COLOR CONTRAST ENGINE (QUIZ & INPUT HIGHER CONTRAST - ZERO ACCIDENTAL WHITE)
   ============================================================================== */
.quiz-question, .question-title, #quizQuestionText {
  color: var(--text-question) !important;
  font-weight: 700 !important;
  font-size: 1.25rem !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

.quiz-option, .quiz-opt-btn, .quiz-opt {
  background: var(--bg-option) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-glow) !important;
  border-radius: 12px !important;
  padding: 16px 20px !important;
  transition: all 0.2s ease !important;
}

.quiz-option:hover, .quiz-opt-btn:hover, .quiz-opt:hover {
  background: var(--bg-option-hover) !important;
  border-color: var(--brand-primary) !important;
  transform: translateX(6px) !important;
}

/* Input Fields - Unified Luxury Obsidian Tone in All Modes */
input, select, textarea,
.form-input, .form-select, .form-textarea,
.light-mode input, .light-mode select, .light-mode textarea,
[data-theme="light"] input, [data-theme="light"] select, [data-theme="light"] textarea,
.light-mode .form-input, .light-mode .form-select, .light-mode .form-textarea,
[data-theme="light"] .form-input, [data-theme="light"] .form-select, [data-theme="light"] .form-textarea {
  color: var(--text-main) !important;
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-glow) !important;
}

select option,
.light-mode select option,
[data-theme="light"] select option {
  color: #FFFFFF !important;
  background-color: var(--bg-surface) !important;
}

/* Brand Link & Title Contrast */
.brand-title, .light-mode .brand-title, [data-theme="light"] .brand-title {
  color: #FFFFFF !important;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}
.brand-highlight, .light-mode .brand-highlight, [data-theme="light"] .brand-highlight {
  color: #818CF8 !important;
}

/* ==============================================================================
   PERSISTENT STATIC DESKTOP SIDEBAR & CLEAN MOBILE DRAWER
   ============================================================================== */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Desktop: Screen >= 1024px */
@media (min-width: 1024px) {
  .app-sidebar {
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    width: 270px !important;
    min-width: 270px !important;
    overflow-y: auto !important;
    background: var(--bg-surface) !important;
    border-right: 1px solid var(--border-glow) !important;
    z-index: 100 !important;
    transform: none !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25) !important;
    display: flex;
    flex-direction: column;
  }
  .app-main {
    flex: 1 !important;
    width: calc(100% - 270px) !important;
    max-width: 1550px !important;
    margin: 0 auto !important;
    padding: 32px 40px !important;
    overflow: visible !important;
    min-width: 0;
    box-sizing: border-box;
  }
}

/* Mobile: Screen < 1024px */
@media (max-width: 1023px) {
  .app-sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: -280px !important;
    width: 270px !important;
    height: 100vh !important;
    overflow-y: auto !important;
    z-index: 200 !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    background: var(--bg-surface) !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
  }
  .app-sidebar.open {
    transform: translateX(280px) !important;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.8) !important;
  }
  .mobile-sidebar-backdrop {
    position: fixed !important;
    inset: 0 !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 190 !important;
    display: none;
  }
  .mobile-sidebar-backdrop.active {
    display: block !important;
  }
  .app-main {
    width: 100% !important;
    margin: 0 !important;
    padding: 20px 16px !important;
    overflow: visible !important;
    box-sizing: border-box;
    min-width: 0;
  }
  .mobile-menu-btn {
    display: inline-flex !important;
  }
}

/* Sidebar Internal Structure */
.sidebar-brand {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-bottom: 1px solid var(--border-glow);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: var(--brand-glow-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  padding: 1.15rem 0.85rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-sub);
  opacity: 0.7;
  padding: 0.85rem 0.75rem 0.35rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  color: var(--text-sub);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.nav-link svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  color: var(--text-sub);
  opacity: 0.8;
  transition: color 0.2s ease;
}

.nav-link:hover {
  background-color: var(--bg-option);
  color: var(--text-main);
  border-color: var(--border-glow);
  transform: translateX(2px);
}
.nav-link:hover svg {
  color: var(--brand-primary);
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(79, 70, 229, 0.08));
  border-color: rgba(99, 102, 241, 0.4);
  color: #FFFFFF;
  box-shadow: inset 0 0 12px rgba(99, 102, 241, 0.15);
  font-weight: 600;
}
.light-mode .nav-link.active, [data-theme="light"] .nav-link.active {
  color: var(--brand-primary);
  background: rgba(79, 70, 229, 0.09);
  border-color: rgba(79, 70, 229, 0.3);
}

.nav-badge {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--brand-primary);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==============================================================================
   Top Navigation Bar
   ============================================================================== */
.app-topbar {
  height: 68px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.mobile-menu-btn {
  display: none;
  background: var(--bg-option);
  border: 1px solid var(--border-glow);
  color: var(--text-main);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* ==============================================================================
   3D GLOW & SHADOW EFFECTS (CARDS, MODALS, TACTILE PUSH-DOWN BUTTONS)
   ============================================================================== */
.card, .modal-box {
  background: var(--bg-card) !important;
  box-shadow: var(--box-shadow-3d) !important;
  border: 1px solid var(--border-glow) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: var(--card-radius);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-primary) !important;
}

.light-mode .card, [data-theme="light"] .card {
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.card-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-body {
  padding: 1.75rem;
}

.card-footer {
  padding: 1.15rem 1.75rem;
  border-top: 1px solid var(--border-glow);
  background-color: var(--bg-canvas);
}

/* Interactive Buttons: 3D Push-Down Physics */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--btn-radius);
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  transition: transform 0.12s ease-in-out, box-shadow 0.12s ease-in-out, background 0.15s ease;
}

.btn:active, .btn-primary:active, .btn-3d:active, .btn-secondary:active,
.btn-success:active, .btn-danger:active {
  transform: translateY(3px) !important;
}

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.78rem; }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; }

/* Primary 3D Tactile Button */
.btn-primary, .btn-3d {
  background: linear-gradient(180deg, #6366F1 0%, #4338CA 100%);
  box-shadow: 0 4px 0 #312E81, 0 10px 20px rgba(99, 102, 241, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  color: #FFFFFF !important;
}
.btn-primary:hover, .btn-3d:hover {
  background: linear-gradient(180deg, #6E71F4 0%, #4F46E5 100%);
  box-shadow: 0 5px 0 #312E81, 0 14px 26px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
  color: #FFFFFF !important;
}
.btn-primary:active, .btn-3d:active {
  transform: translateY(3px) !important;
  box-shadow: 0 1px 0 #312E81, 0 4px 10px rgba(99, 102, 241, 0.3) !important;
}

/* Secondary 3D Button */
.btn-secondary {
  background: var(--bg-option);
  box-shadow: 0 4px 0 #020617, 0 8px 16px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glow);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: var(--bg-option-hover);
  transform: translateY(-1px);
}
.btn-secondary:active {
  transform: translateY(3px) !important;
  box-shadow: 0 1px 0 #020617 !important;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-glow);
  color: var(--text-sub);
}
.btn-outline:hover {
  border-color: var(--brand-primary);
  color: var(--text-main);
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(180deg, #10B981 0%, #059669 100%);
  box-shadow: 0 4px 0 #064E3B, 0 8px 18px rgba(16, 185, 129, 0.35);
  color: #FFFFFF !important;
}
.btn-danger {
  background: linear-gradient(180deg, #F43F5E 0%, #E11D48 100%);
  box-shadow: 0 4px 0 #881337, 0 8px 18px rgba(244, 63, 94, 0.35);
  color: #FFFFFF !important;
}

/* Button Active Ripple */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: rippleEffect 0.6s linear;
  background-color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}
@keyframes rippleEffect {
  to {
    transform: scale(3.5);
    opacity: 0;
  }
}

/* ==============================================================================
   Form Controls, Inputs & Sliders
   ============================================================================== */
.form-group {
  margin-bottom: 1.35rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.7rem 0.95rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--input-radius);
  color: var(--text-main);
  font-size: 0.875rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

/* ==============================================================================
   Pill Tabs (Executive Sliders & Animations)
   ============================================================================== */
.tabs-header {
  display: inline-flex;
  gap: 0.35rem;
  background: var(--bg-option);
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid var(--border-glow);
  overflow-x: auto;
  max-width: 100%;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-sub);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: #FFFFFF !important;
  background: linear-gradient(180deg, #6366F1 0%, #4338CA 100%);
  box-shadow: 0 4px 0 #312E81, 0 10px 20px rgba(99, 102, 241, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
  animation: smoothFadeIn 0.22s ease-in-out forwards;
}

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

/* ==============================================================================
   SaaS Directory & Pricing Pills
   ============================================================================== */
.saas-tool-card {
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.saas-tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-3d);
}

.pricing-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  text-transform: uppercase;
}

.pricing-free {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.32) 100%);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34D399;
}
.pricing-freemium {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.22) 0%, rgba(126, 34, 206, 0.32) 100%);
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #C084FC;
}
.pricing-paid {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 119, 6, 0.32) 100%);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #FBBF24;
}

/* ==============================================================================
   Polished AdSense Reserved Containers
   ============================================================================== */
.ad-container-leaderboard {
  min-height: 90px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ad-slot-leaderboard {
  min-height: 90px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-glow);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 728px;
  margin: 0 auto;
}
.light-mode .ad-slot-leaderboard, [data-theme="light"] .ad-slot-leaderboard {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-glow);
}

/* Zero-Collapse Ad Rules when Disabled (Zero Empty Boxes) */
body.ads-disabled .ad-container-leaderboard,
body.ads-disabled .ad-slot-leaderboard,
.ads-hidden .ad-container-leaderboard,
.ads-hidden .ad-slot-leaderboard {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  overflow: hidden !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* ==============================================================================
   Modals & Modern Slide-In Toast Alerts
   ============================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(4, 7, 13, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.modal-backdrop.active {
  display: flex;
}

.modal-box {
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
}

#bizToastContainer {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
  max-width: 90vw;
}

.biz-toast-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.25rem;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  box-shadow: var(--box-shadow-3d);
  color: var(--text-main);
  font-size: 0.875rem;
  font-weight: 600;
  pointer-events: auto;
  animation: toastSlideIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.biz-toast-item.fade-out {
  animation: toastSlideOut 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(30px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(30px) scale(0.95); }
}

.biz-toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.biz-toast-icon.success, .biz-toast-icon.emerald {
  background: #10B981;
  color: #FFFFFF;
  box-shadow: 0 0 14px #10B981;
}
.biz-toast-icon.error, .biz-toast-icon.rose {
  background: #F43F5E;
  color: #FFFFFF;
  box-shadow: 0 0 14px #F43F5E;
}
.biz-toast-icon.info, .biz-toast-icon.indigo {
  background: #6366F1;
  color: #FFFFFF;
  box-shadow: 0 0 14px #6366F1;
}

/* ==============================================================================
   Badges, Utilities & Helper Classes
   ============================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid transparent;
}
.badge-indigo {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  color: #A5B4FC;
}
.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34D399;
}
.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: #FBBF24;
}
.badge-rose {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.35);
  color: #FB7185;
}

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-primary { color: var(--brand-primary); }
.text-emerald { color: #10B981; }
.text-amber { color: #F59E0B; }
.text-rose { color: #F43F5E; }
.text-muted { color: var(--text-sub); }
.text-white { color: #FFFFFF; }

.bg-slate-900 { background-color: var(--bg-card); }
.bg-slate-950 { background-color: var(--bg-canvas); }
.bg-slate-800 { background-color: var(--bg-option); }
.border { border: 1px solid var(--border-glow); }
.border-b { border-bottom: 1px solid var(--border-glow); }
.border-t { border-top: 1px solid var(--border-glow); }
.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }
.rounded-full { border-radius: 9999px; }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.my-8 { margin-top: 2rem; margin-bottom: 2rem; }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .md\:flex-row { flex-direction: row; }
  .md\:items-center { align-items: center; }
  .md\:text-3xl { font-size: 1.875rem; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
  .lg\:col-span-6 { grid-column: span 6 / span 6; }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
}

.app-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-glow);
  padding: 3rem 2rem 2rem;
  color: var(--text-sub);
  font-size: 0.8125rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-bottom: 1.75rem;
}

.footer-links a {
  color: var(--text-sub);
  font-weight: 500;
}
.footer-links a:hover {
  color: var(--brand-primary);
}

@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  .app-sidebar, .app-topbar, .app-footer, .ad-container-leaderboard, .no-print, .btn, .tabs-header, #bizToastContainer {
    display: none !important;
  }
  .app-main {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 0 !important;
  }
  .card {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }
}
