/* ============================================================
   WANTOR MODEL COLLEGE ADIKPO — GLOBAL STYLESHEET
   ============================================================ */

:root {
    --brown: #6B3A2A;
    --brown-dark: #4A2518;
    --brown-light: #8B5A3C;
    --yellow: #F0C040;
    --yellow-dark: #C8960C;
    --yellow-light: #FFF8E1;
    --blue: #1E3A5F;
    --blue-light: #E8F0FE;
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --red: #DC2626;
    --green: #16A34A;
    --purple: #7C3AED;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.14);
    --transition: all 0.25s ease;
    --sidebar-width: 270px;
    --sidebar-collapsed-width: 50px;
    --header-height: 124px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.hidden {
    display: none !important;
}
.flex {
    display: flex;
}
.flex-wrap {
    flex-wrap: wrap;
}
.items-center {
    align-items: center;
}
.justify-center {
    justify-content: center;
}
.justify-between {
    justify-content: space-between;
}
.gap-4 {
    gap: 4px;
}
.gap-8 {
    gap: 8px;
}
.gap-12 {
    gap: 12px;
}
.gap-16 {
    gap: 16px;
}
.gap-20 {
    gap: 20px;
}
.text-center {
    text-align: center;
}
.text-sm {
    font-size: 0.85rem;
}
.text-md {
    font-size: 0.95rem;
}
.font-bold {
    font-weight: 700;
}
.font-semibold {
    font-weight: 600;
}
.text-brown {
    color: var(--brown);
}
.text-yellow {
    color: var(--yellow);
}
.text-white {
    color: white;
}
.text-gray-500 {
    color: var(--gray-500);
}
.text-gray-600 {
    color: var(--gray-600);
}
.text-green {
    color: #16A34A !important;
}
.text-red {
    color: #DC2626 !important;
}
.mb-4 {
    margin-bottom: 4px;
}
.mb-8 {
    margin-bottom: 8px;
}
.mb-12 {
    margin-bottom: 12px;
}
.mb-16 {
    margin-bottom: 16px;
}
.mb-20 {
    margin-bottom: 20px;
}
.mb-24 {
    margin-bottom: 24px;
}
.mt-4 {
    margin-top: 4px;
}
.mt-8 {
    margin-top: 8px;
}
.mt-12 {
    margin-top: 12px;
}
.mt-16 {
    margin-top: 16px;
}
.mt-20 {
    margin-top: 20px;
}
.p-8 {
    padding: 8px;
}
.p-12 {
    padding: 12px;
}
.p-16 {
    padding: 16px;
}
.p-20 {
    padding: 20px;
}
.p-24 {
    padding: 24px;
}
.rounded-8 {
    border-radius: 8px;
}
.rounded-12 {
    border-radius: 12px;
}
.rounded-full {
    border-radius: 50%;
}
.bg-white {
    background: white;
}
.bg-gray-50 {
    background: var(--gray-50);
}
.bg-yellow-light {
    background: var(--yellow-light);
}
.bg-brown {
    background: var(--brown);
}
.bg-brown-dark {
    background: var(--brown-dark);
}
.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.shadow-md {
    box-shadow: var(--shadow);
}
.shadow-lg {
    box-shadow: var(--shadow-lg);
}
.w-full {
    width: 100%;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
.main-header {
    background: linear-gradient(135deg, var(--brown-dark) 0%, var(--brown) 40%, var(--brown-dark) 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    text-align: center;
}
.header-logo{
    width: 75px;
    height: 75px;
    background: #fff;
    border: 4px solid #FFD700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.header-logo img{
    width: 85%;
    height: 85%;
    object-fit: contain;
}
.header-info h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.1;
    white-space: nowrap;
}
@media(max-width:600px) {
    .header-info h1 {
        font-size: 1.1rem;
        white-space: normal;
    }
}
.header-info .motto {
    font-size: 0.9rem;
    color: var(--yellow);
    font-style: italic;
    letter-spacing: 1.5px;
    margin-top: 2px;
}
.main-nav {
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 16px;
}
.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}
.nav-inner a,
.nav-inner .nav-dropdown>span {
    color: var(--brown-dark);
    text-decoration: none;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 8px 8px 0 0;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    user-select: none;
}
.nav-inner a:hover,
.nav-inner .nav-dropdown:hover>span {
    background: rgba(255, 255, 255, 0.15);
    color: var(--yellow);
}
.nav-inner a.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--yellow);
}
.nav-dropdown {
    position: relative;
}
.nav-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--brown-dark);
    border-radius: 0 0 12px 12px;
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    overflow: hidden;
}
.nav-dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease;
}
.dropdown-menu a {
    display: block;
    padding: 10px 18px;
    border-radius: 0;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: white !important;
    white-space: nowrap;
}
.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.12);
}
.dropdown-menu .sub-dropdown {
    position: relative;
}
.dropdown-menu .sub-dropdown .sub-menu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: var(--brown);
    border-radius: 0 12px 12px 12px;
    min-width: 210px;
    box-shadow: var(--shadow-lg);
    z-index: 1002;
}
.dropdown-menu .sub-dropdown:hover .sub-menu {
    display: block;
}
.sub-menu a {
    padding: 8px 16px;
    font-size: 0.8rem;
    color: white !important;
}
.nav-btn-dashboard {
    background: var(--yellow) !important;
    color: var(--brown-dark) !important;
    font-weight: 700 !important;
    border-radius: 22px !important;
    padding: 8px 18px !important;
    margin-left: auto;
}
.nav-btn-logout {
    background: #DC2626 !important;
    color: white !important;
    border-radius: 22px !important;
    padding: 8px 18px !important;
    margin-left: 8px;
    font-weight: 700 !important;
}
.marquee-bar {
    background: var(--yellow);
    color: var(--brown-dark);
    padding: 7px 0;
    overflow: hidden;
    font-weight: 600;
    font-size: 0.88rem;
    border-bottom: 2px solid var(--brown);
    display: block;
}
.marquee-bar.visible {
    display: block;
}
.marquee-inner {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 22s linear infinite;
    padding-left: 100%;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255,255,255,0.9), 0 0 16px rgba(255,255,255,0.6);
}
.marquee-bar a {
    color: var(--blue);
    text-decoration: underline;
    font-weight: 700;
    margin: 0 6px;
}
.hero-section {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}
.carousel-container {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 420px;
    background: var(--brown-dark);
}
@media(max-width:768px) {
    .carousel-container {
        height: 260px;
    }
}
.carousel-slide {
    display: none;
    height: 100%;
    position: relative;
    width: 100%;
}
.carousel-slide.active {
    display: block;
    animation: fadeIn 0.6s ease;
}
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
}
.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 32px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
    color: white;
}
.carousel-caption h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 6px;
}
.carousel-caption p {
    font-size: 1rem;
    opacity: 0.9;
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--brown);
    z-index: 10;
    transition: var(--transition);
    box-shadow: var(--shadow);
}
.carousel-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.05);
}
.carousel-btn.prev {
    left: 16px;
}
.carousel-btn.next {
    right: 16px;
}
.carousel-dots {
    position: absolute;
    bottom: 16px;
    right: 32px;
    display: flex;
    gap: 8px;
    z-index: 10;
    flex-wrap: wrap;
}
.carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    padding: 0;
}
.carousel-dots .dot.active {
    background: var(--yellow);
    width: 26px;
    border-radius: 12px;
}
.content-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media(max-width:900px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}
.card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: 16px;
}
.card:hover {
    box-shadow: var(--shadow-lg);
}
.card h3 {
    color: var(--brown);
    margin-bottom: 12px;
    font-size: 1.15rem;
    border-bottom: 3px solid var(--yellow);
    display: inline-block;
    padding-bottom: 5px;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
}
.btn-brown {
    background: var(--brown);
    color: white;
}
.btn-brown:hover {
    background: var(--brown-dark);
    transform: translateY(-2px);
}
.btn-yellow {
    background: var(--yellow);
    color: var(--brown-dark);
}
.btn-yellow:hover {
    background: var(--yellow-dark);
    transform: translateY(-2px);
}
.btn-blue {
    background: var(--blue);
    color: white;
}
.btn-blue:hover {
    background: #152a45;
    transform: translateY(-2px);
}
.btn-sm {
    padding: 6px 14px;
    font-size: 0.78rem;
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--brown);
    color: var(--brown);
}
.btn-outline:hover {
    background: var(--brown);
    color: white;
}
.btn-danger {
    background: #DC2626;
    color: white;
}
.btn-danger:hover {
    background: #b91c1c;
}
.btn-green {
    background: var(--green);
    color: white;
}
.btn-green:hover {
    background: #15803d;
}
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}
.modal-overlay.show {
    display: flex;
}
.modal {
    background: white;
    border-radius: var(--radius);
    padding: 28px;
    max-width: 700px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    position: relative;
}
.modal-wide {
    max-width: 950px;
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    font-weight: 700;
    z-index: 10;
}
.modal-close:hover {
    color: var(--red);
}
.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--gray-700);
    font-size: 0.9rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--gray-50);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brown);
    box-shadow: 0 0 0 3px rgba(107, 58, 42, 0.1);
    background: white;
}
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}
@media(max-width:600px) {
    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }
}
.pw-wrapper {
    position: relative;
}
.pw-toggle {
    cursor: pointer;
    color: var(--brown);
    font-size: 0.8rem;
    font-weight: 600;
    user-select: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 150px);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}
