/* ═══════════════════════════════════════════════════════════════
   ROUAYA CENTER — CREATIVE GLASSMORPHISM DESIGN SYSTEM
   Brand Palette Extracted Directly from Brand Logo:
   • Crimson Red   (#E11D48) — Primary Brand Typography & "Creative"
   • Vivid Orange  (#F97316) — "Concept" & Energy
   • Sunny Yellow  (#FACC15) — Lightbulb Radiance & Warmth
   • Kelly Green   (#22C55E) — "Design" & Growth
   • Playful Purple(#8B5CF6) — "Art" & Innovation
   ═══════════════════════════════════════════════════════════════ */

/* ── Custom Font Fallback ─────────────────────────── */
@font-face {
  font-family: 'Diodrum';
  src: url('../fonts/Diodrum.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ═══════════════════════════════════════════════════
   LIGHT THEME (DEFAULT :root)
   Warm off-white canvas, ultra-light frosted glass, energetic shadows
   ═══════════════════════════════════════════════════ */
:root {
  /* ── 1. Core Brand Colors (Logo-Extracted) ───────── */
  --primary:           #E11D48; /* Vibrant Crimson Red */
  --primary-light:     #FB7185;
  --primary-dark:      #BE123C;
  --primary-rgb:       225, 29, 72;
  --accent:            #F97316; /* Vivid Orange Accent */
  --accent-light:      #FB923C;
  --accent-dark:       #EA580C;
  --accent-rgb:        249, 115, 22;

  /* ── 2. Multi-Colored Secondary Accents ──────────── */
  --accent-orange:     #F97316;
  --accent-orange-light: #FB923C;
  --accent-orange-rgb: 249, 115, 22;

  --accent-yellow:     #FACC15;
  --accent-yellow-light: #FDE047;
  --accent-yellow-rgb: 250, 204, 21;

  --accent-green:      #22C55E;
  --accent-green-light:#4ADE80;
  --accent-green-dark: #16A34A;
  --accent-green-rgb:  34, 197, 94;

  --accent-purple:     #8B5CF6;
  --accent-purple-light:#A78BFA;
  --accent-purple-dark: #7C3AED;
  --accent-purple-rgb: 139, 92, 246;

  /* ── 3. Energetic Gradients ──────────────────────── */
  --brand-gradient:    linear-gradient(135deg, #E11D48 0%, #F97316 100%);
  --gradient-primary:  linear-gradient(135deg, #E11D48 0%, #F97316 100%);
  --gradient-creative: linear-gradient(135deg, #8B5CF6 0%, #E11D48 50%, #F97316 100%);
  --gradient-purple-crimson: linear-gradient(135deg, #8B5CF6 0%, #E11D48 100%);
  --gradient-warm:     linear-gradient(135deg, #F97316 0%, #FACC15 100%);
  --gradient-fresh:    linear-gradient(135deg, #22C55E 0%, #FACC15 100%);
  --brand-glow:        0 8px 32px rgba(225, 29, 72, 0.28), 0 0 54px rgba(249, 115, 22, 0.15);
  --lotus-glow:        0 8px 30px rgba(225, 29, 72, 0.25);

  /* ── 4. Semantic Colors ───────────────────────────── */
  --success:           #22C55E; /* Vibrant Kelly Green */
  --success-light:     #DCFCE7;
  --danger:            #E11D48; /* Crimson Red */
  --danger-light:      #FFE4E6;
  --warning:           #F97316; /* Bright Orange / Sunny Yellow */
  --warning-light:     #FFEDD5;
  --info:              #8B5CF6; /* Playful Purple */
  --info-light:        #EDE9FE;

  /* ── 5. Light Canvas Surfaces (No Blue) ──────────── */
  --bg-dark:           #FFFFFF;
  --bg-body:           #F9FAFB;
  --bg-secondary:      rgba(244, 244, 245, 0.85);
  --bg-card:           rgba(255, 255, 255, 0.85);
  --bg-card-elevated:  #FFFFFF;
  --bg-card-hover:     rgba(255, 255, 255, 0.98);
  --bg-input:          #FFFFFF;
  --bg-sidebar:        rgba(255, 255, 255, 0.88);
  --bg-header:         rgba(255, 255, 255, 0.90);

  /* Frosted Glass Surfaces */
  --bg-glass-card:     rgba(255, 255, 255, 0.82);
  --bg-glass-elevated: rgba(255, 255, 255, 0.94);
  --bg-glass-sidebar:  rgba(255, 255, 255, 0.86);
  --bg-glass-header:   rgba(255, 255, 255, 0.90);

  /* ── 6. Neutral Typography (High-Contrast Black) ─────── */
  --text-main:         #09090B; /* Deep crisp black */
  --text-secondary:    #18181B; /* Dark charcoal black */
  --text-muted:        #27272A; /* Dark charcoal text */
  --text-dark:         #000000; /* Pure black */

  /* ── 7. Translucent Borders ───────────────────────── */
  --border:            rgba(0, 0, 0, 0.08);
  --border-light:      rgba(225, 29, 72, 0.16);
  --border-pink:       rgba(225, 29, 72, 0.20);
  --border-hover:      rgba(225, 29, 72, 0.40);
  --border-glass:      rgba(255, 255, 255, 0.65);

  /* ── 8. Colorful Creative Shadows ────────────────── */
  --shadow:            0 8px 30px rgba(0, 0, 0, 0.05);
  --shadow-card:       0 8px 30px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.02);
  --shadow-elevated:   0 16px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
  --shadow-lotus:      0 8px 28px rgba(225, 29, 72, 0.18), 0 2px 8px rgba(249, 115, 22, 0.1);
  --shadow-crimson:    0 8px 24px rgba(225, 29, 72, 0.25);
  --shadow-orange:     0 8px 24px rgba(249, 115, 22, 0.25);
  --shadow-green:      0 8px 24px rgba(34, 197, 94, 0.22);
  --shadow-purple:     0 8px 24px rgba(139, 92, 246, 0.25);

  /* ── 9. Sidebar Glass ────────────────────────────── */
  --bg-sidebar-glass:  rgba(255, 255, 255, 0.92);
  --border-sidebar:    rgba(0, 0, 0, 0.06);
  --sidebar-active-text: #000000;

  /* ── 10. Shape & Motion ───────────────────────────── */
  --radius:            16px;
  --radius-sm:         12px;
  --radius-md:         20px;
  --radius-lg:         24px;
  --radius-xl:         32px;
  --radius-pill:       9999px;
  --transition:        0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-slow:   0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --glass-blur:        blur(16px);
  --glass-blur-lg:     blur(24px);

  --sidebar-width:     268px;
  --sidebar-collapsed: 72px;
  --topbar-height:     68px;

  /* ── Typography System ───────────────────────────── */
  --font-primary:      'Inter', sans-serif;
  --font-arabic:       'IBM Plex Sans Arabic', 'Diodrum', 'Inter', sans-serif;
  --font-mono:         'JetBrains Mono', monospace;
  --font-heading:      'Hanken Grotesk', 'Sora', sans-serif;

  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:   1.5rem;
  --text-3xl:   2rem;
  --text-4xl:   2.25rem;
  --text-5xl:   3rem;

  --leading-none:     1;
  --leading-tight:    1.25;
  --leading-snug:     1.4;
  --leading-normal:   1.5;
  --leading-relaxed:  1.6;
  --leading-loose:    2;

  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;

  --h-input:    48px;
  --h-btn:      46px;
  --h-btn-sm:   36px;
  --h-btn-lg:   52px;
}

/* ═══════════════════════════════════════════════════
   DARK THEME ([data-theme="dark"] or body.theme-dark)
   Warm obsidian / charcoal base (#121214) — STRICTLY ZERO BLUE
   Dark frosted glass with luminous crimson/orange/green borders
   ═══════════════════════════════════════════════════ */
[data-theme="dark"],
body.theme-dark {
  --primary:           #F43F5E; /* Bright Crimson Glow */
  --primary-light:     #FB7185;
  --primary-dark:      #E11D48;
  --primary-rgb:       244, 63, 94;
  --accent:            #FB923C;
  --accent-light:      #FDBA74;
  --accent-dark:       #F97316;
  --accent-rgb:        251, 146, 60;

  --accent-orange:     #FB923C;
  --accent-orange-light: #FDBA74;
  --accent-orange-rgb: 251, 146, 60;

  --accent-yellow:     #FDE047;
  --accent-yellow-light: #FEF08A;
  --accent-yellow-rgb: 253, 224, 71;

  --accent-green:      #4ADE80;
  --accent-green-light:#86EFAC;
  --accent-green-dark: #22C55E;
  --accent-green-rgb:  74, 222, 128;

  --accent-purple:     #A78BFA;
  --accent-purple-light:#C4B5FD;
  --accent-purple-dark: #8B5CF6;
  --accent-purple-rgb: 167, 139, 250;

  --brand-gradient:    linear-gradient(135deg, #F43F5E 0%, #FB923C 100%);
  --gradient-primary:  linear-gradient(135deg, #F43F5E 0%, #FB923C 100%);
  --gradient-creative: linear-gradient(135deg, #A78BFA 0%, #F43F5E 50%, #FB923C 100%);
  --gradient-purple-crimson: linear-gradient(135deg, #A78BFA 0%, #F43F5E 100%);
  --gradient-warm:     linear-gradient(135deg, #FB923C 0%, #FDE047 100%);
  --gradient-fresh:    linear-gradient(135deg, #4ADE80 0%, #FDE047 100%);
  --brand-glow:        0 0 32px rgba(244, 63, 94, 0.42), 0 0 64px rgba(251, 146, 60, 0.22);
  --lotus-glow:        0 0 32px rgba(244, 63, 94, 0.35);

  --success:           #4ADE80;
  --success-light:     rgba(74, 222, 128, 0.15);
  --danger:            #F43F5E;
  --danger-light:      rgba(244, 63, 94, 0.15);
  --warning:           #FB923C;
  --warning-light:     rgba(251, 146, 60, 0.15);
  --info:              #A78BFA;
  --info-light:        rgba(167, 139, 250, 0.15);

  /* Warm Charcoal Obsidian Surfaces (Strictly No Blue/Navy) */
  --bg-dark:           #0A0A0B;
  --bg-body:           #121214;
  --bg-secondary:      rgba(24, 24, 27, 0.75);
  --bg-card:           rgba(28, 28, 33, 0.85);
  --bg-card-elevated:  #18181B;
  --bg-card-hover:     rgba(45, 45, 52, 0.85);
  --bg-input:          #18181B;
  --bg-sidebar:        rgba(18, 18, 20, 0.92);
  --bg-header:         rgba(18, 18, 20, 0.92);

  --bg-glass-card:     rgba(28, 28, 33, 0.82);
  --bg-glass-elevated: rgba(38, 38, 44, 0.90);
  --bg-glass-sidebar:  rgba(18, 18, 20, 0.90);
  --bg-glass-header:   rgba(18, 18, 20, 0.90);

  /* High-Contrast Neutral Text */
  --text-main:         #FFFFFF;
  --text-secondary:    #E4E4E7;
  --text-muted:        #A1A1AA;
  --text-dark:         #121214;

  --border:            rgba(255, 255, 255, 0.08);
  --border-light:      rgba(244, 63, 94, 0.35);
  --border-pink:       rgba(244, 63, 94, 0.25);
  --border-hover:      rgba(251, 146, 60, 0.50);
  --border-glass:      rgba(255, 255, 255, 0.12);

  --shadow:            0 8px 32px rgba(0, 0, 0, 0.55);
  --shadow-card:       0 8px 32px rgba(0, 0, 0, 0.55);
  --shadow-elevated:   0 16px 48px rgba(0, 0, 0, 0.70);
  --shadow-lotus:      0 8px 32px rgba(244, 63, 94, 0.25), 0 2px 8px rgba(251, 146, 60, 0.15);
  --shadow-crimson:    0 0 24px rgba(244, 63, 94, 0.35), 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-orange:     0 0 24px rgba(251, 146, 60, 0.35), 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-green:      0 0 24px rgba(74, 222, 128, 0.30), 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-purple:     0 0 24px rgba(167, 139, 250, 0.35), 0 8px 24px rgba(0, 0, 0, 0.5);

  --bg-sidebar-glass:  rgba(18, 18, 20, 0.85);
  --border-sidebar:    rgba(255, 255, 255, 0.07);
  --sidebar-active-text: #FFFFFF;
}

/* Light Theme Class Alias */
body.theme-light {
  --primary:           #E11D48;
  --primary-light:     #FB7185;
  --primary-dark:      #BE123C;
  --primary-rgb:       225, 29, 72;
  --accent:            #F97316;
  --accent-light:      #FB923C;
  --accent-dark:       #EA580C;

  --brand-gradient:    linear-gradient(135deg, #E11D48 0%, #F97316 100%);
  --brand-glow:        0 8px 32px rgba(225, 29, 72, 0.28), 0 0 54px rgba(249, 115, 22, 0.15);
  --lotus-glow:        0 8px 30px rgba(225, 29, 72, 0.25);

  --bg-dark:           #FFFFFF;
  --bg-body:           #F9FAFB;
  --bg-secondary:      rgba(244, 244, 245, 0.85);
  --bg-card:           rgba(255, 255, 255, 0.85);
  --bg-card-elevated:  #FFFFFF;
  --bg-card-hover:     rgba(255, 255, 255, 0.98);
  --bg-input:          #FFFFFF;
  --bg-sidebar:        rgba(255, 255, 255, 0.88);
  --bg-header:         rgba(255, 255, 255, 0.90);

  --text-main:         #09090B;
  --text-secondary:    #18181B;
  --text-muted:        #27272A;
  --text-dark:         #000000;

  --border:            #E4E4E7;
  --border-light:      rgba(225, 29, 72, 0.16);
  --border-pink:       rgba(225, 29, 72, 0.20);
  --border-hover:      rgba(225, 29, 72, 0.40);

  --shadow:            0 8px 30px rgba(0, 0, 0, 0.05);
  --shadow-card:       0 8px 30px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.02);
  --shadow-elevated:   0 16px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
  --shadow-lotus:      0 8px 28px rgba(225, 29, 72, 0.18), 0 2px 8px rgba(249, 115, 22, 0.1);

  --bg-sidebar-glass:  rgba(255, 255, 255, 0.92);
  --border-sidebar:    rgba(0, 0, 0, 0.06);
  --sidebar-active-text: #000000;
}

/* ═══════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
  line-height: var(--leading-relaxed);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  font-size: var(--text-base);
  letter-spacing: -0.01em;
}

/* Arabic font for RTL content */
body:not(.lang-fr) {
  font-family: var(--font-arabic);
}

body.lang-fr {
  font-family: var(--font-primary);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading, var(--font-primary));
  color: var(--text-main);
  font-weight: 700;
  line-height: var(--leading-snug);
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}

body:not(.lang-fr) h1,
body:not(.lang-fr) h2,
body:not(.lang-fr) h3 {
  font-family: var(--font-arabic);
}

.mono {
  font-family: var(--font-mono);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-light);
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background: rgba(225, 29, 72, 0.25);
  color: var(--primary);
}

/* ── Scrollbar ────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(225, 29, 72, 0.25);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ── Table Container ──────────────────────────────── */
.table-container {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow-x: auto;
  margin-bottom: 24px;
}

.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;
}

/* ═══════════════════════════════════════════════════
   APP LOADER — Creative Animation
   ═══════════════════════════════════════════════════ */
#app-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-body);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  flex-direction: column;
  gap: 20px;
}

#app-loader .loader-ring {
  width: 52px;
  height: 52px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-right-color: var(--accent-orange);
  border-bottom-color: var(--accent-green);
  border-radius: 50%;
  animation: lotusSpin 0.9s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

#app-loader .loader-text {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-family: var(--font-primary);
  font-weight: 600;
  letter-spacing: 0.05em;
}

@keyframes lotusSpin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════
   LOGIN PAGE — Creative Glassmorphism Experience
   ═══════════════════════════════════════════════════ */
.login-page-wrapper {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  position: relative;
  overflow: hidden;
}

/* Animated Glassmorphic Mesh Background */
.login-page-wrapper::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(225, 29, 72, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(249, 115, 22, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(34, 197, 94, 0.10) 0%, transparent 50%);
  animation: bg-mesh 25s infinite alternate ease-in-out;
  pointer-events: none;
  z-index: 0;
}

@keyframes bg-mesh {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.login-grid-lines,
.grid-line,
.bg-orb {
  display: none !important;
}

.login-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 1040px;
  min-height: 640px;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: 
    0 32px 80px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  z-index: 1;
  overflow: hidden;
  margin: 20px;
}

/* Brand Side */
.login-brand-side {
  flex: 1.1;
  background: linear-gradient(145deg, rgba(24, 24, 27, 0.95) 0%, rgba(39, 39, 42, 0.85) 100%);
  padding: 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
  position: relative;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

body.theme-light .login-brand-side {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(249, 250, 251, 0.7) 100%);
  color: var(--text-main);
  border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.brand-content {
  position: relative;
  z-index: 2;
}

.brand-logo-wrap {
  width: 108px;
  height: 108px;
  border-radius: 24px;
  background: #ffffff;
  padding: 8px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 12px 32px rgba(225, 29, 72, 0.28),
    0 0 54px rgba(249, 115, 22, 0.16);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.brand-logo-wrap:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow:
    0 16px 44px rgba(225, 29, 72, 0.38),
    0 0 70px rgba(249, 115, 22, 0.25);
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 18px;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.04em;
  color: var(--text-main);
  line-height: 1.15;
}

.brand-tagline {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.16em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all var(--transition);
}

.feature-item:hover {
  background: rgba(225, 29, 72, 0.08);
  border-color: rgba(225, 29, 72, 0.2);
  color: var(--text-main);
  transform: translateX(4px);
}

body.lang-fr .feature-item:hover {
  transform: translateX(-4px);
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.15), rgba(249, 115, 22, 0.12));
  border: 1px solid rgba(225, 29, 72, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  font-size: 1rem;
}

/* Form Side */
.login-form-side {
  flex: 1;
  padding: 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-card);
}

.form-wrapper {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
}

.form-header {
  margin-bottom: 32px;
}

.form-header h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 8px;
  padding-bottom: 8px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.form-header p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Role Selector */
.role-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}

.role-card-modern {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-spring);
  position: relative;
  overflow: hidden;
}

.role-card-modern:hover {
  border-color: var(--accent-orange);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.15);
}

.role-card-modern.active {
  background: rgba(225, 29, 72, 0.10);
  border-color: var(--primary);
  box-shadow:
    0 0 0 1px var(--primary),
    0 8px 24px rgba(225, 29, 72, 0.20);
  transform: translateY(-3px);
}

.role-card-modern.active .role-icon {
  color: var(--primary);
  transform: scale(1.15);
  filter: drop-shadow(0 0 8px rgba(225, 29, 72, 0.4));
}

.role-icon {
  font-size: 1.4rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  transition: all var(--transition);
  display: block;
}

.role-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
  z-index: 1;
}

.role-card-modern.active .role-name {
  color: var(--primary);
}
  transition: color var(--transition);
  position: relative;
  z-index: 1;
}

.role-card-modern.active .role-name {
  color: var(--text-main);
}

/* Form Visibility */
.hidden-form { display: none; }

.show-form {
  display: block;
  animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpFade {
  0%   { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Form Field Groups */
.form-group-modern {
  margin-bottom: 18px;
}

.form-group-modern label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  letter-spacing: 0.02em;
}

.input-with-icon {
  position: relative;
}

.input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  transition: color var(--transition);
}

.input-with-icon:focus-within .input-icon {
  color: var(--primary);
}

.input-with-icon input {
  width: 100%;
  padding: 13px 44px 13px 44px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text-main);
  transition: all var(--transition);
}

.input-with-icon input:focus {
  outline: none;
  background: var(--bg-card-elevated);
  border-color: rgba(225, 29, 72, 0.5);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15), 0 0 20px rgba(225, 29, 72, 0.08);
}

.input-with-icon input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.password-toggle {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition);
}

