@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Light Theme Variables */
  --bg: #f4f7f6;
  --bg2: #ffffff;
  --bg3: #eef2f5;
  --glass: rgba(255, 255, 255, 0.85);
  --glass2: rgba(255, 255, 255, 0.5);
  --border: rgba(15, 23, 42, 0.08);
  --border2: rgba(15, 23, 42, 0.04);
  
  --primary: #2563eb;
  --primary-light: rgba(37, 99, 235, 0.1);
  --secondary: #4f46e5;
  --accent: #0ea5e9;
  
  --text: #0f172a;
  --muted: #64748b;
  --dim: #334155;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --r: 16px;
  --rs: 8px;
  --rl: 24px;
  
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-float: 0 15px 35px rgba(37, 99, 235, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
  font-family: 'Plus Jakarta Sans', sans-serif; 
  background: var(--bg); 
  color: var(--text); 
  min-height: 100vh; 
  overflow-x: hidden; 
  background-image: radial-gradient(circle at 15% 50%, rgba(37,99,235,0.03), transparent 25%),
                    radial-gradient(circle at 85% 30%, rgba(79,70,229,0.03), transparent 25%);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Layout */
.app-layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 100;
  transition: transform 0.3s ease;
  box-shadow: 4px 0 24px rgba(0,0,0,0.02);
  overflow: clip;
}

.sidebar-logo {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border2);
}

.pins-logo-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.sidebar-nav { 
  flex: 1;
  min-height: 0;
  max-height: 100%;
  padding: 20px 16px 60px 16px;
  overflow-y: scroll;
  overflow-x: hidden;
  display: flex; 
  flex-direction: column; 
  gap: 4px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.nav-section { margin-top: 16px; margin-bottom: 8px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; padding-left: 12px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--dim);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
}

.nav-item:hover { background: var(--bg3); color: var(--primary); }
.nav-item.active { 
  background: var(--primary); 
  color: white; 
  box-shadow: 0 4px 12px rgba(37,99,235,0.2);
}
.nav-icon { font-size: 18px; }

/* Top Navigation (Floating) */
.main-content { margin-left: 280px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 90;
}

/* Floating Center Nav */
.center-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg2);
  padding: 8px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  animation: floatNav 4s ease-in-out infinite;
}

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

.center-nav-item {
  padding: 10px 24px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
  color: var(--dim);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.center-nav-item:hover {
  background: var(--bg3);
  color: var(--primary);
}

.center-nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* AI Touch / Elegant Logo Area */
.hero-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: var(--rl);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.hero-logo-container::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at center, rgba(37,99,235,0.05) 0%, transparent 50%);
  animation: rotateBg 20s linear infinite;
}

@keyframes rotateBg { 100% { transform: rotate(360deg); } }

.pins-logo-large {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border: 4px solid white;
  z-index: 1;
  position: relative;
  background: white;
}

.school-title {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-top: 16px;
  z-index: 1;
  position: relative;
}

.school-subtitle {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
  z-index: 1;
  position: relative;
}

/* Content Area */
.content { padding: 32px; flex: 1; max-width: 1400px; margin: 0 auto; width: 100%; }

/* Cards & Stats */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.card {
  background: var(--bg2);
  border-radius: var(--r);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.si-blue { background: #eff6ff; color: #3b82f6; }
.si-purple { background: #f5f3ff; color: #8b5cf6; }
.si-green { background: #ecfdf5; color: #10b981; }
.si-orange { background: #fff7ed; color: #f97316; }

.stat-info { flex: 1; }
.stat-value { font-size: 28px; font-weight: 800; font-family: 'Outfit', sans-serif; color: var(--text); line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 500; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 10px; font-weight: 600; font-size: 14px;
  cursor: pointer; transition: all 0.2s; border: none; font-family: inherit;
}
.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(37,99,235,0.2); }
.btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37,99,235,0.3); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--dim); }
.btn-outline:hover { background: var(--bg3); color: var(--text); }
.btn-icon { padding: 8px; border-radius: 8px; }

/* AI Assistant Badge */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 100%);
  border: 1px solid #bae6fd;
  border-radius: 20px;
  color: #0284c7;
  font-size: 12px;
  font-weight: 700;
}

