/* ============================================================
   EasyCart SME — Professional Enterprise Stylesheet
   Design: Sophisticated Minimalist / Tech Modern
   Tokens: Slate, Precision, and Depth
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@600;800&display=swap');

/* ---- THEME TOKENS ---------------------------------------- */
:root {
  /* Colors - Mature Palette */
  --primary: #0F172A;
  /* Slate 900 */
  --primary-rgb: 15, 23, 42;
  --accent: #F4C430;
  /* Company Yellow */
  --accent-rgb: 244, 196, 48;

  --bg: #F8FAFC;
  /* Slate 50 */
  --surface: #FFFFFF;
  --surface-hover: #F1F5F9;

  --text: #0F172A;
  --text-muted: #475569;
  --text-inv: #FFFFFF;

  --border: #E2E8F0;
  --border-focus: #0F172A;

  --glass: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.05);

  /* Status */
  --success: #059669;
  --warning: #D97706;
  --danger: #DC2626;

  /* Precision Geometry */
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Outfit', sans-serif;

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  --bg-subtle: #F1F5F9;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.2, 0.64, 1);
}

[data-theme="dark"] {
  --bg: #020617;
  --bg-subtle: #0A1628;
  --surface: #0F172A;
  --surface-hover: #1E293B;
  --text: #F8FAFC;
  --text-muted: #94A3B8;
  --border: #1E293B;
  --border-focus: #F4C430;
  --glass: rgba(15, 23, 42, 0.8);
}

