:root {
    --brand: #2357d7;
    --brand-2: #0f9f8f;
    --ink: #132238;
    --muted-bg: #f4f7fb;
}

body {
    min-height: 100vh;
    background: var(--muted-bg);
    color: var(--ink);
}

[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .content {
    background: #111827;
    color: #e5e7eb;
}

.app-shell {
    display: grid;
    grid-template-columns: 270px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, #102a6b, #0c1f4f);
    color: #fff;
    padding: 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 18px;
}

.brand img, .school-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.sidebar .nav-link, .offcanvas .nav-link {
    color: rgba(255,255,255,.86);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.12);
}

.main {
    min-width: 0;
}

.topbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(15,23,42,.08);
    position: sticky;
    top: 0;
    z-index: 10;
}

[data-bs-theme="dark"] .topbar,
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .table-panel,
[data-bs-theme="dark"] .website-nav {
    background: #1f2937;
    color: #e5e7eb;
    border-color: #374151;
}

.school-name {
    font-weight: 800;
    line-height: 1.1;
}

.content {
    padding: 24px;
}

.stat-card {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15,23,42,.08);
}

.stat-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.table-panel, .form-panel {
    background: #fff;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(15,23,42,.06);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(120deg, rgba(35,87,215,.92), rgba(15,159,143,.86)),
        url('https://images.unsplash.com/photo-1580582932707-520aed937b7b?auto=format&fit=crop&w=1600&q=80') center/cover;
}

.login-card {
    width: min(440px, 100%);
    border-radius: 8px;
    background: rgba(255,255,255,.94);
    padding: 30px;
    box-shadow: 0 24px 70px rgba(0,0,0,.24);
}

.site-hero {
    min-height: 78vh;
    display: flex;
    align-items: center;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(9,26,68,.88), rgba(9,26,68,.38)),
        url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?auto=format&fit=crop&w=1800&q=80') center/cover;
}

.website-nav {
    background: #fff;
    border-bottom: 1px solid rgba(15,23,42,.08);
}

.profile-photo {
    width: 94px;
    height: 94px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.receipt {
    max-width: 820px;
    margin: 24px auto;
    background: #fff;
    color: #111827;
    padding: 28px;
    border: 1px solid #d1d5db;
}

.class-table .class-detail-row > td {
    background: rgba(35, 87, 215, .04);
    border-top: 0;
}

.class-fee-panel {
    border: 1px solid rgba(35, 87, 215, .16);
    border-radius: 8px;
    padding: 14px;
    background: rgba(255, 255, 255, .72);
}

[data-bs-theme="dark"] .class-table .class-detail-row > td {
    background: rgba(96, 165, 250, .08);
}

[data-bs-theme="dark"] .class-fee-panel {
    background: rgba(17, 24, 39, .6);
    border-color: #374151;
}

@media (max-width: 991px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .content { padding: 16px; }
    .topbar { padding: 12px 16px; }
}

@media print {
    .no-print, .topbar, .sidebar, .offcanvas { display: none !important; }
    body { background: #fff; }
    .receipt { border: 0; margin: 0; max-width: none; }
}

/* Website General and Responsiveness Overrides */
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* General Utilities missing in the project */
.max-w-700 {
    max-width: 700px;
    width: 100%;
}

/* Custom Animated Hamburger Menu Toggler */
.navbar-toggler:focus {
    box-shadow: none !important;
    outline: none !important;
}

.custom-toggler-icon {
    width: 22px;
    height: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.custom-toggler-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--brand);
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease-in-out;
}

/* Transform Hamburger to X when Navbar is Expanded */
.navbar-toggler:not(.collapsed) .custom-toggler-icon span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar-toggler:not(.collapsed) .custom-toggler-icon span:nth-child(2) {
    opacity: 0;
}

.navbar-toggler:not(.collapsed) .custom-toggler-icon span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Navbar Styles */
@media (max-width: 991px) {
    .website-nav .navbar-collapse {
        margin-top: 15px;
        padding-top: 10px;
        border-top: 1px solid rgba(15, 23, 42, 0.08);
    }
    
    .website-nav .nav-link {
        padding: 12px 10px !important;
        font-size: 0.95rem !important;
        border-radius: 8px;
        transition: background-color 0.2s;
    }
    
    .website-nav .nav-link:hover {
        background-color: rgba(35, 87, 215, 0.05);
    }
    
    .website-nav .btn-primary {
        margin-top: 15px;
        width: 100%;
        text-align: center;
        padding: 12px !important;
    }
}

/* Sidebar and Offcanvas Nested Submenus styling (always visible) */
.sidebar .nav-item .nav .nav-link {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    opacity: 0.9;
    padding: 6px 12px !important;
}
.sidebar .nav-item .nav .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08) !important;
}
.offcanvas .nav-item .nav .nav-link {
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
    padding: 6px 12px !important;
}
.offcanvas .nav-item .nav .nav-link:hover {
    color: var(--bs-primary);
    background: rgba(35, 87, 215, 0.05) !important;
}
.bg-white-10 {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Sidebar chevron animation */
.sidebar .nav-link[aria-expanded="true"] .bi-chevron-down,
.offcanvas .nav-link[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}
.sidebar .nav-link .bi-chevron-down,
.offcanvas .nav-link .bi-chevron-down {
    transition: transform 0.2s ease-in-out;
}


