/* ═══════════════════════════════════════════
   PREMIUM RETAIL THEME (Depth & Animation)
═══════════════════════════════════════════ */
/* =========================================
   STARTUP SPLASH SCREEN ANIMATION
========================================= */
#qt-splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff; /* Pure White */
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition:
    opacity 0.8s ease-out,
    visibility 0.8s ease-out;
  overflow: hidden; /* Prevents scrollbars from appearing during the animation */
}

.qt-splash-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qt-splash-logo .letter {
  display: inline-block;
  opacity: 0;
  transform: translateX(150px);
  animation: swipeAndSpring 0.7s ease-out forwards;
  animation-delay: var(--delay);

  /* Apply the gradient directly to the moving letters */
  background: linear-gradient(135deg, #0f172a 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Controls the individual letters */
.qt-splash-logo .letter {
  font-weight: 800;
  display: inline-block;
  opacity: 0;
  /* Starts out invisible and pushed to the right */
  transform: translateX(150px);
  /* Runs the animation and pulls the specific delay from the HTML */
  animation: swipeAndSpring 0.7s ease-out forwards;
  animation-delay: var(--delay);
}

.qt-splash-subtext {
  font-family: "Helvetica", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #64748b;
  margin-top: 8px;
  opacity: 0;
  /* Starts tiny (inside the screen) */
  transform: scale(0);
  /* Waits 0.9s for the logo to finish, then pops in */
  animation: scaleUpReveal 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.9s
    forwards;
}

/* 🎬 KEYFRAMES FOR THE SWIPE & SPRING (Right -> Left Overshoot -> Center) */
@keyframes swipeAndSpring {
  0% {
    opacity: 0;
    transform: translateX(150px);
  }
  65% {
    opacity: 1;
    transform: translateX(-15px); /* Overshoots to the left */
  }
  100% {
    opacity: 1;
    transform: translateX(0); /* Snaps perfectly to the center */
  }
}

/* 🎬 KEYFRAMES FOR THE SUBTEXT (Scale Up from Center) */
@keyframes scaleUpReveal {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Class to fade out the entire screen when JS triggers */
.qt-hide-splash {
  opacity: 0 !important;
  visibility: hidden !important;
}
:root {
  --primary-solid: #059669;
  --bg-dark: #f1f5f9; /* Changed to a cool slate-gray for contrast */
  --glass-bg: #ffffff; /* Pure white for the 'Island' */
  --glass-border: #e2e8f0;
  --text-bright: #0f172a;
  --text-muted: #64748b;
  --success: #10b981;
  --radius: 24px;
  --shadow-soft: 0 10px 30px -5px rgba(0, 0, 0, 0.08); /* Stronger premium shadow */
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg-dark);
  color: var(--text-bright);
  min-height: 100vh;
  position: relative;
}

/* Hide the old glowing orbs */
body::before,
body::after {
  display: none;
}

/* ✨ NEW: Animated Card Depth */
.glass-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius);
  padding: 20px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.glass-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
}

/* ✨ NEW: Elastic Upload Zone */
.upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 20px;
  background: #f8fafc;
  padding: 60px 20px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy hover effect */
  cursor: pointer;
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--primary-solid);
  background: #f0fdf4; /* Very subtle green tint on hover */
  transform: scale(1.02);
}
.upload-icon {
  transition: transform 0.3s ease;
}
.upload-zone:hover .upload-icon {
  transform: translateY(-5px);
}

/* Base Pill Styles */
.tag-pill {
  background: #ffffff;
  border-radius: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  border: 1px solid #e2e8f0;
  cursor: pointer;
  font-weight: 600;
  color: #64748b;
  font-size: 14px;
  transition: all 0.2s ease;
  padding: 8px 20px;
  display: flex;
  align-items: center;
}
.tag-pill:hover {
  border-color: #059669;
  color: #059669;
  background: #ecfdf5;
  transform: translateY(-2px);
}
/* ═══════════════════════════════════════════
   COMPONENTS
═══════════════════════════════════════════ */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
  border-radius: var(--radius);
  padding: 20px;
}

.logo h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(to right, #fff, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 50px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.3s ease;
  cursor: pointer;
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--primary-solid);
  background: rgba(139, 92, 246, 0.08);
}
.upload-icon {
  margin-bottom: 20px;
  filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.6));
}

.btn-primary {
  background: var(--primary-grad);
  border: none;
  font-weight: 600;
  box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
  background: var(--primary-grad);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}
.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
}
.btn-text:hover {
  color: var(--text-bright);
}

/* Custom Export Dropdown Button Styles */

.thumbnail-item {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--glass-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}
.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.thumbnail-item:hover img {
  opacity: 1;
}
.thumb-number {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--primary-grad);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  z-index: 3;
}
.thumb-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--danger);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
}
.thumb-delete:hover {
  background: var(--danger);
  color: white;
}

