@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* Design Tokens & Custom Variables */
:root {
    --primary: #1e3a8a;
    --primary-rgb: 30, 58, 138;
    --primary-light: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #0f766e 100%);
    --primary-gradient-hover: linear-gradient(135deg, #1d4ed8 0%, #0d9488 100%);
    --secondary: #0f766e;
    --accent: #d97706;
    --accent-light: #fef3c7;
    --accent-gradient: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-footer: #0b1329;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #f8fafc;
    
    --border-color: #e2e8f0;
    --border-focus: #3b82f6;
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    --shadow-premium: 0 10px 40px -10px rgba(30, 58, 138, 0.1);
    
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
    
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* CSS Resets & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--primary);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

input, button, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.section-padding {
    padding-top: 96px;
    padding-bottom: 96px;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-white { color: #ffffff; }
.text-nowrap { white-space: nowrap !important; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

/* Grid System */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.grid-2 > *,
.grid-3 > *,
.grid-4 > *,
.grid-5 > *,
.form-grid > * {
    min-width: 0;
}

/* Common Layout Components */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 160ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms cubic-bezier(0.23, 1, 0.32, 1);
    gap: 10px;
    cursor: pointer;
    font-family: var(--font-heading);
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(30, 58, 138, 0.3);
}

.btn-primary:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

.btn-secondary {
    background: #ffffff;
    color: var(--primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-main);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
}

.btn-danger {
    background: #dc2626;
    color: #ffffff;
    border: 1px solid #b91c1c;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.btn-danger:hover {
    background: #b91c1c;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.btn-outline-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1.5px solid #f87171;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.08);
    font-weight: 600;
}

.btn-outline-danger:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-outline-danger svg {
    stroke: currentColor;
    transition: stroke 160ms ease;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.9rem;
    border-radius: var(--border-radius-sm);
}

/* Premium Login Button in Navbar */
.btn-login {
    background: rgba(30, 58, 138, 0.06);
    color: var(--primary);
    border: 1.5px solid rgba(30, 58, 138, 0.18);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 200ms cubic-bezier(0.23, 1, 0.32, 1), color 160ms ease-out, border-color 160ms ease-out;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: var(--shadow-sm);
}

.btn-login:active {
    transform: scale(0.97);
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scaleX(0);
    transform-origin: right;
    z-index: -1;
}

.btn-login:hover {
    color: #ffffff !important;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.25);
}

.btn-login:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-login .btn-icon {
    transition: transform 0.3s ease;
}

.btn-login:hover .btn-icon {
    transform: translateX(1px);
}

/* Floating Responsive Navbar */
.navbar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.navbar-scrolled {
    background: #ffffff;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 12px 0;
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-family: var(--font-heading);
    color: var(--primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
}

.logo-title-line1,
.logo-title-line2 {
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: 0.35px;
    color: var(--primary);
    text-transform: uppercase;
}

.logo-sub {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-top: 2px;
    text-transform: uppercase;
}

.footer-brand-abbr {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #ffffff;
    line-height: 1;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-item a:not(.btn) {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    position: relative;
    padding: 6px 0;
}

.nav-item a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition-normal);
}

.nav-item a:not(.btn):hover {
    color: var(--primary-light);
}

.nav-item a:not(.btn):hover::after {
    width: 100%;
}

.nav-item.active a:not(.btn) {
    color: var(--primary);
}

.nav-item.active a:not(.btn)::after {
    width: 100%;
}

.mobile-nav-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 58, 138, 0.9) 100%);
    color: #ffffff;
    padding-top: 100px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(13, 148, 136, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 700px;
    position: relative;
    z-index: 10;
}

.hero .grid-2 {
    align-items: center;
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.95fr);
    gap: 40px;
}

@media(max-width: 992px) {
    .hero .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 32px;
    }
}

.hero-tagline {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 20px;
    background: linear-gradient(to right, #ffffff, #93c5fd, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: fadeInDown 0.8s ease-out;
}

.hero-tagline span,
.hero-tagline .text-nowrap {
    white-space: nowrap;
    background: inherit;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline;
}

.hero-subtext {
    font-size: 1.15rem;
    color: #cbd5e1;
    margin-bottom: 36px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Glass card on Hero */
.hero-glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: fadeInRight 0.8s ease-out 0.2s both;
}

/* About Faculty */
.about-grid {
    align-items: center;
}

.about-image-wrapper {
    position: relative;
}

.about-image-wrapper::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--accent);
    border-radius: var(--border-radius-lg);
    z-index: 1;
    pointer-events: none;
    transition: var(--transition-slow);
}

.about-image-wrapper:hover::before {
    transform: translate(10px, 10px);
}

.about-img {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 2;
    filter: brightness(0.95);
}

.about-badge {
    background: var(--accent-light);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 16px;
}

.dean-quote {
    background: var(--bg-card);
    border-left: 4px solid var(--secondary);
    padding: 24px;
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
    box-shadow: var(--shadow-premium);
    margin-top: 32px;
}

