/* ==========================================================================
   CSS DESIGN SYSTEM & GLOBAL CONSTANTS
   ========================================================================== */

/* Dark Mode CSS Custom Variables (Default Theme) */
.dark-theme {
    --bg-main: #0B0F19;
    --bg-sidebar: rgba(15, 23, 42, 0.75);
    --bg-card: rgba(30, 41, 59, 0.45);
    --bg-card-hover: rgba(30, 41, 59, 0.65);
    --bg-input: rgba(15, 23, 42, 0.6);
    
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --border-color: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    --accent-primary: #0EA5E9; /* Cyber Blue */
    --accent-primary-rgb: 14, 165, 233;
    --accent-secondary: #8B5CF6; /* Neon Violet */
    --accent-secondary-rgb: 139, 92, 246;
    
    --color-green: #10B981;
    --color-green-bg: rgba(16, 185, 129, 0.15);
    --color-red: #EF4444;
    --color-red-bg: rgba(239, 68, 68, 0.15);
    --color-amber: #F59E0B;
    --color-amber-bg: rgba(245, 158, 11, 0.15);
    --color-blue: #3B82F6;
    --color-blue-bg: rgba(59, 130, 246, 0.15);
    
    --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-inset: inset 0 2px 4px 0 rgba(255, 255, 255, 0.05);
    --glass-blur: blur(16px);
    --glass-glow: rgba(14, 165, 233, 0.15);
    
    --hero-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0B0F19 100%);
    --login-gradient: radial-gradient(circle at 10% 20%, #1e1b4b 0%, #090514 90%);
}

/* Light Mode CSS Custom Variables */
.light-theme {
    --bg-main: #F1F5F9;
    --bg-sidebar: rgba(255, 255, 255, 0.85);
    --bg-card: rgba(255, 255, 255, 0.65);
    --bg-card-hover: rgba(255, 255, 255, 0.85);
    --bg-input: rgba(241, 245, 249, 0.9);
    
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    
    --accent-primary: #0284C7;
    --accent-primary-rgb: 2, 132, 199;
    --accent-secondary: #7C3AED;
    --accent-secondary-rgb: 124, 58, 237;
    
    --color-green: #059669;
    --color-green-bg: rgba(5, 150, 105, 0.12);
    --color-red: #DC2626;
    --color-red-bg: rgba(220, 38, 38, 0.12);
    --color-amber: #D97706;
    --color-amber-bg: rgba(217, 119, 6, 0.12);
    --color-blue: #2563EB;
    --color-blue-bg: rgba(37, 99, 235, 0.12);
    
    --shadow-main: 0 8px 32px 0 rgba(148, 163, 184, 0.15);
    --shadow-inset: inset 0 2px 4px 0 rgba(255, 255, 255, 0.8);
    --glass-blur: blur(20px);
    --glass-glow: rgba(2, 132, 199, 0.08);
    
    --hero-gradient: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 50%, #f1f5f9 100%);
    --login-gradient: linear-gradient(135deg, #e0f2fe 0%, #f1f5f9 100%);
}

/* ==========================================================================
   RESET & CORE RULES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

button, input, select, textarea {
    background: none;
    border: none;
    color: inherit;
    font-size: inherit;
}

button {
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Hide Utility */
.hide {
    display: none !important;
}

/* Font helpers */
.font-mono {
    font-family: monospace, Courier, monospace;
}
.font-bold {
    font-weight: 700;
}

/* Glassmorphism Generic Class */
.glassmorphic {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-main), var(--shadow-inset);
    border-radius: 16px;
}

/* Helper Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ==========================================================================
   BUTTONS & CONTROLS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    text-decoration: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #FFF !important;
    box-shadow: 0 4px 14px rgba(var(--accent-primary-rgb), 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-primary-rgb), 0.45);
}

.btn-secondary {
    background: var(--border-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary) !important;
}
.btn-secondary:hover {
    background: var(--border-hover);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary) !important;
}
.btn-outline:hover {
    background: rgba(var(--accent-primary-rgb), 0.1);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.btn-xs {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* ==========================================================================
   PUBLIC COLLEGE HOMEPAGE STYLING (index.html root)
   ========================================================================== */
.home-navbar {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 50px;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 500;
    transition: background-color 0.3s ease;
}
.home-navbar.scrolled {
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-brand h2 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.nav-brand span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
}

.home-nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
}
.home-nav-links a {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
}
.home-nav-links a:hover, .home-nav-links a.active {
    color: var(--accent-primary);
}

