/* ===========================
   ZEOSCHOOL ERP — Modern Glassmorphism UI
   ZeoTeam Technologies
   =========================== */

:root {
    --zs-primary: #0ea5e9;
    --zs-secondary: #64748b;
    --zs-accent: #14b8a6;
    --zs-button: #0284c7;
    --zs-header: #ffffff;
    --zs-footer: #0f172a;
    --zs-bg: #f0f7ff;
    --zs-card: #ffffff;
    --zs-text: #0f172a;
    --zs-border: #dbe4ee;
    --zs-muted: #64748b;
    --zs-sidebar: #0c1f35;
    --zs-sidebar-soft: #172f4a;
    /* Glass tokens */
    --glass-bg: rgba(255,255,255,0.60);
    --glass-border: rgba(255,255,255,0.45);
    --glass-blur: blur(18px);
    --glass-shadow: 0 8px 32px rgba(15,23,42,0.10);
    --radius-card: 16px;
    --radius-btn: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--zs-bg);
    color: var(--zs-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--zs-button); text-decoration: none; }
a:hover { color: #0369a1; }

/* ── Buttons ───────────────────────────── */
.btn {
    border-radius: var(--radius-btn);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 2.4rem;
    font-weight: 600;
    font-size: .875rem;
    white-space: nowrap;
    transition: all .15s ease;
}
.btn i { font-size: 1rem; }
.btn-primary {
    --bs-btn-bg: var(--zs-button);
    --bs-btn-border-color: var(--zs-button);
    --bs-btn-hover-bg: #0369a1;
    --bs-btn-hover-border-color: #0369a1;
    box-shadow: 0 2px 10px rgba(2,132,199,.25);
}
.btn-light { background: rgba(255,255,255,.85); backdrop-filter: var(--glass-blur); border: 1px solid var(--zs-border); }
.btn-outline-success { color: #059669; border-color: #059669; }
.btn-outline-success:hover { background: #059669; color: #fff; }
.btn-xs { padding: .2rem .55rem; font-size: .78rem; min-height: 1.8rem; border-radius: 6px; }
.btn-sm { padding: .3rem .75rem; font-size: .82rem; min-height: 2rem; }

/* ── Forms ──────────────────────────────── */
.form-control, .form-select {
    border-radius: 8px;
    border-color: var(--zs-border);
    min-height: 2.5rem;
    background: rgba(255,255,255,.9);
    font-size: .9rem;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--zs-primary);
    box-shadow: 0 0 0 .2rem rgba(14,165,233,.14);
    background: #fff;
}

/* ── Utility ────────────────────────────── */
.muted, .subline, small { color: var(--zs-muted); }
.subline { display: block; font-size: .78rem; }
.select-filter { margin: .35rem 0 .4rem; font-size: .9rem; }
.inline-form { display: inline; }

/* ── PUBLIC NAV ─────────────────────────── */
.public-nav {
    background: rgba(255,255,255,.82);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(148,163,184,.2);
    min-height: 4.25rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 24px rgba(15,23,42,.06);
}
.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-weight: 800;
    font-size: 1.08rem;
    color: var(--zs-text);
}
.nav-logo, .brand-mark {
    width: 2.4rem; height: 2.4rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
}
.nav-logo img, .brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-initials { color: #0369a1; font-weight: 800; font-size: .9rem; }

/* ── HERO ───────────────────────────────── */
.hero-section {
    min-height: 88vh;
    background-color: #0c4a6e;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
}
.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(8,47,73,.88) 0%, rgba(8,47,73,.3) 100%);
    pointer-events: none;
}
.hero-inner { padding: 6rem 0 5rem; position: relative; z-index: 1; }
.hero-copy { max-width: 42rem; color: #fff; }
.hero-copy h1 {
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    line-height: 1.08;
    margin-bottom: 1rem;
    font-weight: 850;
    font-family: Georgia, "Times New Roman", serif;
    color: #fff;
}
.hero-copy .lead { font-size: 1.18rem; color: rgba(255,255,255,.9); margin-bottom: .75rem; }
.hero-copy p { max-width: 38rem; color: rgba(255,255,255,.8); }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.75rem; }
.hero-actions .btn {
    padding: .7rem 1.6rem;
    font-size: 1rem;
    border-radius: 50px;
    font-weight: 700;
}
.hero-actions .btn-light { color: var(--zs-text); }

