/* ==========================================  
   1. GLOBAL VARIABLES & RESET  
   ========================================== */  
:root {  
    --bg-dark: #000b18;  
    --card-bg: #021329;  
    --card-border: #0A2540;  
    --gold-accent: #C5A059;  
    --gold-glow: #D4AF37;  
    --text-main: #FFFFFF;  
    --text-muted: #A0AEC0;  
    --font-sans: 'Montserrat', sans-serif;  
    --font-script: 'Playfair Display', serif;  
}  
  
* {  
    margin: 0;  
    padding: 0;  
    box-sizing: border-box;  
    scrollbar-width: thin;  
    scrollbar-color: #30363d #0d1117;  
}  
  
html, body {  
    width: 100%;  
    height: 100%;  
    background-color: var(--bg-dark);  
    color: var(--text-main);  
    font-family: var(--font-sans);  
    line-height: 1.6;  
}  
  
/* Custom Scrollbars */  
::-webkit-scrollbar {  
    width: 8px;  
    height: 8px;  
}  
::-webkit-scrollbar-track {  
    background: #0d1117;  
}  
::-webkit-scrollbar-thumb {  
    background: #30363d;  
    border-radius: 4px;  
}  
::-webkit-scrollbar-thumb:hover {  
    background: #1d9bf0;  
}  
  
/* ==========================================  
   2. AUTHENTICATION & LANDING LAYOUT  
   ========================================== */  
#loggedOutView {  
    width: 100%;  
    height: 100vh;  
    display: block !important;  
    padding: 20px 40px;  
    overflow-y: auto;  
    background-color: var(--bg-dark);  
    position: relative;  
    z-index: 1;  
}  
  
#LoggedInView {  
    width: 100%;  
    height: 100vh;  
    overflow: hidden;  
    display: none !important;  
    position: absolute;  
    top: 0;  
    left: 0;  
    z-index: 10;  
}  
  
#LoggedInView[style*="display: flex"] {  
    display: flex !important;  
}  
  
.master-layout {  
    display: grid;  
    grid-template-columns: 73% 25%;  
    gap: 2%;  
    max-width: 1600px;  
    margin: 0 auto;  
}  
  
.site-header {  
    display: flex;  
    justify-content: space-between;  
    align-items: center;  
    padding: 20px 0 30px 0;  
    max-width: 1600px;  
    margin: 0 auto 20px auto;  
    border-bottom: 1px solid #0a2549;  
}  
  
.logo-area {  
    display: flex;  
    align-items: center;  
    gap: 15px;  
}  
  
.header-logo {  
    height: 50px;  
    width: auto;  
    object-fit: contain;  
}  
  
.nav-menu {  
    display: flex;  
    list-style: none;  
    gap: 30px;  
}  
  
.nav-menu a {  
    text-decoration: none;  
    color: var(--text-muted);  
    font-size: 0.85rem;  
    font-weight: 600;  
    text-transform: uppercase;  
    transition: color 0.3s ease;  
}  
  
.nav-menu a:hover {  
    color: var(--gold-glow);  
}  
  
.hero-section {  
    background: linear-gradient(135deg, rgba(2, 19, 41, 0.85) 0%, 
rgba(1, 10, 24, 0.95) 100%),  
    url('unilag front gate pic.avif') no-repeat center center / cover;  
    border: 1px solid var(--card-border);  
    border-radius: 12px;  
    padding: 40px;  
    margin-bottom: 30px;  
}  
  
.hero-text h1 {  
    font-size: 3.5rem;  
    font-weight: 700;  
    letter-spacing: 1px;  
    color: var(--gold-glow);  
    margin-bottom: 5px;  
}  
  
.hero-text h2 {  
    font-size: 1.4rem;  
    font-weight: 300;  
    letter-spacing: 2px;  
    color: var(--text-main);  
}  
  
.hero-text h3 {  
    font-size: 1.1rem;  
    font-weight: 400;  
    color: var(--text-muted);  
    text-transform: uppercase;  
}  
  
.hero-text hr {  
    border: none;  
    height: 1px;  
    background-color: var(--card-border);  
    margin: 15px 0;  
    width: 50%;  
}  
  
.branding-statement {  
    color: var(--gold-accent);  
    font-weight: 600;  
    letter-spacing: 1.5px;  
    font-size: 0.9rem;  
    text-transform: uppercase;  
}  
  
.info-grid {  
    display: grid;  
    grid-template-columns: 1fr;  
    gap: 20px;  
}  
  
.info-card, .sidebar-card {  
    background-color: var(--card-bg);  
    border: 1px solid var(--card-border);  
    border-radius: 8px;  
    padding: 25px;  
}  
  
.info-card h3 {  
    color: var(--gold-accent);  
    font-size: 1.1rem;  
    margin-bottom: 15px;  
    border-bottom: 1px solid var(--card-border);  
    padding-bottom: 8px;  
}  
  
.info-card p, .login-card p {  
    color: var(--text-muted);  
    font-size: 0.85rem;  
    line-height: 1.5;  
}  
  
.login-card h3 {  
    font-size: 1.1rem;  
    color: var(--gold-glow);  
    margin-bottom: 10px;  
}  
  
.input-group {  
    position: relative;  
    margin-bottom: 15px;  
}  
  
.input-group input {  
    width: 100%;  
    padding: 12px;  
    background-color: rgba(0, 11, 24, 0.6);  
    border: 1px solid var(--card-border);  
    border-radius: 4px;  
    color: var(--text-main);  
    font-size: 0.85rem;  
    outline: none;  
}  
  
.input-group input:focus {  
    border-color: var(--gold-accent);  
}  
  
.btn-primary {  
    width: 100%;  
    padding: 10px 20px;  
    background-color: #1d9bf0;  
    color: #ffffff;  
    border: none;  
    border-radius: 6px;  
    font-weight: 600;  
    font-size: 0.9rem;  
    cursor: pointer;  
    transition: background 0.2s ease;  
}  
  
.btn-primary:hover {  
    background-color: #1a8cd8;  
}  
  
.btn-outline {  
    background: transparent;  
    border: 1px solid rgba(255, 255, 255, 0.2);  
    color: var(--text-main);  
    padding: 8px 16px;  
    border-radius: 8px;  
    font-size: 0.85rem;  
    font-weight: 600;  
    cursor: pointer;  
    transition: all 0.2s ease;  
}  
  
.btn-outline:hover {  
    background: rgba(255, 255, 255, 0.1);  
    border-color: #1d9bf0;  
    color: #1d9bf0;  
}  
  
.auth-divider {  
    display: flex;  
    align-items: center;  
    text-align: center;  
    margin: 20px 0;  
    color: #a0aec0;  
    font-size: 0.85rem;  
}  
  
.auth-divider::before, .auth-divider::after {  
    content: '';  
    flex: 1;  
    border-bottom: 1px solid #2d3748;  
}  
  
.auth-divider span {  
    padding: 0 10px;  
}  
  
.btn-google {  
    display: flex;  
    align-items: center;  
    justify-content: center;  
    gap: 12px;  
    width: 100%;  
    padding: 12px;  
    background-color: #ffffff;  
    color: #1a202c;  
    font-weight: 600;  
    border: none;  
    border-radius: 6px;  
    cursor: pointer;  
}  
  
.btn-google img {  
    width: 18px;  
    height: 18px;  
}  
  
.error-text {  
    color: #e53e3e;  
    font-size: 0.85rem;  
    margin-bottom: 10px;  
    display: none;  
}  
  
.site-footer {  
    max-width: 1600px;  
    margin: 50px auto 0 auto;  
    border-top: 1px solid var(--card-border);  
    padding: 30px 0;  
    display: flex;  
    justify-content: space-between;  
    align-items: center;  
}  
  
/* ==========================================  
   3. LOGGED-IN DASHBOARD BASE STYLES  
   ========================================== */  
.dashboard-layout-wrapper {  
    display: flex !important;  
    flex-direction: row !important;  
    flex-wrap: nowrap;  
    justify-content: flex-start;  
    align-items: stretch;  
    min-height: 100vh;  
    width: 100%;  
    background: #020812;  
}  
  
.dashboard-sidebar {  
    flex: 0 0 280px;  
    width: 280px;  
    min-width: 280px;  
    background: linear-gradient(180deg, #041121 0%, #02080f 100%);  
    border-right: 1px solid rgba(255,255,255,0.05);  
    padding: 28px 20px;  
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.35);  
    height: 100vh;  
    display: flex;  
    flex-direction: column;  
    overflow-y: auto;  
    z-index: 100;  
}  
  
.sidebar-branding {  
    display: flex;  
    align-items: center;  
    gap: 14px;  
    margin-bottom: 28px;  
}  
  
.sidebar-logo-img {  
    width: 48px;  
    height: 48px;  
    object-fit: cover;  
    border-radius: 14px;  
    border: 1px solid rgba(255,255,255,0.08);  
    background: rgba(255,255,255,0.05);  
}  
  
.branding-text h3 {  
    font-size: 0.95rem;  
    color: #eef4ff;  
    margin-bottom: 4px;  
}  
  
.branding-text p {  
    font-size: 0.78rem;  
    color: #8fa5c3;  
}  
  
.sidebar-section-title {  
    font-size: 0.72rem;  
    font-weight: 700;  
    letter-spacing: 1.8px;  
    text-transform: uppercase;  
    color: #4f8bff;  
    margin: 24px 0 14px;  
}  
  
.sidebar-grid-menu {  
    display: flex;  
    flex-direction: column;  
    gap: 10px;  
}  
  
.sidebar-grid-menu .menu-item {  
    display: flex;  
    align-items: center;  
    gap: 14px;  
    padding: 14px 16px;  
    border-radius: 16px;  
    color: #c8d5f7;  
    font-size: 0.95rem;  
    cursor: pointer;  
    transition: background 0.2s ease, color 0.2s ease;  
}  
  
.sidebar-grid-menu .menu-item.active {  
    background: rgba(79, 139, 255, 0.16);  
    color: #ffffff;  
    border-left: 4px solid #4f8bff;  
    padding-left: 12px;  
}  
  
.sidebar-grid-menu .menu-item:hover {  
    background: rgba(255,255,255,0.05);  
    color: #ffffff;  
}  
  
.logout-action-btn {  
    display: flex;  
    align-items: center;  
    gap: 12px;  
    width: 100%;  
    padding: 14px 16px;  
    margin: 24px 0 10px;  
    border-radius: 16px;  
    border: 1px solid rgba(255, 89, 102, 0.24);  
    background: rgba(255, 89, 102, 0.08);  
    color: #ff8ea2;  
    font-weight: 700;  
    cursor: pointer;  
}  
  
