/* ================================================================
   app.css — Skoolsync Design System
   School Management Platform
   Roles: SuperAdmin · SchoolAdmin · Chairman · Teacher · Parent · Tuition
   Stack: Bootstrap 5.3 · Bootstrap Icons · Google Fonts
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&display=swap');

/* ────────────────────────────────────────────────────────────
   1. DESIGN TOKENS
   ──────────────────────────────────────────────────────────── */
:root {
  /* Brand — deep education blue + warm amber accent */
  --brand:        #2563eb;
  --brand-2:      #0ea5e9;
  --brand-dark:   #1d4ed8;
  --brand-light:  #93c5fd;
  --accent:       #f59e0b;
  --accent-dark:  #d97706;

  /* Role Colors */
  --role-superadmin: #7c3aed;
  --role-admin:      #2563eb;
  --role-chairman:   #0369a1;
  --role-teacher:    #059669;
  --role-parent:     #db2777;
  --role-tuition:    #ea580c;

  /* Education Palette */
  --edu-blue:    #dbeafe;
  --edu-purple:  #ede9fe;
  --edu-green:   #dcfce7;
  --edu-amber:   #fef3c7;
  --edu-rose:    #ffe4e6;
  --edu-teal:    #ccfbf1;

  /* Gradients */
  --bg:            linear-gradient(145deg, #eef2ff 0%, #f0f9ff 40%, #fef3c7 100%);
  --brand-grad:    linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --brand-grad-h:  linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
  --success-grad:  linear-gradient(135deg, #10b981 0%, #059669 100%);
  --warning-grad:  linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --danger-grad:   linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --info-grad:     linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  --purple-grad:   linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  --amber-grad:    linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);

  /* Glass */
  --card-bg:     rgba(255, 255, 255, 0.72);
  --card-border: rgba(255, 255, 255, 0.55);
  --shadow:      0 4px 24px rgba(37, 99, 235, 0.08), 0 1px 4px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.6);
  --shadow-hover:0 12px 40px rgba(37, 99, 235, 0.15), 0 4px 12px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.7);
  --shadow-card: 0 2px 16px rgba(37, 99, 235, 0.07);

  /* Typography */
  --text:        #0f172a;
  --muted:       #475569;
  --subtle:      #94a3b8;

  /* Sidebar */
  --sbw:           264px;
  --sbw-collapsed: 74px;
  --ico:           38px;

  /* Shape */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  /* Transitions */
  --t:        0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:   0.14s ease;
  --t-spring: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-slow:   0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-theme="dark"] {
  --bg:         radial-gradient(ellipse 1400px 900px at 20% -10%, #1e1b4b 0%, #0f172a 45%, #0b1220 100%);
  --card-bg:    rgba(15, 23, 42, 0.65);
  --card-border:rgba(255, 255, 255, 0.08);
  --text:       #e2e8f0;
  --muted:      #94a3b8;
  --subtle:     #64748b;
  --brand:      #60a5fa;
  --brand-2:    #38bdf8;
  --accent:     #fbbf24;
  --shadow:     0 4px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.04);
  --shadow-hover:0 12px 40px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
}


/* ────────────────────────────────────────────────────────────
   2. RESETS & BASE
   ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }

body {
  font-family: 'Inter', 'Poppins', system-ui, sans-serif;
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
  transition: background var(--t), color var(--t);
  -webkit-font-smoothing: antialiased;
}

/* Desktop sidebar offset */
@media (min-width: 992px) {
  body { padding-left: var(--sbw); transition: padding-left var(--t); }
  body.sb-collapsed { padding-left: var(--sbw-collapsed); }
}

/* Edu noise texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.022'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

aside, nav { position: relative; z-index: 10; pointer-events: auto !important; }

/* Kill Bootstrap overlays */
.modal-backdrop, .offcanvas-backdrop, .sidebar-backdrop,
.page-overlay, .screen-overlay {
  display: none !important; opacity: 0 !important; pointer-events: none !important;
}


/* ────────────────────────────────────────────────────────────
   3. KEYFRAME ANIMATIONS
   ──────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideDown {
  from { opacity: 0; max-height: 0; }
  to   { opacity: 1; max-height: 700px; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45); }
  50%       { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position:  200% center; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 12px rgba(37, 99, 235, 0.3); }
  50%       { box-shadow: 0 0 32px rgba(37, 99, 235, 0.65); }
}
@keyframes progressFill {
  from { width: 0%; }
  to   { width: var(--progress-value, 100%); }
}
@keyframes notifPop {
  0%   { transform: scale(0.5); opacity: 0; }
  70%  { transform: scale(1.18); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}
@keyframes bookFlip {
  0%   { transform: rotateY(0deg); }
  50%  { transform: rotateY(-20deg) scale(1.05); }
  100% { transform: rotateY(0deg); }
}
@keyframes pencilWrite {
  0%, 100% { transform: rotate(-10deg) translateX(0); }
  50%       { transform: rotate(-10deg) translateX(6px); }
}
@keyframes bellRing {
  0%, 100% { transform: rotate(0deg); }
  20%       { transform: rotate(18deg); }
  40%       { transform: rotate(-18deg); }
  60%       { transform: rotate(10deg); }
  80%       { transform: rotate(-10deg); }
}
@keyframes drawLine {
  from { stroke-dashoffset: 1000; }
  to   { stroke-dashoffset: 0; }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px) scale(0.8); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ripple {
  from { transform: scale(0); opacity: 1; }
  to   { transform: scale(4); opacity: 0; }
}


/* ────────────────────────────────────────────────────────────
   4. ANIMATION UTILITY CLASSES
   ──────────────────────────────────────────────────────────── */
.animated--fade-in      { animation: fadeIn 0.45s ease both; }
.animated--fade-in-up   { animation: fadeInUp 0.45s ease both; }
.animated--fade-in-left { animation: fadeInLeft 0.4s ease both; }
.animated--fade-in-right{ animation: fadeInRight 0.4s ease both; }
.animated--scale-in     { animation: scaleIn 0.35s ease both; }
.animated--float        { animation: float 3.5s ease-in-out infinite; }
.animated--glow         { animation: glow 2.5s ease-in-out infinite; }
.animated--bell         { animation: bellRing 1s ease both; }
.animated--book         { animation: bookFlip 1.2s ease-in-out infinite; }
.animated--count-up     { animation: countUp 0.6s cubic-bezier(0.34,1.56,0.64,1) both; }