.sidebar {
    background: var(--brown-dark);
    color: white;
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    transition: var(--transition);
    overflow-y: auto;
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 130px);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
}
.sidebar.collapsed {
    min-width: var(--sidebar-collapsed-width);
    width: var(--sidebar-collapsed-width);
}
.sidebar.collapsed .sidebar-menu {
    display: none;
}
.sidebar-toggle-btn {
    background: var(--brown);
    color: white;
    border: none;
    padding: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    width: 100%;
    text-align: left;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 5;
    white-space: nowrap;
    min-width: 44px;
    justify-content: flex-start;
    transition: var(--transition);
}
.sidebar.collapsed .sidebar-toggle-btn {
    justify-content: center;
    padding: 12px 4px;
}
.sidebar.collapsed .sidebar-toggle-btn span {
    display: none;
}
.sidebar-toggle-btn:hover {
    background: var(--brown-light);
}
.sidebar-menu {
    list-style: none;
    padding: 0;
}
.sidebar-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
}
.sidebar-menu a:hover,
.sidebar-menu a.sidebar-active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--yellow);
}
.dashboard-main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--gray-100);
    min-height: 400px;
}
.section {
    display: none;
}
.section.active {
    display: block;
    animation: fadeIn 0.35s ease;
}
.tab-nav {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.tab-nav button {
    padding: 10px 18px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--gray-600);
    border-radius: 8px 8px 0 0;
    transition: var(--transition);
    white-space: nowrap;
}
.tab-nav button.active {
    background: var(--brown);
    color: white;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.76rem;
    font-weight: 600;
}
.badge-success {
    background: #DCFCE7;
    color: #166534;
}
.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}
.badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}
.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}
.badge-purple {
    background: #F3E8FF;
    color: #6B21A8;
}
.table-responsive {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
th,
td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.88rem;
}
th {
    background: var(--brown);
    color: white;
    font-weight: 600;
    white-space: nowrap;
}
tr:hover td {
    background: var(--gray-50);
}
.alert {
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 12px;
    border: 1px solid transparent;
}
.alert-error {
    background: #FEE2E2;
    color: var(--red);
    border-color: #FECACA;
}
.alert-success {
    background: #DCFCE7;
    color: var(--green);
    border-color: #BBF7D0;
}
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 4000;
    padding: 14px 22px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    max-width: 420px;
}
.toast-success {
    background: var(--green);
}
.toast-error {
    background: var(--red);
}
.toast-info {
    background: var(--blue);
}
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 24px;
    background: var(--brown);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    z-index: 900;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.back-to-top.visible {
    display: flex;
}
.back-to-top:hover {
    background: var(--brown-dark);
    transform: translateY(-3px);
}
.site-footer {
    background: var(--brown-dark);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 16px 20px;
    font-size: 0.85rem;
    margin-top: auto;
    border-top: 4px solid var(--yellow);
}
.site-footer a {
    color: var(--yellow);
    text-decoration: none;
    font-weight: 700;
}
.site-footer a:hover {
    text-decoration: underline;
}
.section-header {
    background: var(--brown);
    color: white;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 1rem;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.app-form-container {
    max-width: 1100px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-lg);
}
.app-form-header {
    text-align: center;
    border-bottom: 3px solid var(--yellow);
    padding-bottom: 16px;
    margin-bottom: 20px;
}
.app-form-header .school-logo-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--yellow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 28px;
    color: var(--brown-dark);
    border: 3px solid var(--brown);
    margin-bottom: 8px;
}
.staff-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.staff-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
}
.staff-card {
    background: linear-gradient(180deg, #FFFEF9 0%, #FFF9F0 100%);
    border-radius: var(--radius);
    padding: 24px 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(107, 58, 42, 0.12);
    text-align: center;
    width: 270px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.staff-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--yellow);
}
.staff-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 36px rgba(107, 58, 42, 0.22);
}
.staff-card.proprietor-card {
    width: 350px;
    border: 3px solid var(--yellow-dark);
    background: linear-gradient(180deg, #FFFDF0 0%, #FFF8E1 50%, #FFFEF9 100%);
}
.staff-card.proprietor-card::before {
    background: var(--brown-dark);
    height: 6px;
}
.staff-card.principal-card {
    width: 310px;
    border: 2px solid var(--yellow-dark);
    background: linear-gradient(180deg, #FFFEFA 0%, #FFFDF5 100%);
    box-shadow: 0 10px 28px rgba(107, 58, 42, 0.18);
}
.staff-card .staff-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--brown);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 auto 12px;
    border: 3px solid var(--yellow);
    flex-shrink: 0;
}
.staff-card.proprietor-card .staff-avatar {
    width: 100px;
    height: 100px;
    font-size: 2.4rem;
    border: 4px solid var(--yellow-dark);
    background: var(--brown-dark);
}
.staff-card.principal-card .staff-avatar {
    width: 85px;
    height: 85px;
    font-size: 2rem;
}
.staff-card h4 {
    color: var(--brown-dark);
    margin-bottom: 4px;
    font-size: 1rem;
    font-weight: 700;
}
.staff-card .role {
    font-weight: 600;
    color: var(--blue);
    font-size: 0.88rem;
    margin-bottom: 2px;
}
.staff-card .subject {
    font-size: 0.82rem;
    color: var(--gray-600);
    margin-bottom: 4px;
}
.staff-card .contact-info {
    font-size: 0.78rem;
    color: var(--gray-500);
}
.staff-section-title {
    text-align: center;
    color: var(--brown);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 8px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--yellow);
    display: inline-block;
}
.perms-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
    background: var(--gray-50);
    border-radius: 8px;
}
.perms-column label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.83rem;
    cursor: pointer;
    padding: 7px 12px;
    border-radius: 6px;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}
