/* ═══════════════════════════════════════════════════
   NOOR ACADEMY — MANAGEMENT SYSTEM
   Design System: Dark Navy + Gold Military Theme
═══════════════════════════════════════════════════ */

/* --- CSS VARIABLES --- */
:root {
  /* === PREMIUM DARK PALETTE === */
  --bg-base:       #020617; /* Slate 950 */
  --bg-surface:    #0f172a; /* Slate 900 */
  --bg-card:       #1e293b; /* Slate 800 */
  --bg-card-hover: #334155; /* Slate 700 */
  --bg-input:      #020617;
  
  --border:        rgba(255, 255, 255, 0.08);
  --border-gold:   rgba(212, 175, 55, 0.4);
  --border-active: rgba(212, 175, 55, 0.8);

  /* === GOLD PALETTE — richer, jewel-tone === */
  --navy:     #0f172a;
  --navy-lt:  #1e293b;
  --gold:     #eab308;
  --gold-lt:  #fde047;
  --gold-dim: rgba(234, 179, 8, 0.15);

  /* === TYPOGRAPHY === */
  --text-primary:   #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted:     #64748b;

  /* === SEMANTIC COLORS === */
  --green:  #10b981;
  --red:    #ef4444;
  --orange: #f59e0b;
  --blue:   #3b82f6;
  --purple: #8b5cf6;

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

  /* === SHADOWS — deeper glow === */
  --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.3);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(234,179,8,0.15);
  --shadow-glow-active: 0 0 30px rgba(234,179,8,0.3);

  --sidebar-width: 270px;
  --topbar-height: 68px;

  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Outfit', system-ui, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
/* --- RESET --- */
h1, h2, h3, h4, h5, h6, .page-title, .login-title, .login-form-title { font-family: var(--font-heading); }

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { cursor: pointer; text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea {
  font-family: var(--font-body);
  font-size: 14px;
}
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════
   LOGIN PAGE (PREMIUM SPLIT SCREEN)
═══════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  background: var(--bg-base);
  overflow: hidden;
}