/* Staggered children */
.anim-stagger > * { animation: fadeInUp 0.42s ease both; }
.anim-stagger > *:nth-child(1) { animation-delay: 0.04s; }
.anim-stagger > *:nth-child(2) { animation-delay: 0.09s; }
.anim-stagger > *:nth-child(3) { animation-delay: 0.14s; }
.anim-stagger > *:nth-child(4) { animation-delay: 0.19s; }
.anim-stagger > *:nth-child(5) { animation-delay: 0.24s; }
.anim-stagger > *:nth-child(6) { animation-delay: 0.29s; }
.anim-stagger > *:nth-child(7) { animation-delay: 0.34s; }
.anim-stagger > *:nth-child(8) { animation-delay: 0.39s; }

.delay-1 { animation-delay: 0.08s !important; }
.delay-2 { animation-delay: 0.16s !important; }
.delay-3 { animation-delay: 0.24s !important; }
.delay-4 { animation-delay: 0.32s !important; }


/* ────────────────────────────────────────────────────────────
   5. EDUCATION BACKGROUND ELEMENTS
   ──────────────────────────────────────────────────────────── */

/* Floating edu icons for auth/empty states */
.edu-bg-icons {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.edu-bg-icon {
  position: absolute;
  font-size: 3rem;
  opacity: 0.055;
  animation: float 4s ease-in-out infinite;
  color: var(--brand);
}

.edu-bg-icon:nth-child(1)  { top:  8%; left:  6%; animation-delay: 0s;    font-size: 2.8rem; }
.edu-bg-icon:nth-child(2)  { top: 18%; left: 82%; animation-delay: 0.6s;  font-size: 3.4rem; }
.edu-bg-icon:nth-child(3)  { top: 38%; left: 12%; animation-delay: 1.2s;  font-size: 2.4rem; }
.edu-bg-icon:nth-child(4)  { top: 55%; left: 75%; animation-delay: 0.3s;  font-size: 3.0rem; }
.edu-bg-icon:nth-child(5)  { top: 72%; left: 22%; animation-delay: 1.8s;  font-size: 2.6rem; }
.edu-bg-icon:nth-child(6)  { top: 85%; left: 60%; animation-delay: 0.9s;  font-size: 3.2rem; }
.edu-bg-icon:nth-child(7)  { top: 28%; left: 45%; animation-delay: 2.1s;  font-size: 2.2rem; opacity: 0.04; }
.edu-bg-icon:nth-child(8)  { top: 65%; left: 90%; animation-delay: 1.5s;  font-size: 2.5rem; }

/* School Pattern Dot Grid */
.dot-grid {
  background-image: radial-gradient(circle, rgba(37,99,235,0.1) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Decorative cap strip on panels */
.edu-stripe {
  height: 4px;
  background: var(--brand-grad);
  border-radius: 4px 4px 0 0;
}

/* School stat icon rings */
.stat-icon-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  position: relative;
  flex-shrink: 0;
}

.stat-icon-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px dashed currentColor;
  opacity: 0.25;
  animation: spin 12s linear infinite;
}


/* ────────────────────────────────────────────────────────────
   6. GLASS CARD SYSTEM
   ──────────────────────────────────────────────────────────── */
.glass-card {
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--t), transform var(--t), background var(--t);
  animation: scaleIn 0.32s ease both;
}

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

/* Transparent table rows inside glass */
.glass-card .table,
.glass-card .table thead,
.glass-card .table tbody,
.glass-card .table tr,
.glass-card .table th,
.glass-card .table td { background-color: transparent !important; }

.glass-card .table th,
.glass-card .table td { border-color: rgba(255, 255, 255, 0.18); }

.glass-card .progress { background-color: rgba(255,255,255,0.28); border-radius: 8px; }
.glass-card .progress-bar { border-radius: 8px; animation: progressFill 0.9s ease-out both; }
.glass-card .list-group-item { background-color: transparent !important; border: none; padding-left: 0; padding-right: 0; }

/* Solid card variant */
.solid-card {
  background: var(--card-bg);
  border: 1px solid rgba(226, 232, 240, 0.6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--t), transform var(--t);
}

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

/* Glass button */
.glass-btn {
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--card-border) !important;
  backdrop-filter: blur(8px);
  transition: all var(--t-fast);
}
.glass-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 18px rgba(37, 99, 235, 0.28); }

/* Icon box */
.glass-icon-box {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(37,99,235,0.15), rgba(14,165,233,0.15));
  border: 1px solid var(--card-border);
  transition: transform var(--t-spring), background var(--t-fast);
}
.glass-icon-box:hover { transform: scale(1.1) rotate(-4deg); }

/* Pill */
.pill {
  border-radius: 999px;
  border: 1px solid var(--card-border);
  padding: 0.32rem 0.75rem;
  font-size: 0.82rem;
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  transition: all var(--t-fast);
}


/* ────────────────────────────────────────────────────────────
   7. SIDEBAR
   ──────────────────────────────────────────────────────────── */

/* Fixed shell */
.sb-fixed {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sbw);
  display: none;
  padding: 12px;
  z-index: 1040;
  transition: width var(--t);
}

@media (min-width: 992px) { .sb-fixed { display: block; } }
body.sb-collapsed .sb-fixed { width: var(--sbw-collapsed); }

/* Card */
.sb-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(247,249,255,0.95));
  backdrop-filter: blur(16px);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(37,99,235,0.1), 0 2px 8px rgba(0,0,0,0.04);
  padding: 6px;
  overflow: hidden;
  transition: background var(--t);
  border: 1px solid rgba(255,255,255,0.8);
}

