/**
 * ✨ NORDLYS COMPONENT SYSTEM ✨
 * Premium components for YPAI Voice Recording Platform  
 * Nordlys Design System Compliant
 * WCAG AAA compliant with world-class design standards
 * Version: 5.0.0 - NORDLYS EDITION
 */

/* ==========================================
   🌟 NORDLYS SIGNATURE SURFACES (UPDATED HOTFIX)
   ========================================== */
/*
  premium-card
  - Elevated marketing surface
  - Soft radial / linear gradient glaze
  - Subtle outer glow using brand accent
  - Gentle inner shadow to define edge without harsh border
  - Uses existing semantic + brand tokens where possible

  glass-subtle
  - Low-emphasis interactive surface
  - Translucent neutral tint, backdrop blur
  - Border uses --glass-border token (or fallback)
  - Lightweight hover amplification (opacity + slight elevation)
*/

.premium-card {
  background:
    linear-gradient(135deg,
      hsla(265, 100%, 66%, 0.06) 0%,
      hsla(265, 90%, 70%, 0.03) 45%,
      hsla(265, 80%, 75%, 0.07) 100%),
    radial-gradient(circle at 20% 15%, hsla(265, 100%, 70%, 0.12), transparent 60%),
    var(--surface-2, hsla(240, 10%, 4%, 0.92));
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid hsla(265, 100%, 66%, 0.16);
  border-radius: var(--radius-2xl, 1.25rem);
  box-shadow:
    0 18px 40px -8px rgba(0,0,0,0.45),                /* ambient */
    0 0 0 1px rgba(255,255,255,0.03),                 /* hairline refinement */
    inset 0 1px 1px rgba(255,255,255,0.12),           /* soft top inner highlight */
    inset 0 -1px 2px -1px rgba(0,0,0,0.4),            /* inner shadow for depth */
    0 0 72px -18px hsla(265,100%,66%,0.22);           /* ethereal glow */
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--duration-standard,300ms) var(--easing, cubic-bezier(.4,0,.2,1)), transform var(--duration-standard,300ms) var(--easing, cubic-bezier(.4,0,.2,1));
}

.premium-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0) 40%),
    radial-gradient(circle at 80% 0%, rgba(255,255,255,0.08), transparent 70%);
  mix-blend-mode: overlay;
  opacity: 0.6;
  pointer-events: none;
}

.premium-card:hover {
  transform: translateY(-3px);
  border-color: hsla(265, 100%, 66%, 0.28);
  box-shadow:
    0 26px 56px -10px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.05),
    inset 0 1px 1px rgba(255,255,255,0.16),
    inset 0 -1px 2px -1px rgba(0,0,0,0.5),
    0 0 95px -18px hsla(265,100%,66%,0.32);
}

/* Reduced motion: remove elevation shift */
@media (prefers-reduced-motion: reduce) {
  .premium-card,
  .premium-card:hover { transform: none; }
}

.glass-subtle {
  background: linear-gradient(
      145deg,
      hsla(240, 10%, 92%, 0.08),
      hsla(240, 10%, 92%, 0.02)
    );
  background-color: hsla(240, 10%, 20%, 0.22);
  backdrop-filter: blur(14px) saturate(125%);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
  border: 1px solid var(--glass-border, hsla(240, 5%, 65%, 0.14));
  border-radius: var(--radius-xl, 1rem);
  box-shadow:
    0 6px 28px -6px rgba(0,0,0,0.35),
    inset 0 1px 0 0 rgba(255,255,255,0.05);
  position: relative;
  transition: background var(--duration-standard,300ms) var(--easing, cubic-bezier(.4,0,.2,1)),
              box-shadow var(--duration-standard,300ms) var(--easing, cubic-bezier(.4,0,.2,1)),
              border-color var(--duration-standard,300ms) var(--easing, cubic-bezier(.4,0,.2,1));
}

.glass-subtle:hover,
.glass-subtle:focus-visible {
  background-color: hsla(240, 10%, 25%, 0.35);
  border-color: var(--glass-border-hover, hsla(265, 100%, 66%, 0.35));
  box-shadow:
    0 10px 36px -6px rgba(0,0,0,0.4),
    inset 0 1px 0 0 rgba(255,255,255,0.08);
}

