/* ========================================
   LMS Professional Design System
   Microsoft 2026 Standards - Premium Light UI
   ======================================== */

/* Import professional fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&family=Roboto+Mono:wght@400;500&display=swap');

:root {
    /* ========== Primary Colors (Microsoft 2026) ========== */
    --primary-color: #0D6EFD;           /* Microsoft Blue Primary */
    --primary-blue: #0D6EFD;            /* Microsoft Blue */
    --primary-cyan: #5CC9D6;            /* Light Soft Cyan */
    --accent-color: #5CC9D6;            /* Accent color for interactions */
    --accent-purple: #6C63FF;           /* Purple for icons */
    --success-color: #28A745;           /* Green for success */
    --warning-color: #FFC107;           /* Yellow for warnings */
    --danger-color: #DC3545;            /* Red for errors */
    --info-color: #5CC9D6;              /* Cyan for information */

    /* ========== Text Colors (Premium) ========== */
    --text-primary: #2D2D2D;            /* Soft black for home text */
    --text-main: #2D2D2D;               /* Same as primary color */
    --text-secondary: #6C757D;          /* Medium gray for secondary text */
    --text-muted: #A0AAB4;              /* Light gray for muted text */
    --text-white: #FFFFFF;              /* White for text on dark backgrounds */

    /* ========== Background Colors (Clean & Minimal) ========== */
    --bg-main: #F5F9FC;                 /* Very light main background */
    --bg-card: #FFFFFF;                 /* Card background */
    --bg-sidebar: #FFFFFF;              /* Sidebar background */
    --bg-light: #F4F7FA;                /* Light background */
    --bg-hover: #F1F5F9;                /* Background on hover */
    --bg-input: #F4F7FA;                /* Input field background */
    --bg-active: #E8F3FF;               /* Active element background */
    --bg-glass: rgba(255, 255, 255, 0.75);
    --bg-glass-strong: rgba(255, 255, 255, 0.85);
    --bg-overlay: rgba(0, 0, 0, 0.5);

    /* ========== Borders (Soft & Minimal) ========== */
    --border-color: #E1E7EC;            /* Soft borders */
    --border-light: #E1E7EC;            /* Light borders */
    --divider-light: #F0F3F5;           /* Very soft divider lines */
    --border-dark: #D1D5DB;

    /* ========== Shadows (Soft & Professional) ========== */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.08);
    --shadow-glass: 0 4px 16px rgba(0, 0, 0, 0.06);

    /* ========== Gradients (Modern & Clean) ========== */
    --gradient-primary: linear-gradient(135deg, #0D6EFD 0%, #5CC9D6 100%);
    --gradient-purple: linear-gradient(135deg, #6C63FF 0%, #9D8CFF 100%);
    --gradient-success: linear-gradient(135deg, #28A745 0%, #5CC9D6 100%);
    --gradient-warning: linear-gradient(135deg, #FFC107 0%, #FFD54F 100%);
    --gradient-danger: linear-gradient(135deg, #DC3545 0%, #FF6B6B 100%);
    --gradient-hero: linear-gradient(135deg, #0D6EFD 0%, #5CC9D6 50%, #28A745 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0.35) 100%);

    /* ========== Glass Effects (Premium Glassmorphism) ========== */
    --glass-blur: blur(14px);
    --glass-blur-strong: blur(20px);
    --glass-backdrop: blur(10px);

    /* ========== Spacing ========== */
    --spacing-xs: 0.25rem;    /* 4px */
    --spacing-sm: 0.5rem;     /* 8px */
    --spacing-md: 1rem;       /* 16px */
    --spacing-lg: 1.5rem;     /* 24px */
    --spacing-xl: 2rem;       /* 32px */
    --spacing-2xl: 3rem;      /* 48px */

    /* ========== Border Radius (Smooth) ========== */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* ========== Transitions ========== */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* ========== Chart Colors ========== */
    --chart-line-1: #1D9BF0;
    --chart-line-2: #D9534F;
    --chart-grid: #E5EAF0;
}

/* ========================================
   Global Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: 2rem;        /* 32px */
    font-weight: 700;
}

h2 {
    font-size: 1.75rem;     /* 28px */
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;      /* 24px */
}

h4 {
    font-size: 1.25rem;     /* 20px */
}

h5 {
    font-size: 1.125rem;    /* 18px */
}

h6 {
    font-size: 1rem;        /* 16px */
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
    line-height: 1.7;
}

.text-primary {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-white {
    color: var(--text-white) !important;
}

.font-mono {
    font-family: 'Roboto Mono', monospace;
}

/* ========================================
   Glass Effects
   ======================================== */
/* Basic glass card */
.glass {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-glass);
    border-radius: var(--radius-lg);
}

/* Professional white card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    padding: var(--spacing-xl);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

/* Strong glass card */
.glass-card-strong {
    background: var(--bg-glass-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
}

/* ========================================
   Buttons
   ======================================== */

/* Primary button with professional gradient */
.btn-glass-primary,
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: var(--text-white);
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all var(--transition-base);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn-glass-primary:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3);
    color: var(--text-white);
}

.btn-glass-primary:active,
.btn-primary:active {
    transform: translateY(0);
}

/* Secondary button */
.btn-glass-secondary,
.btn-secondary {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all var(--transition-base);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    cursor: pointer;
}

.btn-glass-secondary:hover,
.btn-secondary:hover {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-backdrop);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Success button */
.btn-glass-success,
.btn-success {
    background: var(--gradient-success);
    border: none;
    color: var(--text-white);
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all var(--transition-base);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.btn-glass-success:hover,
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 199, 89, 0.3);
    color: var(--text-white);
}

/* Warning button */
.btn-glass-warning,
.btn-warning {
    background: var(--warning-color);
    border: none;
    color: var(--text-white);
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all var(--transition-base);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.btn-glass-warning:hover,
.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 149, 0, 0.3);
    color: var(--text-white);
}

/* Danger button */
.btn-glass-danger,
.btn-danger {
    background: var(--danger-color);
    border: none;
    color: var(--text-white);
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all var(--transition-base);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.btn-glass-danger:hover,
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 59, 48, 0.3);
    color: var(--text-white);
}