[data-theme="dark"] .sb-card {
  background: linear-gradient(180deg, rgba(15,23,42,0.92), rgba(10,18,42,0.96));
  border-color: rgba(255,255,255,0.06);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* Scroll area */
.sb-scroll-area {
  overflow-y: auto;
  scrollbar-width: none;
  flex-grow: 1;
  padding-top: 4px;
}
.sb-scroll-area::-webkit-scrollbar { width: 0; }

/* Text visibility on collapse */
.sb-text { transition: opacity var(--t), max-width var(--t); }
body.sb-collapsed .sb-text,
body.sb-collapsed .sb-spacer { display: none !important; }

/* Nav links */
.sb-menu a,
.sb-menu button {
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  background: transparent;
  width: 100%;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  cursor: pointer;
  white-space: nowrap;
}

.sb-menu a:hover,
.sb-menu button:hover {
  background: rgba(37, 99, 235, 0.07);
  color: var(--brand);
  transform: translateX(3px);
}

.sb-menu a.active,
.sb-menu .sb-dd-toggle.active {
  background: linear-gradient(90deg, rgba(37,99,235,0.12), rgba(124,58,237,0.07));
  color: var(--brand);
  font-weight: 600;
  border-left: 3px solid var(--brand);
  padding-left: 8px;
}

/* Icon */
.sb-ico {
  width: var(--ico); height: var(--ico);
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: background var(--t-fast), transform var(--t-spring);
}

.sb-menu a:hover .sb-ico,
.sb-menu a.active .sb-ico { transform: scale(1.1); }

/* Role-colored active icons */
.skq-role-superadmin .sb-menu a.active { border-left-color: var(--role-superadmin); color: var(--role-superadmin); }
.skq-role-chairman   .sb-menu a.active { border-left-color: var(--role-chairman);   color: var(--role-chairman); }
.skq-role-teacher    .sb-menu a.active { border-left-color: var(--role-teacher);     color: var(--role-teacher); }
.skq-role-parent     .sb-menu a.active { border-left-color: var(--role-parent);      color: var(--role-parent); }
.skq-role-tuition    .sb-menu a.active { border-left-color: var(--role-tuition);     color: var(--role-tuition); }

/* Dropdown */
.sb-dd-arrow { margin-left: auto; font-size: 0.72rem; transition: transform var(--t); }
.sb-dd-toggle[aria-expanded="true"] .sb-dd-arrow { transform: rotate(180deg); }

.sb-dd-menu {
  padding-left: 50px;
  animation: slideDown 0.25s ease;
  overflow: hidden;
}
.sb-dd-menu a { font-size: 0.82rem; padding: 7px 10px; border-radius: 8px; }

/* Section label */
.sb-section {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
  padding: 14px 12px 5px;
}
body.sb-collapsed .sb-section { display: none; }

/* Mobile float toggle */
.sb-float-toggle {
  position: fixed;
  bottom: 22px; right: 22px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  border: none;
  display: none;
  align-items: center; justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.42);
  z-index: 1100;
  cursor: pointer;
  transition: all var(--t-spring);
}
.sb-float-toggle:hover { transform: scale(1.1); }
@media (max-width: 991px) { .sb-float-toggle { display: flex; } }

/* Profile */
.sb-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--t-fast);
  cursor: pointer;
}
.sb-profile:hover { background: rgba(37, 99, 235, 0.06); }

/* Footer */
.sb-footer { border-top: 1px solid var(--card-border); padding: 8px 4px 4px; margin-top: auto; }

/* Logo */
.sb-logo { display: flex; align-items: center; gap: 10px; padding: 12px 12px 8px; }
.sb-logo-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--brand-grad);
  display: grid; place-items: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.sb-logo-text { font-size: 1.05rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.sb-logo-sub  { font-size: 0.7rem; font-weight: 500; color: var(--muted); }


/* ────────────────────────────────────────────────────────────
   8. TOPBAR
   ──────────────────────────────────────────────────────────── */
.admin-topbar,
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 68px;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  backdrop-filter: blur(16px) saturate(180%);
  background: linear-gradient(90deg, rgba(248,250,255,0.92), rgba(246,244,255,0.92));
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  transition: background var(--t), box-shadow var(--t);
  animation: fadeIn 0.4s ease both;
}

[data-theme="dark"] .admin-topbar,
[data-theme="dark"] .topbar {
  background: linear-gradient(90deg, rgba(15,23,42,0.93), rgba(10,14,38,0.93));
  border-bottom-color: rgba(255,255,255,0.05);
}

.admin-content,
.admin-main { padding-top: 92px; }

.admin-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 22px 48px;
}

/* Topbar breadcrumb */
.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}
.topbar-breadcrumb .current { color: var(--text); font-weight: 600; }
.topbar-breadcrumb .sep { opacity: 0.4; }

/* School name chip in topbar */
.school-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.15);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
}

.school-chip i { font-size: 0.9rem; }


/* ────────────────────────────────────────────────────────────
   9. DASHBOARD STATS CARDS
   ──────────────────────────────────────────────────────────── */
.dash-cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 24px;
}

.dash-card {
  flex: 1 1 220px;
  min-width: 180px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 24px 20px;
  transition: box-shadow var(--t), transform var(--t);
  animation: fadeInUp 0.42s ease both;
  position: relative;
  overflow: hidden;
}

.dash-card::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.04;
}

.dash-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px) scale(1.01);
}

.dash-card .big-number {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  animation: countUp 0.6s cubic-bezier(0.34,1.56,0.64,1) both;
}

.dash-card .meta {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  margin-top: 5px;
}

.dash-card .trend {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 8px;
}