/* ── Dark Mode: All SVG Icons change to Yellow (#F4C430) ──── */
[data-theme="dark"] .ec-icon,
[data-theme="dark"] .ec-icon svg,
[data-theme="dark"] svg.ec-icon {
  color: var(--accent, #F4C430) !important;
}

[data-theme="dark"] .ec-icon-primary,
[data-theme="dark"] .ec-icon-muted,
[data-theme="dark"] .ec-icon-white {
  color: var(--accent, #F4C430) !important;
}

[data-theme="dark"] .ec-icon svg,
[data-theme="dark"] svg {
  color: var(--accent, #F4C430) !important;
}

[data-theme="dark"] .ec-icon svg [stroke]:not([stroke="none"]),
[data-theme="dark"] svg.ec-icon [stroke]:not([stroke="none"]),
[data-theme="dark"] svg [stroke]:not([stroke="none"]) {
  stroke: var(--accent, #F4C430) !important;
}

[data-theme="dark"] .ec-icon svg [fill]:not([fill="none"]):not([fill="transparent"]),
[data-theme="dark"] svg.ec-icon [fill]:not([fill="none"]):not([fill="transparent"]),
[data-theme="dark"] svg [fill]:not([fill="none"]):not([fill="transparent"]) {
  fill: var(--accent, #F4C430) !important;
}

[data-theme="dark"] .ec-icon img,
[data-theme="dark"] img[src*="assets/icons/"],
[data-theme="dark"] img[src$=".svg"],
[data-theme="dark"] img[src*=".svg"],
[data-theme="dark"] .notif-bell-icon img,
[data-theme="dark"] .theme-toggle img,
[data-theme="dark"] .value-icon img,
[data-theme="dark"] .section-title-icon img,
[data-theme="dark"] .instruction-step-icon img,
[data-theme="dark"] .empty-state-icon img,
[data-theme="dark"] .sidebar-link img,
[data-theme="dark"] .category-icon img,
[data-theme="dark"] .logo-icon img,
[data-theme="dark"] .pulse-ussd-icon img,
[data-theme="dark"] .btn img[src*=".svg"],
[data-theme="dark"] .badge img[src*=".svg"] {
  filter: brightness(0) saturate(100%) invert(80%) sepia(85%) saturate(850%) hue-rotate(352deg) brightness(102%) contrast(96%) !important;
  transition: filter var(--transition, 0.3s ease);
}

[data-theme="dark"] .whatsapp-btn .ec-icon img,
[data-theme="dark"] .whatsapp-btn img {
  filter: brightness(0) invert(1) !important;
}

[data-theme="dark"] i.fa,
[data-theme="dark"] i.fas,
[data-theme="dark"] i.far,
[data-theme="dark"] i.fab {
  color: var(--accent, #F4C430) !important;
}

/* ---- RESET & BASE ---------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.brand-name {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

/* ---- FLEX & GRID UTILITIES (Responsive) ------------------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Responsive Grid System */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(12, 1fr);
}

/* Responsive Flex Utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-1 {
  gap: 0.5rem;
}

.gap-2 {
  gap: 1rem;
}

.gap-3 {
  gap: 1.5rem;
}

.gap-4 {
  gap: 2rem;
}

/* Auto-fit Grid for Cards/Products */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

/* ---- NAVIGATION ------------------------------------------ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1010;
  background: var(--glass);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition-smooth);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  height: auto;
  min-height: 64px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  gap: 1rem;
}

.logo-icon {
  font-size: 1.25rem;
  margin-right: 8px;
  color: var(--accent);
  transition: transform 0.3s ease;
}

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

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}

.brand-name span {
  color: var(--accent);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.navbar-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-smooth);
  position: relative;
}

.navbar-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-link:hover {
  color: var(--text);
}

.navbar-link:hover::after {
  width: 100%;
}

.navbar-burger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  margin-left: auto;
  padding: 0.5rem;
}

.navbar-burger:hover {
  color: var(--accent);
}

.navbar-links.mobile-active {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem;
  gap: 1rem;
  z-index: 1000;
}

/* ---- SECONDARY CATEGORY NAVBAR --------------------------- */
.category-subnav {
  position: sticky;
  top: 74px;
  /* Sits directly beneath your main sticky navbar */
  z-index: 1005;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: var(--transition-smooth);
}

[data-theme="dark"] .category-subnav {
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.category-subnav-inner {
  padding: 0 1.5rem;
}

/* Horizontal scrollable track */
.category-scroll-container {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  /* Smooth momentum scrolling on iOS */
  scrollbar-width: none;
  /* Hide standard scrollbar Firefox */
}

/* Hide scrollbar on Chrome, Edge, Safari for modern app feel */
.category-scroll-container::-webkit-scrollbar {
  display: none;
}

/* Category Pills / Chips */
.subnav-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid transparent;
  text-decoration: none;
  flex-shrink: 0;
  /* Prevents pills from shrinking when container overflows */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.subnav-chip:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--border);
  transform: translateY(-1px);
}

.subnav-chip.active {
  background: var(--accent);
  color: #000000;
  font-weight: 600;
}

/* Highlighted Electronics Chip */
.subnav-chip-electronics {
  border-color: rgba(244, 196, 48, 0.4);
  background: rgba(244, 196, 48, 0.08);
  color: var(--text);
}

.subnav-chip-electronics:hover {
  border-color: var(--accent);
}

/* "Sale" Badge inside Electronics */
.subnav-badge {
  background: #DC2626;
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* ---- BUTTONS --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition-bounce);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::before {
  width: 200px;
  height: 200px;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: #1e293b;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-outline {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.btn-outline:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.btn-success {
  background: #059669;
  color: #fff;
}

.btn-success:hover {
  background: #047857;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-danger {
  background: #DC2626;
  color: #fff;
}

.btn-danger:hover {
  background: #B91C1C;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

[data-theme="dark"] .btn-primary:not([href*="wa.me"]):not(#nav-login):not(#login-btn),
[data-theme="dark"] .btn-outline:not([href*="wa.me"]):not(#nav-login):not(#login-btn) {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

[data-theme="dark"] .btn-primary:not([href*="wa.me"]):not(#nav-login):not(#login-btn):hover,
[data-theme="dark"] .btn-outline:not([href*="wa.me"]):not(#nav-login):not(#login-btn):hover {
  background: #EAB308;
  color: #000;
  border-color: #EAB308;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(244, 196, 48, 0.2);
}

.w-full {
  width: 100%;
}

/* ---- CARDS ----------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition-bounce);
}

.card:hover {
  border-color: var(--text-muted);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* Cards Grid Layout */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
  margin: 2rem 0;
}

/* ---- HERO & SLIDESHOW ------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 100px 0 80px;
  background: #020617;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Ensure hero container sits cleanly above the animated background */
.hero .container {
  position: relative;
  z-index: 2;
}

.hero .hero-title {
  color: #F8FAFC;
}

.hero .hero-title span {
  color: var(--accent);
}

.hero .hero-desc {
  color: #94A3B8;
}

.hero .btn-outline {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #F8FAFC;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Animated gradient background */
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(244, 196, 48, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 80%, rgba(99, 102, 241, 0.09) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(16, 185, 129, 0.04) 0%, transparent 70%),
    linear-gradient(160deg, #020617 0%, #060f21 50%, #0a0a2e 100%);
  animation: gradientShift 12s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes gradientShift {
  0% {
    filter: hue-rotate(0deg) brightness(1);
  }

  50% {
    filter: hue-rotate(15deg) brightness(1.05);
  }

  100% {
    filter: hue-rotate(-10deg) brightness(0.95);
  }
}

/* Grid overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(244, 196, 48, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 196, 48, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* Animated blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.14;
  animation: blobFloat 18s ease-in-out infinite;
  pointer-events: none;
  will-change: transform;
  z-index: 1;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #F4C430, transparent 70%);
  top: -200px;
  left: -150px;
  animation-duration: 20s;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
  bottom: -150px;
  right: -100px;
  animation-duration: 16s;
  animation-delay: -8s;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #10b981, transparent 70%);
  top: 50%;
  right: 20%;
  animation-duration: 22s;
  animation-delay: -4s;
}

@keyframes blobFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(40px, -60px) scale(1.08);
  }

  66% {
    transform: translate(-30px, 40px) scale(0.95);
  }
}

/* Particles canvas */
#particles-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.parallax-layer {
  transition: transform 0.15s ease-out;
  will-change: transform;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  animation: slideInLeft 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.slideshow-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-lg);
  background: #0F172A;
  aspect-ratio: 4/3;
  min-height: 420px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
}

/* Pulse ring on the slideshow to hint clickability */
.slideshow-container::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 0 rgba(244, 196, 48, 0);
  transition: box-shadow 0.3s ease;
  pointer-events: none;
  z-index: 4;
}

.slideshow-container:hover::after {
  box-shadow: inset 0 0 0 3px rgba(244, 196, 48, 0.55);
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  opacity: 0;
  transform: scale(1.04);
  filter: blur(6px);
  transition: opacity 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    filter 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
  will-change: transform, opacity, filter;
}

.slide.active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
  pointer-events: auto;
  transition-delay: 0.05s;
}

/* Full-bleed background image */
.slide-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 0;
  margin: 0;
  animation: none;
}

/* Gradient overlay — dark at bottom for text legibility */
.slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.0) 35%,
      rgba(0, 0, 0, 0.55) 65%,
      rgba(0, 0, 0, 0.82) 100%);
  z-index: 1;
  border-radius: inherit;
}

/* Text caption area pinned to the bottom */
.slide-caption {
  position: relative;
  z-index: 2;
  padding: 1.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.slide-name {
  font-size: 1.9rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards 0.2s;
}

.slide-tagline {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards 0.35s;
}

/* Scroll-hint chevron */
.slide-scroll-hint {
  position: absolute;
  bottom: 1rem;
  right: 1.25rem;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  transition: background 0.3s ease, transform 0.3s ease;
  animation: gentleFloat 2.5s ease-in-out infinite;
}

.slideshow-container:hover .slide-scroll-hint {
  background: rgba(244, 196, 48, 0.75);
  color: #0F172A;
}

/* Hide the old price element if it ever appears */
.slide-price {
  display: none !important;
}

/* ---- DASHBOARD ------------------------------------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  background: var(--bg-subtle);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0.75rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition-smooth);
}

.sidebar-link:hover,
.sidebar-link.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transform: translateX(4px);
}

.main-content {
  padding: 2rem 3rem;
}

/* ---- FORMS & ALERTS -------------------------------------- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text);
  transition: var(--transition-smooth);
}

.form-control option {
  background: var(--surface);
  color: var(--text);
}

.form-control:focus {
  border-color: var(--accent);
  background: var(--surface);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ---- PASSWORD TOGGLE -------------------------------------- */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper .form-control {
  padding-right: 2.5rem;
}

.password-toggle {
  position: absolute;
  right: 0.875rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-smooth);
}

.password-toggle:hover {
  color: var(--accent);
}

.password-toggle:active {
  transform: scale(0.95);
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  animation: slideInRight 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.alert-danger {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

.alert-success {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #6EE7B7;
}


/* ---- TABLES ---------------------------------------------- */
.table-container {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  background: var(--surface);
  transition: var(--transition-smooth);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 500px;
}

th {
  background: var(--bg-subtle);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  transition: var(--transition-smooth);
}

tr:hover td {
  background: var(--surface-hover);
}

/* ---- MISC ------------------------------------------------ */
.badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.badge-active {
  background: #D1FAE5;
  color: #065F46;
}

.mt-4 {
  margin-top: 1rem;
}

.whatsapp-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #10B981;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-bounce);
  cursor: pointer;
}

.whatsapp-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

/* ===== SMOOTH ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes gentleFloat {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }
}

/* Scroll-triggered fade animations for page elements */
.hero,
.card,
.products-grid>* {
  animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) backwards;
}

.hero {
  animation-delay: 0s;
}

.card:nth-child(1) {
  animation-delay: 0.05s;
}

.card:nth-child(2) {
  animation-delay: 0.1s;
}

.card:nth-child(3) {
  animation-delay: 0.15s;
}

.card:nth-child(4) {
  animation-delay: 0.2s;
}

.card:nth-child(5) {
  animation-delay: 0.25s;
}

.card:nth-child(6) {
  animation-delay: 0.3s;
}

/* ===== RESPONSIVE BREAKPOINTS (Flex & Grid Adaptive) ===== */

/* Tablet Landscape & Small Desktops */
@media (max-width: 1024px) {
  .hero {
    padding: 60px 0;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .slideshow-container {
    min-height: 380px;
    aspect-ratio: 4/3;
  }

  .slide-caption {
    padding: 1.25rem 1.5rem 1.75rem;
  }

  .slide-name {
    font-size: 1.6rem;
  }

  .slide-tagline {
    font-size: 0.9rem;
  }


  .grid {
    gap: 1rem;
  }
}


/* Tablet Portrait */
@media (max-width: 768px) {
  .navbar-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .navbar-burger {
    display: block !important;
  }

  .navbar-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
    gap: 1rem;
    display: none;
    z-index: 1000;
  }

  .navbar-links.mobile-active {
    display: flex;
  }

  /* Specific fix for index.html dropdown if needed, but dashboard has .sidebar-mobile-profile */
  .sidebar-mobile-profile {
    display: block !important;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 64px;
    bottom: 0;
    width: 260px;
    z-index: 1000;
    background: var(--surface);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
  }

  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .hero {
    padding: 50px 0;
  }

  .hero-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .slideshow-container {
    min-height: 320px;
    aspect-ratio: 16/9;
  }

  .slide-caption {
    padding: 1rem 1.25rem 1.5rem;
  }

  .slide-name {
    font-size: 1.4rem;
  }

  .slide-tagline {
    font-size: 0.875rem;
  }

  .main-content {
    padding: 1.5rem;
  }

  .products-grid,
  .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
  }

  .grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Mobile Landscape */
@media (max-width: 640px) {
  .hero {
    padding: 40px 0;
  }



  .products-grid,
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .flex {
    flex-direction: column;
  }

  .items-center {
    align-items: stretch;
  }

  .justify-between {
    justify-content: center;
  }

  .navbar-links {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
  }

  .hero-inner {
    padding: 0 1rem;
  }

  .slideshow-container {
    min-height: 260px;
    aspect-ratio: 16/9;
  }

  .slide-caption {
    padding: 0.875rem 1rem 1.25rem;
  }

  .slide-name {
    font-size: 1.2rem;
  }

  .slide-tagline {
    font-size: 0.825rem;
  }

  .main-content {
    padding: 1rem;
  }

  .card {
    padding: 1.25rem;
  }

  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Mobile Small */
@media (max-width: 480px) {
  .hero {
    padding: 30px 0;
  }

  .hero-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
  }

  .slideshow-container {
    min-height: 230px;
    aspect-ratio: 16/9;
    border-radius: var(--radius);
  }

  .slide-caption {
    padding: 0.75rem 0.875rem 1rem;
  }

  .slide-name {
    font-size: 1rem;
  }

  .slide-tagline {
    font-size: 0.8rem;
  }

  :root {
    --radius: 4px;
    --radius-lg: 8px;
  }

  .hero {
    padding: 40px 0;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .card {
    padding: 1rem;
  }

  .slide-scroll-hint {
    display: none;
  }

  .whatsapp-btn {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    bottom: 1rem;
    right: 1rem;
  }
}

/* Print Styles */
@media print {

  .navbar,
  .whatsapp-btn,
  .sidebar {
    display: none;
  }

  .dashboard-grid {
    display: block;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
  }
}

/* --- Categorized Services Grid --- */
.category-section {
  margin-bottom: 3.5rem;
}

.category-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 20px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  height: auto;
  align-items: center;
  transition: var(--transition-bounce);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ---- Electronics Section (Public Landing Page) ---- */
.electronics-section {
  padding: 80px 0;
  background: var(--bg);
  position: relative;
}

.electronics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 2rem;
}

@media (max-width: 900px) {
  .electronics-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

@media (max-width: 500px) {
  .electronics-grid {
    grid-template-columns: 1fr;
  }
}

.electronic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.electronic-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

/* "HOT" badge in the top-left corner of each card */
.electronic-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #EF4444;
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  z-index: 2;
}

.electronic-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  padding: 0;
  width: 100%;
  overflow: hidden;
}