/* Forms & Inputs */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--dim); margin-bottom: 8px; }
.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.search-bar { position: relative; }
.search-bar input { padding-left: 40px; border-radius: 20px; background: var(--bg3); border: none; }
.search-bar .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Tables */
.table-container {
  width: 100%;
  overflow-x: auto;
  background: var(--bg2);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
table { width: 100%; border-collapse: collapse; }
th { 
  background: #f8fafc; 
  padding: 16px; 
  text-align: left; 
  font-size: 12px; 
  font-weight: 700; 
  color: var(--muted); 
  text-transform: uppercase; 
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
td { 
  padding: 16px; 
  border-bottom: 1px solid var(--border2); 
  font-size: 14px; 
  color: var(--dim);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }

/* Status Badges */
.badge { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0f2fe; color: #075985; }

/* Mobile Support & Responsive Optimization */
.mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text); padding: 4px; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 99; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

/* Prevent page scroll when mobile sidebar is open */
body.sidebar-open {
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: 10px 0 30px rgba(0,0,0,0.15); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; width: 100%; }
  .mobile-menu-btn { display: block; }
  .center-nav { gap: 8px; padding: 6px; }
  .center-nav-item { padding: 8px 16px; font-size: 13px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .sidebar-overlay.show { display: block; }
}

@media (max-width: 640px) {
  /* Sidebar takes full screen width on mobile */
  .sidebar {
    width: 100% !important;
    max-width: 320px;
    /* Stop sidebar going behind bottom nav */
    height: calc(100vh - 65px);
    height: calc(100dvh - 65px);
    padding-bottom: 0;
  }

  /* Sidebar nav gets extra bottom padding so Logout clears the bottom nav */
  .sidebar-nav {
    padding-bottom: 80px !important;
  }

  /* Overlay sits above bottom nav */
  .sidebar-overlay {
    z-index: 150 !important;
  }

  /* Sidebar itself above overlay */
  .sidebar {
    z-index: 160 !important;
  }
}

/* ── Mobile Bottom Nav Bar ── */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 640px) {
  /* Hide the topbar center-nav on small phones — use bottom bar instead */
  .center-nav { display: none !important; }

  /* Push content up so the bottom nav doesn't overlap it */
  .content { padding-bottom: 80px; }

  /* Bottom nav bar */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    padding: 6px 0 env(safe-area-inset-bottom, 6px);
  }

  .mobile-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px;
    cursor: pointer;
    color: var(--dim);
    font-size: 10px;
    font-weight: 600;
    transition: all 0.2s;
    position: relative;
    border-radius: 12px;
    margin: 2px 4px;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-nav-item i {
    font-size: 20px;
    transition: transform 0.2s;
  }

  .mobile-bottom-nav-item:active i {
    transform: scale(0.85);
  }

  .mobile-bottom-nav-item.active {
    color: var(--primary);
    background: var(--primary-light);
  }

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

  .mobile-bottom-nav-dot {
    position: absolute;
    top: 4px;
    right: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 6px var(--primary);
    animation: pulse 2s infinite;
  }

  .mobile-bottom-nav-dot.amber {
    background: #f59e0b;
    box-shadow: 0 0 6px #f59e0b;
  }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 16px; }
  .topbar { height: 65px; padding: 0 16px; }
  .content { padding: 16px 16px 90px 16px; }
  
  /* Topbar Mobile Fit */
  .ai-badge { padding: 6px 8px; font-size: 11px; }
  .ai-badge i { margin: 0; }
  .ai-badge:not(:hover) { width: 28px; height: 28px; padding: 0; justify-content: center; border-radius: 50%; overflow: hidden; }
  .ai-badge:not(:hover) i { font-size: 14px; }
  .topbarName-container span:first-child { display: none !important; }
  .topbarName-container #topbarName { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; display: inline-block; }
  
  /* Hero Section Mobile Fit */
  .hero-logo-container { padding: 24px 16px; margin-bottom: 20px; }
  .pins-logo-large { width: 100px; height: 100px; border-width: 3px; }
  .school-title { font-size: 22px; margin-top: 12px; text-align: center; }
  .school-subtitle { font-size: 13px; text-align: center; }
  
  /* Tables Touch Scrolling */
  .table-container { border-radius: 12px; -webkit-overflow-scrolling: touch; }
  th, td { white-space: nowrap; padding: 12px 14px; font-size: 13px; }
  
  /* Modals Mobile Fit */
  .modal-content { margin: 16px; width: calc(100% - 32px); border-radius: 18px; }
  .modal-header { padding: 16px 20px; }
  .modal-body { padding: 16px 20px; max-height: 65vh; }
  .modal-footer { padding: 12px 20px; }
  
  /* AI Chat Window Mobile Fit */
  .ai-chat-window {
    width: 100% !important;
    height: 100% !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    top: 0 !important;
    border-radius: 0 !important;
    z-index: 2000 !important;
  }
  .ai-chat-header { padding: 16px 20px 24px 20px; }
  .ai-chat-body { padding: 24px 16px 16px 16px; }
}

