/* ═══════════════════════════════════════════
   School ERP — Global Stylesheet
   DB setting 'theme' = light|dark controls all
═══════════════════════════════════════════ */

:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
}

/* ── Disable browser zoom ── */
html { touch-action: pan-x pan-y; }

/* ── Print — hide UI chrome ── */
@media print {
  #sa-bar,
  .sidebar,
  .topbar,
  #erp-toast-wrap { display: none !important; }
  .main-content { margin-left: 0 !important; margin-top: 0 !important; padding-top: 0 !important; }
  body { padding-bottom: 0 !important; background: #fff !important; color: #000 !important; }
}

/* ── Hover Cards ── */
.hover-card { transition: transform .3s, box-shadow .3s; }
.hover-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,.12) !important; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ── Buttons ── */
.btn-primary-custom { background: var(--primary); color: #fff; border: none; border-radius: 8px; padding: 10px 24px; font-weight: 600; transition: all .3s; }
.btn-primary-custom:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); }

/* ── Section Title (public pages) ── */
.section-title { font-size: 2rem; font-weight: 700; color: #1e293b; }
.section-title::after { content: ''; display: block; width: 60px; height: 4px; background: var(--primary); border-radius: 2px; margin: 10px auto 0; }

/* ── Swiper ── */
.heroSwiper .swiper-button-next,
.heroSwiper .swiper-button-prev { color: #fff; }
.heroSwiper .swiper-pagination-bullet-active { background: #fff; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .section-title { font-size: 1.5rem; }
  .display-4 { font-size: 2rem; }
}

/* ═══════════════════════════════════════════
   DARK THEME — body.dark-theme
   Applied server-side by PHP on every page
═══════════════════════════════════════════ */

body.dark-theme {
  background: #0f172a !important;
  color: #e2e8f0 !important;
}

/* ── Dashboard body bg ── */
body.dark-theme.dash-body { background: #0f172a !important; }

/* ── Topbar ── */
body.dark-theme .topbar {
  background: #1e293b !important;
  border-bottom: 1px solid #334155 !important;
  box-shadow: 0 1px 8px rgba(0,0,0,.4) !important;
}
body.dark-theme .topbar .text-muted,
body.dark-theme .topbar .fw-semibold { color: #94a3b8 !important; }
body.dark-theme .topbar .btn-light,
body.dark-theme .topbar .dropdown-toggle,
body.dark-theme .theme-toggle-btn {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

/* ── Cards ── */
body.dark-theme .card,
body.dark-theme .stat-card,
body.dark-theme .content-card {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
body.dark-theme .card-header { background: #263348 !important; border-color: #334155 !important; }

/* ── Tables ── */
body.dark-theme .table {
  color: #e2e8f0 !important;
  --bs-table-color: #e2e8f0;
  --bs-table-bg: #1e293b;
  --bs-table-border-color: #334155;
  --bs-table-striped-bg: #263348;
  --bs-table-striped-color: #e2e8f0;
  --bs-table-active-bg: #334155;
  --bs-table-hover-bg: #263348;
  --bs-table-hover-color: #e2e8f0;
}
body.dark-theme .table-light {
  --bs-table-color: #94a3b8;
  --bs-table-bg: #263348;
  --bs-table-border-color: #334155;
  background-color: #263348 !important;
  color: #94a3b8 !important;
}
body.dark-theme .table thead,
body.dark-theme .table thead tr,
body.dark-theme .table thead th {
  background-color: #263348 !important;
  color: #94a3b8 !important;
  border-color: #334155 !important;
}
body.dark-theme .table tbody tr {
  background-color: #1e293b !important;
  --bs-table-bg: #1e293b;
}
body.dark-theme .table td,
body.dark-theme .table th {
  border-color: #334155 !important;
  color: #e2e8f0 !important;
  background-color: transparent !important;
}
body.dark-theme .table-hover tbody tr:hover,
body.dark-theme .table-hover tbody tr:hover td {
  background-color: #263348 !important;
  --bs-table-hover-bg: #263348;
  color: #e2e8f0 !important;
}
body.dark-theme .table-responsive { background: #1e293b !important; }

/* ── Forms ── */
body.dark-theme .form-control,
body.dark-theme .form-select {
  background: #263348 !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}
body.dark-theme .form-control::placeholder { color: #64748b !important; }
body.dark-theme .form-control:focus,
body.dark-theme .form-select:focus {
  background: #1e293b !important;
  border-color: var(--primary) !important;
  color: #e2e8f0 !important;
  box-shadow: 0 0 0 3px rgba(79,70,229,.2) !important;
}
body.dark-theme .input-group-text {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #94a3b8 !important;
}
body.dark-theme .form-label { color: #cbd5e1 !important; }

/* ── Tabs ── */
body.dark-theme .nav-tabs { border-color: #334155 !important; }
body.dark-theme .nav-tabs .nav-link { color: #94a3b8 !important; border-color: transparent !important; }
body.dark-theme .nav-tabs .nav-link.active {
  background: #1e293b !important;
  border-color: #334155 #334155 #1e293b !important;
  color: #e2e8f0 !important;
}

/* ── Modals ── */
body.dark-theme .modal-content { background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important; }
body.dark-theme .modal-header,
body.dark-theme .modal-footer { border-color: #334155 !important; }

/* ── Alerts ── */
body.dark-theme .alert-success { background: rgba(16,185,129,.15) !important; color: #6ee7b7 !important; border-color: rgba(16,185,129,.3) !important; }
body.dark-theme .alert-danger  { background: rgba(239,68,68,.15)  !important; color: #fca5a5 !important; border-color: rgba(239,68,68,.3)  !important; }
body.dark-theme .alert-warning { background: rgba(245,158,11,.15) !important; color: #fcd34d !important; border-color: rgba(245,158,11,.3) !important; }
body.dark-theme .alert-info    { background: rgba(14,165,233,.15) !important; color: #7dd3fc !important; border-color: rgba(14,165,233,.3) !important; }
body.dark-theme .alert-secondary { background: #263348 !important; color: #94a3b8 !important; border-color: #334155 !important; }

/* ── Misc ── */
body.dark-theme .text-muted { color: #64748b !important; }
body.dark-theme .border-bottom,
body.dark-theme .border-top { border-color: #334155 !important; }
body.dark-theme hr { border-color: #334155 !important; }
body.dark-theme .badge.bg-light { background: #334155 !important; color: #e2e8f0 !important; }
body.dark-theme .btn-light { background: #334155 !important; border-color: #475569 !important; color: #e2e8f0 !important; }
body.dark-theme .btn-outline-primary { color: var(--primary) !important; border-color: var(--primary) !important; }
body.dark-theme .btn-outline-secondary { color: #94a3b8 !important; border-color: #475569 !important; }
body.dark-theme .progress { background: #334155 !important; }
body.dark-theme .dropdown-menu { background: #1e293b !important; border-color: #334155 !important; }
body.dark-theme .dropdown-item { color: #e2e8f0 !important; }
body.dark-theme .dropdown-item:hover { background: #334155 !important; }
body.dark-theme .list-group-item { background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important; }
body.dark-theme h1,body.dark-theme h2,body.dark-theme h3,
body.dark-theme h4,body.dark-theme h5,body.dark-theme h6 { color: #f1f5f9 !important; }
body.dark-theme .fw-bold,body.dark-theme .fw-semibold { color: #f1f5f9 !important; }
body.dark-theme small { color: #94a3b8 !important; }

/* ── Toast Notifications ── */
#erp-toast-wrap{position:fixed;top:70px;right:20px;z-index:99999;display:flex;flex-direction:column;gap:8px;pointer-events:none;width:300px;}
@media(max-width:768px){#erp-toast-wrap{right:10px;left:10px;width:auto;}}
.erp-toast{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:10px;box-shadow:0 4px 20px rgba(0,0,0,.15);width:100%;pointer-events:all;animation:toastIn .3s cubic-bezier(.21,1.02,.73,1) forwards;position:relative;overflow:hidden;}
.erp-toast.hiding{animation:toastOut .3s ease forwards;}
.erp-toast-icon{font-size:16px;flex-shrink:0;}
.erp-toast-body{flex:1;}
.erp-toast-title{font-weight:700;font-size:12px;margin-bottom:1px;}
.erp-toast-msg{font-size:12px;line-height:1.3;}
.erp-toast-close{background:none;border:none;cursor:pointer;opacity:.5;font-size:13px;padding:0;flex-shrink:0;}
.erp-toast-close:hover{opacity:1;}
.erp-toast-bar{position:absolute;bottom:0;left:0;height:2px;animation:toastBar linear forwards;}
.erp-toast.success{background:#f0fdf4;color:#14532d;border-left:4px solid #22c55e;}
.erp-toast.success .erp-toast-bar{background:#22c55e;}
.erp-toast.error{background:#fef2f2;color:#7f1d1d;border-left:4px solid #ef4444;}
.erp-toast.error .erp-toast-bar{background:#ef4444;}
.erp-toast.warning{background:#fffbeb;color:#78350f;border-left:4px solid #f59e0b;}
.erp-toast.warning .erp-toast-bar{background:#f59e0b;}
.erp-toast.info{background:#eff6ff;color:#1e3a5f;border-left:4px solid #3b82f6;}
.erp-toast.info .erp-toast-bar{background:#3b82f6;}
body.dark-theme .erp-toast.success{background:#052e16;color:#bbf7d0;border-left-color:#166534;}
body.dark-theme .erp-toast.error{background:#2d0a0a;color:#fecaca;border-left-color:#7f1d1d;}
body.dark-theme .erp-toast.warning{background:#2d1a00;color:#fde68a;border-left-color:#92400e;}
body.dark-theme .erp-toast.info{background:#0c1a2e;color:#bfdbfe;border-left-color:#1e3a5f;}
@keyframes toastIn{from{opacity:0;transform:translateX(40px);}to{opacity:1;transform:translateX(0);}}
@keyframes toastOut{from{opacity:1;transform:translateX(0);}to{opacity:0;transform:translateX(40px);}}
@keyframes toastBar{from{width:100%;}to{width:0%;}}


body.dark-theme .main-nav { background: #1e293b !important; box-shadow: 0 2px 16px rgba(0,0,0,.4) !important; }
body.dark-theme .brand-name { color: var(--primary) !important; }
body.dark-theme .brand-tag { color: #94a3b8 !important; }
body.dark-theme .desk-nav > li > a { color: #e2e8f0 !important; }
body.dark-theme .desk-nav > li > a:hover,
body.dark-theme .desk-nav > li > a.active { background: rgba(255,255,255,.08) !important; color: var(--primary) !important; }
body.dark-theme .desk-nav .drop { background: #1e293b !important; border-color: #334155 !important; }
body.dark-theme .desk-nav .drop a { color: #e2e8f0 !important; }
body.dark-theme .desk-nav .drop a:hover { background: #263348 !important; }
body.dark-theme .top-bar { background: #0f172a !important; }
body.dark-theme .mob-drawer { background: #1e293b !important; }
body.dark-theme .mob-links a { color: #e2e8f0 !important; }
body.dark-theme .mob-links a:hover { background: #263348 !important; }
body.dark-theme .section-title { color: #f1f5f9 !important; }
body.dark-theme .section-sub { color: #94a3b8 !important; }
body.dark-theme section { background: transparent; }
body.dark-theme section[style*="background:#f8fafc"],
body.dark-theme section[style*="background: #f8fafc"] { background: #0f172a !important; }
body.dark-theme .nav-ham { border-color: #475569 !important; color: #e2e8f0 !important; }

/* ── Timetable Page ── */
body.dark-theme .filter-card,
body.dark-theme .info-bar { background: #1e293b !important; border-color: #334155 !important; }

body.dark-theme .view-toggle { background: #1e293b !important; box-shadow: 0 2px 8px rgba(0,0,0,.3) !important; }
body.dark-theme .view-btn { color: #94a3b8 !important; }
body.dark-theme .view-btn.active { background: var(--primary) !important; color: #fff !important; }

body.dark-theme .period-cell { background: #263348 !important; box-shadow: 0 1px 4px rgba(0,0,0,.3) !important; }
body.dark-theme .period-cell .subj { color: #f1f5f9 !important; }
body.dark-theme .period-cell .meta { color: #94a3b8 !important; }
body.dark-theme .period-cell .time { color: #64748b !important; }
body.dark-theme .period-cell .room { background: #334155 !important; color: #94a3b8 !important; }
body.dark-theme .period-cell:hover { box-shadow: 0 3px 12px rgba(0,0,0,.4) !important; }

body.dark-theme .empty-cell { background: #1e293b !important; border-color: #334155 !important; color: #475569 !important; }
body.dark-theme .empty-cell:hover { border-color: var(--primary) !important; color: var(--primary) !important; background: #1e1b4b !important; }

body.dark-theme .tt-table { border-color: #334155 !important; }
body.dark-theme .tt-table th { background: #263348 !important; color: #94a3b8 !important; border-color: #334155 !important; }
body.dark-theme .tt-table td { border-color: #334155 !important; background: #0f172a !important; }
body.dark-theme .tt-table .day-td { background: #1e293b !important; }
body.dark-theme .tt-table tr.today-row td { background: #1c1a0f !important; }
body.dark-theme .tt-table tr.today-row .day-td { background: #2a2510 !important; }

body.dark-theme .teacher-card { background: #1e293b !important; border-color: #334155 !important; }
body.dark-theme .teacher-card:hover { background: #1e1b4b !important; border-color: var(--primary) !important; }
body.dark-theme .teacher-card .fw-semibold { color: #f1f5f9 !important; }

body.dark-theme .stat-pill { opacity: .9; }
body.dark-theme .period-count-badge { background: #312e81 !important; color: #a5b4fc !important; }

/* ── Homework Page ── */
body.dark-theme .hw-card { background: #1e293b !important; border-color: #334155 !important; box-shadow: 0 2px 12px rgba(0,0,0,.3) !important; }
body.dark-theme .hw-card .hw-top { background: transparent !important; }
body.dark-theme .hw-card .hw-foot { background: #263348 !important; border-top-color: #334155 !important; }
body.dark-theme .hw-card .fw-bold[style*="color:#1e293b"] { color: #f1f5f9 !important; }
body.dark-theme .hw-card p.text-muted { color: #94a3b8 !important; }

body.dark-theme .filter-bar { background: #1e293b !important; box-shadow: 0 2px 8px rgba(0,0,0,.3) !important; }

/* Submissions modal body — dynamically injected HTML */
body.dark-theme #subModalBody { background: #1e293b !important; color: #e2e8f0 !important; }
body.dark-theme #subModalBody > div[style*="border-bottom"] { border-bottom-color: #334155 !important; }
body.dark-theme #subModalBody div[style*="background:#f8fafc"] { background: #263348 !important; }
body.dark-theme #subModalBody div[style*="background:#f0f9ff"] { background: #0c1a2e !important; color: #7dd3fc !important; }
body.dark-theme #subModalBody div[style*="color:#1e293b"] { color: #f1f5f9 !important; }
body.dark-theme #subModalBody div[style*="color:#64748b"] { color: #94a3b8 !important; }
body.dark-theme #subModalBody div[style*="background:#fef9c3"] { background: #2d2000 !important; border-bottom-color: #92400e !important; }
body.dark-theme #subModalBody span[style*="color:#94a3b8"] { color: #64748b !important; }
body.dark-theme #subModalBody .form-control { background: #334155 !important; border-color: #475569 !important; color: #e2e8f0 !important; }
body.dark-theme #subModalBody textarea { background: #334155 !important; border-color: #475569 !important; color: #e2e8f0 !important; }
body.dark-theme #subModalBody input[type="number"] { background: #334155 !important; border-color: #475569 !important; color: #e2e8f0 !important; }


/* ═══════════════════════════════════════════
   PUBLIC PAGES — DARK MODE
   Covers home.php, about, teachers, etc.
═══════════════════════════════════════════ */

/* ── CSS Variables dark override ── */
body.dark-theme {
  --text: #e2e8f0;
  --muted: #94a3b8;
}

/* ── Body & sections ── */
body.dark-theme { background:#0f172a !important; color:#e2e8f0 !important; }

body.dark-theme section { background:#0f172a; }
body.dark-theme section[style*="background:#f8fafc"],
body.dark-theme section[style*="background: #f8fafc"] { background:#111827 !important; }
body.dark-theme section[style*="background:linear-gradient(135deg,#f8fafc"],
body.dark-theme section[style*="background:linear-gradient(135deg,#f1f5f9"] { background:#111827 !important; }
body.dark-theme section[style*="background:linear-gradient(135deg,#f1f5f9,#ede9fe"] { background:linear-gradient(135deg,#111827,#1e1b4b) !important; }
body.dark-theme section[style*="background:#f8fafc;padding"] { background:#111827 !important; }

/* ── All inline white backgrounds ── */
body.dark-theme [style*="background:#fff"],
body.dark-theme [style*="background: #fff"],
body.dark-theme [style*="background:#ffffff"],
body.dark-theme [style*="background: #ffffff"] { background:#1e293b !important; }

body.dark-theme [style*="background:#f8fafc"] { background:#1e293b !important; }
body.dark-theme [style*="background:#f1f5f9"] { background:#263348 !important; }
body.dark-theme [style*="background:#eff6ff"] { background:#0c1a3a !important; }
body.dark-theme [style*="background:#f0fdf4"] { background:#052e16 !important; }
body.dark-theme [style*="background:#fef2f2"] { background:#2d0a0a !important; }
body.dark-theme [style*="background:#fffbeb"] { background:#2d1a00 !important; }
body.dark-theme [style*="background:#faf5ff"] { background:#1e1b4b !important; }
body.dark-theme [style*="background:#ede9fe"] { background:#1e1b4b !important; }
body.dark-theme [style*="background:rgba(255,255,255,.12)"] { background:rgba(255,255,255,.06) !important; }
body.dark-theme [style*="background:rgba(255,255,255,.08)"] { background:rgba(255,255,255,.05) !important; }
body.dark-theme [style*="background:rgba(255,255,255,.05)"] { background:rgba(255,255,255,.04) !important; }

/* ── Text colors ── */
body.dark-theme [style*="color:#1e293b"] { color:#f1f5f9 !important; }
body.dark-theme [style*="color:#334155"] { color:#e2e8f0 !important; }
body.dark-theme [style*="color:#475569"] { color:#cbd5e1 !important; }
body.dark-theme [style*="color:#64748b"] { color:#94a3b8 !important; }
body.dark-theme [style*="color:#94a3b8"] { color:#64748b !important; }
body.dark-theme p { color:#cbd5e1; }
body.dark-theme p.text-muted,
body.dark-theme .text-muted { color:#64748b !important; }
body.dark-theme small { color:#94a3b8 !important; }
body.dark-theme span[style*="color:#1e293b"] { color:#f1f5f9 !important; }
body.dark-theme div[style*="color:#1e293b"] { color:#f1f5f9 !important; }
body.dark-theme div[style*="color:#334155"] { color:#e2e8f0 !important; }
body.dark-theme div[style*="color:#475569"] { color:#cbd5e1 !important; }

/* ── Cards ── */
body.dark-theme .card { background:#1e293b !important; border-color:#334155 !important; color:#e2e8f0 !important; }
body.dark-theme .card h5,
body.dark-theme .card h6 { color:#f1f5f9 !important; }
body.dark-theme .card p { color:#94a3b8 !important; }
body.dark-theme .card .text-muted { color:#64748b !important; }
body.dark-theme .card [style*="color:#1e293b"] { color:#f1f5f9 !important; }
body.dark-theme .card [style*="background:#f8fafc"] { background:#263348 !important; }
body.dark-theme .card [style*="border-bottom:1px solid #f1f5f9"] { border-bottom-color:#334155 !important; }

/* ── Section headings & badges ── */
body.dark-theme .section-title { color:#f1f5f9 !important; }
body.dark-theme .section-title span { color:var(--pri) !important; }
body.dark-theme .section-sub { color:#94a3b8 !important; }
body.dark-theme .section-badge { background:rgba(79,70,229,.2) !important; color:#a78bfa !important; }

/* ── About section floating cards ── */
body.dark-theme [style*="box-shadow:0 8px 24px rgba(0,0,0,.12)"] { background:#1e293b !important; }
body.dark-theme [style*="box-shadow:0 8px 24px rgba(0,0,0,.12)"] [style*="color:#64748b"] { color:#94a3b8 !important; }
body.dark-theme [style*="box-shadow:0 8px 24px rgba(0,0,0,.12)"] [style*="color:#1e293b"] { color:#f1f5f9 !important; }

/* ── Principal section ── */
body.dark-theme [style*="background:rgba(79,70,229,.07)"] { background:rgba(79,70,229,.15) !important; }
body.dark-theme [style*="border-top:1px solid #f1f5f9"] { border-top-color:#334155 !important; }

/* ── Teacher cards ── */
body.dark-theme [style*="background:rgba(79,70,229,.08)"] { background:rgba(79,70,229,.2) !important; }
body.dark-theme [style*="border:4px solid #fff"] { border-color:#1e293b !important; }

/* ── Notice board ── */
body.dark-theme [style*="border-bottom:1px solid #f1f5f9"] { border-bottom-color:#334155 !important; }
body.dark-theme [style*="background:rgba(79,70,229,.1)"] { background:rgba(79,70,229,.2) !important; }
body.dark-theme [style*="background:rgba(16,185,129,.1)"] { background:rgba(16,185,129,.15) !important; }
body.dark-theme [style*="background:rgba(245,158,11,.1)"] { background:rgba(245,158,11,.15) !important; }

/* ── Hover cards dark ── */
body.dark-theme .hover-card:hover { box-shadow:0 20px 50px rgba(0,0,0,.4) !important; }

/* ── Buttons ── */
body.dark-theme .btn-out { color:var(--pri) !important; border-color:var(--pri) !important; }
body.dark-theme .btn-out:hover { background:var(--pri) !important; color:#fff !important; }

/* ── Footer ── */
body.dark-theme footer { background:#020617 !important; }
body.dark-theme footer [style*="border-top:1px solid rgba(255,255,255,.08)"] { border-top-color:rgba(255,255,255,.06) !important; }

/* ── Mobile drawer dark ── */
body.dark-theme .mob-drawer { background:#1e293b !important; }
body.dark-theme .mob-links a { color:#e2e8f0 !important; }
body.dark-theme .mob-links a:hover,
body.dark-theme .mob-links a.active { background:#263348 !important; color:var(--pri) !important; }
body.dark-theme .mob-links .mob-section { color:#64748b !important; }
body.dark-theme .nav-ham { border-color:#475569 !important; color:#e2e8f0 !important; }
body.dark-theme .nav-ham:hover { background:#263348 !important; }

/* ── Privacy / Terms / Refund pages ── */
body.dark-theme [style*="background:#eff6ff"] { background:#0c1a3a !important; }
body.dark-theme [style*="border:1.5px solid #bfdbfe"] { border-color:#1e40af !important; }
body.dark-theme [style*="color:#1e40af"] { color:#93c5fd !important; }
body.dark-theme [style*="background:#fffbeb"] { background:#2d1a00 !important; }
body.dark-theme [style*="border:1.5px solid #fde68a"] { border-color:#92400e !important; }
body.dark-theme [style*="color:#92400e"] { color:#fcd34d !important; }
body.dark-theme [style*="background:#f0fdf4"] { background:#052e16 !important; }
body.dark-theme [style*="border:1.5px solid #bbf7d0"] { border-color:#166534 !important; }
body.dark-theme [style*="color:#166534"] { color:#86efac !important; }
body.dark-theme table { color:#e2e8f0 !important; }
body.dark-theme table th { background:#263348 !important; color:#94a3b8 !important; border-color:#334155 !important; }
body.dark-theme table td { border-color:#334155 !important; color:#cbd5e1 !important; }
body.dark-theme table tr[style*="background:#f8fafc"] { background:#1e293b !important; }

/* ── Scrollbar dark ── */
body.dark-theme ::-webkit-scrollbar-track { background:#1e293b; }
body.dark-theme ::-webkit-scrollbar-thumb { background:var(--pri); }

/* ── Facilities card dark ── */
body.dark-theme .fac-card { background:#1e293b !important; border-color:#334155 !important; }
body.dark-theme .fac-card h5 { color:#f1f5f9 !important; }
body.dark-theme .fac-card p  { color:#94a3b8 !important; }

/* ── Teacher card dark ── */
body.dark-theme .hover-card[style*="background:#fff;border-radius:20px"] { background:#1e293b !important; border-color:#334155 !important; }
body.dark-theme .hover-card[style*="background:#fff;border-radius:20px"] h6 { color:#f1f5f9 !important; }
body.dark-theme .hover-card[style*="background:#fff;border-radius:20px"] [style*="color:#1e293b"] { color:#f1f5f9 !important; }
body.dark-theme .hover-card[style*="background:#fff;border-radius:20px"] [style*="color:#94a3b8"] { color:#64748b !important; }
body.dark-theme .hover-card[style*="background:#fff;border-radius:20px"] [style*="border:4px solid #fff"] { border-color:#1e293b !important; }
body.dark-theme .hover-card[style*="background:#fff;border-radius:20px"] [style*="background:rgba(79,70,229,.08)"] { background:rgba(79,70,229,.2) !important; }

/* ── New Header Dark Mode ── */
body.dark-theme .main-nav { background:#1e293b !important; box-shadow:0 1px 0 #334155,0 4px 20px rgba(0,0,0,.3) !important; }
body.dark-theme .desk-nav > li > a { color:#94a3b8 !important; }
body.dark-theme .desk-nav > li > a:hover,
body.dark-theme .desk-nav > li > a.active { color:var(--pri) !important; background:rgba(79,70,229,.1) !important; }
body.dark-theme .desk-nav .drop { background:#1e293b !important; box-shadow:0 16px 48px rgba(0,0,0,.4),0 0 0 1px #334155 !important; }
body.dark-theme .desk-nav .drop a { color:#cbd5e1 !important; }
body.dark-theme .desk-nav .drop a:hover { background:#263348 !important; color:var(--pri) !important; }
body.dark-theme .desk-nav .drop a .di[style*="background:#eff6ff"] { background:#0c1a3a !important; }
body.dark-theme .desk-nav .drop a .di[style*="background:#f0fdf4"] { background:#052e16 !important; }
body.dark-theme .desk-nav .drop a .di[style*="background:#fffbeb"] { background:#2d1a00 !important; }
body.dark-theme .desk-nav .drop a .di[style*="background:#fef2f2"] { background:#2d0a0a !important; }
body.dark-theme .brand-text .b-name { color:var(--pri) !important; }
body.dark-theme .brand-text .b-tag { color:#64748b !important; }
body.dark-theme .nav-ham { border-color:#475569 !important; color:#e2e8f0 !important; }
body.dark-theme .nav-ham:hover { background:#263348 !important; }
body.dark-theme .mob-drawer { background:#1e293b !important; }
body.dark-theme .mob-links a { color:#cbd5e1 !important; }
body.dark-theme .mob-links a:hover,
body.dark-theme .mob-links a.active { color:var(--pri) !important; background:rgba(79,70,229,.08) !important; }
body.dark-theme .mob-sec-label { color:#475569 !important; }
body.dark-theme .mob-links a .mi[style*="background:#eff6ff"] { background:#0c1a3a !important; }
body.dark-theme .mob-links a .mi[style*="background:#f0fdf4"] { background:#052e16 !important; }
body.dark-theme .mob-links a .mi[style*="background:#fffbeb"] { background:#2d1a00 !important; }
body.dark-theme .mob-links a .mi[style*="background:#fef2f2"] { background:#2d0a0a !important; }
body.dark-theme .mob-links a .mi[style*="background:#f8fafc"] { background:#263348 !important; }

/* ═══ AOS-like Scroll Animations ═══ */
[data-aos]{opacity:0;transition:opacity .7s ease,transform .7s ease;}
[data-aos="fade-up"]{transform:translateY(40px);}
[data-aos="fade-left"]{transform:translateX(-40px);}
[data-aos="fade-right"]{transform:translateX(40px);}
[data-aos="zoom-in"]{transform:scale(.85);}
[data-aos="flip-up"]{transform:perspective(600px) rotateX(30deg);}
[data-aos].aos-animate{opacity:1;transform:none;}
[data-aos][data-aos-delay="100"]{transition-delay:.1s;}
[data-aos][data-aos-delay="200"]{transition-delay:.2s;}
[data-aos][data-aos-delay="300"]{transition-delay:.3s;}
[data-aos][data-aos-delay="400"]{transition-delay:.4s;}
[data-aos][data-aos-delay="500"]{transition-delay:.5s;}
[data-aos][data-aos-delay="600"]{transition-delay:.6s;}

/* ═══ Hero Styles ═══ */
.hero-wrap{position:relative;height:600px;overflow:hidden;display:flex;align-items:center;}
.hero-overlay{position:absolute;inset:0;background:linear-gradient(135deg,rgba(15,12,41,.82),rgba(79,70,229,.45));z-index:1;}
.hero-content{position:relative;z-index:2;}
.hero-btn-pri{background:var(--pri);color:#fff;border-radius:50px;padding:13px 32px;font-weight:700;text-decoration:none;font-size:.95rem;box-shadow:0 8px 24px rgba(79,70,229,.5);transition:all .3s;display:inline-block;}
.hero-btn-pri:hover{transform:translateY(-3px);color:#fff;box-shadow:0 12px 32px rgba(79,70,229,.6);}
.hero-btn-out{background:rgba(255,255,255,.12);color:#fff;border:1.5px solid rgba(255,255,255,.4);border-radius:50px;padding:12px 28px;font-weight:600;text-decoration:none;font-size:.95rem;backdrop-filter:blur(8px);transition:all .3s;display:inline-block;}
.hero-btn-out:hover{background:rgba(255,255,255,.25);color:#fff;}

/* ═══ Ticker ═══ */
.ticker-wrap{background:var(--pri);color:#fff;padding:8px 0;overflow:hidden;}
.ticker-track{display:flex;white-space:nowrap;animation:ticker 35s linear infinite;}
.ticker-track:hover{animation-play-state:paused;}
@keyframes ticker{0%{transform:translateX(0);}100%{transform:translateX(-50%);}}
.ticker-item{display:inline-flex;align-items:center;gap:6px;margin-right:50px;font-size:.82rem;}

/* ═══ Stats ═══ */
.stat-box{padding:22px 16px;border-right:1px solid rgba(255,255,255,.15);text-align:center;}
.stat-box:last-child{border-right:none;}
.stat-num{font-size:2.2rem;font-weight:900;line-height:1;}
.stat-lbl{font-size:.78rem;opacity:.8;margin-top:4px;}

/* ═══ About ═══ */
.about-img-wrap{position:relative;padding:0 30px 30px 0;}
.about-img-wrap img{border-radius:20px;width:100%;box-shadow:0 20px 60px rgba(0,0,0,.12);}
.about-badge{position:absolute;bottom:0;right:0;background:var(--pri);color:#fff;border-radius:16px;padding:16px 20px;text-align:center;box-shadow:0 8px 24px rgba(79,70,229,.4);}
.about-float{position:absolute;top:20px;left:-10px;background:#fff;border-radius:12px;padding:12px 16px;box-shadow:0 8px 24px rgba(0,0,0,.1);display:flex;align-items:center;gap:10px;}

/* ═══ Facility Card ═══ */
.fac-card{background:#fff;border-radius:16px;padding:24px 20px;box-shadow:0 4px 20px rgba(0,0,0,.06);border:1.5px solid #f1f5f9;transition:all .3s;height:100%;display:flex;gap:16px;align-items:flex-start;}
.fac-card:hover{transform:translateY(-4px);box-shadow:0 12px 40px rgba(0,0,0,.1);border-color:var(--pri);}
.fac-icon{width:52px;height:52px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:1.2rem;}

/* ═══ Teacher Card ═══ */
.tc-card{background:#fff;border-radius:18px;overflow:hidden;box-shadow:0 4px 20px rgba(0,0,0,.07);border:1.5px solid #f1f5f9;transition:all .3s;height:100%;}
.tc-card:hover{transform:translateY(-5px);box-shadow:0 16px 48px rgba(79,70,229,.15);border-color:var(--pri);}
.tc-head{height:110px;background:linear-gradient(135deg,var(--pri),#7c3aed);position:relative;}
.tc-head::after{content:'';position:absolute;inset:0;opacity:.08;background-image:radial-gradient(circle,#fff 1px,transparent 1px);background-size:14px 14px;}
.tc-photo{position:absolute;bottom:-38px;left:50%;transform:translateX(-50%);width:76px;height:76px;border-radius:50%;border:4px solid #fff;box-shadow:0 6px 20px rgba(0,0,0,.15);overflow:hidden;background:#e2e8f0;}
.tc-photo img{width:100%;height:100%;object-fit:cover;display:block;}
.tc-body{padding:46px 14px 18px;text-align:center;}

/* ═══ Gallery ═══ */
.gal-item{position:relative;border-radius:14px;overflow:hidden;height:200px;}
.gal-item img{width:100%;height:100%;object-fit:cover;transition:transform .4s;}
.gal-item:hover img{transform:scale(1.08);}
.gal-overlay{position:absolute;inset:0;background:linear-gradient(transparent 40%,rgba(0,0,0,.75));}
.gal-info{position:absolute;bottom:0;left:0;right:0;padding:12px;}

/* ═══ Principal ═══ */
.prin-card{background:#fff;border-radius:20px;padding:28px 24px;box-shadow:0 8px 32px rgba(79,70,229,.1);border:1.5px solid rgba(79,70,229,.1);text-align:center;}
.prin-photo{width:140px;height:140px;border-radius:50%;object-fit:cover;border:5px solid var(--pri);box-shadow:0 8px 24px rgba(79,70,229,.25);margin:0 auto 16px;display:block;}

/* ═══ CTA ═══ */
.cta-circle1{position:absolute;top:-60px;right:-60px;width:300px;height:300px;border-radius:50%;background:rgba(255,255,255,.05);}
.cta-circle2{position:absolute;bottom:-80px;left:-40px;width:250px;height:250px;border-radius:50%;background:rgba(255,255,255,.04);}

/* ═══ Counter ═══ */
@keyframes countUp{from{opacity:0;}to{opacity:1;}}

/* ═══ Dark mode overrides for new classes ═══ */
body.dark-theme .fac-card{background:#1e293b !important;border-color:#334155 !important;}
body.dark-theme .fac-card h5{color:#f1f5f9 !important;}
body.dark-theme .fac-card p{color:#94a3b8 !important;}
body.dark-theme .tc-card{background:#1e293b !important;border-color:#334155 !important;}
body.dark-theme .tc-body h6{color:#f1f5f9 !important;}
body.dark-theme .tc-body [style*="color:#1e293b"]{color:#f1f5f9 !important;}
body.dark-theme .tc-body [style*="color:#94a3b8"]{color:#64748b !important;}
body.dark-theme .tc-photo{border-color:#1e293b !important;}
body.dark-theme .prin-card{background:#1e293b !important;border-color:#334155 !important;}
body.dark-theme .about-float{background:#1e293b !important;}
body.dark-theme .about-float [style*="color:#1e293b"]{color:#f1f5f9 !important;}
body.dark-theme .about-float [style*="color:#64748b"]{color:#94a3b8 !important;}