.dean-quote p {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.dean-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Stats Section */
.stats-section {
    background: var(--primary-gradient);
    color: #ffffff;
    padding: 64px 0;
}

.stat-card {
    text-align: center;
    padding: 24px;
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.stat-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: #cbd5e1;
}

.choose-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-md);
    padding: 28px;
    transition: var(--transition-normal);
}

.choose-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.choose-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

/* Department Card Section */
.section-title-wrapper {
    max-width: 600px;
    margin: 0 auto 64px auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.dept-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dept-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
    transition: var(--transition-normal);
}

.dept-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(30, 58, 138, 0.2);
}

.dept-card:hover::before {
    height: 6px;
}

.dept-icon {
    width: 56px;
    height: 56px;
    background: rgba(30, 58, 138, 0.05);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 24px;
    transition: var(--transition-normal);
}

.dept-card:hover .dept-icon {
    background: var(--primary-gradient);
    color: #ffffff;
}

.dept-name {
    font-size: 1.5rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.dept-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.dept-link {
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dept-link:hover {
    color: var(--secondary);
}

/* Faculty Leadership */
.leader-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

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

.leader-img-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.leader-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.leader-card:hover .leader-img {
    transform: scale(1.05);
}

.leader-info {
    padding: 24px;
    text-align: center;
}

.leader-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.leader-role {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.leader-dept {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Programs Tab section */
.programs-container {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-premium);
    padding: 40px;
    border: 1px solid var(--border-color);
}

.tabs-nav {
    display: flex;
    justify-content: center;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 32px;
    gap: 24px;
}

.tab-btn {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-muted);
    padding: 12px 24px;
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: var(--transition-fast);
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    width: 100%;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.program-card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.program-list-item {
    background: var(--bg-main);
    border-radius: var(--border-radius-md);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
    border-left: 4px solid var(--primary);
}

.program-list-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
    background: #ffffff;
    border-left-color: var(--accent);
}

.program-item-name {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary);
}

.program-item-dept {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.program-item-meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.program-badge {
    background: rgba(30, 58, 138, 0.08);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* News and Announcements */
.news-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: var(--transition-normal);
}

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

.news-img-wrapper {
    aspect-ratio: 16/10;
    position: relative;
    background: var(--primary-gradient);
    overflow: hidden;
}

.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.news-card:hover .news-img {
    transform: scale(1.03);
}

.news-cat-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
}

/* Announcements page category filter pills */
.filter-pill {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1.5px solid var(--border-color);
    color: var(--text-muted);
    background: #ffffff;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.filter-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(30, 58, 138, 0.04);
}

.filter-pill.active {
    background: var(--primary-gradient);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
}

.news-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.news-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer styling */
.footer {
    background-color: var(--bg-footer);
    color: #cbd5e1;
    padding: 80px 0 32px 0;
    font-size: 0.95rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    margin-bottom: 64px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.footer-logo .logo-text {
    color: #ffffff;
}

.footer-logo .logo-sub {
    color: #94a3b8;
}

.footer-desc {
    margin-bottom: 24px;
    color: #94a3b8;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: var(--transition-fast);
}

.social-icon:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.footer-title {
    color: #ffffff;
    font-size: 1.15rem;
    margin-bottom: 24px;
    position: relative;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 4px;
}

.footer-contact-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-contact-icon {
    color: var(--accent);
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: #94a3b8;
    font-size: 0.85rem;
}

.footer-copyright {
    margin: 0;
    line-height: 1.45;
    flex: 1 1 auto;
}

.footer-legal-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    flex: 1 1 auto;
    text-align: right;
}

.footer-legal-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.footer-legal-links a:hover {
    color: var(--accent, #f59e0b);
    text-decoration: underline;
}

.footer-dot {
    color: #475569;
}

/* Department Pages styling */
.dept-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 58, 138, 0.88) 100%);
    color: #ffffff;
    padding: 140px 0 80px 0;
}

.dept-header-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 48px;
    align-items: center;
}

.hod-welcome-box {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
    margin-bottom: 48px;
}

.hod-welcome-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.hod-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-light);
}

.hod-quote {
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-muted);
    position: relative;
    padding-left: 24px;
    border-left: 4px solid var(--accent);
}

/* Course levels structure table */
.level-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.level-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.level-header {
    background: var(--bg-main);
    padding: 16px 24px;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.level-content {
    padding: 24px;
}

.course-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.course-table th {
    background: var(--bg-main);
    padding: 12px 16px;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.course-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.course-table tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   Modern Course Curriculum Cards & Responsive Structure
   Clean, accessible, responsive card list replacing cramped mobile tables
   ========================================================================== */

.course-curriculum-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.course-curriculum-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 16px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.course-curriculum-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(11, 37, 69, 0.06);
    transform: translateY(-1px);
}

.course-card-main {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.course-code-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: var(--primary);
    border: 1px solid #e2e8f0;
    font-weight: 700;
    font-size: 0.84rem;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    padding: 3px 9px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: none;
}

.course-card-title {
    font-size: 1.02rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.45;
    word-break: break-word;
}

.course-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.course-unit-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.course-unit-pill svg {
    color: var(--accent);
}

.course-sem-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 9999px;
    white-space: nowrap;
}