.perms-column label:hover {
    background: var(--yellow-light);
}
.search-container {
    position: relative;
    margin-bottom: 12px;
}
.search-container input {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 25px;
    font-size: 0.9rem;
    background: white;
    transition: var(--transition);
}
.search-container input:focus {
    outline: none;
    border-color: var(--brown);
    box-shadow: 0 0 0 3px rgba(107, 58, 42, 0.08);
}
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: var(--shadow-lg);
    z-index: 50;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}
.search-suggestions.show {
    display: block;
}
.search-suggestions .suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition);
}
.search-suggestions .suggestion-item:hover {
    background: var(--yellow-light);
}
.blog-preview-card {
    display: flex;
    gap: 14px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 10px;
    align-items: center;
    transition: var(--transition);
}
.blog-preview-card:hover {
    background: white;
    box-shadow: var(--shadow);
}
.blog-preview-card img {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.share-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.share-btn {
    padding: 6px 14px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    color: white;
    transition: var(--transition);
    background: #1877F2;
}
.share-btn.fb {
    background: #1877F2;
}
.share-btn.tw {
    background: #1DA1F2;
}
.share-btn.wa {
    background: #25D366;
}
.share-btn:hover {
    opacity: 0.85;
    transform: scale(1.04);
}
.student-list-item {
    background: white;
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.student-list-item:hover {
    box-shadow: var(--shadow-lg);
}
.editable-field input,
.editable-field textarea {
    background: #fff;
    border: 1px solid var(--brown);
}
.readonly-field input {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    cursor: not-allowed;
}
@media print {
    body * {
        visibility: hidden;
    }
    .print-area,
    .print-area * {
        visibility: visible;
    }
    .print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 15mm;
        font-family: 'Times New Roman', serif;
    }
}
.spreadsheet-table th,
.spreadsheet-table td {
    padding: 6px 8px;
    font-size: 0.82rem;
}
.spreadsheet-table input {
    width: 60px;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}
.spreadsheet-table input:focus {
    outline: none;
    border-color: var(--brown);
    box-shadow: 0 0 3px rgba(107, 58, 42, 0.2);
}

/* ============================================================
   ============================================================
   DASHBOARD SHELL — NEW SECTION (appended)
   Only applies to pages that use .dashboard-shell layout.
   Does NOT affect any public page.
   ============================================================
   ============================================================ */

.dashboard-shell {
    display: flex;
    align-items: flex-start;
    gap: 0;
    background: #F3F4F6;
    width: 100%;
    min-height: calc(100vh - var(--header-height, 124px));
    margin: 0;
    padding: 0;
}

.dashboard-content {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    padding: 24px;
    box-sizing: border-box;
    background: #F3F4F6;
}

/* ---- Dashboard tab header ---------------------------------- */
.dashboard-shell .tab-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 3px solid #F0C040;
    flex-wrap: wrap;
}
.dashboard-shell .tab-header h3 {
    color: #6B3A2A;
    font-size: 1.15rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dashboard-shell .tab-header .badge { margin-left: auto; }
.dashboard-shell .tab-header .btn { margin-left: auto; }

/* ---- Stat grid -------------------------------------------- */
.dashboard-shell .stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.dashboard-shell .stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: white;
    padding: 18px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 5px solid #6B3A2A;
    transition: all 0.25s;
}
.dashboard-shell .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.dashboard-shell .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: white;
    flex-shrink: 0;
}
.dashboard-shell .stat-body { flex: 1; min-width: 0; }
.dashboard-shell .stat-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: #4A2518;
    line-height: 1.1;
}
.dashboard-shell .stat-label {
    font-size: 0.76rem;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}