.password-toggle:hover {
  color: var(--primary-light);
}

.forgot-password-link {
  text-align: left;
  margin-bottom: 24px;
}

.forgot-password-link a {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
}

.forgot-password-link a:hover {
  color: var(--primary-light);
}

/* Login Submit Button */
.btn-login-submit {
  width: 100%;
  padding: 14px;
  background: var(--brand-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(225, 29, 72, 0.3), 0 0 40px rgba(249, 115, 22, 0.15);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}

.btn-login-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-login-submit:hover::before {
  left: 100%;
}

.btn-login-submit:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(225, 29, 72, 0.42),
    0 0 60px rgba(249, 115, 22, 0.25);
}

.btn-login-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-login-submit .arrow-icon {
  transition: transform var(--transition);
}

.btn-login-submit:hover .arrow-icon {
  transform: translateX(-5px);
}

.btn-login-submit .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error Message */
.login-error-msg {
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger-light);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 20px;
  border-right: 3px solid var(--danger);
  animation: slideUpFade 0.3s ease;
  border-left: none;
}

.shake {
  animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

/* Sign-up Link */
.signup-link {
  text-align: center;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.signup-link span {
  font-size: 0.82rem;
}

.btn-signup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  color: var(--primary);
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  justify-content: center;
}

.btn-signup:hover {
  color: var(--primary-light);
  background: rgba(225, 29, 72, 0.08);
  border-radius: var(--radius-sm);
}

@keyframes shake {
  10%, 90%  { transform: translate3d(-1px, 0, 0); }
  20%, 80%  { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60%  { transform: translate3d(4px, 0, 0); }
}

/* Mobile Login */
@media (max-width: 900px) {
  .login-container {
    flex-direction: column;
    max-width: 480px;
    min-height: auto;
  }

  .login-brand-side {
    padding: 36px 32px;
    text-align: center;
    border-left: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .brand-logo-wrap {
    margin: 0 auto 18px;
    width: 72px;
    height: 72px;
  }

  .brand-title {
    font-size: 2rem;
  }

  .login-form-side {
    padding: 36px 32px;
  }

  .brand-features {
    display: none;
  }
}

@media (max-width: 480px) {
  .login-container {
    margin: 12px;
    border-radius: var(--radius-lg);
  }

  .login-brand-side,
  .login-form-side {
    padding: 28px 24px;
  }
}

/* ═══════════════════════════════════════════════════
   LIGHT THEME LOGIN PAGE OVERRIDES
   ═══════════════════════════════════════════════════ */
body.theme-light .login-page-wrapper {
  background: var(--bg-app);
}

body.theme-light .login-page-wrapper::before {
  background: 
    radial-gradient(ellipse at 15% 15%, rgba(225, 29, 72, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(249, 115, 22, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 85%, rgba(139, 92, 246, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse at 15% 85%, rgba(34, 197, 94, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(250, 204, 21, 0.06) 0%, transparent 60%);
  animation: bg-mesh-light 25s infinite alternate ease-in-out;
  opacity: 0.95;
}

@keyframes bg-mesh-light {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.1) rotate(6deg); }
}

body.theme-light .login-container {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(225, 29, 72, 0.12);
  box-shadow: 
    0 24px 60px rgba(225, 29, 72, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.theme-light .login-brand-side {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(254, 242, 242, 0.7) 100%);
  color: var(--text-main);
  border-left: 1px solid rgba(0, 0, 0, 0.06);
}

body.theme-light .brand-title {
  color: var(--text-main);
}

body.theme-light .brand-subtitle {
  color: var(--text-secondary);
  font-weight: 600;
}

body.theme-light .feature-item {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(225, 29, 72, 0.1);
  color: var(--text-secondary);
  font-weight: 600;
}

body.theme-light .feature-item:hover {
  background: rgba(225, 29, 72, 0.06);
  border-color: rgba(225, 29, 72, 0.22);
  color: var(--text-main);
}

body.theme-light .feature-icon {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.12), rgba(249, 115, 22, 0.12));
  border-color: rgba(225, 29, 72, 0.2);
  color: var(--primary);
}

body.theme-light .login-form-side {
  background: rgba(255, 255, 255, 0.65);
}

body.theme-light .role-card-modern {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

body.theme-light .role-card-modern:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(249, 115, 22, 0.4);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.12);
}

body.theme-light .role-card-modern.active {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.15), 0 8px 24px rgba(225, 29, 72, 0.14);
}

body.theme-light .role-card-modern .role-icon {
  color: var(--text-muted);
}

body.theme-light .role-card-modern.active .role-icon {
  color: var(--primary);
}

body.theme-light .role-name {
  color: #09090B !important;
  font-weight: 700;
}

body.theme-light .role-card-modern.active .role-name {
  color: #000000 !important;
  font-weight: 800;
}

body.theme-light .brand-logo-wrap {
  box-shadow:
    0 12px 32px rgba(225, 29, 72, 0.22),
    0 4px 16px rgba(249, 115, 22, 0.15);
}

body.theme-light .brand-logo-wrap:hover {
  box-shadow:
    0 16px 40px rgba(225, 29, 72, 0.32),
    0 6px 20px rgba(249, 115, 22, 0.22);
}

/* ═══════════════════════════════════════════════════════════════
   SIGN UP MODAL — Creative Glassmorphism Overhaul
   ═══════════════════════════════════════════════════════════════ */

.signup-card-modal {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.signup-header-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.08) 0%, rgba(249, 115, 22, 0.08) 100%);
  border-radius: var(--radius-md);
  border: 1px solid rgba(225, 29, 72, 0.18);
  position: relative;
  overflow: hidden;
}