.electronic-icon {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.3s ease;
  display: block;
}

.electronic-card:hover .electronic-icon {
  transform: scale(1.04);
}

.electronic-content {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.electronic-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.electronic-cost {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--success);
}

.electronic-expiry {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

.electronic-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #25D366;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 11px 16px;
  border-radius: 10px;
  text-decoration: none;
  margin-top: 4px;
  transition: background 0.2s, transform 0.15s;
}

.electronic-cta:hover {
  background: #1EBA59;
  transform: scale(1.02);
  color: #FFFFFF;
}



.service-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 1rem auto 0.5rem;
}

.service-content {
  padding: 12px;

  flex: 1;
  /* takes remaining space */

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* --- Modals (Global & Dashboard) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transform: translateZ(0);
  /* Fixes z-index bleeding in some browsers */
  /* Hidden by default for dashboard: */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* When opened via JS (.open class) */
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* For index.html which toggles inline display flex instead of .open */
#plan-modal-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Dashboard/Admin Modal Container */
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 90%;
  max-width: 450px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  font-size: 1.5rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
}

.plan-modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(20px);
  animation: slideUp 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes slideUp {
  to {
    transform: translateY(0);
  }
}

.plan-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.plan-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text);
}

.close-modal-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.close-modal-btn:hover {
  color: var(--text);
}

