/* ==========================================================================
   MAIN.CSS - HEVIX FUSIONTECH GLOBAL DESIGN SYSTEM & THEME TOKENS
   ========================================================================== */

/* Google Fonts preconnected in index.html for high performance */

:root {
  /* Official HEVIX Brand Palette Tokens */
  --hevix-yellow: #FFC400;       /* 255, 196, 0 - Main highlights, headings, icons, boxes */
  --hevix-dark-yellow: #D99F00;  /* 217, 159, 0 - Hover, depth, shadows */
  --deep-black: #0B0B0B;         /* 11, 11, 11 - Main headings, dark sections, footer */
  --pure-white: #FFFFFF;         /* 255, 255, 255 - Main bg, text on dark areas */
  --soft-gray: #F4F4F4;          /* 244, 244, 244 - Secondary bg/cards */

  --brand-primary: #FFC400;
  --brand-primary-hover: #D99F00;
  --brand-dark: #0B0B0B;
  --brand-slate: #1F1F1F;
  --brand-light: #F4F4F4;

  /* Primary shades */
  --primary-50: #FFFDF0;
  --primary-100: #FFF8CC;
  --primary-200: #FFEE99;
  --primary-300: #FFE466;
  --primary-400: #FFD433;
  --primary-500: #FFC400;
  --primary-600: #D99F00;
  --primary-700: #B38300;
  --primary-800: #8C6600;

  --success-50: #ECFDF5;
  --success-100: #D1FAE5;
  --success-500: #10B981;
  --success-600: #059669;
  --success-700: #047857;

  --warning-50: #FFFBEB;
  --warning-100: #FEF3C7;
  --warning-500: #F59E0B;
  --warning-600: #D97706;

  --danger-50: #FEF2F2;
  --danger-100: #FEE2E2;
  --danger-500: #EF4444;
  --danger-600: #DC2626;

  --info-50: #F0F9FF;
  --info-100: #E0F2FE;
  --info-500: #0EA5E9;
  --info-600: #0284C7;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-yellow: 0 4px 20px rgba(255, 196, 0, 0.35);
  --shadow-glow: 0 0 25px rgba(255, 196, 0, 0.3);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Layout dimensions */
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 78px;
  --header-height: 72px;
}

/* ==========================================================================
   LIGHT THEME (Default)
   ========================================================================== */
:root, [data-theme="light"] {
  --bg-app: #FFFFFF;
  --bg-surface: #FFFFFF;
  --bg-surface-subtle: #F4F4F4;
  --bg-surface-elevated: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  --bg-header: rgba(255, 255, 255, 0.95);

  --border-color: #E5E7EB;
  --border-subtle: #F0F0F0;
  --border-focus: #FFC400;

  --text-primary: #0B0B0B;
  --text-secondary: #374151;
  --text-muted: #6B7280;
  --text-inverse: #0B0B0B;

  --accent: #FFC400;
  --accent-hover: #D99F00;
  --accent-light: #FFF8CC;
  --accent-text: #0B0B0B;

  --sidebar-text: #374151;
  --sidebar-text-active: #0B0B0B;
  --sidebar-bg-active: #FFF8CC;
  --sidebar-hover: #F4F4F4;

  --input-bg: #FFFFFF;
  --input-border: #D1D5DB;
  --input-focus: #FFC400;

  --table-header-bg: #F4F4F4;
  --table-row-hover: #FAFAFA;
  --table-border: #E5E7EB;

  --skeleton-base: #E5E7EB;
  --skeleton-highlight: #F4F4F4;

  --card-glow: 0 0 0 1px rgba(255, 196, 0, 0.15);
}

/* ==========================================================================
   DARK THEME (Elevated Obsidian & Neon Amber)
   ========================================================================== */
[data-theme="dark"] {
  --bg-app: #09090C;
  --bg-surface: #131318;
  --bg-surface-subtle: #181820;
  --bg-surface-elevated: #1F1F28;
  --bg-sidebar: #0C0C10;
  --bg-header: rgba(9, 9, 12, 0.90);

  --border-color: rgba(255, 255, 255, 0.09);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-focus: #FFC400;

  --text-primary: #FFFFFF;
  --text-secondary: #E2E8F0;
  --text-muted: #94A3B8;
  --text-inverse: #08080A;

  --accent: #FFC400;
  --accent-hover: #FFD433;
  --accent-light: rgba(255, 196, 0, 0.18);
  --accent-text: #FFC400;

  --sidebar-text: #94A3B8;
  --sidebar-text-active: #FFC400;
  --sidebar-bg-active: rgba(255, 196, 0, 0.15);
  --sidebar-hover: #181820;

  --input-bg: #131318;
  --input-border: #2C2C38;
  --input-focus: #FFC400;

  --table-header-bg: #131318;
  --table-row-hover: #181820;
  --table-border: rgba(255, 255, 255, 0.09);

  --skeleton-base: #1A1A22;
  --skeleton-highlight: #282834;

  --card-glow: 0 0 0 1px rgba(255, 196, 0, 0.25), 0 8px 30px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 6px 16px -2px rgba(0, 0, 0, 0.65), 0 2px 6px -1px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 28px -4px rgba(0, 0, 0, 0.75), 0 6px 14px -2px rgba(0, 0, 0, 0.55);
  --shadow-xl: 0 28px 48px -6px rgba(0, 0, 0, 0.85), 0 14px 24px -4px rgba(0, 0, 0, 0.65);
}

/* ==========================================================================
   CSS RESETS & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

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

h1 { font-size: 2rem; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

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

img, svg {
  vertical-align: middle;
  max-width: 100%;
}

ul, ol {
  list-style: none;
}

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

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Adaptive Logo Switcher Tokens */
.logo-dark {
  display: none !important;
}

.logo-light {
  display: block !important;
}

[data-theme="dark"] .logo-light {
  display: none !important;
}

[data-theme="dark"] .logo-dark {
  display: block !important;
}

/* ==========================================================================
   A4 STANDARD PRINT STYLES - RECEIPTS, INVOICES & CERTIFICATES
   ========================================================================== */
@page {
  size: A4 portrait;
  margin: 12mm 15mm 15mm 15mm;
}

@media print {
  *, *::before, *::after {
    background-color: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  html, body {
    width: 210mm !important;
    min-height: 297mm !important;
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 10pt !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide background chrome, interactive UI, and non-printable elements */
  #landing-view,
  #auth-view,
  #employee-app-layout,
  #superadmin-app-layout,
  .landing-navbar,
  .sidebar,
  .top-nav,
  .toast-container,
  .sidebar-backdrop,
  .theme-toggle-btn,
  .btn,
  .btn-icon,
  .modal-footer,
  .modal-header .btn-icon,
  .no-print {
    display: none !important;
  }

  /* Unfold student layout & fee receipt modal */
  #student-app-layout {
    display: block !important;
  }

  .modal-overlay#student-fee-receipt-modal,
  .modal-overlay#order-success-modal {
    position: static !important;
    background: transparent !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    z-index: auto !important;
  }

  .modal-content {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    transform: none !important;
  }

  .modal-header {
    border-bottom: none !important;
    padding: 0 0 10px 0 !important;
  }

  .modal-body {
    padding: 0 !important;
    overflow: visible !important;
  }

  #printable-fee-receipt,
  .invoice-receipt,
  .printable-a4-sheet {
    display: block !important;
    width: 100% !important;
    max-width: 180mm !important;
    margin: 0 auto !important;
    padding: 10mm 12mm !important;
    background: #ffffff !important;
    color: #111827 !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    page-break-inside: avoid !important;
  }
}