.dashboard-main {  
    flex: 1 1 auto;  
    width: calc(100% - 280px);  
    padding: 28px 32px;  
    background: linear-gradient(180deg, #020a12 0%, #020511 100%);  
    display: flex;  
    flex-direction: column;  
    height: 100%;  
    min-width: 0;  
    overflow: hidden;  
}  
  
.dashboard-top-nav {  
    display: flex;  
    justify-content: space-between;  
    align-items: center;  
    padding: 18px 0;  
    border-bottom: 1px solid rgba(255,255,255,0.08);  
    width: 100%;  
}  
 
.welcome-greeting p { 
    font-size: 0.85rem; 
    color: var(--text-muted); 
} 
 
.welcome-greeting h2 { 
    font-size: 1.4rem; 
    color: var(--text-main); 
    display: block;
    line-height: 1.25;
    overflow-wrap: anywhere; 
} 
 
.verified-badge-icon {  
    color: #1d9bf0;  
    font-size: 0.9em;
    margin-left: 6px;
    vertical-align: baseline;  
}  
  
.menu-toggle-btn {  
    display: none;  
    background: rgba(255, 255, 255, 0.05);  
    border: 1px solid rgba(255, 255, 255, 0.12);  
    color: var(--text-main);  
    font-size: 1.2rem;  
    padding: 10px 14px;  
    border-radius: 12px;  
    cursor: pointer;  
}  
  
.sidebar-overlay {  
    display: none;  
    position: fixed;  
    top: 0;  
    left: 0;  
    width: 100vw;  
    height: 100vh;  
    background: rgba(0, 0, 0, 0.65);  
    backdrop-filter: blur(4px);  
    z-index: 99;  
}  
  
.dashboard-scroll-content {  
    flex: 1;  
    overflow-y: auto;  
    overflow-x: hidden;  
    width: 100%;  
    padding-top: 20px; 
}  
  
  
  
.hero-panel-content h1 {  
    font-size: 3.2rem;  
    font-weight: 800;  
    color: #ffffff;  
}  
 
.highlight-title { 
    color: var(--gold-glow); 
} 
 
.hero-panel-tagline { 
    color: #cbd5e1; 
    font-size: 1.05rem; 
    margin-top: 6px; 
    font-weight: 500; 
} 
  
.hero-status-pills {  
    display: flex;  
    flex-wrap: wrap;  
    gap: 12px;  
    margin-top: 22px;  
}  
  
.status-pill {  
    display: flex;  
    align-items: center;  
    gap: 8px;  
    padding: 10px 18px;  
    background: rgba(255, 255, 255, 0.12);  
    border: 1px solid rgba(255, 255, 255, 0.22);  
    border-radius: 12px;  
    font-size: 0.88rem;  
    color: #ffffff;  
    font-weight: 600; 
    backdrop-filter: blur(4px); 
}  
  
.status-pill i {  
    color: var(--gold-glow);  
}  
  
.data-matrix-grid {  
    display: grid;  
    grid-template-columns: 62% 38%;  
    gap: 22px;  
    padding: 32px 0 40px 0;  
    width: 100%;  
}  
  
.matrix-card {  
    background: rgba(255,255,255,0.03);  
    border: 1px solid rgba(255,255,255,0.08);  
    border-radius: 24px;  
    padding: 28px;  
    margin-bottom: 20px; 
}  
 
.matrix-title { 
    font-size: 1.1rem; 
    color: var(--gold-glow); 
    margin-bottom: 18px; 
    letter-spacing: 0.5px; 
}  
  
.quick-access-box-grid {  
    display: grid;  
    grid-template-columns: repeat(3, minmax(0, 1fr));  
    gap: 16px;  
}  
  
.access-box {  
    background: rgba(255,255,255,0.03);  
    border: 1px solid rgba(255,255,255,0.08);  
    border-radius: 18px;  
    height: 120px;  
    display: flex;  
    flex-direction: column;  
    align-items: center;  
    justify-content: center;  
    gap: 12px;  
    cursor: pointer;  
    transition: transform 0.2s, border-color 0.2s; 
}  
 
.access-box:hover { 
    transform: translateY(-3px); 
    border-color: var(--gold-accent); 
} 
  
.access-box i {  
    font-size: 1.5rem;  
    color: #2563eb;  
}  
 
/* ==========================================  
   4. USER AVATAR & PROFILE MODAL  
   ========================================== */  
.user-avatar-circle {  
    width: 44px;  
    height: 44px;  
    min-width: 44px; 
    min-height: 44px; 
    max-width: 44px; 
    max-height: 44px; 
    border-radius: 50%;  
    border: 2px solid var(--gold-glow);  
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);  
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    overflow: hidden !important; 
    position: relative; 
    cursor: pointer;  
    background: rgba(255, 255, 255, 0.08); 
    flex-shrink: 0; 
}  
 
.user-avatar-circle img, 
#userAvatarImg, 
.user-avatar-img, 
.profile-pic {  
    width: 100% !important;  
    height: 100% !important;  
    max-width: 100% !important; 
    max-height: 100% !important; 
    border-radius: 50% !important;  
    object-fit: cover !important;  
    object-position: center !important;  
    display: block; 
}  
 
.user-avatar-circle i, 
#userAvatarIcon { 
    font-size: 1.2rem; 
    color: #ffffff; 
    margin: 0; 
    line-height: 1; 
} 
 
.enlarged-avatar-box {  
    width: 80px !important;  
    height: 80px !important;  
    min-width: 80px; 
    min-height: 80px; 
    max-width: 80px; 
    max-height: 80px; 
    border-radius: 50% !important;  
    background: rgba(255, 255, 255, 0.08);  
    border: 2px solid var(--gold-glow);  
    display: flex !important;  
    align-items: center !important;  
    justify-content: center !important;  
    margin: 0 auto 12px auto !important;  
    overflow: hidden !important;  
    position: relative; 
    flex-shrink: 0; 
}  
 
.enlarged-avatar-box img, 
#enlargedAvatarImg { 
    width: 100% !important; 
    height: 100% !important; 
    max-width: 100% !important; 
    max-height: 100% !important; 
    object-fit: cover !important; 
    object-position: center !important; 
    border-radius: 50% !important; 
} 
 
.enlarged-avatar-box i, 
#enlargedAvatarIcon {  
    font-size: 2.2rem;  
    color: var(--gold-glow);  
    margin: 0; 
    line-height: 1; 
}  
 
.profile-modal-overlay {  
    position: fixed;  
    top: 0;  
    left: 0;  
    width: 100vw;  
    height: 100vh;  
    background: rgba(0, 0, 0, 0.75);  
    backdrop-filter: blur(8px);  
    display: flex;  
    align-items: center;  
    justify-content: center;  
    z-index: 10000;  
}  
 
  
 
.profile-modal-close-btn {  
    position: absolute;  
    top: 14px;  
    right: 14px;  
    background: rgba(255, 255, 255, 0.1);  
    border: none;  
    color: #94a3b8;  
    width: 28px;  
    height: 28px;  
    border-radius: 50%;  
    cursor: pointer;  
    display: flex;  
    align-items: center;  
    justify-content: center;  
    transition: background 0.2s, color 0.2s;  
}  
 
.profile-modal-close-btn:hover {  
    background: rgba(255, 255, 255, 0.2);  
    color: #ffffff;  
}  
 
.profile-modal-header {  
    display: flex;  
    flex-direction: column;  
    align-items: center;  
    text-align: center;  
    width: 100%; 
}  
 
.profile-modal-header h3 {  
    margin: 4px 0 2px 0;
}  
 
.profile-modal-header p {  
    margin: 0;
}  
 
  
 
  
 
.profile-modal-actions .dropdown-btn:hover {  
    background: rgba(255, 255, 255, 0.15);  
}  
 
  
 
  
 
/* ==========================================  
   5. ACADEMIC CALENDAR & CURRENT DAY HIGHLIGHT 
   ========================================== */  
.calendar-wrapper-card { 
    display: flex; 
    flex-direction: column; 
} 
 
.calendar-header-row {  
    display: flex;  
    justify-content: space-between;  
    align-items: center;  
    margin-bottom: 16px;  
}  
 
.calendar-top-link { 
    font-size: 0.8rem; 
    color: #1d9bf0; 
    text-decoration: none; 
    font-weight: 600; 
} 
 
.calendar-month-selector {  
    display: flex;  
    justify-content: space-between;  
    align-items: center;  
    padding: 10px 14px;  
    background: rgba(255, 255, 255, 0.04);  
    border: 1px solid rgba(255, 255, 255, 0.08);  
    border-radius: 12px;  
    margin-bottom: 16px;  
    font-weight: 600;  
    font-size: 0.9rem; 
}  
 
.calendar-month-selector i {  
    cursor: pointer;  
    padding: 6px 10px;  
    color: #8fa5c3;  
    transition: color 0.2s;  
}  
 
.calendar-month-selector i:hover {  
    color: #ffffff;  
}  
 
.calendar-grid-days {  
    display: grid !important;  
    grid-template-columns: repeat(7, 1fr) !important;  
    gap: 6px !important;  
    text-align: center !important;  
    margin-bottom: 18px !important;  
    width: 100% !important;  
}  
 
.calendar-day-header {  
    font-size: 0.72rem;  
    font-weight: 700;  
    color: var(--text-muted);  
    padding-bottom: 6px;  
    text-transform: uppercase;  
}  
 
.calendar-day-num {  
    padding: 8px 2px;  
    font-size: 0.85rem;  
    border-radius: 50%;  
    cursor: pointer;  
    transition: all 0.2s ease;  
    position: relative;  
    color: #e2e8f0; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 32px; 
    height: 32px; 
    margin: 0 auto; 
}  
 
.calendar-day-num:hover {  
    background: rgba(255, 255, 255, 0.15);  
}  
 
/* High Contrast Current Day Highlight */ 
.calendar-day-num.today, 
.calendar-day-num.active-day, 
.calendar-day-num.current-day {  
    background: #C5A059 !important;  
    color: #000b18 !important;  
    font-weight: 800 !important;  
    box-shadow: 0 0 12px rgba(197, 160, 89, 0.7) !important; 
    border: 1px solid #ffffff !important; 
}  
 
.calendar-day-num.has-event::after {  
    content: '';  
    position: absolute;  
    bottom: 2px;  
    left: 50%;  
    transform: translateX(-50%);  
    width: 4px;  
    height: 4px;  
    border-radius: 50%;  
    background: #1d9bf0;  
}  
 
.calendar-focused-event-card {  
    background: rgba(255, 255, 255, 0.04);  
    border: 1px solid rgba(255, 255, 255, 0.08);  
    border-radius: 16px;  
    padding: 16px;  
}  
 
.focused-event-title-row {  
    display: flex;  
    justify-content: space-between;  
    align-items: center;  
    margin-bottom: 8px;  
}  
 
.blue-indicator-dot {  
    display: inline-block;  
    width: 8px;  
    height: 8px;  
    border-radius: 50%;  
    background: #1d9bf0;  
    margin-right: 6px;  
}  
 
.view-all-events-btn {  
    display: inline-block;  
    margin-top: 10px;  
    font-size: 0.8rem;  
    color: #1d9bf0;  
    text-decoration: none;  
    font-weight: 600;  
}  
 
/* ==========================================  
   6. SEARCH BARS & INPUT FIXES  
   ========================================== */  
.search-input-box,  
.admin-search-wrapper,  
.gpa-lookup-bar {  
    position: relative !important;  
    display: flex !important;  
    align-items: center !important;  
    width: 100% !important;  
    max-width: 400px !important;  
    gap: 10px;  
}  
 
.search-input-box i,  
.admin-search-wrapper i,  
.search-icon {  
    position: absolute !important;  
    left: 14px !important;  
    top: 50% !important;  
    transform: translateY(-50%) !important;  
    color: #8fa5c3 !important;  
    font-size: 0.9rem !important;  
    pointer-events: none !important;  
    z-index: 5 !important;  
}  
 
.search-input-box input,  
.admin-search-wrapper input,  
#studentSearchInput,  
#duesAdminSearchInput,  
#gpaMatricLookupInput {  
    width: 100% !important;  
    padding: 10px 14px 10px 38px !important;  
    background: rgba(255, 255, 255, 0.05) !important;  
    border: 1px solid rgba(255, 255, 255, 0.15) !important;  
    border-radius: 10px !important;  
    color: #ffffff !important;  
    font-size: 0.85rem !important;  
    outline: none !important;  
    transition: all 0.2s ease !important;  
}  
 