.dashboard-shell .stat-brown  .stat-icon { background: linear-gradient(135deg, #8B5A3C, #4A2518); }
.dashboard-shell .stat-brown  { border-left-color: #6B3A2A; }
.dashboard-shell .stat-blue   .stat-icon { background: linear-gradient(135deg, #3B82F6, #1E3A5F); }
.dashboard-shell .stat-blue   { border-left-color: #1E3A5F; }
.dashboard-shell .stat-purple .stat-icon { background: linear-gradient(135deg, #A78BFA, #7C3AED); }
.dashboard-shell .stat-purple { border-left-color: #7C3AED; }
.dashboard-shell .stat-yellow .stat-icon { background: linear-gradient(135deg, #FCD34D, #C8960C); }
.dashboard-shell .stat-yellow { border-left-color: #F0C040; }
.dashboard-shell .stat-green  .stat-icon { background: linear-gradient(135deg, #34D399, #16A34A); }
.dashboard-shell .stat-green  { border-left-color: #16A34A; }
.dashboard-shell .stat-red    .stat-icon { background: linear-gradient(135deg, #F87171, #DC2626); }
.dashboard-shell .stat-red    { border-left-color: #DC2626; }

/* ---- Info grid (profile / view tabs) ---------------------- */
.dashboard-shell .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.dashboard-shell .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-bottom: 1px solid #E5E7EB;
    flex-wrap: wrap;
}
.dashboard-shell .info-row strong { color: #374151; font-weight: 600; font-size: 0.88rem; }
.dashboard-shell .info-row span { color: #4A2518; font-weight: 600; font-size: 0.88rem; text-align: right; }

/* ---- Content states --------------------------------------- */
.dashboard-shell .content-loading,
.dashboard-shell .empty-state,
.dashboard-shell .error-state {
    text-align: center;
    padding: 60px 20px;
    color: #6B7280;
}
.dashboard-shell .content-loading i,
.dashboard-shell .empty-state i,
.dashboard-shell .error-state i {
    font-size: 2.5rem;
    color: #6B3A2A;
    margin-bottom: 12px;
    display: block;
}
.dashboard-shell .empty-state h3,
.dashboard-shell .error-state h3 { margin: 8px 0; color: #6B3A2A; }
.dashboard-shell .error-state i { color: #DC2626; }

/* ---- Sub tabs --------------------------------------------- */
.dashboard-shell .subtabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    border-bottom: 2px solid #E5E7EB;
    flex-wrap: wrap;
}
.dashboard-shell .subtab-btn {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: #6B7280;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: -2px;
}
.dashboard-shell .subtab-btn:hover { color: #6B3A2A; }
.dashboard-shell .subtab-btn.active {
    color: #6B3A2A;
    border-bottom-color: #F0C040;
    background: rgba(240,192,64,0.08);
    border-radius: 6px 6px 0 0;
}
.dashboard-shell .subtab-pane { display: none; }
.dashboard-shell .subtab-pane.active { display: block; animation: fadeIn 0.25s ease; }

/* ---- Inline forms ----------------------------------------- */
.dashboard-shell .inline-form {
    background: #F9FAFB;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid #E5E7EB;
    margin: 16px 0;
}
.dashboard-shell .inline-form h4 { color: #6B3A2A; margin: 0 0 12px 0; }

/* ---- Admin modals ----------------------------------------- */
.dashboard-shell .admin-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    padding: 12px;
}
.dashboard-shell .admin-modal.show { display: flex; }
.dashboard-shell .admin-modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 700px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    position: relative;
}
.dashboard-shell .admin-modal-wide { max-width: 950px; }
.dashboard-shell .admin-modal-content h4 {
    color: #6B3A2A;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #F0C040;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dashboard-shell .admin-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #6B7280;
    font-weight: 700;
    line-height: 1;
    padding: 0 6px;
}
.dashboard-shell .admin-modal-close:hover { color: #DC2626; }

/* ---- User toolbar (Users tab) ----------------------------- */
.dashboard-shell .user-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    align-items: center;
    background: #F9FAFB;
    padding: 12px;
    border-radius: 8px;
}
.dashboard-shell .filter-buttons { display: flex; flex-wrap: wrap; gap: 4px; }
.dashboard-shell .filter-btn {
    background: #4A2518;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.2s;
}
.dashboard-shell .filter-btn:hover { transform: translateY(-2px); }
.dashboard-shell .filter-btn.active {
    background: #F0C040 !important;
    color: #4A2518 !important;
}

/* ---- Chips ------------------------------------------------ */
.dashboard-shell .chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #E5E7EB;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.82rem;
    margin: 3px 3px 3px 0;
}
.dashboard-shell .chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #DC2626;
    padding: 0 3px;
}

/* ============================================================
   DASHBOARD SHELL — responsive
   ============================================================ */
@media (max-width: 900px) {
    .dashboard-shell .dashboard-content { padding: 18px; }
}

@media (max-width: 700px) {
    .dashboard-shell .dashboard-content { padding: 14px; }

    /* Force 2 columns per row for stat cards, even overriding any
       inline .stat-grid rule that might exist in dashboard.ejs. */
    .dashboard-shell .stat-grid,
    .stat-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .dashboard-shell .stat-card,
    .stat-card {
        padding: 12px 10px !important;
        gap: 8px !important;
        border-left-width: 4px !important;
        border-radius: 10px !important;
    }
    .dashboard-shell .stat-icon,
    .stat-icon {
        width: 38px !important;
        height: 38px !important;
        font-size: 1rem !important;
    }
    .dashboard-shell .stat-value,
    .stat-value { font-size: 1.15rem !important; }
    .dashboard-shell .stat-label,
    .stat-label {
        font-size: 0.62rem !important;
        letter-spacing: 0.2px !important;
        line-height: 1.2 !important;
        word-wrap: break-word !important;
    }
    .dashboard-shell .tab-header h3 { font-size: 1rem; }
    .dashboard-shell .tab-header .badge,
    .dashboard-shell .tab-header .btn { margin-left: 0; }
    .dashboard-shell .info-grid { grid-template-columns: 1fr; }
    .dashboard-shell .info-row span { text-align: left; width: 100%; }
}

@media (max-width: 420px) {
    .dashboard-shell .dashboard-content { padding: 10px; }
    .dashboard-shell .stat-grid,
    .stat-grid { gap: 6px !important; }
    .dashboard-shell .stat-card,
    .stat-card { padding: 10px 8px !important; gap: 6px !important; }
    .dashboard-shell .stat-icon,
    .stat-icon { width: 32px !important; height: 32px !important; font-size: 0.85rem !important; }
    .dashboard-shell .stat-value,
    .stat-value { font-size: 1rem !important; }
    .dashboard-shell .stat-label,
    .stat-label { font-size: 0.56rem !important; }
}

/* Hide any leftover legacy mobile bar (safety) */
.dashboard-mobile-bar { display: none !important; }



/* ============================================================
   USERS TABLE — Sticky S/N column
   ============================================================ */

/* The wrapper handles the rounded corners and scroll behaviour.
   The table itself must NOT clip its content, otherwise
   position: sticky on the S/N cell fails. */
.users-table-responsive {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
}
.users-table {
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* Sticky S/N header cell */
.users-table th.sn-col,
.users-table td.sn-col {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #6B3A2A;
    color: #fff;
    font-weight: 700;
    text-align: center;
    min-width: 52px;
    width: 52px;
    max-width: 52px;
    padding-left: 6px;
    padding-right: 6px;
    border-right: 2px solid #F0C040;
}

/* Sticky S/N body cell — sits above normal cells but below header */
.users-table td.sn-col {
    background: #FFFDF7;
    color: #4A2518;
    z-index: 2;
    font-weight: 700;
}

/* Sticky cell must keep its colour on row hover */
.users-table tr:hover td.sn-col {
    background: #FFF8E1;
}

/* Row separators for the sticky cell */
.users-table th.sn-col { border-bottom: 1px solid #6B3A2A; }
.users-table td.sn-col { border-bottom: 1px solid #E5E7EB; }
.users-table tr:last-child td.sn-col { border-bottom: none; }

/* ============================================================
   USERS TOOLBAR — Filter buttons, at least 3 per row on mobile
   ============================================================ */
@media (max-width: 700px) {
    .dashboard-shell .filter-buttons,
    .user-toolbar .filter-buttons {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
        width: 100% !important;
    }
    .dashboard-shell .filter-btn,
    .user-toolbar .filter-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        padding: 8px 4px !important;
        font-size: 0.72rem !important;
        line-height: 1.1 !important;
        width: 100% !important;
        min-width: 0 !important;
        text-align: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .dashboard-shell .filter-btn i,
    .user-toolbar .filter-btn i {
        font-size: 0.72rem !important;
        flex-shrink: 0 !important;
    }
}

@media (max-width: 420px) {
    .dashboard-shell .filter-btn,
    .user-toolbar .filter-btn {
        font-size: 0.66rem !important;
        padding: 7px 2px !important;
        gap: 2px !important;
    }
    .dashboard-shell .filter-btn i,
    .user-toolbar .filter-btn i {
        font-size: 0.66rem !important;
    }
}

@media (max-width: 340px) {
    .dashboard-shell .filter-btn,
    .user-toolbar .filter-btn {
        font-size: 0.6rem !important;
    }
    .dashboard-shell .filter-btn i,
    .user-toolbar .filter-btn i {
        display: none !important;
    }
}