/* Floating circular button */
.btn-floating {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--bg-glass-strong);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
}

.btn-floating:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* ========================================
   Forms & Inputs
   ======================================== */

/* Professional input field */
.glass-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="tel"],
input[type="date"],
select {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
    width: 100%;
    transition: all var(--transition-base);
    font-family: 'Inter', sans-serif;
}

.glass-input:focus,
input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    background: #FFFFFF;
}

.glass-input::placeholder,
input::placeholder {
    color: var(--text-muted);
}

/* Professional textarea */
.glass-textarea,
textarea {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
    width: 100%;
    min-height: 120px;
    resize: vertical;
    transition: all var(--transition-base);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

.glass-textarea:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    background: #FFFFFF;
}

/* Professional label */
label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9375rem;
}

/* Form Group */
.form-group {
    margin-bottom: var(--spacing-lg);
}

/* Error messages */
.text-danger,
.field-validation-error {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
    display: block;
}

/* Success messages */
.text-success {
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
    display: block;
}

/* ========================================
   Navigation & Sidebar
   ======================================== */

/* Professional sidebar */
.glass-sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.04);
    min-height: 100vh;
    position: fixed;
    width: 280px;
    left: 0;
    top: 0;
    z-index: 1000;
    padding: 0;
    transition: transform var(--transition-base);
    overflow-y: auto;
}

/* Sidebar hidden on mobile */
.glass-sidebar.hidden {
    transform: translateX(-100%);
}

/* Sidebar header */
.sidebar-header {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.02) 0%, rgba(92, 201, 214, 0.02) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    text-decoration: none;
    transition: all var(--transition-base);
}

.sidebar-logo:hover {
    transform: translateY(-2px);
}

.sidebar-logo img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
}

.sidebar-logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.5px;
}