.hero-section {
    min-height: 100vh;
    width: 100%;
    background: var(--hero-gradient);
    display: flex;
    align-items: center;
    padding: 100px 50px 50px;
    position: relative;
    overflow: hidden;
}
.hero-content-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    align-items: center;
}
.hero-text-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10;
}
.hero-badge {
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(var(--accent-primary-rgb), 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(var(--accent-primary-rgb), 0.25);
    letter-spacing: 0.5px;
}
.hero-text-area h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
}
.hero-text-area p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
}
.hero-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.hero-vector-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}
.hero-vector {
    width: 100%;
    max-width: 450px;
    height: auto;
    filter: drop-shadow(0 20px 50px rgba(0,0,0,0.35));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Home Page Info Ticker */
.info-ticker-bar {
    background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #FFF;
    height: 40px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
}
.ticker-title {
    background: #000;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 1px;
    z-index: 20;
    text-transform: uppercase;
}
.ticker-scroll {
    display: inline-flex;
    white-space: nowrap;
    animation: tickerLoop 30s linear infinite;
    gap: 50px;
    font-weight: 600;
    font-size: 0.88rem;
}
@keyframes tickerLoop {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Home Page Grid Sections */
.info-section {
    padding: 80px 50px;
    max-width: 1300px;
    margin: 0 auto;
}
.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
}
.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.feature-card {
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
}
.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(var(--accent-primary-rgb), 0.1);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.home-footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==========================================================================
   LOGIN SCREEN LAYOUT (pages/login.html)
   ========================================================================== */
.login-wrapper {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--login-gradient);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-wrapper::before, .login-wrapper::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
}
.login-wrapper::before {
    width: 300px;
    height: 300px;
    background: rgba(var(--accent-primary-rgb), 0.15);
    top: 10%;
    left: 10%;
}
.login-wrapper::after {
    width: 400px;
    height: 400px;
    background: rgba(var(--accent-secondary-rgb), 0.15);
    bottom: 10%;
    right: 10%;
}

.login-container {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    width: 900px;
    min-height: 520px;
    z-index: 10;
    overflow: hidden;
    position: relative;
}

.login-hero {
    background: rgba(var(--accent-primary-rgb), 0.05);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.login-vector {
    width: 280px;
    height: auto;
    margin-bottom: 25px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.2));
}

.login-form-area {
    padding: 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.college-logo-small {
    height: 48px;
    width: auto;
    margin-bottom: 15px;
}

.form-header h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}
.form-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    margin-top: 4px;
}

.input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.input-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-field-wrapper input, .input-field-wrapper textarea {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    outline: none;
    font-size: 0.95rem;
    transition: all 0.25s;
}

.input-field-wrapper input:focus, .input-field-wrapper textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.15);
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
}

.password-toggle {
    position: absolute;
    right: 14px;
    color: var(--text-muted);
}
.password-toggle:hover {
    color: var(--text-primary);
}

.error-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--color-red-bg);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--color-red);
    font-size: 0.85rem;
    margin-bottom: 20px;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.demo-credentials {
    margin-top: 25px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border-color);
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-secondary);
}
.demo-credentials code {
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent-primary);
    font-family: monospace;
}

/* ==========================================================================
   PORTAL SHELL LAYOUT - DESKTOP LAYOUT (Default: >1024px)
   ========================================================================== */
.portal-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar Shell */
.sidebar {
    width: 270px;
    position: fixed;
    top: 15px;
    bottom: 15px;
    left: 15px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 25px 20px;
    border-radius: 20px;
    transition: width 0.3s ease, padding 0.3s ease, transform 0.3s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.college-logo {
    height: 40px;
    width: auto;
    transition: margin 0.3s;
}

.logo-text h3 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.logo-text span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
    white-space: nowrap;
}

/* User Mini Profile */
.user-mini-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.25s;
}
.user-mini-profile:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    border-color: var(--accent-primary);
}

.avatar-container {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}
.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
}
.avatar-glow {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-primary);
    opacity: 0;
    transition: opacity 0.3s;
}
.user-mini-profile:hover .avatar-glow {
    opacity: 0.6;
}

.id-badge-icon {
    position: absolute;
    bottom: -3px;
    right: -3px;
    background: var(--accent-primary);
    color: #FFF;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--bg-main);
}

.user-info {
    overflow: hidden;
}
.user-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}
.branch-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(var(--accent-primary-rgb), 0.1);
    padding: 1px 6px;
    border-radius: 4px;
    margin-top: 3px;
    white-space: nowrap;
}

/* Navigation List */
.sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}
.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    text-align: left;
}
.nav-link svg {
    color: var(--text-muted);
    transition: color 0.25s, transform 0.25s;
    flex-shrink: 0;
}
.nav-link span {
    white-space: nowrap;
}
.nav-link:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}
.nav-link:hover svg {
    color: var(--accent-primary);
    transform: scale(1.1);
}
.nav-link.active {
    background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.15) 0%, rgba(var(--accent-secondary-rgb), 0.1) 100%);
    color: var(--text-primary);
    border: 1px solid rgba(var(--accent-primary-rgb), 0.2);
}
.nav-link.active svg {
    color: var(--accent-primary);
}