.course-sem-pill.sem-first {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.course-sem-pill.sem-second {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* Programme View Specific Card Layout (Main Info + Lecturer Allocation) */
.course-card-program {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr);
    gap: 24px;
    align-items: center;
}

.course-card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.course-card-info-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.course-card-alloc-col {
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.course-alloc-heading {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.course-alloc-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.course-alloc-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: #1e293b;
    flex-wrap: wrap;
}

.course-alloc-item strong {
    color: #0f172a;
    font-weight: 600;
}

.course-alloc-session {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 1px 7px;
    border-radius: 4px;
}

.course-alloc-empty {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.course-alloc-empty.text-italic {
    font-style: italic;
}

.course-history-details {
    margin-top: 4px;
    font-size: 0.78rem;
}

.course-history-summary {
    cursor: pointer;
    color: #64748b;
    font-weight: 600;
    outline: none;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 150ms ease;
}

.course-history-summary:hover {
    color: var(--primary);
}

.course-history-dropdown {
    margin-top: 6px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    max-width: 100%;
}

.course-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-history-item {
    padding: 4px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 0.76rem;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

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

.course-history-tag {
    background: #e2e8f0;
    color: #475569;
    font-size: 0.62rem;
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Department Staff Cards List */
.dept-staff-card-item {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 28px;
    align-items: flex-start;
}

.dept-staff-card-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dept-staff-avatar-wrap {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.dept-staff-body {
    flex-grow: 1;
    min-width: 0;
}

/* Programme Quick Meta (Duration & Category) */
.program-quick-meta {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 24px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

/* Class Reps Filter Grid */
.class-reps-filter-grid {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr auto auto;
    gap: 14px;
    align-items: flex-end;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

/* Handbook Card & Dark Gradient Widget Contrast Fix */
.handbook-widget-card,
.section-handbooks,
.section-handbook,
[style*="background: var(--primary-gradient)"],
[style*="background:var(--primary-gradient)"],
[style*="background: linear-gradient(135deg, var(--bg-footer)"] {
    color: #ffffff;
}

.handbook-widget-card h1, .handbook-widget-card h2, .handbook-widget-card h3, .handbook-widget-card h4, .handbook-widget-card h5, .handbook-widget-card h6,
.section-handbooks h1, .section-handbooks h2, .section-handbooks h3, .section-handbooks h4, .section-handbooks h5, .section-handbooks h6,
.section-handbook h1, .section-handbook h2, .section-handbook h3, .section-handbook h4, .section-handbook h5, .section-handbook h6,
.login-header h1, .login-header h2, .login-header h3, .login-header h4, .login-header h5, .login-header h6,
[style*="background: var(--primary-gradient)"] h1,
[style*="background: var(--primary-gradient)"] h2,
[style*="background: var(--primary-gradient)"] h3,
[style*="background: var(--primary-gradient)"] h4,
[style*="background: var(--primary-gradient)"] h5,
[style*="background: var(--primary-gradient)"] h6,
[style*="background:var(--primary-gradient)"] h1,
[style*="background:var(--primary-gradient)"] h2,
[style*="background:var(--primary-gradient)"] h3,
[style*="background:var(--primary-gradient)"] h4,
[style*="background:var(--primary-gradient)"] h5,
[style*="background:var(--primary-gradient)"] h6,
[style*="background: linear-gradient(135deg, var(--bg-footer)"] h1,
[style*="background: linear-gradient(135deg, var(--bg-footer)"] h2,
[style*="background: linear-gradient(135deg, var(--bg-footer)"] h3,
[style*="background: linear-gradient(135deg, var(--bg-footer)"] h4,
[style*="background: linear-gradient(135deg, var(--bg-footer)"] h5,
[style*="background: linear-gradient(135deg, var(--bg-footer)"] h6 {
    color: #ffffff !important;
}

/* Staff profile details list */
.initials-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    aspect-ratio: 1;
    object-fit: cover;
    flex-shrink: 0;
}

.avatar-md {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    aspect-ratio: 1;
}

.avatar-lg {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    aspect-ratio: 1;
}

.avatar-xl {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    aspect-ratio: 1;
}

.profile-list {
    list-style-type: none;
    padding-left: 0;
}

.profile-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}

.profile-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Portal/Login page styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05) 0%, rgba(15, 23, 42, 0.05) 100%);
    padding: 24px;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 480px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.login-header {
    background: var(--primary-gradient);
    color: #ffffff;
    padding: 40px;
    text-align: center;
}

.login-form-body {
    padding: 40px;
}

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

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: #ffffff;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none !important;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Custom Select Dropdown: Eliminates browser native dropdown arrows and OS widgets */
select,
select.form-control,
.filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    background-size: 15px 15px;
    padding-right: 38px !important;
    cursor: pointer;
}

select:hover,
select.form-control:hover,
.filter-select:hover {
    border-color: #94a3b8;
}

select:focus,
select.form-control:focus,
.filter-select:focus {
    outline: none !important;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e3a8a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

select option {
    background-color: #ffffff;
    color: var(--text-main);
    padding: 8px 12px;
}

select optgroup {
    font-weight: 700;
    color: var(--primary);
    background-color: #f8fafc;
}

select:disabled,
select.form-control:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

/* Eliminate native search controls & browser autofill halos */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none !important;
}

input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: none !important;
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.btn-login-submit {
    position: relative;
    overflow: hidden;
    transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-login-submit:active {
    transform: scale(0.97);
}

.btn-login-submit::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: transform 250ms cubic-bezier(0.23, 1, 0.32, 1), opacity 200ms ease-out;
    opacity: 0;
}

.btn-login-submit:hover::after {
    left: 125%;
    opacity: 1;
}

/* File inputs: restore native appearance so the chosen filename shows */
input[type="file"].form-control {
    padding: 8px 12px;
    cursor: pointer;
    height: auto;
    line-height: 1.5;
    background: #ffffff;
}

input[type="file"].form-control::file-selector-button {
    margin-right: 12px;
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-main);
    color: var(--primary);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

input[type="file"].form-control::file-selector-button:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.alert {
    padding: 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 24px;
    font-weight: 500;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

/* Portal dashboard layout */
.portal-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-main);
}

/* 1. Fixed Sidebar */
.portal-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    height: 100vh;
    background: var(--bg-footer);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden; /* Sidebar container itself does not scroll */
    padding: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.12);
}

