/* Apple Liquid Glass Design System - Theme Variables */
/* Studioaxis AI Platform - Dark/Light Mode Support */

:root {
  /* === DARK MODE (Default) === */
  --bg-base: #0a0a0c;
  --bg-gradient-start: rgba(99, 102, 241, 0.08);
  --bg-gradient-end: transparent;

  /* Glass Effects */
  --glass-bg: rgba(20, 20, 25, 0.6);
  --glass-bg-elevated: rgba(30, 30, 38, 0.7);
  --glass-bg-subtle: rgba(15, 15, 20, 0.4);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.1);
  --glass-shadow: rgba(0, 0, 0, 0.4);
  --glass-shadow-lg: rgba(0, 0, 0, 0.6);

  /* Champagne Glass Component Aliases (dark mode equivalents) */
  --glass-surface: rgba(20, 20, 25, 0.6);
  --glass-surface-elevated: rgba(30, 30, 38, 0.7);
  --glass-border-subtle: rgba(255, 255, 255, 0.05);
  --glass-inner-highlight: rgba(255, 255, 255, 0.1);
  --glass-grain-opacity: 0.02;
  --backdrop-filter: blur(60px) saturate(180%);
  --border-radius-panel: 16px;
  --shadow-warm-md: rgba(0, 0, 0, 0.3);
  --shadow-warm-lg: rgba(0, 0, 0, 0.4);
  --shadow-warm-xl: rgba(0, 0, 0, 0.5);

  /* Text Colors */
  --text-primary: rgba(255, 255, 255, 0.9);
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-tertiary: rgba(255, 255, 255, 0.4);
  --text-inverse: rgba(0, 0, 0, 0.9);

  /* Accent Colors - Cyan Theme */
  --accent-primary: #06b6d4;
  --accent-primary-hover: #22d3ee;
  --accent-glow: rgba(6, 182, 212, 0.3);
  --accent-glow-strong: rgba(6, 182, 212, 0.5);
  --accent-text: #8dd4f0;
  --accent-bg: rgba(6, 182, 212, 0.1);

  /* Status Colors */
  --status-success: #22c55e;
  --status-success-bg: rgba(34, 197, 94, 0.1);
  --status-warning: #f59e0b;
  --status-warning-bg: rgba(245, 158, 11, 0.1);
  --status-error: #ef4444;
  --status-error-bg: rgba(239, 68, 68, 0.1);

  /* Blur Effects */
  --backdrop-blur: blur(60px);
  --backdrop-blur-strong: blur(80px);
  --backdrop-blur-light: blur(40px);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Shadows */
  --shadow-sm: 0 2px 8px var(--glass-shadow);
  --shadow-md: 0 8px 32px var(--glass-shadow);
  --shadow-lg: 0 16px 48px var(--glass-shadow-lg);
  --shadow-glow: 0 0 20px var(--accent-glow);

  /* Z-Index Scale */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* === LIGHT MODE === */
[data-theme="light"] {
  --bg-base: #f5f5f7;
  --bg-gradient-start: rgba(99, 102, 241, 0.04);
  --bg-gradient-end: transparent;

  /* Glass Effects - Light */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-bg-elevated: rgba(255, 255, 255, 0.85);
  --glass-bg-subtle: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-border-hover: rgba(0, 0, 0, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.9);
  --glass-shadow: rgba(0, 0, 0, 0.1);
  --glass-shadow-lg: rgba(0, 0, 0, 0.15);

  /* Text Colors - Light (darkened for readability) */
  --text-primary: #1A1816;
  --text-secondary: #3D3632;
  --text-tertiary: #6B5D52;
  --text-inverse: rgba(255, 255, 255, 0.95);

  /* Accent Colors - Darker Cyan for Light Mode Contrast */
  --accent-primary: #0284c7;
  --accent-primary-hover: #0369a1;
  --accent-glow: rgba(2, 132, 199, 0.2);
  --accent-glow-strong: rgba(2, 132, 199, 0.35);
  --accent-text: #0369a1;
  --accent-bg: rgba(2, 132, 199, 0.08);

  /* Blur Effects - Light Mode (less blur needed) */
  --backdrop-blur: blur(40px);
  --backdrop-blur-strong: blur(60px);
  --backdrop-blur-light: blur(20px);
}

