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

:root {
    --primary: #5A4FCF;
    --primary-rgb: 90, 79, 207;
    --primary-dark: #4b41ba;
    --primary-light: #EBEBFA;
    --accent: #5A4FCF;
    --accent-rgb: 90, 79, 207;
    --bg-dark: #0f172a;
    --bg-light: #EBEBFA;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.1);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 32px;
    --sidebar-width: 280px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

h1, h2, h3, h4, .sidebar-logo h2 {
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #f8fafc;
    overflow: hidden;
}

.bg-overlay::before, .bg-overlay::after {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
    animation: float-bg 20s infinite alternate;
}

.bg-overlay::before {
    background: var(--primary);
    top: -200px;
    left: -200px;
}

.bg-overlay::after {
    background: var(--accent);
    bottom: -200px;
    right: -200px;
    animation-delay: -10s;
}

@keyframes float-bg {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 100px) scale(1.1); }
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Auth Wrapper */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.auth-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    align-items: center;
    gap: 40px;
    justify-content: space-between;
}

/* Left side info */
.auth-info {
    flex: 1;
    max-width: 550px;
}

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

.auth-logo img {
    width: 45px;
}

.auth-logo h2 {
    font-size: 1.5rem;
    color: var(--bg-dark);
    margin: 0;
    line-height: 1.1;
}

.auth-logo span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-title {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--bg-dark);
}

.auth-desc {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.5;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feature-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.feature-text h4 {
    margin: 0 0 5px 0;
    color: var(--bg-dark);
    font-size: 1.1rem;
}

.feature-text p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Right side login */
.auth-login {
    flex: 0 0 460px;
}

.login-card {
    background: white;
    padding: 35px 40px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    text-align: center;
    transition: var(--transition);
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -10px rgba(var(--primary-rgb), 0.15);
}

.logo-section img {
    width: 50px;
    height: auto;
    margin-bottom: 10px;
}

.logo-section h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--bg-dark);
    margin-bottom: 5px;
}

.logo-section .subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Role Selector */
.role-selector {
    display: flex;
    position: relative;
    gap: 0;
    margin-bottom: 32px;
    background: rgba(0,0,0,0.04);
    padding: 6px;
    border-radius: var(--radius-md);
    z-index: 1;
}

.role-indicator {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 6px;
    width: calc(33.333% - 4px);
    background: var(--primary);
    border-radius: calc(var(--radius-md) - 4px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.role-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    z-index: 2;
}

.role-btn.active {
    color: white;
}

.role-btn i {
    font-size: 1.1rem;
    transition: var(--transition);
}

.role-btn.active i {
    transform: scale(1.1);
}

/* Form Styles */
.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--bg-dark);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i:not(.toggle-password) {
    position: absolute;
    left: 15px;
    color: #a0aec0;
}

.input-with-icon input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: 0.3s;
}

.input-with-icon input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.toggle-password {
    position: absolute;
    right: 15px;
    color: #a0aec0;
    cursor: pointer;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
}