/* ═══════════════════════════════════════════
   MODAL WITH PANNING & ZOOM
═══════════════════════════════════════════ */
.modal-custom {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(15px);
}
.floating-zoom-controls {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 15px;
  border-radius: 20px;
  z-index: 10001;
}
.btn-zoom {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}
.close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  z-index: 10001;
}
.modal-scroll-area {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.animate-pop {
  animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.grand-total-card {
  background: var(--primary-grad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.6);
}
.gt-label {
  font-size: 16px;
  font-weight: 800;
}
.gt-value {
  font-size: 32px;
  font-weight: 900;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ═══════════════════════════════════════════
   RECEIPT CARD & BOOTSTRAP INTEGRATION
═══════════════════════════════════════════ */
.receipt-card {
  width: 100%;
  margin: 0 auto;
  border-radius: 16px !important;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.7);
  transition: transform 0.3s ease;
}
.receipt-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}
.rc-header {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--glass-border);
  font-size: 14px;
}
.rc-method-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #a5b4fc;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 10px;
  border: 1px solid rgba(165, 180, 252, 0.2);
}

.rc-items-list {
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: none;
}
.rc-items-list::-webkit-scrollbar {
  display: none;
}
.rc-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
}
.rc-item-val {
  font-weight: 700;
  color: white;
}
.val-neg {
  color: var(--danger);
}
.rc-subtotal {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 2px dashed var(--glass-border);
  font-weight: 800;
}

.accuracy-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 8px;
}
.accuracy-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
.accuracy-bar-fill {
  height: 100%;
  border-radius: 10px;
}

.trust-disclaimer {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  gap: 15px;
  font-size: 13px;
}
.trust-disclaimer svg {
  color: var(--primary-solid);
  flex-shrink: 0;
}

.scanner-container {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-solid);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--primary-solid);
  animation: scanMove 2s ease-in-out infinite alternate;
}
@keyframes scanMove {
  0% {
    top: 0;
    opacity: 0.5;
  }
  100% {
    top: 100%;
    opacity: 1;
  }
}

.editable-text {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.4);
  cursor: text;
  padding: 2px 6px;
  outline: none;
}
.editable-text:hover {
  background: rgba(255, 255, 255, 0.1);
}
.add-row-btn {
  background: rgba(139, 92, 246, 0.1);
  color: #c4b5fd;
  border: 1px dashed rgba(139, 92, 246, 0.4);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85em;
  cursor: pointer;
  display: inline-block;
  margin-top: 12px;
}

/* NEW BUTTON STYLE FOR SAVING TRAINING DATA */
.save-train-btn {
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
  border: 1px dashed rgba(52, 211, 153, 0.4);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85em;
  cursor: pointer;
  display: inline-block;
  margin-top: 12px;
  transition: all 0.3s ease;
}
.save-train-btn:hover {
  background: rgba(52, 211, 153, 0.2);
  transform: translateY(-1px);
}

.cat-badge {
  font-size: 0.75em;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}
.cat-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.95em;
}
.chart-wrapper {
  position: relative;
  height: 250px;
  width: 100%;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
}

/* The Premium Process Button */
.btn-magic {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  border: none;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-magic:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.5);
  color: white;
}

/* Offcanvas Menu Links */

#categoryBreakdown h3 {
  color: #f8fafc !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  margin-top: 10px;
  margin-bottom: 20px;
  text-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* =========================================
   📱 MOBILE SPECIFIC TWEAKS (Max-width: 768px)
   Fixes the squished layout on phone screens
========================================= */
@media (max-width: 768px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
    overflow-x: hidden;
  }

  .rc-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
  }

  .rc-item > div {
    width: 100%;
    justify-content: space-between;
  }

  .rc-item-val {
    align-self: flex-end;
    font-size: 1.2em;
  }

  .add-row-btn,
  .save-train-btn {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
  }

  .my-3 {
    flex-direction: column;
  }

  .receipt-card {
    margin: 0;
    width: 100%;
  }

  .chart-wrapper {
    height: 200px;
  }
}
/* Make Image Inspector Modal vertical on small screens */
#imageModal {
  flex-direction: column !important;
  overflow-y: auto !important;
}

#modalBackground {
  padding: 15px !important;
  min-height: 50vh;
}

#imageModal > div:last-child {
  width: 100% !important;
  box-shadow: none !important;
}

/* =================================================================
   ✨ NOTEBOOK LM TEMPORARY 100% CARD GLOW (Sweeping Sunrays)
================================================================= */

.notebooklm-card-glow {
  position: relative;
  overflow: hidden;
  /* Temp glowing border */
  animation: borderGlowTemp 4s ease-out forwards;
}

/* The sweeping pane of glass light across the background */
.notebooklm-card-glow::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(5, 150, 105, 0.15),
    rgba(168, 85, 247, 0.4),
    rgba(5, 150, 105, 0.15),
    transparent
  );
  transform: skewX(-15deg);
  animation: shimmerSweepTemp 4s ease-in-out forwards;
  pointer-events: none;
  z-index: 0;
}