/* Subtle animated shimmer (accessible – decorative only) */
@media (prefers-reduced-motion: no-preference) {
  .glass-subtle::after {
    content: '';
    position: absolute;
    top: -40%;
    left: -40%;
    width: 180%;
    height: 180%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.05), transparent 65%);
    animation: glassSubtleDrift 9s ease-in-out infinite;
    pointer-events: none;
  }
  @keyframes glassSubtleDrift {
    0%,100% { transform: translate(0,0); }
    50% { transform: translate(35px,25px); }
  }
}

/* ==========================================
   🎵 PREMIUM RECORDING INTERFACE - LUXURY STUDIO
   ========================================== */

/* ==========================================
   🌌 NORDLYS AMBIANCE & MOTION SYSTEM
   ========================================== */

/* Aurora Hero Layout */
.hero-section {
  position: relative;
  padding: clamp(3rem, 6vw, 5rem) 1.25rem clamp(2.5rem,5vw,4rem);
  text-align: center;
  max-width: var(--container-3xl, 1400px);
  margin: 0 auto var(--space-12, 3rem);
}

/* Mobile-First Responsive Breakpoints for Hero Section */
@media (max-width: 480px) {
  .hero-section {
    padding: 1.5rem 1rem 1.25rem; /* Significantly reduced from desktop */
    margin: 0 auto 1.5rem;
  }
  
  .hero-title {
    font-size: 1.75rem; /* Smaller but readable */
    margin-bottom: 0.75rem;
  }
  
  .hero-subtitle {
    font-size: 0.95rem;
    margin: 0.5rem auto 1rem;
  }
  
  .hero-stats-grid {
    gap: 0.75rem;
    margin-top: 1.25rem;
  }
  
  .hero-stat {
    padding: 0.75rem 0.85rem;
  }
  
  .hero-stat .stat-number {
    font-size: 1.5rem;
  }
  
  .hero-actions {
    gap: 0.5rem;
    margin-top: 1rem;
  }
  
  /* Hide aurora orbs on mobile to save resources */
  .aurora-orb {
    display: none;
  }
}

@media (max-width: 380px) {
  .hero-section {
    padding: 1.25rem 0.75rem 1rem; /* Ultra-compact for small phones */
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .hero-subtitle {
    font-size: 0.875rem;
  }
  
  .hero-stat .stat-number {
    font-size: 1.25rem;
  }
}

.hero-section .hero-inner { position: relative; z-index: 2; }

/* Aurora Orbs */
.aurora-orb {
  position: absolute;
  width: 38rem; height: 38rem;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .55;
  pointer-events: none;
  mix-blend-mode: plus-lighter;
}
.aurora-orb--primary { 
  background: radial-gradient(circle at 40% 40%, hsla(265,100%,70%,0.55) 0%, hsla(265,100%,60%,0.25) 35%, transparent 70%);
  top: -12rem; left: -10rem; 
}
.aurora-orb--secondary { 
  background: radial-gradient(circle at 60% 60%, hsla(231,95%,70%,0.45) 0%, hsla(231,80%,60%,0.22) 40%, transparent 75%);
  bottom: -10rem; right: -8rem; width: 44rem; height: 44rem; opacity: .5;
}

/* Motion Keyframes */
@keyframes float-subtle { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(40px,-30px,0) scale(1.07); } }
@keyframes glow-pulse { 0%,100% { filter: brightness(1); text-shadow: 0 0 0 rgba(255,255,255,0); } 50% { filter: brightness(1.15); text-shadow: 0 0 18px hsla(265,100%,70%,0.55); } }
@keyframes stagger-reveal { 0% { opacity:0; transform: translateY(18px) scale(.98); } 100% { opacity:1; transform: translateY(0) scale(1); } }

/* Animation Utilities */
.animate-float-subtle { animation: float-subtle 18s ease-in-out infinite; }
.animate-glow-pulse { animation: glow-pulse 3.6s ease-in-out infinite; }

