/* ════════════════════════════════════════════════════════════════════════
   BHARATHI VIDYANIKETAN SCHOOL - MAIN STYLESHEET
   ════════════════════════════════════════════════════════════════════════
   This is the main CSS file split from index.html as part of Phase 1 refactoring
   Last Updated: 2026-05-29
*/

/* ── DESIGN VARIABLES ── */
:root {
    --primary: #1a3a5c;
    --accent: #e8a020;
    --accent2: #2e7d5e;
    --bg: #f4f6fa;
    --card: #ffffff;
    --sidebar: #1a3a5c;
    --text: #1a2540;
    --muted: #6b7a99;
    --border: #dde3f0;
    --danger: #c0392b;
    --success: #2e7d5e;
    --warning: #e8a020;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(26, 58, 92, 0.10);
}

/* ── GLOBAL RESET ── */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

/* ── CUSTOM SCROLLBARS ── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* ── AUTH SCREEN ── */
#auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a3a5c 0%, #0d2238 60%, #14503a 100%);
    position: relative;
    overflow: hidden;
}

#auth-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='https://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    padding: 48px 44px;
    width: 420px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 1;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo .school-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--accent2));
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 14px;
    box-shadow: 0 8px 24px rgba(26, 58, 92, 0.25);
}

.auth-logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    color: var(--primary);
    line-height: 1.2;
}

.auth-logo p {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    transition: border-color 0.2s;
    background: #fafbff;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), #254d7a);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    margin-top: 4px;
}

.btn-login:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.auth-error {
    background: #fff0ef;
    border: 1px solid #f5c6c3;
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--danger);
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

/* ── SCHOOL SELECT SCREEN ── */
#school-select-screen {
    min-height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a3a5c 0%, #0d2238 60%, #14503a 100%);
    position: relative;
    overflow: hidden;
}

#school-select-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='https://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.school-select-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    padding: 48px 44px;
    width: 440px;
    max-width: 95vw;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 1;
}

/* ── APP SHELL ── */
#app,
#app-shell {
    display: none;
    min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
    width: 260px;
    background: var(--sidebar);
    color: #fff;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    box-shadow: 4px 0 24px rgba(26, 58, 92, 0.18);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar-header {
    padding: 28px 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header .logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header .logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), #f0c060);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    line-height: 1.3;
}

.sidebar-header p {
    font-size: 11px;
    opacity: 0.55;
    margin-top: 2px;
}

.user-badge {
    margin: 16px 24px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #e07010);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.user-info .uname {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info .urole {
    font-size: 11px;
    opacity: 0.55;
    text-transform: capitalize;
}

.sidebar-nav {
    padding: 12px 0;
    flex: 1;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    padding: 10px 24px 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 24px;
    cursor: pointer;
    border-radius: 0;
    transition: background 0.15s;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    border-left: 3px solid transparent;
    position: relative;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.nav-item.active {
    background: rgba(232, 160, 32, 0.15);
    color: #f5c842;
    border-left-color: var(--accent);
    font-weight: 600;
}

.nav-item .nav-icon {
    font-size: 17px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-logout {
    width: 100%;
    padding: 10px;
    background: rgba(192, 57, 43, 0.18);
    border: 1px solid rgba(192, 57, 43, 0.3);
    border-radius: 8px;
    color: #ff8a80;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: rgba(192, 57, 43, 0.3);
}

/* ── MAIN CONTENT ── */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(26, 58, 92, 0.06);
}

.topbar h2 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: var(--primary);
}

.topbar .date-time {
    font-size: 13px;
    color: var(--muted);
}

.page-content {
    padding: 28px 32px;
    flex: 1;
}

/* ── CARDS ── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    border-left: 4px solid transparent;
    transition: transform 0.15s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card.blue {
    border-left-color: var(--primary);
}

.stat-card.gold {
    border-left-color: var(--accent);
}

.stat-card.green {
    border-left-color: var(--accent2);
}

.stat-card.red {
    border-left-color: var(--danger);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: rgba(26, 58, 92, 0.1);
}

.stat-icon.gold {
    background: rgba(232, 160, 32, 0.12);
}

.stat-icon.green {
    background: rgba(46, 125, 94, 0.12);
}

.stat-icon.red {
    background: rgba(192, 57, 43, 0.10);
}

.stat-info .val {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
}

.stat-info .label {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

/* ── TABLE ── */
.section-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 24px;
}