/* Sidebar Footer */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}
.sidebar-control-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    width: 100%;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.sidebar-control-btn span {
    white-space: nowrap;
}
.sidebar-control-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}
.sidebar-control-btn.logout {
    color: var(--color-red);
}
.sidebar-control-btn.logout:hover {
    background: var(--color-red-bg);
}

/* Main Panel Layout */
.main-panel {
    margin-left: 300px;
    flex-grow: 1;
    min-height: 100vh;
    padding: 15px 15px 15px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: margin-left 0.3s ease;
}

/* Header */
.main-header {
    position: relative;
    z-index: 150; /* Higher than content sections to prevent dropdown layering bugs */
    height: 70px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.mobile-toggle {
    display: none;
    color: var(--text-secondary);
}
.mobile-toggle:hover {
    color: var(--text-primary);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.breadcrumb .separator {
    color: var(--text-muted);
}
.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.date-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 8px;
}

.icon-btn {
    position: relative;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}
.theme-toggle-btn-header {
    display: none !important;
}
.icon-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}
.icon-btn .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--color-red);
    border-radius: 50%;
    border: 1.5px solid var(--bg-main);
}

.notification-bell {
    position: relative;
}

/* Notifications Dropdown */
.notifications-dropdown {
    position: absolute;
    top: 48px;
    right: 0;
    width: 320px;
    border-radius: 12px;
    padding: 15px;
    z-index: 200;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Solid White Background & Dark Text for Contrast */
    background: #FFFFFF !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: #1E293B !important;
}

/* Dropdown Sub-element Colors */
.notifications-dropdown h4,
.notifications-dropdown .dropdown-header h4,
.notifications-dropdown .notification-item p,
.notifications-dropdown .notification-item strong,
.notifications-dropdown .notif-content p,
.notifications-dropdown .notif-content strong {
    color: #0F172A !important;
}

.notifications-dropdown .notification-item span,
.notifications-dropdown .notif-content span {
    color: #64748B !important;
}

.notifications-dropdown .dropdown-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.notifications-dropdown .dropdown-header button {
    color: #0284C7 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    font-weight: 600 !important;
}

.notifications-dropdown .dropdown-header button:hover {
    color: #0369a1 !important;
    text-decoration: underline !important;
}

.notifications-dropdown .notification-item:hover {
    background: rgba(0, 0, 0, 0.04) !important;
}

.notifications-dropdown .notification-item.unread {
    background: #F0F9FF !important;
}

.notifications-dropdown .notification-item.unread:hover {
    background: #E0F2FE !important;
}

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

.dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.dropdown-header h4 {
    font-size: 0.9rem;
    font-weight: 700;
}
.dropdown-header button {
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 240px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
}
.notification-item:hover {
    background: rgba(255,255,255,0.03);
}
.notification-item.unread {
    background: rgba(var(--accent-primary-rgb), 0.04);
}

.notif-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}
.notif-indicator.green { background: var(--color-green); }
.notif-indicator.violet { background: var(--accent-secondary); }
.notif-indicator.red { background: var(--color-red); }

.notif-content p {
    font-size: 0.78rem;
    color: var(--text-primary);
    line-height: 1.3;
}
.notif-content span {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

.profile-shortcut {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: border-color 0.25s;
}
.profile-shortcut:hover {
    border-color: var(--accent-primary);
}
.profile-shortcut img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Bottom Nav Menu Container (Hiddne by default, only shown on Mobile < 768px) */
.mobile-bottom-nav {
    display: none;
}

/* ==========================================================================
   CONTENT CONTROLS & VIEWS (dashboard, attendance, results)
   ========================================================================== */
.content-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==========================================================================
   PAGE: DASHBOARD OVERVIEW (pages/dashboard.html)
   ========================================================================== */
.overview-hero-section {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    padding: 35px;
    overflow: hidden;
    position: relative;
}

.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}
.session-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-secondary);
    background: rgba(var(--accent-secondary-rgb), 0.1);
    border: 1px solid rgba(var(--accent-secondary-rgb), 0.2);
}
.hero-left h1 {
    font-size: 2.2rem;
    font-weight: 800;
}
.highlight-text {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-left p {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.6;
    max-width: 520px;
}
.hero-buttons {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.overview-vector {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 12px 24px rgba(0,0,0,0.15));
}

/* KPI Metrics Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.kpi-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.kpi-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kpi-icon-wrapper.green-theme {
    background: var(--color-green-bg);
    color: var(--color-green);
}
.kpi-icon-wrapper.violet-theme {
    background: rgba(var(--accent-secondary-rgb), 0.12);
    color: var(--accent-secondary);
}
.kpi-icon-wrapper.amber-theme {
    background: var(--color-amber-bg);
    color: var(--color-amber);
}
.kpi-icon-wrapper.blue-theme {
    background: var(--color-blue-bg);
    color: var(--color-blue);
}

.kpi-info span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.kpi-info h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 4px 0;
}
.kpi-status {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.kpi-status.status-good { color: var(--color-green); }
.kpi-status.status-excellent { color: var(--accent-secondary); }
.kpi-status.status-warning { color: var(--color-amber); }
.kpi-status.status-danger { color: var(--color-red); }

.kpi-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
}
.kpi-progress {
    height: 100%;
    border-radius: 2px;
}
.kpi-progress.green { background: var(--color-green); }
.kpi-progress.violet { background: var(--accent-secondary); }
.kpi-progress.amber { background: var(--color-amber); }
.kpi-progress.blue { background: var(--color-blue); }

.hover-lift:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
}

/* Secondary Section Overview Grid */
.overview-secondary-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
}