/* The Notebook LM side sunrays effect (blue/purple inset shadows) */
.notebooklm-card-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow:
    inset 50px 0 80px -20px rgba(5, 150, 105, 0.5),
    inset -50px 0 80px -20px rgba(168, 85, 247, 0.4);
  animation: sideGlowTemp 4s ease-in-out forwards;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}

@keyframes shimmerSweepTemp {
  0% {
    left: -150%;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  60% {
    left: 150%;
    opacity: 1;
  }
  100% {
    left: 150%;
    opacity: 0;
  }
}

@keyframes sideGlowTemp {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes borderGlowTemp {
  0% {
    box-shadow: var(--shadow-glass);
    border-color: var(--glass-border);
  }
  20% {
    box-shadow: 0 0 40px rgba(5, 150, 105, 0.5);
    border-color: rgba(168, 85, 247, 0.8);
  }
  80% {
    box-shadow: 0 0 20px rgba(5, 150, 105, 0.2);
    border-color: rgba(168, 85, 247, 0.4);
  }
  100% {
    box-shadow: var(--shadow-glass);
    border-color: var(--glass-border);
  }
}
/* --- THE NEW OPTIMISTIC UI QUALITY BADGE --- */
.thumb-quality {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.85);
  color: #34d399; /* Green text to show it's analyzed */
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  z-index: 3;
  border: 1px solid rgba(52, 211, 153, 0.3);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  animation: popIn 0.3s ease-out forwards;
}

/* ═══════════════════════════════════════════
   ✨ ENTERPRISE AI DATA-STREAM BACKGROUND ✨
═══════════════════════════════════════════ */

/* 1. Precision Dot Grid Background */
body {
  background-image: radial-gradient(
    rgba(148, 163, 184, 0.25) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
  background-position: center center;
}

/* ✨ AMBIENT AURORA: Gives the background a living, premium depth */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* The Ambient Glows */
  background-image:
    radial-gradient(
      circle at 15% 50%,
      rgba(5, 150, 105, 0.04) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 85% 30%,
      rgba(16, 185, 129, 0.04) 0%,
      transparent 50%
    );
}

/* 2. The Holographic Receipt Cards */
.floating-receipt {
  position: absolute;
  width: 160px;
  height: 220px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(5, 150, 105, 0.15); /* Subtle corporate blue edge */
  border-radius: 12px;
  box-shadow:
    0 8px 32px rgba(15, 23, 42, 0.03),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  animation: dataStreamFloat linear infinite;
  opacity: 0;
}

/* 3. Injecting Actual Math & Code via CSS Content! */
.floating-receipt::after {
  content: "EXTRACTING...\A ------------------\A QTY  ITEM    AMT \A 01   Aata    ₹450\A 02   Dal     ₹120\A 01   Sugar   ₹045\A ------------------\A SUBTOTAL:  ₹615\A TAX (5%):  ₹030\A TOTAL:     ₹645\A \A [AI Confidence: 99%]\A [Status: VERIFIED]";
  position: absolute;
  top: 15px;
  left: 15px;
  font-family: "Courier New", Courier, monospace;
  font-size: 9px;
  font-weight: 600;
  color: rgba(100, 116, 139, 0.5); /* Muted slate gray */
  white-space: pre; /* Forces the line breaks (\A) to work */
  line-height: 1.6;
}

/* 4. The Active AI Scanning Laser */
.floating-receipt::before {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 200%;
  background: linear-gradient(
    to bottom,
    transparent 45%,
    rgba(16, 185, 129, 0.1) 49%,
    /* Soft green glow */ rgba(16, 185, 129, 0.5) 50%,
    /* Sharp green laser */ rgba(16, 185, 129, 0.1) 51%,
    transparent 55%
  );
  animation: aiScanner 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  z-index: 2;
}

/* Smooth, vertical data-center float */
@keyframes dataStreamFloat {
  0% {
    transform: translateY(110vh) scale(0.9);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-30vh) scale(1);
    opacity: 0;
  }
}

/* The sweeping laser animation */
@keyframes aiScanner {
  0% {
    transform: translateY(-50%);
  }
  100% {
    transform: translateY(50%);
  }
}

/* Staggering the timing and positions for a natural data flow */
.receipt-1 {
  left: 8%;
  animation-duration: 28s;
  animation-delay: 0s;
}
.receipt-2 {
  left: 25%;
  animation-duration: 35s;
  animation-delay: -12s;
  transform: scale(0.85);
  opacity: 0.6;
}
.receipt-3 {
  right: 20%;
  animation-duration: 30s;
  animation-delay: -5s;
  transform: scale(1.1);
}
.receipt-4 {
  right: 5%;
  animation-duration: 40s;
  animation-delay: -18s;
  transform: scale(0.9);
}