/* Left Side: Brand Display */
.login-split-left {
  flex: 1;
  display: none; /* Hidden on mobile */
  position: relative;
  background: radial-gradient(circle at center, #1A2440 0%, var(--bg-base) 100%);
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .login-split-left { display: flex; }
}

/* Abstract Premium Background Mesh */
.login-split-left::before {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  background: conic-gradient(from 180deg at 50% 50%, rgba(212, 175, 55, 0.1) 0deg, rgba(59, 130, 246, 0.05) 120deg, rgba(139, 92, 246, 0.05) 240deg, rgba(212, 175, 55, 0.1) 360deg);
  animation: rotateMesh 20s linear infinite;
  opacity: 0.6;
}

@keyframes rotateMesh {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.glass-brand-card {
  position: relative;
  z-index: 10;
  background: rgba(15, 21, 38, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 64px;
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  transform: translateY(0);
  animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

#loginLogoWrapLarge {
  margin-bottom: 24px;
  display: inline-flex;
  padding: 24px;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

#loginAcademyNameLarge {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #fff 0%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

#loginAcademySubLarge {
  font-size: 16px;
  color: var(--text-secondary);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Right Side: Form */
.login-split-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}

/* Add a subtle glow behind the form */
.login-split-right::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 10;
  background: rgba(15, 21, 38, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-logo.mobile-only {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

@media (min-width: 1024px) {
  .login-logo.mobile-only { display: none !important; }
}

.login-form-title {
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.login-form-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 40px;
}

.premium-input-group {
  margin-bottom: 24px;
}

.premium-input-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon > i.ph {
  position: absolute;
  left: 16px;
  font-size: 20px;
  color: var(--text-muted);
  transition: var(--transition-fast);
  z-index: 2;
}

.input-with-icon input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 16px 16px 48px;
  color: #fff;
  font-size: 15px;
  transition: var(--transition-fast);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.input-with-icon input:focus {
  border-color: var(--gold);
  background: var(--bg-surface);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15), inset 0 2px 4px rgba(0,0,0,0.1);
  outline: none;
}

.input-with-icon input:focus + i.ph,
.input-with-icon input:focus ~ i.ph {
  color: var(--gold);
}

.password-wrapper input {
  padding-right: 48px;
}

.toggle-pass {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 2;
}

.toggle-pass:hover {
  color: var(--text-primary);
}

.premium-login-btn {
  margin-top: 16px;
  height: 56px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.25);
  background: linear-gradient(135deg, var(--gold-lt) 0%, var(--gold) 100%);
  color: #000;
  border: none;
  transition: var(--transition);
}

.premium-login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(212, 175, 55, 0.4);
  background: linear-gradient(135deg, #f5cc3f 0%, #c9981e 100%);
}

.premium-login-btn i {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.premium-login-btn:hover i {
  transform: translateX(4px);
}

.login-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: shake 0.4s ease;
}

.login-error::before {
  content: '\26A0'; /* Warning icon */
  font-size: 16px;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ═══════════════════════════════════════════════════
   NOOR ACADEMY — MANAGEMENT SYSTEM
   Design System: Dark Navy + Gold Military Theme
═══════════════════════════════════════════════════ */

/* --- CSS VARIABLES --- */
:root {
  --bg-base:       #01050f; /* Richer obsidian */
  --bg-surface:    #080d1a; /* Deep navy surface */
  --bg-card:       #0d1424; /* Tailwind gray-900 equivalent */
  --bg-card-hover: #131d30;
  --bg-input:      #060b16;
  --border:        rgba(255, 255, 255, 0.08); /* Glassy borders */
  --border-gold:   rgba(212, 175, 55, 0.25);
  --border-active: rgba(212, 175, 55, 0.5);

  --navy:     #0d1424;
  --navy-lt:  #131d30;
  --gold:     #d4af37;
  --gold-lt:  #f0cc5a;
  --gold-dim: rgba(212, 175, 55, 0.1);

  --text-primary:   #EAEDF3;
  --text-secondary: #8B95A8;
  --text-muted:     #4E5A6E;

  --green:  #00d68f;
  --red:    #ff4757;
  --orange: #ffa502;
  --blue:   #2ed6f5;
  --purple: #a55eea;

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 24px rgba(212,175,55,0.12);
  --shadow-glow-active: 0 0 32px rgba(212,175,55,0.25);

  --sidebar-width: 280px;
  --topbar-height: 72px;

  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Outfit', system-ui, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
/* --- RESET --- */
h1, h2, h3, h4, h5, h6, .page-title, .login-title, .login-form-title { font-family: var(--font-heading); }

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { cursor: pointer; text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea {
  font-family: var(--font-body);
  font-size: 14px;
}
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 30% 50%, #111d3a 0%, var(--bg-base) 70%);
  position: relative;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════
   NOOR ACADEMY — MANAGEMENT SYSTEM
   Design System: Dark Navy + Gold Military Theme
═══════════════════════════════════════════════════ */

/* --- CSS VARIABLES --- */
:root {
  --bg-base:       #01050f; /* Richer obsidian */
  --bg-surface:    #080d1a; /* Deep navy surface */
  --bg-card:       #0d1424; /* Tailwind gray-900 equivalent */
  --bg-card-hover: #131d30;
  --bg-input:      #060b16;
  --border:        rgba(255, 255, 255, 0.08); /* Glassy borders */
  --border-gold:   rgba(212, 175, 55, 0.25);
  --border-active: rgba(212, 175, 55, 0.5);

  --navy:     #0d1424;
  --navy-lt:  #131d30;
  --gold:     #d4af37;
  --gold-lt:  #f0cc5a;
  --gold-dim: rgba(212, 175, 55, 0.1);

  --text-primary:   #EAEDF3;
  --text-secondary: #8B95A8;
  --text-muted:     #4E5A6E;

  --green:  #00d68f;
  --red:    #ff4757;
  --orange: #ffa502;
  --blue:   #2ed6f5;
  --purple: #a55eea;

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 24px rgba(212,175,55,0.12);
  --shadow-glow-active: 0 0 32px rgba(212,175,55,0.25);

  --sidebar-width: 280px;
  --topbar-height: 72px;

  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Outfit', system-ui, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
/* --- RESET --- */
h1, h2, h3, h4, h5, h6, .page-title, .login-title, .login-form-title { font-family: var(--font-heading); }

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { cursor: pointer; text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea {
  font-family: var(--font-body);
  font-size: 14px;
}
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════
   LOGIN PAGE — ULTRA PREMIUM SPLIT SCREEN
═══════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  background: #01050f;
  overflow: hidden;
  position: relative;
}

/* === LEFT PANEL: Deep atmospheric brand display === */
.login-split-left {
  flex: 1;
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(212,175,55,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(46,214,245,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(165,94,234,0.05) 0%, transparent 60%),
    linear-gradient(160deg, #04081a 0%, #01050f 100%);
}

@media (min-width: 1024px) {
  .login-split-left { display: flex; }
}

/* Rotating aurora mesh */
.login-split-left::before {
  content: '';
  position: absolute;
  width: 160%;
  height: 160%;
  background: conic-gradient(
    from 0deg at 40% 60%,
    rgba(212,175,55,0.08) 0deg,
    rgba(46,214,245,0.04) 90deg,
    rgba(165,94,234,0.06) 180deg,
    rgba(0,214,143,0.04) 270deg,
    rgba(212,175,55,0.08) 360deg
  );
  animation: rotateMesh 25s linear infinite;
  opacity: 0.8;
}

/* Glowing orbs on the left panel */
.login-split-left::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -60px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(212,175,55,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

@keyframes rotateMesh {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Glass brand card — floating */
.glass-brand-card {
  position: relative;
  z-index: 10;
  background: rgba(8, 13, 26, 0.55);
  backdrop-filter: blur(32px) saturate(1.5);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  border: 1px solid rgba(212,175,55,0.18);
  padding: 60px 56px;
  border-radius: 28px;
  text-align: center;
  box-shadow:
    0 40px 80px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 0 60px rgba(212,175,55,0.07);
  animation: floatCard 7s ease-in-out infinite;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-18px); }
}

/* Logo circle with glow ring */
#loginLogoWrapLarge {
  margin-bottom: 28px;
  display: inline-flex;
  padding: 22px;
  background: radial-gradient(circle, rgba(212,175,55,0.15) 0%, rgba(212,175,55,0.05) 100%);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(212,175,55,0.3),
    0 0 40px rgba(212,175,55,0.25),
    0 0 80px rgba(212,175,55,0.1);
}

/* Academy name — gradient text */
#loginAcademyNameLarge {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 5px;
  background: linear-gradient(135deg, #ffffff 0%, #f0cc5a 50%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

#loginAcademySubLarge {
  font-size: 13px;
  color: #8B95A8;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 0;
}

/* === RIGHT PANEL: Form area === */
.login-split-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(212,175,55,0.05) 0%, transparent 55%),
    linear-gradient(180deg, #01050f 0%, #020818 100%);
}

/* Ambient glow behind card */
.login-split-right::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212,175,55,0.08) 0%, transparent 65%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* === LOGIN CARD — Deep glassmorphism === */
.login-card {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 10;
  background: rgba(8, 13, 26, 0.7);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 28px;
  padding: 48px 40px;
  box-shadow:
    0 40px 100px rgba(0,0,0,0.7),
    0 0 0 1px rgba(255,255,255,0.03) inset,
    0 1px 0 rgba(255,255,255,0.07) inset,
    0 0 100px rgba(212,175,55,0.05);
  animation: slideUpFade 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(40px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* Mobile logo area */
.login-logo.mobile-only {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

@media (min-width: 1024px) {
  .login-logo.mobile-only { display: none !important; }
}

/* Form title */
.login-form-title {
  font-size: 34px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #EAEDF3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.login-form-subtitle {
  color: #8B95A8;
  font-size: 14px;
  margin-bottom: 36px;
  line-height: 1.5;
}

/* Input groups */
.premium-input-group {
  margin-bottom: 20px;
}

.premium-input-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #8B95A8;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* Input wrapper with icon */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon > i.ph {
  position: absolute;
  left: 16px;
  font-size: 18px;
  color: #4E5A6E;
  transition: var(--transition-fast);
  z-index: 2;
}

.input-with-icon input {
  width: 100%;
  background: rgba(6, 11, 22, 0.8);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-md);
  padding: 15px 16px 15px 46px;
  color: #EAEDF3;
  font-size: 15px;
  transition: var(--transition-fast);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}

.input-with-icon input::placeholder {
  color: #4E5A6E;
}

.input-with-icon input:focus {
  border-color: rgba(212,175,55,0.5);
  background: rgba(8, 13, 26, 0.9);
  box-shadow:
    0 0 0 3px rgba(212,175,55,0.12),
    inset 0 2px 8px rgba(0,0,0,0.3);
  outline: none;
}

.input-with-icon input:focus ~ i.ph,
.input-with-icon > i.ph:has(+ input:focus) {
  color: #d4af37;
}

.input-with-icon:focus-within > i.ph {
  color: #d4af37;
}

.password-wrapper input {
  padding-right: 50px;
}

.toggle-pass {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: #4E5A6E;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 2;
  padding: 4px;
}

.toggle-pass:hover {
  color: #d4af37;
}

/* Sign In button — premium jewel gold */
.premium-login-btn {
  margin-top: 8px;
  width: 100%;
  height: 54px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  background: linear-gradient(135deg, #f0cc5a 0%, #d4af37 55%, #b8941e 100%);
  color: #0a0800;
  border: none;
  cursor: pointer;
  letter-spacing: 0.5px;
  box-shadow:
    0 8px 28px rgba(212,175,55,0.35),
    inset 0 1px 0 rgba(255,255,255,0.35);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

/* Shimmer sweep on hover */
.premium-login-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}

.premium-login-btn:hover::after {
  left: 150%;
}

.premium-login-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 40px rgba(212,175,55,0.5),
    inset 0 1px 0 rgba(255,255,255,0.4);
  background: linear-gradient(135deg, #f5d46a 0%, #e8c040 55%, #c9981e 100%);
}

.premium-login-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(212,175,55,0.3);
}

.premium-login-btn i {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.premium-login-btn:hover i {
  transform: translateX(5px);
}

/* Error message */
.login-error {
  background: rgba(255,71,87,0.08);
  border: 1px solid rgba(255,71,87,0.3);
  color: #ff8a96;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: shake 0.4s ease;
  backdrop-filter: blur(8px);
}

.login-error::before {
  content: '\26A0';
  font-size: 15px;
  color: #ff4757;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-5px); }
  75%       { transform: translateX(5px); }
}


/* --- Login Floating Particles --- */
.login-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.12);
  filter: blur(1px);
  animation: floatParticle linear infinite;
}
.p1 { width: 6px; height: 6px; left: 10%; top: 20%; animation-duration: 14s; animation-delay: 0s; }
.p2 { width: 4px; height: 4px; left: 80%; top: 60%; animation-duration: 18s; animation-delay: 2s; }
.p3 { width: 8px; height: 8px; left: 50%; top: 80%; animation-duration: 12s; animation-delay: 4s; }
.p4 { width: 3px; height: 3px; left: 25%; top: 50%; animation-duration: 20s; animation-delay: 1s; }
.p5 { width: 5px; height: 5px; left: 70%; top: 15%; animation-duration: 16s; animation-delay: 3s; }

@keyframes floatParticle {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-100vh) translateX(40px); opacity: 0; }
}

/* --- Mobile Logo Pulse Ring --- */
.login-logo-ring {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.login-logo-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 55, 0.3);
  animation: pulseRing 2.5s ease-out infinite;
}
@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* --- Desktop Brand Stats --- */
.login-brand-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.brand-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.brand-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  font-family: var(--font-heading);
}
.brand-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}
.brand-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
}

