/**
 * ===================================================
 * SOPHIA STARS - MODERN DESIGN TOKENS v2026.1
 * ===================================================
 * 
 * Purpose: Single source of truth for all design variables
 * Load Order: Load FIRST before all other CSS files
 * 
 * This file replaces and consolidates variables from:
 * - unified-base.css
 * - common-styles.css  
 * - design-system.css
 * - admin-unified.css
 * 
 * Last Updated: January 4, 2026
 */

:root {
  /* ===================================================
     TYPOGRAPHY - REFINED & SHARP
     ================================================= */
  
  /* Font Families - Premium System Stack */
  --font-heading: 'Poppins', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', 'Roboto', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
  
  /* Font Sizes - Perfect Fourth Scale (1.333) with Optical Adjustments */
  --text-xs: 0.75rem;      /* 12px - Captions, labels */
  --text-sm: 0.875rem;     /* 14px - Secondary text */
  --text-base: 1rem;       /* 16px - Base reading size */
  --text-lg: 1.125rem;     /* 18px - Emphasized body */
  --text-xl: 1.333rem;     /* 21.33px - Large UI text */
  --text-2xl: 1.777rem;    /* 28.43px - Section headings */
  --text-3xl: 2.369rem;    /* 37.90px - Page titles */
  --text-4xl: 3.157rem;    /* 50.52px - Hero text */
  
  /* Font Weights - Expanded Range */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* Line Heights - Optimized for Readability */
  --leading-none: 1;
  --leading-tight: 1.25;     /* Headings */
  --leading-snug: 1.375;     /* UI elements */
  --leading-normal: 1.5;     /* Body text */
  --leading-relaxed: 1.625;  /* Reading content */
  --leading-loose: 2;        /* Spacious layouts */
  
  /* Letter Spacing - Refined */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;
  
  
  /* ===================================================
     COLOR SYSTEM - PREMIUM SOPHIA COLLEGE PALETTE
     ================================================= */
  
  /* PRIMARY NAVY - Refined & Professional */
  --navy-50: #f0f6fc;
  --navy-100: #d9e7f5;
  --navy-200: #bbdaf0;
  --navy-300: #9ac8ea;
  --navy-400: #77b3e2;
  --navy-500: #4f9cd9;
  --navy-600: #2b7fc7;
  --navy-700: #1a5fa6;    /* Primary brand - vibrant yet professional */
  --navy-800: #104780;
  --navy-900: #082f5a;
  
  /* MAROON ACCENT - Bold & Energetic */
  --maroon-50: #fff1f2;
  --maroon-100: #ffe4e6;
  --maroon-200: #fecdd3;
  --maroon-300: #fda4af;
  --maroon-400: #fb7185;
  --maroon-500: #f43f5e;
  --maroon-600: #e11d48;
  --maroon-700: #be123c;  /* Primary accent - bold & clear */
  --maroon-800: #9f1239;
  --maroon-900: #881337;
  
  /* SUCCESS - Vibrant Green */
  --success-50: #ecfdf5;
  --success-100: #d1fae5;
  --success-200: #a7f3d0;
  --success-300: #6ee7b7;
  --success-400: #34d399;
  --success-500: #10b981;   /* Primary success - bright & positive */
  --success-600: #059669;
  --success-700: #047857;
  --success-800: #065f46;
  --success-900: #064e3b;
  
  /* WARNING - Amber (warmer than yellow) */
  --warning-50: #fffbeb;
  --warning-100: #fef3c7;
  --warning-200: #fde68a;
  --warning-300: #fcd34d;
  --warning-400: #fbbf24;
  --warning-500: #f59e0b;   /* Primary warning */
  --warning-600: #d97706;
  --warning-700: #b45309;
  --warning-800: #92400e;
  --warning-900: #78350f;
  
  /* DANGER - Vibrant Red */
  --danger-50: #fef2f2;
  --danger-100: #fee2e2;
  --danger-200: #fecaca;
  --danger-300: #fca5a5;
  --danger-400: #f87171;
  --danger-500: #ef4444;    /* Primary danger */
  --danger-600: #dc2626;
  --danger-700: #b91c1c;
  --danger-800: #991b1b;
  --danger-900: #7f1d1d;
  
  /* INFO - Modern Blue */
  --info-50: #eff6ff;
  --info-100: #dbeafe;
  --info-200: #bfdbfe;
  --info-300: #93c5fd;
  --info-400: #60a5fa;
  --info-500: #3b82f6;      /* Primary info */
  --info-600: #2563eb;
  --info-700: #1d4ed8;
  --info-800: #1e40af;
  --info-900: #1e3a8a;
  
  /* FRANCISCAN GOLD - Warm accent for identity/highlight moments only.
     Not a brand colour replacement: navy/maroon remain primary/accent,
     success/warning/danger/info remain the semantic state colours.
     Use sparingly: active-state accents, recognition/celebration UI. */
  --gold-50: #fdf8ec;
  --gold-100: #faedc7;
  --gold-200: #f5db94;
  --gold-300: #efc55c;
  --gold-400: #e3ac34;
  --gold-500: #c9941f;
  --gold-600: #a8761a;   /* Primary warm accent - 3:1 on white (UI/border use, not body text) */
  --gold-700: #855c16;   /* Use for gold text/icons needing 4.5:1 AA on white */
  --gold-800: #6b4a16;
  --gold-900: #4a3210;

  /* GRAY SCALE - Neutral Palette */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  
  /* ===================================================
     SEMANTIC COLOR ALIASES
     ================================================= */
  
  /* Brand Colors */
  --color-primary: var(--navy-700);
  --color-primary-hover: var(--navy-800);
  --color-primary-active: var(--navy-900);
  --color-primary-light: var(--navy-50);
  
  --color-accent: var(--maroon-700);
  --color-accent-hover: var(--maroon-800);
  --color-accent-active: var(--maroon-900);
  --color-accent-light: var(--maroon-50);

  /* Warm accent (Franciscan identity) - sparing use only, see note above */
  --color-accent-warm: var(--gold-600);
  --color-accent-warm-text: var(--gold-700);
  --color-accent-warm-bg: var(--gold-50);
  --color-accent-warm-border: var(--gold-200);
  
  /* Status Colors */
  --color-success: var(--success-500);
  --color-success-bg: var(--success-50);
  --color-success-border: var(--success-200);
  
  --color-warning: var(--warning-500);
  --color-warning-bg: var(--warning-50);
  --color-warning-border: var(--warning-200);
  
  --color-danger: var(--danger-500);
  --color-danger-bg: var(--danger-50);
  --color-danger-border: var(--danger-200);
  
  --color-info: var(--info-500);
  --color-info-bg: var(--info-50);
  --color-info-border: var(--info-200);
  
  /* Background Colors */
  --color-bg: #ffffff;
  --color-bg-subtle: var(--gray-50);
  --color-bg-muted: var(--gray-100);
  --color-bg-hover: var(--gray-100);
  --color-bg-active: var(--gray-200);
  --color-bg-overlay: rgba(0, 0, 0, 0.5);
  
  /* Text Colors */
  --color-text: var(--gray-900);
  --color-text-secondary: var(--gray-600);
  --color-text-tertiary: var(--gray-500);
  --color-text-muted: var(--gray-400);
  --color-text-disabled: var(--gray-300);
  --color-text-inverse: #ffffff;
  
  /* Border Colors */
  --color-border: var(--gray-200);
  --color-border-strong: var(--gray-300);
  --color-border-hover: var(--gray-400);
  --color-border-focus: var(--navy-700);
  
  /* Focus State */
  --color-focus: var(--navy-700);
  --color-focus-ring: rgba(51, 78, 104, 0.15);
  
  
  /* ===================================================
     SPACING SYSTEM - 8px Base Grid
     ================================================= */
  
  --space-0: 0;
  --space-px: 1px;
  --space-0\.5: 0.125rem;   /* 2px */
  --space-1: 0.25rem;       /* 4px */
  --space-1\.5: 0.375rem;   /* 6px */
  --space-2: 0.5rem;        /* 8px */
  --space-2\.5: 0.625rem;   /* 10px */
  --space-3: 0.75rem;       /* 12px */
  --space-4: 1rem;          /* 16px - Base unit */
  --space-5: 1.25rem;       /* 20px */
  --space-6: 1.5rem;        /* 24px */
  --space-7: 1.75rem;       /* 28px */
  --space-8: 2rem;          /* 32px */
  --space-9: 2.25rem;       /* 36px */
  --space-10: 2.5rem;       /* 40px */
  --space-11: 2.75rem;      /* 44px */
  --space-12: 3rem;         /* 48px */
  --space-14: 3.5rem;       /* 56px */
  --space-16: 4rem;         /* 64px */
  --space-20: 5rem;         /* 80px */
  --space-24: 6rem;         /* 96px */
  --space-28: 7rem;         /* 112px */
  --space-32: 8rem;         /* 128px */
  
  /* Legacy Aliases (for backwards compatibility) */
  --spacing-xs: var(--space-1);
  --spacing-sm: var(--space-2);
  --spacing-md: var(--space-4);
  --spacing-lg: var(--space-6);
  --spacing-xl: var(--space-8);
  --spacing-2xl: var(--space-12);
  --spacing-3xl: var(--space-16);
  
  
  /* ===================================================
     SHADOWS - Layered Elevation System
     ================================================= */
  
  /* Subtle Elevation */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 
               0 1px 2px rgba(0, 0, 0, 0.03);
  
  /* Medium Elevation */
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 
               0 2px 4px -1px rgba(0, 0, 0, 0.04);
  
  /* High Elevation */
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 
               0 4px 6px -2px rgba(0, 0, 0, 0.04);
  
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 
               0 10px 10px -5px rgba(0, 0, 0, 0.03);
  
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
  
  /* Inner Shadow */
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  
  /* No Shadow */
  --shadow-none: none;
  
  /* Colored Shadows - For Brand Elements */
  --shadow-navy: 0 10px 25px -5px rgba(51, 78, 104, 0.15);
  --shadow-maroon: 0 10px 25px -5px rgba(185, 28, 28, 0.15);
  
  /* Focus Ring */
  --focus-ring: 0 0 0 3px var(--color-focus-ring);
  --focus-ring-offset: 0 0 0 2px white, 0 0 0 4px var(--color-focus-ring);
  
  
  /* ===================================================
     BORDER RADIUS - Modern Rounding
     ================================================= */
  
  --radius-none: 0;
  --radius-sm: 0.25rem;     /* 4px */
  --radius-md: 0.5rem;      /* 8px - Base radius */
  --radius-lg: 0.75rem;     /* 12px */
  --radius-xl: 1rem;        /* 16px */
  --radius-2xl: 1.5rem;     /* 24px */
  --radius-3xl: 2rem;       /* 32px */
  --radius-full: 9999px;    /* Pills/Circles */
  
  /* Legacy Aliases */
  --border-radius: var(--radius-md);
  --border-radius-sm: var(--radius-sm);
  --border-radius-lg: var(--radius-lg);
  --border-radius-xl: var(--radius-xl);
  --border-radius-full: var(--radius-full);
  
  
  /* ===================================================
     TRANSITIONS & ANIMATIONS
     ================================================= */
  
  /* Duration */
  --duration-instant: 0ms;
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 350ms;
  --duration-slower: 500ms;
  
  /* Easing Functions */
  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Common Transitions */
  --transition-fast: all var(--duration-fast) var(--ease-out);
  --transition-normal: all var(--duration-normal) var(--ease-in-out);
  --transition-slow: all var(--duration-slow) var(--ease-in-out);
  
  /* Property-Specific Transitions */
  --transition-colors: color var(--duration-fast) var(--ease-out),
                       background-color var(--duration-fast) var(--ease-out),
                       border-color var(--duration-fast) var(--ease-out);
  
  --transition-transform: transform var(--duration-fast) var(--ease-out);
  --transition-opacity: opacity var(--duration-fast) var(--ease-out);
  
  
  /* ===================================================
     Z-INDEX SCALE
     ================================================= */
  
  --z-0: 0;
  --z-10: 10;
  --z-20: 20;
  --z-30: 30;
  --z-40: 40;
  --z-50: 50;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-notification: 1080;
  --z-max: 9999;
  
  
  /* ===================================================
     LAYOUT
     ================================================= */
  
  /* Container Max Widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;
  
  /* Sidebar */
  --sidebar-width: 240px;
  --sidebar-width-collapsed: 64px;
  
  /* Header/Nav */
  --header-height: 64px;
  --nav-height: 56px;
  
  /* Content Width */
  --content-max-width: 1280px;
  --reading-max-width: 768px;
  
  
  /* ===================================================
     BREAKPOINTS (for reference in JS)
     ================================================= */
  
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
  
  
  /* ===================================================
     MISC
     ================================================= */
  
  /* Opacity Scale */
  --opacity-0: 0;
  --opacity-5: 0.05;
  --opacity-10: 0.1;
  --opacity-20: 0.2;
  --opacity-30: 0.3;
  --opacity-40: 0.4;
  --opacity-50: 0.5;
  --opacity-60: 0.6;
  --opacity-70: 0.7;
  --opacity-80: 0.8;
  --opacity-90: 0.9;
  --opacity-100: 1;
  
  /* Border Width */
  --border-0: 0px;
  --border-1: 1px;
  --border-2: 2px;
  --border-4: 4px;
  --border-8: 8px;
}

