/*
 | School ERP — custom admin styling layered on top of Bootstrap 5 (CDN).
 | Loaded statically (no build step) for shared-hosting friendliness.
 */

:root {
    --brand: #0d6efd;
    --sidebar-w: 260px;
    --sidebar-bg: #0b1437;
    --sidebar-bg-2: #111c44;
    --sidebar-link: #b6c2e2;
    --sidebar-link-active: #ffffff;
    --topbar-h: 60px;
}

body {
    background: #f4f6fb;
    font-size: 0.925rem;
}

/* ---------- Layout shell ---------- */
.app-wrapper { display: flex; min-height: 100vh; }

.app-sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2));
    color: var(--sidebar-link);
    position: fixed;
    inset: 0 auto 0 0;
    overflow-y: auto;
    z-index: 1040;
    transition: transform .25s ease;
}
.app-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
    transition: margin .25s ease;
}

.app-sidebar .brand {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 0 1.1rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: .3px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.app-sidebar .brand img { height: 34px; width: 34px; object-fit: contain; border-radius: 6px; background:#fff; }

.sidebar-nav { padding: .75rem .6rem 4rem; }
.sidebar-nav .nav-section {
    text-transform: uppercase;
    font-size: .68rem;
    letter-spacing: .08em;
    color: #5f6f9c;
    padding: 1rem .8rem .35rem;
}
.sidebar-nav .nav-link {
    color: var(--sidebar-link);
    border-radius: .5rem;
    padding: .6rem .8rem;
    display: flex;
    align-items: center;
    gap: .7rem;
    font-weight: 500;
    margin-bottom: 2px;
}
.sidebar-nav .nav-link i { font-size: 1.05rem; width: 1.25rem; text-align: center; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(13,110,253,.35); }
.sidebar-nav .nav-link .chevron { margin-left: auto; transition: transform .2s; font-size: .8rem; }
.sidebar-nav .nav-link[aria-expanded="true"] .chevron { transform: rotate(90deg); }
.sidebar-nav .submenu { list-style: none; padding-left: 2.5rem; margin: 0 0 .25rem; }
.sidebar-nav .submenu .nav-link { padding: .42rem .8rem; font-size: .875rem; }

/* ---------- Topbar ---------- */
.app-topbar {
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid #e7ebf3;
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 0 1.1rem;
}
.app-topbar .badge-session { font-weight: 600; }

/* ---------- Cards ---------- */
.card { border: 1px solid #e9edf5; border-radius: .8rem; box-shadow: 0 2px 8px rgba(18,38,63,.04); }
.card .card-header { background: #fff; border-bottom: 1px solid #eef1f7; font-weight: 600; }

.stat-card { border-radius: .8rem; overflow: hidden; }
.stat-card .icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: .7rem; font-size: 1.5rem; }

/* ---------- Tables ---------- */
table.dataTable thead th { white-space: nowrap; font-size: .82rem; text-transform: uppercase; letter-spacing: .02em; color: #6b7a99; }
.table > :not(caption) > * > * { padding: .65rem .75rem; }

/* ---------- Misc ---------- */
.required::after { content: " *"; color: #dc3545; }
.page-title { font-weight: 700; margin: 0; }
.breadcrumb { margin: 0; font-size: .82rem; }
.select2-container { width: 100% !important; }
.form-label { font-weight: 600; font-size: .85rem; color: #3b4a66; }
.btn-icon { width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.show { transform: translateX(0); }
    .app-content { margin-left: 0; }
}

/* ---------- Auth ---------- */
.auth-wrapper { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #0b1437, #1b3bbb); padding: 1.5rem; }
.auth-card { width: 100%; max-width: 420px; border-radius: 1rem; }
.auth-card .brand-logo { height: 60px; }