@media (max-width: 380px) {
  /* Extra Small Screens */
  .topbar { padding: 0 12px; }
  .topbarName-container { font-size: 14px !important; }
}

/* AI Insights Panel */
.ai-insight {
  background: linear-gradient(to right, #f0f9ff, #e0e7ff);
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 var(--rs) var(--rs) 0;
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.ai-insight-icon { font-size: 24px; }
.ai-insight-content h4 { font-size: 14px; font-weight: 700; color: #1e3a8a; margin-bottom: 4px; }
.ai-insight-content p { font-size: 13px; color: #3b82f6; line-height: 1.5; }

/* Toasts & Modals */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,0.4); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: 0.3s; }
.modal-backdrop.show { opacity: 1; pointer-events: auto; }
.modal-content { background: var(--bg2); width: 100%; max-width: 500px; border-radius: var(--rl); box-shadow: 0 20px 40px rgba(0,0,0,0.1); transform: translateY(20px); transition: 0.3s; }
.modal-backdrop.show .modal-content { transform: translateY(0); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border2); display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-size: 18px; font-weight: 700; font-family: 'Outfit', sans-serif; }
.modal-body { padding: 24px; max-height: 70vh; overflow-y: auto; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border2); display: flex; justify-content: flex-end; gap: 12px; }

.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 12px; }
.toast { background: white; border-radius: 12px; padding: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-left: 4px solid var(--primary); display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; min-width: 300px; animation: slideIn 0.3s forwards; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Glass Bubble Shine Effect */
.btn, .nav-item, .center-nav-item, .stat-card {
  position: relative;
  overflow: hidden;
}

.btn::after, .nav-item::after, .center-nav-item::after, .stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  pointer-events: none;
  z-index: 10;
}

.btn:hover::after, .nav-item:hover::after, .center-nav-item:hover::after, .stat-card:hover::after {
  left: 150%;
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --bg: #0f172a;
  --bg2: #1e293b;
  --bg3: #334155;
  --glass: rgba(30, 41, 59, 0.85);
  --glass2: rgba(30, 41, 59, 0.5);
  --border: rgba(255, 255, 255, 0.1);
  --border2: rgba(255, 255, 255, 0.05);
  
  --primary: #3b82f6;
  --primary-light: rgba(59, 130, 246, 0.2);
  --secondary: #6366f1;
  --accent: #38bdf8;
  
  --text: #f8fafc;
  --muted: #94a3b8;
  --dim: #cbd5e1;
  
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .hero-logo-container { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); }
[data-theme="dark"] .ai-chat-window, [data-theme="dark"] .ai-chat-input-area, [data-theme="dark"] .ai-chat-footer { background: #1e293b; }
[data-theme="dark"] .ai-chat-body { background: #0f172a; }
[data-theme="dark"] .chat-ai { background: #334155; color: white; border-color: #475569; }
[data-theme="dark"] th { background: #1e293b; color: #cbd5e1; }
[data-theme="dark"] tr:hover td { background: rgba(255,255,255,0.02); }
[data-theme="dark"] .report-card-builder { background: #1e293b !important; color: white !important; }
[data-theme="dark"] .report-card-builder input { color: white !important; }
[data-theme="dark"] .report-card-builder table th { background: #334155 !important; color: white !important; }

@media print {
  body * {
    visibility: hidden;
  }
  #printArea, #printArea * {
    visibility: visible;
  }
  #printArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: none !important;
    box-shadow: none !important;
    padding: 20px !important;
    background: white !important;
    color: black !important;
  }
  /* Ensure background colors and gradients print correctly */
  * {
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
}

/* Zigzag Timeline Showcase */
.our-work-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 0;
}

.zigzag-timeline {
  position: relative;
  margin: 60px auto;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.timeline-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.timeline-item {
  display: flex;
  width: 100%;
  margin-bottom: 80px;
  position: relative;
  z-index: 2;
}

.timeline-left {
  justify-content: flex-start;
}

.timeline-right {
  justify-content: flex-end;
}

.timeline-card {
  width: 46%;
  background: var(--bg2);
  border-radius: var(--rl);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  gap: 20px;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.timeline-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.timeline-left .timeline-card {
  flex-direction: row;
}

.timeline-right .timeline-card {
  flex-direction: row-reverse;
}

.card-image {
  flex: 0 0 180px;
  height: 180px;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.timeline-card:hover .card-image img {
  transform: scale(1.08);
}

.card-content {
  flex: 1;
}

.card-content p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--dim);
  font-weight: 500;
}

/* Responsive Overrides */
@media (max-width: 900px) {
  .timeline-item {
    margin-bottom: 50px;
  }
  .timeline-card {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .card-image {
    flex: 0 0 200px;
    width: 100%;
    height: 200px;
  }
  .timeline-svg {
    display: none !important;
  }
}

/* Sidebar & Topnav Highlights */
.highlight-nav-item {
  position: relative;
  background: rgba(37, 99, 235, 0.05) !important;
  border-left: 4px solid var(--primary) !important;
  font-weight: 700 !important;
  box-shadow: inset 4px 0 0 var(--primary);
}
.highlight-nav-item.active {
  background: var(--primary) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(37,99,235,0.2) !important;
}
.highlight-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 20px;
  margin-left: auto;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.3);
  animation: pulseGlow 2s infinite;
}
.new-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 20px;
  margin-left: auto;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3);
  animation: pulseGlow 2s infinite;
}
.nav-dot-glow {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 12px var(--primary); }
  100% { transform: scale(0.9); opacity: 0.7; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.6)); }
  100% { transform: scale(1); }
}