.overview-countdown {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 15px;
}
.overview-countdown h3 {
    font-size: 1.3rem;
    font-weight: 700;
}
.overview-countdown p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.countdown-timer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
}
.timer-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: 12px;
    min-width: 65px;
}
.timer-segment span:first-child {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-primary);
}
.timer-segment span:last-child {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}
.timer-separator {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.syllabus-download {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--accent-primary);
}
.syllabus-download a {
    text-decoration: underline;
    font-weight: 600;
}

/* Mini ID Card */
.overview-mini-id {
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 15px;
}
.mini-id-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mini-id-header img {
    height: 32px;
}
.mini-id-header h4 {
    font-size: 0.9rem;
    font-weight: 700;
}
.mini-id-header p {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.mini-id-body {
    display: flex;
    gap: 15px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 12px;
}
.mini-id-photo-area {
    width: 65px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.mini-id-photo-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-id-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.mini-id-details .label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.mini-id-details .value {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ==========================================================================
   PAGE: ATTENDANCE TRACKER (pages/attendance.html)
   ========================================================================== */
.attendance-top-bar {
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.header-vector-small {
    height: 40px;
    width: auto;
}
.bar-left h2 {
    font-size: 1.3rem;
    font-weight: 700;
}
.bar-left p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.attendance-stat-widgets {
    display: flex;
    gap: 15px;
}
.stat-widget {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 10px;
    text-align: center;
}
.stat-widget span {
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 2px;
}
.stat-widget h3 {
    font-size: 1.25rem;
    font-weight: 800;
}
.stat-widget.highlight {
    background: rgba(var(--accent-primary-rgb), 0.1);
    border-color: rgba(var(--accent-primary-rgb), 0.2);
}
.stat-widget.highlight h3 {
    color: var(--accent-primary);
}
.text-green h3 { color: var(--color-green); }
.text-red h3 { color: var(--color-red); }

.attendance-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
}

/* Calendar Styling */
.attendance-calendar-card {
    padding: 25px;
}
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.calendar-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}
.calendar-arrow:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
}
.calendar-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.calendar-days-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day-cell {
    aspect-ratio: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.2s;
    position: relative;
    cursor: pointer;
}
.calendar-day-cell.inactive {
    color: var(--text-muted);
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}
.calendar-day-cell:not(.inactive):hover {
    transform: scale(1.08);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.calendar-day-cell.present {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-green);
    border-color: rgba(16, 185, 129, 0.2);
}
.calendar-day-cell.present::after {
    content: '';
    position: absolute;
    bottom: 5px;
    width: 4px;
    height: 4px;
    background-color: var(--color-green);
    border-radius: 50%;
}

.calendar-day-cell.absent {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-red);
    border-color: rgba(239, 68, 68, 0.2);
}
.calendar-day-cell.absent::after {
    content: '';
    position: absolute;
    bottom: 5px;
    width: 4px;
    height: 4px;
    background-color: var(--color-red);
    border-radius: 50%;
}

.calendar-day-cell.holiday {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.calendar-legend {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.legend-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.legend-item .dot.present { background: var(--color-green); }
.legend-item .dot.absent { background: var(--color-red); }
.legend-item .dot.holiday { background: var(--text-muted); }
.tooltip-legend {
    color: var(--accent-primary);
    font-weight: 500;
}

/* Timetable styling */
.timetable-card {
    padding: 25px;
}
.timetable-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
}
.timetable-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.timetable-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.timetable-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--border-color);
}
.timetable-item.active {
    background: rgba(var(--accent-primary-rgb), 0.02);
    border-color: rgba(var(--accent-primary-rgb), 0.15);
}
.timetable-item.break {
    opacity: 0.6;
    border-style: dashed;
}