.portal-brand {
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.portal-brand-link {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: opacity 160ms cubic-bezier(0.23, 1, 0.32, 1), transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.portal-brand-link:hover {
    opacity: 0.92;
}

.portal-brand-link:active {
    transform: scale(0.98);
}

.portal-brand-logo {
    height: 38px;
    width: auto;
    flex-shrink: 0;
    object-fit: contain;
}

.portal-brand-text {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #ffffff;
    text-transform: uppercase;
    line-height: 1;
}

/* 2. Scrollable Navigation Menu Wrapper */
.portal-menu-wrapper {
    flex: 1 1 auto;
    min-height: 0; /* Necessary for flex item overflow scrolling */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.portal-menu-wrapper::-webkit-scrollbar {
    width: 5px;
}

.portal-menu-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.portal-menu-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
}

.portal-menu-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.portal-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.portal-menu-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 0.88rem;
    color: #94a3b8;
    transition: background 150ms cubic-bezier(0.23, 1, 0.32, 1), color 150ms cubic-bezier(0.23, 1, 0.32, 1), transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.portal-menu-item a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.portal-menu-item a:active {
    transform: scale(0.97);
}

.portal-menu-item.active a {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(11, 37, 69, 0.35);
    font-weight: 600;
}

/* 3. Pinned User & Logout at Bottom */
.portal-user {
    flex-shrink: 0;
    margin-top: auto;
    padding: 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #081d37;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.portal-user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.portal-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.portal-user-info {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.portal-user-name {
    font-weight: 600;
    font-size: 0.82rem;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-user-role {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    transition: color 150ms cubic-bezier(0.23, 1, 0.32, 1), background 150ms cubic-bezier(0.23, 1, 0.32, 1), border-color 150ms cubic-bezier(0.23, 1, 0.32, 1), transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.portal-logout-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
}

.portal-logout-btn:active {
    transform: scale(0.95);
}

/* 4. Main Content Panel */
.portal-main {
    flex-grow: 1;
    margin-left: 260px;
    width: calc(100% - 260px);
    min-width: 0;
    min-height: 100vh;
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
}

/* 5. Non-scrollable / Sticky Top Navbar */
.portal-navbar {
    position: sticky;
    top: 0;
    z-index: 900;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.portal-content {
    padding: 28px 32px;
    flex-grow: 1;
    min-width: 0;
}

/* Dashboard Summary Cards */
.portal-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.portal-stat-card {
    background: #ffffff;
    border-radius: var(--border-radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portal-stat-val {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--primary);
    line-height: 1.2;
}

.portal-stat-lbl {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Data Table */
.data-table-card {
    background: #ffffff;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 40px;
    min-width: 0;
}

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

.table-responsive {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

.admin-table th {
    background: var(--bg-main);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    white-space: nowrap;
}

.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: rgba(30, 58, 138, 0.01);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.2;
}

.badge-primary { background: rgba(30, 58, 138, 0.1); color: var(--primary); }
.badge-secondary { background: #f1f5f9; color: #475569; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0f2fe; color: #0369a1; }
.badge-warning { background: #fef3c7; color: #92400e; }

/* Grid Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.form-grid-full {
    grid-column: 1 / -1;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Responsive adjustments */
@media(max-width: 1200px) {
    /* Stack two-column Form + Table portal layouts when viewport is medium/narrow so neither is squeezed */
    [style*="grid-template-columns: 1fr 1.5fr"],
    [style*="grid-template-columns: 1fr 1.6fr"],
    [style*="grid-template-columns: 1.9fr 1.1fr"],
    [style*="grid-template-columns: minmax(340px, 1fr)"],
    [style*="grid-template-columns: minmax(0, 1.65fr)"] {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
}

@media(max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-5 { grid-template-columns: repeat(3, 1fr); }
    .footer-top { grid-template-columns: repeat(2, 1fr); gap: 32px; }
    
    /* Override inline grids on tablet to stack and prevent horizontal overflow */
    [style*="grid-template-columns: 1fr 1.5fr"],
    [style*="grid-template-columns: 1fr 1.6fr"],
    [style*="grid-template-columns: 1.9fr 1.1fr"],
    [style*="grid-template-columns: minmax(340px, 1fr)"],
    [style*="grid-template-columns: minmax(0, 1.65fr)"],
    [style*="grid-template-columns: 2fr 1fr"],
    [style*="grid-template-columns: 1.5fr 1fr"],
    [style*="grid-template-columns: 1fr 2.5fr"],
    [style*="grid-template-columns: 180px 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
}

@media(max-width: 768px) {
    html { font-size: 14px; }
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    .section-padding {
        padding-top: 48px !important;
        padding-bottom: 48px !important;
    }
    .dept-header {
        padding: 108px 0 40px 0 !important;
    }
    
    /* Fix inline grids on mobile */
    .grid-2, .grid-3, .grid-4, .grid-5,
    [style*="grid-template-columns: 1fr 1.5fr"],
    [style*="grid-template-columns: 2fr 1fr"],
    [style*="grid-template-columns: 1.5fr 1fr"],
    [style*="grid-template-columns: 1fr 2.5fr"],
    [style*="grid-template-columns: 180px 1fr"],
    [style*="grid-template-columns: 2fr 1fr auto"],
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 24px;
    }
    
    /* Touch targets and iOS input zoom fixes */
    input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="file"], select, textarea {
        font-size: 16px !important;
    }
    
    .btn, .tab-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .program-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .program-item-meta {
        width: 100%;
        justify-content: space-between;
    }

    .hero-tagline { font-size: 2.5rem; }
    .hero { min-height: auto; padding: 120px 0 64px 0; }
    .hero-actions { flex-direction: column; }
    .nav-links { display: none; } /* Handle mobile toggle in JS */
    .mobile-nav-toggle { display: block; }
    .about-image-wrapper::before { display: none; }
    .dept-header-grid { grid-template-columns: 1fr !important; gap: 24px; }
    
    .portal-layout { flex-direction: column; }
    .portal-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 0;
        box-shadow: none;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .portal-brand {
        padding: 16px 20px;
    }
    .portal-menu-wrapper {
        max-height: 260px;
        padding: 12px 16px;
    }
    .portal-menu {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 6px;
    }
    .portal-menu-item a {
        padding: 10px 12px;
        font-size: 0.82rem;
        flex-direction: row;
        text-align: left;
        gap: 8px;
        justify-content: flex-start;
    }
    .portal-user {
        padding: 14px 16px;
    }
    .portal-main {
        margin-left: 0;
        width: 100%;
    }
    .portal-navbar {
        position: sticky;
        top: 0;
        padding: 14px 20px;
    }
    .portal-content {
        padding: 20px;
    }
    
    .form-grid { grid-template-columns: 1fr; }
    .form-grid-full { grid-column: span 1; }
    .tabs-nav { flex-wrap: wrap; gap: 12px; }
    .tab-btn { padding: 8px 16px; font-size: 1rem; }
    
    .footer { font-size: 0.8rem; }
    .footer-bottom { font-size: 0.80rem; }
}

@media(max-width: 768px) {
    .logo-img { height: 42px; }
    .logo-title-line1,
    .logo-title-line2 { font-size: 0.82rem; }
    .logo-sub { font-size: 0.62rem; }
    
    .footer-bottom {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: left !important;
        gap: 12px !important;
        font-size: 0.76rem !important;
    }
    .footer-copyright {
        margin: 0 !important;
        flex: 1 1 50% !important;
        font-size: 0.76rem !important;
        line-height: 1.4 !important;
        word-break: normal;
        overflow-wrap: break-word;
    }
    .footer-legal-links {
        flex: 1 1 50% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 4px 8px !important;
        text-align: right !important;
        font-size: 0.76rem !important;
    }
}

@media(max-width: 480px) {
    .container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
    .dept-header {
        padding: 98px 0 32px 0 !important;
    }
    .logo-img { height: 36px; }
    .logo-title-line1,
    .logo-title-line2 { font-size: 0.74rem; letter-spacing: 0.2px; }
    .logo-sub { font-size: 0.56rem; }

    .footer-bottom {
        gap: 10px !important;
        font-size: 0.70rem !important;
    }
    .footer-copyright {
        font-size: 0.70rem !important;
        line-height: 1.35 !important;
    }
    .footer-legal-links {
        font-size: 0.70rem !important;
        gap: 3px 6px !important;
    }
    .footer-dot {
        font-size: 0.68rem;
    }
}
    
@media(max-width: 768px) {
    /* Department Page Mobile Reordering */
    .dept-content-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 28px !important;
    }
    .dept-main-col, .dept-side-col {
        display: contents !important;
    }
    .section-hod { order: 1; margin-bottom: 0 !important; }
    .section-about { order: 2; margin-bottom: 0 !important; }
    .section-programs { order: 3; margin-bottom: 0 !important; }
    .section-courses { order: 4; margin-bottom: 0 !important; }
    .section-handbooks, .section-handbook { order: 5; margin-bottom: 0 !important; }
    .section-staff { order: 6; margin-bottom: 0 !important; }
    
    /* Reduce excessive container paddings on mobile */
    .programs-container, 
    .dept-card,
    .hero-glass-card,
    .hod-welcome-box,
    .auth-card,
    .form-container,
    [style*="padding: 40px"], 
    [style*="padding: 32px"] {
        padding: 20px !important;
    }

    /* Course Structure & Accordion Mobile Optimization */
    .dept-header h1 {
        font-size: 1.85rem !important;
        line-height: 1.25 !important;
    }
    .dept-header p {
        font-size: 0.95rem !important;
    }
    .level-content {
        padding: 12px 10px !important;
    }
    .level-header {
        padding: 14px 16px !important;
        font-size: 1rem !important;
    }

    /* Curriculum Cards Stack Mode on Mobile */
    .course-curriculum-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 14px 16px !important;
    }
    .course-card-main {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .course-card-meta {
        width: 100% !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .course-card-title {
        font-size: 0.98rem !important;
        width: 100% !important;
    }
    .course-card-alloc-col {
        width: 100% !important;
    }

    /* Fallback table-to-card transformation for any generic tables on mobile */
    .course-table,
    .course-table thead,
    .course-table tbody,
    .course-table th,
    .course-table td,
    .course-table tr {
        display: block !important;
    }
    .course-table thead tr {
        position: absolute !important;
        top: -9999px !important;
        left: -9999px !important;
    }
    .course-table tr {
        background: #ffffff !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--border-radius-sm) !important;
        padding: 12px 14px !important;
        margin-bottom: 10px !important;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    }
    .course-table tr:last-child {
        margin-bottom: 0 !important;
    }
    .course-table td {
        border: none !important;
        padding: 6px 0 !important;
        border-bottom: 1px dashed #f1f5f9 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 12px !important;
        font-size: 0.88rem !important;
    }
    .course-table td:last-child {
        border-bottom: none !important;
    }
    .course-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        flex-shrink: 0;
    }
}

/* Tablet & Intermediate Breakpoints */
@media(max-width: 960px) {
    .course-card-program {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .course-card-alloc-col {
        border-left: none !important;
        border-top: 1px dashed var(--border-color) !important;
        padding-left: 0 !important;
        padding-top: 12px !important;
    }
    .class-reps-filter-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media(max-width: 640px) {
    .dept-staff-card-item {
        gap: 16px !important;
    }
    .dept-staff-avatar-wrap {
        width: 72px !important;
        height: 72px !important;
    }
}

@media(max-width: 580px) {
    .class-reps-filter-grid {
        grid-template-columns: 1fr !important;
    }
    .class-reps-filter-grid .btn {
        width: 100% !important;
    }
}

@media(max-width: 480px) {
    .dept-header h1 {
        font-size: 1.6rem !important;
    }
    .course-curriculum-list {
        gap: 10px !important;
    }
    .course-curriculum-card {
        padding: 12px 12px !important;
    }
    .course-code-badge {
        font-size: 0.8rem !important;
        padding: 3px 8px !important;
    }
    .course-unit-pill,
    .course-sem-pill {
        font-size: 0.72rem !important;
        padding: 3px 8px !important;
    }
    .course-card-title {
        font-size: 0.92rem !important;
    }
    .program-quick-meta {
        gap: 20px !important;
    }
    .dept-staff-card-item {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    .dept-staff-body {
        width: 100% !important;
    }
    .dept-staff-header-row {
        justify-content: center !important;
    }
    .dept-staff-contacts {
        justify-content: center !important;
    }
    [style*="padding: 40px"], 
    [style*="padding: 32px"],
    .section-courses,
    .section-about,
    .section-staff {
        padding: 16px 12px !important;
    }
    .level-content {
        padding: 10px 8px !important;
    }
}

/* Class Representatives Directory Components */
.session-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms ease-out, color 160ms ease-out, box-shadow 160ms ease-out;
}
.session-pill:active {
    transform: scale(0.97);
}
.session-pill.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(11, 37, 69, 0.25);
}
.session-pill:not(.active) {
    background: #f1f5f9;
    color: var(--text-muted);
    border: 1px solid #e2e8f0;
}
.session-pill:not(.active):hover {
    background: #e2e8f0;
    color: var(--primary);
    transform: translateY(-1px);
}

.class-rep-card {
    background: #ffffff;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 160ms ease-out;
    padding: 24px;
    position: relative;
}
.class-rep-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Department & Program Roster Sections */
.dept-roster-section {
    margin-bottom: 48px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.dept-roster-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 20px 28px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.dept-roster-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dept-roster-title h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.prog-roster-group {
    padding: 28px;
    border-bottom: 1px solid #f1f5f9;
}
.prog-roster-group:last-child {
    border-bottom: none;
}

.prog-roster-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #e2e8f0;
}

.prog-roster-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prog-roster-title h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.category-pill {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 9999px;
    border: 1px solid transparent;
}
.category-pill.undergraduate {
    background: #f1f5f9;
    color: var(--primary);
    border-color: #cbd5e1;
}
.category-pill.diploma {
    background: #f0fdfa;
    color: #0f766e;
    border-color: #ccfbf1;
}
.category-pill.postgraduate {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}

/* Restrained Institutional Level Badges */
.badge-lvl {
    display: inline-flex;
    align-items: center;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 9999px;
    letter-spacing: 0.3px;
    background: #f8fafc;
    color: #334155;
    border: 1px solid #e2e8f0;
}
.badge-lvl-100 { background: #f8fafc; color: #334155; border-color: #e2e8f0; }
.badge-lvl-200 { background: #f8fafc; color: #334155; border-color: #e2e8f0; }
.badge-lvl-300 { background: #f1f5f9; color: #1e293b; border-color: #cbd5e1; }
.badge-lvl-400 { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.badge-lvl-diploma { background: #f0fdfa; color: #0f766e; border-color: #ccfbf1; }
.badge-lvl-pg { background: #f8fafc; color: #1e293b; border-color: #cbd5e1; }

/* Restrained Institutional Role Badges */
.badge-role {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.badge-role-gov { background: #1e3a8a; color: #ffffff; border: 1px solid #1e3a8a; }
.badge-role-rep { background: #f1f5f9; color: #1e293b; border: 1px solid #cbd5e1; }
.badge-role-asst { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }

/* View Mode Switcher */
.view-mode-toggle {
    display: inline-flex;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}
.view-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: background 150ms ease-out, color 150ms ease-out;
}
.view-mode-btn:active {
    transform: scale(0.97);
}
.view-mode-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ==========================================================================
   Project Supervision & Lifecycle Design System Tokens
   ========================================================================== */

/* Allocation Status Badges */
.badge-allocated {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 9999px;
}
.badge-reassigned {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 9999px;
}
.badge-unallocated {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
    font-weight: 600;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 9999px;
}

/* Project Lifecycle Badges */
.badge-proposed {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.badge-approved {
    background: #f0fdfa;
    color: #0f766e;
    border: 1px solid #ccfbf1;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.badge-in-progress {
    background: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.badge-completed {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.badge-archived {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
    font-weight: 600;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Badge Status Indicator Dots */
.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    background: currentColor;
}
.badge-dot.pulse {
    box-shadow: 0 0 0 0 rgba(30, 58, 138, 0.7);
    animation: badgePulse 2s infinite;
}
@keyframes badgePulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(30, 58, 138, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(30, 58, 138, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(30, 58, 138, 0); }
}

/* Accessible Institutional Portal Modals */
.portal-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}
.portal-modal-dialog {
    background: #ffffff;
    border-radius: var(--border-radius-md);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.portal-modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}
.portal-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 150ms ease-out, background 150ms ease-out;
}
.portal-modal-close:hover {
    color: #ef4444;
    background: #fee2e2;
}
.portal-modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Supervision Audit History Timeline */
.supervision-timeline {
    position: relative;
    padding-left: 20px;
}
.supervision-timeline::before {
    content: '';
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 6px;
    width: 2px;
    background: #e2e8f0;
}
.timeline-item {
    position: relative;
    margin-bottom: 20px;
}
.timeline-item:last-child {
    margin-bottom: 0;
}
.timeline-marker {
    position: absolute;
    left: -20px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 1px #cbd5e1;
}
.timeline-content {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 12px 14px;
}

/* Reusable Empty State Styles */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: #ffffff;
    border-radius: var(--border-radius-md);
    border: 1px dashed var(--border-color);
    box-shadow: var(--shadow-sm);
    margin: 0 auto;
    max-width: 640px;
}
.empty-state-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(30, 58, 138, 0.05);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px auto;
}
.empty-state-icon svg {
    width: 30px;
    height: 30px;
}
.empty-state-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    font-family: var(--font-heading);
}
.empty-state-text {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto 16px auto;
}
.empty-state-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.empty-state-table {
    padding: 48px 24px !important;
    text-align: center !important;
}
.empty-state-table .empty-state-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
}
.empty-state-table .empty-state-icon svg {
    width: 24px;
    height: 24px;
}
.empty-state-table .empty-state-title {
    font-size: 1.1rem;
    margin-bottom: 6px;
}
.empty-state-table .empty-state-text {
    font-size: 0.88rem;
    margin-bottom: 14px;
}

/* ==========================================================================
   FOCIT Bespoke Pop-Up Modal System (Confirmation & Alerts)
   Replaces native browser popups with production-grade modal overlays
   ========================================================================== */

.focit-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 25, 44, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 100050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.focit-modal-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.focit-modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(11, 37, 69, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.85);
    overflow: hidden;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.focit-modal-backdrop.is-visible .focit-modal-card {
    transform: scale(1) translateY(0);
}

.focit-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 24px 16px 24px;
}

.focit-modal-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.focit-modal-icon-wrap svg {
    width: 24px;
    height: 24px;
}

.focit-modal-icon-wrap.is-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.focit-modal-icon-wrap.is-warning {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}

.focit-modal-icon-wrap.is-info {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

.focit-modal-icon-wrap.is-success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.focit-modal-header-text {
    flex: 1;
    min-width: 0;
}

.focit-modal-subtitle {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 4px;
}

.focit-modal-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #0b2545;
    line-height: 1.35;
    margin: 0;
}

.focit-modal-close {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -4px;
    margin-right: -4px;
    transition: var(--transition-fast);
}

.focit-modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.focit-modal-body {
    padding: 0 24px 20px 24px;
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.6;
    white-space: pre-line;
    word-break: break-word;
}

.focit-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.focit-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 9px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.focit-modal-btn:focus {
    outline: none !important;
}

.focit-modal-cancel-btn {
    background: #ffffff;
    color: #475569;
    border-color: #cbd5e1;
}

.focit-modal-cancel-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #94a3b8;
}

.focit-modal-confirm-btn.focit-btn-danger {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

.focit-modal-confirm-btn.focit-btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.focit-modal-confirm-btn.focit-btn-warning {
    background: #d97706;
    color: #ffffff;
    border-color: #d97706;
    box-shadow: 0 2px 4px rgba(217, 119, 6, 0.2);
}

.focit-modal-confirm-btn.focit-btn-warning:hover {
    background: #b45309;
    border-color: #b45309;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

.focit-modal-confirm-btn.focit-btn-info {
    background: #0b2545;
    color: #ffffff;
    border-color: #0b2545;
    box-shadow: 0 2px 4px rgba(11, 37, 69, 0.2);
}

.focit-modal-confirm-btn.focit-btn-info:hover {
    background: #134074;
    border-color: #134074;
    box-shadow: 0 4px 12px rgba(11, 37, 69, 0.35);
}

.focit-modal-confirm-btn.focit-btn-success {
    background: #16a34a;
    color: #ffffff;
    border-color: #16a34a;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.2);
}

.focit-modal-confirm-btn.focit-btn-success:hover {
    background: #15803d;
    border-color: #15803d;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
}

/* Accessibility Skip Link */
.skip-link {
    position: absolute;
    top: -999px;
    left: 16px;
    background: var(--primary, #0b2545);
    color: #ffffff !important;
    padding: 10px 18px;
    z-index: 99999;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: top 0.15s ease-in-out;
    text-decoration: none;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid var(--accent, #f59e0b);
}

/* Cookie & Privacy Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(11, 37, 69, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    padding: 16px 0;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
    color: #f1f5f9;
    font-size: 0.88rem;
    animation: focitSlideUp 0.3s ease-out;
}

@keyframes focitSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookie-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 280px;
    line-height: 1.5;
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-banner-btn {
    padding: 8px 22px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

@media(max-width: 768px) {
    .cookie-banner {
        padding: 14px 0;
        padding-bottom: max(14px, env(safe-area-inset-bottom, 14px));
    }
    .cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 12px;
    }
    .cookie-banner-text {
        width: 100%;
        min-width: 0;
        text-align: left;
    }
    .cookie-banner-actions {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        text-align: right;
    }
    .cookie-banner-btn {
        align-self: flex-end;
        margin: 0;
    }
}

/* Breadcrumb Navigation */
.portal-breadcrumb {
    margin-bottom: 20px;
}

.portal-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.portal-breadcrumb a {
    color: var(--primary, #0b2545);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.portal-breadcrumb a:hover {
    color: var(--accent, #d97706);
    text-decoration: underline;
}

.portal-breadcrumb-sep {
    color: #94a3b8;
    user-select: none;
}

.portal-breadcrumb li[aria-current="page"] {
    color: var(--text);
    font-weight: 600;
}

/* Legal Pages (Privacy Policy, Terms, Cookies, Accessibility) */
.legal-page-container {
    max-width: 960px;
    margin: 0 auto;
    padding-top: 28px;
    padding-bottom: 56px;
}

.legal-card {
    background: #ffffff;
    border-radius: var(--border-radius-md);
    padding: 36px 32px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    line-height: 1.75;
    color: var(--text);
}

.legal-card section {
    margin-bottom: 24px;
}

.legal-card section:last-child {
    margin-bottom: 0;
}

.legal-card h2 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 700;
}

.legal-card p {
    margin-bottom: 14px;
    color: var(--text);
}

.legal-card p:last-child {
    margin-bottom: 0;
}

.legal-card ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

.legal-card li {
    margin-bottom: 6px;
}

.legal-contact-box {
    background: #f8fafc;
    padding: 18px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 0.92rem;
    border: 1px solid var(--border-color);
    word-break: break-word;
    overflow-wrap: break-word;
}

@media(max-width: 768px) {
    .legal-page-container {
        padding-top: 20px;
        padding-bottom: 40px;
    }
    .legal-card {
        padding: 22px 18px;
        border-radius: var(--border-radius-sm);
        line-height: 1.65;
    }
    .legal-card h2 {
        font-size: 1.15rem;
        margin-bottom: 8px;
    }
    .legal-card ul {
        padding-left: 18px;
    }
    .legal-contact-box {
        padding: 14px 16px;
        font-size: 0.88rem;
    }
}

@media(max-width: 480px) {
    .legal-card {
        padding: 18px 14px;
    }
    .legal-card h2 {
        font-size: 1.08rem;
    }
    .legal-contact-box {
        padding: 12px 12px;
    }
}



