/**
 * ════════════════════════════════════════════════════════════════════════════════
 * VELLUNOX UNIFIED THEME - One Theme, All Pages
 * This is the ONLY theme. All pages MUST use this.
 * Future: Theme Builder will let users customize their own theme.
 * ════════════════════════════════════════════════════════════════════════════════
 */

:root {
  /* ═══════════════════════════════════════════════════════════════════════════
     CORE COLORS - DO NOT CHANGE
     These are the Vellunox brand colors
     ═══════════════════════════════════════════════════════════════════════════ */
  
  /* Background Colors */
  --vx-bg-primary: #0a0a0f;
  --vx-bg-secondary: #0f0f1a;
  --vx-bg-tertiary: #1a1a2e;
  --vx-bg-card: rgba(15, 15, 26, 0.9);
  --vx-bg-card-hover: rgba(26, 26, 46, 0.95);
  
  /* Accent Colors */
  --vx-accent-primary: #f97316;      /* Orange - Primary accent */
  --vx-accent-secondary: #06b6d4;    /* Cyan - Secondary accent */
  --vx-accent-tertiary: #8b5cf6;     /* Purple - Tertiary accent */
  --vx-accent-gradient: linear-gradient(135deg, #f97316, #ea580c);
  
  /* Text Colors */
  --vx-text-primary: #ffffff;
  --vx-text-secondary: rgba(255, 255, 255, 0.7);
  --vx-text-muted: rgba(255, 255, 255, 0.5);
  --vx-text-accent: #f97316;
  
  /* Border Colors */
  --vx-border-primary: rgba(249, 115, 22, 0.3);
  --vx-border-secondary: rgba(255, 255, 255, 0.1);
  --vx-border-hover: rgba(249, 115, 22, 0.6);
  
  /* Shadow */
  --vx-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --vx-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --vx-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --vx-shadow-glow: 0 0 30px rgba(249, 115, 22, 0.3);
  
  /* Status Colors */
  --vx-success: #22c55e;
  --vx-warning: #eab308;
  --vx-error: #ef4444;
  --vx-info: #06b6d4;
  
  /* Holiday Colors (temporary) */
  --vx-holiday-red: #dc2626;
  --vx-holiday-green: #16a34a;
  --vx-holiday-gold: #fbbf24;
  
  /* Spacing */
  --vx-space-xs: 0.25rem;
  --vx-space-sm: 0.5rem;
  --vx-space-md: 1rem;
  --vx-space-lg: 1.5rem;
  --vx-space-xl: 2rem;
  --vx-space-2xl: 3rem;
  
  /* Border Radius */
  --vx-radius-sm: 8px;
  --vx-radius-md: 12px;
  --vx-radius-lg: 16px;
  --vx-radius-xl: 24px;
  --vx-radius-full: 9999px;
  
  /* Typography */
  --vx-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --vx-font-mono: 'Fira Code', 'Monaco', monospace;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BASE STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--vx-font-family);
  background: linear-gradient(180deg, 
    var(--vx-bg-primary) 0%, 
    var(--vx-bg-secondary) 30%,
    var(--vx-bg-tertiary) 100%
  );
  background-attachment: fixed;
  color: var(--vx-text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--vx-text-primary);
}

h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--vx-text-primary), var(--vx-accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2rem;
  color: var(--vx-accent-secondary);
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
  color: var(--vx-accent-secondary);
}

p {
  color: var(--vx-text-secondary);
}

a {
  color: var(--vx-accent-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--vx-accent-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.vx-card {
  background: var(--vx-bg-card);
  border: 1px solid var(--vx-border-primary);
  border-radius: var(--vx-radius-lg);
  padding: var(--vx-space-lg);
  backdrop-filter: blur(10px);
  box-shadow: var(--vx-shadow-md);
  transition: all 0.3s ease;
}

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

.vx-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--vx-accent-secondary);
  margin-bottom: var(--vx-space-md);
  display: flex;
  align-items: center;
  gap: var(--vx-space-sm);
}