.time-col {
    width: 135px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    border-right: 1px solid var(--border-color);
    padding-right: 12px;
}
.details-col {
    flex-grow: 1;
    padding-left: 15px;
}
.details-col h4 {
    font-size: 0.88rem;
    font-weight: 600;
}
.details-col p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.status-col {
    font-size: 0.75rem;
}
.status-indicator {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
}
.status-indicator.present {
    background: var(--color-green-bg);
    color: var(--color-green);
}
.status-indicator.holiday {
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
}

/* ==========================================================================
   PAGE: RESULTS & TRANSCRIPT LISTS (pages/results.html)
   ========================================================================== */
.results-header-bar {
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.results-banner-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.results-banner-left h2 {
    font-size: 1.3rem;
    font-weight: 700;
}
.results-banner-left p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cgpa-highlight-badge {
    display: flex;
    gap: 12px;
}
.cgpa-highlight-badge span {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    background: rgba(var(--accent-secondary-rgb), 0.12);
    border: 1px solid rgba(var(--accent-secondary-rgb), 0.2);
    color: var(--text-primary);
}
.cgpa-highlight-badge span strong {
    color: var(--accent-secondary);
    font-size: 1rem;
}

/* Semester tabs switcher */
.sem-tabs-wrapper {
    overflow-x: auto;
    padding-bottom: 4px;
}
.sem-nav {
    display: flex;
    gap: 10px;
}
.sem-tab-btn {
    padding: 10px 20px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-secondary);
    white-space: nowrap;
}
.sem-tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}
.sem-tab-btn.active {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #FFF;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(var(--accent-primary-rgb), 0.2);
}

.sem-metrics-card {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    text-align: center;
}
.metric-box {
    border-right: 1px solid var(--border-color);
    padding: 5px 0;
}
.metric-box:last-child {
    border-right: none;
}
.metric-box span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 5px;
}
.metric-box h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

/* Grades Table Card */
.grades-table-card {
    overflow-x: auto;
    padding: 15px;
}
.grades-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 700px;
}
.grades-table th {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-color);
}
.grades-table td {
    font-size: 0.88rem;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}
.grades-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.015);
}
.grades-table td.theory-cell, .grades-table td.lab-cell {
    font-weight: 600;
}
.text-green { color: var(--color-green) !important; }
.text-red { color: var(--color-red) !important; }

/* ==========================================================================
   WIDGETS: GPA SIMULATOR & ASSIGNMENTS (dashboard inside grids)
   ========================================================================== */
.calculator-hero {
    padding: 20px;
    margin-bottom: 5px;
}
.calculator-hero h2 {
    font-size: 1.15rem;
    font-weight: 700;
}
.calculator-hero p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.calculator-layout {
    display: grid;
    grid-template-columns: 1.3fr 1.1fr;
    gap: 15px;
}

.calc-panel {
    padding: 20px;
}
.calc-header {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}
.calc-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
}

.course-list-calc {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 5px;
}

.calc-row-item {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
}
.calc-row-item select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 6px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-primary);
    width: 100%;
}
.calc-row-item select:focus {
    border-color: var(--accent-primary);
    outline: none;
}
.calc-row-item .course-title-label {
    font-size: 0.8rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.calc-row-item .credits-lbl {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-align: center;
    background: rgba(255,255,255,0.03);
    padding: 4px;
    border-radius: 4px;
}

.calc-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gpa-result-card {
    padding: 20px;
    text-align: center;
}
.gpa-result-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.sgpa-display-large {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin: 10px 0;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.divider {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 12px 0;
}
.cgpa-meta-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}
.meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.grading-policy-card {
    padding: 15px;
}
.grading-policy-card h4 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.policy-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.policy-row {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr;
    font-size: 0.7rem;
    color: var(--text-secondary);
    padding: 2px 0;
    border-bottom: 1px solid var(--border-color);
}
.policy-row:last-child {
    border-bottom: none;
}

/* Assignments checklist view card styling */
.assignments-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.assignments-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
}
.assignments-header p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.assignments-progress-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 150px;
}
.assignments-progress-container span {
    font-size: 0.68rem;
    color: var(--text-secondary);
}
.progress-details {
    display: flex;
    align-items: center;
    gap: 8px;
}
.progress-track {
    flex-grow: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}
.progress-details span {
    font-size: 0.7rem;
    font-weight: 700;
}

.assignments-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 15px;
}

.assignments-list-panel {
    padding: 20px;
}

.tabs-sub {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}
.tabs-sub button {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.tabs-sub button.sub-tabactive {
    background: rgba(var(--accent-primary-rgb), 0.1);
    color: var(--accent-primary);
}

.assignments-container-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.assignment-item-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.015);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}
.assignment-item-card:hover {
    border-color: rgba(var(--accent-primary-rgb), 0.25);
    background: rgba(255,255,255,0.03);
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s;
    cursor: pointer;
}
.checkbox-custom:hover {
    border-color: var(--accent-primary);
}
.checkbox-custom.checked {
    background: var(--color-green);
    border-color: var(--color-green);
    color: #FFF;
}