/* Keep it clean on mobile */
@media (max-width: 768px) {
  .receipt-2,
  .receipt-4 {
    display: none;
  }
  .floating-receipt {
    transform: scale(0.8);
  }
}
/* ✨ BRANDING: Sleek Gradient Logo */
.logo h1 {
  background: linear-gradient(135deg, #0f172a 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ✨ MICRO-INTERACTION: Breathing Upload Arrow */
@keyframes breathe {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.upload-icon svg {
  animation: breathe 3s ease-in-out infinite;
  filter: drop-shadow(
    0 4px 6px rgba(5, 150, 105, 0.2)
  ); /* Adds a soft blue glow to the arrow */
}

/* Stop the breathing when hovered (so it doesn't look glitchy) */
.upload-zone:hover .upload-icon svg {
  animation: none;
  transform: translateY(-5px);
}

/* ═══════════════════════════════════════════
   📱 MOBILE & NARROW SCREEN OPTIMIZATIONS 📱
═══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 1. Hide the background animations on phone screens to prevent clutter */
  .animated-bg {
    display: none;
  }

  /* 2. Shrink the logo and badge to fit nicely */
  .logo h1 {
    font-size: 1.25rem !important;
  }
  .logo .badge {
    font-size: 10px !important;
    padding: 4px 8px !important;
  }

  /* 3. Make the Tag Pills a swipeable horizontal row */
  .pill-container {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    justify-content: center !important;
    padding-bottom: 8px; /* Room for scroll */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    mask-image: linear-gradient(
      to right,
      black 90%,
      transparent 100%
    ); /* Fades the edge */
    -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
  }
  /* ... (your existing mobile pill-container css) ... */

  /* ✨ NEW: COMPACT MOBILE LAYOUT (Keeps buttons above the fold) ✨ */

  /* 1. Pull the whole page up slightly */
  .container {
    padding-top: 10px !important;
  }
  header.mb-4 {
    margin-bottom: 15px !important;
  }

  /* 2. Shrink the massive padding inside the upload box */
  .upload-zone {
    padding: 25px 15px !important;
  }

  /* 3. Make the icon, heading, and text smaller to save vertical space */
  .upload-icon {
    margin-bottom: 10px !important;
  }
  .upload-icon svg {
    width: 42px !important;
    height: 42px !important;
  }
  .upload-zone h3 {
    font-size: 20px !important;
    margin-bottom: 4px !important;
  }
  .upload-zone p {
    font-size: 13px !important;
    margin-bottom: 20px !important;
  }

  /* 4. Make the buttons less chunky so they fit side-by-side or stack neatly */
  #dropZone .btn {
    padding: 12px 24px !important;
    font-size: 14px !important;
    width: 100% !important; /* Forces them to stack cleanly on tiny phones */
    max-width: 280px;
  }

  /* 5. Tighten the gap between the two buttons */
  #dropZone .gap-3 {
    gap: 10px !important;
  }

  /* Hide the ugly scrollbar but keep the scroll functionality */
  .pill-container::-webkit-scrollbar {
    display: none;
  }

  .tag-pill {
    font-size: 12px;
    padding: 6px 14px;
    white-space: nowrap; /* Prevents text from wrapping inside the pill */
  }

  /* Shrink the upload box padding slightly for phones */
  .upload-zone {
    padding: 40px 15px;
  }
}

/* ✨ PREMIUM CUSTOM DROPDOWNS (Replaces Native OS Menus) ✨ */
.premium-dropdown {
  background-color: #f8fafc !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  transition: all 0.2s ease;
}
.premium-dropdown:hover {
  border-color: #cbd5e1 !important;
  background-color: #ffffff !important;
}
.premium-dropdown:focus,
.premium-dropdown[aria-expanded="true"] {
  border-color: #059669 !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1) !important;
}

/* The Popup Menu */
.premium-dropdown-menu {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  padding: 8px;
  margin-top: 6px !important;
}
.premium-dropdown-menu .dropdown-item {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  transition: all 0.2s ease;
}
.premium-dropdown-menu .dropdown-item:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}
.premium-dropdown-menu .dropdown-item.active {
  background-color: #ecfdf5;
  color: #059669;
  font-weight: 600;
}
/* ==========================================
   ✨ POST-UPLOAD UI MODERNIZATION (Kills Dark Navy)
========================================== */

/* 1. OVERRIDE THE OLD GLASS PANEL */
.glass-panel {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid #e2e8f0 !important;
}

/* 2. PREMIUM RECEIPT CARDS */
.receipt-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04) !important;
  color: #1e293b !important;
}

/* Card Header */
.rc-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #334155 !important;
  font-weight: 700;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

/* Individual Receipt Items */
.rc-item {
  border-bottom: 1px solid #f1f5f9 !important;
  color: #475569 !important;
  transition: background 0.2s ease;
}
.rc-item:hover {
  background: #f8fafc !important;
}