.signup-header-banner::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 60%);
  pointer-events: none;
}

.signup-header-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(225, 29, 72, 0.1);
  border: 1px solid rgba(225, 29, 72, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--primary);
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.2);
  flex-shrink: 0;
}

.signup-header-text h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--text-main);
  margin-bottom: 6px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.signup-header-text p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.form-section-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-section-box:hover {
  border-color: rgba(225, 29, 72, 0.25);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.06);
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.form-section-title span {
  color: var(--primary);
  font-size: 1.2rem;
}

.role-select-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.role-select-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.role-select-card:hover {
  background: var(--bg-card-elevated);
  transform: translateY(-2px);
  border-color: rgba(249, 115, 22, 0.3);
}

.role-select-card.active {
  background: rgba(225, 29, 72, 0.08);
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(225, 29, 72, 0.15);
}

.role-card-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: all 0.3s;
}

.role-select-card.active .role-card-badge {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
}

.role-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.role-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

.role-select-card.active .role-card-title {
  color: var(--text-main);
}

.role-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.form-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 600px) {
  .role-select-grid {
    grid-template-columns: 1fr;
  }
  .form-grid-2col {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SIGNUP WIZARD MODAL
   ═══════════════════════════════════════════════════════════════ */
.signup-modal-override .modal-body {
  padding: 0 !important;
  max-height: 80vh !important;
}

.signup-wizard {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.wizard-header {
  padding: 20px;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.07), rgba(249, 115, 22, 0.07));
  border-bottom: 1px solid var(--border);
  text-align: center;
  position: relative;
}

.wizard-progress {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.wizard-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: all 0.3s ease;
}

.wizard-step-dot.active {
  background: var(--primary);
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(225, 29, 72, 0.5);
}

.wizard-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  position: relative;
  min-height: 300px;
}

.wizard-step {
  display: none;
  animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.wizard-step.active {
  display: block;
}

.wizard-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
}

.btn-wizard {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.btn-wizard.next {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(225, 29, 72, 0.35);
}

.btn-wizard.next:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.45);
}

.btn-wizard.prev {
  background: var(--bg-secondary);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-wizard.prev:hover {
  background: var(--bg-card-elevated);
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.chip {
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  font-size: 0.9rem;
}

.chip:hover {
  background: var(--bg-card-elevated);
  border-color: rgba(225, 29, 72, 0.3);
}

.chip.active {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
  transform: translateY(-2px);
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