.assignment-core-info {
    flex-grow: 1;
}
.assignment-core-info h4 {
    font-size: 0.88rem;
    font-weight: 600;
}
.assignment-item-card.completed h4 {
    text-decoration: line-through;
    color: var(--text-muted);
}
.assignment-core-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.meta-badges {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}
.badge-assign {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
}
.badge-assign.high { background: var(--color-red-bg); color: var(--color-red); }
.badge-assign.medium { background: var(--color-amber-bg); color: var(--color-amber); }
.badge-assign.low { background: var(--color-blue-bg); color: var(--color-blue); }

.badge-assign.pending { background: rgba(255,255,255,0.04); color: var(--text-secondary); }
.badge-assign.completed { background: var(--color-green-bg); color: var(--color-green); }

/* Profile edit form widget layout styling */
.profile-edit-card {
    padding: 20px;
    height: fit-content;
}
.profile-edit-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}
.profile-edit-card input, .profile-edit-card textarea {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-primary);
    width: 100%;
}
.profile-edit-card input:focus, .profile-edit-card textarea:focus {
    border-color: var(--accent-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--accent-primary-rgb), 0.15);
}
.profile-edit-card textarea {
    resize: none;
    height: 65px;
}

.photo-edit-field {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}
.photo-preview-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 1.5px solid var(--accent-primary);
}
.photo-preview-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-button-wrapper {
    position: relative;
    overflow: hidden;
}
.upload-btn-placeholder {
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.upload-button-wrapper:hover .upload-btn-placeholder {
    color: var(--text-primary);
    border-color: var(--accent-primary);
}
.upload-button-wrapper input[type="file"] {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0;
    cursor: pointer;
}

.save-success-msg {
    color: var(--color-green);
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 8px;
    text-align: center;
    animation: fadeIn 0.3s;
}

/* ==========================================================================
   DIGITAL HOLOGRAPHIC ID CARD MODAL
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
    transition: opacity 0.3s ease;
}

.modal-box {
    position: relative;
    width: 100%;
    max-width: 440px;
}

.modal-close-btn {
    position: absolute;
    top: -45px;
    right: 0;
    background: none;
    color: #FFF;
    font-size: 1.5rem;
}
.modal-close-btn:hover {
    color: var(--color-red);
}

/* perspective card */
.id-card-scene {
    width: 380px;
    height: 570px;
    margin: 0 auto;
    perspective: 1500px;
}

.id-card-container {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}
.id-card-container.flipped {
    transform: rotateY(180deg);
}

.id-card-side {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 24px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 2px 4px rgba(255,255,255,0.15);
}

/* Card Front Styling */
.id-card-front {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    color: #F8FAFC;
}

/* Card Back Styling */
.id-card-back {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    color: #F8FAFC;
    transform: rotateY(180deg);
}

/* Hologram Overlay strip */
.hologram-strip {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 35px;
    width: 18px;
    background: linear-gradient(180deg, 
        rgba(139, 92, 246, 0.3) 0%, 
        rgba(14, 165, 233, 0.3) 30%, 
        rgba(16, 185, 129, 0.3) 70%, 
        rgba(139, 92, 246, 0.3) 100%);
    opacity: 0.65;
    mix-blend-mode: color-dodge;
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.watermark-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(14,165,233,0.04) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.card-front-header {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    z-index: 2;
}
.card-header-logo {
    height: 38px;
    width: auto;
}
.card-header-title h3 {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #FFF;
}
.card-header-title p {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 0.5px;
}
.card-header-title span {
    font-size: 0.5rem;
    color: #94A3B8;
    display: block;
}

.card-front-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
    z-index: 2;
    gap: 15px;
}

.student-profile-frame {
    position: relative;
    width: 140px;
    height: 175px;
    padding: 4px;
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    border-radius: 8px;
}
.student-id-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}
.profile-frame-corner {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 2px solid var(--accent-primary);
}
.profile-frame-corner.tc { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.profile-frame-corner.tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.profile-frame-corner.bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.profile-frame-corner.br { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.student-identity-details {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.detail-row {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
}
.detail-row .lbl {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748B;
    width: 75px;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}
.detail-row .val {
    font-size: 0.78rem;
    font-weight: 600;
    color: #E2E8F0;
    line-height: 1.3;
}
.name-highlight {
    color: #FFF !important;
    font-weight: 800 !important;
}

.card-front-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 12px;
    z-index: 2;
}
.smart-chip {
    width: 32px;
    height: auto;
}
.chip-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.chip-tag {
    font-size: 0.5rem;
    color: #64748B;
    font-weight: 700;
}

.barcode-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.barcode-bars {
    display: flex;
    height: 20px;
    gap: 1.5px;
}
.barcode-bars span {
    background: #E2E8F0;
    height: 100%;
}
.b-w1 { width: 1.5px; }
.b-w2 { width: 3px; }
.b-w3 { width: 4.5px; }
.b-w4 { width: 6px; }
.barcode-text {
    font-size: 0.55rem;
    color: #94A3B8;
    margin-top: 3px;
    letter-spacing: 1px;
}

.click-to-flip-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.68rem;
    color: var(--accent-primary);
    font-weight: 600;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Card Back Details */
.card-back-header {
    border-bottom: 2px solid rgba(255,255,255,0.1);
    padding-bottom: 12px;
}
.card-back-header h4 {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--accent-secondary);
    letter-spacing: 1px;
    text-align: center;
}

.card-back-body {
    flex-grow: 1;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.regulations-list {
    list-style: decimal;
    padding-left: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.7rem;
    color: #94A3B8;
    line-height: 1.4;
}

.emergency-contact-box {
    margin-top: 20px;
    padding: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.08);
    border-radius: 8px;
    font-size: 0.65rem;
    text-align: center;
    color: #94A3B8;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.phone-link {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--accent-primary) !important;
}

.card-back-footer {
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 15px;
}
.signature-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.signature-svg {
    width: 120px;
    height: auto;
}
.signature-block span {
    font-size: 0.58rem;
    font-weight: 700;
    color: #64748B;
    letter-spacing: 1px;
}

/* ==========================================================================
   RESPONSIVE DESIGN SPECS (DESKTOP, TABLET, MOBILE SWAPPING)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TABLET VIEWPORT LAYOUT (768px to 1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Collapse Sidebar to icon-only view */
    .sidebar {
        width: 80px;
        padding: 25px 10px;
    }
    
    /* Hide Logo text details */
    .logo-text, .user-info, .nav-link span, .sidebar-control-btn span {
        display: none !important;
    }
    
    /* Center icons inside sidebar buttons */
    .sidebar-header, .user-mini-profile, .nav-link, .sidebar-control-btn {
        justify-content: center;
        gap: 0;
    }
    
    .user-mini-profile {
        padding: 8px;
        border-radius: 50%;
    }
    
    .nav-link {
        padding: 14px;
        justify-content: center;
    }
    .nav-link svg {
        margin: 0;
        width: 24px;
        height: 24px;
    }
    
    /* Shift main panel margins to prevent overlay */
    .main-panel {
        margin-left: 100px !important;
        padding-right: 15px;
    }
    
    /* Adjust grid flows */
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .overview-hero-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .hero-right {
        display: none;
    }
    .overview-secondary-grid, .attendance-layout, .calculator-layout, .assignments-layout {
        grid-template-columns: 1fr;
    }
    .login-container {
        width: 100%;
        max-width: 700px;
    }
}