/* Management & Staff Directories */
.management-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 0;
}
.management-container h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
}
.management-container .subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
  margin-bottom: 40px;
}

.rank-group {
  margin-bottom: 48px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 32px;
}
.rank-group:last-child {
  border-bottom: none;
}
.rank-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 8px;
  border-left: 4px solid var(--primary);
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.staff-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: 30px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.staff-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.staff-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 24px;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}

.staff-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.staff-role-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary);
  margin-bottom: 12px;
}

.staff-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  word-break: break-all;
}

.staff-meta span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* CUSTOM THEME ROOTS */
[data-theme="dark"] {
  --bg: #0f172a;
  --bg2: #1e293b;
  --text: #f8fafc;
  --dim: #cbd5e1;
  --muted: #64748b;
  --border: #334155;
  --shadow: 0 10px 30px rgba(0,0,0,0.3);
  --shadow-hover: 0 20px 40px rgba(0,0,0,0.5);
}

[data-theme="gray"] {
  --bg: #1f2937;
  --bg2: #374151;
  --text: #f9fafb;
  --dim: #e5e7eb;
  --muted: #9ca3af;
  --border: #4b5563;
  --shadow: 0 10px 30px rgba(0,0,0,0.25);
  --shadow-hover: 0 20px 40px rgba(0,0,0,0.4);
}

[data-theme="white"] {
  --bg: #ffffff;
  --bg2: #f9fafb;
  --text: #111827;
  --dim: #374151;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 4px 20px rgba(0,0,0,0.05);
  --shadow-hover: 0 10px 30px rgba(0,0,0,0.1);
}

[data-theme="picture"] {
  --bg: rgba(255, 255, 255, 0.7);
  --bg2: rgba(255, 255, 255, 0.85);
  --text: #1e293b;
  --dim: #334155;
  --muted: #64748b;
  --border: rgba(255, 255, 255, 0.5);
  --shadow: 0 10px 25px rgba(0,0,0,0.08);
  --shadow-hover: 0 15px 35px rgba(0,0,0,0.15);
}

