:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --primary-dark: #0d1b2a;
    --secondary: #d69e2e;
    --secondary-light: #ecc94b;
    --success: #38a169;
    --danger: #e53e3e;
    --warning: #dd6b20;
    --info: #3182ce;
    --light: #f7fafc;
    --dark: #1a202c;
    --gray: #718096;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #2d3748;
    background-color: #f7fafc;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-light);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--dark);
}

/* Navbar */
.navbar {
    background: var(--primary);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow);
}

.navbar-brand {
    color: var(--white) !important;
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.85) !important;
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover {
    color: var(--white) !important;
    background: rgba(255,255,255,0.1);
}

/* Sidebar */
.sidebar {
    min-height: calc(100vh - 56px);
    background: var(--white);
    border-right: 1px solid var(--border);
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
}

.sidebar .nav-link {
    color: var(--dark);
    padding: 0.75rem 1rem;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar .nav-link:hover {
    background: var(--light);
    color: var(--primary);
}

.sidebar .nav-link.active {
    background: var(--primary);
    color: var(--white);
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

/* Main content pane — horizontal scroll for wide tables without growing the window */
.container-fluid > .row > .col-md-9.col-lg-10.ms-auto {
    min-width: 0;
    overflow-x: auto;
}

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow);
    background: var(--white);
    margin-bottom: 1rem;
}

.card-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* Buttons */
.btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
}

.btn-secondary {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--dark);
}

.btn-secondary:hover {
    background: var(--secondary-light);
    border-color: var(--secondary-light);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--white);
}

/* Forms */
.form-control, .form-select {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--dark);
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--light);
    border-bottom: 2px solid var(--border);
    padding: 0.75rem;
    font-weight: 600;
    color: var(--dark);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

.table tbody tr:hover {
    background: var(--light);
}

/* Stats Cards */
.stat-card {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    color: var(--gray);
    font-size: 0.875rem;
}

/* Alert Messages */
.alert {
    border-radius: 6px;
    border: none;
    padding: 1rem;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
}

.alert-danger {
    background: #fed7d7;
    color: #822727;
}

.alert-warning {
    background: #feebc8;
    color: #744210;
}

.alert-info {
    background: #bee3f8;
    color: #2c5282;
}

/* Badge */
.badge {
    padding: 0.35em 0.65em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.login-logo h3 {
    margin-top: 1rem;
    color: var(--primary);
}

/* Landing Page */
.landing-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></svg>') repeat;
    opacity: 0.3;
}

.landing-hero h1 {
    color: var(--white);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.landing-hero .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-card .feature-icon {
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.5rem;
}

/* Footer */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 3rem 0 1.5rem;
}

.footer h5 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer a {
    color: rgba(255,255,255,0.7);
}

.footer a:hover {
    color: var(--secondary);
}

/* Pagination */
.pagination {
    margin: 1rem 0;
}

.page-link {
    color: var(--primary);
    border-color: var(--border);
}

.page-link:hover {
    background: var(--light);
    color: var(--primary);
}

.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* Dropdown */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
}

.dropdown-item {
    padding: 0.5rem 1rem;
}

.dropdown-item:hover {
    background: var(--light);
    color: var(--primary);
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem;
}

/* Loader */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 767.98px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar-toggle {
        line-height: 1;
        min-width: 40px;
        min-height: 40px;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(13, 27, 42, 0.55);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    .sidebar-backdrop.show {
        opacity: 1;
        visibility: visible;
    }

    .container-fluid > .row > .d-none.d-md-block.sidebar {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(86vw, 300px);
        max-width: 300px;
        height: 100vh;
        height: 100dvh;
        z-index: 1045;
        padding: 0 !important;
        overflow: hidden;
        background: #1a365d;
        transform: translateX(-105%);
        transition: transform 0.28s cubic-bezier(.22, .61, .36, 1);
        box-shadow: none;
    }

    body.sidebar-open .container-fluid > .row > .d-none.d-md-block.sidebar {
        transform: translateX(0);
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.28);
    }

    .container-fluid > .row > .d-none.d-md-block.sidebar > .sidebar {
        position: relative;
        left: auto;
        top: auto;
        bottom: auto;
        width: 100%;
        min-height: 100%;
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-right: none;
        box-shadow: none;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }

    .landing-hero h1 {
        font-size: 2rem;
    }

    .login-card {
        padding: 1.5rem;
    }

    .stat-card {
        margin-bottom: 1rem;
    }

    .navbar .navbar-brand {
        margin-right: 0.5rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Utility Classes */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-danger { background-color: var(--danger) !important; }

.border-primary { border-color: var(--primary) !important; }

.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.d-flex { display: flex; }
.d-none { display: none; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }

.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }

.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: 6px; }
.rounded-lg { border-radius: 8px; }
.rounded-circle { border-radius: 50%; }

.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.position-relative { position: relative; }
.position-absolute { position: absolute; }

.cursor-pointer { cursor: pointer; }

.news-article {
    max-width: 860px;
    margin: 0 auto;
}
.news-article-card {
    overflow: hidden;
    border: 0;
    box-shadow: var(--shadow-lg);
}
.news-article-hero {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    background: #1a365d;
}
.news-article-title {
    color: #1a365d;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
}
.news-article-meta {
    color: #718096;
    font-size: 0.9rem;
}
.news-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #2d3748;
}
.news-body p {
    margin-bottom: 1.15rem;
}
.news-body .news-subhead {
    color: #1a365d;
    font-weight: 700;
    font-size: 1.15rem;
    margin: 1.75rem 0 0.85rem;
}
.news-body .news-list {
    margin: 0 0 1.35rem;
    padding-left: 1.2rem;
}
.news-body .news-list li {
    margin-bottom: 0.4rem;
}
.news-card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.public-page {
    padding-top: 72px;
}
.public-hero {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: #fff;
    padding: 2.5rem 0;
}
.public-hero h1 {
    color: #FFD700;
    font-weight: 700;
}
.public-kicker {
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    font-weight: 600;
}
.public-article-image {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
}
.public-contact-card {
    background: #f7fafc;
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
}
.public-contact-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #1a365d;
    color: #FFD700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}
.public-staff-photo {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #FFD700;
}
.public-staff-fallback {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #1a365d;
    color: #FFD700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}
.faculty-directory {
    margin-top: 2.75rem;
    padding-top: 0.5rem;
}
.faculty-heading {
    text-align: center;
    margin-bottom: 2rem;
}
.faculty-title {
    color: #1a365d;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.faculty-title::after {
    content: "";
    display: block;
    width: 72px;
    height: 3px;
    background: #d69e2e;
    margin: 0.75rem auto 0;
}
.faculty-intro {
    color: #4a5568;
    max-width: 560px;
    margin: 0.85rem auto 0;
}
.faculty-count {
    color: #1a365d;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 0.6rem;
}
.faculty-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(26, 54, 93, 0.08);
    border: 1px solid #edf2f7;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}
.faculty-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(26, 54, 93, 0.14);
}
.faculty-card-top {
    height: 86px;
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
}
.faculty-avatar {
    width: 128px;
    height: 128px;
    margin: -64px auto 0;
    border-radius: 50%;
    overflow: hidden;
    background: #1a365d;
    border: 4px solid #fff;
    box-shadow: 0 0 0 3px #d69e2e;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}
.faculty-avatar img {
    width: 128px !important;
    height: 128px !important;
    max-width: none;
    object-fit: cover;
    object-position: center 18%;
    display: block;
}
.faculty-avatar span {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #FFD700;
    font-size: 1.7rem;
    font-weight: 700;
}
.faculty-body {
    padding: 1rem 1.15rem 1.4rem;
}
.faculty-name {
    color: #1a365d;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0.35rem 0 0.65rem;
    line-height: 1.3;
}
.faculty-subject {
    display: inline-block;
    background: rgba(26, 54, 93, 0.08);
    color: #1a365d;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
}
.faculty-qual {
    color: #718096;
    font-size: 0.85rem;
    margin-top: 0.55rem;
}
.public-gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.notif-dropdown {
    min-width: 340px;
    max-width: 380px;
    padding-bottom: 0.35rem;
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    white-space: normal;
}
.notif-item.unread {
    background: rgba(26, 54, 93, 0.06);
}
.notif-item-body {
    flex: 1;
    min-width: 0;
}
.notif-delete {
    border: 0;
    background: transparent;
    color: #a0aec0;
    padding: 0.15rem 0.35rem;
    line-height: 1;
}
.notif-delete:hover {
    color: #c53030;
}