/* --------------------------------------------------------------------------
   2. MOBILE VIEWPORT LAYOUT (< 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    /* Hide Left sidebars completely */
    .sidebar {
        display: none !important;
    }
    
    /* Remove sidebar margins on main content panel */
    .main-panel {
        margin-left: 0 !important;
        padding: 10px 10px 80px 10px; /* Add bottom padding to prevent bottom nav overlap */
        min-width: 0 !important;
        width: 100% !important;
    }
    .content-container {
        min-width: 0 !important;
        width: 100% !important;
    }

    /* Hide breadcrumb and date widget in header on mobile to prevent layout overflow */
    .breadcrumb, .date-widget {
        display: none !important;
    }
    
    /* Display modern mobile fixed Bottom Navigation Bar */
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 65px;
        background: var(--bg-sidebar);
        backdrop-filter: var(--glass-blur);
        -webkit-backdrop-filter: var(--glass-blur);
        border-top: 1px solid var(--border-color);
        z-index: 500;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
        padding: 0 10px;
    }
    
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: var(--text-secondary);
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        flex-grow: 1;
        height: 100%;
        text-align: center;
    }
    .mobile-nav-item svg {
        color: var(--text-muted);
        width: 22px;
        height: 22px;
        transition: color 0.2s;
    }
    .mobile-nav-item:hover, .mobile-nav-item.active {
        color: var(--accent-primary);
    }
    .mobile-nav-item.active svg {
        color: var(--accent-primary);
    }

    /* Homepage specifics */
    .home-navbar {
        padding: 0 20px;
    }
    .home-nav-links {
        display: none;
    }
    .hero-section {
        padding: 90px 20px 30px;
    }
    .hero-content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    .hero-badge, .hero-text-area p {
        align-self: center;
    }
    .hero-actions {
        justify-content: center;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 290px;
        margin: 15px auto 0;
        gap: 12px;
    }
    .hero-text-area h1 {
        font-size: 2.2rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .info-section {
        padding: 50px 20px;
    }
    .home-footer {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 30px 20px;
    }

    /* Login specifics */
    .login-container {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 420px;
    }
    .login-hero {
        display: none;
    }
    .login-form-area {
        padding: 30px 20px;
    }
    
    /* Overview, KPIs, Secondary details */
    .overview-hero-section {
        padding: 20px;
        grid-template-columns: 1fr;
    }
    .hero-left h1 {
        font-size: 1.7rem;
    }
    .hero-right {
        display: none;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .overview-secondary-grid, .attendance-layout, .calculator-layout, .assignments-layout {
        grid-template-columns: 1fr;
    }
    .countdown-timer {
        gap: 6px;
    }
    .timer-segment {
        min-width: 50px;
        padding: 8px 10px;
    }
    .timer-segment span:first-child {
        font-size: 1.4rem;
    }
    .timer-separator {
        font-size: 1.2rem;
    }

    /* Attendance page elements */
    .attendance-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }
    .attendance-stat-widgets {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .stat-widget {
        padding: 8px;
    }
    .attendance-calendar-card {
        padding: 15px 10px;
    }
    .calendar-grid {
        gap: 4px;
    }
    .timetable-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .time-col {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0;
        padding-bottom: 6px;
    }
    .details-col {
        padding-left: 0;
    }
    .status-col {
        align-self: flex-end;
    }

    /* Results page elements */
    .results-header-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 15px;
    }
    .results-banner-left {
        gap: 10px;
    }
    .results-banner-left h2 {
        font-size: 1.15rem;
    }
    .results-banner-left p {
        font-size: 0.78rem;
    }
    .cgpa-highlight-badge {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 8px;
    }
    .cgpa-highlight-badge span {
        text-align: center;
        width: 100%;
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    .cgpa-highlight-badge span strong {
        font-size: 0.9rem;
    }
    .sem-tabs-wrapper {
        overflow-x: auto;
        padding-bottom: 4px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .sem-tabs-wrapper::-webkit-scrollbar {
        display: none;
    }
    .sem-nav {
        gap: 6px;
    }
    .sem-tab-btn {
        padding: 8px 12px;
        font-size: 0.78rem;
    }
    .sem-metrics-card {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 15px;
    }
    .metric-box {
        border-right: none;
        background: rgba(255,255,255,0.015);
        border: 1px solid var(--border-color);
        padding: 10px;
        border-radius: 8px;
    }
    .grades-table-card {
        padding: 8px;
        border-radius: 12px;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .grades-table {
        min-width: 650px;
    }
    .grades-table th {
        padding: 10px 8px;
        font-size: 0.7rem;
    }
    .grades-table td {
        padding: 10px 8px;
        font-size: 0.78rem;
    }

    /* GPA Simulator rows */
    .calc-row-item {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .calc-row-item .course-title-label {
        grid-column: span 2;
    }
    .calc-row-item .credits-lbl {
        font-size: 0.72rem;
    }

    /* Assignments */
    .assignments-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    /* ID Card responsiveness */
    .id-card-scene {
        width: 100%;
        max-width: 320px;
        height: 520px;
    }
    .student-profile-frame {
        width: 110px;
        height: 145px;
    }
    .card-front-header h3 {
        font-size: 0.85rem;
    }
    .card-front-header p {
        font-size: 0.58rem;
    }
    .detail-row .lbl {
        width: 60px;
    }

    /* Fix notifications dropdown positioning on mobile */
    .notification-bell {
        position: static !important;
    }
    .notifications-dropdown {
        position: absolute !important;
        top: 75px !important;
        left: 15px !important;
        right: 15px !important;
        width: auto !important;
        max-width: none !important;
        z-index: 999 !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
    }
    .theme-toggle-btn-header {
        display: flex !important;
    }
}

/* --------------------------------------------------------------------------
   3. EXTRA NARROW MOBILE SCALING (< 360px)
   -------------------------------------------------------------------------- */
@media (max-width: 360px) {
    .id-card-scene {
        transform: scale(0.88);
        transform-origin: center center;
        margin: -25px auto;
    }
}

/* --------------------------------------------------------------------------
   4. READ-ONLY STATE OVERRIDES
   -------------------------------------------------------------------------- */
.checkbox-custom.read-only {
    cursor: default !important;
}
.checkbox-custom.read-only:hover {
    border-color: var(--text-muted) !important;
}
.checkbox-custom.checked.read-only:hover {
    border-color: var(--color-green) !important;
}
.calendar-day-cell.read-only {
    cursor: default !important;
}
.calendar-day-cell.read-only:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   5. MOBILE/TABLET HEADER LOGO STYLING
   -------------------------------------------------------------------------- */
.header-logo-mobile-tab {
    display: none;
}
.mobile-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
}

@media (max-width: 1024px) {
    .header-logo-mobile-tab {
        display: flex;
        align-items: center;
        margin-right: 12px;
    }
}