#gpaMatricLookupInput {  
    padding-left: 14px !important;  
}  
 
.search-input-box input:focus,  
.admin-search-wrapper input:focus,  
#studentSearchInput:focus,  
#duesAdminSearchInput:focus,  
#gpaMatricLookupInput:focus {  
    border-color: #1d9bf0 !important;  
    box-shadow: 0 0 10px rgba(29, 155, 240, 0.3) !important;  
}  
 
/* ==========================================  
   7. DUES SUMMARY & ADMIN PAYMENT MANAGER  
   ========================================== */  
.gpa-summary-card {  
    display: flex;  
    justify-content: space-between;  
    align-items: center;  
    flex-wrap: wrap;  
    gap: 20px;  
    margin-bottom: 24px;  
}  
 
.gpa-info .gpa-label {  
    font-size: 0.78rem;  
    font-weight: 700;  
    letter-spacing: 1px;  
    color: var(--gold-glow);  
    text-transform: uppercase;  
}  
 
.gpa-info .gpa-value {  
    font-size: 2.2rem;  
    font-weight: 800;  
    margin: 4px 0;  
}  
 
.gpa-status {  
    font-size: 0.85rem;  
    font-weight: 600;  
    display: flex;  
    align-items: center;  
    gap: 6px;  
}  
 
.status-pending { color: #ff4d4d !important; }  
.status-cleared { color: #4ade80 !important; }  
 
.gpa-stats {  
    display: flex;  
    gap: 16px;  
}  
 
.stat-badge {  
    background: rgba(255, 255, 255, 0.05);  
    border: 1px solid rgba(255, 255, 255, 0.1);  
    padding: 10px 16px;  
    border-radius: 12px;  
    display: flex;  
    flex-direction: column;  
    align-items: center;  
}  
 
.stat-badge span {  
    font-size: 0.72rem;  
    color: var(--text-muted);  
    text-transform: uppercase;  
}  
 
.stat-badge strong {  
    font-size: 1rem;  
    color: var(--text-main);  
}  
 
.admin-fees-card {  
    margin-bottom: 24px;  
}  
 
.card-description {  
    color: var(--text-muted);  
    font-size: 0.85rem;  
    margin-bottom: 16px;  
}  
 
/* ==========================================  
   8. TABLES & TIMETABLE DAY SEPARATORS  
   ========================================== */  
.table-header-row {  
    display: flex;  
    justify-content: space-between;  
    align-items: center;  
    margin-bottom: 20px;  
    flex-wrap: wrap; 
    gap: 12px; 
}  
  
.table-responsive {  
    width: 100%;  
    max-height: 65vh;  
    overflow-y: auto;  
    overflow-x: auto;  
    border-radius: 12px;  
}  
  
.data-table, .dashboard-table, .timetable-table {  
    width: 100%;  
    border-collapse: collapse;  
    text-align: left;  
    font-size: 0.88rem;  
}  
  
.data-table th, .dashboard-table th, .timetable-table th {  
    position: sticky;  
    top: 0;  
    background: #041326;  
    color: #8b949e;  
    font-weight: 600;  
    z-index: 2;  
    padding: 12px 16px;  
    border-bottom: 2px solid #21262d;  
}  
  
.data-table td, .dashboard-table td, .timetable-table td {  
    padding: 14px 16px;  
    color: #e2e8f0;  
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);  
    vertical-align: middle;  
}  
 
/* Distinct Separator Line Between Different Days of the Week */ 
.timetable-table tr.day-divider td, 
.timetable-table tr.day-start td, 
.timetable-table td.day-cell, 
.day-divider td {  
    border-top: 3px solid var(--gold-accent) !important;  
}  
 
.timetable-table .day-cell {  
    font-weight: 700;  
    color: var(--gold-glow);  
    background: rgba(255, 255, 255, 0.03);  
    vertical-align: middle;  
    border-right: 1px solid rgba(255, 255, 255, 0.1);  
}  
 
.time-cell {  
    font-weight: 600;  
    color: #1d9bf0;  
    white-space: nowrap;  
}  
 
.course-code-tag {  
    font-weight: 700;  
    color: var(--gold-glow);  
}  
 
.online-tag {  
    background: rgba(74, 222, 128, 0.2);  
    color: #4ade80;  
    padding: 3px 8px;  
    border-radius: 6px;  
    font-size: 0.75rem;  
    font-weight: 600;  
}  
 
.course-code-badge {  
    background: rgba(197, 160, 89, 0.18);  
    color: var(--gold-glow);  
    padding: 4px 10px;  
    border-radius: 8px;  
    font-weight: 700;  
    font-size: 0.82rem;  
}  
  
.total-units-badge {  
    background: rgba(79, 139, 255, 0.16);  
    border: 1px solid rgba(79, 139, 255, 0.3);  
    color: #7aa5ff;  
    padding: 6px 14px;  
    border-radius: 12px;  
    font-size: 0.85rem;  
    font-weight: 600;  
}  
  
.grade-badge {  
    display: inline-block;  
    padding: 4px 10px;  
    border-radius: 12px;  
    font-size: 0.78rem;  
    font-weight: 700;  
    text-align: center;  
}  
  
.grade-a { background: rgba(74, 222, 128, 0.2); color: #4ade80; }  
.grade-b { background: rgba(79, 139, 255, 0.2); color: #4f8bff; }  
 
/* Results Grid Cards */ 
.results-grid {  
    display: grid;  
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));  
    gap: 16px;  
}  
 
.result-card {  
    background: rgba(255, 255, 255, 0.03);  
    border: 1px solid rgba(255, 255, 255, 0.08);  
    border-radius: 16px;  
    padding: 18px;  
    cursor: pointer;  
    transition: all 0.2s ease;  
}  
 
.result-card:hover {  
    border-color: var(--gold-accent);  
    transform: translateY(-2px);  
}  
 
.result-card-header {  
    display: flex;  
    justify-content: space-between;  
    align-items: center;  
    margin-bottom: 12px;  
}  
 
.result-card h4, .result-card p {  
    font-size: 0.9rem;  
    font-weight: 600;  
    margin-bottom: 14px;  
}  
 
.result-card-footer {  
    display: flex;  
    justify-content: space-between;  
    align-items: center;  
    font-size: 0.78rem;  
    color: var(--text-muted);  
}  
 
.view-score-link {  
    color: #1d9bf0;  
    font-weight: 600;  
}  
  
/* GPA Calculator Card */  
.gpa-calculator-card {  
    background: #161b22;  
    border: 1px solid #21262d;  
    border-radius: 12px;  
    padding: 20px;  
    margin-top: 20px;  
    color: #e2e8f0;  
}  
  
.custom-select, .grade-select {  
    width: 100%;  
    background: #0d1117;  
    border: 1px solid #30363d;  
    color: #f0f6fc;  
    padding: 8px 12px;  
    border-radius: 6px;  
    font-size: 0.85rem;  
    outline: none;  
}  
  
/* ==========================================  
   9. FLOATING BUTTON & TOASTS  
   ========================================== */  
#tb-fab {  
    position: fixed;  
    bottom: 28px;  
    right: 28px;  
    z-index: 9999;  
    width: 64px;  
    height: 64px;  
    border-radius: 50%;  
    background: linear-gradient(135deg, #C5A059, #D4AF37);  
    box-shadow: 0 4px 24px rgba(197,160,89,0.55);  
    display: flex;  
    flex-direction: column;  
    align-items: center;  
    justify-content: center;  
    cursor: pointer;  
    text-decoration: none;  
    transition: transform 0.2s, box-shadow 0.2s;  
}  
  
#tb-fab:hover {  
    transform: scale(1.09);  
    box-shadow: 0 6px 32px rgba(197,160,89,0.75);  
}  
  
.tb-fab-logo {  
    font-size: 18px;  
    font-weight: 900;  
    color: #000b18;  
}  
  
.tb-fab-sub {  
    font-size: 8px;  
    font-weight: 700;  
    color: #000b18;  
    letter-spacing: 0.5px;  
}  
 
/* ==========================================  
   10. LIGHT THEME OVERRIDES (HIGH CONTRAST)  
   ========================================== */  
body.light-theme {  
    --bg-dark: #f0f4f8;  
    --card-bg: #ffffff;  
    --card-border: #cbd5e1;  
    --text-main: #000b18;  
    --text-muted: #475569;  
    background-color: #f0f4f8 !important;  
    color: #000b18 !important;  
}  
 
body.light-theme #loggedOutView,  
body.light-theme .dashboard-main,  
body.light-theme .dashboard-layout-wrapper {  
    background: #f0f4f8 !important;  
    color: #000b18 !important;  
}  
 
body.light-theme .dashboard-sidebar {  
    background: #ffffff !important;  
    border-right-color: #cbd5e1 !important;  
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.06) !important;  
}  
 
  
 
body.light-theme .hero-panel-content h1 {  
    color: #0f172a !important;  
}  
 
body.light-theme .hero-panel-content .highlight-title {  
    color: #b45309 !important;  
}  
 
body.light-theme .hero-panel-tagline {  
    color: #334155 !important;  
    font-weight: 600 !important;  
}  
 
body.light-theme .status-pill {  
    background: #ffffff !important;  
    border: 1px solid #cbd5e1 !important;  
    color: #0f172a !important;  
font-weight: 700 !important;  
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;  
}  
body.light-theme .status-pill i {  
color: #0284c7 !important;  
}  
body.light-theme .matrix-card,  
body.light-theme .info-card,  
body.light-theme .sidebar-card,  
body.light-theme .access-box,  
body.light-theme .gpa-calculator-card,  
body.light-theme .result-card,  
body.light-theme .profile-modal-card,  
body.light-theme .stat-badge, 
body.light-theme .calendar-month-selector,  
body.light-theme .calendar-focused-event-card,  
body.light-theme .accordion-course-item,  
body.light-theme .topic-expandable {  
background: #ffffff !important;  
border-color: #cbd5e1 !important;  
color: #000b18 !important;  
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;  
}  
body.light-theme .branding-text h3,  
body.light-theme .welcome-greeting h2,  
body.light-theme .table-header-row h3,  
body.light-theme .focused-event-title-row h4,  
body.light-theme .profile-modal-header h3,  
body.light-theme .card-description,  
body.light-theme .stat-badge strong, 
body.light-theme strong,  
body.light-theme h1,  
body.light-theme h2,  
body.light-theme h3,  
body.light-theme h4 {  
color: #000b18 !important;  
}  
body.light-theme .branding-text p,  
body.light-theme .welcome-greeting p,  
body.light-theme .text-muted,  
body.light-theme .calendar-day-header, 
body.light-theme .profile-modal-header p {  
color: #475569 !important;  
}  
 
/* Calendar Numbers & Current Day in Light Mode */ 
body.light-theme .calendar-day-num {  
    color: #0f172a !important;  
    font-weight: 600; 
}  
 
body.light-theme .calendar-day-num:hover {  
    background: #e2e8f0 !important;  
}  
 
body.light-theme .calendar-day-num.today, 
body.light-theme .calendar-day-num.active-day, 
body.light-theme .calendar-day-num.current-day {  
    background: #0284c7 !important;  
    color: #ffffff !important;  
    font-weight: 800 !important;  
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4) !important; 
}  
 
body.light-theme .sidebar-grid-menu .menu-item {  
    color: #1e293b !important;  
}  
 
body.light-theme .sidebar-grid-menu .menu-item:hover {  
    background: #f1f5f9 !important;  
    color: #000b18 !important;  
}  
 