/* Navigation menu */
.sidebar-nav {
    padding: var(--spacing-lg) 0;
}

.nav-section-title {
    padding: var(--spacing-md) var(--spacing-xl);
    margin-top: var(--spacing-md);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.nav-section-title:first-child {
    margin-top: 0;
}

.nav-item {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-xl);
    margin: 0 var(--spacing-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-base);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    position: relative;
}

.nav-link:hover {
    background: rgba(13, 110, 253, 0.08);
    color: #0066cc;
    transform: translateX(-4px);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(0, 102, 204, 0.12) 0%, transparent 100%);
    color: #0066cc;
    font-weight: 600;
    border-right: 3px solid #0066cc;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #0066cc;
    border-radius: 0 4px 4px 0;
}

.nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Sidebar toggle button */
.sidebar-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: none;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-right: 12px;
}

.sidebar-toggle:hover {
    background: rgba(0, 102, 204, 0.1);
    transform: scale(1.05);
}

.sidebar-toggle i {
    font-size: 1.25rem;
    color: var(--text-primary);
}

/* Mobile overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Sidebar Collapsed Mode */
.glass-sidebar.collapsed {
    width: 80px;
}

.glass-sidebar.collapsed .sidebar-logo-text,
.glass-sidebar.collapsed .nav-link span,
.glass-sidebar.collapsed .nav-section-title {
    display: none;
    opacity: 0;
}

.glass-sidebar.collapsed .sidebar-header {
    padding: var(--spacing-lg);
    text-align: center;
}

.glass-sidebar.collapsed .sidebar-logo {
    justify-content: center;
}

.glass-sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.875rem;
    position: relative;
}

.glass-sidebar.collapsed .nav-link i {
    width: auto;
    margin: 0;
}

/* Tooltip on hover for collapsed sidebar */
.glass-sidebar.collapsed .nav-link::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-right: 12px;
}

.glass-sidebar.collapsed .nav-link:hover::after {
    opacity: 1;
}

/* Main Content Adjustment */
.main-content {
    margin-left: 280px;
    transition: margin-left var(--transition-base);
}

.glass-sidebar.collapsed ~ .main-content {
    margin-left: 80px;
}

@media (max-width: 1024px) {
    .main-content {
        margin-right: 0;
    }

    .glass-sidebar.collapsed ~ .main-content {
        margin-right: 0;
    }
}

/* Badges - Light Version */
/* ========================================
   Badges
   ======================================== */

.badge-glass-primary,
.badge-primary {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid rgba(0, 122, 255, 0.2);
    display: inline-block;
}

.badge-glass-success,
.badge-success {
    background: rgba(52, 199, 89, 0.1);
    color: var(--success-color);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid rgba(52, 199, 89, 0.2);
    display: inline-block;
}

.badge-glass-warning,
.badge-warning {
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning-color);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid rgba(255, 149, 0, 0.2);
    display: inline-block;
}

.badge-glass-danger,
.badge-danger {
    background: rgba(255, 59, 48, 0.1);
    color: var(--danger-color);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid rgba(255, 59, 48, 0.2);
    display: inline-block;
}

/* ========================================
   Alerts & Notifications
   ======================================== */

.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    border: 1px solid;
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.alert i {
    font-size: 1.25rem;
    margin-top: 2px;
}

.alert-success {
    background: rgba(52, 199, 89, 0.1);
    border-color: rgba(52, 199, 89, 0.3);
    color: var(--success-color);
}

.alert-warning {
    background: rgba(255, 149, 0, 0.1);
    border-color: rgba(255, 149, 0, 0.3);
    color: var(--warning-color);
}

.alert-danger {
    background: rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.3);
    color: var(--danger-color);
}

.alert-info {
    background: rgba(90, 200, 250, 0.1);
    border-color: rgba(90, 200, 250, 0.3);
    color: var(--info-color);
}

/* ========================================
   Professional Modal/Popup
   ======================================== */