.trend-up   { background: rgba(16,185,129,0.12); color: #059669; }
.trend-down { background: rgba(239,68,68,0.12);  color: #dc2626; }

/* Color variants */
.dash-card.card-blue   { color: #2563eb; border-top: 3px solid #2563eb; }
.dash-card.card-green  { color: #059669; border-top: 3px solid #059669; }
.dash-card.card-amber  { color: #d97706; border-top: 3px solid #f59e0b; }
.dash-card.card-purple { color: #7c3aed; border-top: 3px solid #7c3aed; }
.dash-card.card-rose   { color: #db2777; border-top: 3px solid #db2777; }
.dash-card.card-teal   { color: #0d9488; border-top: 3px solid #0d9488; }

.dash-card .card-icon {
  font-size: 1.6rem;
  margin-bottom: 10px;
  display: block;
  animation: float 3s ease-in-out infinite;
}

/* Mini chart inside card */
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 32px;
  margin-top: 10px;
}

.mini-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: currentColor;
  opacity: 0.25;
  transition: opacity var(--t-fast);
}
.mini-bar.active { opacity: 0.7; }
.dash-card:hover .mini-bar { opacity: 0.4; }
.dash-card:hover .mini-bar.active { opacity: 1; }


/* ────────────────────────────────────────────────────────────
   10. SCHOOL STAT PANELS (hero stats)
   ──────────────────────────────────────────────────────────── */
.stat-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
  backdrop-filter: blur(12px);
  text-align: center;
  transition: box-shadow var(--t), transform var(--t);
  animation: fadeInUp 0.4s ease both;
  position: relative;
  overflow: hidden;
}

.stat-item:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }

.stat-item .s-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
  animation: float 4s ease-in-out infinite;
}

.stat-item .s-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  animation: countUp 0.7s cubic-bezier(0.34,1.56,0.64,1) both;
}

.stat-item .s-label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 4px;
}

/* Attendance ring */
.attendance-ring {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: grid; place-items: center;
  position: relative;
  font-size: 1rem;
  font-weight: 800;
  margin: 0 auto 8px;
}

.attendance-ring::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: var(--brand);
  border-right-color: var(--brand);
  animation: spin 3s linear infinite;
  opacity: 0.4;
}


/* ────────────────────────────────────────────────────────────
   11. PAGE HEADER
   ──────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
  animation: fadeIn 0.4s ease both;
}

.page-header h4,
.page-header h5 { font-weight: 700; color: var(--text); margin: 0; }
.page-header .text-muted { font-size: 0.875rem; }

/* Page hero (large header with gradient) */
.page-hero {
  background: var(--brand-grad);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  color: #fff;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.4s ease both;
}

.page-hero::before {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.page-hero::after {
  content: '';
  position: absolute;
  left: -20px; bottom: -30px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.page-hero h2 { font-size: 1.6rem; font-weight: 800; margin: 0 0 4px; }
.page-hero p  { opacity: 0.88; margin: 0; font-size: 0.9rem; }
.page-hero .hero-icon {
  position: absolute;
  right: 28px; top: 50%;
  transform: translateY(-50%);
  font-size: 3.5rem;
  opacity: 0.18;
  animation: float 4s ease-in-out infinite;
}


/* ────────────────────────────────────────────────────────────
   12. BUTTONS
   ──────────────────────────────────────────────────────────── */
.btn {
  border-radius: var(--radius-sm) !important;
  font-weight: 600;
  transition: all var(--t-fast);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 50%;
  background: rgba(255,255,255,0);
  border-radius: 50%;
  transition: all 0.5s ease;
}

.btn:active::after {
  inset: -50%;
  background: rgba(255,255,255,0.15);
  animation: ripple 0.6s ease;
}

.btn:active { transform: scale(0.97); }

/* Primary */
.btn-primary {
  background: var(--brand-grad) !important;
  border: none !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover {
  background: var(--brand-grad-h) !important;
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.48);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success-grad) !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.32);
}

.btn-danger {
  background: var(--danger-grad) !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.28);
}

.btn-warning {
  background: var(--warning-grad) !important;
  border: none !important;
  color: #fff !important;
}

.btn-info {
  background: var(--info-grad) !important;
  border: none !important;
  color: #fff !important;
}

.btn-purple {
  background: var(--purple-grad) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

/* Icon buttons */
.action-group { display: flex; align-items: center; gap: 5px; }

.action-btn {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid; place-items: center;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--muted);
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
  font-size: 0.9rem;
}

.action-btn:hover {
  background: var(--brand-grad);
  color: #fff;
  border-color: transparent;
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.action-btn.del:hover { background: var(--danger-grad); }
.action-btn.edit:hover { background: var(--info-grad); }
.action-btn.view:hover { background: var(--success-grad); }


/* ────────────────────────────────────────────────────────────
   13. FORMS
   ──────────────────────────────────────────────────────────── */
.form-control,
.form-select {
  border-radius: var(--radius-sm) !important;
  border: 1px solid rgba(203, 213, 225, 0.7);
  background: rgba(255, 255, 255, 0.75) !important;
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  backdrop-filter: blur(4px);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background: rgba(15, 23, 42, 0.65) !important;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  outline: none;
}

.form-label { font-size: 0.86rem; font-weight: 600; color: var(--muted); margin-bottom: 5px; }

.input-group-text {
  background: rgba(255,255,255,0.55);
  border-color: rgba(203, 213, 225, 0.7);
  color: var(--muted);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

.is-invalid { border-color: #ef4444 !important; }
.invalid-feedback { font-size: 0.8rem; margin-top: 4px; }
.valid-feedback   { font-size: 0.8rem; margin-top: 4px; }

/* Search */
.search-wrapper { position: relative; }
.search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-input { padding-left: 38px !important; border-radius: 999px !important; }

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  margin-bottom: 16px;
  animation: fadeIn 0.35s ease both;
}

/* Custom field drag rows */
.field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.18);
  border: 1px dashed var(--card-border);
  transition: background var(--t-fast);
}
.field-row:hover { background: rgba(37, 99, 235, 0.06); }
.handle { cursor: grab; color: var(--muted); }
.handle:active { cursor: grabbing; }


/* ────────────────────────────────────────────────────────────
   14. TABLES
   ──────────────────────────────────────────────────────────── */
.table { color: var(--text); border-color: rgba(203, 213, 225, 0.28); }

.table thead th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 2px solid var(--card-border);
  padding: 12px 16px;
  white-space: nowrap;
}

.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: rgba(37, 99, 235, 0.035); }

.table tbody td {
  padding: 11px 16px;
  vertical-align: middle;
  font-size: 0.875rem;
  border-color: rgba(203, 213, 225, 0.18);
}

/* Student row / person row */
.person-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.person-avatar {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--brand-grad);
  display: grid; place-items: center;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.person-name  { font-weight: 600; font-size: 0.88rem; }