.plan-modal-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

/* --- Plan Option Cards --- */
.plan-option-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.plan-option-card:hover {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb, 128, 128, 128), 0.05);
  /* Very subtle hover tint */
}

.plan-duration {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.plan-price {
  color: var(--primary);
  font-weight: bold;
}

.plan-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== ADMIN PANEL UPGRADES ===================================== */

/* --- Sidebar structural fix --- */
.sidebar {
  flex-direction: column;
  min-height: calc(100vh - 64px);
}

.sidebar-section {
  width: 100%;
}

/* Admin burger button in navbar */
#admin-burger-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}

#admin-burger-btn:hover {
  background: var(--surface-hover);
}

/* Sidebar overlay now handles globally from media query or unified logic.
   We just ensure .active works universally if needed */
.sidebar-overlay.active {
  display: block;
}

/* --- Page header --- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 2px;
}

/* --- Stats grid --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.text-sm {
  font-size: 0.85rem;
}

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

.text-center {
  text-align: center;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* --- Spinner --- */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

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

/* --- Filter Panel --- */
.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  animation: slideInRight 0.2s ease forwards;
}

.filter-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip:hover {
  background: var(--surface-hover);
}

.filter-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* --- Badges (extended) --- */
.badge-admin {
  background: #EDE9FE;
  color: #5B21B6;
}