/* Editable Text & Prices */
.item-name-field {
  color: #0f172a !important;
  font-weight: 600;
  flex: 1 1 130px; /* Allows it to grow, but NEVER shrink below 130px */
  min-width: 130px; 
  word-break: break-word; /* Moves whole words to the next line safely */
  white-space: normal;
}
.price-edit {
  font-weight: 700 !important;
  color: #0f172a !important;
  background: #f1f5f9 !important;
  padding: 4px 8px;
  border-radius: 6px;
}
.price-edit.val-neg {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.1) !important;
}

/* Subtotal Area */
.rc-subtotal {
  background: #f8fafc !important;
  border-top: 2px dashed #e2e8f0 !important;
  color: #0f172a !important;
  font-weight: 800;
}
.rc-subtotal-val {
  color: #059669 !important;
}

/* 3. THE THUMBNAIL GRID (Preview Area) */
.thumbnail-item {
  background: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02) !important;
}
.thumb-number {
  background: #059669 !important;
  color: white !important;
  font-weight: 700 !important;
}
.thumb-delete {
  background: #ef4444 !important;
  color: white !important;
}

/* 4. CATEGORY PILLS */
.cat-badge {
  background: #f1f5f9 !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
  font-weight: 600 !important;
  border-radius: 20px !important;
  padding: 2px 10px !important;
}

