:root {
    --sidebar-width: 260px;
    --app-bg: #f4f6f9;
    --sidebar-bg: #111827;
    --sidebar-text: #d1d5db;
    --sidebar-active: #2563eb;
}

body {
    background: var(--app-bg);
    color: #111827;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 20px 16px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.brand-icon,
.login-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
}

.login-logo {
    margin-bottom: 12px;
}

.brand-title {
    color: #fff;
    font-weight: 700;
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 12px;
    color: #9ca3af;
}

.sidebar-nav .nav-link {
    color: var(--sidebar-text);
    border-radius: 10px;
    padding: 11px 12px;
    margin-bottom: 4px;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    color: #fff;
    background: var(--sidebar-active);
}

.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 18px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.content-area {
    padding: 26px;
}

.stat-card {
    border-radius: 16px;
}

.stat-number {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.1;
}

.login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc, #e0e7ff);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border: 0;
    border-radius: 18px;
}

@media (max-width: 900px) {
    .sidebar {
        position: static;
        width: 100%;
        min-height: auto;
    }

    .app-shell {
        display: block;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .topbar {
        position: static;
        padding: 16px;
    }

    .content-area {
        padding: 16px;
    }
}

.btn-group form {
    display: inline-flex;
}

pre {
    white-space: pre-wrap;
}

.class-select-card {
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.class-select-card:hover {
    box-shadow: 0 .25rem .75rem rgba(17, 24, 39, .08);
}

@media print {
    body {
        background: #fff !important;
        font-size: 12px;
    }

    .sidebar,
    .topbar,
    .no-print,
    .btn,
    .alert .btn-close {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .content-area {
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #111 !important;
        break-inside: avoid;
    }

    .room-print-card {
        page-break-inside: avoid;
    }

    .table th,
    .table td {
        padding: 4px 6px !important;
    }
}