.badge-organizer {
  background: #FEF3C7;
  color: #92400E;
}

.badge-customer {
  background: #DBEAFE;
  color: #1E40AF;
}

.badge-pending {
  background: #FEF9C3;
  color: #713F12;
}

.badge-accepted {
  background: #D1FAE5;
  color: #065F46;
}

.badge-declined {
  background: #FEE2E2;
  color: #991B1B;
}

.badge-expired {
  background: #F1F5F9;
  color: #475569;
}

.badge-approved {
  background: #D1FAE5;
  color: #065F46;
}

.badge-rejected {
  background: #FEE2E2;
  color: #991B1B;
}

.badge-expiring {
  background: #FFF7ED;
  color: #C2410C;
  border: 1px solid #FED7AA;
}

.badge-status-active {
  background: #D1FAE5;
  color: #065F46;
}

.badge-status-expiring {
  background: #FFF7ED;
  color: #C2410C;
}

.badge-status-expired {
  background: #FEE2E2;
  color: #991B1B;
}

.badge-status-pending,
.status-pending {
  background: #FEF9C3;
  color: #713F12;
}

/* --- User Details Modal --- */
.user-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.detail-item {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.detail-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.detail-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.engagement-bar-wrap {
  background: var(--border);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
  margin-top: 6px;
}

.engagement-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #059669, #10B981);
  transition: width 0.8s ease;
}

/* --- Accordion (Families) --- */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--bg-subtle);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  user-select: none;
}

.accordion-header:hover {
  background: var(--surface-hover);
}

.accordion-item.open .accordion-header {
  border-bottom: 1px solid var(--border);
}

.accordion-content {
  display: none;
}

.accordion-item.open .accordion-content {
  display: block;
}