/* Premium Alignment Guard for Responsive Rows */
.utils-wrapper {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

.utils-wrapper button {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.utils-wrapper button:hover {
  background: #f8fafc !important;
  transform: translateY(-1px);
}

.utils-wrapper button.inline-delete-btn:hover {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
}
/* =========================================
   RESTORED: DYNAMIC JAVASCRIPT CLASSES 
   (Do not delete - used in script.js)
========================================= */

.thumbnail-item {
  width: 130px;
  height: 130px;
  border-radius: 16px;
  overflow: hidden;
  background-color: #f8fafc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 2px solid #e2e8f0;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.thumbnail-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* Ensure the delete button looks correct */
.thumb-delete:hover {
  background: #ef4444 !important;
  color: white !important;
  transform: scale(1.1);
}

/* Hide the delete cross by default on devices with a mouse */
@media (hover: hover) {
  .thumb-delete {
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.2s ease,
      visibility 0.2s ease,
      transform 0.2s ease;
  }

  /* Show the cross when hovering anywhere over the thumbnail */
  .thumbnail-item:hover .thumb-delete {
    opacity: 1;
    visibility: visible;
  }
}

/* On touch screens (mobile/tablets), the cross stays visible automatically */
@media (hover: none) {
  .thumb-delete {
    opacity: 1;
    visibility: visible;
  }
}

/* Thumbnail Hover Effects */
#thumbnailGrid img {
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

#thumbnailGrid img:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* ============================================================
   📱 MOBILE-ONLY: AUTO-ROTATING PILL (APPLE-STYLE)
   ============================================================ */
@media (max-width: 767.98px) {
  .pill-container {
    position: relative;
    height: 44px; /* Secures the vertical space so the layout below doesn't jump */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 24px;
  }

  .tag-pill {
    position: absolute; /* Stacks all 3 pills in the exact center */
    opacity: 0; /* Hides them by default */
    /* 9-second total loop, smooth easing */
    animation: pillRotate 9s infinite cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Stagger the start times so they cycle seamlessly */
  .tag-pill:nth-child(1) {
    animation-delay: 0s;
  }
  .tag-pill:nth-child(2) {
    animation-delay: 3s;
  }
  .tag-pill:nth-child(3) {
    animation-delay: 6s;
  }

  /* The Animation Engine */
  @keyframes pillRotate {
    0% {
      opacity: 0;
      transform: translateY(15px); /* Starts hidden, slightly below */
    }
    5% {
      opacity: 1;
      transform: translateY(0); /* Slides up and fades in */
    }
    28% {
      opacity: 1;
      transform: translateY(0); /* Holds perfectly still for the user to read */
    }
    33% {
      opacity: 0;
      transform: translateY(-15px); /* Slides up and fades out */
    }
    100% {
      opacity: 0;
      transform: translateY(
        -15px
      ); /* Stays hidden while the others take their turn */
    }
  }
}

/* ============================================================
   📱 MOBILE-ONLY: CONTENT-MATCHED MINIMALIST DOCUMENT PREVIEWS
   ============================================================ */
@media (max-width: 767.98px) {
  .mobile-upload-scene {
    position: relative;
    width: 90%;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
    z-index: 1;
  }

  /* Base Paper Styling */
  .bg-doc {
    position: absolute;
    bottom: 20px;
    left: 50%;
    width: 60px;
    height: 80px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    z-index: -1;
    padding: 8px 6px;
    opacity: 0;
    animation-duration: 0.8s;
    animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
    animation-delay: 0.3s;
  }

  /* --- 1. Retail Bill Content Simulation --- */
  .doc-retail {
    animation-name: popLeftDoc;
  }
  .doc-retail .header {
    width: 70%;
    height: 5px;
    background: #94a3b8;
    margin-bottom: 8px;
  }
  .doc-retail .mini-line {
    width: 100%;
    height: 3px;
    background: #e2e8f0;
    margin-bottom: 4px;
    border-radius: 1px;
  }
  .doc-retail .total {
    width: 40%;
    background: #64748b;
    margin-top: 8px;
  }

  /* --- 2. Math Sheet Content Simulation --- */
  .doc-math {
    animation-name: popCenterDoc;
  }
  .doc-math .mini-grid-line {
    width: 100%;
    height: 4px;
    border-bottom: 1px dashed #cbd5e1;
    margin-bottom: 6px;
  }

  /* --- 3. Handwritten Bill Content Simulation --- */
  .doc-handwritten {
    animation-name: popRightDoc;
  }
  .doc-handwritten .mini-script-line {
    width: 90%;
    height: 3px;
    background: #cbd5e1;
    margin-bottom: 5px;
    border-radius: 2px;
  }
  .doc-handwritten .mini-script-line:nth-child(even) {
    width: 60%;
  } /* Varies line length to look handwritten */

  /* Animation Keyframes (Sliding out cleanly from behind the card) */
  @keyframes popLeftDoc {
    0% {
      transform: translate(-50%, 0) rotate(0deg);
      opacity: 0;
    }
    100% {
      transform: translate(-135%, -30px) rotate(-10deg);
      opacity: 0.9;
    }
  }

  @keyframes popCenterDoc {
    0% {
      transform: translate(-50%, 0) rotate(0deg);
      opacity: 0;
    }
    100% {
      transform: translate(-50%, -50px) rotate(0deg);
      opacity: 0.9;
    }
  }

  @keyframes popRightDoc {
    0% {
      transform: translate(-50%, 0) rotate(0deg);
      opacity: 0;
    }
    100% {
      transform: translate(35%, -35px) rotate(12deg);
      opacity: 0.9;
    }
  }
}

/* ============================================================
   📱 MOBILE-ONLY: GUARANTEED UNIFORM OUTER GAP
   ============================================================ */
@media (max-width: 767.98px) {
  /* 1. The Outer White Box: Exact uniform frame & height reset */
  .main-card.glass-panel {
    padding: 16px !important; /* Forces perfectly even 16px gap on Top, Bottom, Left, Right */
    height: auto !important; /* Kills any stretching */
    aspect-ratio: auto !important; /* Kills any lingering square ratios */
    display: block !important;
  }

  /* 2. The Inner Dashed Box: Removes invisible margins pushing the gap open */
  #dropZone {
    margin: 0 !important; /* Destroys extra bottom spacing */
    height: auto !important; /* Let it size naturally */
    aspect-ratio: auto !important; /* Ensure it doesn't fight the outer box */
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* ============================================================
   📸 DETAILED REVIEW COMPONENT (Mobile Option 2)
   ============================================================ */
.filmstrip-wrapper::-webkit-scrollbar {
  display: none;
}
.filmstrip-wrapper {
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.inactive-thumb {
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.inactive-thumb:hover {
  opacity: 1 !important;
  transform: translateY(-2px);
}
.preview-action-btn {
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}
.preview-action-btn:hover {
  background: rgba(0, 0, 0, 0.85) !important;
  transform: scale(1.1);
}

/* =========================================
   RESPONSIVE SUBSCRIPTION PRICING UI STYLES
========================================= */
#pricingModal {
  overflow-y: auto; /* Allows smooth scrolling if the screen is too short */
  -webkit-overflow-scrolling: touch;
}

.pricing-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.pricing-card:hover {
  transform: translateY(-6px);
}

.qt-toggle {
  width: 56px;
  height: 30px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease;
}
.qt-toggle.active {
  background: #059669;
}
.qt-toggle-circle {
  width: 22px;
  height: 22px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 4px;
  left: 4px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.qt-toggle.active .qt-toggle-circle {
  transform: translateX(26px);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pricing-features li {
  font-size: 14.5px;
  color: #94a3b8;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pro-features li {
  color: #e2e8f0;
}
.pricing-features svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #34d399;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: "round";
  flex-shrink: 0;
}
.qt-btn-pro:hover {
  background: #047857 !important;
  box-shadow: 0 8px 25px rgba(5, 150, 105, 0.5);
}

/* 💎 RESPONSIVE SLIDER PRICING GRID (Centers 1 Day Pass card or 3 Monthly/Yearly cards) */
.qt-pricing-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  width: 100%;
  align-items: stretch;
}

.qt-pricing-grid .pricing-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1 1 260px;
  max-width: 320px;
  min-width: 0;
  box-sizing: border-box;
}

.qt-pricing-grid .qt-card-daypass {
  max-width: 370px;
}

.qt-pricing-grid .qt-card-basic,
.qt-pricing-grid .qt-card-pro,
.qt-pricing-grid .qt-card-max {
  display: none; /* Hidden initially while 24H Pass tab is active */
}

/* 📱 MOBILE RESPONSIVE FIXES FOR PRICING MODAL */
@media (max-width: 768px) {
  #pricingModal {
    padding: 0 !important;
    background: rgba(248, 250, 252, 0.92) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    justify-content: flex-start !important;
  }

  #pricingModal > div {
    margin-top: 0 !important;
    padding-top: 52px !important;
    padding-bottom: 44px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    min-height: 100vh;
    border-radius: 0 !important;
  }

  #closePricingBtn {
    top: 14px !important;
    right: 14px !important;
  }
}

@media (max-width: 639.98px) {
  .qt-pricing-grid {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  .qt-pricing-grid .pricing-card,
  .qt-pricing-grid .qt-card-daypass {
    width: 100%;
    max-width: 100%;
    flex: none;
  }
  /* Mobile Order: Basic at top, followed by Pro, and Max at last */
  .qt-card-daypass {
    order: 1;
  }
  .qt-card-basic {
    order: 2;
  }
  .qt-card-pro {
    order: 3;
  }
  .qt-card-max {
    order: 4;
  }
}

/* =========================================
   📱 OPTION 1: MINIMALIST TABS (MOBILE ONLY)
   Protects desktop by wrapping in max-width
========================================= */
@media (max-width: 767.98px) {
  .mobile-tab-content {
    display: none !important;
  }
  .mobile-tab-content.active-mobile-tab {
    display: block !important;
  }
}

/* Tab Button Styling (Minimalist & Clean) */
#mobileTabContainer::-webkit-scrollbar {
  display: none;
}
.mobile-tab-btn {
  background: #f1f5f9 !important;
  color: #64748b !important;
  font-size: 13px !important;
  padding: 8px 4px !important;
  text-align: center;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.mobile-tab-btn.active {
  background: linear-gradient(135deg, #1e293b, #0f172a) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
}

/* =========================================
   ✨ PREMIUM UNIFORM PRO BUTTON UI
========================================= */
.uniform-pro-btn {
  background-color: #ecfdf5 !important;
  border: 2px solid #a7f3d0 !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #059669 !important;

  /* Required for the shine effect */
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Base state for the arrow */
.pro-arrow {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 🔥 WORKS ON BOTH DESKTOP (HOVER) AND MOBILE (ACTIVE/TAP) */
.uniform-pro-btn:hover,
.uniform-pro-btn:active {
  background-color: #ffffff !important; /* Snaps to crisp white */
  border-color: #10b981 !important; /* Hardens to a sharp emerald border */
  color: #047857 !important; /* Deepens the text color for contrast */
  transform: translateY(-2px); /* Floats upward */
  /* Premium multi-layered shadow */
  box-shadow:
    0 10px 25px -5px rgba(16, 185, 129, 0.2),
    0 0 0 4px rgba(16, 185, 129, 0.05) !important;
}

/* 1. The Slide-Right Arrow Animation */
.uniform-pro-btn:hover .pro-arrow,
.uniform-pro-btn:active .pro-arrow {
  transform: translateX(4px);
}

/* 2. The Glass Reflection Setup */
.uniform-pro-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  z-index: -1;
  transition: none;
}

/* 3. The Glass Reflection Trigger */
.uniform-pro-btn:hover::before,
.uniform-pro-btn:active::before {
  animation: premiumShine 0.7s ease-in-out forwards;
}

/* The actual animation moving the reflection across the button */
@keyframes premiumShine {
  0% {
    left: -150%;
  }
  100% {
    left: 200%;
  }
}

/* =========================================
   ✨ LIGHT THEME MODAL FIXES (Toggle & Text)
========================================= */

/* 1. Fix the broken Yearly Toggle Switch */
#billingToggle {
  width: 50px !important;
  height: 28px !important;
  background: #e2e8f0 !important;
  border: 2px solid #cbd5e1 !important;
  border-radius: 30px !important;
  position: relative !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  padding: 2px !important;
  display: flex !important;
  align-items: center !important;
}

/* Make it snap to Emerald Green when active */
#billingToggle.active {
  background: #10b981 !important;
  border-color: #10b981 !important;
}

#billingToggle .qt-toggle-circle {
  width: 20px !important;
  height: 20px !important;
  background: #ffffff !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15) !important;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* Slide the circle smoothly to the right */
#billingToggle.active .qt-toggle-circle {
  transform: translateX(22px) !important;
}

/* 2. Hierarchical Feature Text & Color-Matched Checkmarks */
.pricing-features li {
  opacity: 1 !important;
  color: #475569 !important;
  font-weight: 500 !important;
  font-size: 13px !important;
}

.daypass-features li,
.pro-features li,
.max-features li {
  color: #1e293b !important;
  font-weight: 600 !important;
}

/* Tier-matched SVG checkmarks so each card flows harmoniously */
.basic-features li svg {
  stroke: #94a3b8 !important; /* Cool Slate */
}
.daypass-features li svg {
  stroke: #d97706 !important; /* Warm Amber Gold */
}
.pro-features li svg {
  stroke: #059669 !important; /* Core Emerald */
}
.max-features li svg {
  stroke: #4f46e5 !important; /* Executive Indigo */
}

/* ============================================================
   🚀 ELEGANT SAAS LOGIN BUTTON HOVER
   ============================================================ */
.auth-btn-hover:hover {
  background: #0f172a !important; /* Shifts to the deepest slate */
  transform: translateY(-2px); /* Premium upward lift */
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.35) !important; /* Expanded drop shadow */
}
/* --------------------------------------------------- */
/* NEXT-GEN: Liquid Animated Login/Logout Button       */
/* --------------------------------------------------- */
#navLoginBtn {
  /* Brighter, lighter, and more vibrant gradient */
  background: linear-gradient(
    -45deg,
    #10b981,
    #38bdf8,
    #60a5fa,
    #10b981
  ) !important;
  background-size: 300% 300% !important;
  border: none !important;
  border-radius: 10px !important;
  opacity: 1 !important; /* Prevents the whole button from fading */
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2) !important;
}