/* Stagger container: apply to direct children */
.animate-stagger-reveal > * { opacity: 0; animation: stagger-reveal .9s cubic-bezier(.19,1,.22,1) forwards; }
.animate-stagger-reveal > *:nth-child(1) { animation-delay: .05s; }
.animate-stagger-reveal > *:nth-child(2) { animation-delay: .15s; }
.animate-stagger-reveal > *:nth-child(3) { animation-delay: .30s; }
.animate-stagger-reveal > *:nth-child(4) { animation-delay: .45s; }
.animate-stagger-reveal > *:nth-child(5) { animation-delay: .60s; }
.animate-stagger-reveal > *:nth-child(6) { animation-delay: .75s; }
.animate-stagger-reveal > *:nth-child(7) { animation-delay: .90s; }
.animate-stagger-reveal > *:nth-child(8) { animation-delay: 1.05s; }

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
  .animate-float-subtle,
  .animate-glow-pulse { animation: none !important; }
  .animate-stagger-reveal > * { animation: none !important; opacity: 1 !important; transform: none !important; }
  .aurora-orb { display: none; }
}

/* Hero Headings Styling (light enhancement) */
.hero-title { font-size: clamp(2.5rem, 6vw, 3.75rem); font-weight: 700; letter-spacing: -0.02em; background: linear-gradient(90deg, var(--color-brand-primary), var(--color-brand-secondary)); background-clip: text; -webkit-background-clip: text; color: transparent; }
.hero-subtitle { max-width: 54ch; margin: 1rem auto 2rem; font-size: clamp(1.05rem, 1.4vw, 1.35rem); color: var(--text-secondary, #aaa); }
.hero-stats-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 1.25rem; margin-top: 2.25rem; }
.hero-stat { padding: 1.1rem 1.25rem; border-radius: var(--radius-xl); background: rgba(255,255,255,0.03); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); border: 1px solid rgba(255,255,255,0.06); position: relative; overflow: hidden; }
.hero-stat .stat-number { display: block; font-size: clamp(1.75rem,3.2vw,2.5rem); font-weight: 600; line-height: 1; margin-bottom: .35rem; letter-spacing: -0.01em; }
.hero-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }


/* Ultra-Premium Recording Studio Container */
.recording-studio {
  background: 
    var(--gradient-luxury),
    var(--gradient-premium-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--color-border-glass);
  border-radius: var(--radius-3xl);
  padding: var(--space-16);
  box-shadow: var(--shadow-luxury);
  margin: var(--space-12) auto;
  max-width: var(--container-2xl);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-slower) cubic-bezier(0.4, 0, 0.2, 1);
}

.recording-studio:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 40px 80px -12px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
}

.recording-studio::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-brand-primary), var(--color-brand-secondary), var(--color-brand-accent));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Mobile-First Responsive Breakpoints for Recording Studio */
@media (max-width: 480px) {
  .recording-studio {
    padding: 0.75rem; /* Aggressively reduced for mobile screens */
    margin: 0.75rem 0.5rem;
    border-radius: 0.75rem;
    /* Simplified background for performance */
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    /* Remove unnecessary shadows on mobile */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .recording-studio:hover {
    transform: none; /* Disable hover effects on mobile */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Keep consistent shadow */
  }
  
  .recording-studio::before {
    height: 2px; /* Thinner accent line */
  }
}

@media (max-width: 380px) {
  .recording-studio {
    padding: 0.5rem; /* Ultra-minimal padding for small phones */
    margin: 0.5rem 0.25rem;
    border-radius: 0.5rem;
    /* Even lighter backdrop for performance */
    backdrop-filter: blur(6px) saturate(110%);
    -webkit-backdrop-filter: blur(6px) saturate(110%);
  }
}

/* 🎯 ULTRA-PREMIUM RECORDING BUTTON - Luxury Centerpiece */
.record-button {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-full);
  border: none;
  background: 
    var(--color-brand-gradient),
    var(--color-surface-glass);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  color: var(--color-text-inverse);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-xl);
  cursor: pointer;
  transition: all var(--transition-slower) cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow-luxury);
  margin: var(--space-12) auto;
  overflow: hidden;
  isolation: isolate;
}

.record-button::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-full);
  background: var(--color-brand-gradient);
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.record-button::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
  pointer-events: none;
}

.record-button:hover {
  transform: scale(1.08) translateY(-2px);
  background: var(--color-brand-gradient-hover);
  box-shadow: 
    0 50px 100px -12px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.15),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.3);
}

.record-button:hover::before {
  opacity: 1;
}

.record-button:focus {
  outline: none;
  box-shadow: var(--shadow-focus), var(--shadow-luxury);
}

.record-button:active {
  transform: scale(1.02) translateY(-1px);
  transition-duration: 50ms;
}