body.light-theme .sidebar-grid-menu .menu-item.active {  
    background: rgba(197, 160, 89, 0.15) !important;  
    color: var(--gold-accent) !important;  
    border-left-color: var(--gold-accent) !important;  
}  
 
body.light-theme .data-table th,  
body.light-theme .dashboard-table th,  
body.light-theme .timetable-table th, 
body.light-theme .gpa-table th {  
    background: #e2e8f0 !important;  
    color: #000b18 !important;  
    border-bottom: 2px solid #cbd5e1 !important;  
}  
 
body.light-theme .data-table td,  
body.light-theme .dashboard-table td,  
body.light-theme .timetable-table td, 
body.light-theme .gpa-table td {  
    color: #1e293b !important;  
    border-bottom-color: #e2e8f0 !important;  
}  
 
/* Timetable Day Separator Line (Light Mode) */ 
body.light-theme .timetable-table tr.day-divider td, 
body.light-theme .timetable-table tr.day-start td, 
body.light-theme .timetable-table td.day-cell, 
body.light-theme .day-divider td {  
    border-top: 3px solid #0284c7 !important;  
}  
 
body.light-theme .timetable-table .day-cell {  
    background: #f8fafc !important;  
    border-right-color: #cbd5e1 !important;  
    color: #0284c7 !important; 
}  
 
body.light-theme .btn-outline {  
    border-color: #cbd5e1 !important;  
    color: #000b18 !important;  
}  
 
body.light-theme .btn-outline:hover {  
    background: #e2e8f0 !important;  
}  
 
body.light-theme .custom-select,  
body.light-theme .grade-select,  
body.light-theme input {  
    background: #ffffff !important;  
    border-color: #cbd5e1 !important;  
    color: #000b18 !important;  
}  
 
body.light-theme .user-avatar-circle,  
body.light-theme .enlarged-avatar-box {  
    background: #e2e8f0 !important;  
    border-color: var(--gold-accent) !important;  
}  
 
body.light-theme .user-avatar-circle i,  
body.light-theme .enlarged-avatar-box i {  
    color: #000b18 !important;  
}  
 
/* Landing hero: dark photo overlay in BOTH themes, so keep its text light
   (the global light-theme heading rule above made it near-black and unreadable). */
body.light-theme .hero-text h1 { color: var(--gold-glow) !important; }
body.light-theme .hero-text h2 { color: #ffffff !important; }
body.light-theme .hero-text h3 { color: #cbd5e1 !important; }
body.light-theme .hero-text hr { background-color: rgba(255, 255, 255, 0.55); }

/* Preserve Gold Accent Branding in Light Mode */  
body.light-theme .course-code-tag,  
body.light-theme .branding-statement,  
body.light-theme .course-code-badge,  
body.light-theme .matrix-title,  
body.light-theme .tb-fab-logo,  
body.light-theme .tb-fab-sub,  
body.light-theme #tb-fab {  
    color: var(--gold-accent);  
}  
 
/* ==========================================  
   11. MEDIA QUERIES & RESPONSIVE LAYOUTS  
   ========================================== */  
@media (max-width: 1024px) {  
    .dashboard-layout-wrapper {  
        grid-template-columns: 1fr !important;  
    }  
    .dashboard-sidebar {  
        position: fixed;  
        top: 0;  
        left: -280px;  
        width: 260px;  
        height: 100vh;
        background: #000b18;  
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);  
    }  
    .dashboard-sidebar.mobile-open {  
        transform: translateX(280px);  
    }  
}  
 
@media (max-width: 768px) {  
    #loggedOutView {  
        padding: 15px 16px;  
    }  
    .master-layout {  
        display: flex;  
        flex-direction: column;  
        gap: 24px;  
    }  
    .site-header {  
        flex-direction: column;  
        align-items: flex-start;  
        gap: 15px;  
    }  
    .menu-toggle-btn {  
        display: flex !important;  
    }  
    .dashboard-main {  
        width: 100% !important;  
        padding: 16px !important;  
    }  
    .data-matrix-grid {  
        display: flex !important;  
        flex-direction: column !important;  
    }  
} 
.profile-modal-card { 
    position: relative;
    gap: 16px;
    color: #f0f6fc; 
} 
 
.profile-modal-header h3 { 
    color: #f0f6fc !important; 
    font-size: 1.15rem; 
    font-weight: 700; 
} 
 
.profile-modal-header p { 
    color: #8b949e !important; 
font-size: 0.85rem; 
} 
.profile-modal-actions .logout-btn {
border-color: rgba(255, 107, 107, 0.3) !important;
} 
.profile-modal-actions .logout-btn:hover { 
background: rgba(255, 107, 107, 0.25) !important; 
}
/* ========================================== 
   12. COURSE / DOCUMENTS VIEW STYLES 
   ========================================== */ 
.accordion-course-item { 
    margin-bottom: 12px; 
    padding: 16px; 
} 
 
.accordion-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    cursor: pointer; 
} 
 
.accordion-header-left { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
} 
 
.accordion-header-left strong { 
    color: var(--text-main); 
} 
 
.accordion-header i { 
    color: var(--text-muted); 
} 
 
.course-topics-wrapper { 
    display: none; 
    margin-top: 16px; 
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
    padding-top: 12px; 
} 
 
.topics-section-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 12px; 
} 
 
.topics-section-header h5 { 
    color: var(--gold-glow); 
    margin: 0; 
} 
 
.topics-section-header .btn-primary { 
    width: auto; 
    padding: 6px 14px; 
    font-size: 0.8rem; 
    margin: 0; 
} 
 
.topic-expandable { 
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid rgba(255, 255, 255, 0.08); 
    border-radius: 6px; 
    padding: 10px; 
    margin-bottom: 8px; 
} 
 
.topic-summary { 
    color: var(--text-main); 
    font-weight: 600; 
    cursor: pointer; 
} 
 
.topic-instructor { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    font-weight: normal; 
} 
 
.materials-list { 
    margin-top: 10px; 
    padding-left: 10px; 
} 
 
.material-file-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 8px 0; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
} 
 
.material-file-row:last-child { 
    border-bottom: none; 
} 
 
.material-file-name { 
    color: var(--text-muted); 
    font-size: 0.85rem; 
} 
 
.material-file-name i { 
    color: #ff4d4d; 
    margin-right: 6px; 
} 
 
.material-actions { 
    display: flex; 
    gap: 6px; 
} 
 
.material-actions .btn-outline { 
    padding: 4px 8px; 
    font-size: 0.75rem; 
} 
 
.empty-notes-text { 
    color: var(--text-muted); 
    font-size: 0.8rem; 
} 
 
/* Modal Dialog Styling */ 
dialog#uploadNotesModal { 
    background: #0f172a; 
    border: 1px solid rgba(197, 160, 89, 0.4); 
    border-radius: 12px; 
    padding: 24px; 
    color: var(--text-main); 
    max-width: 450px; 
    width: 90%; 
    margin: auto; 
} 
 
dialog#uploadNotesModal h3 { 
    margin-top: 0; 
    color: var(--gold-glow); 
} 
 
.modal-form-group { 
    margin-bottom: 12px; 
} 
 
.modal-form-group label { 
    color: var(--text-muted); 
    font-size: 0.85rem; 
    display: block; 
    margin-bottom: 4px; 
} 
 
.modal-form-group select, 
.modal-form-group input[type="text"] { 
    width: 100%; 
    padding: 10px; 
    background: #1e293b; 
    color: #ffffff; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 6px; 
} 
 
.modal-form-group input[type="file"] { 
    color: var(--text-muted); 
} 
 
.modal-actions-row { 
    display: flex; 
    gap: 10px; 
    justify-content: flex-end; 
    margin-top: 16px; 
} 
 
 
/* ========================================== 
   13. LIGHT THEME OVERRIDES (COURSES & PROFILE DROPDOWN) 
   ========================================== */ 
body.light-theme .accordion-course-item, 
body.light-theme .topic-expandable { 
    background: #ffffff !important; 
    border-color: #cbd5e1 !important; 
    color: #000b18 !important; 
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important; 
} 
 
body.light-theme .accordion-header-left strong, 
body.light-theme .topic-summary { 
    color: #000b18 !important; 
} 
 
body.light-theme .accordion-header i, 
body.light-theme .topic-instructor, 
body.light-theme .material-file-name, 
body.light-theme .empty-notes-text { 
    color: #475569 !important; 
} 
 
body.light-theme .course-topics-wrapper { 
    border-top-color: #e2e8f0 !important; 
} 
 
body.light-theme .material-file-row { 
    border-bottom-color: #f1f5f9 !important; 
} 
 
/* Light Mode Profile Modal */ 
body.light-theme .profile-modal-card { 
    background: #ffffff !important; 
    border-color: #cbd5e1 !important; 
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important; 
} 
 
body.light-theme .profile-modal-header h3 { 
    color: #000b18 !important; 
} 
 
body.light-theme .profile-modal-header p { 
    color: #64748b !important; 
} 
 
body.light-theme .profile-modal-actions .dropdown-btn { 
    background: #f8fafc !important; 
    border-color: #cbd5e1 !important; 
    color: #0f172a !important; 
} 
 
body.light-theme .profile-modal-actions .dropdown-btn:hover { 
    background: #e2e8f0 !important; 
} 
 
body.light-theme .profile-modal-actions .logout-btn { 
    color: #dc2626 !important; 
    border-color: rgba(220, 38, 38, 0.3) !important; 
    background: rgba(220, 38, 38, 0.08) !important; 
} 
 
body.light-theme .profile-modal-actions .logout-btn:hover { 
    background: rgba(220, 38, 38, 0.18) !important; 
} 
 
body.light-theme dialog#uploadNotesModal { 
    background: #ffffff !important; 
    border-color: #cbd5e1 !important; 
    color: #000b18 !important; 
} 
 