/* 🔥 CRITICAL FIX: Forces the text and any inner icons to be solid white */
#navLoginBtn,
#navLoginBtn span,
#navLoginBtn i,
#navLoginBtn svg {
  color: #ffffff !important;
  opacity: 1 !important; /* Overrides Bootstrap's annoying translucent classes */
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !important; /* Soft shadow to separate text from background */
}

#navLoginBtn:hover {
  animation: qtGradientShift 3s ease infinite !important;
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.4) !important;
  transform: translateY(-2px) !important;
}

#navLoginBtn:active {
  transform: translateY(1px) scale(0.96) !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3) !important;
  transition: all 0.1s ease !important;
}

@keyframes qtGradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* --------------------------------------------------- */
/* BILLION-DOLLAR LOGOUT SLIDER MICRO-INTERACTION      */
/* --------------------------------------------------- */
#navLoginBtn {
  position: relative !important;
  overflow: hidden !important; /* Traps the slider inside the rounded corners */
}

/* Ensures the text stays above the sliding liquid bar */
#navLoginBtn span,
#navLoginBtn svg,
#navLoginBtn i {
  position: relative !important;
  z-index: 2 !important;
}

/* The 'logging-out' state styling */
#navLoginBtn.logging-out {
  pointer-events: none !important; /* Locks button from double-clicks */
  background: #0f172a !important; /* Drops to a solid dark slate during animation */
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
  transform: scale(0.98) !important; /* Keeps the button "pressed" down */
}