/* 🎵 Premium Recording States */
.record-button.recording {
  background: var(--color-error-gradient);
  animation: luxury-pulse-record 2s infinite;
  box-shadow: 
    var(--shadow-luxury),
    0 0 30px rgba(220, 38, 38, 0.4);
}

.record-button.paused {
  background: var(--color-warning-gradient);
  box-shadow: 
    var(--shadow-luxury),
    0 0 30px rgba(217, 119, 6, 0.4);
}

.record-button.complete {
  background: var(--color-success-gradient);
  box-shadow: 
    var(--shadow-luxury),
    0 0 30px rgba(5, 150, 105, 0.4);
}

@keyframes luxury-pulse-record {
  0%, 100% { 
    box-shadow: 
      var(--shadow-luxury),
      0 0 0 0 rgba(220, 38, 38, 0.4);
  }
  50% { 
    box-shadow: 
      var(--shadow-luxury),
      0 0 0 25px rgba(220, 38, 38, 0);
  }
}

@keyframes pulse-record {
  0%, 100% { 
    box-shadow: var(--shadow-lg), 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% { 
    box-shadow: var(--shadow-2xl), 0 0 0 20px rgba(239, 68, 68, 0);
  }
}

/* Recording Progress Indicator */
.recording-progress {
  width: 100%;
  height: 8px;
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: var(--space-6) 0;
}

.recording-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-brand-primary), var(--color-brand-secondary));
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
  position: relative;
}

.recording-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ==========================================
   FORM COMPONENTS - PROFESSIONAL STYLING
   ========================================== */

/* Input Field Groups */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
  line-height: var(--line-height-tight);
}

.form-label.required::after {
  content: ' *';
  color: var(--color-error);
}

/* Professional Input Fields */
.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  background: var(--color-surface-primary);
  color: var(--color-text-primary);
  font-size: var(--font-size-base);
  font-family: inherit;
  line-height: var(--line-height-normal);
  transition: var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: var(--shadow-focus);
}

.form-input:invalid {
  border-color: var(--color-error);
}

.form-input::placeholder {
  color: var(--color-text-tertiary);
}

/* Select Dropdowns */
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-position: right var(--space-3) center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: var(--space-10);
}

/* ==========================================
   BUTTON SYSTEM - COMPREHENSIVE VARIANTS
   ========================================== */

/* 🎯 NORDLYS BUTTON SYSTEM - Fully Compliant */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius-pill);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
  line-height: var(--line-height-tight);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-base) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  
  /* Default to primary variant with gradient */
  background: var(--gradient-button);
  color: var(--text-inverse);
  box-shadow: var(--shadow-button);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-button-hover);
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* 💎 Nordlys Primary Button - Luminous Gradient Pill (Default) */
.btn-primary, .bg-gradient-button {
  background: var(--gradient-button);
  color: var(--text-inverse);
  box-shadow: var(--shadow-button);
  font-weight: var(--font-weight-semibold);
}

.btn-primary:hover, .bg-gradient-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-button-hover);
  filter: brightness(1.05);
}

.btn-primary:active, .bg-gradient-button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

/* 🤍 Nordlys Secondary Button */
.btn-secondary {
  background: var(--surface-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--surface-tertiary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

/* 💚 Nordlys Success Button */
.btn-success {
  background: var(--gradient-success);
  color: var(--text-inverse);
  box-shadow: var(--shadow-md);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  filter: brightness(1.1);
}

/* 🔴 Nordlys Danger Button */
.btn-danger {
  background: var(--gradient-error);
  color: var(--text-inverse);
  box-shadow: var(--shadow-md);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  filter: brightness(1.1);
}

/* Button Sizes - Nordlys Scale */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
}

.btn-xl {
  padding: var(--space-5) var(--space-10);
  font-size: var(--font-size-xl);
}

/* ==========================================
   CARD COMPONENTS - PROFESSIONAL LAYOUTS
   ========================================== */

/* 🎯 NORDLYS CARD SYSTEM - Standard Opaque Surface */
.card {
  background: var(--surface-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all var(--transition-base) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  /* Ensure opaque surface, not premium glow */
  backdrop-filter: none;
}

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

.card-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--border);
  background: var(--surface-secondary);
}

.card-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin: 0;
  line-height: var(--line-height-tight);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin: var(--space-1) 0 0 0;
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-4) var(--space-6);
  background: var(--surface-secondary);
  border-top: 1px solid var(--border);
}