.person-meta  { font-size: 0.75rem; color: var(--muted); }

/* Table empty state */
.table-empty {
  text-align: center;
  padding: 52px 24px;
  color: var(--muted);
  animation: fadeIn 0.4s ease both;
}
.table-empty i { font-size: 3rem; opacity: 0.3; display: block; margin-bottom: 14px; animation: float 3s ease-in-out infinite; }
.table-empty h6 { font-weight: 600; margin-bottom: 6px; color: var(--text); }


/* ────────────────────────────────────────────────────────────
   15. BADGES & STATUS
   ──────────────────────────────────────────────────────────── */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  animation: notifPop 0.3s ease both;
}

/* Status colors */
.badge-active    { background: rgba(16,185,129,0.12);  color: #059669; }
.badge-inactive  { background: rgba(148,163,184,0.18); color: #64748b; }
.badge-pending   { background: rgba(245,158,11,0.12);  color: #d97706; }
.badge-approved  { background: rgba(16,185,129,0.12);  color: #059669; }
.badge-rejected  { background: rgba(239,68,68,0.12);   color: #dc2626; }
.badge-completed { background: rgba(37,99,235,0.1);    color: #2563eb; }
.badge-partial   { background: rgba(245,158,11,0.12);  color: #d97706; }
.badge-present   { background: rgba(16,185,129,0.12);  color: #059669; }
.badge-absent    { background: rgba(239,68,68,0.12);   color: #dc2626; }
.badge-halfday   { background: rgba(245,158,11,0.12);  color: #d97706; }
.badge-holiday   { background: rgba(14,165,233,0.12);  color: #0284c7; }

/* Role badges */
.badge-role {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 2px 9px;
  border-radius: 999px;
}

.badge-superadmin { background: rgba(124,58,237,0.12); color: var(--role-superadmin); }
.badge-admin      { background: rgba(37,99,235,0.1);   color: var(--role-admin); }
.badge-chairman   { background: rgba(3,105,161,0.1);   color: var(--role-chairman); }
.badge-teacher    { background: rgba(5,150,105,0.1);   color: var(--role-teacher); }
.badge-parent     { background: rgba(219,39,119,0.1);  color: var(--role-parent); }
.badge-tuition    { background: rgba(234,88,12,0.1);   color: var(--role-tuition); }

/* Status dot */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.online  { background: #10b981; animation: pulse 2s infinite; }
.status-dot.offline { background: #94a3b8; }
.status-dot.away    { background: #f59e0b; animation: statusPulse 1.5s ease-in-out infinite; }

/* Live dot */
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #059669;
  letter-spacing: 0.06em;
}
.live-dot::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse 2s infinite;
}

/* Unread / notif badge */
.notif-badge {
  min-width: 19px; min-height: 19px;
  border-radius: 50%;
  background: var(--danger-grad);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  line-height: 19px;
  padding: 0 4px;
  border: 2px solid #fff;
  animation: notifPop 0.3s ease both;
}


/* ────────────────────────────────────────────────────────────
   16. AVATAR
   ──────────────────────────────────────────────────────────── */
.avatar {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
  transition: transform var(--t-spring);
  background: var(--brand-grad);
}
.avatar:hover { transform: scale(1.08); }

.avatar-sm { width: 32px; height: 32px; border-radius: 9px; font-size: 0.78rem; }
.avatar-lg { width: 52px; height: 52px; border-radius: 16px; font-size: 1.1rem; }
.avatar-xl {
  width: 72px; height: 72px;
  border-radius: 50%;
  font-size: 1.6rem;
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.3);
  animation: float 3.5s ease-in-out infinite;
}

/* Color variants */
.avatar-green  { background: var(--success-grad) !important; }
.avatar-amber  { background: var(--amber-grad) !important; }
.avatar-purple { background: var(--purple-grad) !important; }
.avatar-rose   { background: var(--danger-grad) !important; }
.avatar-teal   { background: var(--info-grad) !important; }


/* ────────────────────────────────────────────────────────────
   17. ATTENDANCE SPECIFIC
   ──────────────────────────────────────────────────────────── */
.attendance-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--card-border);
  transition: background var(--t-fast);
}
.attendance-row:last-child { border-bottom: none; }
.attendance-row:hover { background: rgba(37, 99, 235, 0.03); border-radius: var(--radius-sm); }

.emp-checkbox { width: 16px; height: 16px; cursor: pointer; accent-color: var(--brand); }

.student-id-chip {
  font-family: monospace;
  font-size: 0.78rem;
  background: rgba(37, 99, 235, 0.08);
  color: var(--brand);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

/* Attendance grid (calendar style) */
.att-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.att-day {
  aspect-ratio: 1;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}

.att-day.present  { background: rgba(16,185,129,0.12); color: #059669; }
.att-day.absent   { background: rgba(239,68,68,0.12);  color: #dc2626; }
.att-day.holiday  { background: rgba(14,165,233,0.1);  color: #0284c7; }
.att-day.weekend  { background: rgba(148,163,184,0.08); color: var(--subtle); }
.att-day.empty    { opacity: 0; pointer-events: none; }
.att-day:hover:not(.empty):not(.weekend) { transform: scale(1.15); }


/* ────────────────────────────────────────────────────────────
   18. FEE / FINANCE CARDS
   ──────────────────────────────────────────────────────────── */
.fee-summary-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 18px;
  backdrop-filter: blur(12px);
  animation: fadeInUp 0.4s ease both;
}

.fee-amount {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
  animation: countUp 0.7s cubic-bezier(0.34,1.56,0.64,1) both;
}

.fee-label { font-size: 0.78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 3px; }

.fee-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(203,213,225,0.3);
  overflow: hidden;
  margin-top: 10px;
}
.fee-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand-grad);
  animation: progressFill 1s ease-out both;
}

/* Payment installment row */
.installment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--card-border);
}
.installment-row:last-child { border-bottom: none; }


/* ────────────────────────────────────────────────────────────
   19. ALERT / NOTICES
   ──────────────────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius-md) !important;
  animation: fadeInUp 0.35s ease both;
  border: none !important;
}
.alert-success { background: rgba(16,185,129,0.1)  !important; border-left: 4px solid #10b981 !important; color: #065f46 !important; }
.alert-danger  { background: rgba(239,68,68,0.08)  !important; border-left: 4px solid #ef4444 !important; color: #991b1b !important; }
.alert-warning { background: rgba(245,158,11,0.1)  !important; border-left: 4px solid #f59e0b !important; color: #92400e !important; }
.alert-info    { background: rgba(14,165,233,0.1)  !important; border-left: 4px solid #0ea5e9 !important; color: #075985 !important; }

[data-theme="dark"] .alert-success { color: #6ee7b7 !important; }
[data-theme="dark"] .alert-danger  { color: #fca5a5 !important; }
[data-theme="dark"] .alert-warning { color: #fcd34d !important; }
[data-theme="dark"] .alert-info    { color: #7dd3fc !important; }


/* ────────────────────────────────────────────────────────────
   20. MODALS
   ──────────────────────────────────────────────────────────── */
.modal-content {
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--card-border) !important;
  background: var(--card-bg) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.18) !important;
  animation: scaleIn 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}

.modal-header {
  border-bottom-color: var(--card-border) !important;
  padding: 20px 24px !important;
}

.modal-title { font-weight: 700; font-size: 1.05rem; }

.modal-footer {
  border-top-color: var(--card-border) !important;
  padding: 16px 24px !important;
}

[data-theme="dark"] .modal-content { background: rgba(15,23,42,0.92) !important; }


/* ────────────────────────────────────────────────────────────
   21. TABS (section tabs)
   ──────────────────────────────────────────────────────────── */
.skq-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255,255,255,0.5);
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(8px);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.skq-tab {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--t-fast);
  border: none;
  background: transparent;
  white-space: nowrap;
}

.skq-tab:hover { color: var(--brand); background: rgba(37,99,235,0.05); }
.skq-tab.active { background: #fff; color: var(--brand); box-shadow: 0 2px 8px rgba(37,99,235,0.12); }

[data-theme="dark"] .skq-tabs { background: rgba(15,23,42,0.5); }
[data-theme="dark"] .skq-tab.active { background: rgba(37,99,235,0.2); }


/* ────────────────────────────────────────────────────────────
   22. LOADING / SKELETON
   ──────────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, rgba(203,213,225,0.4) 25%, rgba(203,213,225,0.15) 50%, rgba(203,213,225,0.4) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: 8px;
}

.skeleton-text { height: 14px; border-radius: 6px; margin-bottom: 8px; }
.skeleton-title { height: 22px; border-radius: 8px; width: 60%; margin-bottom: 12px; }
.skeleton-card { height: 120px; border-radius: var(--radius-md); }

/* Spinner */
.skq-spinner {
  width: 22px; height: 22px;
  border: 3px solid rgba(37, 99, 235, 0.2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}


/* ────────────────────────────────────────────────────────────
   23. PROGRESS BARS
   ──────────────────────────────────────────────────────────── */
.progress {
  border-radius: 999px;
  overflow: hidden;
  background: rgba(203, 213, 225, 0.3);
}

.progress-bar {
  border-radius: 999px;
  background: var(--brand-grad);
  transition: width 0.9s ease;
}

.progress-success .progress-bar { background: var(--success-grad); }
.progress-warning .progress-bar { background: var(--warning-grad); }
.progress-danger  .progress-bar { background: var(--danger-grad); }


/* ────────────────────────────────────────────────────────────
   24. LOGIN PAGE
   ──────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: var(--bg);
  position: relative;
}

.login-container {
  display: flex;
  width: 920px;
  max-width: 98vw;
  background: rgba(255,255,255,0.9);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(37, 99, 235, 0.18);
  animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255,255,255,0.8);
}

[data-theme="dark"] .login-container { background: rgba(15,23,42,0.92); }

.login-brand-panel {
  background: var(--brand-grad);
  color: #fff;
  padding: 52px 40px;
  width: 46%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-brand-panel::before {
  content: '';
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  top: -80px; right: -80px;
}

.login-brand-panel::after {
  content: '';
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  bottom: -40px; left: -40px;
}

/* Edu icon row on login */
.login-edu-icons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.login-edu-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  display: grid; place-items: center;
  font-size: 1.2rem;
  animation: float 3s ease-in-out infinite;
}
.login-edu-icon:nth-child(2) { animation-delay: 0.5s; }
.login-edu-icon:nth-child(3) { animation-delay: 1s; }
.login-edu-icon:nth-child(4) { animation-delay: 1.5s; }

.login-brand-panel .brand-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  line-height: 1.1;
}

.login-brand-panel .brand-sub {
  font-size: 1rem;
  opacity: 0.88;
  line-height: 1.6;
}

.login-brand-panel .brand-foot {
  font-size: 0.78rem;
  opacity: 0.65;
  margin-top: auto;
  padding-top: 24px;
}

/* Edu feature list on login */
.login-features { list-style: none; padding: 0; margin: 20px 0; }
.login-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  margin-bottom: 10px;
  opacity: 0.92;
}
.login-features li i { font-size: 1rem; }

.login-form-panel {
  width: 54%;
  padding: 52px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form-panel .form-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 8px;
}

.login-form-panel .form-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.login-form-panel .form-sub {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 28px;
}

.btn-login {
  background: var(--brand-grad);
  border: none;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 999px !important;
  padding: 13px 0;
  color: #fff;
  margin-top: 20px;
  width: 100%;
  transition: all var(--t-fast);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.38);
}

.btn-login:hover {
  background: var(--brand-grad-h);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.52);
  transform: translateY(-2px);
}