/* --- Login Secure Footer --- */
.login-secure-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.5px;
}
.login-secure-footer i {
  color: var(--green);
  font-size: 16px;
}

/* --- Brand Stat Icons (replaces numbers) --- */
.brand-stat-icon {
  font-size: 28px;
  color: var(--gold);
  margin-bottom: 4px;
}

/* --- Moin Credit Footer --- */
.login-credit-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.login-credit-footer a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
}
.login-credit-footer a:hover {
  color: var(--gold-lt);
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════
   NOOR ACADEMY — MANAGEMENT SYSTEM
   Design System: Dark Navy + Gold Military Theme
═══════════════════════════════════════════════════ */

/* --- CSS VARIABLES --- */
:root {
  --bg-base:       #01050f; /* Richer obsidian */
  --bg-surface:    #080d1a; /* Deep navy surface */
  --bg-card:       #0d1424; /* Tailwind gray-900 equivalent */
  --bg-card-hover: #131d30;
  --bg-input:      #060b16;
  --border:        rgba(255, 255, 255, 0.08); /* Glassy borders */
  --border-gold:   rgba(212, 175, 55, 0.25);
  --border-active: rgba(212, 175, 55, 0.5);

  --navy:     #0d1424;
  --navy-lt:  #131d30;
  --gold:     #d4af37;
  --gold-lt:  #f0cc5a;
  --gold-dim: rgba(212, 175, 55, 0.1);

  --text-primary:   #EAEDF3;
  --text-secondary: #8B95A8;
  --text-muted:     #4E5A6E;

  --green:  #00d68f;
  --red:    #ff4757;
  --orange: #ffa502;
  --blue:   #2ed6f5;
  --purple: #a55eea;

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 24px rgba(212,175,55,0.12);
  --shadow-glow-active: 0 0 32px rgba(212,175,55,0.25);

  --sidebar-width: 280px;
  --topbar-height: 72px;

  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Outfit', system-ui, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
/* --- RESET --- */
h1, h2, h3, h4, h5, h6, .page-title, .login-title, .login-form-title { font-family: var(--font-heading); }

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  background-image:
    radial-gradient(ellipse at 15% 20%, rgba(212, 175, 55, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 80%, rgba(46, 214, 245, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(8, 13, 26, 0.8) 0%, #01050f 100%);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { cursor: pointer; text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea {
  font-family: var(--font-body);
  font-size: 14px;
}
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 30% 50%, #111d3a 0%, var(--bg-base) 70%);
  position: relative;
  overflow: hidden;
}

.login-bg-shapes { position: absolute; inset: 0; pointer-events: none; }
.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
}
.shape-1 { width: 500px; height: 500px; background: var(--gold); top: -100px; left: -100px; }
.shape-2 { width: 400px; height: 400px; background: #2ed6f5; bottom: -80px; right: -60px; }
.shape-3 { width: 300px; height: 300px; background: var(--gold); top: 50%; left: 60%; transform: translate(-50%,-50%); }

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  width: 420px;
  box-shadow: var(--shadow-gold), var(--shadow-lg);
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.logo-icon { flex-shrink: 0; }
.login-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold);
}
.login-subtitle { font-size: 12px; color: var(--text-secondary); letter-spacing: 1px; }
.login-form-title { font-size: 20px; font-weight: 700; margin-bottom: 24px; }
.login-error {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.4);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
}
.login-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 16px;
}
.password-wrapper {
  position: relative;
}
.password-wrapper input { width: 100%; padding-right: 44px; }
.toggle-pass {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; font-size: 16px; color: var(--text-muted);
  transition: var(--transition);
}
.toggle-pass:hover { color: var(--gold); }

/* ═══════════════════════════════════════════════════
   APP LAYOUT
═══════════════════════════════════════════════════ */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #050b1a 0%, #040810 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(212, 175, 55, 0.1);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-shadow: 4px 0 32px rgba(0,0,0,0.5);
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo-text {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold);
}
.sidebar-logo-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.sidebar-nav {
  flex: 1;
  min-height: 0; /* Critical fix: forces flex child to respect overflow */
  padding: 12px 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(212,175,55,0.2) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.2); border-radius: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(212,175,55,0.4); }
.nav-section-label {
  padding: 12px 20px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin: 2px 10px;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border-left: none;
  position: relative;
}
.nav-item:hover {
  color: var(--text-primary);
  background: rgba(212,175,55,0.07);
}
.nav-item.active {
  color: var(--gold-lt);
  background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05));
  border: 1px solid rgba(212,175,55,0.2);
  box-shadow: 0 0 20px rgba(212,175,55,0.08), inset 0 1px 0 rgba(255,255,255,0.05);
  font-weight: 600;
}
.nav-item.active .nav-icon { color: var(--gold-lt); }
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--navy), var(--gold));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff;
  flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-muted); }
.btn-logout {
  background: none; border: 1px solid var(--border);
  color: var(--text-muted); border-radius: var(--radius-sm);
  padding: 6px 10px; font-size: 16px;
  transition: var(--transition);
}
.btn-logout:hover { border-color: var(--red); color: var(--red); }