body.theme-picture-bg {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

body.theme-picture-bg .app-layout {
  background: rgba(255, 255, 255, 0.35) !important;
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
}

body.theme-picture-bg .sidebar {
  background: rgba(255, 255, 255, 0.45) !important;
  border-right: 1px solid rgba(255,255,255,0.3) !important;
}

body.theme-picture-bg .topbar {
  background: rgba(255, 255, 255, 0.4) !important;
  border-bottom: 1px solid rgba(255,255,255,0.3) !important;
}

/* Custom Modal Scroll */
.modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

.theme-palette-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.theme-palette-btn {
  padding: 16px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* ==========================================
   PREMIUM 3D DEPTH INTERFACE STYLING RULES
   ========================================== */
[data-3d-active="true"] {
  --shadow: 0 15px 35px rgba(0, 0, 0, 0.08), 0 5px 15px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  --shadow-hover: 0 25px 45px rgba(0, 0, 0, 0.15), 0 10px 20px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* 3D Glassy Float Anim for backgrounds */
[data-3d-active="true"] body::before {
  content: '';
  position: fixed;
  top: 15%; left: 10%; width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  filter: blur(50px);
  z-index: -1;
  pointer-events: none;
  animation: floatShape3D 10s ease-in-out infinite;
}

[data-3d-active="true"] body::after {
  content: '';
  position: fixed;
  bottom: 15%; right: 10%; width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(14,165,233,0.1) 0%, transparent 70%);
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
  animation: floatShape3D 14s ease-in-out infinite alternate;
}

@keyframes floatShape3D {
  0% { transform: translateY(0px) rotate(0deg) scale(1); }
  50% { transform: translateY(-40px) rotate(180deg) scale(1.15); }
  100% { transform: translateY(0px) rotate(360deg) scale(1); }
}

/* 3D Card Depth & Perspective */
[data-3d-active="true"] .card {
  border-bottom: 5px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
  transform: perspective(1000px) rotateX(1deg) rotateY(0.5deg);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.3s;
}

[data-3d-active="true"] .card:hover {
  transform: perspective(1000px) translateY(-10px) translateZ(15px) rotateX(3.5deg) rotateY(1.8deg) !important;
  box-shadow: var(--shadow-hover) !important;
  border-color: var(--primary) !important;
}

/* Raised Bevel Look for Primary Buttons */
[data-3d-active="true"] .btn-primary {
  border-bottom: 4px solid rgba(15, 23, 42, 0.35) !important;
  box-shadow: 0 8px 20px rgba(37,99,235,0.25) !important;
  transition: transform 0.1s ease, border-bottom-width 0.1s, box-shadow 0.1s !important;
}

[data-3d-active="true"] .btn-primary:active {
  transform: translateY(3px) !important;
  border-bottom-width: 1px !important;
  box-shadow: 0 2px 8px rgba(37,99,235,0.2) !important;
}

/* Raised Bevel Look for Outline Buttons */
[data-3d-active="true"] .btn-outline {
  border-bottom: 4px solid var(--border) !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03) !important;
  transition: transform 0.1s ease, border-bottom-width 0.1s, box-shadow 0.1s !important;
}

[data-3d-active="true"] .btn-outline:active {
  transform: translateY(3px) !important;
  border-bottom-width: 1px !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.02) !important;
}

/* Elegant Float Effect on Sidebar and Topbar */
[data-3d-active="true"] .sidebar {
  border-radius: 0 var(--rl) var(--rl) 0;
  box-shadow: 8px 0 35px rgba(0, 0, 0, 0.04) !important;
  border-right: 2px solid rgba(255, 255, 255, 0.08) !important;
}

[data-3d-active="true"] .topbar {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03) !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08) !important;
}

/* 3D Highlight for Center Nav */
[data-3d-active="true"] .center-nav {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  border-bottom: 4px solid var(--border) !important;
  animation: floatNav3D 5s ease-in-out infinite;
}

@keyframes floatNav3D {
  0%, 100% { transform: translateY(0) rotateX(1deg); }
  50% { transform: translateY(-6px) rotateX(2.5deg); }
}

[data-3d-active="true"] .badge {
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.05);
}

.theme-palette-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}
.theme-palette-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* =======================================================
   3D BACKGROUND PARALLAX LAYER & SUSPENDED STUDENT STYLES
   ======================================================= */
.theme-3d-bg-layer {
  position: fixed;
  top: -5%;
  left: -5%;
  width: 110%;
  height: 110%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.1, 0.8, 0.2, 1), opacity 0.5s ease;
  transform: perspective(1000px) translate3d(0, 0, -100px) scale(1.15);
  opacity: 0;
  display: none;
}

[data-3d-active="true"] .theme-3d-bg-layer {
  opacity: 0.85;
}

/* Suspended Row Styling overlays */
.student-row.suspended-row {
  opacity: 0.65;
  background: rgba(239, 68, 68, 0.03) !important;
  border-left: 4px solid var(--danger) !important;
  transition: 0.3s;
}

.student-row.suspended-row:hover {
  opacity: 0.85;
  background: rgba(239, 68, 68, 0.05) !important;
}

/* Suspended Badge Banner in front of name */
.suspended-tag {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
  color: white !important;
  padding: 4px 10px !important;
  border-radius: 12px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.25) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 8px;
  animation: pulseSuspended 2s infinite alternate;
}

@keyframes pulseSuspended {
  0% { transform: scale(1); box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2); }
  100% { transform: scale(1.04); box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35); }
}