/* Password toggle */
.pw-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  transition: color var(--t-fast);
  z-index: 4;
}
.pw-toggle:hover { color: var(--brand); }

@media (max-width: 760px) {
  .login-container { flex-direction: column; }
  .login-brand-panel,
  .login-form-panel { width: 100% !important; padding: 32px 24px; }
  .login-brand-panel { min-height: 220px; }
}


/* ────────────────────────────────────────────────────────────
   25. DASHBOARD PANELS (charts + insights)
   ──────────────────────────────────────────────────────────── */
.dashboard-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Bar chart (CSS only) */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 120px;
  padding-top: 10px;
}

.chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.chart-bar-fill {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: var(--brand-grad);
  min-height: 4px;
  transition: height 0.8s cubic-bezier(0.4,0,0.2,1);
  animation: progressFill 0.8s ease-out both;
}

.chart-bar span {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
}

/* Insight list */
.insight-list { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }

.insight-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.4);
  border: 1px solid var(--card-border);
  transition: all var(--t-fast);
  animation: fadeInLeft 0.4s ease both;
}

.insight-item:hover {
  background: rgba(37, 99, 235, 0.06);
  transform: translateX(3px);
}

.insight-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand-grad);
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}

.insight-item strong { display: block; font-size: 0.875rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.insight-item span  { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }

/* Panel header */
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-kicker { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.panel-title  { font-size: 1rem; font-weight: 700; color: var(--text); }

/* Recent activity */
.activity-list { display: flex; flex-direction: column; gap: 0; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--card-border);
  animation: fadeInRight 0.4s ease both;
}
.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.activity-text { font-size: 0.85rem; color: var(--text); line-height: 1.5; }
.activity-time { font-size: 0.75rem; color: var(--subtle); margin-top: 2px; }


/* ────────────────────────────────────────────────────────────
   26. WELCOME HERO (dashboard greeting)
   ──────────────────────────────────────────────────────────── */
.welcome-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  background: var(--brand-grad);
  color: #fff;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.45s ease both;
}