/* --- MAIN CONTENT --- */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- TOPBAR --- */
.topbar {
  height: var(--topbar-height);
  background: rgba(11, 17, 33, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
}
.sidebar-toggle {
  background: none; border: none;
  font-size: 20px; color: var(--text-secondary);
  padding: 4px; display: none;
  transition: var(--transition);
}
.sidebar-toggle:hover { color: var(--gold); }
.topbar-title {
  font-size: 18px;
  font-weight: 700;
  flex: 1;
}
.topbar-actions {
  display: flex; align-items: center; gap: 12px;
}
.topbar-date { font-size: 12px; color: var(--text-muted); }

/* --- PAGE CONTENT --- */
.page-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.page { display: none; animation: fadeIn 0.25s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}
.page-header p { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.card:hover { border-color: rgba(212,175,55,0.2); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.card-title { font-size: 15px; font-weight: 700; }
.card-filters { display: flex; gap: 8px; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════
   KPI CARDS
═══════════════════════════════════════════════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.kpi-card.gold  { background: rgba(212, 175, 55, 0.07); border-color: rgba(212, 175, 55, 0.2); }
.kpi-card.gold::before  { background: linear-gradient(90deg, #d4af37, #f0cc5a); }
.kpi-card.green { background: rgba(0, 214, 143, 0.07); border-color: rgba(0, 214, 143, 0.2); }
.kpi-card.green::before { background: linear-gradient(90deg, #00d68f, #00ffb3); }
.kpi-card.red   { background: rgba(255, 71, 87, 0.07);  border-color: rgba(255, 71, 87, 0.2); }
.kpi-card.red::before   { background: linear-gradient(90deg, #ff4757, #ff6b7a); }
.kpi-card.blue  { background: rgba(46, 214, 245, 0.07); border-color: rgba(46, 214, 245, 0.2); }
.kpi-card.blue::before  { background: linear-gradient(90deg, #2ed6f5, #7ef0ff); }
.kpi-card.purple{ background: rgba(165, 94, 234, 0.07); border-color: rgba(165, 94, 234, 0.2); }
.kpi-card.purple::before{ background: linear-gradient(90deg, #a55eea, #c77dff); }
.kpi-card.orange{ background: rgba(255, 165, 2, 0.07);  border-color: rgba(255, 165, 2, 0.2); }
.kpi-card.orange::before{ background: linear-gradient(90deg, #ffa502, #ffcc02); }
.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), var(--shadow-glow);
  border-color: rgba(212,175,55,0.3);
}

.kpi-icon { font-size: 30px; margin-bottom: 12px; }
.kpi-value { font-size: 26px; font-weight: 800; line-height: 1; margin-bottom: 6px; }
.kpi-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; text-transform: uppercase; letter-spacing: 0.8px; }
.kpi-change { font-size: 11px; color: var(--green); }

/* ═══════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════ */
.btn-primary {
  background: linear-gradient(135deg, #f0cc5a 0%, #d4af37 60%, #b8941e 100%);
  color: #0a0a0a;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.25), inset 0 1px 0 rgba(255,255,255,0.3);
  letter-spacing: 0.3px;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4), inset 0 1px 0 rgba(255,255,255,0.3);
  background: linear-gradient(135deg, #f5d468 0%, #e8c040 60%, #c9981e 100%);
}
.btn-gold-solid {
  background: var(--gold) !important;
  color: #0a0e1a !important;
}
.btn-gold-solid:hover {
  background: var(--gold-lt) !important;
  box-shadow: 0 0 20px rgba(212,175,55,0.5) !important;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm {
  padding: 7px 14px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}
.btn-sm:hover { border-color: var(--gold); color: var(--gold); }
.btn-gold { border-color: var(--gold); color: var(--gold); }
.btn-danger { border: 1px solid rgba(239,68,68,0.4); color: var(--red); background: transparent; padding: 6px 12px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; transition: var(--transition); }
.btn-danger:hover { background: rgba(239,68,68,0.15); }
.btn-success { border: 1px solid rgba(16,185,129,0.4); color: var(--green); background: transparent; padding: 6px 12px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; transition: var(--transition); }
.btn-success:hover { background: rgba(16,185,129,0.15); }
.btn-full { width: 100%; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }

/* ═══════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-group-full { grid-column: 1 / -1; }
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group select option { background: var(--bg-card); }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════ */
.table-wrapper { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  background: rgba(15, 21, 38, 0.95);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.data-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 14px;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}
.table-search {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.table-search input {
  flex: 1;
  min-width: 200px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}
.table-search input:focus { border-color: var(--gold); }
.table-search select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}
.table-count {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 0;
  text-align: right;
}

/* ═══════════════════════════════════════════════════
   STATUS BADGES
═══════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-green  { background: rgba(16,185,129,0.15); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.badge-red    { background: rgba(239,68,68,0.15);  color: var(--red);   border: 1px solid rgba(239,68,68,0.3); }
.badge-orange { background: rgba(245,158,11,0.15); color: var(--orange); border: 1px solid rgba(245,158,11,0.3); }
.badge-blue   { background: rgba(59,130,246,0.15); color: var(--blue);  border: 1px solid rgba(59,130,246,0.3); }
.badge-gold   { background: rgba(212,175,55,0.15); color: var(--gold);  border: 1px solid rgba(212,175,55,0.3); }
.badge-gray   { background: rgba(100,116,139,0.15); color: #64748b;     border: 1px solid rgba(100,116,139,0.3); }

/* ═══════════════════════════════════════════════════
   DASHBOARD CHARTS
═══════════════════════════════════════════════════ */
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.chart-card { margin-bottom: 0; }
.chart-card-sm { margin-bottom: 0; }
canvas { max-width: 100%; display: block; }

/* ═══════════════════════════════════════════════════
   ADMISSION FORM (MULTI-STEP)
═══════════════════════════════════════════════════ */
.admission-form-container { max-width: 800px; }

/* Receipt Banner at top of admission step 1 */
.admission-receipt-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--navy), #0d1628);
  border: 1px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 20px;
}
.receipt-banner-left, .receipt-banner-right { text-align: center; }
.receipt-banner-label { font-size: 10px; font-weight: 700; letter-spacing: 2px; color: var(--text-muted); text-transform: uppercase; }
.receipt-banner-value { font-size: 20px; font-weight: 800; color: var(--gold); font-family: monospace; }

/* Fee Summary Box in step 2 */
.fee-summary-box {
  background: linear-gradient(135deg, var(--navy), #0d1628);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.fee-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.fee-sum-row:last-child { border-bottom: none; }
.fee-sum-arrears { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--border-gold) !important; border-bottom: none !important; }
.fee-sum-arrears span { font-weight: 700; font-size: 15px; }
.fee-sum-arrears strong { font-size: 18px; }

.step-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.step span {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition);
}
.step div { font-size: 11px; color: var(--text-muted); white-space: nowrap; transition: var(--transition); }
.step.active span { border-color: var(--gold); background: var(--gold); color: #0a0e1a; }
.step.active div { color: var(--gold); }
.step.done span { border-color: var(--green); background: var(--green); color: #fff; }
.step.done div { color: var(--green); }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 8px; margin-top: -20px; }

.form-step { display: none; }
.form-step.active { display: block; }

/* Photo Upload */
.photo-upload-area {
  width: 120px; height: 140px;
  border: 2px dashed var(--border-gold);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; margin: 0 auto 24px;
  transition: var(--transition);
  overflow: hidden;
  background: var(--bg-input);
  text-align: center;
  padding: 12px;
}
.photo-upload-area:hover { border-color: var(--gold); background: var(--gold-dim); }
.photo-upload-area img { width: 100%; height: 100%; object-fit: cover; }
.photo-icon { font-size: 32px; margin-bottom: 6px; }
.photo-upload-area div { font-size: 11px; color: var(--text-muted); }
.photo-hint { font-size: 10px !important; color: var(--text-muted) !important; }

/* Admission Summary */
.admission-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.summary-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
}
.summary-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.summary-value { font-size: 13px; font-weight: 500; }

/* ═══════════════════════════════════════════════════
   FEE PAGE
═══════════════════════════════════════════════════ */
.fee-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.fee-filters input {
  flex: 1;
  min-width: 200px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}
.fee-filters input:focus { border-color: var(--gold); }
.fee-filters select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  color: var(--text-primary);
  outline: none;
}

/* ═══════════════════════════════════════════════════
   RECEIPTS PAGE
═══════════════════════════════════════════════════ */
.receipt-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.receipt-type-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.receipt-type-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
  background: var(--bg-card-hover);
}
.receipt-icon { font-size: 40px; margin-bottom: 12px; }
.receipt-type-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.receipt-type-desc { font-size: 12px; color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════
   HOSTEL PAGE
═══════════════════════════════════════════════════ */
.hostel-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  width: fit-content;
}
.hostel-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}
.hostel-tab.active { background: var(--gold); color: #0a0e1a; }
.hostel-tab:hover:not(.active) { color: var(--gold); }
.hostel-tab-content { display: none; }
.hostel-tab-content.active { display: block; }

.rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.room-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: var(--transition);
}
.room-card:hover { border-color: var(--border-gold); }
.room-number { font-size: 18px; font-weight: 800; color: var(--gold); margin-bottom: 4px; }
.room-type { font-size: 11px; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; }
.beds-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 12px; }
.bed {
  aspect-ratio: 1;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 600;
  transition: var(--transition);
}
.bed.occupied { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.4); color: var(--red); }
.bed.vacant { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.3); color: var(--green); }
.room-stats { font-size: 11px; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════
   BRANDING UPLOAD ZONE
═══════════════════════════════════════════════════ */
.branding-upload-zone {
  border: 2px dashed var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  background: rgba(212,175,55,0.03);
  transition: var(--transition);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.branding-upload-zone:hover {
  background: rgba(212,175,55,0.07);
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(212,175,55,0.08);
}

/* Category chips */
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 100px;
  padding: 5px 12px 5px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  transition: var(--transition);
}
.cat-chip:hover { background: rgba(212,175,55,0.17); }
.cat-chip-del {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 11px;
  padding: 0;
  line-height: 1;
  transition: var(--transition);
}
.cat-chip-del:hover { color: var(--red); }

/* ═══════════════════════════════════════════════════
   PERIOD FILTER BAR
═══════════════════════════════════════════════════ */
.filter-bar {
  padding: 16px 20px;
}
.filter-bar-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.filter-bar-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-bar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.filter-bar-group input[type="date"],
.filter-bar-group input[type="month"],
.filter-bar-group select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}
.filter-bar-group input:focus,
.filter-bar-group select:focus { border-color: var(--gold); }
.filter-search-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
  width: 100%;
  min-width: 200px;
}
.filter-search-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }

/* Period toggle pills */
.period-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
}
.period-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.period-btn:hover:not(.active) { color: var(--gold); background: rgba(212,175,55,0.06); }
.period-btn.active {
  background: var(--gold);
  color: #0a0e1a;
  box-shadow: 0 2px 8px rgba(212,175,55,0.3);
}

/* Active period label badge inside card-header */
.period-active-label { display: flex; align-items: center; }
.period-active-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(16,185,129,0.12);
  color: var(--green);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: 100px;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.period-active-badge.expense {
  background: rgba(239,68,68,0.12);
  color: var(--red);
  border-color: rgba(239,68,68,0.3);
}

/* ═══════════════════════════════════════════════════
   INCOME RECORDS
═══════════════════════════════════════════════════ */
.income-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.income-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.income-kpi-card::before {
  display: none;
}
.income-kpi-card.gold { background: rgba(212, 175, 55, 0.05); border-color: rgba(212, 175, 55, 0.2); }
.income-kpi-card.red { background: rgba(239, 68, 68, 0.05); border-color: rgba(239, 68, 68, 0.2); }
.income-kpi-card.green { background: rgba(16, 185, 129, 0.05); border-color: rgba(16, 185, 129, 0.2); }
.income-kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-gold); }

/* ═══════════════════════════════════════════════════
   EXPENSES
═══════════════════════════════════════════════════ */
.expense-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.expense-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}
.exp-cat-icon { font-size: 24px; margin-bottom: 4px; }
.exp-cat-label { font-size: 11px; color: var(--text-muted); }
.exp-cat-value { font-size: 16px; font-weight: 700; color: var(--gold); }

/* ═══════════════════════════════════════════════════
   REPORTS
═══════════════════════════════════════════════════ */
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.global-search-bar input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
}
.global-search-bar input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-top: 8px;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-input);
}
.search-result-item:hover { border-color: var(--gold); background: var(--bg-card-hover); }
.search-result-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}