/* === BASE STYLES === */
html {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  transition: background-color var(--transition-base), color var(--transition-base);
  overflow: hidden;
}

/* Background with gradient and noise */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 30% 20%, var(--bg-gradient-start), var(--bg-gradient-end) 50%),
    radial-gradient(circle at 80% 80%, var(--bg-gradient-start), var(--bg-gradient-end) 40%);
  pointer-events: none;
  z-index: -1;
}

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  z-index: -1;
}

[data-theme="light"] body::after {
  opacity: 0.015;
}

#root {
  height: 100%;
}

/* === TYPOGRAPHY === */
.text-step {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.text-section {
  font-weight: 600;
  color: var(--accent-text);
}

.text-body {
  font-weight: 400;
  color: var(--text-primary);
}

.text-helper {
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* === SCROLLBAR STYLING === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--glass-border-hover);
}

/* === FOCUS STATES === */
*:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* === SELECTION === */
::selection {
  background: var(--accent-bg);
  color: var(--accent-text);
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === ANIMATIONS === */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--accent-glow);
  }
  50% {
    box-shadow: 0 0 20px 4px var(--accent-glow);
  }
}

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

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-shimmer {
  background: linear-gradient(
    90deg,
    var(--glass-bg) 25%,
    var(--glass-highlight) 50%,
    var(--glass-bg) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-fade-in {
  animation: fade-in var(--transition-slow) ease-out forwards;
}

.animate-scale-in {
  animation: scale-in var(--transition-slow) ease-out forwards;
}

/* === GLASS PANEL (Modal Backgrounds) === */
.glass-panel {
  background: rgba(15, 15, 20, 0.85);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 16px 64px rgba(0, 0, 0, 0.5),
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .glass-panel {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.92) 50%,
    rgba(255, 255, 255, 0.88) 100%
  );
  border: 1px solid rgba(180, 180, 180, 0.4);
  box-shadow:
    0 8px 32px rgba(100, 100, 100, 0.15),
    0 2px 8px rgba(100, 100, 100, 0.1),
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    inset 0 -1px 2px rgba(160, 160, 160, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* === LIGHT MODE GLASS CARD - CHAMPAGNE METAL FINISH === */
[data-theme="light"] .glass-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.88) 50%,
    rgba(255, 255, 255, 0.85) 100%
  );
  border: 1px solid rgba(180, 180, 180, 0.35);
  box-shadow:
    0 6px 24px rgba(100, 100, 100, 0.12),
    0 2px 6px rgba(100, 100, 100, 0.08),
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    inset 0 -1px 2px rgba(160, 160, 160, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="light"] .glass-card:hover {
  border-color: rgba(212, 152, 92, 0.4);
  box-shadow:
    0 8px 32px rgba(100, 100, 100, 0.16),
    0 3px 10px rgba(100, 100, 100, 0.1),
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    inset 0 -1px 2px rgba(160, 160, 160, 0.18);
  transform: translateY(-1px);
}

[data-theme="light"] .glass-card-elevated {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(255, 255, 255, 0.94) 50%,
    rgba(255, 255, 255, 0.90) 100%
  );
  border: 1px solid rgba(180, 180, 180, 0.4);
  box-shadow:
    0 12px 40px rgba(100, 100, 100, 0.18),
    0 4px 12px rgba(100, 100, 100, 0.12),
    inset 0 1px 3px rgba(255, 255, 255, 0.7),
    inset 0 -1px 3px rgba(160, 160, 160, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* === LIGHT MODE GLASS SIDEBAR - CHAMPAGNE METAL FINISH === */
[data-theme="light"] .glass-sidebar {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.92) 50%,
    rgba(255, 255, 255, 0.88) 100%
  );
  border-right: 1px solid rgba(180, 180, 180, 0.3);
  box-shadow:
    4px 0 16px rgba(100, 100, 100, 0.1),
    inset -1px 0 2px rgba(255, 255, 255, 0.4),
    inset 1px 0 2px rgba(160, 160, 160, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* === GLASS CARD UTILITY CLASSES === */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 8px 32px var(--glass-shadow),
    0 2px 8px var(--glass-shadow),
    inset 0 1px 0 var(--glass-highlight);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.glass-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow:
    0 12px 40px var(--glass-shadow-lg),
    0 4px 12px var(--glass-shadow),
    inset 0 1px 0 var(--glass-highlight);
  transform: translateY(-2px);
}

.glass-card-elevated {
  background: var(--glass-bg-elevated);
  backdrop-filter: blur(80px);
  -webkit-backdrop-filter: blur(80px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 16px 48px var(--glass-shadow-lg),
    0 4px 16px var(--glass-shadow),
    inset 0 1px 0 var(--glass-highlight);
}

/* === GLASS SIDEBAR === */
.glass-sidebar {
  background: var(--glass-bg);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  border-right: 1px solid var(--glass-border);
  box-shadow:
    4px 0 24px var(--glass-shadow),
    inset -1px 0 0 var(--glass-highlight);
}

/* === GLASS UPLOAD ZONE === */
/* Natural linen fabric texture - crystal clear with minimal overlay */
.glass-upload {
  position: relative;
  background: url('/linen-fabric.jpg');
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-top-color: rgba(255, 255, 255, 0.7);
  border-left-color: rgba(255, 255, 255, 0.65);
  border-radius: 16px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all var(--transition-base);
}

.glass-upload:hover {
  background: url('/linen-fabric.jpg');
  background-size: cover;
  background-position: center;
  border-color: rgba(255, 255, 255, 0.65);
  border-top-color: rgba(255, 255, 255, 0.85);
  border-left-color: rgba(255, 255, 255, 0.8);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* === PRIMARY BUTTON WITH GRADIENT (Dark Mode) === */
.btn-primary-glow {
  background: linear-gradient(135deg, var(--accent-primary), color-mix(in srgb, var(--accent-primary) 80%, #6366f1));
  color: white;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  padding: 12px 24px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow:
    0 4px 16px var(--accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn-primary-glow:hover {
  box-shadow:
    0 8px 32px var(--accent-glow-strong),
    0 0 20px var(--accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-primary-glow:active {
  transform: translateY(0);
  box-shadow:
    0 2px 8px var(--accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

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

/* ═══════════════════════════════════════════════════════════════════════════════
   FLAT MARBLE LIQUID GLASS BUTTON (Light Mode)
   Thick, substantial glass with warm champagne tint
   ═══════════════════════════════════════════════════════════════════════════════ */

[data-theme="light"] .btn-primary-glow {
  position: relative;
  background:
    linear-gradient(
      165deg,
      rgba(255, 252, 248, 0.98) 0%,
      rgba(255, 250, 242, 0.95) 25%,
      rgba(252, 245, 235, 0.92) 50%,
      rgba(250, 242, 230, 0.90) 75%,
      rgba(252, 248, 240, 0.94) 100%
    );
  color: #3D3632;
  border: none;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    /* Outer warm glow - marble depth */
    0 8px 32px rgba(232, 168, 80, 0.18),
    0 4px 16px rgba(200, 150, 100, 0.12),
    0 2px 8px rgba(180, 140, 100, 0.08),
    /* Inner glass edge highlight */
    inset 0 2px 0 rgba(255, 255, 255, 1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    /* Bottom glass thickness shadow */
    inset 0 -3px 8px rgba(212, 180, 140, 0.15),
    inset 0 -1px 4px rgba(200, 160, 120, 0.10),
    /* Side depth for thickness */
    inset 2px 0 6px rgba(255, 255, 255, 0.5),
    inset -2px 0 6px rgba(200, 170, 140, 0.12),
    /* Center glow */
    inset 0 0 24px rgba(255, 252, 245, 0.5);
  filter: none;
}

/* Glaze reflection overlay for light mode */
[data-theme="light"] .btn-primary-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.5) 12%,
      rgba(255, 255, 255, 0.15) 35%,
      transparent 50%,
      transparent 70%,
      rgba(255, 255, 255, 0.08) 90%,
      rgba(255, 255, 255, 0.2) 100%
    );
  pointer-events: none;
  z-index: 1;
}

/* Marble grain texture */
[data-theme="light"] .btn-primary-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.025;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 2;
}

[data-theme="light"] .btn-primary-glow:hover {
  transform: translateY(-2px);
  filter: none;
  box-shadow:
    /* Enhanced warm outer glow */
    0 14px 44px rgba(232, 168, 80, 0.24),
    0 8px 28px rgba(200, 150, 100, 0.18),
    0 4px 14px rgba(180, 140, 100, 0.12),
    /* Brighter inner highlights */
    inset 0 2px 0 rgba(255, 255, 255, 1),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    /* Enhanced bottom shadow */
    inset 0 -4px 12px rgba(232, 200, 160, 0.18),
    inset 0 -2px 6px rgba(220, 180, 140, 0.12),
    /* Side depth */
    inset 3px 0 10px rgba(255, 255, 255, 0.7),
    inset -3px 0 10px rgba(220, 190, 160, 0.15),
    /* Bright center glow */
    inset 0 0 36px rgba(255, 252, 245, 0.6);
}

[data-theme="light"] .btn-primary-glow:active {
  transform: translateY(0);
  box-shadow:
    0 4px 16px rgba(200, 150, 100, 0.15),
    0 2px 8px rgba(180, 140, 100, 0.10),
    inset 0 3px 10px rgba(150, 150, 150, 0.15),
    inset 0 1px 4px rgba(160, 130, 100, 0.10),
    inset 0 -1px 0 rgba(255, 255, 255, 0.8),
    inset 0 0 18px rgba(255, 252, 245, 0.35);
}

/* === GLASS INPUT === */
.glass-input {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 10px 14px;
  transition: all var(--transition-base);
}

.glass-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

/* === LIGHT MODE GLASS INPUT - CHAMPAGNE METAL FINISH === */
[data-theme="light"] .glass-input {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.92) 100%
  );
  border: 1px solid rgba(180, 180, 180, 0.35);
  box-shadow:
    inset 0 1px 3px rgba(160, 160, 160, 0.15),
    inset 0 -1px 1px rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

[data-theme="light"] .glass-input:focus {
  border-color: rgba(212, 152, 92, 0.5);
  box-shadow:
    0 0 0 3px rgba(212, 152, 92, 0.15),
    inset 0 1px 3px rgba(160, 160, 160, 0.12),
    inset 0 -1px 1px rgba(255, 255, 255, 0.6);
}

/* === INPUT FIELD (Socials Settings Modal) === */
.input-field {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.9);
  padding: 10px 14px;
  transition: all var(--transition-base);
  font-size: 14px;
}

.input-field:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(0, 0, 0, 0.5);
}

.input-field::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Light mode input-field - Champagne Metal Finish */
[data-theme="light"] .input-field {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.92) 100%
  );
  border: 1px solid rgba(180, 180, 180, 0.35);
  color: #262626;
  box-shadow:
    inset 0 1px 3px rgba(160, 160, 160, 0.15),
    inset 0 -1px 1px rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .input-field:focus {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.95) 100%
  );
  border-color: rgba(212, 152, 92, 0.5);
  box-shadow:
    0 0 0 3px rgba(212, 152, 92, 0.15),
    inset 0 1px 3px rgba(160, 160, 160, 0.12);
}

[data-theme="light"] .input-field::placeholder {
  color: rgba(77, 64, 58, 0.5);
}

/* === GLASS SELECT === */
.glass-select {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 10px 14px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.glass-select:hover {
  border-color: var(--glass-border-hover);
}

.glass-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* === LIGHT MODE GLASS SELECT - CHAMPAGNE METAL FINISH === */
[data-theme="light"] .glass-select {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.92) 100%
  );
  border: 1px solid rgba(180, 180, 180, 0.35);
  box-shadow:
    inset 0 1px 3px rgba(160, 160, 160, 0.15),
    inset 0 -1px 1px rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

[data-theme="light"] .glass-select:hover {
  border-color: rgba(180, 180, 180, 0.5);
}

[data-theme="light"] .glass-select:focus {
  border-color: rgba(212, 152, 92, 0.5);
  box-shadow:
    0 0 0 3px rgba(212, 152, 92, 0.15),
    inset 0 1px 3px rgba(160, 160, 160, 0.12),
    inset 0 -1px 1px rgba(255, 255, 255, 0.6);
}

/* Light mode select dropdown fix - ensure proper background for native dropdowns */
[data-theme="light"] select,
[data-theme="light"] select option {
  background-color: #ffffff !important;
  color: rgba(0, 0, 0, 0.9) !important;
}

[data-theme="light"] select:focus {
  background-color: #ffffff !important;
}

/* ============================================
   LIGHT MODE COMPONENT OVERRIDES
   These fix hardcoded dark Tailwind classes
   ============================================ */

/* --- REMODEL PAGE FIXES --- */

/* Directive Textarea - Champagne Metal Finish */
[data-theme="light"] textarea {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.92) 100%
  ) !important;
  border: 1px solid rgba(180, 180, 180, 0.35) !important;
  color: #262626 !important;
  box-shadow:
    inset 0 1px 3px rgba(160, 160, 160, 0.15),
    inset 0 -1px 1px rgba(255, 255, 255, 0.5) !important;
}

