/* ============================================
   EduMatrix - One Platform for Smart Schools
   Modern Responsive Design
   ============================================ */

:root {
    --primary: #4F46E5;
    --primary-light: #6366F1;
    --primary-dark: #3730A3;
    --primary-bg: #EEF2FF;
    --secondary: #7C3AED;
    --accent: #06B6D4;
    --success: #10B981;
    --success-bg: #D1FAE5;
    --warning: #F59E0B;
    --warning-bg: #FEF3C7;
    --danger: #EF4444;
    --danger-bg: #FEE2E2;
    --info: #3B82F6;
    --info-bg: #DBEAFE;
    --dark: #0F172A;
    --dark-2: #1E293B;
    --gray-900: #111827;
    --gray-800: #1F2937;
    --gray-700: #374151;
    --gray-600: #4B5563;
    --gray-500: #6B7280;
    --gray-400: #9CA3AF;
    --gray-300: #D1D5DB;
    --gray-200: #E5E7EB;
    --gray-100: #F3F4F6;
    --gray-50: #F9FAFB;
    --white: #FFFFFF;

    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --topbar-height: 72px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --shadow-card: 0 1px 3px 0 rgba(0,0,0,0.06), 0 1px 2px -1px rgba(0,0,0,0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --body-bg: #F0F2F5;
    --card-bg: #FFFFFF;
    --card-bg-2: #F8FAFC;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --border-color: #E2E8F0;
    --hover-bg: #F1F5F9;
}

[data-theme="dark"] {
    --primary: #6366F1;
    --primary-light: #818CF8;
    --primary-dark: #4F46E5;
    --primary-bg: #1E1B4B;
    --success-bg: #064E3B;
    --warning-bg: #451A03;
    --danger-bg: #450A0A;
    --info-bg: #1E3A5F;
    --body-bg: #0A0F1A;
    --card-bg: #111827;
    --card-bg-2: #1F2937;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border-color: #1E293B;
    --hover-bg: #1E293B;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.4);
    --shadow-card: 0 1px 3px 0 rgba(0,0,0,0.3);
}

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

html { scroll-behavior: smooth; }

/* ============================================
   GLASS MODAL
   ============================================ */
.modal-glass-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: modalOverlayIn 0.25s ease;
}

@keyframes modalOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalGlassIn {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-glass {
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    box-shadow:
        0 32px 64px rgba(15, 23, 42, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    animation: modalGlassIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 24px 28px;
    color: var(--text-primary);
}

.modal-glass .modal-close,
.modal-glass .btn-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.modal-glass .modal-close:hover,
.modal-glass .btn-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

.modal-glass .modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.modal-glass .modal-header .modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--primary);
    color: white;
    flex-shrink: 0;
}
.modal-glass .modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.modal-glass .modal-header p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.modal-glass form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

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

.modal-glass label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 5px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.modal-glass .input,
.modal-glass select.input,
.modal-glass textarea.input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.modal-glass .input:focus,
.modal-glass select.input:focus,
.modal-glass textarea.input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.modal-glass .input::placeholder {
    color: var(--text-muted);
}