body.light-theme .modal-form-group select, 
body.light-theme .modal-form-group input[type="text"] { 
    background: #f8fafc !important; 
    color: #0f172a !important; 
    border-color: #cbd5e1 !important; 
}
/* Light Mode Contrast Overrides for Course & Document View */
body.light-theme .card-description {
    color: #334155 !important;
}
body.light-theme .topics-section-header h5 {
    color: #b45309 !important;
}
body.light-theme .topic-summary {
    color: #0f172a !important;
}
body.light-theme .topic-instructor {
    color: #475569 !important;
    font-weight: 600 !important;
}
body.light-theme .material-file-name {
    color: #0f172a !important;
    font-weight: 600 !important;
}
body.light-theme .material-file-row {
    border-bottom: 1px solid #cbd5e1 !important;
}
body.light-theme .topic-expandable {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
}
body.light-theme summary {
    color: #0f172a !important;
}
/* Dashboard Hero Panel - Dark Mode Fix */
.dashboard-hero-panel { 
    background: linear-gradient(135deg, rgba(7, 25, 47, 0.82) 0%, rgba(3, 13, 26, 0.92) 100%), 
                url('unilag front gate pic.avif') no-repeat center right / cover; 
    padding: 42px 40px 34px; 
    border-radius: 24px; 
    min-height: 240px; 
    border: 1px solid rgba(255, 255, 255, 0.12); 
    width: 100%; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
/* Dashboard Hero Panel - Light Mode Fix */
body.light-theme .dashboard-hero-panel { 
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(237, 244, 252, 0.90) 100%), 
                url('unilag front gate pic.avif') no-repeat center right / cover !important; 
    border: 1px solid #cbd5e1 !important; 
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06) !important; 
}
/* Sleek Mobile Profile Modal & Buttons */
.profile-modal-card {
    background: rgba(13, 17, 23, 0.95) !important;
    border: 1px solid rgba(197, 160, 89, 0.35) !important;
    backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 28px 20px;
    width: 320px;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
}
.profile-modal-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}
.profile-modal-actions .dropdown-btn {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 12px 16px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    outline: none !important;
}
.profile-modal-actions .dropdown-btn i {
    font-size: 1rem;
    color: #C5A059;
}
.profile-modal-actions .dropdown-btn:hover,
.profile-modal-actions .dropdown-btn:active {
    background: rgba(197, 160, 89, 0.18) !important;
    border-color: #C5A059 !important;
    color: #D4AF37 !important;
}
/* Logout Button Special Alert Styling */
.profile-modal-actions .logout-btn {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
    color: #fca5a5 !important;
}
.profile-modal-actions .logout-btn i {
    color: #ef4444 !important;
}
.profile-modal-actions .logout-btn:hover,
.profile-modal-actions .logout-btn:active {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}
/* Mobile Responsive Scaling for Dashboard Hero */
@media (max-width: 768px) {
    .dashboard-hero-panel {
        padding: 24px 18px 20px !important;
        min-height: auto !important;
        border-radius: 16px !important;
        background-position: center center !important;
    }
    .hero-panel-content h1 {
        font-size: 1.8rem !important;
        line-height: 1.25 !important;
    }
    .hero-panel-tagline {
        font-size: 0.9rem !important;
    }
    .hero-status-pills {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        margin-top: 16px !important;
    }
    .status-pill {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
        justify-content: flex-start !important;
    }
}
/* Mobile Overlay Active State */
.sidebar-overlay.active {
    display: block !important;
    z-index: 999 !important;
}
/* Ensure mobile sidebar sits above the overlay */
@media (max-width: 1024px) {
    .dashboard-sidebar {
        z-index: 1000 !important;
    }
}
/* Fix Timetable Course Code Badge Wrapping on Mobile */
.timetable-container,
.timetable-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.timetable-table td,
.timetable-table th {
    white-space: nowrap;
    padding: 10px 12px !important;
    font-size: 0.82rem !important;
}
/* Keep course badges on one line.
   Never give a table cell display:inline-block: it drops the cell out of the table layout, so each row's
   bottom border and the day-separator line were drawn as short, misaligned segments. Only the badge is inline-block. */
.timetable-table td:last-child {
    white-space: nowrap;
    word-break: keep-all;
}
.timetable-table .course-badge,
.timetable-table td:last-child span {
    white-space: nowrap;
    word-break: keep-all;
    display: inline-block;
}

/* ==========================================
   CALENDAR DAY CELLS & SELECTION HIGHLIGHTS
   (current date = solid fill, clicked date = outline; dark + light)
   ========================================== */
.calendar-grid-days .day-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    padding-bottom: 6px;
    text-transform: uppercase;
}

.calendar-grid-days .day-num {
    padding: 6px 2px;
    font-size: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0 auto;
    box-sizing: border-box;
    position: relative;
}

.calendar-grid-days .day-num:hover { background: rgba(255, 255, 255, 0.12); }
.calendar-grid-days .day-num.muted { color: #4b5a70; cursor: default; }

/* Current date (today): solid gold fill — persists even when another day is selected */
.calendar-grid-days .day-num.today-highlight {
    background: var(--gold-accent) !important;
    color: #000b18 !important;
    font-weight: 800 !important;
    box-shadow: 0 0 12px rgba(197, 160, 89, 0.6) !important;
    border: none !important;
}

/* Clicked date: focused blue outline, does not override today's fill */
.calendar-grid-days .day-num.selected-day {
    outline: 2px solid #1d9bf0 !important;
    outline-offset: -2px !important;
    border-radius: 8px !important;
}

.calendar-grid-days .day-num.has-event::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #1d9bf0;
}