/* Ledger */
.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 12px;
}
.ledger-table th { background: var(--navy); color: var(--gold); padding: 8px 10px; text-align: left; }
.ledger-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.ledger-total { font-weight: 700; color: var(--gold); font-size: 13px; margin-top: 8px; }

/* Ledger type toggle — All / Income / Expense */
.ledger-type-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
}
.ledger-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.ledger-tab:hover { color: var(--gold); background: rgba(212,175,55,0.08); }
.ledger-tab.active { background: var(--navy); color: var(--gold); }
.ledger-tab.income.active  { background: rgba(16,185,129,0.2); color: var(--green); }
.ledger-tab.expense.active { background: rgba(239,68,68,0.2); color: var(--red); }

/* ═══════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#printOverlay { z-index: 2000; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.modal-print { max-width: 700px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header-actions { display: flex; gap: 8px; align-items: center; }
.modal-title { font-size: 17px; font-weight: 700; }
.modal-close {
  background: none; border: none;
  color: var(--text-muted); font-size: 18px;
  transition: var(--transition);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.modal-close:hover { background: rgba(239,68,68,0.15); color: var(--red); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ═══════════════════════════════════════════════════
   PRINT TEMPLATES
═══════════════════════════════════════════════════ */
.print-receipt {
  background: #fff;
  color: #1a1a2e;
  border-radius: var(--radius-md);
  padding: 32px;
  font-family: var(--font-body);
}
.receipt-header {
  text-align: center;
  border-bottom: 3px double #1a2744;
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.receipt-academy-name {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #1a2744;
}
.receipt-academy-sub {
  font-size: 11px;
  color: #666;
  letter-spacing: 1px;
}
.receipt-title {
  font-size: 14px;
  font-weight: 700;
  color: #d4af37;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.receipt-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #444;
  margin: 8px 0;
}
.receipt-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.receipt-body table th {
  background: #1a2744;
  color: #d4af37;
  padding: 8px 12px;
  text-align: left;
}
.receipt-body table td {
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
}
.receipt-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 2px solid #1a2744;
  padding-top: 12px;
  margin-top: 12px;
}
.receipt-total-label { font-size: 14px; font-weight: 700; color: #1a2744; }
.receipt-total-amount { font-size: 20px; font-weight: 900; color: #d4af37; }
.receipt-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px dashed #ccc;
  font-size: 11px;
  color: #888;
}
.receipt-qr { text-align: center; margin-top: 12px; }
.receipt-qr canvas { display: inline-block; }

/* ID Card */
.id-card {
  background: linear-gradient(135deg, #1a2744, #0d1220);
  color: #fff;
  border-radius: 14px;
  padding: 24px;
  width: 340px;
  margin: 0 auto;
  border: 2px solid #d4af37;
  font-family: var(--font-body);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.id-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(212,175,55,0.4);
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.id-card-logo-text { font-size: 11px; font-weight: 800; letter-spacing: 2px; color: #d4af37; }
.id-card-logo-sub { font-size: 9px; color: #8892b0; letter-spacing: 1px; }
.id-card-body { display: flex; gap: 16px; align-items: flex-start; }
.id-card-photo {
  width: 80px; height: 96px;
  background: rgba(212,175,55,0.1);
  border: 2px solid #d4af37;
  border-radius: 8px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  color: #d4af37;
}
.id-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.id-card-info { flex: 1; }
.id-card-name { font-size: 15px; font-weight: 800; margin-bottom: 4px; color: #fff; }
.id-card-course { font-size: 11px; color: #d4af37; font-weight: 600; margin-bottom: 8px; }
.id-card-detail { font-size: 10px; color: #8892b0; margin-bottom: 3px; }
.id-card-detail strong { color: #e8eaf6; }
.id-card-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(212,175,55,0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.id-card-id { font-size: 12px; color: #d4af37; font-weight: 700; font-family: monospace; }
.id-card-validity { font-size: 10px; color: #8892b0; }

/* ═══════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 380px;
}
.toast-success { border-left: 3px solid var(--green); }
.toast-error   { border-left: 3px solid var(--red); }
.toast-info    { border-left: 3px solid var(--blue); }
.toast-warning { border-left: 3px solid var(--orange); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* ═══════════════════════════════════════════════════
   STUDENT CARD (in table)
═══════════════════════════════════════════════════ */
.student-mini-photo {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-gold);
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}
.student-name-cell { display: flex; align-items: center; gap: 10px; }

/* ═══════════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-text { font-size: 14px; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 900px)
═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  /* Sidebar becomes a slide-in drawer */
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
    z-index: 200;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 32px rgba(0,0,0,0.6);
  }

  /* Sidebar overlay backdrop */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
    z-index: 150;
  }
  .sidebar-overlay.show { display: block; }

  /* Main content fills full width */
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; }

  /* Topbar adjustments */
  .topbar { padding: 0 16px; gap: 10px; }
  .topbar-date { display: none; }

  /* Stacked layouts */
  .charts-row { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .admission-summary { grid-template-columns: 1fr 1fr; }
  .report-grid { grid-template-columns: 1fr; }

  /* Page header wraps nicely */
  .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-header h1 { font-size: 20px; }
  .header-actions { width: 100%; justify-content: flex-start; }

  /* Filter bar scrolls horizontally */
  .filter-bar-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .filter-bar-group { flex-shrink: 0; }
  .period-toggle { flex-shrink: 0; }

  /* Modal fills most of screen */
  .modal { max-width: 96vw; max-height: 92vh; border-radius: var(--radius-lg); }

  /* Table: ensure horizontal scroll */
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 560px; }

  /* Toast: bottom-center on tablet */
  .toast-container { right: 50%; transform: translateX(50%); bottom: 16px; }
  .toast { min-width: 260px; }

  /* Hostel tabs scroll */
  .hostel-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
  .hostel-tab { white-space: nowrap; }

  /* Receipt type grid */
  .receipt-type-grid { grid-template-columns: 1fr 1fr; }

  /* Step indicator: compress text */
  .step div { font-size: 10px; }
  .step-line { margin: 0 4px; margin-top: -20px; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 600px)
═══════════════════════════════════════════════════ */
@media (max-width: 600px) {
  /* Typography */
  body { font-size: 13px; }

  /* Page content - tighter padding */
  .page-content { padding: 12px; }

  /* Login */
  .login-card {
    padding: 28px 20px;
    width: calc(100% - 32px);
    max-width: 400px;
    border-radius: var(--radius-lg);
  }
  .shape-1, .shape-2, .shape-3 { opacity: 0.06; }

  /* Topbar */
  .topbar { padding: 0 12px; height: 56px; gap: 8px; }
  --topbar-height: 56px;
  .topbar-title { font-size: 15px; }

  .kpi-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr);
    gap: 8px; 
    margin-bottom: 12px; 
  }
  .kpi-card { 
    padding: 12px; 
    gap: 4px; 
  }
  .kpi-icon { font-size: 18px; }
  .kpi-value { font-size: 16px; }
  .kpi-label { font-size: 9px; }

  /* Charts: single column, reduced height */
  .charts-row { grid-template-columns: 1fr; gap: 12px; }

  /* Cards */
  .card { padding: 14px; border-radius: var(--radius-md); }
  .card-header { margin-bottom: 12px; }
  .card-title { font-size: 14px; }

  /* Page header: stack */
  .page-header { margin-bottom: 14px; }
  .page-header h1 { font-size: 18px; }
  .page-header p { font-size: 12px; }
  .header-actions { gap: 6px; flex-wrap: wrap; }

  /* Buttons: touch-friendly */
  .btn-primary, .btn-outline { padding: 10px 16px; font-size: 13px; min-height: 40px; }
  .btn-sm { padding: 8px 12px; min-height: 36px; }
  .btn-danger, .btn-success { min-height: 34px; padding: 7px 12px; }

  /* Forms */
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .form-group { margin-bottom: 12px; }
  .form-group input,
  .form-group select,
  .form-group textarea { padding: 10px 12px; font-size: 14px; }
  .form-actions {
    flex-direction: column-reverse;
    gap: 8px;
  }
  .form-actions button { width: 100%; }

  /* Tables: horizontal scroll, smaller text */
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); }
  .data-table { min-width: 500px; font-size: 12px; }
  .data-table th { padding: 8px 10px; }
  .data-table td { padding: 10px 10px; }
  .table-search { flex-direction: column; gap: 8px; }
  .table-search input { min-width: 0; width: 100%; }
  .table-search select { width: 100%; }
  .table-count { text-align: left; }

  /* Filter bar: stacks on very small screens */
  .filter-bar { padding: 12px; }
  .filter-bar-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .filter-bar-group input,
  .filter-bar-group select { width: 100%; }
  .period-toggle { width: fit-content; }
  .filter-search-input { min-width: 0; }

  /* Admission form */
  .admission-form-container { max-width: 100%; }
  .admission-summary { grid-template-columns: 1fr; }
  .step-indicator { overflow-x: auto; padding-bottom: 4px; }
  .step div { display: none; } /* hide labels on very small screens */
  .admission-receipt-banner { flex-direction: column; gap: 10px; text-align: center; }
  .receipt-banner-left, .receipt-banner-right { text-align: center; }

  /* Fee summary */
  .fee-sum-row { font-size: 13px; }

  /* Fee filters */
  .fee-filters { flex-direction: column; }
  .fee-filters input, .fee-filters select { width: 100%; min-width: 0; }

  /* Income KPI */
  .income-kpi { grid-template-columns: 1fr 1fr; gap: 10px; }
  .income-kpi-card { padding: 14px; }

  /* Expense KPI */
  .expense-kpi { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }

  /* Hostel tabs: scrollable */
  .hostel-tabs { overflow-x: auto; width: 100%; }
  .hostel-tab { padding: 7px 14px; font-size: 12px; }

  /* Rooms grid: 2 columns */
  .rooms-grid { grid-template-columns: 1fr 1fr; }

  /* Receipt type cards */
  .receipt-type-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .receipt-type-card { padding: 18px 12px; }
  .receipt-icon { font-size: 28px; margin-bottom: 8px; }
  .receipt-type-name { font-size: 13px; }
  .receipt-type-desc { font-size: 11px; }

  /* Modals: full-screen sheet on mobile */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    animation: sheetIn 0.25s ease;
  }
  .modal-print { border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  @keyframes sheetIn {
    from { transform: translateY(100%); opacity: 0.6; }
    to   { transform: translateY(0);    opacity: 1; }
  }
  .modal-body { padding: 16px; }
  .modal-header { padding: 14px 16px; }
  .modal-footer {
    padding: 12px 16px;
    flex-direction: column;
    gap: 8px;
  }
  .modal-footer button { width: 100%; }

  /* Toast: full-width bottom bar */
  .toast-container { right: 12px; left: 12px; bottom: 12px; transform: none; }
  .toast { min-width: 0; max-width: 100%; width: 100%; }

  /* Ledger table */
  .ledger-type-toggle { width: 100%; }
  .ledger-tab { flex: 1; text-align: center; padding: 6px 8px; }

  /* Student mini photo */
  .student-mini-photo { width: 30px; height: 30px; font-size: 11px; }

  /* Report grid */
  .report-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Sidebar footer: compact */
  .sidebar-footer { padding: 12px 16px; }

  /* Scrollbar hidden on mobile (better UX) */
  ::-webkit-scrollbar { width: 0; height: 0; }

  /* Empty state: compact */
  .empty-state { padding: 32px 16px; }
  .empty-state-icon { font-size: 36px; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — VERY SMALL (≤ 380px)
═══════════════════════════════════════════════════ */
@media (max-width: 380px) {
  /* .kpi-grid { grid-template-columns: 1fr; } removed to maintain horizontal slider */
  .income-kpi { grid-template-columns: 1fr; }
  .rooms-grid { grid-template-columns: 1fr; }
  .receipt-type-grid { grid-template-columns: 1fr; }
  .admission-summary { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 16px; }
  .kpi-value { font-size: 20px; }
}

/* ═══════════════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════════════════════
   PRINT STYLES
═══════════════════════════════════════════════════ */
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .modal-header, .modal-footer, .btn-sm, .btn-primary { display: none !important; }
  .modal-overlay { position: static !important; background: none !important; }
  .modal { box-shadow: none !important; border: none !important; max-height: none !important; }
  .modal-body { overflow: visible !important; }
}


/* ═══════════════════════════════════════════════════
   PREMIUM UI OVERRIDES
═══════════════════════════════════════════════════ */
.premium-glass {
  background: rgba(20, 29, 53, 0.7) !important;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.1) !important;
}

.login-header-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-premium {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(20,29,53,0.8), rgba(26,36,68,0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.login-title {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-lt), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.02em;
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.login-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  margin: 24px 0;
}

.premium-input-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.premium-input-group label i {
  font-size: 1rem;
  color: var(--gold);
}

.premium-input-group input {
  background: rgba(13, 18, 32, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px !important;
  padding: 14px 16px !important;
  transition: all 0.3s ease !important;
  font-size: 0.95rem !important;
}

.premium-input-group input:focus {
  background: rgba(13, 18, 32, 0.9) !important;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1) !important;
}

.premium-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px !important;
  padding: 14px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  background: linear-gradient(135deg, var(--gold), #9A7B1C) !important;
  border: none !important;
  color: #111 !important;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3) !important;
  transition: all 0.3s ease !important;
}

.premium-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4) !important;
  background: linear-gradient(135deg, var(--gold-lt), var(--gold)) !important;
}

.premium-btn:active {
  transform: translateY(0);
}

.premium-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.premium-icon-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

/* Phosphor Icons alignment fix */
i[class^="ph"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  margin: 4px 16px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.sidebar-nav .nav-item:hover {
  background: rgba(255,255,255,0.04);
  transform: translateX(4px);
}

.sidebar-nav .nav-item.active {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, transparent 100%);
  color: var(--gold);
  border-left: 3px solid var(--gold);
  padding-left: 17px;
}

.sidebar-nav .nav-icon {
  font-size: 1.25rem;
  margin-right: 12px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.sidebar-nav .nav-item.active .nav-icon,
.sidebar-nav .nav-item:hover .nav-icon {
  color: var(--gold);
}

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.login-error i {
  font-size: 1.1rem;
  color: var(--red);
}
\n
/* ═══════════════════════════════════════════════════
   MOBILE-FIRST UX REDESIGN (max-width: 600px)
═══════════════════════════════════════════════════ */
@media (max-width: 600px) {

  /* 1. Touch-Optimized Inputs & Buttons */
  input[type="text"], input[type="password"], input[type="number"], 
  input[type="date"], input[type="month"], select, 
  .btn-primary, .btn-secondary, .btn-danger, .btn-full {
    height: 48px; /* Minimum touch target size */
    font-size: 15px;
  }
  
  .data-table tr {
      background: var(--bg-card);
      border: 1px solid var(--border-gold);
      border-radius: var(--radius-md);
      margin-bottom: 12px;
      padding: 8px 12px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    .data-table td {
      display: block;
      text-align: right;
      padding: 8px 0 8px 45%;
      position: relative;
      border-bottom: 1px dashed var(--border);
      min-height: 32px;
      word-break: break-word;
    }
    .data-table td:last-child {
      border-bottom: none;
    }
    .data-table td::before {
      content: attr(data-label);
      position: absolute;
      left: 0;
      width: 42%;
      padding-right: 6px;
      white-space: normal;
      word-break: break-word;
      text-align: left;
      font-size: 10px;
      font-weight: 700;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      top: 50%;
      transform: translateY(-50%);
    }

  /* 2. Mobile Bottom Navigation */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0,0,0,0.05);
    z-index: 999;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.04);
  }
  
  .dark-mode .mobile-bottom-nav {
    background: rgba(26, 29, 36, 0.85);
    border-top: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .bottom-nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
  }

  .bottom-nav-item.active {
    color: var(--gold);
  }
  
  .bottom-nav-item.active i {
    transform: translateY(-2px);
  }

  /* Make room for bottom nav in main content */
  .main-content {
    padding-bottom: 80px !important; 
  }
  
  /* Hide sidebar on mobile completely, rely on bottom nav for main menu */
  .sidebar {
    width: 85vw; /* Wider sidebar on mobile for better tap targets */
  }

  /* 3. Floating Action Buttons (FABs) */
  /* Target header-actions on mobile to become FABs */
  .page-header .header-actions {
    position: fixed;
    bottom: 80px; /* Above bottom nav */
    right: 16px;
    z-index: 900;
    width: auto;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
  }
  
  .page-header .header-actions button {
    height: 56px;
    border-radius: 28px;
    padding: 0 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
  }
  
  .page-header .header-actions button i {
    font-size: 24px;
  }

  /* 4. Bottom Sheet Modals */
  .modal-overlay {
    align-items: flex-end; /* Push to bottom */
  }
  
  .modal {
    max-width: 100vw;
    width: 100%;
    max-height: 90vh;
    border-radius: 24px 24px 0 0;
    margin: 0;
    animation: slideUpSheet 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  
  @keyframes slideUpSheet {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  
  /* 5. Mobile Data Tables -> Horizontally Scrollable with Visual Cues */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: inset -10px 0 10px -10px rgba(0,0,0,0.1);
    padding-bottom: 8px; /* For scrollbar */
  }
  
  /* Make table headers sticky on mobile so they don't lose context */
  .data-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-surface);
  }
  
  .data-table {
    min-width: 650px;
  }
  
  /* Make action buttons stack on mobile if too tight */
  .action-btns {
    flex-wrap: wrap;
    gap: 4px;
  }
  
  /* 6. Dashboard KPI Grid for Mobile */
  #kpiGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  .kpi-card {
    padding: 16px;
    align-items: flex-start;
  }
  
  .kpi-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
    margin-bottom: 8px;
  }
  
  .kpi-value {
    font-size: 20px;
  }
  
  .kpi-label {
    font-size: 11px;
    text-align: left;
  }

}