/* ==========================================
   NAVIGATION COMPONENTS
   ========================================== */

/* 🏛️ ULTRA-PREMIUM HEADER */
.header {
  background: var(--color-surface-glass);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border-bottom: 1px solid var(--color-border-glass);
  box-shadow: 
    var(--shadow-glass),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  transition: all var(--transition-base);
}

.header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-luxury);
  opacity: 0.3;
  z-index: -1;
}

.header-content {
  max-width: var(--container-7xl);
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-brand-primary);
  text-decoration: none;
}

.header-nav {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}

.header-nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: var(--transition-fast);
}

.header-nav a:hover {
  color: var(--color-brand-primary);
}

.header-nav a.active {
  color: var(--color-brand-primary);
  font-weight: var(--font-weight-semibold);
}

/* ==========================================
   STATUS AND FEEDBACK COMPONENTS
   ========================================== */

/* Alert System */
.alert {
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid;
  margin: var(--space-4) 0;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.alert-success {
  background: var(--color-success-light);
  border-color: var(--color-success);
  color: #047857;
}

.alert-warning {
  background: var(--color-warning-light);
  border-color: var(--color-warning);
  color: #92400e;
}

.alert-error {
  background: var(--color-error-light);
  border-color: var(--color-error);
  color: #991b1b;
}

.alert-info {
  background: var(--color-info-light);
  border-color: var(--color-info);
  color: #1e40af;
}

/* 🌟 ULTRA-PREMIUM LOADING SPINNER */
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid transparent;
  border-radius: var(--radius-full);
  background: 
    conic-gradient(from 0deg, transparent, var(--color-brand-primary)),
    var(--color-surface-glass);
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  animation: luxury-spin 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  margin: var(--space-6) auto;
  position: relative;
}

.loading-spinner::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: var(--radius-full);
  background: var(--color-bg-primary);
  backdrop-filter: blur(8px);
}

.loading-spinner::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, var(--color-brand-primary) 2px, transparent 2px);
  animation: luxury-pulse 2s ease-in-out infinite;
}

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

@keyframes luxury-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

/* ==========================================
   ADMIN DASHBOARD COMPONENTS
   ========================================== */

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
  margin: var(--space-8) 0;
}

/* Stats Card */
.stats-card {
  background: linear-gradient(135deg, var(--color-surface-primary), var(--color-bg-secondary));
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.stats-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-brand-primary), var(--color-brand-secondary));
}

.stats-number {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-brand-primary);
  line-height: var(--line-height-none);
  margin: 0;
}

.stats-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  margin: var(--space-2) 0 0 0;
}

/* ==========================================
   TABLE COMPONENTS
   ========================================== */

.table-container {
  background: var(--color-surface-primary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table th {
  background: var(--color-bg-secondary);
  padding: var(--space-4) var(--space-6);
  text-align: left;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  border-bottom: 2px solid var(--color-border-default);
}

.table td {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
}

.table tbody tr:hover {
  background: var(--color-bg-secondary);
}

/* ==========================================
   RESPONSIVE UTILITIES
   ========================================== */

/* Mobile First Breakpoints */
@media (max-width: 640px) {
  .recording-studio {
    padding: var(--space-6);
    margin: var(--space-4) var(--space-4);
  }
  
  .record-button {
    width: 100px;
    height: 100px;
    font-size: var(--font-size-base);
  }
  
  .header-content {
    padding: var(--space-3) var(--space-4);
  }
  
  .header-nav {
    gap: var(--space-4);
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .card-header,
  .card-body,
  .card-footer {
    padding: var(--space-4);
  }
  
  .table th,
  .table td {
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-xs);
  }
}

/* ==========================================
   ACCESSIBILITY ENHANCEMENTS
   ========================================== */

/* TAP TARGET UTILITY - Ensures minimum 44x44px touch target for WCAG compliance */
.tap-target {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Extend tap area without visual changes */
.tap-target::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
  /* Invisible but interactive */
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn {
    border-width: 3px;
  }
  
  .form-input:focus {
    border-width: 3px;
    border-color: var(--color-text-primary);
  }
  
  .card {
    border-width: 2px;
  }
}

/* Focus visible for keyboard navigation */
.btn:focus-visible,
.form-input:focus-visible,
.header-nav a:focus-visible {
  outline: 3px solid var(--color-brand-primary);
  outline-offset: 2px;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}