.glass-popup,
.modal {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-xl);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 10000;
    min-width: 400px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-hover);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--border-color);
    transform: rotate(90deg);
}

.modal-body {
    margin-bottom: var(--spacing-lg);
}

.modal-footer {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-light);
}

.popup-overlay,
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    z-index: 9999;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========================================
   Tables
   ======================================== */

.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

thead {
    background: var(--bg-light);
}

th {
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

tr:hover {
    background: var(--bg-hover);
}

tr:last-child td {
    border-bottom: none;
}

/* ========================================
   Loading & Download
   ======================================== */

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top-color: var(--primary-color);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

/* ========================================
   Utility Classes
   ======================================== */

.main-content {
    margin-left: 280px;
    padding: var(--spacing-2xl);
    min-height: 100vh;
    transition: margin-left var(--transition-base);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-3 { padding: var(--spacing-lg); }
.p-4 { padding: var(--spacing-xl); }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-1 { gap: var(--spacing-sm); }
.gap-2 { gap: var(--spacing-md); }
.gap-3 { gap: var(--spacing-lg); }

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet devices */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
        padding: var(--spacing-lg);
    }

    .glass-sidebar {
        transform: translateX(-100%);
    }

    .glass-sidebar.active {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: flex;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .glass-card {
        padding: var(--spacing-lg);
    }
}

/* Mobile phones */
@media (max-width: 768px) {
    .main-content {
        padding: var(--spacing-md);
    }

    .glass-sidebar {
        width: 100%;
        max-width: 320px;
    }

    .glass-card {
        padding: var(--spacing-md);
        border-radius: var(--radius-sm);
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.125rem;
    }

    .btn-glass-primary,
    .btn-primary,
    .btn-glass-secondary,
    .btn-secondary,
    .btn-glass-success,
    .btn-success,
    .btn-glass-warning,
    .btn-warning,
    .btn-glass-danger,
    .btn-danger {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    .glass-popup,
    .modal {
        min-width: 90vw;
        padding: var(--spacing-lg);
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn-glass-primary,
    .modal-footer .btn-primary,
    .modal-footer .btn-glass-secondary,
    .modal-footer .btn-secondary {
        width: 100%;
    }

    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .sidebar-toggle {
        top: 0.75rem;
        left: 0.75rem;
    }

    .btn-floating {
        width: 48px;
        height: 48px;
        bottom: 1rem;
        right: 1rem;
    }
}

/* Small mobile phones */
@media (max-width: 480px) {
    .main-content {
        padding: var(--spacing-sm);
    }

    .glass-card {
        padding: var(--spacing-sm);
    }

    h1 {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1.125rem;
    }

    .glass-input,
    input,
    select,
    textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .container {
        padding: 0 var(--spacing-sm);
    }
}

/* ========================================
   Additional Professional Styles
   ======================================== */

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: var(--spacing-lg);
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border-light);
    margin: var(--spacing-lg) 0;
}

/* Avatar - User profile picture */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.avatar-lg {
    width: 64px;
    height: 64px;
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

/* Card Header */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Stats card */
.stats-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    transition: all var(--transition-base);
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stats-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Roboto Mono', monospace;
}

.stats-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Icon Box */
.icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.icon-box-primary {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
}

.icon-box-success {
    background: rgba(52, 199, 89, 0.1);
    color: var(--success-color);
}

.icon-box-warning {
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning-color);
}

.icon-box-danger {
    background: rgba(255, 59, 48, 0.1);
    color: var(--danger-color);
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-dark);
}

/* Selection customization */
::selection {
    background: rgba(0, 122, 255, 0.2);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(0, 122, 255, 0.2);
    color: var(--text-primary);
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .glass-sidebar,
    .sidebar-toggle,
    .btn-floating,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .glass-card {
        box-shadow: none !important;
        border: 1px solid var(--border-color) !important;
    }
}

/* ========================================
   App Header - Professional Header
   ======================================== */

.app-header {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
    padding: 16px 40px;
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.08);
    position: sticky;
    top: 0;
    z-index: 1001;
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0066cc;
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-brand:hover {
    color: #0052a3;
    transform: translateY(-2px);
}