/* ── PUBLIC SECTIONS ────────────────────── */
.public-section {
    padding: 5rem 0;
    background: var(--zs-card);
}
.public-section:nth-child(even) { background: #f0f7ff; }
.public-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.public-section.has-media:nth-child(even) .public-section-grid { direction: rtl; }
.public-section.has-media:nth-child(even) .section-copy,
.public-section.has-media:nth-child(even) .section-media { direction: ltr; }
.section-kicker {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 50px;
    padding: .2rem .9rem;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .75rem;
}
.section-copy h2 { font-size: clamp(1.6rem,3vw,2.4rem); font-weight: 800; margin-bottom: .75rem; }
.section-text { color: #334155; line-height: 1.75; max-width: 36rem; }
.section-media img {
    width: 100%; border-radius: 16px;
    box-shadow: 0 20px 60px rgba(15,23,42,.12);
    aspect-ratio: 4/3; object-fit: cover;
}

/* ── HIGHLIGHTS ─────────────────────────── */
.highlight-band {
    padding: 4rem 0;
    background: linear-gradient(135deg, #0c1f35 0%, #1e3a5f 100%);
    color: #fff;
}
.highlight-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }
.highlight-grid article {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-card);
    padding: 2rem;
    text-align: center;
    transition: transform .2s, background .2s;
}
.highlight-grid article:hover { transform: translateY(-4px); background: rgba(255,255,255,.1); }
.highlight-grid i { font-size: 2.2rem; color: #7dd3fc; display: block; margin-bottom: .75rem; }
.highlight-grid h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.highlight-grid p { color: rgba(255,255,255,.7); font-size: .9rem; margin: 0; }

/* ── CONTACT SECTION ────────────────────── */
.contact-section { padding: 5rem 0; background: #f8fafc; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.contact-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-card);
    padding: 2rem;
    box-shadow: var(--glass-shadow);
}
.contact-items { display: grid; gap: .85rem; margin-top: 1rem; }
.contact-item { display: flex; align-items: flex-start; gap: .75rem; }
.contact-item i { font-size: 1.2rem; color: var(--zs-primary); flex: 0 0 auto; margin-top: .1rem; }

/* ── PUBLIC FOOTER ──────────────────────── */
.public-footer {
    background: var(--zs-footer);
    color: rgba(255,255,255,.8);
    padding: 3.5rem 0 0;
    border-top: 1px solid rgba(255,255,255,.06);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand { display: flex; align-items: center; gap: .65rem; margin-bottom: .75rem; }
.footer-initials {
    width: 2.5rem; height: 2.5rem;
    background: linear-gradient(135deg,#0ea5e9,#0369a1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
}
.footer-brand strong { color: #fff; font-size: 1.05rem; }
.footer-address { font-size: .88rem; color: rgba(255,255,255,.6); margin: 0 0 .75rem; display: flex; gap: .4rem; align-items: flex-start; }
.footer-contact { display: flex; flex-direction: column; gap: .35rem; }
.footer-contact a { color: rgba(255,255,255,.7); font-size: .88rem; display: flex; align-items: center; gap: .4rem; }
.footer-contact a:hover { color: #7dd3fc; }
.footer-col h5 { color: #fff; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-col ul li a { color: rgba(255,255,255,.65); font-size: .88rem; display: flex; align-items: center; gap: .4rem; transition: color .15s; }
.footer-col ul li a:hover { color: #7dd3fc; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    font-size: .83rem;
    color: rgba(255,255,255,.45);
    flex-wrap: wrap;
    gap: .5rem;
}
.footer-credit a { color: rgba(255,255,255,.6); }
.footer-credit a:hover { color: #7dd3fc; }

/* ── STATIC PAGES (privacy etc.) ─────────── */
.static-page-wrap { max-width: 760px; margin: 0 auto; padding: 3rem 1.5rem; }
.static-page-body {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
}
.static-page-body h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: .25rem; }
.static-page-body h4 { font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
.static-page-back { margin-top: 2rem; }

/* ── AUTH LAYOUT ────────────────────────── */
.auth-layout {
    min-height: 100vh;
    background: linear-gradient(135deg, #0c1f35 0%, #1a3a5c 50%, #0c4a6e 100%);
    background-attachment: fixed;
}
.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}
.auth-panel {
    width: min(100%, 440px);
    background: rgba(255,255,255,.88);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 20px;
    padding: 2rem 2rem 1.75rem;
    box-shadow: 0 24px 80px rgba(0,0,0,.25);
}
.brand-block { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.5rem; }
.brand-block strong, .brand-block span { display: block; }
.brand-block strong { font-size: 1.05rem; }
.brand-block span { color: var(--zs-muted); font-size: .8rem; }
.stack-form { display: grid; gap: 1rem; }
.stack-form label,
.panel-form label,
.settings-form label,
.install-card label {
    display: grid;
    gap: .35rem;
    font-weight: 650;
    font-size: .88rem;
    color: #1e293b;
}
.check-row { display: flex !important; align-items: center; gap: .55rem !important; font-weight: 500 !important; font-size: .88rem; }
.auth-links { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; flex-wrap: wrap; }
.auth-links a { display: flex; align-items: center; gap: .3rem; color: var(--zs-button); }
.auth-note {
    display: flex; align-items: flex-start; gap: .55rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #075985;
    border-radius: 10px;
    padding: .75rem;
    font-size: .85rem;
}
.auth-note.large { margin: 1rem 0; line-height: 1.6; }

/* ── APP SHELL (Sidebar layout) ─────────── */
.app-layout { background: #e8f2fb; }
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
}
.sidebar {
    background: var(--zs-sidebar);
    color: #cbd5e1;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.1) transparent;
}
.sidebar-brand .brand-block {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    padding: .75rem;
    margin-bottom: .5rem;
}
.sidebar-brand strong { color: #fff; }
.sidebar-nav { display: grid; gap: .2rem; }
.nav-divider {
    margin: .9rem .5rem .3rem;
    color: #60a5fa;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.side-link {
    color: #94a3b8;
    display: grid;
    grid-template-columns: 1.3rem minmax(0,1fr);
    align-items: center;
    gap: .6rem;
    padding: .65rem .75rem;
    border-radius: 8px;
    font-size: .875rem;
    transition: background .15s, color .15s;
}
.side-link:hover { background: var(--zs-sidebar-soft); color: #e2e8f0; }
.side-link.active { background: var(--zs-button); color: #fff; box-shadow: 0 2px 10px rgba(2,132,199,.35); }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
    min-height: 4rem;
    background: rgba(255,255,255,.82);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(148,163,184,.2);
    padding: .6rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 2px 16px rgba(15,23,42,.06);
}
.topbar h1 { font-size: 1.2rem; margin: 0; font-weight: 800; line-height: 1.2; }
.topbar p { margin: 0; color: var(--zs-muted); font-size: .78rem; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.icon-btn {
    width: 2.25rem; height: 2.25rem;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--zs-border);
    border-radius: 8px;
    color: var(--zs-text);
    background: rgba(255,255,255,.7);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all .15s;
}
.icon-btn:hover { background: #e0f2fe; border-color: var(--zs-primary); color: var(--zs-button); }
.profile-chip {
    display: flex; align-items: center; gap: .4rem;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 50px;
    padding: .3rem .75rem .3rem .45rem;
    color: #0369a1;
    font-size: .83rem;
    font-weight: 600;
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-chip i { font-size: 1.15rem; flex-shrink: 0; }
.live-clock { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--zs-muted); }
.content-wrap { padding: 1.25rem; flex: 1; }

/* ── CARDS & PANELS ─────────────────────── */
.card, .info-panel, .dash-card, .panel-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    box-shadow: var(--glass-shadow);
}
.info-panel { padding: 1.5rem; margin-bottom: 1.25rem; }
.info-panel h2, .info-panel h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }

/* ── DASHBOARD ──────────────────────────── */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head h2 { font-size: 1.4rem; font-weight: 800; margin: 0; }
.head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.metric-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 1.25rem;
    display: flex; align-items: center; gap: 1rem;
    box-shadow: var(--glass-shadow);
    transition: transform .2s, box-shadow .2s;
}
.metric-card:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(15,23,42,.12); }
.metric-icon {
    width: 3rem; height: 3rem;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.metric-icon.blue { background: #dbeafe; color: #1d4ed8; }
.metric-icon.green { background: #dcfce7; color: #15803d; }
.metric-icon.orange { background: #ffedd5; color: #c2410c; }
.metric-icon.purple { background: #f3e8ff; color: #7c3aed; }
.metric-icon.red { background: #fee2e2; color: #dc2626; }
.metric-icon.teal { background: #ccfbf1; color: #0d9488; }
.metric-val { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.metric-label { font-size: .8rem; color: var(--zs-muted); margin-top: .15rem; }
.alert-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.alert-card {
    border-radius: 12px;
    padding: 1rem 1.1rem;
    display: flex; align-items: flex-start; gap: .75rem;
    border: 1px solid;
}
.alert-card.red { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-card.orange { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.alert-card.green { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.alert-card.blue { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.alert-icon { font-size: 1.3rem; flex-shrink: 0; }
.alert-title { font-weight: 700; font-size: .9rem; }
.alert-text { font-size: .83rem; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* ── TABLES ─────────────────────────────── */
.table-responsive-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid var(--zs-border);
}
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table {
    margin: 0;
    font-size: .875rem;
    width: 100%;
    min-width: 600px;
}
.data-table th, .data-table td,
.permission-table th, .permission-table td {
    padding: .7rem .9rem;
    font-size: .875rem;
    vertical-align: middle;
}
.table > thead > tr > th {
    background: #f1f5f9;
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--zs-muted);
    border-bottom: 2px solid var(--zs-border);
    white-space: nowrap;
}
.table > tbody > tr:hover { background: #f8fafc; }
.table > tbody > tr > td { vertical-align: middle; border-color: #f1f5f9; }

/* ── STATUS PILLS ───────────────────────── */
.status-pill {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .7rem;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}
/* Status colors via text content */
.status-pill { background: #f1f5f9; color: var(--zs-muted); }

/* ── PAGE HEADER ────────────────────────── */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }

/* ── LIST TOOLBAR ───────────────────────── */
.list-toolbar { display: flex; align-items: center; gap: .65rem; margin-bottom: 1rem; flex-wrap: wrap; }
.search-panel { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* ── LOOKUP ─────────────────────────────── */
.lookup-results { display: none; margin-top: .55rem; gap: .45rem; }
.lookup-results.active { display: grid; }
.lookup-result {
    display: block; width: 100%; text-align: left;
    background: rgba(255,255,255,.9);
    border: 1px solid var(--zs-border);
    border-radius: 8px; padding: .6rem .75rem;
    color: var(--zs-text); cursor: pointer; font: inherit;
}
.lookup-result strong, .lookup-result span { display: block; }
.lookup-result span, .lookup-empty { color: var(--zs-muted); font-size: .82rem; }
.lookup-result:hover { border-color: var(--zs-primary); background: #eef6fb; }

/* ── TIMETABLE ──────────────────────────── */
.timetable-filter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .65rem;
    margin-bottom: 1.25rem;
}
.timetable-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; flex-wrap: wrap; }
.timetable-heading h2 { font-size: 1.25rem; font-weight: 800; margin: 0; }
.section-kicker.timetable-kicker { display: block; margin-bottom: .25rem; }
.timetable-meta, .timetable-summary { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.timetable-meta span, .timetable-summary span {
    background: rgba(255,255,255,.7);
    border: 1px solid var(--zs-border);
    border-radius: 50px;
    padding: .2rem .8rem;
    font-size: .8rem;
}
.timetable-summary { margin-top: .5rem; }
.timetable-summary strong { font-weight: 700; }
.timetable-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid var(--zs-border);
}
.timetable-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    min-width: 640px;
}
.timetable-table th, .timetable-table td { padding: 0; border: 1px solid #e2e8f0; vertical-align: top; }
.timetable-table thead th {
    background: #0c1f35;
    color: #fff;
    padding: .6rem .5rem;
    font-size: .78rem;
    text-align: center;
    font-weight: 700;
    white-space: nowrap;
}
.timetable-table thead th span { display: block; font-size: .7rem; color: #93c5fd; font-weight: 500; }
.timetable-table .day-col { width: 4.5rem; }
.timetable-table .day-name { background: #f8fafc; text-align: center; padding: .5rem .25rem; }
.timetable-table .day-name strong { display: block; font-size: .85rem; }
.timetable-table .day-name span { font-size: .7rem; color: var(--zs-muted); }
.timetable-cell { padding: .4rem .45rem; min-height: 3.25rem; font-size: .78rem; }
.timetable-cell.empty { background: #fafafa; }
.timetable-cell.type-break { background: #fef9c3; }
.timetable-cell.type-lunch { background: #dcfce7; }
.timetable-cell.type-assembly,
.timetable-cell.type-dispersal { background: #ede9fe; }
.timetable-cell.type-free { background: #f0fdf4; }
.timetable-cell .cell-subject { font-weight: 700; font-size: .8rem; color: #1e293b; }
.timetable-cell .cell-teacher { color: #64748b; font-size: .72rem; margin-top: .1rem; }
.timetable-cell .cell-room { color: #0369a1; font-size: .7rem; }
.timetable-admin-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1.25rem; }

/* ── FEE SUMMARY ────────────────────────── */
.fee-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.fee-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.1rem;
    box-shadow: var(--glass-shadow);
}
.fee-card .fee-label { font-size: .78rem; color: var(--zs-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .35rem; }
.fee-card .fee-amount { font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
.fee-card.overdue .fee-amount { color: #dc2626; }
.fee-card.paid .fee-amount { color: #059669; }
.fee-card.pending .fee-amount { color: #d97706; }

.fee-payable-wrap { margin-bottom: 1.25rem; }
.fee-line-items { display: flex; flex-direction: column; gap: .2rem; }
.fee-line-item { font-size: .82rem; }
.fee-line-separator { color: var(--zs-muted); font-size: .78rem; align-self: center; }

/* ── OVERDUE PANEL ──────────────────────── */
.overdue-panel { margin-bottom: 1.25rem; }
.overdue-panel h3 { font-size: 1rem; font-weight: 700; color: #991b1b; margin-bottom: .75rem; display: flex; align-items: center; gap: .4rem; }

/* ── PERMISSION TABLE ───────────────────── */
.permission-table { width: 100%; border-collapse: collapse; font-size: .875rem; min-width: 480px; }
.permission-table th { background: #f1f5f9; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: .6rem .9rem; white-space: nowrap; }
.permission-table td { padding: .5rem .9rem; border-bottom: 1px solid #f1f5f9; }

/* ── FORMS ──────────────────────────────── */
.panel-form, .settings-form { display: grid; gap: 1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-note { font-size: .83rem; color: var(--zs-muted); margin-top: .2rem; }
.color-preview { width: 2rem; height: 2rem; border-radius: 6px; border: 1px solid var(--zs-border); flex-shrink: 0; }
.color-row { display: flex; align-items: center; gap: .5rem; }
.checkbox-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .4rem; }

/* ── EMPTY STATE ────────────────────────── */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state h1 { font-size: 1.6rem; font-weight: 800; }

/* ── STUDENT CARD (UID page) ────────────── */
.student-card { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.student-avatar {
    width: 4.5rem; height: 4.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem; font-weight: 800; color: #fff;
    flex-shrink: 0;
}
.student-meta { flex: 1; min-width: 0; }
.student-meta h2 { font-size: 1.3rem; font-weight: 800; margin: 0 0 .3rem; }

/* ── UID / SEARCH ───────────────────────── */
.uid-mini-search { display: flex; gap: .5rem; flex-wrap: wrap; }
.search-panel { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── REPORTS ────────────────────────────── */
.report-toolbar { display: flex; gap: .65rem; margin-bottom: 1rem; flex-wrap: wrap; align-items: center; }

/* ── INSTALL ────────────────────────────── */
.install-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 2fr;
}
.install-hero {
    background: linear-gradient(135deg, #0c1f35 0%, #1e3a5f 100%);
    color: #fff;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.install-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: .75rem; }
.install-card { background: #fff; padding: 2.5rem; overflow-y: auto; }
.install-card h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 1.25rem; }
.step-indicator { display: flex; gap: .4rem; margin-bottom: 1.5rem; }
.step-dot {
    width: .65rem; height: .65rem;
    border-radius: 50%;
    background: #e2e8f0;
}
.step-dot.active { background: var(--zs-button); }
.step-dot.done { background: #10b981; }

/* ── MISC ───────────────────────────────── */
.alert { border-radius: 10px; font-size: .9rem; }
.badge { font-size: .72rem; border-radius: 50px; padding: .2rem .6rem; }
.divider { height: 1px; background: var(--zs-border); margin: 1rem 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag { background: #e0f2fe; color: #0369a1; border-radius: 50px; padding: .15rem .65rem; font-size: .78rem; font-weight: 600; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
.gallery-item { border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; background: #f1f5f9; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* ── PAGINATION ─────────────────────────── */
.page-nav { display: flex; gap: .35rem; flex-wrap: wrap; }

/* ── RESPONSIVE ─────────────────────────── */
@media (min-width: 992px) {
    .d-lg-none { display: none !important; }
}

@media (max-width: 1280px) {
    .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .fee-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 1100px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .app-shell { grid-template-columns: 240px minmax(0,1fr); }
}

@media (max-width: 991.98px) {
    /* Sidebar slides in */
    .app-shell { display: block; }
    .sidebar {
        position: fixed;
        z-index: 200;
        inset: 0 auto 0 0;
        width: min(82vw, 280px);
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 4px 0 30px rgba(0,0,0,.3);
    }
    .sidebar.open { transform: translateX(0); }
    /* Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.4);
        z-index: 199;
        backdrop-filter: blur(2px);
    }
    .sidebar-overlay.active { display: block; }
    .content-wrap { padding: 1rem; }
    .topbar { padding: .5rem 1rem; }

    /* Public */
    .hero-copy h1 { font-size: clamp(1.8rem,6vw,3rem); }
    .public-section-grid, .contact-grid, .dashboard-grid, .two-column { grid-template-columns: 1fr; }
    .timetable-admin-forms { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .install-shell { grid-template-columns: 1fr; }
    .install-hero { display: none; }
}

@media (max-width: 768px) {
    body { font-size: 14px; }
    .content-wrap { padding: .75rem; }

    /* Metric cards 2 col */
    .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
    .alert-grid { grid-template-columns: 1fr; }
    .fee-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
    .form-grid { grid-template-columns: 1fr; }
    .timetable-filter { grid-template-columns: 1fr; }
    .checkbox-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }

    /* Page heads stack */
    .page-head { flex-direction: column; align-items: stretch; }
    .head-actions { flex-wrap: wrap; }
    .topbar { flex-wrap: wrap; gap: .5rem; min-height: auto; padding: .6rem .75rem; }
    .topbar h1 { font-size: 1rem; }
    .profile-chip span { max-width: 8rem; overflow: hidden; text-overflow: ellipsis; }
    .live-clock { display: none; }

    /* Auth */
    .auth-panel { padding: 1.5rem 1.25rem; border-radius: 16px; }

    /* Hero */
    .hero-section { min-height: 70vh; }
    .hero-inner { padding: 3rem 0 2.5rem; }
    .hero-actions .btn { padding: .6rem 1.2rem; font-size: .9rem; }

    /* Public sections */
    .public-section { padding: 2.75rem 0; }
    .highlight-grid { grid-template-columns: 1fr; gap: 1rem; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .footer-bottom { flex-direction: column; text-align: center; gap: .35rem; }

    /* Tables — force scroll */
    .info-panel { padding: 1rem .75rem; overflow-x: auto; }
    .table { min-width: 540px; }
    .timetable-table { min-width: 560px; }
    .permission-table { min-width: 400px; }

    /* Student card */
    .student-card { flex-direction: column; align-items: flex-start; }

    /* Toolbar */
    .list-toolbar, .search-panel, .uid-mini-search { flex-direction: column; align-items: stretch; }
    .report-toolbar { flex-direction: column; align-items: stretch; }
}

@media (max-width: 480px) {
    .metric-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
    .fee-summary { grid-template-columns: 1fr 1fr; }
    .metric-val { font-size: 1.25rem; }
    .metric-icon { width: 2.5rem; height: 2.5rem; font-size: 1.1rem; }
    .topbar-actions .live-clock { display: none; }
    .hero-copy h1 { font-size: 1.75rem; }
    .timetable-filter { gap: .4rem; }
    .auth-panel { padding: 1.25rem 1rem; }
    .footer-grid { gap: 1rem; }
    .public-section { padding: 2rem 0; }
    .section-copy h2 { font-size: 1.4rem; }
}

/* ── DARK GLASS helpers ─────────────────── */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    box-shadow: var(--glass-shadow);
    padding: 1.25rem;
}

/* ── Scrollbar ──────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100,116,139,.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100,116,139,.5); }
