body {
    background: #f4f7fb;
    min-height: 100vh;
}
.card {
    border: 1px solid rgba(0, 0, 0, 0.08);
}
.table-responsive {
    min-height: 1px;
}
.stat-card {
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    background: #ffffff;
}
.alert {
    margin-bottom: 0;
}

/* Page load overlay and animations */
.page-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.8);
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 300ms ease-in-out;
}
.page-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
}
.spinner {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 6px solid #e9eef7;
    border-top-color: #0d6efd;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-fade {
    animation: pageFadeIn 420ms ease-out;
}
@keyframes pageFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.school-marker-icon {
    display: inline-block;
    width: 30px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    font-size: 26px;
}
/* Button & action styles - unify across modules */
.table .btn, .btn-sm {
    padding: .3rem .5rem;
    border-radius: .5rem;
    font-weight: 600;
    transition: all .15s ease;
    line-height: 1;
}
.table .btn {
    min-width: 0;
}
.table td, .table th {
    min-width: 0;
}
.table .btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
}
.table .btn-icon i {
    margin: 0;
}
.action-btn { display:inline-flex; gap:.35rem; align-items:center; }
.btn-verify {
    background: #198754;
    color: #fff;
    border-color: #198754;
}
.btn-verify:hover { background:#157347; border-color:#157347; box-shadow: 0 2px 8px rgba(25,115,71,.12); }
.btn-verify[disabled], .btn-verify.disabled {
    background:#6c757d; border-color:#6c757d; color:#fff; opacity:.95; cursor:not-allowed;
}
.btn-view {
    background: transparent;
    color: #0d6efd;
    border: 1px solid #cfe2ff;
    border-radius: .5rem;
    padding: .25rem .45rem;
}
.btn-view:hover { background:#e9f2ff; }
.btn-view.btn-icon {
    min-width: 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
}

/* Make small outline buttons consistent */
.btn-outline-primary, .btn-outline-danger, .btn-outline-secondary, .btn-outline-success { border-radius: .75rem; padding: .35rem .75rem; }

/* Icon-style buttons for table actions */
.btn-icon {
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
    box-shadow: 0 12px 20px rgba(0,0,0,.06);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn-icon:hover { transform: translateY(-1px); }
.btn-icon i { margin: 0; }

.btn-verify,
.btn-primary {
    background: linear-gradient(135deg, #20c997, #198754);
    color: #fff;
    border: 1px solid transparent;
    border-radius: .75rem;
    padding: .6rem 1.1rem;
    box-shadow: 0 14px 28px rgba(32, 201, 151, .18);
}
.btn-verify:hover,
.btn-primary:hover,
.btn-verify:focus,
.btn-primary:focus {
    background: linear-gradient(135deg, #198754, #0f5132);
}

.btn-view,
.btn-success {
    background: linear-gradient(135deg, #4dabf7, #1864ab);
    color: #fff;
    border: 1px solid transparent;
    border-radius: .75rem;
    padding: .6rem 1.1rem;
    box-shadow: 0 14px 28px rgba(77, 171, 247, .18);
}
.btn-view:hover,
.btn-success:hover,
.btn-view:focus,
.btn-success:focus {
    background: linear-gradient(135deg, #1864ab, #0b5095);
}

.btn-secondary,
.btn-outline-secondary {
    background: linear-gradient(135deg, #adb5bd, #6c757d);
    color: #fff;
    border: 1px solid transparent;
    border-radius: .75rem;
    padding: .6rem 1.1rem;
}
.btn-secondary:hover,
.btn-outline-secondary:hover,
.btn-secondary:focus,
.btn-outline-secondary:focus {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.btn-outline-primary { border-color: #4dabf7; color: #1864ab; }
.btn-outline-primary:hover { background: rgba(77,171,247,.08); }
.btn-outline-danger { border-color: #f03e3e; color: #c92a2a; }
.btn-outline-danger:hover { background: rgba(240,62,62,.08); }
.btn-outline-success { border-color: #40c057; color: #2b8a3e; }
.btn-outline-success:hover { background: rgba(64,192,87,.08); }

.status-badge { padding: .22rem .55rem; border-radius: 9999px; font-weight: 700; font-size: .78rem; display: inline-flex; align-items: center; gap:.25rem; line-height: 1.2; white-space: nowrap; }
.status-badge.draft { background: #dbe9ff; color: #0f3d91; }
.status-badge.verified { background: #d3f9d8; color: #0f5132; }
.status-badge.request_edit { background: #fff4d6; color: #7c5e10; }
.status-badge.unlocked { background: #e7f5ff; color: #0f4f90; }
.status-badge.no-data { background: #f1f3f5; color: #495057; }

/* Ensure modals are centered above content */
.modal { z-index: 1100; }
.status-badge.draft { background:#e9ecef; color:#212529; }
.status-badge.verified { background:#d1e7dd; color:#0f5132; }
.status-badge.request_edit { background:#fff3cd; color:#664d03; }
.status-badge.unlocked { background:#cfe2ff; color:#084298; }
.status-badge.no-data { background:#f8f9fa; color:#6c757d; }

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}
.table th,
.table td {
    padding: .7rem .8rem;
    vertical-align: middle;
    border-top: 1px solid #e9ecef;
    white-space: normal;
    word-break: break-word;
}
.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 700;
    font-size: .95rem;
    color: #212529;
}
.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fbfbfd;
}
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.navbar-brand {
    font-size: 1.9rem;
    font-weight: 900;
    letter-spacing: .06em;
}
.navbar-brand .logo-img {
    height: 45px;
    width: auto;
}
.brand-letter { display: inline-block; }
.brand-letter-1 { color: #ffd43b; }
.brand-letter-2 { color: #82c7ff; }
.brand-letter-3 { color: #d63384; }
.brand-letter-4 { color: #12b886; }
.brand-letter-5 { color: #fd7e14; }
.brand-letter-6 { color: #6f42c1; }

.navbar-nav .nav-link.active {
    background: rgba(255,255,255,0.16);
    border-radius: .5rem;
    color: #fff !important;
}
.navbar-nav .nav-link:hover {
    background: rgba(255,255,255,0.1);
    border-radius: .5rem;
}

.status-row.verified { background: rgba(25, 135, 84, 0.12); }
.status-row.no-data { background: rgba(220, 53, 69, 0.12); }
.status-row.needs-additional { background: rgba(255, 193, 7, 0.16); }
.status-row.overstaffing { background: rgba(255, 140, 0, 0.12); }
.status-row.within-target { background: rgba(25, 135, 84, 0.08); }
.status-row.no-teachers { background: rgba(220, 53, 69, 0.12); }

/* Adjust small view button to be soft */
.btn-view.btn-icon { background: transparent; border: 1px solid #cfe2ff; color: #0d6efd; }
.btn-view.btn-icon:hover { background:#e9f2ff; }

/* Icon spacing for inline labels */

.fa, .fas, .far, .fal {
    vertical-align: -.125em;
    margin-right: 8px;
}

.card .card-title .fa {
    margin-right: 10px;
}

.school-year-card .table td, .school-year-card .table th {
    vertical-align: middle;
}

.stat-card {
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0.75rem;
    opacity: 0.08;
    pointer-events: none;
}
.stat-card .stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
    background: rgba(255,255,255,0.9);
}
.stat-card--blue .stat-icon { background: rgba(77,171,247,0.18); color: #1864ab; }
.stat-card--green .stat-icon { background: rgba(32,201,151,0.18); color: #198754; }
.stat-card--orange .stat-icon { background: rgba(253,126,20,0.18); color: #d9480f; }
.stat-card--purple .stat-icon { background: rgba(133,94,247,0.18); color: #5f3dc4; }
.stat-card--red .stat-icon { background: rgba(240,62,62,0.18); color: #c92a2a; }
.stat-card--gray .stat-icon { background: rgba(108,117,125,0.18); color: #495057; }
.stat-card h4 { margin: 0; font-size: 2.25rem; }
.stat-card p { margin: 0; color: #495057; }
.stat-card--blue { background: #e7f1ff; }
.stat-card--blue::before { background: linear-gradient(135deg, #4dabf7, #1864ab); }
.stat-card--green { background: #e8f8f2; }
.stat-card--green::before { background: linear-gradient(135deg, #20c997, #198754); }
.stat-card--orange { background: #fff4e6; }
.stat-card--orange::before { background: linear-gradient(135deg, #fd7e14, #d9480f); }
.stat-card--purple { background: #f4ebff; }
.stat-card--purple::before { background: linear-gradient(135deg, #845ef7, #5f3dc4); }
.stat-card--red { background: #ffe5e9; }
.stat-card--red::before { background: linear-gradient(135deg, #f03e3e, #c92a2a); }
.stat-card--gray { background: #f8f9fa; }
.stat-card--gray::before { background: linear-gradient(135deg, #adb5bd, #6c757d); }
.stat-card--info .stat-icon { background: rgba(13,202,242,0.18); color: #0c63e4; }
.stat-card--info { background: #e7f6ff; }
.stat-card--info::before { background: linear-gradient(135deg, #0dcaf0, #0c63e4); }
.stat-card--secondary .stat-icon { background: rgba(108,117,125,0.18); color: #6c757d; }
.stat-card--secondary { background: #f8f9fa; }
.stat-card--secondary::before { background: linear-gradient(135deg, #c3cfe2, #6c757d); }

.status-row.verified { background: rgba(25, 135, 84, 0.12); }
.status-row.no-data { background: rgba(220, 53, 69, 0.12); }
.status-row.needs-additional { background: rgba(255, 193, 7, 0.16); }
.status-row.overstaffing { background: rgba(255, 140, 0, 0.12); }
.status-row.within-target { background: rgba(25, 135, 84, 0.08); }
.status-row.no-teachers { background: rgba(220, 53, 69, 0.12); }

.status-badge.needs-additional { background: #fff3cd; color: #664d03; }
.status-badge.overstaffing { background: #ffe5d1; color: #8a4c12; }
.status-badge.within-target { background: #d1e7dd; color: #0f5132; }
.status-badge.no-teachers { background: #f8d7da; color: #842029; }
.status-badge.no-data { background: #f8d7da; color: #842029; }

.school-marker-icon {
    display: inline-block;
    width: 30px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    font-size: 26px;
}