.header-brand i {
    font-size: 1.8rem;
}

.header-tagline {
    font-size: 0.85rem;
    color: #0066cc;
    font-weight: 700;
    font-style: italic;
    padding: 8px 12px;
    padding-left: 12px;
    border-left: 3px solid #0066cc;
    transition: all 0.3s ease;
    background: rgba(0, 102, 204, 0.05);
    border-radius: 6px;
}

.header-tagline:hover {
    color: #0052a3;
    border-left-color: #0052a3;
    background: rgba(0, 102, 204, 0.1);
}

.header-tagline i {
    margin-right: 6px;
    animation: pulse 2s ease-in-out infinite;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-user {
    color: #0066cc;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 102, 204, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.header-user:hover {
    background: rgba(0, 102, 204, 0.1);
}

.header-logout {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 20px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
    border: none;
    cursor: pointer;
}

.header-logout:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003d7a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.35);
}

/* Sidebar Toggle Button */
.sidebar-toggle-desktop {
    background: none;
    border: none;
    color: #0066cc;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
}

.sidebar-toggle-desktop:hover {
    background: rgba(0, 102, 204, 0.1);
    color: #0052a3;
}

.sidebar-toggle-desktop:active {
    transform: scale(0.95);
}

@media (max-width: 1024px) {
    .sidebar-toggle-desktop {
        display: none;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ========================================
   Page Header - Professional Page Header
   ======================================== */

.page-header {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05) 0%, rgba(92, 201, 214, 0.05) 100%);
    padding: 24px 32px;
    border-radius: 16px;
    border: 1px solid rgba(0, 102, 204, 0.1);
    margin-bottom: 32px;
}

.page-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-header-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
}

.page-title {
    color: var(--text-main);
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.page-subtitle {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
}

.page-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.page-header-with-action .page-header {
    flex: 1;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .page-header-with-action {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header-with-action .page-header {
        margin-bottom: 16px;
    }

    .page-header-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .page-title {
        font-size: 1.5rem;
    }
}

/* ========================================
   Dashboard Cards
   ======================================== */

.dashboard-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    border: 1px solid rgba(0, 102, 204, 0.1);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.08);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0066cc 0%, #0052a3 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.15);
    border-color: rgba(0, 102, 204, 0.2);
}

.dashboard-card:hover::before {
    opacity: 1;
}

.dashboard-card:hover {
    border-color: rgba(0, 102, 204, 0.2);
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.15);
    transform: translateY(-4px);
}

.dashboard-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
}

.dashboard-card-header i {
    font-size: 1.2rem;
    color: #0066cc;
    transition: all 0.3s ease;
}

.dashboard-card:hover .dashboard-card-header i {
    transform: scale(1.1) rotate(5deg);
}

.dashboard-card-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0066cc;
    margin-bottom: 8px;
    letter-spacing: -1px;
    transition: all 0.3s ease;
}

.dashboard-card:hover .dashboard-card-value {
    color: #0052a3;
}

.dashboard-card-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-bar-small {
    width: 100%;
    height: 6px;
    background: rgba(0, 102, 204, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0066cc 0%, #0052a3 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Stats Card */
.stats-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    border: 1px solid rgba(0, 102, 204, 0.1);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
    backdrop-filter: blur(10px);
}

.stats-card:hover {
    border-color: rgba(0, 102, 204, 0.2);
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.15);
    transform: translateY(-4px);
}

.stats-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
}

.stats-card:hover .stats-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.35);
}

.stats-content {
    flex: 1;
}

.stats-value {
    font-size: 2rem;
    font-weight: 800;
    color: #0066cc;
    margin-bottom: 4px;
}