/* --- Subscription Card --- */
.subscription-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  transition: var(--transition-smooth);
}

.subscription-card:hover {
  border-color: var(--text-muted);
  box-shadow: var(--shadow);
}

.subscription-card.expiring-soon {
  border-left: 4px solid #F59E0B;
}

.subscription-card.expired {
  border-left: 4px solid var(--danger);
  opacity: 0.75;
}

.subscription-card.active {
  border-left: 4px solid #10B981;
}

.subscription-card.pending {
  border-left: 4px solid var(--accent);
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

/* --- Toast container --- */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 99998;
}

.toast {
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideInRight 0.3s ease forwards;
  max-width: 320px;
}

.toast-success {
  background: #059669;
}

.toast-error {
  background: #DC2626;
}

.toast-info {
  background: #0F172A;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* ===== ADMIN RESPONSIVE ========================================= */

@media (max-width: 768px) {
  .dashboard-grid {
    position: relative;
  }

  .sidebar {
    padding-top: 70px;
    overflow-y: auto;
  }

  #admin-burger-btn {
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 1.25rem 1rem;
  }

  .user-details-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header>* {
    width: 100%;
  }

  .filter-panel {
    flex-direction: column;
    gap: 1rem;
  }
}

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

  .modal {
    width: 95%;
    padding: 1.25rem;
  }

  .subscription-card {
    flex-direction: column;
    gap: 12px;
  }
}

.fade-in {
  animation: fadeInUp 0.3s ease forwards;
}

/* User Selection List */
.user-select-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s ease;
}

.user-select-item:hover {
  background: var(--surface-hover);
}

.user-select-item:last-child {
  border-bottom: none;
}

.user-select-info {
  flex: 1;
}

.user-select-name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Green Ripple Dot */
.ripple-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.ripple-dot::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: inherit;
  animation: ripple 1.5s infinite;
  left: 0;
  top: 0;
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }

  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* ===== SUBSCRIPTION & PROMO CARDS ============================== */

/* Subscription Card - Dashboard View */
.subscription-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.subscription-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.subscription-card-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.subscription-detail {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.subscription-detail-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.subscription-detail-value {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

.subscription-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Badges for Status */
.status-badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-active {
  background: #DCFCE7;
  color: #166534;
}

.status-pending {
  background: #FEF9C3;
  color: #713F12;
}

.status-expired {
  background: #FEE2E2;
  color: #991B1B;
}

.status-suspended {
  background: #F3E8FF;
  color: #5B21B6;
}

.approval-badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.approval-pending {
  background: #FEF9C3;
  color: #713F12;
}

.approval-approved {
  background: #DCFCE7;
  color: #166534;
}

.approval-rejected {
  background: #FEE2E2;
  color: #991B1B;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.empty-state-text {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.empty-state-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.empty-state a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.empty-state a:hover {
  text-decoration: underline;
}

/* Promo Management Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.admin-table thead {
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}

.admin-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.admin-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.admin-table tbody tr:hover {
  background: var(--surface-hover);
}

.admin-table tbody tr:last-child {
  border-bottom: none;
}

.admin-table td {
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--text);
}

.user-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

.user-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.action-cell {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Responsive Tables */
@media (max-width: 768px) {
  .admin-table {
    font-size: 0.85rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.75rem 0.5rem;
  }

  .subscription-card-body {
    grid-template-columns: 1fr;
  }

  .subscription-actions {
    width: 100%;
  }

  .empty-state {
    padding: 2rem 1rem;
  }

  .empty-state-icon {
    font-size: 2rem;
  }
}

/* ============================================================
   EasyCart SME — Notification Dropdown & Bell Styles
   ============================================================ */

.notif-bell-wrapper {
  position: relative;
  display: inline-block;
  margin-right: 12px;
}

.notif-bell-btn {
  position: relative;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.notif-bell-btn:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
  transform: scale(1.05);
}

.notif-bell-icon {
  font-size: 1.15rem;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: white;
  border-radius: 99px;
  padding: 2px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--surface);
  line-height: 1;
}

.notif-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1050;
  overflow: hidden;
  animation: fadeInUp 0.2s ease-out;
}

.notif-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.notif-dropdown-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.notif-link-btn {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.notif-link-btn:hover {
  background: var(--surface-hover);
  text-decoration: underline;
}

.notif-panel {
  max-height: 380px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
  align-items: flex-start;
}

.notif-item:hover {
  background: var(--surface-hover);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item--unread {
  background: rgba(244, 196, 48, 0.06);
  /* Accent tinted light bg */
}

.notif-item--unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
}

.notif-icon {
  font-size: 1.25rem;
  margin-right: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--bg-subtle);
  border-radius: 50%;
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-weight: 650;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1.2;
}