/* Hide mobile bottom nav on desktop */
@media (min-width: 601px) {
  .mobile-bottom-nav {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════
   PHOTO CAPTURE WIDGET
═══════════════════════════════════════════════════ */
.photo-capture-widget {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Preview / stream zone */
.photo-preview-zone {
  width: 180px;
  height: 210px;
  border-radius: 12px;
  border: 2px dashed rgba(212,175,55,0.3);
  background: rgba(6,11,22,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: border-color 0.3s ease;
}

.photo-preview-zone:hover {
  border-color: rgba(212,175,55,0.5);
}

.photo-preview-zone img.photo-result {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.photo-preview-zone video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* Placeholder content */
.photo-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px;
}

.photo-placeholder-inner i {
  font-size: 52px;
  color: var(--text-muted);
}

.photo-ph-label {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.photo-ph-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  opacity: 0.6;
}

/* Source selection row */
.photo-source-btns,
.photo-camera-controls,
.photo-edit-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.photo-src-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.photo-src-btn:hover {
  background: rgba(212,175,55,0.1);
  border-color: rgba(212,175,55,0.3);
  color: var(--gold);
}

.photo-src-btn--danger {
  background: rgba(255,71,87,0.08);
  border-color: rgba(255,71,87,0.25);
  color: #ff4757;
}

.photo-src-btn--danger:hover {
  background: rgba(255,71,87,0.15);
  color: #ff4757;
}

/* Snap button — big red capture trigger */
.photo-snap-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  border: 2px solid #ff4757;
  background: rgba(255,71,87,0.12);
  color: #ff4757;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.photo-snap-btn:hover {
  background: #ff4757;
  color: #fff;
  box-shadow: 0 0 24px rgba(255,71,87,0.4);
}

.photo-snap-btn i {
  font-size: 20px;
}

/* Passport BG button — vivid blue (remove.bg powered) */
.photo-bg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid rgba(26,117,187,0.6);
  background: rgba(26,117,187,0.15);
  color: #5ba4ff;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.3px;
}

.photo-bg-btn:hover {
  background: #1a75bb;
  color: #fff;
  box-shadow: 0 0 20px rgba(26,117,187,0.5);
  border-color: #1a75bb;
}

.photo-bg-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Spinner for loading states */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.ph-spinner, .ph-spinner-gap, .ph-spin {
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/*  ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
   RESPONSIVE DATA TABLES (MOBILE CARD LAYOUT)
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? */
@media (max-width: 768px) {
  .data-table thead {
    display: none;
  }
  .data-table, .data-table tbody, .data-table tr, .data-table td {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .data-table tr {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
  .data-table td {
    text-align: right;
    padding: 10px 0 10px 45%;
    position: relative;
    border-bottom: 1px dashed var(--border);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 40px;
  }
  .data-table td:last-child {
    border-bottom: none;
  }
  .data-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 40%;
    padding-right: 10px;
    white-space: nowrap;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    top: 50%;
    transform: translateY(-50%);
  }
  /* Specific tweaks for badges/buttons to align properly in card layout */
  .data-table td > .badge, .data-table td > .btn-sm {
    margin-left: auto;
  }
}

/* Hide delete buttons for non-admins */
body:not([data-role='admin']) button[onclick^='delete'] {
  display: none !important;
}



/* ═══════════════════════════════════════════════════
   MODERN UI OVERRIDES (ANIMATIONS & GLASSMORPHISM)
═══════════════════════════════════════════════════ */

/* Smooth Card Hover Effects */
.card, .stat-card, .menu-grid-item, .ledger-card {
  transition: var(--transition);
  border: 1px solid var(--border);
}
.stat-card:hover, .menu-grid-item:hover, .ledger-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--border-gold);
}
.card:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--border-gold);
}