/* ===================================================
   DARK MODE OVERRIDES (Prepared for future)
   ================================================= */

@media (prefers-color-scheme: dark) {
  /* 
   * Add dark mode color overrides here when ready
   * Example:
   * :root {
   *   --color-bg: var(--gray-900);
   *   --color-text: var(--gray-50);
   * }
   */
}

/* ===================================================
   LEGACY VARIABLE ALIASES (For backwards compatibility)
   Keep these until all CSS files are migrated
   ================================================= */

:root {
  /* Old naming convention support */
  --primary: var(--navy-700);
  --secondary: var(--navy-600);
  --accent: var(--maroon-800);
  
  --brand-navy: var(--navy-700);
  --brand-maroon: var(--maroon-700);
  --primary-navy: var(--navy-700);
  --primary-maroon: var(--maroon-700);
  
  --success: var(--success-500);
  --warning: var(--warning-500);
  --danger: var(--danger-500);
  --error: var(--danger-500);
  --info: var(--info-500);
  
  --text-primary: var(--color-text);
  --text-secondary: var(--color-text-secondary);
  --text-light: var(--color-text-tertiary);
  --text-muted: var(--color-text-muted);
  
  --bg-primary: var(--color-bg);
  --bg-secondary: var(--color-bg-subtle);
  --bg-tertiary: var(--color-bg-muted);
  
  --border-color: var(--color-border);
  --border: var(--color-border);
  
  --shadow: var(--shadow-md);
  --shadow-card: var(--shadow-sm);
  --shadow-hover: var(--shadow-lg);
  
  --font-primary: var(--font-body);
  --font-family-primary: var(--font-body);
}