.forgot-pwd {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.login-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.login-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.login-btn .btn-icon {
    position: absolute;
    right: 15px;
    background: white;
    color: var(--primary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider span {
    padding: 0 15px;
}

.social-login {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--bg-dark);
    transition: 0.3s;
}

.social-btn img {
    width: 20px;
}

.social-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.login-footer {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.footer-copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 20px;
}

/* ===== LOGIN RESPONSIVE ===== */
@media (max-width: 1024px) {
    .auth-container {
        gap: 30px;
    }
    .auth-login {
        flex: 0 0 420px;
    }
}

@media (max-width: 900px) {
    .auth-wrapper {
        padding: 24px 20px;
        justify-content: flex-start;
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }
    .auth-container {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    .auth-info {
        max-width: 100%;
        text-align: center;
    }
    .auth-logo {
        justify-content: center;
    }
    .feature-list {
        display: none; /* hide on small screens to save space */
    }
    .auth-login {
        flex: none;
        width: 100%;
        max-width: 460px;
    }
}

@media (max-width: 480px) {
    .auth-wrapper {
        padding: 20px 16px;
    }
    .auth-title, .auth-desc {
        display: none;
    }
    .auth-login {
        margin-top: 20px;
    }
    .login-card {
        padding: 28px 20px;
        border-radius: 20px;
    }
    .role-btn {
        font-size: 0.8rem;
        gap: 5px;
        padding: 10px 4px;
    }
    .role-btn span {
        display: none; /* just icons on tiny screens */
    }
    .role-btn i {
        font-size: 1.2rem;
    }
    .social-login {
        flex-direction: column;
        gap: 10px;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: none;
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background: var(--primary);
    color: white;
}
.dashboard-view {
    display: none;
    flex-direction: row;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.sidebar::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
    transition: var(--transition);
}

.sidebar-logo:hover {
    transform: scale(1.05);
}

.sidebar-logo img {
    width: 40px;
    filter: drop-shadow(0 4px 8px rgba(var(--primary-rgb), 0.2));
    transition: var(--transition);
}

.sidebar-logo:hover img {
    transform: rotate(-10deg);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.9rem;
}

.nav-item i {
    width: 20px;
    font-size: 1.1rem;
    opacity: 0.6;
    transition: var(--transition);
}

.nav-item:hover {
    background: var(--primary-light);
    color: var(--primary);
    padding-left: 22px;
}

.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 20px -6px rgba(var(--primary-rgb), 0.4);
}

.nav-item.active i {
    opacity: 1;
    transform: scale(1.1);
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 40px 60px;
    flex: 1;
    min-height: 100vh;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.6);
    padding: 6px 16px 6px 6px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    transition: var(--transition);
}

.user-profile:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transform: scale(1.02);
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}

/* Modules Grid */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

@media (max-width: 480px) {
    .modules-grid {
        grid-template-columns: 1fr;
    }
}

.module-card {
    padding: 32px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.5);
}

.module-card:hover {
    transform: translateY(-8px);
    background: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.module-icon {
    width: 60px;
    height: 60px;
    background: white;
    color: var(--primary);
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    margin-bottom: 24px;
    transition: var(--transition);
    box-shadow: 0 8px 15px -3px rgba(var(--primary-rgb), 0.1);
}

.module-card:hover .module-icon {
    background: var(--primary);
    color: white;
    transform: rotate(-5deg) scale(1.1);
    box-shadow: 0 10px 20px -5px rgba(var(--primary-rgb), 0.3);
}

.module-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--bg-dark);
    letter-spacing: -0.01em;
}

.module-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Modal Overlay & Content */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 24px;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 800px;
    border-radius: var(--radius-lg);
    padding: 48px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255,255,255,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.close-btn:hover {
    background: #e2e8f0;
    color: var(--bg-dark);
}

/* Construction View */
.construction-view {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 40px;
}

.construction-icon {
    font-size: 5rem;
    color: var(--primary);
    margin-bottom: 24px;
}

/* Premium UI Components for Modals — does NOT override .input-with-icon inputs in login */
.glass-select,
.glass-textarea,
.modal-body input[type="text"],
.modal-body input[type="email"],
.modal-body input[type="number"],
.modal-body input[type="tel"],
.modal-body input[type="date"],
.modal-body input[type="password"],
.modal-body select,
.modal-body textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.93rem;
    font-family: 'Inter', system-ui, sans-serif;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.glass-select:focus,
.glass-textarea:focus,
.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(90, 79, 207, 0.1);
}

.modal-body input[readonly],
.input-group input[readonly] {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}


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

/* Scrollable table wrapper on mobile */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
}

.premium-table th {
    text-align: left;
    padding: 16px;
    background: rgba(0,0,0,0.02);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.premium-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 0.95rem;
}