.vx-card-body {
  color: var(--vx-text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.vx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--vx-space-sm);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--vx-radius-full);
  font-family: var(--vx-font-family);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.vx-btn-primary {
  background: var(--vx-accent-gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4);
}

.vx-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(249, 115, 22, 0.5);
  filter: brightness(1.1);
}

.vx-btn-secondary {
  background: transparent;
  color: var(--vx-text-primary);
  border: 2px solid var(--vx-border-primary);
}

.vx-btn-secondary:hover {
  background: rgba(249, 115, 22, 0.1);
  border-color: var(--vx-accent-primary);
  color: var(--vx-accent-primary);
}

.vx-btn-success {
  background: linear-gradient(135deg, var(--vx-success), #16a34a);
  color: white;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.vx-btn-danger {
  background: linear-gradient(135deg, var(--vx-error), #dc2626);
  color: white;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.vx-btn-info {
  background: linear-gradient(135deg, var(--vx-accent-secondary), #0891b2);
  color: white;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
}

.vx-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   INPUTS
   ═══════════════════════════════════════════════════════════════════════════ */

.vx-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--vx-border-secondary);
  border-radius: var(--vx-radius-md);
  color: var(--vx-text-primary);
  font-family: var(--vx-font-family);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.vx-input:focus {
  outline: none;
  border-color: var(--vx-accent-primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   STATS / METRICS
   ═══════════════════════════════════════════════════════════════════════════ */

.vx-stat {
  text-align: center;
  padding: var(--vx-space-lg);
  background: var(--vx-bg-card);
  border: 1px solid var(--vx-border-secondary);
  border-radius: var(--vx-radius-md);
  transition: all 0.3s ease;
}

.vx-stat:hover {
  border-color: var(--vx-accent-primary);
  background: rgba(249, 115, 22, 0.05);
}

.vx-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--vx-accent-secondary);
  margin-bottom: var(--vx-space-xs);
}

.vx-stat-label {
  font-size: 0.875rem;
  color: var(--vx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */

.vx-nav {
  display: flex;
  align-items: center;
  padding: var(--vx-space-md) var(--vx-space-xl);
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--vx-border-secondary);
}

.vx-nav-brand {
  display: flex;
  align-items: center;
  gap: var(--vx-space-sm);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--vx-accent-primary);
}

.vx-nav-links {
  display: flex;
  gap: var(--vx-space-lg);
  margin-left: auto;
}

.vx-nav-link {
  color: var(--vx-text-secondary);
  font-weight: 500;
  padding: var(--vx-space-sm) var(--vx-space-md);
  border-radius: var(--vx-radius-sm);
  transition: all 0.3s ease;
}

.vx-nav-link:hover,
.vx-nav-link.active {
  color: var(--vx-accent-primary);
  background: rgba(249, 115, 22, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */

.vx-sidebar {
  width: 260px;
  background: var(--vx-bg-card);
  border-right: 1px solid var(--vx-border-secondary);
  padding: var(--vx-space-lg);
  min-height: 100vh;
}

.vx-sidebar-section {
  margin-bottom: var(--vx-space-xl);
}

.vx-sidebar-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vx-accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--vx-space-md);
}

.vx-sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--vx-space-sm);
  padding: var(--vx-space-sm) var(--vx-space-md);
  color: var(--vx-text-secondary);
  border-radius: var(--vx-radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: var(--vx-space-xs);
}

.vx-sidebar-item:hover,
.vx-sidebar-item.active {
  background: rgba(249, 115, 22, 0.1);
  color: var(--vx-accent-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BADGES / TAGS
   ═══════════════════════════════════════════════════════════════════════════ */

.vx-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--vx-radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vx-badge-primary {
  background: rgba(249, 115, 22, 0.2);
  color: var(--vx-accent-primary);
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.vx-badge-success {
  background: rgba(34, 197, 94, 0.2);
  color: var(--vx-success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.vx-badge-warning {
  background: rgba(234, 179, 8, 0.2);
  color: var(--vx-warning);
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.vx-badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: var(--vx-error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════ */

.vx-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.vx-modal {
  background: var(--vx-bg-tertiary);
  border: 1px solid var(--vx-border-primary);
  border-radius: var(--vx-radius-xl);
  padding: var(--vx-space-xl);
  max-width: 500px;
  width: 90%;
  box-shadow: var(--vx-shadow-lg);
}

.vx-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--vx-space-lg);
}

.vx-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--vx-accent-secondary);
}

.vx-modal-close {
  background: transparent;
  border: none;
  color: var(--vx-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.vx-modal-close:hover {
  color: var(--vx-accent-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════════════════ */

.vx-table {
  width: 100%;
  border-collapse: collapse;
}

.vx-table th,
.vx-table td {
  padding: var(--vx-space-md);
  text-align: left;
  border-bottom: 1px solid var(--vx-border-secondary);
}

.vx-table th {
  font-weight: 600;
  color: var(--vx-text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.vx-table tr:hover td {
  background: rgba(249, 115, 22, 0.05);
}

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATES
   ═══════════════════════════════════════════════════════════════════════════ */

.vx-empty {
  text-align: center;
  padding: var(--vx-space-2xl);
  color: var(--vx-text-muted);
}

.vx-empty-icon {
  font-size: 3rem;
  margin-bottom: var(--vx-space-md);
  opacity: 0.5;
}

.vx-empty-text {
  font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOADING
   ═══════════════════════════════════════════════════════════════════════════ */

.vx-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--vx-space-xl);
}

.vx-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--vx-border-secondary);
  border-top-color: var(--vx-accent-primary);
  border-radius: 50%;
  animation: vx-spin 1s linear infinite;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   GRID LAYOUTS
   ═══════════════════════════════════════════════════════════════════════════ */

.vx-grid {
  display: grid;
  gap: var(--vx-space-lg);
}

.vx-grid-2 { grid-template-columns: repeat(2, 1fr); }
.vx-grid-3 { grid-template-columns: repeat(3, 1fr); }
.vx-grid-4 { grid-template-columns: repeat(4, 1fr); }
.vx-grid-auto { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE - MOBILE FIRST - iPhone, Android, Tablet, Desktop
   ═══════════════════════════════════════════════════════════════════════════ */

/* Tablet and below (768px) */
@media (max-width: 768px) {
  .vx-grid-2,
  .vx-grid-3,
  .vx-grid-4 {
    grid-template-columns: 1fr;
  }
  
  .vx-nav {
    flex-wrap: wrap;
    padding: var(--vx-space-sm) var(--vx-space-md);
  }
  
  .vx-nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--vx-space-sm);
    margin-top: var(--vx-space-sm);
    width: 100%;
  }
  
  .vx-sidebar {
    width: 100%;
    min-height: auto;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--vx-space-sm);
    border-right: none;
    border-top: 1px solid var(--vx-border-secondary);
    display: flex;
    overflow-x: auto;
  }
  
  .vx-sidebar-section {
    display: flex;
    gap: var(--vx-space-sm);
    margin-bottom: 0;
  }
  
  .vx-sidebar-title {
    display: none;
  }
  
  .vx-sidebar-item {
    white-space: nowrap;
    margin-bottom: 0;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .vx-card {
    padding: var(--vx-space-md);
  }
  
  .vx-modal {
    max-width: 95%;
    padding: var(--vx-space-lg);
    margin: var(--vx-space-md);
  }
  
  .vx-table {
    font-size: 0.875rem;
  }
  
  .vx-table th,
  .vx-table td {
    padding: var(--vx-space-sm);
  }
  
  .vx-stat-value {
    font-size: 1.5rem;
  }
  
  .vx-btn {
    width: 100%;
    padding: 0.875rem 1rem;
  }
}

/* Mobile - Small phones (480px and below) */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  body {
    padding-bottom: 70px; /* Space for bottom nav */
  }
  
  h1 {
    font-size: 1.5rem;
    word-wrap: break-word;
  }
  
  h2 {
    font-size: 1.25rem;
  }
  
  h3 {
    font-size: 1.1rem;
  }
  
  .vx-card {
    padding: var(--vx-space-sm);
    border-radius: var(--vx-radius-md);
  }
  
  .vx-nav-brand {
    font-size: 1.25rem;
  }
  
  .vx-stat {
    padding: var(--vx-space-md);
  }
  
  .vx-stat-value {
    font-size: 1.25rem;
  }
  
  .vx-stat-label {
    font-size: 0.75rem;
  }
  
  .vx-modal {
    max-width: 100%;
    margin: 0;
    border-radius: var(--vx-radius-lg) var(--vx-radius-lg) 0 0;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .vx-input {
    padding: 0.75rem;
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
  
  .vx-empty {
    padding: var(--vx-space-lg);
  }
  
  .vx-empty-icon {
    font-size: 2rem;
  }
}

/* Touch-friendly targets */
@media (hover: none) and (pointer: coarse) {
  .vx-btn,
  .vx-nav-link,
  .vx-sidebar-item {
    min-height: 44px; /* Apple HIG minimum touch target */
    min-width: 44px;
  }
  
  .vx-card:hover {
    transform: none; /* Disable hover effects on touch */
  }
  
  .vx-btn-primary:hover {
    transform: none;
  }
}

/* Landscape mobile */
@media (max-height: 480px) and (orientation: landscape) {
  .vx-sidebar {
    height: auto;
    max-height: 60px;
  }
  
  body {
    padding-bottom: 60px;
  }
}

/* Large screens (1440px+) */
@media (min-width: 1440px) {
  :root {
    --vx-space-lg: 2rem;
    --vx-space-xl: 2.5rem;
    --vx-space-2xl: 4rem;
  }
  
  h1 {
    font-size: 3rem;
  }
  
  h2 {
    font-size: 2.5rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FLEX UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

.vx-flex { display: flex; }
.vx-flex-col { flex-direction: column; }
.vx-items-center { align-items: center; }
.vx-justify-center { justify-content: center; }
.vx-justify-between { justify-content: space-between; }
.vx-gap-sm { gap: var(--vx-space-sm); }
.vx-gap-md { gap: var(--vx-space-md); }
.vx-gap-lg { gap: var(--vx-space-lg); }

/* ═══════════════════════════════════════════════════════════════════════════
   SPACING UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

.vx-p-sm { padding: var(--vx-space-sm); }
.vx-p-md { padding: var(--vx-space-md); }
.vx-p-lg { padding: var(--vx-space-lg); }
.vx-p-xl { padding: var(--vx-space-xl); }

.vx-m-sm { margin: var(--vx-space-sm); }
.vx-m-md { margin: var(--vx-space-md); }
.vx-m-lg { margin: var(--vx-space-lg); }
.vx-m-xl { margin: var(--vx-space-xl); }

.vx-mb-sm { margin-bottom: var(--vx-space-sm); }
.vx-mb-md { margin-bottom: var(--vx-space-md); }
.vx-mb-lg { margin-bottom: var(--vx-space-lg); }
.vx-mb-xl { margin-bottom: var(--vx-space-xl); }

/* ═══════════════════════════════════════════════════════════════════════════
   TEXT UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

.vx-text-center { text-align: center; }
.vx-text-muted { color: var(--vx-text-muted); }
.vx-text-accent { color: var(--vx-accent-primary); }
.vx-text-cyan { color: var(--vx-accent-secondary); }
.vx-text-sm { font-size: 0.875rem; }
.vx-text-lg { font-size: 1.25rem; }
.vx-text-xl { font-size: 1.5rem; }
.vx-font-bold { font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLLBAR STYLING
   ═══════════════════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--vx-bg-primary);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--vx-accent-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SELECTION
   ═══════════════════════════════════════════════════════════════════════════ */

::selection {
  background: rgba(249, 115, 22, 0.3);
  color: var(--vx-text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOLIDAY SNOWFLAKES (Temporary - Remove after holidays)
   ═══════════════════════════════════════════════════════════════════════════ */

.vx-snowflakes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.vx-snowflake {
  position: absolute;
  color: rgba(255, 255, 255, 0.3);
  font-size: 1rem;
  animation: vx-fall linear infinite;
}

@keyframes vx-fall {
  0% {
    transform: translateY(-10vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0.3;
  }
}