.section-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f0f4fa;
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    white-space: nowrap;
}

td {
    padding: 12px 16px;
    font-size: 14px;
    border-top: 1px solid var(--border);
    vertical-align: middle;
}

tr:hover td {
    background: #f8faff;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-green {
    background: rgba(46, 125, 94, 0.12);
    color: var(--accent2);
}

.badge-red {
    background: rgba(192, 57, 43, 0.10);
    color: var(--danger);
}

.badge-gold {
    background: rgba(232, 160, 32, 0.12);
    color: #b07800;
}

.badge-blue {
    background: rgba(26, 58, 92, 0.10);
    color: var(--primary);
}

/* ── CHECKBOXES ── */
input[type="checkbox"] {
    accent-color: var(--accent2);
    cursor: pointer;
}

/* ── BUTTONS ── */
.btn {
    padding: 8px 18px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s, transform 0.15s;
}

.btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-success {
    background: var(--accent2);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
}

.btn-gold {
    background: var(--accent);
    color: #fff;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

/* ── MODAL ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 40, 0.55);
    backdrop-filter: blur(3px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--card);
    border-radius: 16px;
    width: 520px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    animation: slideIn 0.25s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(24px);
        opacity: 0;
    }

    to {
        transform: none;
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--muted);
    padding: 4px 8px;
    border-radius: 6px;
}

.modal-close:hover {
    background: var(--border);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.form-row.full {
    grid-template-columns: 1fr;
}

.field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 5px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    background: #fafbff;
    transition: border-color 0.2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}

.field textarea {
    resize: vertical;
    min-height: 80px;
}

/* ── SEARCH / FILTER BAR ── */
.search-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-bar input,
.search-bar select,
#fin-year {
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    background: var(--card);
}

.search-bar input:focus,
.search-bar select:focus,
#fin-year:focus {
    outline: none;
    border-color: var(--primary);
}

.search-bar input {
    min-width: 200px;
}

/* ── AUTOCOMPLETE ── */
.autocomplete-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    display: none;
}

.autocomplete-item {
    padding: 11px 12px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid #f0f4fa;
    color: var(--text);
    transition: background 0.15s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: #f8faff;
    color: var(--primary);
    font-weight: 500;
}

.autocomplete-item strong {
    color: var(--primary);
    font-weight: 600;
}

/* ── ATTENDANCE GRID ── */
.att-date-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.att-stat {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.att-mini {
    background: var(--bg);
    border-radius: 8px;
    padding: 12px 18px;
    text-align: center;
}

.att-mini .num {
    font-size: 22px;
    font-weight: 700;
}

.att-mini .lbl {
    font-size: 11px;
    color: var(--muted);
}

.att-toggle {
    display: flex;
    gap: 8px;
    align-items: center;
}

.att-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    background: #fff;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
    padding: 0;
    line-height: 1;
}

.att-btn:hover {
    transform: scale(1.12);
}

.att-btn.present {
    background: var(--accent2);
    color: #fff;
    border-color: var(--accent2);
    box-shadow: 0 2px 8px rgba(46, 125, 94, 0.25);
}

.att-btn.absent {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.20);
}

/* ── FINANCE ── */
.finance-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
}

.ftab {
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--muted);
    transition: all 0.15s;
}

.ftab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.itab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -11px;
    /* Align with border-bottom of container */
    color: var(--muted);
    transition: all 0.15s;
}

.itab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

/* ── NOTICE BOARD ── */
.notice-list {
    padding: 0 24px 20px;
}

.notice-item {
    border-left: 3px solid var(--accent);
    padding: 12px 16px;
    background: #fffdf5;
    border-radius: 0 8px 8px 0;
    margin-bottom: 10px;
}

.notice-item .ntitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.notice-item .nmeta {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
}

.notice-item .nbody {
    font-size: 13px;
    margin-top: 6px;
    color: var(--text);
}