.stats-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Responsive Dashboard */
@media (max-width: 1024px) {
    .dashboard-card-value {
        font-size: 2rem;
    }

    .stats-card {
        flex-direction: column;
        text-align: center;
    }

    .stats-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .stats-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .app-header {
        padding: 12px 20px;
    }

    .header-left {
        gap: 16px;
    }

    .header-brand {
        font-size: 1.2rem;
    }

    .header-brand i {
        font-size: 1.4rem;
    }

    .header-tagline {
        font-size: 0.75rem;
        padding: 6px 10px;
    }

    .header-right {
        gap: 12px;
    }

    .header-user {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .header-logout {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .dashboard-card {
        padding: 16px;
    }

    .dashboard-card-value {
        font-size: 1.8rem;
    }

    .dashboard-card-label {
        font-size: 0.8rem;
    }

    .stats-card {
        padding: 16px;
    }

    .stats-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .stats-value {
        font-size: 1.2rem;
    }

    .stats-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .dashboard-card {
        padding: 16px;
    }

    .dashboard-card-value {
        font-size: 2rem;
    }

    .stats-card {
        flex-direction: column;
        text-align: center;
    }

    .stats-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .stats-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .app-header {
        padding: 12px 20px;
    }

    .header-left {
        gap: 16px;
    }

    .header-tagline {
        display: none;
    }

    .header-brand {
        font-size: 1.2rem;
    }

    .header-right {
        gap: 12px;
    }

    .header-user {
        display: none;
    }

    .header-logout {
        padding: 6px 16px;
        font-size: 0.9rem;
    }
}

/* ========================================
   Enhanced Animations & Hover Effects
   ======================================== */

/* Performance Card Animations */
.glass-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 102, 204, 0.12);
}

/* Leaderboard Card Hover Effects */
.submission-card,
.task-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.submission-card:hover,
.task-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 102, 204, 0.15);
}

/* Tab Navigation Animations */
.task-tab,
.submission-tab {
    position: relative;
    transition: all 0.3s ease;
}

.task-tab:hover,
.submission-tab:hover {
    color: #0066cc !important;
}

/* Progress Bar Animation */
@keyframes progressFill {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Rank Circle Animation */
@keyframes rankPulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(0, 102, 204, 0.3);
    }
    50% {
        box-shadow: 0 8px 32px rgba(0, 102, 204, 0.5);
    }
}

/* Medal Icon Animation */
@keyframes medalBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Responsive Design Enhancements */
@media (max-width: 1200px) {
    .glass-card {
        padding: var(--spacing-md);
    }

    .page-header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header-icon {
        margin-bottom: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    /* Performance Card - Stack on Mobile */
    .glass-card {
        padding: var(--spacing-md);
    }

    /* Grid adjustments */
    .submission-card,
    .task-card {
        grid-column: 1 / -1;
    }

    /* Tabs - Horizontal scroll on mobile */
    .task-tab,
    .submission-tab {
        padding: var(--spacing-sm) var(--spacing-md) !important;
        font-size: 0.85rem;
    }

    /* Rank Circle - Smaller on mobile */
    .rank-circle {
        width: 100px !important;
        height: 100px !important;
    }

    .rank-circle div:first-child {
        font-size: 2rem !important;
    }

    /* Stats Grid - 2 columns on mobile */
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Page Header - Adjust on mobile */
    .page-header {
        margin-bottom: var(--spacing-lg);
    }

    .page-title {
        font-size: 1.5rem !important;
    }

    .page-subtitle {
        font-size: 0.85rem !important;
    }
}

@media (max-width: 480px) {
    /* Extra small devices */
    .glass-card {
        padding: var(--spacing-sm);
        border-radius: 8px;
    }

    .page-title {
        font-size: 1.25rem !important;
    }

    .task-tab,
    .submission-tab {
        padding: var(--spacing-xs) var(--spacing-sm) !important;
        font-size: 0.75rem;
    }

    /* Hide icons on very small screens */
    .task-tab i,
    .submission-tab i {
        display: none;
    }

    /* Adjust stat cards */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    /* Leaderboard - Compact view */
    .leaderboard-item {
        padding: var(--spacing-sm) !important;
    }
}

/* ========================================
   End of Design File
   ======================================== */
