﻿/* FLE-LPDT - Modern Educational Management Platform CSS */

/* =========================================
   1. VARIABLES & THEME CONFIGURATION
   ========================================= */
:root {
    /* --- Color Palette (Indigo/Slate Theme) --- */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    /* Primary Brand Color */
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #3730a3;
    --primary-900: #312e81;

    --secondary-50: #f8fafc;
    --secondary-100: #f1f5f9;
    --secondary-200: #e2e8f0;
    --secondary-300: #cbd5e1;
    --secondary-400: #94a3b8;
    --secondary-500: #64748b;
    --secondary-600: #475569;
    --secondary-700: #334155;
    --secondary-800: #1e293b;
    /* Dark Text */
    --secondary-900: #0f172a;

    --success-500: #10b981;
    --success-600: #059669;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --danger-500: #ef4444;
    --danger-600: #dc2626;
    --info-500: #06b6d4;
    --info-600: #0891b2;
    --white: #ffffff;

    /* --- Semantic Colors --- */
    --color-primary: var(--primary-600);
    --color-primary-hover: var(--primary-700);
    --color-bg-body: var(--secondary-50);
    --color-bg-sidebar: var(--secondary-900);
    --color-text-main: var(--secondary-800);
    --color-text-muted: var(--secondary-500);
    --color-text-light: var(--secondary-100);
    --color-border: var(--secondary-200);

    /* --- Spacing & Sizing --- */
    --sidebar-width: 280px;
    --header-height: 70px;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* --- Shadows --- */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    /* FLE-LPDT - Modern Educational Management Platform CSS */

    /* =========================================
   1. VARIABLES & THEME CONFIGURATION
   ========================================= */
    :root {
        /* --- Color Palette (Indigo/Slate Theme) --- */
        --primary-50: #eef2ff;
        --primary-100: #e0e7ff;
        --primary-200: #c7d2fe;
        --primary-300: #a5b4fc;
        --primary-400: #818cf8;
        --primary-500: #6366f1;
        /* Primary Brand Color */
        --primary-600: #4f46e5;
        --primary-700: #4338ca;
        --primary-800: #3730a3;
        --primary-900: #312e81;

        --secondary-50: #f8fafc;
        --secondary-100: #f1f5f9;
        --secondary-200: #e2e8f0;
        --secondary-300: #cbd5e1;
        --secondary-400: #94a3b8;
        --secondary-500: #64748b;
        --secondary-600: #475569;
        --secondary-700: #334155;
        --secondary-800: #1e293b;
        /* Dark Text */
        --secondary-900: #0f172a;

        --success-500: #10b981;
        --success-600: #059669;
        --warning-500: #f59e0b;
        --warning-600: #d97706;
        --danger-500: #ef4444;
        --danger-600: #dc2626;
        --info-500: #06b6d4;
        --info-600: #0891b2;
        --white: #ffffff;

        /* --- Semantic Colors --- */
        --color-primary: var(--primary-600);
        --color-primary-hover: var(--primary-700);
        --color-bg-body: var(--secondary-50);
        --color-bg-sidebar: var(--secondary-900);
        --color-text-main: var(--secondary-800);
        --color-text-muted: var(--secondary-500);
        --color-text-light: var(--secondary-100);
        --color-border: var(--secondary-200);

        /* --- Spacing & Sizing --- */
        --sidebar-width: 280px;
        --header-height: 70px;
        --radius-sm: 0.375rem;
        --radius-md: 0.5rem;
        --radius-lg: 0.75rem;
        --radius-xl: 1rem;

        /* --- Shadows --- */
        --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
        --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
        --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

        /* --- Transitions --- */
        --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
        --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
        /* Mobile Header Height */
        --mobile-header-height: 60px;
    }

    /* =========================================
   2. RESET & BASE STYLES
   ========================================= */
    *,
    *::before,
    *::after {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        background-color: var(--color-bg-body);
        color: var(--color-text-main);
        line-height: 1.6;
        font-size: 0.95rem;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        color: var(--secondary-900);
        font-weight: 600;
        line-height: 1.25;
        margin-bottom: 0.5em;
    }

    h1 {
        font-size: 1.875rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    a {
        color: var(--color-primary);
        text-decoration: none;
        transition: color var(--transition-fast);
    }

    a:hover {
        color: var(--color-primary-hover);
    }

    /* =========================================
   3. LAYOUT STRUCTURE
   ========================================= */
    .app-container {
        display: flex;
        min-height: 100vh;
        position: relative;
    }

    /* --- Mobile Header --- */
    .mobile-header {
        display: none;
        /* Hidden on desktop */
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: var(--mobile-header-height);
        background-color: var(--white);
        border-bottom: 1px solid var(--color-border);
        z-index: 40;
        align-items: center;
        justify-content: space-between;
        padding: 0 1rem;
        box-shadow: var(--shadow-sm);
    }

    .mobile-menu-toggle {
        background: transparent;
        border: none;
        font-size: 1.25rem;
        color: var(--secondary-700);
        padding: 0.5rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-logo {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--primary-600);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    /* --- Sidebar --- */
    .sidebar {
        width: var(--sidebar-width);
        background-color: var(--color-bg-sidebar);
        color: var(--color-text-light);
        height: 100vh;
        position: fixed;
        left: 0;
        top: 0;
        z-index: 50;
        overflow-y: auto;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        box-shadow: var(--shadow-xl);
    }

    .sidebar-header {
        height: var(--header-height);
        display: flex;
        align-items: center;
        padding: 0 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .sidebar-header h2 {
        color: var(--white);
        font-size: 1.25rem;
        margin: 0;
        letter-spacing: -0.025em;
    }

    .user-info {
        padding: 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        align-items: center;
        gap: 1rem;
        background: rgba(0, 0, 0, 0.2);
    }

    .user-info i {
        font-size: 1.5rem;
        color: var(--primary-400);
        background: rgba(255, 255, 255, 0.1);
        padding: 0.5rem;
        border-radius: 50%;
    }

    .nav-menu {
        list-style: none;
        padding: 1rem 0.75rem;
        flex: 1;
    }

    .nav-menu li {
        margin-bottom: 0.25rem;
    }

    .nav-menu a {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        color: var(--secondary-300);
        border-radius: var(--radius-md);
        font-weight: 500;
        transition: all var(--transition-fast);
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background-color: var(--primary-600);
        color: var(--white);
        transform: translateX(4px);
    }

    .nav-menu a i {
        width: 1.25rem;
        text-align: center;
        font-size: 1.1rem;
    }

    .nav-divider {
        margin: 1.5rem 0 0.5rem;
        padding: 0 1rem;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--secondary-500);
        font-weight: 700;
    }

    /* --- Main Content --- */
    .main-content {
        flex: 1;
        margin-left: var(--sidebar-width);
        padding: 2rem;
        width: calc(100% - var(--sidebar-width));
        transition: margin-left var(--transition-normal), width var(--transition-normal);
    }

    .content-header {
        margin-bottom: 2rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .content-header h1 {
        font-size: 2rem;
        font-weight: 700;
        color: var(--secondary-900);
        letter-spacing: -0.025em;
        margin: 0;
    }

    .subtitle {
        color: var(--secondary-500);
        font-size: 1rem;
    }

    .content-body {
        background: var(--color-bg-surface);
        border-radius: var(--radius-xl);
        padding: 2rem;
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--color-border);
        min-height: 500px;
    }

    /* =========================================
   4. COMPONENTS
   ========================================= */

    /* --- Cards --- */
    .card {
        background: var(--color-bg-surface);
        border-radius: var(--radius-lg);
        border: 1px solid var(--color-border);
        box-shadow: var(--shadow-sm);
        transition: transform var(--transition-fast), box-shadow var(--transition-fast);
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .card-header {
        padding: 1.25rem 1.5rem;
        background-color: var(--secondary-50);
        border-bottom: 1px solid var(--color-border);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .card-header h3 {
        margin: 0;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--secondary-800);
    }

    .card-body {
        padding: 1.5rem;
        flex: 1;
    }

    /* --- Buttons --- */
    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.625rem 1.25rem;
        font-size: 0.95rem;
        font-weight: 500;
        border-radius: var(--radius-md);
        border: 1px solid transparent;
        cursor: pointer;
        transition: all var(--transition-fast);
        line-height: 1.2;
    }

    .btn:active {
        transform: translateY(1px);
    }

    .btn-primary {
        background-color: var(--color-primary);
        color: white;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }

    .btn-primary:hover {
        background-color: var(--color-primary-hover);
        color: white;
        box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
    }

    .btn-secondary {
        background-color: var(--white);
        border-color: var(--secondary-300);
        color: var(--secondary-700);
    }

    .btn-secondary:hover {
        background-color: var(--secondary-50);
        border-color: var(--secondary-400);
        color: var(--secondary-900);
    }

    .btn-success {
        background-color: var(--success-600);
        color: white;
    }

    .btn-success:hover {
        background-color: var(--success-500);
        color: white;
    }

    .btn-danger {
        background-color: var(--danger-600);
        color: white;
    }

    .btn-danger:hover {
        background-color: var(--danger-500);
        color: white;
    }

    .btn-warning {
        background-color: #d97706;
        color: white;
    }

    .btn-warning:hover {
        background-color: #b36104;
        /* warning-600 */
        color: white;
    }

    .btn-info {
        background-color: #0891b2;
        color: white;
    }

    .btn-info:hover {
        background-color: #046c86;
        /* info-600 */
        color: white;
    }

    .btn-block {
        display: flex;
        width: 100%;
    }

    /* --- Forms --- */
    .form-group {
        margin-bottom: 1.5rem;
    }

    label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 500;
        color: var(--secondary-700);
        font-size: 0.9rem;
    }

    .form-control,
    .form-select {
        width: 100%;
        padding: 0.625rem 0.875rem;
        font-size: 0.95rem;
        line-height: 1.5;
        color: var(--secondary-900);
        background-color: var(--white);
        border: 1px solid var(--secondary-300);
        border-radius: var(--radius-md);
        transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    }

    .form-control:focus,
    .form-select:focus {
        outline: none;
        border-color: var(--primary-500);
        box-shadow: 0 0 0 3px var(--primary-100);
    }

    .form-text {
        font-size: 0.85rem;
        color: var(--secondary-500);
        margin-top: 0.375rem;
    }

    /* --- Tables --- */
    .table-responsive {
        overflow-x: auto;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--color-border);
    }

    .table {
        width: 100%;
        border-collapse: collapse;
        background-color: var(--white);
        text-align: left;
    }

    .table th {
        background-color: var(--secondary-50);
        padding: 1rem;
        font-weight: 600;
        color: var(--secondary-700);
        border-bottom: 1px solid var(--secondary-200);
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .table td {
        padding: 1rem;
        border-bottom: 1px solid var(--secondary-100);
        color: var(--secondary-800);
    }

    .table tr:last-child td {
        border-bottom: none;
    }

    .table tbody tr:hover {
        background-color: var(--primary-50);
    }

    /* --- Alerts --- */
    .alert {
        padding: 1rem 1.25rem;
        border-radius: var(--radius-md);
        margin-bottom: 1.5rem;
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        font-size: 0.95rem;
    }

    .alert i {
        font-size: 1.25rem;
        margin-top: 0.1rem;
    }

    .alert-success {
        background-color: #ecfdf5;
        color: #065f46;
        border: 1px solid #a7f3d0;
    }

    .alert-error {
        background-color: #fef2f2;
        color: #991b1b;
        border: 1px solid #fecaca;
    }

    .alert-warning {
        background-color: #fffbeb;
        color: #92400e;
        border: 1px solid #fde68a;
    }

    .alert-info {
        background-color: #ecfeff;
        color: #155e75;
        border: 1px solid #a5f3fc;
    }

    /* --- Badges --- */
    .badge {
        display: inline-flex;
        align-items: center;
        padding: 0.25rem 0.625rem;
        border-radius: 9999px;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.025em;
    }

    .badge-primary {
        background-color: var(--primary-100);
        color: var(--primary-800);
    }

    .badge-success {
        background-color: #d1fae5;
        color: #065f46;
    }

    .badge-danger {
        background-color: #fee2e2;
        color: #991b1b;
    }

    .badge-warning {
        background-color: #fef3c7;
        color: #92400e;
    }

    .badge-secondary {
        background-color: var(--secondary-100);
        color: var(--secondary-700);
    }

    /* =========================================
   5. DASHBOARD & WIDGETS
   ========================================= */
    .dashboard-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .stat-card {
        background: var(--white);
        border-radius: var(--radius-lg);
        padding: 1.5rem;
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--color-border);
        display: flex;
        align-items: flex-start;
        gap: 1rem;
        transition: transform var(--transition-fast);
    }

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .stat-icon {
        width: 3rem;
        height: 3rem;
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: white;
        flex-shrink: 0;
    }

    .stat-icon.bg-blue {
        background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    }

    .stat-icon.bg-green {
        background: linear-gradient(135deg, var(--success-500), var(--success-600));
    }

    .stat-icon.bg-orange {
        background: linear-gradient(135deg, var(--warning-500), var(--warning-600));
    }

    .stat-icon.bg-purple {
        background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    }

    .stat-info {
        flex: 1;
    }

    .stat-info h3 {
        font-size: 1.75rem;
        text-align: center;
    }

    /* Calendar Header */
    .calendar-header {
        margin-bottom: 1.5rem;
    }

    @media (min-width: 993px) {
        .calendar-header {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            align-items: center;
        }

        .calendar-header h2 {
            grid-column: 2;
            text-align: center;
            margin: 0;
        }

        .calendar-header button:first-child {
            justify-self: start;
            grid-column: 1;
        }

        .calendar-header button:last-child {
            justify-self: end;
            grid-column: 3;
        }
    }

    .calendar-week {
        display: grid;
        grid-template-columns: 60px repeat(7, 1fr);
        gap: 1px;
        background: var(--secondary-200);
        border: 1px solid var(--secondary-200);
        border-radius: var(--radius-lg);
        overflow: hidden;
        min-height: 600px;
    }

    .calendar-time-column {
        background: var(--secondary-50);
    }

    .calendar-time-header {
        height: 50px;
        background: var(--secondary-100);
        border-bottom: 1px solid var(--secondary-200);
    }

    .calendar-time-slot {
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        color: var(--secondary-500);
        border-bottom: 1px solid var(--secondary-200);
        background: var(--secondary-50);
    }

    .calendar-day-column {
        background: var(--white);
        position: relative;
    }

    .calendar-day-header {
        height: 50px;
        padding: 0.5rem;
        text-align: center;
        background: var(--secondary-50);
        border-bottom: 1px solid var(--secondary-200);
        font-size: 0.85rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        line-height: 1.2;
    }

    .calendar-day-header strong {
        color: var(--secondary-800);
    }

    .calendar-day-grid {
        position: relative;
        height: calc(12 * 60px);
        /* 12 hours * 60px */
        background-image: linear-gradient(to bottom, var(--secondary-100) 1px, transparent 1px);
        background-size: 100% 60px;
    }

    .calendar-session {
        position: absolute;
        left: 2px;
        right: 2px;
        padding: 0.5rem;
        border-radius: var(--radius-sm);
        font-size: 0.75rem;
        overflow: hidden;
        cursor: pointer;
        transition: transform var(--transition-fast), box-shadow var(--transition-fast);
        border-left: 3px solid rgba(0, 0, 0, 0.2);
        box-shadow: var(--shadow-sm);
        z-index: 10;
    }

    .calendar-session:hover {
        transform: scale(1.02);
        box-shadow: var(--shadow-md);
        z-index: 20;
    }

    .session-scheduled {
        background-color: var(--primary-100);
        color: var(--primary-900);
        border-left-color: var(--primary-500);
    }

    .session-completed {
        background-color: #d1fae5;
        color: #065f46;
        border-left-color: var(--success-500);
    }

    .session-canceled {
        background-color: #fee2e2;
        color: #991b1b;
        border-left-color: var(--danger-500);
    }

    .session-time {
        font-weight: 700;
        margin-bottom: 0.1rem;
    }

    .session-title {
        font-weight: 600;
        margin-bottom: 0.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .session-room,
    .session-teacher {
        font-size: 0.7rem;
        opacity: 0.9;
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

    /* === Modal === */
    .modal {
        position: fixed;
        inset: 0;
        z-index: 1000;
        display: none;
    }

    .modal-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
    }

    .modal-content {
        position: relative;
        background: var(--white);
        width: 90%;
        max-width: 600px;
        margin: 10vh auto;
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-xl);
        overflow: hidden;
        animation: modalSlideIn 0.3s ease-out;
    }

    @keyframes modalSlideIn {
        from {
            transform: translateY(-20px);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .modal-header {
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid var(--color-border);
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--secondary-50);
    }

    .modal-header h3 {
        margin: 0;
        font-size: 1.25rem;
    }

    .modal-close {
        background: transparent;
        border: none;
        font-size: 1.25rem;
        color: var(--secondary-500);
        cursor: pointer;
        padding: 0.5rem;
        border-radius: 50%;
        transition: all var(--transition-fast);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .modal-close:hover {
        background: var(--secondary-200);
        color: var(--danger-600);
    }

    .modal-body {
        padding: 1.5rem;
        max-height: 70vh;
        overflow-y: auto;
    }

    .modal-footer {
        padding: 1rem 1.5rem;
        border-top: 1px solid var(--color-border);
        background: var(--secondary-50);
        text-align: right;
    }

    /* Responsive Calendar */
    @media (max-width: 992px) {
        .calendar-week {
            grid-template-columns: 50px repeat(7, 1fr);
        }
    }

    @media (max-width: 768px) {
        .calendar-week {
            display: flex;
            flex-direction: column;
            min-height: auto;
        }

        .calendar-time-column {
            display: none;
        }

        .calendar-day-column {
            margin-bottom: 1rem;
            border: 1px solid var(--color-border);
            border-radius: var(--radius-md);
        }

        .calendar-day-grid {
            height: auto;
            min-height: 100px;
            background: none;
            padding: 0.5rem;
        }

        .calendar-session {
            position: relative;
            top: auto !important;
            height: auto !important;
            margin-bottom: 0.5rem;
            left: 0;
            right: 0;
        }
    }

    /* =========================================
   9. STUDENT DASHBOARD
   ========================================= */
    .courses-list {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .course-card {
        background: var(--secondary-50);
        border: 1px solid var(--secondary-200);
        border-radius: var(--radius-md);
        padding: 1rem;
        transition: all var(--transition-fast);
    }

    .course-card:hover {
        background: var(--white);
        border-color: var(--primary-300);
        box-shadow: var(--shadow-sm);
        transform: translateX(4px);
    }

    .course-card h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        color: var(--primary-700);
    }

    .course-card p {
        margin-bottom: 0.25rem;
        font-size: 0.9rem;
        color: var(--secondary-600);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .course-card i {
        width: 1.2rem;
        text-align: center;
        color: var(--primary-500);
    }

    .stats-summary {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        background: var(--secondary-50);
        border-radius: var(--radius-md);
        border: 1px solid var(--secondary-200);
    }

    .stat-value {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--secondary-900);
    }

    .stat-label {
        font-size: 0.9rem;
        color: var(--secondary-600);
    }

    .stat-success {
        background: #ecfdf5;
        border-color: #a7f3d0;
    }

    .stat-success .stat-value {
        color: #059669;
    }

    .stat-danger {
        background: #fef2f2;
        border-color: #fecaca;
    }

    .stat-danger .stat-value {
        color: #dc2626;
    }

    .stat-warning {
        background: #fffbeb;
        border-color: #fde68a;
    }


    @keyframes modalSlideIn {
        from {
            transform: translateY(-20px);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .modal-header {
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid var(--color-border);
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--secondary-50);
    }

    .modal-header h3 {
        margin: 0;
        font-size: 1.25rem;
    }

    .modal-close {
        background: transparent;
        border: none;
        font-size: 1.25rem;
        color: var(--secondary-500);
        cursor: pointer;
        padding: 0.5rem;
        border-radius: 50%;
        transition: all var(--transition-fast);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .modal-close:hover {
        background: var(--secondary-200);
        color: var(--danger-600);
    }

    .modal-body {
        padding: 1.5rem;
        max-height: 70vh;
        overflow-y: auto;
    }

    .modal-footer {
        padding: 1rem 1.5rem;
        border-top: 1px solid var(--color-border);
        background: var(--secondary-50);
        text-align: right;
    }

    /* Responsive Calendar */
    @media (max-width: 992px) {
        .calendar-week {
            grid-template-columns: 50px repeat(7, 1fr);
        }
    }

    @media (max-width: 768px) {
        .calendar-week {
            display: flex;
            flex-direction: column;
            min-height: auto;
        }

        .calendar-time-column {
            display: none;
        }

        .calendar-day-column {
            margin-bottom: 1rem;
            border: 1px solid var(--color-border);
            border-radius: var(--radius-md);
        }

        .calendar-day-grid {
            height: auto;
            min-height: 100px;
            background: none;
            padding: 0.5rem;
        }

        .calendar-session {
            position: relative;
            top: auto !important;
            height: auto !important;
            margin-bottom: 0.5rem;
            left: 0;
            right: 0;
        }
    }

    /* =========================================
   9. STUDENT DASHBOARD
   ========================================= */
    .courses-list {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .course-card {
        background: var(--secondary-50);
        border: 1px solid var(--secondary-200);
        border-radius: var(--radius-md);
        padding: 1rem;
        transition: all var(--transition-fast);
    }

    .course-card:hover {
        background: var(--white);
        border-color: var(--primary-300);
        box-shadow: var(--shadow-sm);
        transform: translateX(4px);
    }

    .course-card h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        color: var(--primary-700);
    }

    .course-card p {
        margin-bottom: 0.25rem;
        font-size: 0.9rem;
        color: var(--secondary-600);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .course-card i {
        width: 1.2rem;
        text-align: center;
        color: var(--primary-500);
    }

    .stats-summary {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        background: var(--secondary-50);
        border-radius: var(--radius-md);
        border: 1px solid var(--secondary-200);
    }

    .stat-value {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--secondary-900);
    }

    .stat-label {
        font-size: 0.9rem;
        color: var(--secondary-600);
    }

    .stat-success {
        background: #ecfdf5;
        border-color: #a7f3d0;
    }

    .stat-success .stat-value {
        color: #059669;
    }

    .stat-danger {
        background: #fef2f2;
        border-color: #fecaca;
    }

    .stat-danger .stat-value {
        color: #dc2626;
    }

    .stat-warning {
        background: #fffbeb;
        border-color: #fde68a;
    }

    .stat-warning .stat-value {
        color: #d97706;
    }

    .attendance-rate {
        text-align: center;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--secondary-200);
    }

    .attendance-rate h2 {
        font-size: 2.5rem;
        color: var(--primary-600);
        margin-bottom: 0.25rem;
    }

    .attendance-rate p {
        color: var(--secondary-500);
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    /* =========================================
   10. NOTIFICATIONS & TOASTS
   ========================================= */
    #toast-container {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        gap: 10px;
        pointer-events: none;
    }

    .toast {
        background: var(--white);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-lg);
        padding: 1rem;
        min-width: 300px;
        max-width: 400px;
        display: flex;
        align-items: flex-start;
        gap: 1rem;
        pointer-events: auto;
        animation: toastSlideIn 0.3s ease-out forwards;
        border-left: 4px solid var(--primary-500);
        transition: all var(--transition-normal);
    }

    .toast.hiding {
        animation: toastSlideOut 0.3s ease-in forwards;
    }

    @keyframes toastSlideIn {
        from {
            transform: translateX(100%);
            opacity: 0;
        }

        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    @keyframes toastSlideOut {
        from {
            transform: translateX(0);
            opacity: 1;
        }

        to {
            transform: translateX(100%);
            opacity: 0;
        }
    }

    .toast-icon {
        font-size: 1.25rem;
        margin-top: 0.1rem;
    }

    .toast-content {
        flex: 1;
    }

    .toast-title {
        font-weight: 600;
        margin-bottom: 0.25rem;
        color: var(--secondary-900);
    }

    .toast-message {
        font-size: 0.9rem;
        color: var(--secondary-600);
        line-height: 1.4;
    }

    .toast-close {
        background: transparent;
        border: none;
        color: var(--secondary-400);
        cursor: pointer;
        padding: 0.25rem;
        transition: color var(--transition-fast);
    }

    .toast-close:hover {
        color: var(--secondary-600);
    }

    /* Toast Variants */
    .toast-success {
        border-left-color: var(--success-500);
    }

    .toast-success .toast-icon {
        color: var(--success-500);
    }

    .toast-error {
        border-left-color: var(--danger-500);
    }

    .toast-error .toast-icon {
        color: var(--danger-500);
    }

    .toast-warning {
        border-left-color: var(--warning-500);
    }

    .toast-warning .toast-icon {
        color: var(--warning-500);
    }

    .toast-info {
        border-left-color: var(--info-500);
    }

    .toast-info .toast-icon {
        color: var(--info-500);
    }

    /* =========================================
   11. CONFIRMATION DIALOG
   ========================================= */
    .confirm-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        z-index: 10000;
        display: flex;
        align-items: center;
        justify-content: center;
        animation: fadeIn 0.2s ease-out;
    }

    .confirm-dialog {
        background: var(--white);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-xl);
        width: 90%;
        max-width: 450px;
        overflow: hidden;
        animation: scaleIn 0.2s ease-out;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    @keyframes scaleIn {
        from {
            transform: scale(0.95);
            opacity: 0;
        }

        to {
            transform: scale(1);
            opacity: 1;
        }
    }

    .confirm-header {
        padding: 1.25rem 1.5rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        border-bottom: 1px solid var(--secondary-100);
        background: var(--secondary-50);
    }

    .confirm-icon {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 50%;
        background: var(--warning-500);
        /* Default to warning color */
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
    }

    .confirm-title {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--secondary-900);
    }

    .confirm-body {
        padding: 1.5rem;
        color: var(--secondary-600);
        line-height: 1.5;
    }

    .confirm-footer {
        padding: 1rem 1.5rem;
        background: var(--secondary-50);
        border-top: 1px solid var(--secondary-100);
        display: flex;
        justify-content: flex-end;
        gap: 0.75rem;
    }

    /* Mobile Styles */
    @media (max-width: 992px) {
        .mobile-header {
            display: flex;
        }

        .sidebar {
            transform: translateX(-100%);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 1001;
            box-shadow: var(--shadow-xl);
        }

        .sidebar.active {
            transform: translateX(0);
        }

        .sidebar-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(2px);
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }

        .sidebar-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .main-content {
            margin-left: 0;
            width: 100%;
            padding: 1rem;
            padding-top: calc(var(--mobile-header-height) + 1rem);
            /* Account for fixed header */
        }

        .content-body {
            padding: 1.25rem;
        }

        /* Hide sidebar header on mobile since we have mobile header, 
       OR keep it for the close button. Let's keep it but adjust. */
        .sidebar-header {
            justify-content: space-between;
        }
    }

    @media (max-width: 640px) {
        .content-header h1 {
            font-size: 1.5rem;
        }

        .dashboard-grid {
            grid-template-columns: 1fr;
        }

        .card-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 0.5rem;
        }

        .form-row {
            flex-direction: column;
        }

        /* Form adjustments */
        .form-group {
            margin-bottom: 1rem;
        }

        /* Button adjustments */
        .btn {
            width: 100%;
            /* Full width buttons on mobile often easier */
            justify-content: center;
            margin-bottom: 0.5rem;
        }


    }

    .toast-error .toast-icon {
        color: var(--danger-500);
    }

    .toast-warning {
        border-left-color: var(--warning-500);
    }

    .toast-warning .toast-icon {
        color: var(--warning-500);
    }

    .toast-info {
        border-left-color: var(--info-500);
    }

    .toast-info .toast-icon {
        color: var(--info-500);
    }

    /* =========================================
   11. CONFIRMATION DIALOG
   ========================================= */
    .confirm-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        z-index: 10000;
        display: flex;
        align-items: center;
        justify-content: center;
        animation: fadeIn 0.2s ease-out;
    }

    .confirm-dialog {
        background: var(--white);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-xl);
        width: 90%;
        max-width: 450px;
        overflow: hidden;
        animation: scaleIn 0.2s ease-out;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    @keyframes scaleIn {
        from {
            transform: scale(0.95);
            opacity: 0;
        }

        to {
            transform: scale(1);
            opacity: 1;
        }
    }

    .confirm-header {
        padding: 1.25rem 1.5rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        border-bottom: 1px solid var(--secondary-100);
        background: var(--secondary-50);
    }

    .confirm-icon {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 50%;
        background: var(--warning-500);
        /* Default to warning color */
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
    }

    .confirm-title {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--secondary-900);
    }

    .confirm-body {
        padding: 1.5rem;
        color: var(--secondary-600);
        line-height: 1.5;
    }

    .confirm-footer {
        padding: 1rem 1.5rem;
        background: var(--secondary-50);
        border-top: 1px solid var(--secondary-100);
        display: flex;
        justify-content: flex-end;
        gap: 0.75rem;
    }

    /* Mobile Styles */
    @media (max-width: 992px) {
        .mobile-header {
            display: flex;
        }

        .sidebar {
            transform: translateX(-100%);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 1001;
            box-shadow: var(--shadow-xl);
        }

        .sidebar.active {
            transform: translateX(0);
        }

        .sidebar-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(2px);
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }

        .sidebar-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .main-content {
            margin-left: 0;
            width: 100%;
            padding: 1rem;
            padding-top: calc(var(--mobile-header-height) + 1rem);
            /* Account for fixed header */
        }

        .content-body {
            padding: 1.25rem;
        }

        /* Hide sidebar header on mobile since we have mobile header, 
       OR keep it for the close button. Let's keep it but adjust. */
        .sidebar-header {
            justify-content: space-between;
        }
    }

    @media (max-width: 640px) {
        .content-header h1 {
            font-size: 1.5rem;
        }

        .dashboard-grid {
            grid-template-columns: 1fr;
        }

        .card-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 0.5rem;
        }

        .form-row {
            flex-direction: column;
        }

        /* Form adjustments */
        .form-group {
            margin-bottom: 1rem;
        }

        /* Button adjustments */
        .btn {
            width: 100%;
            /* Full width buttons on mobile often easier */
            justify-content: center;
            margin-bottom: 0.5rem;
        }

        .btn:last-child {
            margin-bottom: 0;
        }

        /* Table adjustments */
        .table th,
        .table td {
            padding: 0.75rem 0.5rem;
            font-size: 0.85rem;
            }
            }
            }

            .login-page {
                display: flex;
                align-items: center;
                justify-content: center;
                min-height: 100vh;
                background-color: var(--secondary-50);
            }

            .login-container {
                width: 30%;
                min-width: 320px;
                text-align: center;
            }

            @media (max-width: 640px) {
                .login-container {
                    width: 90%;
                    min-width: auto;
                }
            }