.badge {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge.present { background: #dcfce7; color: #166534; }
.badge.absent { background: #fee2e2; color: #991b1b; }
.badge.leave { background: #fef3c7; color: #92400e; }
.clickable-status { cursor: pointer; user-select: none; }
.clickable-status:hover { background: rgba(0,0,0,0.05); }

.progress-item { margin-bottom: 20px; }
.progress-info { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 12px; 
    font-weight: 700; 
    font-size: 0.95rem; 
    color: var(--bg-dark);
}

.progress-bar { 
    height: 10px; 
    background: #f1f5f9; 
    border-radius: 100px; 
    overflow: hidden; 
}

.progress-bar .fill { 
    height: 100%; 
    background: var(--primary); 
    border-radius: 100px; 
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.3);
}

.mini-progress { height: 4px; background: rgba(0,0,0,0.05); border-radius: 2px; overflow: hidden; }
.mini-progress .fill { height: 100%; background: var(--primary); border-radius: 2px; }

.tab-chip {
    padding: 6px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
}

.tab-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.file-upload-box {
    border: 2px dashed rgba(0,0,0,0.1);
    border-radius: var(--radius-md);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.file-upload-box:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-input {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}

.stat-card-mini {
    background: white;
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid #f1f5f9;
    transition: var(--transition);
}

.stat-card-mini:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 20px -10px rgba(var(--primary-rgb), 0.2);
}

.stat-card-mini .num { display: block; font-size: 1.75rem; font-weight: 800; color: var(--primary); font-family: 'Outfit', sans-serif; }
.stat-card-mini .lab { font-size: 0.8rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card-mini.urgent .num { color: #ef4444; }

.assessment-item {
    background: white;
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid #f1f5f9;
    margin-bottom: 16px;
    transition: var(--transition);
}

.assessment-item:hover {
    border-color: var(--primary);
}

.assessment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.assessment-header h4 { font-weight: 700; color: var(--bg-dark); }
.status-tag { font-size: 0.7rem; font-weight: 800; color: #ef4444; background: #fee2e2; padding: 2px 8px; border-radius: 4px; }

.premium-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: white;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 1px solid #f1f5f9;
    transition: var(--transition);
}

.premium-list-item:hover { 
    border-color: var(--primary); 
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.05);
    transform: translateX(4px);
}

.premium-list-item .info .title { display: block; font-weight: 700; color: var(--bg-dark); font-size: 1.1rem; }
.premium-list-item .info .subtitle { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }

.action-btn {
    padding: 8px 16px;
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Attendance Toggle Group */
.attendance-toggle {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    width: fit-content;
}

.at-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
}

.at-btn:hover {
    background: white;
}

.at-btn.active.p { background: #10b981; color: white; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4); }
.at-btn.active.a { background: #ef4444; color: white; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4); }
.at-btn.active.l { background: #f59e0b; color: white; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4); }

/* Tracking Toggle Group */
.tracking-toggle {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    margin-top: 16px;
}

.tr-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.tr-btn:hover { background: white; }
.tr-btn.active { background: white; color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.tr-btn.active.done { color: #22c55e; }

.student-entry-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.student-meta { display: flex; align-items: center; gap: 12px; }
.avatar-small { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: white; display: flex; justify-content: center; align-items: center; font-size: 0.8rem; font-weight: 700; }
.mark-input {
    width: 60px !important;
    padding: 8px !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    border-radius: 6px !important;
    text-align: center;
    font-weight: 700;
    outline: none;
    background: white !important;
    box-shadow: none !important;
}
.mark-input:focus { border-color: var(--primary) !important; }

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: white;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.07);
    z-index: 1500;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav .nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.6rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s ease;
    width: 64px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 8px 4px;
    border-radius: 12px;
}

.bottom-nav .nav-btn i {
    font-size: 1.35rem;
    transition: transform 0.2s ease;
}

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

.bottom-nav .nav-btn.active i {
    transform: scale(1.15);
}

.bottom-nav.hidden {
    display: none !important;
}

@media (max-width: 1024px) {
    .main-content {
        padding: 40px 30px;
    }
}

/* ===== DASHBOARD MOBILE (768px) ===== */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex !important;
    }

    /* Sidebar becomes a drawer */
    .sidebar,
    .minimal-sidebar {
        position: fixed !important;
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
        width: 280px !important;
        z-index: 1050 !important;
        box-shadow: 4px 0 30px rgba(0,0,0,0.15) !important;
        background: white !important;
        height: 100vh !important;
        overflow-y: auto !important;
        display: block !important;
    }

    .dashboard-view,
    .minimal-view {
        width: 100% !important;
    }

    /* Fix ghost gap by converting active flex containers to block on mobile */
    #teacher-section[style*="display: flex"],
    #student-section[style*="display: flex"],
    #teacher-section[style*="display: block"],
    #student-section[style*="display: block"] {
        display: block !important;
    }

    .sidebar.active,
    .minimal-sidebar.active {
        transform: translateX(0) !important;
    }

    /* Dim background overlay when drawer open */
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1049;
        backdrop-filter: blur(2px);
    }
    .sidebar-backdrop.active {
        display: block;
    }

    /* Main content full width */
    .main-content {
        margin-left: 0 !important;
        padding: 88px 16px 100px !important;
        width: 100% !important;
    }

    .minimal-content {
        margin-left: 0 !important;
        padding: 80px 16px 100px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Bottom nav visible */
    .bottom-nav {
        display: flex !important;
    }

    /* Minimal header on mobile */
    .minimal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 0 0 20px 0;
    }
    .minimal-header h2 {
        font-size: 1.4rem !important;
    }
    .minimal-header p {
        font-size: 0.82rem;
    }
    .header-right {
        width: 100%;
        gap: 10px;
    }
    .search-bar {
        flex: 1;
    }
    .search-bar input {
        width: 100%;
    }

    /* Stat cards: 2 columns */
    .stat-cards-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .stat-card {
        padding: 16px 14px;
    }
    .stat-card h2 {
        font-size: 1.6rem;
    }

    /* Dashboard grid: single column */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .grid-col-left,
    .grid-col-middle,
    .grid-col-right {
        grid-column: 1 !important;
    }

    /* Quick actions: 3 per row */
    .quick-actions {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px;
    }
    .quick-actions button {
        padding: 12px 8px;
        font-size: 0.78rem;
        flex-direction: column;
        gap: 6px;
    }
    .quick-actions button i {
        font-size: 1.2rem;
    }

    /* Mini charts: 2 columns */
    .mini-charts {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    .mini-chart {
        padding: 14px 12px;
    }

    /* Schedule items */
    .schedule-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* Panel padding */
    .panel {
        padding: 18px 16px;
        border-radius: 16px;
    }

    /* Modal */
    .modal-content {
        padding: 28px 18px;
        max-height: 95vh;
        border-radius: 20px;
    }
    .modal-header h2 {
        font-size: 1.2rem;
    }

    .premium-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .premium-list-item .action-btn,
    .premium-list-item .badge {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .header {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 28px;
    }
    .header h2 {
        font-size: 1.55rem;
    }
    .user-profile {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ===== SMALL MOBILE (480px) ===== */
@media (max-width: 480px) {
    .minimal-header h2 {
        font-size: 1.25rem !important;
    }
    .stat-cards-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .stat-card h2 {
        font-size: 1.4rem;
    }
    .quick-actions {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) !important;
        gap: 10px !important;
    }
    .quick-actions button {
        padding: 10px 12px !important;
        font-size: 0.8rem !important;
        gap: 8px !important;
    }
    .quick-actions button i {
        font-size: 1rem !important;
    }
    .mini-charts {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .panel {
        padding: 16px 14px;
        border-radius: 14px;
        margin-bottom: 14px;
    }
    .module-card {
        padding: 20px 16px;
    }
    .module-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    .header h2 {
        font-size: 1.3rem;
    }

    /* Modal: collapse 2-col grids to single column on very small screens */
    .modal-content {
        padding: 24px 16px;
        max-height: 92vh;
        width: 95%;
    }
    .modal-body [style*="grid-template-columns: 1fr 1fr"],
    .modal-body [style*="grid-template-columns: repeat(2"],
    .modal-body [style*="grid-template-columns: repeat(3"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* MINIMAL DASHBOARD STYLES */
.minimal-view {
    background: #f4f6fc;
    width: 100%;
    overflow-x: hidden;
}

.minimal-sidebar {
    background: white;
    border-right: 1px solid #eef0f7;
    padding: 0;
    width: 250px;
    overflow-y: auto !important;
    overflow-x: hidden;
    scrollbar-width: none;
}
.minimal-sidebar::-webkit-scrollbar { display: none; }

.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}
.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-menu::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.sidebar-logo {
    padding: 30px 24px;
    margin: 0;
    border-bottom: 1px solid #f8fafc;
}

.sidebar-logo h2 {
    color: #1e293b;
    font-size: 1.4rem;
    font-weight: 800;
}

.sidebar-menu {
    padding: 20px 0;
    flex-grow: 1;
    overflow-y: auto;
}

.nav-section {
    padding: 20px 24px 8px;
    font-size: 0.65rem;
    font-weight: 800;
    color: #cbd5e1;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.minimal-sidebar .nav-item {
    margin: 4px 15px;
    padding: 10px 15px !important;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
}

.minimal-sidebar .nav-item.active {
    background: #6366f1;
    color: white;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.minimal-sidebar .nav-item:hover:not(.active) {
    background: #f8fafc;
    color: #1e293b;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #eef0f7;
    /* Ensure logout stays above bottom nav on mobile */
    margin-top: auto;
}

.sidebar-footer .logout {
    color: #ef4444;
}

.sidebar-footer .logout:hover {
    background: #fef2f2;
}

@media (max-width: 768px) {
    .sidebar-footer {
        padding: 20px 20px 90px; /* 90px = bottom nav height + safe gap */
    }
}


/* Main Content */
.minimal-content {
    margin-left: 250px;
    padding: 30px 40px;
    width: calc(100% - 250px);
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

.minimal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-left h2 {
    font-size: 1.6rem;
    color: #1e293b;
    font-weight: 800;
    margin-bottom: 5px;
}

.header-left p {
    color: #64748b;
    font-size: 0.9rem;
}

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

.search-bar {
    position: relative;
    width: 300px;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #eef0f7 !important;
    border-radius: 20px !important;
    background: white !important;
    font-size: 0.9rem;
    outline: none;
    box-shadow: none !important;
    -webkit-appearance: none;
}

.search-bar input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.notification-bell {
    position: relative;
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #eef0f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
}

.notification-bell .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 8px 15px 8px 8px;
    border-radius: 30px;
    border: 1px solid #eef0f7;
    cursor: pointer;
}

.user-profile .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-info .name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1e293b;
}

.profile-info .dept {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Stat Cards */
.stat-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.stat-icon.purple { background: #eef2ff; color: #6366f1; }
.stat-icon.blue { background: #eff6ff; color: #3b82f6; }
.stat-icon.green { background: #f0fdf4; color: #22c55e; }
.stat-icon.yellow { background: #fefce8; color: #eab308; }
.stat-icon.pink { background: #fdf2f8; color: #ec4899; }
.stat-icon.orange { background: #fff7ed; color: #f97316; }

.stat-header h4 {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.stat-card h2 {
    font-size: 1.8rem;
    color: #1e293b;
    margin-bottom: 5px;
}

.stat-card p {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0;
}

.text-green { color: #22c55e; font-weight: 600; }
.text-orange { color: #f59e0b; font-weight: 600; }

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    align-items: start;
}

.grid-col-left,
.grid-col-middle,
.grid-col-right {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.panel {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    margin-bottom: 24px;
    border: 1px solid #f1f5f9;
}

.panel.h-100 { height: 100%; margin-bottom: 0; }

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.panel-header a {
    font-size: 0.85rem;
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
}

/* Schedule */
.schedule-list {
    display: flex;
    flex-direction: column;
}

.schedule-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f8fafc;
}

.schedule-item:last-child { border: none; margin: 0; padding: 0; }

.schedule-item .time {
    font-size: 0.8rem;
    color: #64748b;
    width: 130px;
    position: relative;
    padding-left: 15px;
}
.schedule-item .time::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 3px;
}
.schedule-item:nth-child(1) .time::before { background: #22c55e; }
.schedule-item:nth-child(2) .time::before { background: #22c55e; }
.schedule-item:nth-child(n+3) .time::before { background: #3b82f6; }

.schedule-item .details { flex: 1; }
.schedule-item .details h4 { font-size: 0.95rem; color: #1e293b; margin: 0 0 2px 0; }
.schedule-item .details p { font-size: 0.8rem; color: #94a3b8; margin: 0; }

.pill {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.pill.green  { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.pill.blue   { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.pill.orange { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.quick-actions button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 10px;
    border: 1px solid rgba(0,0,0,0.05);
    background: white;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 700;
    color: #1e293b;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.quick-actions button:hover { 
    background: white; 
    border-color: var(--primary); 
    color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(90, 79, 207, 0.12);
}
.quick-actions button i { font-size: 1.5rem; transition: transform 0.3s ease; }
.quick-actions button:hover i { transform: scale(1.1); }
.quick-actions button i.purple { color: #6366f1; }
.quick-actions button i.blue { color: #3b82f6; }
.quick-actions button i.green { color: #10b981; }
.quick-actions button i.orange { color: #f59e0b; }
.quick-actions button i.pink { color: #ec4899; }

/* Recent Activity */
.activity-row {
    display: flex;
    gap: 15px;
}

.activity-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
}
.act-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.act-icon.green { background: #dcfce7; color: #22c55e; }
.act-icon.blue { background: #dbeafe; color: #3b82f6; }
.act-icon.orange { background: #fef3c7; color: #f59e0b; }
.act-icon.purple { background: #e0e7ff; color: #6366f1; }
.act-text p { font-size: 0.75rem; color: #64748b; margin: 0 0 2px 0; }
.act-text h4 { font-size: 0.85rem; color: #1e293b; margin: 0 0 5px 0; }
.act-text span { font-size: 0.7rem; color: #94a3b8; }

/* Mini Charts */
.minimal-select {
    padding: 5px 10px;
    border: 1px solid #eef0f7;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #64748b;
    background: white;
    outline: none;
}
.mini-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}
.mini-chart { padding: 15px; border: 1px solid #f1f5f9; border-radius: 12px; }
.mini-chart p { font-size: 0.8rem; color: #64748b; margin: 0 0 5px 0; }
.mini-chart h3 { font-size: 1.4rem; color: #1e293b; margin: 0 0 10px 0; }

.chart-container { position: relative; height: 250px; display: flex; margin-top: 20px; }
.y-axis { display: flex; flex-direction: column; justify-content: space-between; font-size: 0.75rem; color: #94a3b8; padding-right: 15px; padding-bottom: 20px;}
.chart-area { flex: 1; display: flex; flex-direction: column; }
.x-axis { display: flex; justify-content: space-between; font-size: 0.75rem; color: #94a3b8; margin-top: 10px; }

/* Notifications */
.notif-item { display: flex; gap: 15px; margin-bottom: 20px; align-items: flex-start; }
.n-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.95rem; }
.n-icon.purple-bg { background: #eef2ff; color: #6366f1; }
.n-icon.orange-bg { background: #fff7ed; color: #f97316; }
.n-icon.green-bg { background: #f0fdf4; color: #22c55e; }
.n-icon.blue-bg { background: #eff6ff; color: #3b82f6; }
.n-text p { font-size: 0.85rem; color: #1e293b; margin: 0; line-height: 1.4; }
.n-time { font-size: 0.75rem; color: #94a3b8; white-space: nowrap; margin-left: auto; }

/* Pending Tasks */
.task-item { display: flex; align-items: center; gap: 15px; padding: 12px 0; border-bottom: 1px solid #f8fafc; cursor: pointer; }
.task-item:last-child { border: none; }
.task-item span:nth-child(2) { flex: 1; font-size: 0.9rem; color: #1e293b; }
.badge { padding: 4px 8px; border-radius: 6px; font-size: 0.7rem; font-weight: 600; }
.badge.red { background: #fef2f2; color: #ef4444; }
.badge.orange { background: #fff7ed; color: #f97316; }
.badge.blue { background: #eff6ff; color: #3b82f6; }

/* Upcoming Events */
.event-item { display: flex; gap: 15px; margin-bottom: 16px; }
.event-item:last-child { margin-bottom: 0; }
.e-date { display: flex; flex-direction: column; align-items: center; background: #f8fafc; padding: 10px; border-radius: 10px; min-width: 55px; }
.e-date span { font-size: 0.7rem; font-weight: 700; color: #64748b; }
.e-date h3 { font-size: 1.2rem; color: #1e293b; margin: 0; }
.e-details h4 { font-size: 0.95rem; color: #1e293b; margin: 0 0 5px 0; }
.e-details p { font-size: 0.85rem; color: #94a3b8; margin: 0; }

.minimal-footer { display: flex; justify-content: space-between; align-items: center; padding: 20px 0 0; border-top: 1px solid #eef0f7; color: #64748b; font-size: 0.85rem; margin-top: 20px; }
.footer-links a { color: #64748b; text-decoration: none; margin-left: 20px; }

@media (max-width: 1400px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
    .grid-col-right {
        grid-column: span 2;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 25px;
    }
}
@media (max-width: 1100px) {
    .stat-cards-row {
        grid-template-columns: repeat(3, 1fr);
    }
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
    .grid-col-right {
        grid-column: span 2;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

/* =============================================
   MOBILE TEACHER DASHBOARD — MATCH SCREENSHOT
   ============================================= */

/* Mobile top header bar — hidden on desktop */
.mobile-top-header {
    display: none;
}

@media (max-width: 768px) {

    /* Hide desktop header, sidebar toggle btn, and minimal-header */
    .minimal-sidebar { display: block !important; }
    #mobile-toggle, .mobile-menu-btn { display: none !important; }
    .minimal-header { display: none !important; }

    /* ── Mobile top header ── */
    .mobile-top-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 900;
        background: white;
        padding: 14px 18px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.07);
        gap: 10px;
    }

    .mob-menu-btn {
        background: none;
        border: none;
        font-size: 1.3rem;
        color: #1e293b;
        cursor: pointer;
        padding: 4px;
        flex-shrink: 0;
    }

    .mob-header-title {
        flex: 1;
    }
    .mob-header-title h2 {
        font-size: 0.98rem;
        font-weight: 800;
        color: #1e293b;
        line-height: 1.2;
        margin: 0;
        font-family: 'Outfit', sans-serif;
    }
    .mob-header-title p {
        font-size: 0.75rem;
        color: #64748b;
        margin: 0;
        font-weight: 500;
    }

    .mob-header-actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mob-notif {
        position: relative;
        width: 38px;
        height: 38px;
        background: #f8fafc;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        color: #475569;
        cursor: pointer;
    }
    .mob-badge {
        position: absolute;
        top: -2px;
        right: -2px;
        background: #ef4444;
        color: white;
        font-size: 0.55rem;
        font-weight: 800;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mob-avatar {
        width: 38px;
        height: 38px;
        background: linear-gradient(135deg, #5A4FCF, #7c6fe0);
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 0.75rem;
        cursor: pointer;
        flex-shrink: 0;
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .mob-avatar:active {
        transform: scale(0.92);
    }
    /* Student avatar — teal gradient */
    #student-section .mob-avatar {
        background: linear-gradient(135deg, #0d9488, #06b6d4);
    }

    .mob-notif {
        transition: background 0.15s ease;
    }
    .mob-notif:active {
        background: #e2e8f0;
    }

    /* ── Minimal content push down for fixed header ── */
    /* (handled above in the first 768px block — no duplicate needed) */

    /* ── Stat cards: 2×3 grid matching screenshot ── */
    .stat-cards-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
        margin-bottom: 20px;
    }

    .stat-card {
        background: white;
        border-radius: 18px;
        padding: 16px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06);
        border: none;
        min-height: 110px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .stat-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 8px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .stat-card h4 {
        font-size: 0.78rem;
        color: #64748b;
        font-weight: 600;
        margin: 0;
        line-height: 1.2;
    }

    .stat-card h2 {
        font-size: 1.7rem !important;
        font-weight: 800;
        color: #1e293b;
        margin: 4px 0 2px;
        font-family: 'Outfit', sans-serif;
    }

    .stat-card p {
        font-size: 0.75rem;
        margin: 0;
    }

    /* ── Dashboard grid: single column ── */
    .dashboard-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
    }

    /* ── Schedule items — left border style from screenshot ── */
    .schedule-list {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .schedule-item {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 0;
        border-bottom: 1px solid #f1f5f9;
        position: relative;
        flex-direction: row !important;
    }
    .schedule-item:last-child { border-bottom: none; }

    .schedule-item .time {
        font-size: 0.72rem;
        color: #64748b;
        font-weight: 600;
        min-width: 68px;
        padding-top: 2px;
        flex-shrink: 0;
        /* Remove the left-border pseudo from desktop on mobile */
        padding-left: 0;
    }
    .schedule-item .time::before { display: none; }

    .schedule-item .details {
        flex: 1;
    }
    .schedule-item .details h4 {
        font-size: 0.9rem;
        font-weight: 700;
        color: #1e293b;
        margin: 0 0 2px;
    }
    .schedule-item .details p {
        font-size: 0.75rem;
        color: #94a3b8;
        margin: 0;
    }

    /* ── Quick Actions: 3-column icon grid like screenshot ── */
    .quick-actions {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
    }

    .quick-actions button {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        padding: 18px 8px !important;
        background: white !important;
        border: 1px solid #f1f5f9 !important;
        border-radius: 16px !important;
        font-size: 0.72rem !important;
        font-weight: 700 !important;
        color: #1e293b !important;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    .quick-actions button:active {
        transform: scale(0.96);
    }

    .quick-actions button i {
        font-size: 1.5rem !important;
        display: block;
    }

    /* Colorful icon backgrounds for quick actions */
    .quick-actions button:nth-child(1) i { color: #5A4FCF; }
    .quick-actions button:nth-child(2) i { color: #3b82f6; }
    .quick-actions button:nth-child(3) i { color: #22c55e; }
    .quick-actions button:nth-child(4) i { color: #f59e0b; }
    .quick-actions button:nth-child(5) i { color: #ef4444; }
    .quick-actions button:nth-child(6) i { color: #8b5cf6; }

    /* ── Task list ── */
    .task-list {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .task-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 13px 0;
        border-bottom: 1px solid #f8fafc;
        cursor: pointer;
    }
    .task-item:last-child { border-bottom: none; }
    .task-item input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: var(--primary);
        flex-shrink: 0;
    }
    .task-item span:nth-child(2) {
        flex: 1;
        font-size: 0.88rem;
        color: #1e293b;
        font-weight: 500;
    }

    /* ── Panels ── */
    .panel {
        background: white !important;
        border-radius: 18px !important;
        padding: 18px 16px !important;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
        border: none !important;
        margin-bottom: 0 !important;
    }

    .panel-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 14px;
    }
    .panel-header h3 {
        font-size: 1rem;
        font-weight: 800;
        color: #1e293b;
    }
    .panel-header a {
        font-size: 0.8rem;
        color: var(--primary);
        font-weight: 600;
        text-decoration: none;
    }

    /* ── Status pills ── */
    .pill {
        font-size: 0.7rem;
        font-weight: 700;
        padding: 4px 10px;
        border-radius: 20px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .pill.green { background: #dcfce7; color: #16a34a; }
    .pill.blue  { background: #dbeafe; color: #2563eb; }
    .pill.orange { background: #fff7ed; color: #ea580c; }

    /* ── Task badges ── */
    .badge { font-size: 0.68rem; font-weight: 700; padding: 3px 9px; border-radius: 12px; white-space: nowrap; }
    .badge.red    { background: #fef2f2; color: #ef4444; }
    .badge.orange { background: #fff7ed; color: #f97316; }
    .badge.blue   { background: #eff6ff; color: #3b82f6; }

    /* ── Footer hidden on mobile ── */
    .minimal-footer { display: none; }

    /* ── Notification items ── */
    .notif-item {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 14px;
    }
    .n-icon {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
    }
    .n-text { flex: 1; }
    .n-text p { font-size: 0.84rem; color: #1e293b; margin: 0; line-height: 1.4; }
    .n-time { font-size: 0.72rem; color: #94a3b8; margin-left: auto; white-space: nowrap; flex-shrink: 0; }

    /* ── Page background match screenshot ── */
    .minimal-view {
        background: #f0f2f9 !important;
    }
}