.notif-msg {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 4px;
}

.notif-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.85;
}

.notif-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  opacity: 0;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition-smooth);
  margin-left: 8px;
}

.notif-item:hover .notif-delete-btn {
  opacity: 1;
}

.notif-delete-btn:hover {
  color: var(--danger);
  transform: scale(1.15);
}

.notif-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
}

.notif-empty span {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
  opacity: 0.65;
}

.notif-empty p {
  font-size: 0.85rem;
}

/* ============================================================
   EasyCart SME v2 — Additional Component Styles
   Search, Instruction Modal, Report Modal, Responsive Fixes
   ============================================================ */

/* ---- Service Search Bar ----------------------------------- */
.service-search-wrap {
  margin-bottom: 1.5rem;
}

.service-search-input {
  width: 100%;
  max-width: 480px;
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.9rem;
  color: var(--text);
  font-family: var(--font);
  transition: var(--transition-smooth);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.75rem center;
}

.service-search-input:focus {
  outline: none;
  border-color: var(--accent);
  background-color: var(--surface);
  box-shadow: 0 0 0 3px rgba(244, 196, 48, 0.15);
}

.service-search-input::placeholder {
  color: var(--text-muted);
}

/* ---- Instruction Modal ------------------------------------ */

/* Constrain modal height and make it scrollable */
#instruction-modal .modal {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

#instruction-modal .modal-header {
  padding: 1rem 1.25rem;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

/* Scrollable middle area */
#instruction-modal .modal-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  min-height: 0;
}

/* Sticky footer with action buttons */
#instruction-modal .instruction-modal-actions {
  flex-shrink: 0;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.instruction-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.instruction-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.875rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.instruction-step:last-child {
  border-bottom: none;
}

.instruction-step-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  background: var(--bg-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instruction-step-text {
  flex: 1;
  min-width: 0;
}

.instruction-step-text strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1px;
}