/* Light theme overrides */
body.light-theme .calendar-grid-days .day-num { color: #0f172a !important; font-weight: 600; }
body.light-theme .calendar-grid-days .day-num:hover { background: #e2e8f0 !important; }
body.light-theme .calendar-grid-days .day-num.muted { color: #94a3b8 !important; }
body.light-theme .calendar-grid-days .day-num.today-highlight {
    background: #0284c7 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4) !important;
}
body.light-theme .calendar-grid-days .day-num.selected-day { outline: 2px solid #0284c7 !important; }
/* Automatically collapse empty pills or pills containing hidden 
buttons */ 
.status-pill:empty, 
.status-pill:has(#pwaInstallBtn[style*="display: none"]) { 
    display: none !important; 
}

/* ==========================================
   11. GALLERY TAB & LIGHTBOX
   Tokens are scoped (--g-*) so they don't
   override the site-wide --text-muted etc.
   ========================================== */
#galleryView, #forumView, #lightboxModal {
    --g-surface-card: #1E293B;
    --g-surface-border: #334155;
    --g-text-primary: #F8FAFC;
    --g-text-muted: #94A3B8;
    --g-brand-accent: #0EA5E9;
    --g-overlay-bg: rgba(11, 19, 43, 0.85);
}
body.light-theme #galleryView, body.light-theme #forumView, body.light-theme #lightboxModal {
    --g-surface-card: #FFFFFF;
    --g-surface-border: #E2E8F0;
    --g-text-primary: #0F172A;
    --g-text-muted: #64748B;
    --g-brand-accent: #0284C7;
    --g-overlay-bg: rgba(15, 23, 42, 0.45);
}
.gallery-title { font-size: 1.25rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--g-text-primary); }
.gallery-filter-pills { display: flex; gap: 8px; overflow-x: auto; padding: 16px 0 8px; margin-bottom: 8px; scrollbar-width: none; }
.gallery-filter-pills::-webkit-scrollbar { display: none; }
.gallery-pill { padding: 8px 16px; border-radius: 20px; border: 1px solid var(--g-surface-border); background: var(--g-surface-card); color: var(--g-text-muted); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: all 0.2s ease; }
.gallery-pill.active, .gallery-pill:hover { background: var(--g-brand-accent); color: #fff; border-color: var(--g-brand-accent); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gallery-card { background: var(--g-surface-card); border: 1px solid var(--g-surface-border); border-radius: 16px; overflow: hidden; cursor: pointer; transition: transform 0.15s ease, border-color 0.2s ease; }
.gallery-card:hover { border-color: var(--g-brand-accent); }
.gallery-card:active { transform: scale(0.98); }
.gallery-img-wrapper { width: 100%; height: 140px; overflow: hidden; background: rgba(0,0,0,0.2); }
.gallery-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-card:hover .gallery-img-wrapper img { transform: scale(1.05); }
.gallery-card-info { padding: 10px 12px; }
.gallery-card-info h4 { font-size: 0.85rem; font-weight: 700; color: var(--g-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-card-info small { font-size: 0.75rem; color: var(--g-text-muted); }
@media (min-width: 900px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } .gallery-img-wrapper { height: 180px; } }

.lightbox-modal-overlay { position: fixed; inset: 0; background: var(--g-overlay-bg); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 10001; padding: 16px; }
.lightbox-modal-card { position: relative; background: var(--g-surface-card); border: 1px solid var(--g-surface-border); border-radius: 24px; width: 100%; max-width: 500px; max-height: 100%; overflow-y: auto; padding: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.5); display: flex; flex-direction: column; gap: 16px; animation: lightboxPop 0.2s ease-out; }
@keyframes lightboxPop { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.lightbox-close-btn { position: absolute; top: 28px; right: 28px; width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(0,0,0,0.55); color: #fff; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; }
.lightbox-img-container { position: relative; width: 100%; height: 280px; border-radius: 16px; overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; }
.lightbox-img-container img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(0,0,0,0.5); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 5; }
.lightbox-nav-btn.prev-btn { left: 10px; }
.lightbox-nav-btn.next-btn { right: 10px; }
.lightbox-meta { display: flex; flex-direction: column; gap: 14px; }
.lightbox-text h4 { font-size: 1rem; color: var(--g-text-primary); }
.lightbox-text p { font-size: 0.8rem; color: var(--g-text-muted); }
.lightbox-actions { display: flex; gap: 10px; }
.lightbox-action-btn { flex: 1; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; text-decoration: none; cursor: pointer; }

/* ---- Daily forum (uses the gallery token scope above) ---- */
.forum-topic { padding: 14px 16px; border-radius: 16px; border: 1px solid var(--g-surface-border); background: var(--g-surface-card); color: var(--g-text-primary); font-weight: 700; margin-bottom: 14px; }
.forum-form textarea { width: 100%; box-sizing: border-box; padding: 12px; border-radius: 12px; border: 1px solid var(--g-surface-border); background: var(--g-surface-card); color: var(--g-text-primary); font-family: inherit; font-size: 0.92rem; resize: vertical; }
.forum-form-row { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 16px; }
.forum-form-row small { color: var(--g-text-muted); }
.forum-form-row .btn-primary { width: auto; min-height: 44px; padding: 10px 24px; }
.forum-post { padding: 12px 14px; border: 1px solid var(--g-surface-border); border-radius: 16px; background: var(--g-surface-card); margin-bottom: 10px; }
.forum-post-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 0.8rem; color: var(--g-text-muted); }
.forum-post-head strong { color: var(--g-brand-accent); }
.forum-post p { margin: 0; color: var(--g-text-primary); font-size: 0.92rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.forum-note { text-align: center; color: var(--g-text-muted); font-size: 0.9rem; padding: 8px 0; }

.forum-suggest, .forum-admin { margin-bottom: 14px; border: 1px solid var(--g-surface-border); border-radius: 16px; background: var(--g-surface-card); padding: 12px 14px; }
.forum-suggest summary, .forum-admin summary { cursor: pointer; font-weight: 700; font-size: 0.9rem; color: var(--g-text-primary); }
.forum-suggest form, .forum-admin-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.forum-suggest input, .forum-admin input { flex: 1 1 160px; min-height: 44px; box-sizing: border-box; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--g-surface-border); background: rgba(127, 127, 127, 0.12); color: var(--g-text-primary); font-family: inherit; }
.forum-suggest button, .forum-admin button.btn-primary, .forum-admin button.btn-outline { width: auto; min-height: 44px; padding: 8px 18px; border-radius: 12px; }
.forum-admin-title { margin: 16px 0 8px; color: var(--g-text-primary); font-size: 0.9rem; }
.forum-admin-row { padding: 10px 0; border-top: 1px solid var(--g-surface-border); }
.forum-admin-row p { margin: 0 0 8px; color: var(--g-text-primary); font-size: 0.9rem; }
.forum-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.forum-queued { margin: 4px 0; color: var(--g-text-muted); font-size: 0.85rem; }
.forum-remove { margin-left: 12px; background: none; border: none; color: #ef4444; font-size: 0.8rem; cursor: pointer; }

/* ==========================================
   TOP BAR (greeting + search + profile)
   ========================================== */
.dashboard-top-nav { gap: 10px; }
.dashboard-top-nav > div { min-width: 0; }
.welcome-greeting { min-width: 0; flex: 1 1 auto; }
.dashboard-top-nav > .top-nav-actions { min-width: auto; flex-shrink: 0; }
@media (max-width: 768px) {
    .welcome-greeting p { font-size: 0.8rem; }
    .welcome-greeting h2 { font-size: clamp(1.05rem, 4.8vw, 1.3rem); }
    .top-nav-actions { gap: 8px; }
    .tbx-search-btn { width: 40px; height: 40px; }
}

/* ==========================================
   ASSIGNMENTS, POLLS, SEARCH & SPLASH
   (merged from features.css; keep this section last so it keeps overriding the rules above)
   ========================================== */
/* Assignments, Polls and search. Uses the portal's own colour variables so light and dark themes both work. */

.tbx-card .table-header-row h3 i { margin-right: 6px; color: var(--gold-accent); }
.tbx-toolbar { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.btn-primary.tbx-add, .btn-primary.tbx-submit { width: auto; min-height: 44px; padding: 10px 20px; border-radius: 8px; }
.btn-primary.tbx-submit { align-self: flex-start; }
.btn-primary:disabled { opacity: 0.6; cursor: default; }

.tbx-banner {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; padding: 10px 14px;
  border: 1px solid var(--gold-accent); border-radius: 10px; font-size: 0.82rem; color: var(--text-main);
}
.tbx-banner i { color: var(--gold-accent); margin-top: 3px; }

.tbx-state { text-align: center; padding: 28px 12px; color: var(--text-muted); font-size: 0.92rem; }
.tbx-state .tbx-btn { margin-top: 12px; }

.tbx-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.tbx-filters .tbx-input { width: auto; min-width: 160px; }
.tbx-check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-muted); cursor: pointer; min-height: 44px; }
.tbx-check input { width: 18px; height: 18px; accent-color: #1d9bf0; }
.tbx-subhead { margin: 20px 0 10px; font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }

.tbx-list { display: flex; flex-direction: column; gap: 12px; }
.tbx-item {
  padding: 16px; border: 1px solid var(--card-border); border-radius: 14px;
  background: rgba(255,255,255,0.03);
}
body.light-theme .tbx-item { background: #f8fafc; }
.tbx-item.is-past { opacity: 0.7; }
.tbx-item.is-done .tbx-item-title { text-decoration: line-through; opacity: 0.6; }
.tbx-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.tbx-tag {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.5px; padding: 3px 8px; border-radius: 6px;
  background: rgba(29,155,240,0.15); color: #1d9bf0;
}
.tbx-tag.muted { background: rgba(160,174,192,0.18); color: var(--text-muted); }
.tbx-due { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.tbx-due.soon { color: var(--gold-glow); }
.tbx-due.late { color: #ff6b6b; }
.tbx-item-title { font-size: 1.02rem; font-weight: 700; color: var(--text-main); margin-bottom: 4px; word-break: break-word; }
.tbx-meta { font-size: 0.8rem; color: var(--text-muted); }
.tbx-note { margin-top: 8px; font-size: 0.88rem; color: var(--text-main); white-space: pre-wrap; word-break: break-word; opacity: 0.9; }
.tbx-item-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.tbx-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px;
  background: transparent; color: var(--text-main); border: 1px solid var(--card-border); border-radius: 8px;
  font-family: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: border-color .2s, color .2s;
}
.tbx-btn:hover { border-color: #1d9bf0; color: #1d9bf0; }
.tbx-btn.danger:hover, .tbx-btn.armed { border-color: #ff6b6b; color: #ff6b6b; }
.tbx-btn:disabled { opacity: 0.5; cursor: default; }
.tbx-icon-btn {
  width: 44px; height: 44px; flex-shrink: 0; background: transparent; color: var(--text-muted);
  border: 1px solid var(--card-border); border-radius: 8px; cursor: pointer;
}
.tbx-icon-btn:hover { color: #ff6b6b; border-color: #ff6b6b; }

.tbx-form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; padding: 16px; border: 1px solid var(--card-border); border-radius: 14px; }
.tbx-field { display: flex; flex-direction: column; gap: 6px; }
.tbx-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.4px; color: var(--text-muted); }
.tbx-field small { font-size: 0.76rem; color: var(--text-muted); }
.tbx-input {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--card-border);
  background: var(--bg-dark); color: var(--text-main); font-family: inherit; font-size: 16px;
}
.tbx-input:focus { outline: none; border-color: #1d9bf0; }
textarea.tbx-input { resize: vertical; min-height: 84px; }
.tbx-formmsg { min-height: 1.2em; font-size: 0.85rem; color: #ff6b6b; }
.tbx-optlist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.tbx-optrow { display: flex; gap: 8px; }

.tbx-options { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 8px; }
.tbx-option {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px;
  padding: 10px 12px; text-align: left; background: transparent; color: var(--text-main);
  border: 1px solid var(--card-border); border-radius: 10px; font-family: inherit; font-size: 0.92rem; cursor: pointer;
}
.tbx-option:disabled { cursor: default; }
.tbx-option:not(:disabled):hover { border-color: #1d9bf0; }
.tbx-option.chosen { border-color: #1d9bf0; font-weight: 700; }
.tbx-bar { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(29,155,240,0.18); transition: width .35s; }
.tbx-option.chosen .tbx-bar { background: rgba(29,155,240,0.32); }
.tbx-mark {
  position: relative; width: 20px; height: 20px; flex-shrink: 0; border: 2px solid var(--text-muted); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 0.65rem; color: #fff;
}
.tbx-option[role="checkbox"] .tbx-mark { border-radius: 5px; }
.tbx-option.chosen .tbx-mark { background: #1d9bf0; border-color: #1d9bf0; }
.tbx-opt-label { position: relative; flex: 1; min-width: 0; word-break: break-word; }
.tbx-opt-count { position: relative; flex-shrink: 0; font-size: 0.8rem; color: var(--text-muted); }

.tbx-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  z-index: 3000; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 10px;
  background: #021329; color: #fff; border: 1px solid var(--gold-accent); font-size: 0.88rem; transition: all .25s;
}
.tbx-toast.show { opacity: 1; transform: translate(-50%, 0); }
.tbx-toast.error { border-color: #ff6b6b; }

/* Search: expanding box on laptops, full screen sheet on phones and tablets */
.top-nav-actions { display: flex; align-items: center; gap: 12px; }
.tbx-search { position: relative; display: flex; align-items: center; flex-direction: row-reverse; }
.tbx-search-btn {
  width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); color: var(--text-main); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; cursor: pointer; font-size: 1rem; transition: border-color .2s, color .2s;
}
body.light-theme .tbx-search-btn { background: #fff; border-color: var(--card-border); }
.tbx-search-btn:hover { border-color: #1d9bf0; color: #1d9bf0; }
.tbx-search-input { display: none; }
.tbx-drop { display: none; }

@media (hover: hover) and (pointer: fine) and (min-width: 769px) {
  .tbx-search-input {
    display: block; width: 0; opacity: 0; padding: 0; margin-right: 8px; height: 44px; border: 1px solid transparent;
    border-radius: 10px; background: var(--bg-dark); color: var(--text-main); font-family: inherit; font-size: 0.9rem;
    transition: width .22s ease, opacity .18s ease, padding .22s ease;
  }
  .tbx-search:hover .tbx-search-input, .tbx-search:focus-within .tbx-search-input, .tbx-search.open .tbx-search-input {
    width: 280px; opacity: 1; padding: 0 12px; border-color: var(--card-border);
  }
  .tbx-search-input:focus { outline: none; border-color: #1d9bf0; }
  .tbx-search.open .tbx-drop {
    display: block; position: absolute; top: 52px; right: 0; width: 380px; max-height: 70vh; overflow-y: auto; z-index: 500;
    background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 14px; padding: 8px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  }
}

.tbx-sheet { display: none; position: fixed; inset: 0; z-index: 2500; flex-direction: column; background: var(--bg-dark); }
.tbx-sheet.open { display: flex; }
@media (hover: hover) and (pointer: fine) and (min-width: 769px) { .tbx-sheet.open { display: none; } }
.tbx-sheet-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--card-border); color: var(--text-muted); }
.tbx-sheet-input {
  flex: 1; min-width: 0; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--card-border);
  background: var(--card-bg); color: var(--text-main); font-family: inherit; font-size: 16px;
}
.tbx-sheet-input:focus { outline: none; border-color: #1d9bf0; }
.tbx-sheet-input::-webkit-search-cancel-button, .tbx-search-input::-webkit-search-cancel-button { display: none; }
.tbx-sheet-close { width: 44px; height: 44px; background: none; border: none; color: var(--text-main); font-size: 1.1rem; cursor: pointer; }
.tbx-results { flex: 1; overflow-y: auto; padding: 8px 10px 24px; -webkit-overflow-scrolling: touch; }
body.tbx-lock { overflow: hidden; }

.tbx-group { padding: 12px 10px 4px; font-size: 0.7rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.tbx-res {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 10px; text-align: left;
  background: none; border: none; border-radius: 8px; color: var(--text-main); font-family: inherit; cursor: pointer;
}
.tbx-res:hover, .tbx-res:focus-visible { background: rgba(29,155,240,0.12); outline: none; }
.tbx-res > i { width: 18px; text-align: center; color: var(--gold-accent); flex-shrink: 0; }
.tbx-res-text { display: flex; flex-direction: column; min-width: 0; }
.tbx-res-title { font-size: 0.9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tbx-res-sub { font-size: 0.76rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbx-res mark { background: rgba(212,175,55,0.35); color: inherit; border-radius: 3px; padding: 0 1px; }
.tbx-faq { margin: 0 10px 8px 40px; padding: 10px 12px; font-size: 0.85rem; line-height: 1.55; color: var(--text-main); border-left: 2px solid var(--gold-accent); }
.tbx-empty, .tbx-note-small { padding: 18px 12px; text-align: center; font-size: 0.85rem; color: var(--text-muted); }

@media (max-width: 768px) {
  .tbx-item { padding: 14px; }
  .tbx-filters .tbx-input { width: 100%; }
  .btn-primary.tbx-add { width: 100%; }
  .tbx-toolbar { justify-content: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .tbx-bar, .tbx-toast, .tbx-search-input { transition: none; }
}

/* date and time picker */
.tbx-dt { position: relative; display: flex; flex-direction: column; gap: 8px; }
.tbx-dt-row { display: flex; align-items: center; gap: 8px; }
.tbx-dt-date { display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; width: 100%; }
.tbx-dt-date.is-empty .tbx-dt-text { color: var(--text-muted); }
.tbx-dt-time > i { color: var(--text-muted); width: 18px; text-align: center; }
.tbx-dt-sel { width: auto; flex: 1 1 0; min-width: 0; cursor: pointer; }
.tbx-dt-sel:disabled { opacity: 0.45; cursor: not-allowed; }
.tbx-dt-colon { color: var(--text-muted); font-weight: 700; }
.tbx-cal { position: absolute; z-index: 30; top: 48px; left: 0; width: min(100%, 320px); padding: 12px;
  background: var(--bg-dark); border: 1px solid var(--card-border); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,0.45); }
.tbx-cal[hidden] { display: none; }
.tbx-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--text-main); }
.tbx-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; width: 100%; }
.tbx-cal-dow { text-align: center; font-size: 0.7rem; font-weight: 700; color: var(--text-muted); padding: 4px 0; }
.tbx-cal-day { height: 38px; min-width: 0; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--text-main); font: inherit; font-size: 0.9rem; cursor: pointer; }
.tbx-cal-day:hover:not(:disabled) { background: var(--card-bg); }
.tbx-cal-day:disabled { color: var(--text-muted); opacity: 0.35; cursor: not-allowed; }
.tbx-cal-day.today { box-shadow: inset 0 0 0 1px var(--gold-accent); }
.tbx-cal-day.sel { background: #1d9bf0; color: #fff; font-weight: 700; }
.tbx-cal-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
@media (max-width: 480px) { .tbx-cal { position: fixed; left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-width: none; box-sizing: border-box; padding: 10px; } .tbx-cal-day { height: 42px; } }
.tbx-cal, .tbx-cal * { box-sizing: border-box; }
.tbx-cal-head .tbx-icon-btn:hover:not(:disabled) { color: var(--text-main); border-color: #1d9bf0; }
.tbx-cal-head .tbx-icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.tbx-notice-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 10px; }
.tbx-notice-head .tbx-subhead { margin: 0; }
#tbxNoticeAssign { margin-bottom: 18px; }
#tbxNoticeAssign .notice-text { white-space: pre-line; }

/* TB AI floating button: dark text on the gold circle in light mode too */
body.light-theme #tb-fab .tb-fab-logo, body.light-theme #tb-fab .tb-fab-sub { color: #000b18; }
body.light-theme #tb-fab { box-shadow: 0 4px 18px rgba(154,116,32,0.45); }

/* Loading splash */
#tbSplash { display: none; position: fixed; inset: 0; z-index: 100000; background: #000b18; color: #fff;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px; font-family: 'Montserrat', sans-serif; }
html.tb-splash-on #tbSplash { display: flex; }
html.tb-splash-on #loggedOutView { visibility: hidden; }
html.tb-splash-light #tbSplash { background: #f0f4f8; color: #000b18; }
#tbSplash img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; background: #fff; }
#tbSplash .sp-name { font-weight: 700; letter-spacing: 1.5px; font-size: 0.95rem; }
#tbSplash .sp-sub { font-size: 0.75rem; opacity: 0.65; margin-top: -8px; }
#tbSplash .sp-bar { width: 140px; height: 3px; background: rgba(128,128,128,0.25); border-radius: 2px; overflow: hidden; }
#tbSplash .sp-bar::after { content: ""; display: block; height: 100%; width: 40%; background: #C5A059; animation: tbSpSlide 1.1s ease-in-out infinite; }
html.tb-splash-light #tbSplash .sp-bar::after { background: #9a7420; }
@keyframes tbSpSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }
@media (prefers-reduced-motion: reduce) { #tbSplash .sp-bar::after { animation: none; width: 100%; } }


/* ==========================================
   FIXES (kept last so they win over earlier rules)
   ========================================== */

/* --- Blue tick: sits right beside the name, never floats off toward the search button --- */
.welcome-greeting h2 { display: block !important; }
.welcome-greeting h2 .greeting-name-tail { white-space: nowrap; }
.welcome-greeting h2 .verified-badge-icon,
.verified-badge-icon {
    display: inline-block;
    position: static;
    float: none;
    margin: 0 0 0 5px;
    font-size: 0.78em;
    vertical-align: 0.06em;
    color: #1d9bf0;
}

/* --- Install button: the floating pill and the how-to sheet had no styles at all --- */
.tb-install-fab {
    position: fixed;
    left: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 9990;
    display: flex;
    align-items: center;
    background: var(--gold-glow, #D4AF37);
    color: #0b1220;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    font-family: inherit;
}
@media (min-width: 1025px) {
    .tb-install-fab { left: 300px; }
}
.tb-install-go,
.tb-install-x {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    font-family: inherit;
    cursor: pointer;
}
.tb-install-go {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 8px 12px 18px;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}
.tb-install-x {
    padding: 12px 14px 12px 6px;
    font-size: 1.2rem;
    line-height: 1;
    opacity: 0.7;
}
.tb-install-x:hover { opacity: 1; }

.tb-install-sheet {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(2, 8, 20, 0.6);
    padding: 16px;
}
.tb-install-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin-bottom: env(safe-area-inset-bottom, 0px);
    padding: 24px 22px 20px;
    border-radius: 20px;
    background: var(--card-bg, #021329);
    color: var(--text-main, #fff);
    border: 1px solid rgba(197, 160, 89, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.tb-install-card h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--gold-glow, #D4AF37); }
.tb-install-card p { margin: 0 0 12px; font-size: 0.88rem; color: var(--text-muted, #A0AEC0); }
.tb-install-steps { margin: 0; padding-left: 20px; font-size: 0.9rem; line-height: 1.6; }
.tb-install-steps li + li { margin-top: 6px; }
.tb-install-close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: 0;
    background: transparent;
    color: var(--text-muted, #A0AEC0);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
body.light-theme .tb-install-card { background: #fff; color: #0f172a; border-color: #cbd5e1; }
body.light-theme .tb-install-card h3 { color: #0284c7; }
body.light-theme .tb-install-card p,
body.light-theme .tb-install-close { color: #475569; }

/* --- Logged-out hero: the title stays light on its dark photo overlay in both themes --- */
#loggedOutView .hero-panel-content h1,
#loggedOutView .hero-panel-content h1 * { color: #ffffff !important; }
#loggedOutView .hero-panel-content .highlight-title { color: var(--gold-glow, #D4AF37) !important; }
#loggedOutView .hero-panel-tagline { color: #e2e8f0 !important; }

/* --- Timetable: one look for every row, cell and badge, in both themes --- */
.timetable-table {
    --tt-line: rgba(255, 255, 255, 0.08);
    --tt-line-strong: #21262d;
    --tt-day: var(--gold-accent, #C5A059);
    --tt-badge-bg: rgba(197, 160, 89, 0.16);
    --tt-badge-fg: var(--gold-glow, #D4AF37);
    --tt-empty: #64748b;
}
body.light-theme .timetable-table {
    --tt-line: #e2e8f0;
    --tt-line-strong: #cbd5e1;
    --tt-day: #0284c7;
    --tt-badge-bg: #f5ecda;
    --tt-badge-fg: #a8803a;
    --tt-empty: #94a3b8;
}

/* Real table layout everywhere. A cell that is not a table-cell is why the row lines used to stop at
   different widths and the day line sat at a different height in each column. */
.timetable-table { display: table !important; width: 100%; border-collapse: separate !important; border-spacing: 0 !important; }
.timetable-table thead { display: table-header-group !important; }
.timetable-table tbody { display: table-row-group !important; }
.timetable-table tr { display: table-row !important; }

.timetable-table th,
.timetable-table td {
    display: table-cell !important;
    box-sizing: border-box;
    height: 56px;
    padding: 10px 14px !important;
    vertical-align: middle !important;
    text-align: left !important;
    white-space: nowrap;
    font-size: 0.85rem !important;
    line-height: 1.3;
    border-top: 0;
    border-bottom: 1px solid var(--tt-line) !important;
}
.timetable-table th { height: 48px; border-bottom: 2px solid var(--tt-line-strong) !important; }

/* The day separator is drawn on every cell of the first row of a day, so it is one straight line. */
.timetable-table tr.day-divider > td,
.timetable-table tr.day-start > td,
.timetable-table tr:has(> td.day-cell) > td {
    border-top: 3px solid var(--tt-day) !important;
}

/* Course codes: identical size and shape, whatever the code */
.timetable-table .course-badge,
.timetable-table td:last-child span {
    display: inline-block;
    min-width: 92px;
    padding: 7px 14px;
    border-radius: 10px;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    background: var(--tt-badge-bg) !important;
    color: var(--tt-badge-fg) !important;
}

/* Empty cells ("-"): same muted dash in every row, lined up with the text above it */
.timetable-table td.tt-empty {
    color: var(--tt-empty) !important;
    font-weight: 400;
}

/* --- Timetable on phones: fit the card instead of scrolling sideways ------------------------------
   The block above gives every row the same height and the same look. Text is not allowed to wrap there
   (so a table with many columns scrolls), which is what cut off the Course column on a phone. Under 769px
   only the free-text cells (class / room) may wrap, the cells and badges get a little tighter, and
   day, time and course codes stay on one line. Heights and lines stay identical in every row. */
@media (max-width: 768px) {
    .timetable-table th,
    .timetable-table td {
        padding: 9px 7px !important;
        font-size: 0.76rem !important;
        height: 54px;
        white-space: normal;
        overflow-wrap: break-word;
    }
    .timetable-table th { height: 44px; white-space: nowrap; }
    .timetable-table .day-cell,
    .timetable-table .time-cell { white-space: nowrap; }
    .timetable-table .course-badge,
    .timetable-table td:last-child span {
        min-width: 0;
        padding: 5px 9px;
        font-size: 0.74rem;
        white-space: nowrap;
    }
}

/* --- Search boxes in light theme -------------------------------------------------------------------
   The base rule forces white text with !important (it is right for dark theme), so what you typed in the
   student / payment / CGPA search boxes was white on white. Light theme gets dark text and a light box. */
body.light-theme .search-input-box input,
body.light-theme .admin-search-wrapper input,
body.light-theme #studentSearchInput,
body.light-theme #duesAdminSearchInput,
body.light-theme #gpaMatricLookupInput {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a;   /* some phones paint typed/auto-filled text with their own colour */
    caret-color: #0f172a;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
}
body.light-theme .search-input-box input::placeholder,
body.light-theme .admin-search-wrapper input::placeholder,
body.light-theme #studentSearchInput::placeholder,
body.light-theme #duesAdminSearchInput::placeholder,
body.light-theme #gpaMatricLookupInput::placeholder {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b;
    opacity: 1;
}
body.light-theme .search-input-box input:focus,
body.light-theme .admin-search-wrapper input:focus,
body.light-theme #studentSearchInput:focus,
body.light-theme #duesAdminSearchInput:focus,
body.light-theme #gpaMatricLookupInput:focus {
    border-color: #1d9bf0 !important;
    box-shadow: 0 0 10px rgba(29, 155, 240, 0.25) !important;
}

/* ==========================================
   FEES TAB (fx-*)  Phone first; widens gracefully.
   ========================================== */
#feesView {
    --fx-line: rgba(255, 255, 255, 0.14);
    --fx-surface: rgba(255, 255, 255, 0.04);
    --fx-ok: #4ade80;
    --fx-warn: #fbbf24;
    --fx-bad: #ff6b6b;
}
body.light-theme #feesView {
    --fx-line: rgba(15, 23, 42, 0.16);
    --fx-surface: rgba(15, 23, 42, 0.03);
    --fx-ok: #15803d;
    --fx-warn: #b45309;
    --fx-bad: #b91c1c;
}

/* Summary */
.fx-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px 20px;
}
.fx-summary-main { min-width: 0; }
.fx-summary-label { font-size: 0.85rem; font-weight: 600; color: var(--gold-glow); }
.fx-summary-value { font-size: 2.1rem; font-weight: 800; line-height: 1.1; margin: 4px 0 6px; overflow-wrap: anywhere; }
.fx-summary-stats { display: flex; gap: 12px; }
.fx-status { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 0.85rem; font-weight: 600; }
.fx-status.fx-ok { color: var(--fx-ok); }
.fx-status.fx-bad { color: var(--fx-bad); }
.fx-status.fx-neutral { color: var(--text-muted); }

/* Card heading row */
.fx-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 6px; }
.fx-head h3 { margin: 0; }
.fx-hint { color: var(--text-muted); font-size: 0.8rem; }
.fx-empty { color: var(--text-muted); font-size: 0.9rem; text-align: center; padding: 18px 8px; list-style: none; }
.fx-empty p { margin: 0 0 12px; }

/* Forms and inputs (16px text stops iOS from zooming in on focus) */
.fx-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.fx-span2 { grid-column: 1 / -1; }
.fx-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fx-field label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.fx-field input,
.fx-select {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    box-sizing: border-box;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 16px;
    color: var(--text-main);
    background: var(--fx-surface);
    border: 1px solid var(--fx-line);
    border-radius: 10px;
    outline: none;
}
.fx-field input:focus,
.fx-select:focus { border-color: #1d9bf0; box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.25); }
.fx-select option { background: var(--card-bg); color: var(--text-main); }
.fx-form .btn-primary { min-height: 46px; font-size: 0.95rem; }
.fx-msg { min-height: 1.2em; margin: 0 0 10px; font-size: 0.85rem; font-weight: 600; }
.fx-msg.ok { color: var(--fx-ok); }
.fx-msg.error { color: var(--fx-bad); }

/* Admin: fee list with delete */
.fx-fee-list, .fx-student-list { list-style: none; margin: 0; padding: 0; }
.fx-fee-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--fx-line);
}
.fx-fee-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fx-fee-row-title { overflow-wrap: anywhere; }
.fx-bar { height: 6px; border-radius: 999px; background: var(--fx-line); overflow: hidden; }
.fx-bar span { display: block; height: 100%; background: var(--fx-ok); border-radius: 999px; }
.fx-icon-btn {
    flex: none;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--fx-bad);
    border: 1px solid var(--fx-line);
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
}
.fx-icon-btn:hover { background: rgba(255, 107, 107, 0.12); border-color: var(--fx-bad); }
.fx-icon-btn:focus-visible, .fx-chip:focus-visible, .fx-receipt-btn:focus-visible { outline: 2px solid #1d9bf0; outline-offset: 2px; }

/* Admin: payment manager */
.fx-controls { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.fx-chips { display: flex; gap: 8px; }
.fx-chip {
    flex: 1;
    min-height: 40px;
    padding: 8px 14px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    background: transparent;
    border: 1px solid var(--fx-line);
    border-radius: 999px;
    cursor: pointer;
}
.fx-chip.active { background: #1d9bf0; border-color: #1d9bf0; color: #fff; }
.fx-student-list { max-height: 60vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.fx-student { border-top: 1px solid var(--fx-line); }
.fx-student-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 8px 2px;
    cursor: pointer;
}
.fx-student-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fx-student-info strong { font-size: 0.92rem; overflow-wrap: anywhere; }
.fx-student-info small { color: var(--text-muted); font-size: 0.78rem; }
.fx-state { font-weight: 700; }
.fx-state.is-paid { color: var(--fx-ok); }
.fx-state.is-pending { color: var(--fx-warn); }

/* Paid switch: a 46x28 control inside a 58px-tall tappable row */
.fx-switch { position: relative; flex: none; width: 46px; height: 28px; }
.fx-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.fx-switch .toggle-slider { position: absolute; inset: 0; border-radius: 999px; background: var(--fx-line); transition: background 0.2s ease; }
.fx-switch .toggle-slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease;
}
.fx-switch input:checked + .toggle-slider { background: #22c55e; }
.fx-switch input:checked + .toggle-slider::before { transform: translateX(18px); }
.fx-switch input:focus-visible + .toggle-slider { outline: 2px solid #1d9bf0; outline-offset: 2px; }
.fx-switch input:disabled { cursor: progress; }
.fx-switch input:disabled + .toggle-slider { opacity: 0.55; }

/* Student: fee cards */
.fx-list { display: flex; flex-direction: column; gap: 12px; }
.fx-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 14px;
    background: var(--fx-surface);
    border: 1px solid var(--fx-line);
    border-radius: 16px;
}
.fx-item-title { margin: 0; font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; }
.fx-item-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 4px 0 0; color: var(--text-muted); font-size: 0.8rem; }
.fx-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.fx-amount { font-size: 1.05rem; white-space: nowrap; }
.fx-item-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.fx-pill {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}
.fx-pill-paid { color: var(--fx-ok); }
.fx-pill-pending { color: var(--fx-warn); }
.fx-pill-overdue { color: var(--fx-bad); }
.fx-receipt-btn { min-height: 44px; }

/* Your global search-box rule uses !important and a 13.6px font; on phones that is a small target and makes iOS zoom in. */
#feesView #duesAdminSearchInput { min-height: 46px !important; font-size: 16px !important; }

/* Phones */
@media (max-width: 600px) {
    #feesView { padding-bottom: 96px; }   /* keeps the last card clear of the floating Install / AI buttons */
    #feesView .matrix-card { padding: 16px; border-radius: 18px; margin-bottom: 14px; }
    .fx-summary { flex-direction: column; align-items: stretch; }
    .fx-summary-value { font-size: 1.8rem; }
    .fx-summary-stats { width: 100%; }
    .fx-summary-stats .stat-badge { flex: 1; min-width: 0; padding: 10px 8px; }
    .fx-form { grid-template-columns: 1fr; }
    .fx-item-foot { flex-direction: column; align-items: stretch; }
    .fx-receipt-btn { width: 100%; min-height: 48px; }
}
@media (max-width: 360px) {
    .fx-summary-value { font-size: 1.6rem; }
    .fx-item { padding: 12px; }
}
@media (min-width: 900px) {
    .fx-controls { flex-direction: row; align-items: flex-end; }
    .fx-controls .fx-field { flex: 1; }
    .fx-controls .fx-chips { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
    .fx-switch .toggle-slider, .fx-switch .toggle-slider::before { transition: none; }
}

/* --- Timetable: course codes open that course's topics in the Documents tab --- */
.timetable-table td.tt-title { white-space: normal; min-width: 170px; line-height: 1.3; }
.tt-course-link { cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease; -webkit-tap-highlight-color: transparent; }
.tt-course-link:hover { filter: brightness(1.18); box-shadow: 0 0 0 1px var(--gold-accent, #C5A059); }
.tt-course-link:active { transform: scale(0.96); }
.tt-course-link:focus-visible { outline: 2px solid #1d9bf0; outline-offset: 2px; }
body.light-theme .tt-course-link:hover { filter: brightness(0.95); box-shadow: 0 0 0 1px #0284c7; }
.tt-note { margin: 14px 0 0; line-height: 2; }
.tt-note .course-code-badge { display: inline-block; margin: 0 2px; }
@media (max-width: 768px) {
    .timetable-table td.tt-title { min-width: 120px; }
    .timetable-table .time-cell { white-space: normal; min-width: 78px; }
}

/* Phones: the table is too wide for the card (codes got cut off), so show one card per day instead. */
.tt-cards { display: none; }
@media (max-width: 600px) {
    #timetableView { padding-bottom: 96px; }                 /* clear of the floating Install / AI buttons */
    #timetableView .matrix-card { padding: 16px; border-radius: 18px; }
    #timetableView.tt-has-cards .table-responsive { display: none; }
    #timetableView.tt-has-cards .tt-cards { display: grid; gap: 14px; }
}
.tt-day { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 14px; padding: 12px 12px 6px; min-width: 0; }
.tt-day-title { font-size: 0.92rem; font-weight: 700; color: var(--gold-glow, #D4AF37); margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.tt-free { font-size: 0.82rem; color: #64748b; margin: 0 0 8px; }
.tt-slots { list-style: none; margin: 0; padding: 0; display: grid; }
.tt-slot { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); min-width: 0; }
.tt-slot-time { font-size: 0.78rem; font-weight: 700; color: #cbd5e1; }
.tt-slot-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.tt-slot-main .tt-course-link { padding: 8px 14px; font-size: 0.82rem; min-height: 36px; display: inline-flex; align-items: center; }
.tt-slot-title { font-size: 0.88rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; flex: 1 1 140px; min-width: 0; }
.tt-slot-venue { font-size: 0.78rem; color: var(--text-muted, #A0AEC0); }
.tt-slot-venue i { margin-right: 4px; }
body.light-theme .tt-day { background: #f8fafc; border-color: #cbd5e1; }
body.light-theme .tt-slot { border-top-color: #e2e8f0; }
body.light-theme .tt-slot-time { color: #334155; }
body.light-theme .tt-slot-title { color: #000b18; }
body.light-theme .tt-day-title { color: #0284c7; }
body.light-theme .tt-slot-venue { color: #475569; }

/* ==========================================================
   FIXES: semester toggle, GPA table, quick-access tiles, courses table
   ========================================================== */

/* --- Semester toggle: the active state now comes from the .active class
       (it used to be hard-coded inline on "1st Semester", so it never moved) --- */
.semester-toggle-group {
    display: flex;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
    max-width: 100%;
}
.gpa-toggle-btn {
    background: transparent;
    color: #8b949e;
    border: none;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.gpa-toggle-btn.active {
    background: #1d9bf0;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(29, 155, 240, 0.3);
}
.gpa-toggle-btn:not(.active):hover { color: #e2e8f0; }
.gpa-toggle-btn:focus-visible { outline: 2px solid #1d9bf0; outline-offset: 2px; }

/* --- GPA table: fixed layout so columns stop resizing (and clipping the
       grade dropdown) every time the semester rows change --- */
.gpa-table { table-layout: fixed; width: 100%; }
.gpa-table th:nth-child(2), .gpa-table td:nth-child(2) { width: 64px; }
.gpa-table th:nth-child(3), .gpa-table td:nth-child(3) { width: 200px; }
.gpa-table td:first-child { overflow-wrap: anywhere; line-height: 1.35; }
.gpa-table .grade-select { min-width: 0; text-overflow: ellipsis; }

@media (max-width: 600px) {
    .gpa-calc-card, #resultsView .gpa-calculator-card { padding: 14px !important; }
    .gpa-calculator-card { padding: 14px !important; }
    .gpa-table th, .gpa-table td { padding: 10px 6px !important; }
    .gpa-table th:nth-child(2), .gpa-table td:nth-child(2) { width: 46px; text-align: center; }
    .gpa-table th:nth-child(3), .gpa-table td:nth-child(3) { width: 118px; }
    .gpa-table .grade-select { padding: 8px 4px !important; font-size: 0.8rem !important; }
    .semester-toggle-group { width: 100%; }
    .gpa-toggle-btn { flex: 1 1 0; min-width: 0; padding: 8px 4px; font-size: 0.75rem; }
}

/* --- Quick-access tiles: labels like "Assignments" / "Documents" ran past the tile edge --- */
.access-box {
    min-width: 0;
    height: auto;
    min-height: 120px;
    padding: 12px 6px;
    box-sizing: border-box;
    text-align: center;
}
.access-box span {
    display: block;
    max-width: 100%;
    font-size: 0.85rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
    hyphens: auto;
}
@media (max-width: 480px) {
    .quick-access-box-grid { gap: 10px; }
    .access-box { min-height: 104px; gap: 10px; border-radius: 16px; }
    .access-box span { font-size: 0.74rem; letter-spacing: -0.1px; }
}
@media (max-width: 340px) {
    .access-box span { font-size: 0.68rem; }
}

/* --- Courses table: the arrow column pushed the table wider than its card, so the
       course codes wrapped ("ACC- / CM / 201") and the chevron was cut off --- */
#coursesView .course-code-tag { white-space: nowrap; }
#coursesView .data-table td:nth-child(2) { overflow-wrap: anywhere; line-height: 1.3; }
#coursesView .course-row-arrow { width: 28px; }
@media (max-width: 600px) {
    #coursesView { padding-bottom: 96px; }          /* clear of the floating AI button */
    #coursesView .matrix-card { padding: 16px; border-radius: 18px; }
    #coursesView .table-header-row h3 { font-size: 1rem; line-height: 1.3; }
    #coursesView .data-table { font-size: 0.8rem; }
    #coursesView .data-table th,
    #coursesView .data-table td { padding: 12px 6px; }
    #coursesView .data-table th:nth-child(3),
    #coursesView .data-table td:nth-child(3) { text-align: center; width: 44px; }
    #coursesView .course-row-arrow { width: 18px; padding-left: 0; padding-right: 2px; }
}