/* Button Animations */
button, .btn-primary, .btn-secondary, .btn-danger, .btn-gold, .btn-outline {
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}
button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.1);
}
button:active {
  transform: translateY(0) scale(0.97);
}

/* Glassmorphism for Topbar & Sidebar */
.topbar {
  background: rgba(15, 23, 42, 0.7) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.sidebar {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
}

/* Table Row Hover Animations */
.data-table tbody tr {
  transition: var(--transition-fast);
}
.data-table tbody tr:hover {
  background-color: var(--bg-card-hover) !important;
  transform: scale(1.005);
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  z-index: 10;
  position: relative;
}

/* Input Focus Glow */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px var(--gold-dim) !important;
  background-color: var(--bg-card) !important;
}

/* Modal Pop-in Animation Enhancement */
.modal-content {
  animation: modalPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  background: rgba(30, 41, 59, 0.95) !important;
  backdrop-filter: blur(24px);
  border: 1px solid rgba(234, 179, 8, 0.2);
  box-shadow: var(--shadow-lg), var(--shadow-glow-active);
}

@keyframes modalPopIn {
  0% { transform: scale(0.85) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Badges with Soft Backgrounds */
.badge-green { background: rgba(16, 185, 129, 0.15) !important; color: #10b981 !important; border: 1px solid rgba(16,185,129,0.3) !important; }
.badge-red { background: rgba(239, 68, 68, 0.15) !important; color: #ef4444 !important; border: 1px solid rgba(239,68,68,0.3) !important; }
.badge-orange { background: rgba(245, 158, 11, 0.15) !important; color: #f59e0b !important; border: 1px solid rgba(245,158,11,0.3) !important; }
.badge-blue { background: rgba(59, 130, 246, 0.15) !important; color: #3b82f6 !important; border: 1px solid rgba(59,130,246,0.3) !important; }

/* ═══════════════════════════════════════════════════
   FULL MOBILE RESPONSIVENESS OVERRIDES
═══════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Base Spacing & Layout */
  .main-content {
    padding: 16px 12px !important;
    margin-top: 60px !important; /* Slightly smaller topbar */
  }
  
  .topbar {
    height: 60px !important;
    padding: 0 12px !important;
  }
  
  /* Cards & Containers */
  .card, .stat-card, .ledger-card {
    padding: 16px !important;
    border-radius: var(--radius-md) !important;
    margin-bottom: 16px !important;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .stat-card .stat-icon {
    font-size: 24px !important;
    padding: 10px !important;
  }

  /* Typography */
  h1, .page-title {
    font-size: 22px !important;
    margin-bottom: 16px !important;
  }
  h2, .card-title {
    font-size: 16px !important;
    margin-bottom: 12px !important;
  }
  .stat-value {
    font-size: 20px !important;
  }
  
  /* Modals */
  .modal-content {
    width: 95% !important;
    padding: 20px 16px !important;
    margin: 10px auto !important;
    border-radius: var(--radius-md) !important;
  }
  .modal-close {
    top: 12px !important;
    right: 12px !important;
    font-size: 24px !important;
  }

  /* Forms & Inputs */
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  input, select, textarea {
    padding: 10px 14px !important;
    font-size: 14px !important;
  }
  .form-group label {
    font-size: 12px !important;
    margin-bottom: 6px !important;
  }
  
  /* Buttons */
  button, .btn-primary, .btn-secondary, .btn-danger, .btn-gold, .btn-outline {
    padding: 10px 16px !important;
    font-size: 14px !important;
    width: auto;
  }
  .modal-content .form-actions button {
    width: 100% !important;
    margin-bottom: 8px !important;
  }
  .modal-content .form-actions {
    flex-direction: column !important;
  }

  /* Tables */
  .table-responsive {
    border-radius: var(--radius-md) !important;
    margin: 0 -12px !important; /* Full width bleeding on mobile */
    width: calc(100% + 24px) !important;
  }
  .data-table th, .data-table td {
    padding: 10px 12px !important;
    font-size: 12px !important;
  }
  .data-table th {
    white-space: nowrap !important;
  }

  /* Sidebar tweaks for mobile */
  .sidebar {
    width: 260px !important;
    padding: 16px 12px !important;
  }
  .nav-item {
    padding: 12px 16px !important;
    margin-bottom: 6px !important;
    font-size: 14px !important;
  }
  .nav-icon {
    font-size: 18px !important;
  }

  /* Filters & Actions */
  .filters-row, .page-header-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .search-box {
    width: 100% !important;
  }
  .search-box input {
    width: 100% !important;
  }
}

.table-search { position: relative; z-index: 10; pointer-events: auto; }
.table-search input, .table-search select { position: relative; z-index: 10; pointer-events: auto; }