/* ── PAGE TABS (Principal) ── */
.ptabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--card);
    border-radius: var(--radius);
    padding: 6px;
    box-shadow: var(--shadow);
    width: fit-content;
}

.ptab {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: var(--muted);
    transition: all 0.15s;
}

.ptab.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

/* ── TOASTS ── */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--primary);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: var(--shadow);
    animation: toastIn 0.25s ease;
    min-width: 220px;
}

.toast.success {
    background: var(--accent2);
}

.toast.error,
.toast.danger {
    background: var(--danger);
}

@keyframes toastIn {
    from {
        transform: translateX(60px);
        opacity: 0;
    }

    to {
        transform: none;
        opacity: 1;
    }
}

/* ── WELCOME CARD ── */
.welcome-card {
    background: linear-gradient(120deg, var(--primary) 0%, #254d7a 60%, var(--accent2) 100%);
    border-radius: var(--radius);
    padding: 28px 32px;
    color: #fff;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.welcome-card::after {
    content: '🏫';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 72px;
    opacity: 0.15;
}

.welcome-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    margin-bottom: 6px;
}

.welcome-card p {
    font-size: 14px;
    opacity: 0.8;
}

/* ── LOADING ── */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--muted);
    font-size: 14px;
}

.spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* ── EMPTY STATE ── */
.empty-state {
    text-align: center;
    padding: 52px 24px;
    color: var(--muted);
}

.empty-state .ei {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 14px;
}

/* ── SUMMARY BAR ── */
.summary-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border);
    background: #f8faff;
}

.sbar-item {
    font-size: 13px;
}

.sbar-item span {
    font-weight: 600;
    color: var(--primary);
}

/* ── FORM VALIDATION ── */
.field input.error,
.field select.error,
.field textarea.error,
.form-group input.error {
    border-color: var(--danger) !important;
    background-color: #fff0ef !important;
}

.field input.error:focus,
.field select.error:focus,
.field textarea.error:focus,
.form-group input.error:focus {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

/* ── HAMBURGER BUTTON (hidden on desktop) ── */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    margin-right: 10px;
    transition: background 0.15s;
    flex-shrink: 0;
}

.hamburger-btn:hover {
    background: var(--border);
}

/* ── SIDEBAR BACKDROP (hidden on desktop) ── */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 40, 0.45);
    z-index: 99;
    backdrop-filter: blur(2px);
}

.sidebar-backdrop.open {
    display: block;
}