.welcome-hero::before {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}

.welcome-hero .wh-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.welcome-hero .wh-sub {
  font-size: 0.9rem;
  opacity: 0.88;
}

.welcome-hero .wh-icon {
  font-size: 4rem;
  opacity: 0.18;
  animation: float 4s ease-in-out infinite;
}


/* ────────────────────────────────────────────────────────────
   27. STUDENT / TEACHER PROFILE CARDS
   ──────────────────────────────────────────────────────────── */
.profile-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(14px);
  text-align: center;
  animation: scaleIn 0.35s ease both;
}

.profile-card .profile-top {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--brand-grad);
  display: grid; place-items: center;
  font-size: 1.8rem;
  color: #fff;
  font-weight: 800;
  margin: 0 auto 14px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
  animation: float 4s ease-in-out infinite;
}

.profile-card .profile-name { font-size: 1.15rem; font-weight: 700; margin-bottom: 3px; }
.profile-card .profile-role { font-size: 0.82rem; color: var(--muted); margin-bottom: 14px; }

.profile-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.85rem;
}
.profile-info-row:last-child { border-bottom: none; }
.profile-info-row i { color: var(--brand); font-size: 0.95rem; flex-shrink: 0; }
.profile-info-label { color: var(--muted); min-width: 80px; font-size: 0.78rem; }
.profile-info-value { font-weight: 600; margin-left: auto; }


/* ────────────────────────────────────────────────────────────
   28. CIRCULAR / ANNOUNCEMENT CARD
   ──────────────────────────────────────────────────────────── */
.circular-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  transition: all var(--t);
  animation: fadeInUp 0.4s ease both;
}

.circular-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(37, 99, 235, 0.2);
}

