/* CheckMate Pro - Glassmorphism Design System */
/* Version 2.0 with Light/Dark Theme Support */

:root {
    /* Primary Colors */
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    
    /* Accent Colors */
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    
    /* Status Colors */
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.15);
    --info: #3b82f6;
    --info-light: rgba(59, 130, 246, 0.15);
    
    /* Neutrals - Dark Mode (Default) */
    --dark: #0f172a;
    --dark-secondary: #1e293b;
    --gray-800: #1e293b;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --white: #ffffff;
    
    /* Glassmorphism - Dark Mode */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-light: rgba(255, 255, 255, 0.12);
    --glass-bg-heavy: rgba(255, 255, 255, 0.18);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --glass-blur: blur(20px);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Background */
    --body-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --mesh-gradient: radial-gradient(at 40% 20%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
                     radial-gradient(at 80% 80%, rgba(6, 182, 212, 0.3) 0%, transparent 50%),
                     radial-gradient(at 10% 80%, rgba(168, 85, 247, 0.2) 0%, transparent 50%);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #c084fc 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* Light Mode */
[data-theme="light"] {
    --dark: #f8fafc;
    --dark-secondary: #f1f5f9;
    --gray-800: #e2e8f0;
    --gray-700: #cbd5e1;
    --gray-600: #94a3b8;
    --gray-500: #64748b;
    --gray-400: #475569;
    --gray-300: #334155;
    --gray-200: #1e293b;
    --gray-100: #0f172a;
    
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-bg-light: rgba(240, 240, 245, 0.9);
    --glass-bg-heavy: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 0, 0, 0.12);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    
    --text-primary: #1e293b;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    --body-bg: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    --mesh-gradient: radial-gradient(at 40% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
                     radial-gradient(at 80% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
                     radial-gradient(at 10% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
    
    --success-light: rgba(16, 185, 129, 0.15);
    --warning-light: rgba(245, 158, 11, 0.15);
    --danger-light: rgba(239, 68, 68, 0.15);
    --info-light: rgba(59, 130, 246, 0.15);
}

/* Light Mode Specific Overrides */
[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .glass-card-light {
    background: rgba(241, 245, 249, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .nav-link {
    color: #475569;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
    color: #1e293b;
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .btn-secondary {
    background: rgba(241, 245, 249, 0.9);
    color: #1e293b;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .btn-secondary:hover {
    background: rgba(226, 232, 240, 0.95);
}

[data-theme="light"] .btn-outline {
    color: #475569;
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .btn-outline:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #1e293b;
}

[data-theme="light"] .form-control::placeholder {
    color: #94a3b8;
}

[data-theme="light"] .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

[data-theme="light"] .table th {
    color: #475569;
}

[data-theme="light"] .table td {
    color: #334155;
}

[data-theme="light"] .table tr:hover td {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .answer-btn {
    background: rgba(241, 245, 249, 0.9);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1e293b;
}

[data-theme="light"] .answer-btn:hover {
    background: rgba(226, 232, 240, 0.95);
    border-color: var(--primary);
}

[data-theme="light"] .upload-area {
    background: rgba(248, 250, 252, 0.9);
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .upload-area:hover {
    background: rgba(241, 245, 249, 0.95);
    border-color: var(--primary);
}

[data-theme="light"] .question-card {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .question-card.answered-yes {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, rgba(255, 255, 255, 0.9) 30%);
}

[data-theme="light"] .question-card.answered-no {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, rgba(255, 255, 255, 0.9) 30%);
}

[data-theme="light"] .stat-card {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4 {
    color: #1e293b;
}

[data-theme="light"] .header-title {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .theme-toggle {
    background: rgba(241, 245, 249, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .theme-toggle-icon:not(.active) {
    color: #64748b;
}

[data-theme="light"] .template-title,
[data-theme="light"] .question-text,
[data-theme="light"] strong {
    color: #1e293b !important;
}

[data-theme="light"] .text-muted {
    color: #64748b !important;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--body-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background var(--transition-base), color var(--transition-base);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--mesh-gradient);
    pointer-events: none;
    z-index: -1;
    transition: background var(--transition-base);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--glass-bg-light);
}

.theme-toggle-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.theme-toggle-icon.active {
    background: var(--gradient-primary);
    color: white;
}

.theme-toggle-icon:not(.active) {
    color: var(--text-muted);
}

/* Glass Card Component */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.glass-card-light {
    background: var(--glass-bg-light);
}

.glass-card-heavy {
    background: var(--glass-bg-heavy);
}

/* Glass Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
    background: var(--glass-bg-light);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--glass-bg-heavy);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

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

.btn-outline:hover {
    background: var(--glass-bg);
}

.btn-icon {
    padding: var(--space-sm);
    width: 40px;
    height: 40px;
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.85rem;
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.1rem;
}

/* Form Controls */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-label i {
    color: var(--primary-light);
}

.form-control {
    width: 100%;
    padding: var(--space-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

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

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.form-check-input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-600);
    transition: var(--transition-fast);
    border-radius: var(--radius-full);
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: var(--transition-fast);
    border-radius: 50%;
}

.switch input:checked + .switch-slider {
    background: var(--primary);
}

.switch input:checked + .switch-slider:before {
    transform: translateX(22px);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) var(--space-xl);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    transition: background var(--transition-base);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header-logo {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.header-title {
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-link {
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--glass-bg-light);
}

.header-user {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-accent);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    padding: var(--space-xl);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    min-height: calc(100vh - 80px);
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-cols-4,
    .grid-cols-3,
    .grid-cols-2 { grid-template-columns: repeat(1, 1fr); }
}

/* Stats Card */
.stat-card {
    padding: var(--space-lg);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.stat-icon.primary { background: rgba(139, 92, 246, 0.2); color: var(--primary-light); }
.stat-icon.success { background: var(--success-light); color: var(--success); }
.stat-icon.warning { background: var(--warning-light); color: var(--warning); }
.stat-icon.danger { background: var(--danger-light); color: var(--danger); }
.stat-icon.info { background: var(--info-light); color: var(--info); }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

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

/* Table */
.table-container {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    color: var(--text-secondary);
}

.table tr:hover td {
    background: var(--glass-bg);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-primary { background: rgba(139, 92, 246, 0.2); color: var(--primary-light); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }

/* Alert */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.alert-success { background: var(--success-light); border-left: 4px solid var(--success); }
.alert-warning { background: var(--warning-light); border-left: 4px solid var(--warning); }
.alert-danger { background: var(--danger-light); border-left: 4px solid var(--danger); }
.alert-info { background: var(--info-light); border-left: 4px solid var(--info); }

/* Login Container */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: var(--space-2xl);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.login-logo {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto var(--space-lg);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    color: white;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--glass-bg);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.progress-fill.success { background: linear-gradient(90deg, var(--success) 0%, #059669 100%); }
.progress-fill.warning { background: linear-gradient(90deg, var(--warning) 0%, #d97706 100%); }
.progress-fill.danger { background: linear-gradient(90deg, var(--danger) 0%, #dc2626 100%); }

/* Question Card for Checklists - Enhanced */
.question-card {
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    border-left: 4px solid transparent;
    transition: all var(--transition-fast);
}

.question-card:hover {
    transform: translateY(-1px);
}

.question-card.answered-yes {
    border-left-color: var(--success);
    background: linear-gradient(90deg, var(--success-light) 0%, var(--glass-bg) 30%);
}

.question-card.answered-no {
    border-left-color: var(--danger);
    background: linear-gradient(90deg, var(--danger-light) 0%, var(--glass-bg) 30%);
}

/* Question Number - Purple Circle like reference */
.question-number {
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.question-text {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Answer Buttons - Enhanced like reference */
.answer-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.answer-btn {
    padding: var(--space-md) var(--space-lg);
    background: var(--glass-bg-light);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.answer-btn i {
    font-size: 1.1rem;
}

.answer-btn:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.answer-btn.selected-yes {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border-color: var(--success);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.answer-btn.selected-no {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    border-color: var(--danger);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* Optional Sections */
.optional-section {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--glass-border);
}

.optional-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.optional-label i {
    color: var(--primary-light);
    font-size: 1rem;
}

.optional-label .optional-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Upload Area - Fixed and Enhanced */
.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--glass-bg);
    min-height: 140px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--glass-bg-light);
}

.upload-area .upload-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.upload-area .upload-icon i {
    font-size: 1.8rem;
    color: white;
}

.upload-area p {
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 var(--space-xs) 0;
}

.upload-area small {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* Image Preview Grid */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.preview-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 1;
    border: 2px solid var(--glass-border);
    background: var(--glass-bg);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Handle broken images */
.preview-item img[src=""],
.preview-item img:not([src]) {
    display: none;
}

.preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 1;
    transition: opacity var(--transition-fast);
}

.preview-item:hover .remove-btn {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    /* Hide only the title text, keep the logo icon */
    .header-title {
        display: none;
    }
    
    /* Hide navigation on mobile */
    .header-nav {
        display: none;
    }
    
    /* Hide username text, keep only avatar */
    .header-user > span {
        display: none;
    }
    
    /* Hide logout button on mobile - user can logout from profile */
    .header-user > a.btn-outline {
        display: none;
    }
    
    /* Smaller header padding on mobile */
    .header {
        padding: var(--space-sm) var(--space-md);
    }
    
    /* Smaller logo on mobile */
    .header-logo {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .main-content {
        padding: var(--space-md);
        margin-top: 60px;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .login-box {
        padding: var(--space-lg);
    }
    
    .question-card {
        padding: var(--space-lg);
    }
    
    .answer-buttons {
        grid-template-columns: 1fr;
    }
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-sm); }
.gap-2 { gap: var(--space-md); }
.gap-3 { gap: var(--space-lg); }

.hidden { display: none !important; }

/* Print Styles */
@media print {
    body::before { display: none; }
    .header, .btn, .no-print { display: none !important; }
    body { background: white; color: black; }
    .glass-card { background: white; box-shadow: none; border: 1px solid #ddd; }
}