/* ===================================================
   ENHANCED NAVIGATION SMOOTHNESS
   Universal tab & menu bar animations
   ================================================= */

/* Smooth tab navigation container */
.tab-navigation,
nav.tab-navigation {
  transition: box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              background 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.3s cubic-bezier(0.0, 0, 0.2, 1);
  will-change: transform;
}

/* Smooth scroll behavior for navigation */
.tab-navigation {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Enhanced tab button smoothness */
.tab-btn,
button.tab-btn,
.tab-navigation button {
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.25s cubic-bezier(0.0, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              color 0.2s cubic-bezier(0.0, 0, 0.2, 1),
              background 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  will-change: transform, background, box-shadow;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  pointer-events: auto;
  cursor: pointer;
}

/* Smooth hover state with subtle lift */
.tab-btn:hover:not(.active),
button.tab-btn:hover:not(.active) {
  transition: all 0.25s cubic-bezier(0.0, 0, 0.2, 1),
              transform 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform: translateY(-2px) scale(1.02);
}

/* Smooth active state */
.tab-btn.active,
button.tab-btn.active {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.35s cubic-bezier(0.0, 0, 0.2, 1);
  animation: tab-activate 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Tab activation animation */
@keyframes tab-activate {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Smooth icon transitions in tabs */
.tab-btn i,
.tab-btn svg,
.tab-btn .icon {
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55),
              color 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tab-btn:hover i,
.tab-btn:hover svg,
.tab-btn:hover .icon {
  transform: scale(1.15) rotate(5deg);
}

.tab-btn.active i,
.tab-btn.active svg,
.tab-btn.active .icon {
  transform: scale(1.1);
}

/* Smooth underline indicator */
.tab-btn::after {
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              background 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tab-btn:hover::after {
  width: 80%;
  opacity: 0.6;
}

.tab-btn.active::after {
  width: 100%;
  opacity: 1;
}

/* Smooth background gradient overlay */
.tab-btn::before {
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tab-btn:hover::before {
  opacity: 0.1;
  transform: translateY(0);
}

.tab-btn.active::before {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced focus ring smoothness */
.tab-btn:focus-visible,
button.tab-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  transition: outline-offset 0.2s cubic-bezier(0.0, 0, 0.2, 1);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .tab-navigation,
  .tab-btn,
  .tab-btn::before,
  .tab-btn::after,
  .tab-btn i,
  .tab-btn svg {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}

/* Smooth navigation badge/counter animations */
.tab-btn .badge,
.tab-btn .counter {
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.tab-btn:hover .badge,
.tab-btn:hover .counter {
  transform: scale(1.15);
}

/* Hardware acceleration for better performance */
.tab-navigation,
.tab-btn {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Smooth ripple effect on click */
@keyframes ripple {
  0% {
    width: 0;
    height: 0;
    opacity: 0.5;
  }
  100% {
    width: 300px;
    height: 300px;
    opacity: 0;
  }
}

/* Tab press effect */
.tab-btn:active:not(.active) {
  transform: scale(0.98);
  transition: transform 0.1s cubic-bezier(0.4, 0, 1, 1);
}