/* ══════════════════════════════════════════���═══════════════════════════
   RESPONSIVE DESIGN - TABLET (max-width: 768px)
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Prevent iOS auto-zoom by ensuring 16px font-size */
    .form-group input,
    .field input,
    .field select,
    .field textarea,
    .search-bar input,
    .search-bar select {
        font-size: 16px !important;
    }

    /* Show hamburger button */
    .hamburger-btn {
        display: flex;
        align-items: center;
    }

    /* ── AUTH SCREEN ── */
    .auth-card {
        width: calc(100vw - 32px);
        max-width: 420px;
        padding: 36px 24px;
        margin: 16px;
    }

    /* ── SIDEBAR: slide-in drawer ── */
    .sidebar {
        transform: translateX(-260px);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 200;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 32px rgba(0, 0, 0, 0.35);
    }

    /* ── MAIN CONTENT: full width, no sidebar reservation ── */
    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* ── TOPBAR: compact with hamburger ── */
    .topbar {
        padding: 12px 16px;
        gap: 8px;
    }

    .topbar h2 {
        font-size: 17px;
    }

    .topbar .date-time {
        font-size: 12px;
    }

    /* ── PAGE CONTENT: less padding ── */
    .page-content {
        padding: 16px;
    }

    /* ── WELCOME CARD ── */
    .welcome-card {
        padding: 20px 20px;
        margin-bottom: 16px;
    }

    .welcome-card::after {
        font-size: 52px;
        right: 14px;
    }

    .welcome-card h2 {
        font-size: 18px;
    }

    .welcome-card p {
        font-size: 13px;
    }

    /* ── STAT GRID: 2 columns on tablet ── */
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 16px;
    }

    .stat-card {
        padding: 16px 14px;
        gap: 12px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        border-radius: 10px;
    }

    .stat-info .val {
        font-size: 22px;
    }

    /* ── SECTION CARDS ── */
    .section-card {
        margin-bottom: 16px;
        border-radius: 10px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 16px;
    }

    .section-header h3 {
        font-size: 15px;
    }

    /* ── SEARCH BAR: stack and full width ── */
    .search-bar {
        flex-direction: column;
        width: 100%;
        gap: 8px;
        align-items: stretch;
    }

    .search-bar input,
    .search-bar select {
        font-size: 13px;
    }

    .sbar-item span {
        font-weight: 600;
        color: var(--primary);
    }

    /* ── FORM VALIDATION ── */
    .field input.error,
    .field select.error,
    .field textarea.error,
    .form-group input.error {
        border-color: var(--danger) !important;
        background-color: #fff0ef !important;
    }

    .field input.error:focus,
    .field select.error:focus,
    .field textarea.error:focus,
    .form-group input.error:focus {
        border-color: var(--danger) !important;
        box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
    }

    /* ── HAMBURGER BUTTON (hidden on desktop) ── */
    .hamburger-btn {
        display: none;
        background: none;
        border: none;
        font-size: 22px;
        cursor: pointer;
        color: var(--primary);
        padding: 4px 8px;
        border-radius: 6px;
        line-height: 1;
        margin-right: 10px;
        transition: background 0.15s;
        flex-shrink: 0;
    }

    .hamburger-btn:hover {
        background: var(--border);
    }

    /* ── SIDEBAR BACKDROP (hidden on desktop) ── */
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(10, 20, 40, 0.45);
        z-index: 99;
        backdrop-filter: blur(2px);
    }

    .sidebar-backdrop.open {
        display: block;
    }

    /* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN - TABLET (max-width: 768px)
   ══════════════════════════════════════════════════════════════════════ */
    @media (max-width: 768px) {

        /* Prevent iOS auto-zoom by ensuring 16px font-size */
        .form-group input,
        .field input,
        .field select,
        .field textarea,
        .search-bar input,
        .search-bar select {
            font-size: 16px !important;
        }

        /* Show hamburger button */
        .hamburger-btn {
            display: flex;
            align-items: center;
        }

        /* ── AUTH SCREEN ── */
        .auth-card {
            width: calc(100vw - 32px);
            max-width: 420px;
            padding: 36px 24px;
            margin: 16px;
        }

        /* ── SIDEBAR: slide-in drawer ── */
        .sidebar {
            transform: translateX(-260px);
            transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 200;
        }

        .sidebar.open {
            transform: translateX(0);
            box-shadow: 4px 0 32px rgba(0, 0, 0, 0.35);
        }

        /* ── MAIN CONTENT: full width, no sidebar reservation ── */
        .main-content {
            margin-left: 0;
            width: 100%;
            max-width: 100%;
            overflow-x: hidden;
        }

        /* ── TOPBAR: compact with hamburger ── */
        .topbar {
            padding: 12px 16px;
            gap: 8px;
        }

        .topbar h2 {
            font-size: 17px;
        }

        .topbar .date-time {
            font-size: 12px;
        }

        /* ── PAGE CONTENT: less padding ── */
        .page-content {
            padding: 16px;
        }

        /* ── WELCOME CARD ── */
        .welcome-card {
            padding: 20px 20px;
            margin-bottom: 16px;
        }

        .welcome-card::after {
            font-size: 52px;
            right: 14px;
        }

        .welcome-card h2 {
            font-size: 18px;
        }

        .welcome-card p {
            font-size: 13px;
        }

        /* ── STAT GRID: 2 columns on tablet ── */
        .stat-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-bottom: 16px;
        }

        .stat-card {
            padding: 16px 14px;
            gap: 12px;
        }

        .stat-icon {
            width: 40px;
            height: 40px;
            font-size: 18px;
            border-radius: 10px;
        }

        .stat-info .val {
            font-size: 22px;
        }

        /* ── SECTION CARDS ── */
        .section-card {
            margin-bottom: 16px;
            border-radius: 10px;
        }

        .section-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 10px;
            padding: 14px 16px;
        }

        .section-header h3 {
            font-size: 15px;
        }

        /* ── SEARCH BAR: stack and full width ── */
        .search-bar {
            flex-direction: column;
            width: 100%;
            gap: 8px;
            align-items: stretch;
        }

        .search-bar input,
        .search-bar select {
            min-width: unset;
            width: 100%;
            font-size: 14px;
        }

        .search-bar .btn,
        .search-bar button {
            width: 100%;
            text-align: center;
        }

        /* Keep attendance search-bar horizontal for date+button pairs */
        #att-teacher-view .search-bar,
        #att-teacher-self-view .search-bar,
        #dash-teacher-att .search-bar {
            flex-direction: row;
            flex-wrap: wrap;
        }

        #att-teacher-view .search-bar input[type="date"],
        #att-teacher-self-view .search-bar input[type="date"],
        #dash-teacher-att .search-bar input[type="date"] {
            flex: 1;
            min-width: 140px;
        }

        /* ── FINANCE TABS: horizontal scroll ── */
        .finance-tabs {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            flex-wrap: nowrap;
            padding-bottom: 1px;
        }

        .finance-tabs::-webkit-scrollbar {
            display: none;
        }

        .ftab {
            white-space: nowrap;
            padding: 8px 14px;
            font-size: 13px;
            flex-shrink: 0;
        }

        /* ── NOTICE LIST ── */
        .notice-list {
            padding: 0 16px 16px;
        }

        /* ── PAGE TABS (Principal) ── */
        .ptabs {
            overflow-x: auto;
            width: 100%;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            flex-wrap: nowrap;
        }

        .ptabs::-webkit-scrollbar {
            display: none;
        }

        .ptab {
            white-space: nowrap;
            flex-shrink: 0;
        }

        /* ── MODAL: full width on mobile ── */
        .modal-overlay {
            align-items: flex-end;
            padding: 0;
        }

        .modal {
            width: 100% !important;
            max-width: 100% !important;
            border-radius: 20px 20px 0 0 !important;
            max-height: 92vh !important;
        }

        .modal-header {
            padding: 16px 20px;
        }

        .modal-header h3 {
            font-size: 15px;
        }

        .modal-body {
            padding: 16px 20px;
        }

        .modal-footer {
            padding: 12px 20px;
            flex-direction: column-reverse;
            gap: 8px;
        }

        .modal-footer .btn {
            width: 100%;
            text-align: center;
        }

        /* Stack 2-column form rows into single column */
        .form-row {
            grid-template-columns: 1fr !important;
            gap: 12px !important;
            margin-bottom: 12px !important;
        }

        /* Reset field spans */
        .form-row .field,
        .admission-form-section div[style*="grid-template-columns"] .field {
            grid-column: auto !important;
        }

        /* ── ADMISSION FORM MOBILE STYLING ── */
        .admission-modal-body {
            flex-direction: column !important;
        }

        .admission-toc {
            width: 100% !important;
            height: auto !important;
            flex-direction: row !important;
            display: flex !important;
            overflow-x: auto !important;
            overflow-y: hidden !important;
            padding: 10px 12px !important;
            border-right: none !important;
            border-bottom: 1px solid #e2e8f0 !important;
            white-space: nowrap !important;
            scroll-behavior: smooth !important;
            -webkit-overflow-scrolling: touch !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
            background: #f8fafc !important;
            gap: 8px !important;
        }

        /* Hide scrollbars for TOC horizontal bar on mobile */
        .admission-toc::-webkit-scrollbar {
            display: none !important;
            width: 0 !important;
            height: 0 !important;
        }

        .admission-toc .toc-item {
            display: inline-flex !important;
            align-items: center !important;
            padding: 6px 12px !important;
            font-size: 12px !important;
            font-weight: 600 !important;
            border-left: none !important;
            border-bottom: 2px solid transparent !important;
            border-radius: 6px !important;
            background: transparent !important;
            color: #64748b !important;
            margin-right: 0 !important;
            margin-bottom: 0 !important;
            flex-shrink: 0 !important;
            line-height: 1.2 !important;
        }

        .admission-toc .toc-item:hover {
            transform: none !important;
            background: #f1f5f9 !important;
            color: #1e293b !important;
        }

        .admission-toc .toc-item.active {
            background: #e0f2fe !important;
            color: #0369a1 !important;
            border-left: none !important;
            border-bottom: 2px solid #0284c7 !important;
            box-shadow: none !important;
        }

        #admission-form-scroll-container {
            padding: 16px !important;
            gap: 16px !important;
        }

        .admission-form-section {
            padding: 16px !important;
            border-radius: var(--radius) !important;
            box-shadow: none !important;
        }

        .admission-form-section h4 {
            font-size: 13px !important;
            margin-bottom: 16px !important;
        }

        /* Force all grid-template columns in form sections to stack on mobile */
        .admission-form-section div[style*="grid-template-columns"] {
            grid-template-columns: 1fr !important;
            gap: 12px !important;
        }

        /* Section Photo responsive changes */
        #sec-photo {
            flex-direction: column !important;
            align-items: center !important;
            text-align: center !important;
            gap: 16px !important;
        }

        #sec-photo>div:first-child {
            flex-direction: column !important;
            align-items: center !important;
            gap: 12px !important;
            width: 100% !important;
        }

        #sec-photo>div:last-child {
            width: 100% !important;
            align-items: center !important;
        }

        /* Inner field padding, input font sizes */
        .field input,
        .field select,
        .field textarea {
            font-size: 14px !important;
            padding: 8px 12px !important;
        }

        /* Double column address grids stack */
        #sec-3>div[style*="display: grid"] {
            grid-template-columns: 1fr !important;
            gap: 20px !important;
        }

        /* ── TOASTS: full width at bottom ── */
        #toast-container {
            left: 8px;
            right: 8px;
            bottom: 16px;
        }

        .toast {
            min-width: unset;
            width: 100%;
        }

        /* ── NAV ITEMS: larger touch targets ── */
        .nav-item {
            padding: 14px 24px;
        }

        /* ── ATTENDANCE STATS: wrap nicely ── */
        .att-stat {
            gap: 8px;
        }

        .att-mini {
            padding: 10px 14px;
        }

        /* ── SUMMARY BAR ── */
        .summary-bar {
            padding: 10px 16px;
        }

        /* ── STUDENT ACTIONS: stack buttons ── */
        #stu-admin-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            width: 100%;
        }

        #stu-admin-actions .btn {
            flex: 1;
            min-width: 80px;
            text-align: center;
        }

        /* ── TABLE: allow horizontal scroll ── */
        .table-wrap {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        table {
            min-width: 500px;
        }

        th,
        td {
            padding: 10px 12px;
            font-size: 13px;
            white-space: nowrap;
        }
    }

    /* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN - SMALL PHONE (max-width: 480px)
   ══════════════════════════════════════════════════════════════════════ */
    @media (max-width: 480px) {

        /* 1-column stat grid on small phones */
        .stat-grid {
            grid-template-columns: 1fr;
        }

        /* Smaller page title */
        .topbar h2 {
            font-size: 15px;
        }

        .topbar .date-time {
            display: none;
        }

        /* Auth card tweaks */
        .auth-card {
            padding: 28px 18px;
        }

        .auth-logo h1 {
            font-size: 18px;
        }

        .auth-logo .school-icon {
            width: 58px;
            height: 58px;
            font-size: 26px;
        }

        /* Tighter page content */
        .page-content {
            padding: 12px;
        }

        /* Smaller welcome card */
        .welcome-card {
            padding: 16px;
        }

        .welcome-card::after {
            display: none;
        }

        /* Smaller section header */
        .section-header {
            padding: 12px 14px;
        }

        .section-card {
            border-radius: 8px;
        }

        /* Sidebar font */
        .sidebar-header h2 {
            font-size: 14px;
        }

        .user-info .uname {
            font-size: 12px;
        }
    }

    /* ── TEACHER DASHBOARD SPECIFIC STYLES ── */
    .quick-actions-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 12px;
        margin-bottom: 24px;
    }

    .quick-action-card {
        background: linear-gradient(135deg, #ffffff 0%, #fbfcfe 100%);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 16px;
        text-align: center;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    }

    .quick-action-card:hover {
        transform: translateY(-2px);
        border-color: var(--accent);
        box-shadow: var(--shadow);
    }

    .quick-action-card .icon {
        font-size: 24px;
        margin-bottom: 8px;
        display: inline-block;
    }

    .quick-action-card .lbl {
        font-size: 13px;
        font-weight: 600;
        color: var(--primary);
    }

    .leave-balance-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 16px;
        margin-bottom: 20px;
    }

    .leave-balance-card {
        border-radius: var(--radius);
        padding: 18px 16px;
        color: white;
        text-align: center;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }

    .leave-balance-card.casual {
        background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    }

    .leave-balance-card.medical {
        background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    }

    .leave-balance-card.earned {
        background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    }

    .leave-balance-card .cnt {
        font-size: 28px;
        font-weight: 700;
    }

    .leave-balance-card .lbl {
        font-size: 12px;
        opacity: 0.9;
        margin-top: 4px;
        font-weight: 500;
    }

    .behavior-pill {
        display: inline-block;
        padding: 4px 10px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
    }

    .behavior-positive {
        background: rgba(46, 125, 94, 0.12);
        color: var(--success);
    }

    .behavior-discipline {
        background: rgba(192, 57, 43, 0.10);
        color: var(--danger);
    }

    .behavior-counseling {
        background: rgba(26, 58, 92, 0.10);
        color: var(--primary);
    }

    .behavior-achievement {
        background: rgba(232, 160, 32, 0.12);
        color: #b07800;
    }

    .teacher-dash-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-top: 20px;
    }

    @media (max-width: 768px) {
        .teacher-dash-grid {
            grid-template-columns: 1fr;
        }
    }

    .marks-edit-table input[type="number"] {
        width: 70px;
        padding: 6px;
        border: 1px solid var(--border);
        border-radius: 4px;
        text-align: center;
        font-family: inherit;
    }

    .marks-edit-table input[type="number"]:focus {
        border-color: var(--primary);
        outline: none;
        background-color: #fcfdfe;
    }

    .analytics-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 16px;
        margin-bottom: 20px;
    }

    .analytics-pill-card {
        background: #f8faff;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 16px;
        text-align: center;
    }

    .analytics-pill-card .val {
        font-size: 22px;
        font-weight: 700;
        color: var(--primary);
    }

    .analytics-pill-card .lbl {
        font-size: 11px;
        color: var(--muted);
        margin-top: 4px;
    }

    .bar-container {
        width: 100%;
        background-color: #e9ecef;
        border-radius: 10px;
        overflow: hidden;
        height: 8px;
        margin-top: 4px;
    }

    .bar-fill {
        height: 100%;
        background-color: var(--accent2);
        border-radius: 10px;
        transition: width 0.3s ease;
    }

    /* ── ATTENDANCE STATUS SELECT ── */
    .att-status-select {
        padding: 6px 10px;
        border: 1.5px solid var(--border);
        border-radius: 7px;
        font-size: 13px;
        font-family: 'DM Sans', sans-serif;
        color: var(--text);
        background: #fff;
        cursor: pointer;
        min-width: 130px;
    }

    /* ── CUSTOM TOGGLE SWITCH STYLES ── */
    .switch {
        position: relative;
        display: inline-block;
        width: 44px;
        height: 22px;
        flex-shrink: 0;
    }

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

    .slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #cbd5e1;
        transition: .3s;
        border-radius: 22px;
    }

    .slider:before {
        position: absolute;
        content: "";
        height: 16px;
        width: 16px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .3s;
        border-radius: 50%;
    }

    .switch input:checked+.slider {
        background-color: var(--primary);
    }

    .switch input:checked+.slider:before {
        transform: translateX(22px);
    }

    /* ── ENLARGED LOGO PLACEHOLDER OVERRIDES ── */
    .logo-placeholder {
        width: 100px !important;
        height: 100px !important;
    }

    .logo-placeholder span:first-child {
        font-size: 28px !important;
    }

    /* ══════════════════════════════════════════════════════════════
   ADMISSION FORM – PREMIUM SIDEBAR NAVIGATION
   ══════════════════════════════════════════════════════════════ */
    .admission-toc {
        background: #f8fafc !important;
        border-right: 1px solid #e2e8f0 !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 24px 16px !important;
        gap: 6px !important;
        position: relative;
        width: 240px !important;
        overflow-y: auto !important;
        flex-shrink: 0 !important;
    }

    .toc-item {
        display: flex !important;
        align-items: center !important;
        padding: 10px 14px !important;
        border-radius: 8px !important;
        color: #475569 !important;
        font-family: 'DM Sans', sans-serif !important;
        font-size: 13.5px !important;
        font-weight: 500 !important;
        text-decoration: none !important;
        transition: all 0.2s ease !important;
        background: transparent !important;
        border: none !important;
        border-left: 3px solid transparent !important;
        margin-bottom: 0 !important;
        line-height: 1.4 !important;
        cursor: pointer;
    }

    .toc-item:hover {
        background: #f1f5f9 !important;
        color: #1e293b !important;
        transform: none !important;
    }

    .toc-item.active {
        background: #e0f2fe !important;
        color: #0369a1 !important;
        border-left-color: #0284c7 !important;
        font-weight: 600 !important;
        box-shadow: none !important;
    }

    /* ── ADMISSION FORM SECTIONS – Premium Redesign ── */
    .admission-form-section {
        background: white;
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 0 !important;
        box-shadow: 0 2px 12px rgba(26, 58, 92, 0.06);
        overflow: hidden;
        transition: box-shadow 0.2s ease;
    }

    .admission-form-section:hover {
        box-shadow: 0 4px 20px rgba(26, 58, 92, 0.1);
    }

    .admission-section-header {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 16px 22px;
        border-bottom: 1px solid var(--border);
        background: linear-gradient(135deg, #f8faff 0%, #f1f5fc 100%);
    }

    .admission-section-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        flex-shrink: 0;
        color: white;
        font-weight: 700;
        letter-spacing: -0.5px;
    }

    .admission-section-header h4 {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: var(--primary) !important;
        margin: 0 !important;
        border-left: none !important;
        padding-left: 0 !important;
        text-transform: uppercase;
        letter-spacing: 0.6px;
    }

    .admission-section-header .section-subtitle {
        font-size: 11px;
        color: var(--muted);
        font-weight: 400;
        margin-top: 1px;
    }

    .admission-section-body {
        padding: 22px !important;
    }

    @media print {

        /* Hide all elements on the page except the print container */
        body>*:not(#print-admission-container) {
            display: none !important;
        }

        body {
            background: #fff !important;
            color: #000 !important;
            margin: 0 !important;
            padding: 0 !important;
        }

        #print-admission-container {
            display: block !important;
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            z-index: 99999;
        }

        .print-page {
            padding: 40px !important;
            height: auto !important;
            box-sizing: border-box;
        }

        .print-page-break {
            page-break-after: always;
            break-after: page;
        }

        /* Print tables */
        .print-table {
            width: 100% !important;
            border-collapse: collapse !important;
            margin-bottom: 12px !important;
            font-size: 11px !important;
        }

        .print-table td {
            padding: 6px 8px !important;
            border: 1px solid #aaa !important;
            font-size: 11px !important;
            color: #000 !important;
            background: none !important;
        }

        .print-section-title {
            background: #1a3a5c !important;
            color: white !important;
            padding: 6px 10px !important;
            font-size: 13px !important;
            font-weight: bold !important;
            text-transform: uppercase !important;
            margin: 15px 0 8px 0 !important;
            -webkit-print-color-adjust: exact !important;
            print-color-adjust: exact !important;
        }

        /* Force background colors to show up colorfully */
        * {
            -webkit-print-color-adjust: exact !important;
            print-color-adjust: exact !important;
        }
    }

    /* ── VALIDATION ERROR HIGHLIGHTING ── */
    input.error,
    select.error,
    textarea.error {
        border-color: var(--danger) !important;
        background-color: rgba(192, 57, 43, 0.05) !important;
        box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15) !important;
    }