[data-theme="light"] textarea::placeholder {
  color: rgba(0, 0, 0, 0.4) !important;
}

/* Model Selection Cards - Fix non-selected cards */
[data-theme="light"] .bg-\[var\(--glass-bg\)\] {
  background-color: rgba(255, 255, 255, 0.85) !important;
}

/* Execute Button - Ensure cyan gradient when enabled */
[data-theme="light"] button.bg-\[var\(--accent-primary\)\] {
  background: linear-gradient(135deg, #0284c7, #0ea5e9) !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.3) !important;
}

[data-theme="light"] button.bg-\[var\(--accent-primary\)\]:hover {
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.4) !important;
}

/* Disabled Execute Button - Light gray instead of dark */
[data-theme="light"] button:disabled.bg-\[var\(--glass-bg\)\] {
  background-color: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: rgba(0, 0, 0, 0.4) !important;
}

/* --- PURESPEC PAGE FIXES --- */

/* ApplianceTable - Dark terminal panel with glass border in light mode */
[data-theme="light"] .bg-zinc-950 {
  background-color: rgba(10, 10, 12, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

/* PureSpec middle section - ensure white/glass background */
[data-theme="light"] .bg-zinc-900\/50,
[data-theme="light"] .bg-zinc-900 {
  background-color: rgba(255, 255, 255, 0.7) !important;
}

/* Keep text readable in light-converted sections */
[data-theme="light"] .bg-zinc-900\/50 .text-zinc-400,
[data-theme="light"] .bg-zinc-900 .text-zinc-400,
[data-theme="light"] .bg-zinc-900\/50 .text-zinc-500,
[data-theme="light"] .bg-zinc-900 .text-zinc-500 {
  color: rgba(0, 0, 0, 0.6) !important;
}

[data-theme="light"] .bg-zinc-900\/50 .text-zinc-200,
[data-theme="light"] .bg-zinc-900 .text-zinc-200,
[data-theme="light"] .bg-zinc-900\/50 .text-zinc-300,
[data-theme="light"] .bg-zinc-900 .text-zinc-300 {
  color: rgba(0, 0, 0, 0.85) !important;
}

/* Fix borders that need to be visible in light mode */
[data-theme="light"] .border-zinc-800 {
  border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .border-zinc-800\/50 {
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Dashed border zones */
[data-theme="light"] .border-dashed.border-zinc-800 {
  border-color: rgba(0, 0, 0, 0.2) !important;
}

/* Empty state placeholder backgrounds */
[data-theme="light"] .bg-zinc-950\/50 {
  background-color: rgba(255, 255, 255, 0.5) !important;
}

/* --- GLASS BORDER ENHANCEMENT FOR TERMINAL PANELS --- */

/* Terminal panels get a subtle glass border glow in light mode */
[data-theme="light"] .terminal-panel {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 20px rgba(255, 255, 255, 0.1) !important;
}

/* Agent Terminal glass border */
[data-theme="light"] [class*="AgentTerminal"],
[data-theme="light"] [class*="terminal"] {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

/* --- GENERAL ZINC BACKGROUND FIXES --- */

/* Dark zinc backgrounds that should stay dark (for contrast) */
[data-theme="light"] .bg-black {
  /* Headers stay black for branding */
}

/* Medium zinc that should become light glass */
[data-theme="light"] .bg-zinc-800 {
  background-color: rgba(0, 0, 0, 0.08) !important;
}

/* Status badges - keep their themed colors */
[data-theme="light"] .bg-blue-900\/20 {
  background-color: rgba(59, 130, 246, 0.15) !important;
}

[data-theme="light"] .bg-emerald-900\/20 {
  background-color: rgba(16, 185, 129, 0.15) !important;
}

[data-theme="light"] .bg-red-900\/20 {
  background-color: rgba(239, 68, 68, 0.15) !important;
}

/* === TERMINAL / DARK PANEL (stays dark in both modes) === */
.terminal-panel {
  background: rgba(10, 10, 12, 0.95);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  color: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* === GLASS TABS === */
.glass-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  padding: 8px 16px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  transition: all var(--transition-base);
  cursor: pointer;
}

.glass-tab:hover {
  color: var(--text-primary);
  background: var(--glass-bg-subtle);
  border-color: var(--glass-border);
}

.glass-tab.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* === REFERENCE CARD === */
.reference-card {
  background: var(--glass-bg);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: all var(--transition-base);
  box-shadow: 0 4px 16px var(--glass-shadow);
}

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

.reference-card.selected {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-glow), 0 8px 24px var(--glass-shadow);
}

/* === SECTION HEADER === */
.section-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

/* === STATUS BADGE === */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.status-badge.success {
  background: var(--status-success-bg);
  border: 1px solid var(--status-success);
  color: var(--status-success);
}

.status-badge.warning {
  background: var(--status-warning-bg);
  border: 1px solid var(--status-warning);
  color: var(--status-warning);
}

.status-badge.error {
  background: var(--status-error-bg);
  border: 1px solid var(--status-error);
  color: var(--status-error);
}

/* === PRINT STYLES === */
@media print {
  /* Hide everything except printable area */
  body * {
    visibility: hidden;
  }

  #printable-area,
  #printable-area * {
    visibility: visible;
  }

  /* Position printable area as the main document */
  #printable-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  /* Hide non-printable elements */
  .no-print,
  .no-print * {
    display: none !important;
    visibility: hidden !important;
  }

  /* Clean paper styling - override dark theme backgrounds */
  #printable-area,
  #printable-area .bg-stone-900,
  #printable-area .bg-stone-800,
  #printable-area .bg-stone-950,
  #printable-area [class*="bg-gradient"],
  .print-document,
  .print-document .bg-stone-900,
  .print-document .bg-stone-800,
  .print-document .bg-stone-950,
  .print-document [class*="bg-gradient"] {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
  }

  /* Ensure text is black for clean printing */
  #printable-area .text-white,
  #printable-area .text-stone-100,
  #printable-area .text-stone-200,
  #printable-area .text-stone-300,
  .print-document .text-white,
  .print-document .text-stone-100,
  .print-document .text-stone-200,
  .print-document .text-stone-300 {
    color: #1c1917 !important;
  }

  /* Make editable fields appear as plain text (no hover/click styling) */
  #printable-area [title="Click to edit"],
  #printable-area .editable-field,
  .print-document [title="Click to edit"],
  .print-document .editable-field {
    cursor: default !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
  }

  #printable-area [title="Click to edit"]:hover,
  .print-document [title="Click to edit"]:hover {
    background: transparent !important;
  }

  /* Page break handling */
  .break-after-page {
    page-break-after: always;
    break-after: page;
  }

  .break-before-page {
    page-break-before: always;
    break-before: page;
  }

  /* Prevent orphans and widows */
  #printable-area p,
  #printable-area li,
  #printable-area tr,
  .print-document p,
  .print-document li,
  .print-document tr {
    orphans: 3;
    widows: 3;
  }

  /* Remove shadows and rounded corners for cleaner print */
  #printable-area .shadow-2xl,
  #printable-area .shadow-lg,
  #printable-area [class*="shadow"],
  .print-document .shadow-2xl,
  .print-document .shadow-lg,
  .print-document [class*="shadow"] {
    box-shadow: none !important;
  }

  #printable-area .rounded-lg,
  #printable-area .rounded-xl,
  #printable-area .rounded-2xl,
  .print-document .rounded-lg,
  .print-document .rounded-xl,
  .print-document .rounded-2xl {
    border-radius: 0 !important;
  }

  /* Keep borders visible but subtle */
  #printable-area .border,
  #printable-area [class*="border-"],
  .print-document .border,
  .print-document [class*="border-"] {
    border-color: #d6d3d1 !important;
  }

  /* Print margins */
  @page {
    margin: 0.5in;
    size: letter;
  }
}