.circular-icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  display: grid; place-items: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(124,58,237,0.12));
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.circular-title  { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.circular-meta   { font-size: 0.78rem; color: var(--muted); }
.circular-dates  { font-size: 0.76rem; color: var(--subtle); margin-top: 4px; }


/* ────────────────────────────────────────────────────────────
   29. PAGINATION
   ──────────────────────────────────────────────────────────── */
/* Standard Bootstrap pagination */
/* Standard Bootstrap pagination */
.pagination .page-link {
  border-radius: 9px !important;
  border-color: var(--card-border);
  color: var(--muted);
  background: var(--card-bg);
  backdrop-filter: blur(6px);
  margin: 0 2px;
  font-size: 0.85rem;
  transition: all var(--t-fast);
}
 
.pagination .page-link:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
 
.pagination .page-item.active .page-link {
  background: var(--brand-grad);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
 
/* ================================================================
   LARAVEL TAILWIND PAGINATION — SVG ARROW FIX
   
   Laravel's Tailwind pagination template uses SVG with class="w-5 h-5"
   Without Tailwind CSS, these SVGs expand to fill their container.
   Fix: target svg.w-5.h-5 directly + all plausible parent selectors.
   DO NOT use [attr]* { max-width:none } — that defeats the purpose.
   ================================================================ */
 
/* PRIMARY FIX: target the exact SVG element by its classes */
svg.w-5,
svg.h-5,
svg.w-5.h-5 {
  width:      1.25rem !important;   /* 20px */
  height:     1.25rem !important;
  min-width:  1.25rem !important;
  min-height: 1.25rem !important;
  max-width:  1.25rem !important;
  max-height: 1.25rem !important;
  display:    block   !important;
  flex-shrink: 0      !important;
  overflow:   hidden  !important;
}
 
/* SECONDARY FIX: target through the nav wrapper */
nav[aria-label="Pagination Navigation"] svg,
[aria-label="Pagination Navigation"] svg {
  width:      1.25rem !important;
  height:     1.25rem !important;
  min-width:  1.25rem !important;
  min-height: 1.25rem !important;
  max-width:  1.25rem !important;
  max-height: 1.25rem !important;
}
 
/* TERTIARY FIX: target through aria-label on the prev/next spans */
span[aria-label*="Previous"] svg,
span[aria-label*="Next"] svg,
a[aria-label*="Previous"] svg,
a[aria-label*="Next"] svg,
[aria-label="&laquo; Previous"] svg,
[aria-label="Next &raquo;"] svg {
  width:      1.25rem !important;
  height:     1.25rem !important;
  max-width:  1.25rem !important;
  max-height: 1.25rem !important;
}
 
/* Keep Tailwind width/height utilities working for SVGs */
svg.w-4 { width: 1rem    !important; height: 1rem    !important; max-width: 1rem    !important; max-height: 1rem    !important; }
svg.w-5 { width: 1.25rem !important; height: 1.25rem !important; max-width: 1.25rem !important; max-height: 1.25rem !important; }
svg.w-6 { width: 1.5rem  !important; height: 1.5rem  !important; max-width: 1.5rem  !important; max-height: 1.5rem  !important; }
 
/* Layout fix for the pagination container row */
nav[aria-label="Pagination Navigation"],
[aria-label="Pagination Navigation"] {
  display:     flex;
  align-items: center;
  gap:         4px;
  flex-wrap:   wrap;
}
 
/* Prev/Next button sizing — do NOT touch max-width globally */
nav[aria-label="Pagination Navigation"] a,
nav[aria-label="Pagination Navigation"] span,
[aria-label="Pagination Navigation"] a,
[aria-label="Pagination Navigation"] span {
  display:         inline-flex !important;
  align-items:     center !important;
  justify-content: center !important;
  padding:         0.4rem 0.65rem !important;
  /* NO max-width:none here — that was the bug */
}
 
/* Global SVG guard — prevent any svg from stretching wildly */
svg {
  flex-shrink: 0;
  overflow: visible;
}
 
 
/* ════════════════════════════════════════════════════════════
   SKOOLSYNC CUSTOM PAGINATION STYLES
   (goes with tailwind.blade.php override in vendor/pagination)
   Add this to your app.css Section 29, replacing the old block
   ════════════════════════════════════════════════════════════ */
 
.skq-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 20px;
}
 
.skq-page-info {
  font-size: 0.8rem;
  color: var(--muted);
}
 
.skq-page-info strong {
  color: var(--text);
  font-weight: 700;
}
 
.skq-page-btns {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
 
.skq-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 9px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  text-decoration: none;
  transition: all var(--t-fast);
  cursor: pointer;
  /* NO SVG, NO Tailwind — uses Bootstrap Icons (bi-chevron-left/right) */
}
 
.skq-page-btn i {
  font-size: 0.85rem;  /* fixed pixel size — no more 922px */
  line-height: 1;
}
 
.skq-page-btn:hover:not(.disabled):not(.active) {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  transform: translateY(-1px);
}
 
.skq-page-btn.active {
  background: var(--brand-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  pointer-events: none;
}
 
.skq-page-btn.disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}
 
.skq-page-btn.ellipsis {
  background: transparent;
  border-color: transparent;
  letter-spacing: 0.05em;
  pointer-events: none;
}
 
[data-theme="dark"] .skq-page-btn {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(255,255,255,0.08);
}
 



/* ────────────────────────────────────────────────────────────
   30. UTILITIES
   ──────────────────────────────────────────────────────────── */
.cursor-pointer { cursor: pointer; }
.truncate       { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Brand text */
.brand-text {
  font-weight: 800;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Info label/value pairs */
.info-label { font-size: 0.74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
.info-value  { font-size: 0.92rem; font-weight: 600; color: var(--text); }

/* Divider */
.skq-divider {
  height: 1px;
  background: var(--card-border);
  margin: 16px 0;
}

/* Glass container */
.main-glass {
  background: rgba(255,255,255,0.55);
  border-radius: var(--radius-xl);
  box-shadow: 0 6px 48px rgba(37, 99, 235, 0.08);
  padding: 32px 24px;
  animation: fadeIn 0.45s ease both;
}
[data-theme="dark"] .main-glass { background: rgba(10,14,30,0.55); }

/* PTR indicator */
#ptr-indicator {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%) translateY(-100%);
  background: var(--brand-grad);
  color: #fff;
  padding: 8px 24px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  display: flex; align-items: center; gap: 10px;
  font-size: 0.85rem; font-weight: 600;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
  transition: transform 0.35s ease;
}


/* ────────────────────────────────────────────────────────────
   31. MOBILE / RESPONSIVE
   ──────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .admin-shell { padding: 0 12px 40px; }
  .dashboard-panels { grid-template-columns: 1fr; }
  .login-form-panel { padding: 28px 20px; }
  .dash-card { flex: 1 1 150px; min-width: 130px; }
}

@media (max-width: 576px) {
  .admin-topbar, .topbar { padding: 0 14px; height: 60px; }
  .admin-content, .admin-main { padding-top: 78px; }
  .glass-card { border-radius: var(--radius-md); }
  .welcome-hero { flex-direction: column; gap: 12px; text-align: center; }
  .welcome-hero .wh-icon { display: none; }
  .stat-panel { grid-template-columns: repeat(2, 1fr); }
  .page-hero .hero-icon { display: none; }
  .filter-bar { padding: 10px 12px; }
}



/* ────────────────────────────────────────────────────────────
   32. DARK MODE OVERRIDES
   ──────────────────────────────────────────────────────────── */
[data-theme="dark"] { color-scheme: dark; }
[data-theme="dark"] .sb-card { box-shadow: 0 8px 32px rgba(0,0,0,0.35); }
[data-theme="dark"] .table   { --bs-table-striped-bg: rgba(255,255,255,0.03); }
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select { color-scheme: dark; }
[data-theme="dark"] .insight-item { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .skq-tab.active { background: rgba(37,99,235,0.22); }
[data-theme="dark"] .login-container { background: rgba(10,16,34,0.96); }
[data-theme="dark"] .login-form-panel { background: transparent; }
[data-theme="dark"] .solid-card { border-color: rgba(255,255,255,0.07); }
[data-theme="dark"] .filter-bar { background: rgba(15,23,42,0.6); }
[data-theme="dark"] .school-chip { background: rgba(96,165,250,0.12); border-color: rgba(96,165,250,0.2); }
.sidebar-toggle i,
.sidebar-collapser i,
.sidebar-collapse-btn i,
[data-sidebar-toggle] i,
.layout-sidebar-toggle i {
  font-size: 1rem !important;
  line-height: 1 !important;
}
 
/* 2. Ensure Bootstrap Icons never inherit a huge font-size
      from a wrapper that forgot to set one */
.bi {
  display: inline-block;
  line-height: 1;
}
 
/* 3. Prevent bi- icons inside layout chrome from ballooning */
.sidebar .bi,
.navbar .bi,
.topbar .bi {
  font-size: inherit;
}