.modal-glass .modal-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-glass .btn {
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.modal-glass .btn-primary {
    background: var(--primary);
    color: white;
}
.modal-glass .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}
.modal-glass .btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
}
.modal-glass .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* Glass modal dark theme adjustments */
[data-theme="dark"] .modal-glass {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 32px 64px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
[data-theme="dark"] .modal-glass .modal-close,
[data-theme="dark"] .modal-glass .btn-close {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}
[data-theme="dark"] .modal-glass .modal-close:hover,
[data-theme="dark"] .modal-glass .btn-close:hover {
    background: rgba(255, 255, 255, 0.15);
}
[data-theme="dark"] .modal-glass .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .modal-glass label {
    color: rgba(255, 255, 255, 0.65);
}
[data-theme="dark"] .modal-glass .input,
[data-theme="dark"] .modal-glass select.input,
[data-theme="dark"] .modal-glass textarea.input {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}
[data-theme="dark"] .modal-glass .input:focus,
[data-theme="dark"] .modal-glass select.input:focus,
[data-theme="dark"] .modal-glass textarea.input:focus {
    background: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .modal-glass .input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}
[data-theme="dark"] .modal-glass .modal-actions {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .modal-glass .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}
[data-theme="dark"] .modal-glass .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Responsive glass modal */
@media (max-width: 640px) {
    .modal-glass {
        padding: 20px;
        max-height: 85vh;
        border-radius: 16px;
    }
    .modal-glass form {
        grid-template-columns: 1fr;
    }
    .modal-glass .modal-actions {
        flex-direction: column;
    }
    .modal-glass .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Scrollbar inside glass modal */
.modal-glass::-webkit-scrollbar { width: 4px; }
.modal-glass::-webkit-scrollbar-track { background: transparent; }
.modal-glass::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--body-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

a { text-decoration: none; color: var(--primary); }
ul { list-style: none; }
img { max-width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ============================================
   SPLASH SCREEN
   ============================================ */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.splash-screen.hidden {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.splash-content { text-align: center; color: white; }

.splash-logo {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.15);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 48px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    animation: splashPulse 2s ease-in-out infinite;
}

@keyframes splashPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.splash-title {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.splash-subtitle {
    font-size: 16px;
    opacity: 0.8;
    font-weight: 400;
}

.splash-loader {
    width: 200px;
    height: 3px;
    background: rgba(255,255,255,0.2);
    border-radius: 99px;
    margin: 32px auto 0;
    overflow: hidden;
}

.splash-bar {
    height: 100%;
    width: 0%;
    background: white;
    border-radius: 99px;
    animation: splashLoad 2s ease-in-out forwards;
}

@keyframes splashLoad {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--body-bg);
    position: relative;
    overflow: hidden;
}

.login-bg-animation {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: shapeFloat 20s ease-in-out infinite;
}

.shape-1 {
    width: 600px; height: 600px;
    background: var(--primary);
    top: -200px; left: -200px;
    animation-delay: 0s;
}

.shape-2 {
    width: 500px; height: 500px;
    background: var(--secondary);
    bottom: -150px; right: -150px;
    animation-delay: -5s;
}

.shape-3 {
    width: 400px; height: 400px;
    background: var(--accent);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

.shape-4 {
    width: 300px; height: 300px;
    background: var(--warning);
    top: -100px; right: 10%;
    animation-delay: -15s;
}

@keyframes shapeFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(-30px, 30px) scale(0.9); }
    75% { transform: translate(40px, 40px) scale(1.05); }
}

.login-container {
    display: flex;
    width: 1000px;
    max-width: 95vw;
    min-height: 600px;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    z-index: 1;
    position: relative;
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 48px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.login-left-content {
    position: relative;
    z-index: 1;
    color: white;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 40px;
}

.login-brand i {
    font-size: 36px;
    background: rgba(255,255,255,0.2);
    padding: 12px;
    border-radius: 14px;
}

.login-left-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.login-left-desc {
    font-size: 15px;
    opacity: 0.85;
    line-height: 1.7;
    margin-bottom: 40px;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-feature {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.feature-text h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.feature-text p {
    font-size: 13px;
    opacity: 0.75;
}

.login-right {
    flex: 1;
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.login-form-header {
    margin-bottom: 32px;
}

.login-form-header h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-form-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.role-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.role-option input { display: none; }

.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.role-card i {
    font-size: 24px;
    color: var(--text-muted);
    transition: var(--transition);
}

.role-card span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.role-option input:checked + .role-card {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.role-option input:checked + .role-card i {
    color: var(--primary);
}

.role-option input:checked + .role-card span {
    color: var(--primary);
    font-weight: 600;
}

.form-group {
    position: relative;
    margin-bottom: 18px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group label i {
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    background: var(--card-bg);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-bg);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.toggle-password {
    position: absolute;
    right: 14px;
    bottom: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

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

.remember-me input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.forgot-password {
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79,70,229,0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn i {
    transition: var(--transition);
}

.login-btn:hover i {
    transform: translateX(4px);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

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

/* ============================================
   MAIN APP LAYOUT
   ============================================ */
.main-app {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-color);
}

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

.sidebar-logo i {
    font-size: 28px;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 8px;
    border-radius: 12px;
}

.sidebar-logo-text {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

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

.sidebar-user-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.sidebar-user-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid var(--card-bg);
}

.sidebar-user-status.online { background: var(--success); }
.sidebar-user-status.offline { background: var(--gray-400); }
.sidebar-user-status.busy { background: var(--danger); }

.sidebar-user-info h4 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.sidebar-user-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.nav-section {
    padding: 8px 20px 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    margin: 2px 8px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.nav-item:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.nav-item i {
    width: 22px;
    text-align: center;
    font-size: 18px;
}

.nav-item .nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 99px;
}

.nav-item .nav-arrow {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-submenu.open {
    max-height: 500px;
}

.nav-submenu .nav-item {
    padding-left: 56px;
    font-size: 13px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-theme-btn,
.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.sidebar-theme-btn:hover,
.sidebar-logout:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.sidebar-logout:hover {
    color: var(--danger);
}

/* Sidebar Collapsed */
.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .nav-arrow,
.sidebar.collapsed .nav-section,
.sidebar.collapsed .sidebar-theme-btn span,
.sidebar.collapsed .sidebar-logout span {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .nav-item i {
    margin: 0;
    font-size: 20px;
}

.sidebar.collapsed .sidebar-user {
    justify-content: center;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
}

.sidebar.collapsed .sidebar-footer button {
    justify-content: center;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
}

/* ============================================
   TOPBAR
   ============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    min-height: 100vh;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

.topbar {
    height: var(--topbar-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.8);
}

[data-theme="dark"] .topbar {
    background: rgba(17,24,39,0.8);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-primary);
    cursor: pointer;
}

.topbar-search {
    position: relative;
    width: 320px;
}

.topbar-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

.topbar-search input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border: none;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-family: inherit;
    background: var(--body-bg);
    color: var(--text-primary);
    transition: var(--transition);
}

.topbar-search input:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.topbar-search input::placeholder {
    color: var(--text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-notification {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--body-bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 18px;
}

.topbar-notification:hover {
    background: var(--hover-bg);
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card-bg);
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: -8px;
    width: 380px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1001;
}

.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.notif-header h4 {
    font-size: 16px;
    font-weight: 600;
}

.notif-header button {
    background: none;
    border: none;
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
}

.notif-list {
    max-height: 320px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    gap: 14px;
    padding: 14px 20px;
    transition: var(--transition);
    cursor: pointer;
}

.notif-item:hover {
    background: var(--hover-bg);
}

.notif-item.unread {
    background: var(--primary-bg);
}

.notif-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.bg-primary { background: var(--primary); }
.bg-success { background: var(--success); }
.bg-warning { background: var(--warning); }
.bg-danger { background: var(--danger); }
.bg-info { background: var(--info); }

.notif-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notif-content p strong {
    color: var(--text-primary);
    font-weight: 600;
}

.notif-content span {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.notif-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.notif-footer a {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
}

/* Profile Menu */
.topbar-profile {
    position: relative;
    cursor: pointer;
}

.topbar-profile img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid transparent;
    transition: var(--transition);
}

.topbar-profile:hover img {
    border-color: var(--primary);
}

.profile-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 260px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1001;
}

.profile-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

.profile-menu-header img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
}

.profile-menu-header h4 {
    font-size: 15px;
    font-weight: 600;
}

.profile-menu-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.profile-menu-body {
    padding: 8px;
}

.profile-menu-body a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    transition: var(--transition);
}

.profile-menu-body a:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.profile-menu-body hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 6px 0;
}

/* ============================================
   PAGE CONTENT
   ============================================ */
.page-content {
    padding: 28px 32px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    gap: 20px;
}

[data-theme="dark"] .page-header {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin: 0;
}

.page-header > div > span,
.page-header > span,
.page-header > div > p,
.page-header > p,
.page-subtitle {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: 6px;
}

.page-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* Premium Filter Inputs and Select dropdowns */
.search-input {
    height: 42px;
    box-sizing: border-box;
    padding: 0 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    display: inline-flex;
    align-items: center;
}

.search-input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 
        0 0 0 3px rgba(79, 70, 229, 0.12),
        0 2px 4px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .search-input {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.6);
}

[data-theme="dark"] .search-input:focus {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 
        0 0 0 3px rgba(79, 70, 229, 0.25),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

select.search-input {
    cursor: pointer;
    padding-right: 36px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(15,23,42,0.6)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

[data-theme="dark"] select.search-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255,255,255,0.6)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    box-sizing: border-box;
    padding: 0 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79,70,229,0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--hover-bg);
    border-color: var(--gray-300);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

[data-theme="dark"] .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
}

.stat-card-icon.blue { background: linear-gradient(135deg, #4F46E5, #6366F1); }
.stat-card-icon.green { background: linear-gradient(135deg, #059669, #10B981); }
.stat-card-icon.orange { background: linear-gradient(135deg, #D97706, #F59E0B); }
.stat-card-icon.pink { background: linear-gradient(135deg, #DB2777, #EC4899); }
.stat-card-icon.cyan { background: linear-gradient(135deg, #0891B2, #06B6D4); }
.stat-card-icon.purple { background: linear-gradient(135deg, #7C3AED, #8B5CF6); }

.stat-card-trend {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 99px;
}

.stat-card-trend.up {
    background: var(--success-bg);
    color: var(--success);
}

.stat-card-trend.down {
    background: var(--danger-bg);
    color: var(--danger);
}

.stat-card-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 14px;
    color: var(--text-muted);
}

.stat-card-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
}

.stat-card-footer i {
    margin-right: 4px;
}

.stat-card-footer a {
    color: var(--primary);
    font-weight: 500;
}

/* ============================================
   CONTENT GRID
   ============================================ */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.content-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 28px;
}

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

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.card-header a {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}

.card-body {
    padding: 20px 24px;
}

.card-body-scroll {
    max-height: 400px;
    overflow-y: auto;
}

/* ============================================
   TABLE — THEMED
   ============================================ */
.table-container {
    overflow-x: auto;
}

/* Base table reset — used by all tables */
table {
    width: 100%;
    border-collapse: collapse;
}

/* Upgraded themed table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead tr {
    background: var(--card-bg-2);
    border-bottom: 2px solid var(--border-color);
}

.data-table thead th {
    text-align: left;
    padding: 13px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background 0.15s ease;
}

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

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

/* Generic table (legacy inline-style tables) */
thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

tbody td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--hover-bg);
}

tbody tr:last-child td {
    border-bottom: none;
}

td .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

td .user-info img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

td .user-info span {
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   FORM CONTROLS — THEMED
   ============================================ */
.form-group {
    position: relative;
    margin-bottom: 16px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    background: var(--card-bg);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.form-control:focus {
    border-color: var(--primary);
    background: var(--card-bg);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394A3B8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 38px;
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
    line-height: 1.6;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-row.cols-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

[data-theme="dark"] .form-control {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus {
    background: var(--card-bg-2);
    border-color: var(--primary);
}

[data-theme="dark"] select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255,255,255,0.4)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    opacity: 0.3;
    display: block;
    margin-bottom: 16px;
}

.empty-state h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ============================================
   STATUS BADGE
   ============================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.hadir { background: var(--success-bg); color: var(--success); }
.status-badge.sakit { background: var(--warning-bg); color: var(--warning); }
.status-badge.alpha { background: var(--danger-bg); color: var(--danger); }
.status-badge.izin  { background: var(--info-bg);   color: var(--info);    }
.status-badge.lunas { background: var(--success-bg); color: var(--success); }
.status-badge.belum { background: var(--warning-bg); color: var(--warning); }


/* ============================================
   SCHEDULE
   ============================================ */
.schedule-item {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.schedule-time {
    width: 60px;
    flex-shrink: 0;
    text-align: center;
}

.schedule-time .time-start {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.schedule-time .time-end {
    font-size: 12px;
    color: var(--text-muted);
}

.schedule-info {
    flex: 1;
}

.schedule-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.schedule-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.schedule-info .schedule-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 500;
    margin-top: 4px;
}

.schedule-tag.matematika { background: #DBEAFE; color: #1D4ED8; }
.schedule-tag.ipa { background: #D1FAE5; color: #047857; }
.schedule-tag.ips { background: #FEF3C7; color: #B45309; }
.schedule-tag.indo { background: #FCE7F3; color: #BE185D; }
.schedule-tag.inggris { background: #EDE9FE; color: #6D28D9; }
.schedule-tag.pjok { background: #D1FAE5; color: #047857; }
.schedule-tag.agama { background: #DBEAFE; color: #1D4ED8; }
.schedule-tag.seni { background: #FCE7F3; color: #BE185D; }

/* ============================================
   ACTIVITY LIST
   ============================================ */
.activity-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.activity-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.activity-content p strong {
    color: var(--text-primary);
    font-weight: 600;
}

.activity-content span {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   BADGE / LABEL
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }

/* ============================================
   MODULES GRID
   ============================================ */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.module-card {
    background: var(--card-bg-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.module-card i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 12px;
}

.module-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.module-card p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   CHAT WIDGET
   ============================================ */
.chat-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.chat-item:last-child { border-bottom: none; }
.chat-item:hover { background: var(--hover-bg); margin: 0 -24px; padding: 12px 24px; }

.chat-item img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
}

.chat-item-info {
    flex: 1;
    min-width: 0;
}

.chat-item-info h4 {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
}

.chat-item-info h4 span {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
}

.chat-item-info p {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-unread {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

/* ============================================
   PROGRESS
   ============================================ */
.progress-bar {
    height: 8px;
    background: var(--gray-100);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 1s ease;
}

.progress-fill.primary { background: var(--primary); }
.progress-fill.success { background: var(--success); }
.progress-fill.warning { background: var(--warning); }
.progress-fill.danger { background: var(--danger); }

/* ============================================
   STUDENT GROWTH CHART
   ============================================ */
.growth-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.growth-indicator i {
    font-size: 14px;
}

.growth-indicator.up { color: var(--success); }
.growth-indicator.down { color: var(--danger); }

/* ============================================
   PAYMENT LIST
   ============================================ */
.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.payment-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.payment-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.payment-amount {
    text-align: right;
}

.payment-amount .amount {
    font-size: 15px;
    font-weight: 700;
}

.payment-amount .date {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   CHART CONTAINER
   ============================================ */
.chart-container {
    padding: 16px 0;
    height: 260px;
}

/* ============================================
   TASK LIST
   ============================================ */
.task-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.task-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.task-check.checked {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.task-info {
    flex: 1;
}

.task-info h4 {
    font-size: 14px;
    font-weight: 500;
}

.task-info h4.done {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-info p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    .content-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
    .login-container {
        flex-direction: column;
    }
    .login-left {
        display: none;
    }
    .login-right {
        padding: 40px 32px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .sidebar-overlay.active {
        display: block;
    }
    .sidebar.collapsed {
        width: var(--sidebar-width);
    }
    .sidebar.collapsed .sidebar-logo-text,
    .sidebar.collapsed .sidebar-user-info,
    .sidebar.collapsed .nav-item span,
    .sidebar.collapsed .nav-badge,
    .sidebar.collapsed .nav-arrow,
    .sidebar.collapsed .nav-section,
    .sidebar.collapsed .sidebar-theme-btn span,
    .sidebar.collapsed .sidebar-logout span {
        display: inline;
    }
    .sidebar.collapsed .nav-item {
        justify-content: flex-start;
        padding: 12px 20px;
    }
    .sidebar.collapsed .sidebar-user {
        justify-content: flex-start;
    }
    .sidebar.collapsed .sidebar-header {
        justify-content: space-between;
    }

    .main-content {
        margin-left: 0 !important;
    }
    .topbar {
        padding: 0 16px;
    }
    .topbar-mobile-toggle {
        display: flex;
    }
    .topbar-search {
        width: 100%;
    }
    .page-content {
        padding: 20px 16px;
    }
    .content-grid-3 {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .notification-dropdown {
        width: calc(100vw - 32px);
        right: -80px;
    }
    .login-container {
        max-width: 100%;
        border-radius: 0;
        min-height: 100vh;
    }
    .login-left {
        display: none;
    }
    .login-right {
        padding: 32px 20px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .role-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    .login-form-header h2 {
        font-size: 22px;
    }
}

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

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

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

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

.animate-fade-up {
    animation: fadeInUp 0.5s ease;
}

.animate-slide-right {
    animation: slideInRight 0.5s ease;
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    :root {
        --text: #111 !important;
        --text-muted: #555 !important;
        --card-bg: #fff !important;
        --border-color: #ccc !important;
        --primary: #2563eb !important;
        --success: #16a34a !important;
        --warning: #d97706 !important;
        --danger: #dc2626 !important;
        --info: #2563eb !important;
        --success-bg: #dcfce7 !important;
        --warning-bg: #fef3c7 !important;
        --danger-bg: #fce4ec !important;
        --info-bg: #dbeafe !important;
    }
    body { background:#fff!important; }
    #sidebar, .sidebar-overlay, #topNav, #pageHeader, .page-header,
    .btn, .page-actions, #toastContainer, .search-input,
    #globalSearch, .nav-icons, .profile-menu, .notification-dropdown,
    .animate-fade-up, .animate-fade-up > * { animation:none!important; }
    #sidebar, .sidebar-overlay, #topNav, .toastContainer,
    .page-actions button, #globalSearch, .nav-icons { display:none!important; }
    #pageContent { margin:0!important; padding:0!important; }
    .card { box-shadow:none!important; border:1px solid #ddd!important; break-inside:avoid; background:#fff!important; }
    .card-body { padding:20px!important; }
    .page-title { font-size:20px!important; }
    @page { margin:1.5cm; }
    body * { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
    .badge { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
    table { font-size:12px!important; }
    th { background:#f0f0f0!important; }
}