.instruction-step-text span {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.instruction-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.btn-whatsapp {
  background: #25D366;
  color: #fff !important;
  border: none;
}

.btn-whatsapp:hover {
  background: #1ebe5d !important;
  color: #fff !important;
  border-color: transparent !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Override dark mode btn swap for WhatsApp button */
[data-theme="dark"] .btn-whatsapp {
  background: #25D366 !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* ---- Report Modal ---------------------------------------- */
.report-modal-info {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

/* ---- Sidebar report link --------------------------------- */
.sidebar-link-danger {
  color: var(--danger) !important;
}

.sidebar-link-danger:hover,
.sidebar-link-danger.active {
  background: #FEE2E2 !important;
  color: var(--danger) !important;
  border-color: #FCA5A5 !important;
}

[data-theme="dark"] .sidebar-link-danger:hover,
[data-theme="dark"] .sidebar-link-danger.active {
  background: rgba(220, 38, 38, 0.15) !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
}

/* ---- Badge: active --------------------------------------- */
.badge-active {
  background: #D1FAE5;
  color: #065F46;
}

/* ---- Mobile: footer grid collapse ----------------------- */
@media (max-width: 640px) {

  /* Hero action buttons should wrap, not overflow */
  .hero-actions {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  .hero-actions .btn {
    width: auto !important;
    flex: 1 1 auto;
    min-width: 120px;
  }

  /* Requests table always scrolls horizontally */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-container table {
    min-width: 520px;
  }

  /* Service search: full width */
  .service-search-input {
    max-width: 100%;
  }

  /* Prevent .btn {width:100%} from breaking inline button rows
     inside modal footers, card action groups, or flex nav bars */
  .modal [style*="display:flex"] .btn,
  .modal [style*="display: flex"] .btn,
  .navbar-links .btn,
  .page-header .btn,
  .stats-grid .btn {
    width: auto !important;
  }
}

@media (max-width: 480px) {

  /* Notification dropdown should not overflow */
  .notif-dropdown {
    width: calc(100vw - 2rem);
    right: -1rem;
  }

  /* Instruction / report modal: stack buttons */
  .instruction-modal-actions .btn {
    width: 100%;
  }
}

@media (max-width: 320px) {
  .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .main-content {
    padding: 0.75rem 0.5rem;
  }

  .hero-title {
    font-size: 1.5rem !important;
  }

  .service-search-input {
    font-size: 0.8rem;
  }

  /* Slideshow stays usable at tiny screens */
  .slideshow-container {
    min-height: 220px;
    aspect-ratio: auto;
  }
}

/* ---- Footer responsive grid ------------------------------ */
@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
}

/* ---- Plan modal responsive ------------------------------- */
.plan-modal-content {
  max-width: 95vw;
  width: 480px;
}

/* ============================================================
   CART SYSTEM & SLIDE-OVER DRAWER
   ============================================================ */

/* Cart Navigation Button */
.cart-nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.cart-nav-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.cart-badge {
  background: var(--danger);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9999px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
  animation: badgePop 0.2s ease;
}

@keyframes badgePop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  80% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Backdrop */
.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  display: none;
}

/* Drawer Container */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: min(420px, 100vw);
  background: var(--bg);
  color: var(--text);
  border-left: 1px solid var(--border);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.cart-drawer-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.cart-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}

.cart-close-btn:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Individual Cart Line Item */
.cart-item-card {
  display: flex;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: var(--radius);
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}

.cart-item-card:hover {
  border-color: var(--accent);
}

.cart-item-img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-title {
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 2px 0;
}

.cart-item-price {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
}

/* Quantity Controls */
.cart-qty-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.qty-btn {
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
  font-size: 0.9rem;
}

.qty-btn:hover {
  background: var(--border);
  border-color: var(--border-focus);
}

.cart-item-remove {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px;
  margin-left: 2px;
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.cart-item-remove:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* Drawer Footer */
.cart-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

#cartDrawerTotal {
  color: var(--accent);
  font-size: 1.2rem;
}

.cart-checkout-btn {
  width: 100%;
  padding: 12px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--primary);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-checkout-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(244, 196, 48, 0.4);
}

.cart-checkout-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 1. Base Button & Color Variables */
.btn-flowing-border {
  position: relative;
  overflow: hidden;
  border: none !important;
  background: transparent !important;
  z-index: 1;

  /* Default (Light Mode): Yellow flowing stream */
  --border-stream: #F4C430;
  --btn-bg: #0F172A;
  /* Slate 900 background */
  color: #FFFFFF !important;
}

/* 2. Dark Mode Toggle: Switch stream to Light Blue */
/* 2. Dark Mode Toggle: Bring back yellow button + light blue flowing stream */
[data-theme="dark"] .btn-flowing-border {
  --border-stream: #38BDF8;
  /* Light Blue flowing stream */
  --btn-bg: var(--accent, #F4C430);
  /* Button turns yellow */
  color: #000000 !important;
  /* Text turns black for contrast */
  border-color: transparent !important;
}

/* Dark mode hover color */
[data-theme="dark"] .btn-flowing-border:hover::after {
  background: #EAB308;
  /* Slightly deeper yellow on hover */
}

/* 3. The Spinning Stream of Light */
.btn-flowing-border::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent,
      transparent 65%,
      var(--border-stream) 85%,
      transparent 100%);
  animation: rotate-border 3s linear infinite;
  z-index: -2;
}

/* 4. The Inner Mask (Leaves a 2px gap around the border) */
.btn-flowing-border::after {
  content: '';
  position: absolute;
  inset: 2px;
  /* Thickness of the glowing border line */
  background: var(--btn-bg);
  border-radius: inherit;
  z-index: -1;
  transition: background 0.3s ease;
}

/* Hover brightness */
.btn-flowing-border:hover::after {
  background: #1E293B;
}

/* 5. Keep Text on Top */
.btn-flowing-border span {
  position: relative;
  z-index: 2;
}

/* 6. Rotation Animation */
@keyframes rotate-border {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ---- FLOWING BORDER FOR SLIDESHOW ------------------------- */
.flowing-border-card {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) + 3px);
  padding: 3px;
  /* Border thickness */
  width: 100%;
  z-index: 1;

  /* Default (Light Mode): Yellow */
  --border-stream: #F4C430;
}

/* Dark Mode: Switch to Light Blue */
[data-theme="dark"] .flowing-border-card {
  --border-stream: #38BDF8;
}

/* The rotating stream of light */
.flowing-border-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent,
      transparent 70%,
      var(--border-stream) 85%,
      transparent 100%);
  animation: rotate-border 5s linear infinite;
  /* 5s gives a smooth flow on a larger box */
  z-index: -1;
}

/* Ensure the slideshow sits neatly inside the glowing frame */
.flowing-border-card .slideshow-container {
  position: relative;
  z-index: 2;
  border-radius: var(--radius-lg);
  margin: 0;
}