#navLoginBtn.logging-out::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  height: 100% !important;
  width: 0% !important;
  background: linear-gradient(90deg, #10b981, #38bdf8) !important;
  z-index: 1 !important;
  /* Sped up from 1.2s to 0.4s to match the instant logout speed */
  animation: premiumSliderSweep 0.4s cubic-bezier(0.77, 0, 0.175, 1) forwards !important;
}

@keyframes premiumSliderSweep {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* 🚀 PREMIUM SAAS SCROLLBARS (Invisible but fully scrollable) */
::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}
* {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

/* =========================================
   🍞 UNIFORM GLASSMORPHISM TOAST
   ========================================= */
#high-load-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-25px);
  width: 92%;
  max-width: 420px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #f8fafc;
  padding: 14px 16px;
  border-radius: 14px;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000005; /* Must be higher than loadingEl (999999) */
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 12px;
}

#high-load-toast.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.qt-toast-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.qt-toast-body {
  line-height: 1.4;
  flex-grow: 1;
  text-align: left;
}

#toast-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #34d399;
  margin-bottom: 2px;
}

#toast-desc {
  font-weight: 500;
  font-size: 13px;
  color: #f8fafc;
}

.typewriter-cursor::after {
  content: '|';
  animation: blink-cursor 0.75s step-start infinite;
  color: #34d399;
  margin-left: 2px;
}

@keyframes blink-cursor {
  50% { opacity: 0; }
}

/* 📱 MOBILE ONLY: Makes the billing button sleek, compact, and uniform */
@media (max-width: 575.98px) {
    #sidebarBillingBtnContainer button {
        background: #ffffff !important;
        color: #0f172a !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        padding: 10px 12px !important;
        font-size: 13.5px !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    }

    /* Optional: Adds a tiny clean icon badge on mobile like your other settings */
    #sidebarBillingBtnContainer button svg:first-of-type {
        color: #059669;
    }
}