/* ========================================
   COMPREHENSIVE DESIGN SYSTEM - 2025
   ======================================== */

/* === DRAG AND DROP STYLES === */
.subject-group-item,
.learning-strand-item,
.learning-standard-item,
.learning-indicator-item {
    transition: all 0.3s ease;
    cursor: move;
    position: relative;
}

.subject-group-item.dragging,
.learning-strand-item.dragging,
.learning-standard-item.dragging,
.learning-indicator-item.dragging {
    opacity: 0.5;
}

.subject-group-item.drag-over {
    border-top: 4px solid #3b82f6;
    padding-top: 8px;
}

.learning-strand-item.drag-over {
    border-top: 4px solid #22c55e;
    padding-top: 8px;
}

.learning-standard-item.drag-over {
    border-top: 4px solid #8b5cf6;
    padding-top: 8px;
}

.learning-indicator-item.drag-over {
    border-top: 4px solid #f97316;
    padding-top: 8px;
}

.drag-handle {
    cursor: grab;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.drag-handle:hover {
    opacity: 1;
}

.drag-handle:active {
    cursor: grabbing;
}

.subject-group-item[draggable="true"]:hover,
.learning-strand-item[draggable="true"]:hover,
.learning-standard-item[draggable="true"]:hover,
.learning-indicator-item[draggable="true"]:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Sortable animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subject-group-item.sorted,
.learning-strand-item.sorted,
.learning-standard-item.sorted,
.learning-indicator-item.sorted {
    animation: slideIn 0.3s ease;
}

/* === MINIMAL SEARCH RESULTS HEADER === */
#search-results-header {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

#search-results-header p {
    color: var(--gray-700);
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

#search-results-header strong {
    color: var(--gray-900);
    font-weight: 600;
}

#search-results-header .flex {
    align-items: center;
    gap: 12px;
}

#search-results-header label {
    color: var(--gray-600);
    font-size: 13px;
    font-weight: 500;
    margin: 0;
}

#sort-results-bank {
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--gray-700);
    outline: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

#sort-results-bank:hover {
    border-color: var(--gray-400);
}

#sort-results-bank:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 2px rgb(34 197 94 / 0.1);
}

@media (max-width: 640px) {
    #search-results-header .flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    #search-results-header .flex:last-child {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    
    #sort-results-bank {
        flex: 1;
        min-width: 0;
    }
}

:root {
    /* === UNIFIED GREEN PALETTE (Single Standard) === */
    --primary-50: #f0fdf4;
    --primary-100: #dcfce7;
    --primary-200: #bbf7d0;
    --primary-300: #86efac;
    --primary-400: #4ade80;
    --primary-500: #22c55e;    /* Main brand green - STANDARD */
    --primary-600: #16a34a;    /* Primary green - STANDARD */
    --primary-700: #15803d;    /* Primary green dark - STANDARD */
    --primary-800: #166534;
    --primary-900: #14532d;
    --primary-950: #052e16;

    /* === SEMANTIC COLORS === */
    --success: var(--primary-600);
    --success-light: var(--primary-100);
    --success-dark: var(--primary-700);
    
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-dark: #d97706;
    
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --danger-dark: #dc2626;
    
    --info: #3b82f6;
    --info-light: #dbeafe;
    --info-dark: #2563eb;

    /* === NEUTRAL PALETTE === */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --gray-950: #030712;

    /* === BACKGROUND SYSTEM === */
    --bg-primary: #ffffff;

    /* === MINIMAL HOVER SYSTEM === */
    --hover-minimal: rgba(0, 0, 0, 0.02);
    --hover-green: rgba(34, 197, 94, 0.1);
    --hover-blue: rgba(59, 130, 246, 0.1);
    --bg-secondary: var(--gray-50);
    --bg-tertiary: var(--gray-100);
    --bg-accent: var(--primary-50);
    --bg-gradient-primary: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    --bg-gradient-light: linear-gradient(135deg, var(--gray-50) 0%, var(--primary-50) 100%);
    --bg-gradient-dark: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);

    /* === SHADOW SYSTEM === */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
    --shadow-colored: 0 4px 14px 0 rgba(34, 197, 94, 0.25);

    /* === BORDER RADIUS SYSTEM === */
    --radius-none: 0px;
    --radius-sm: 0.125rem;   /* 2px */
    --radius-md: 0.375rem;   /* 6px */
    --radius-lg: 0.5rem;     /* 8px */
    --radius-xl: 0.75rem;    /* 12px */
    --radius-2xl: 1rem;      /* 16px */
    --radius-3xl: 1.5rem;    /* 24px */
    --radius-full: 9999px;

    /* === SPACING SYSTEM === */
    --space-px: 1px;
    --space-0: 0px;
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */

    /* === TYPOGRAPHY === */
    --font-family-primary: 'Prompt', sans-serif;
    --font-size-xs: 0.75rem;     /* 12px */
    --font-size-sm: 0.875rem;    /* 14px */
    --font-size-md: 1rem;        /* 16px */
    --font-size-lg: 1.125rem;    /* 18px */
    --font-size-xl: 1.25rem;     /* 20px */
    --font-size-2xl: 1.5rem;     /* 24px */
    --font-size-3xl: 1.875rem;   /* 30px */

    /* === TRANSITIONS === */
    --transition-fast: 0.15s ease-out;
    --transition-normal: 0.25s ease-out;
    --transition-slow: 0.35s ease-out;
    --transition-all-fast: all 0.15s ease-out;
    --transition-all-normal: all 0.25s ease-out;
    --transition-colors: color 0.15s ease-out, background-color 0.15s ease-out, border-color 0.15s ease-out;

    /* === STATUS COLORS (Legacy Compatibility) === */
    --status-approved: var(--success);
    --status-approved-bg: var(--success-light);
    --status-pending: var(--warning);
    --status-pending-bg: var(--warning-light);
    --status-draft: var(--gray-500);
    --status-draft-bg: var(--gray-100);
    --status-rejected: var(--danger);
    --status-rejected-bg: var(--danger-light);

    /* === LEGACY COMPATIBILITY === */
    --primary-green: var(--primary-600);
    --primary-green-dark: var(--primary-700);
    --primary-green-light: var(--primary-100);
    --secondary-gray: var(--gray-500);
    --background-gray: var(--gray-50);
    --border-gray: var(--gray-200);

    /* === COMPONENT-SPECIFIC VARIABLES === */
    --card-bg: var(--bg-primary);
    --card-border: var(--gray-200);
    --card-shadow: var(--shadow-md);
    --card-radius: var(--radius-lg);
    --card-hover-shadow: var(--shadow-lg);

    --button-radius: var(--radius-md);
    --button-shadow: var(--shadow-sm);
    --button-hover-shadow: var(--shadow-md);

    --input-border: var(--gray-300);
    --input-border-focus: var(--primary-500);
    --input-radius: var(--radius-md);
    --input-shadow-focus: 0 0 0 3px rgba(34, 197, 94, 0.1);

    /* === ANIMATION KEYFRAMES === */
    --animate-bounce: bounce 1s infinite;
    --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    --animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
    --animate-spin: spin 1s linear infinite;
}

/* Full width container for questions and approvals */
#questions-section .max-w-7xl,
#approvals-section .max-w-7xl,
#question-bank-section .max-w-7xl {
    max-width: 100% !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

/* Standardize container widths across all sections */
#questions-list,
#pending-questions,
#question-bank-list,
#users-list {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove any max-width restrictions on questions section */
#questions-section .w-full,
#questions-section .space-y-6 {
    max-width: none !important;
    width: 100% !important;
}

/* Override main-content padding for all sections to ensure consistency */
#main-content {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

/* Responsive adjustments */
@media (min-width: 1536px) {
    #questions-section .max-w-7xl,
    #approvals-section .max-w-7xl,
    #question-bank-section .max-w-7xl {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

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

/* === MODERN DESIGN IMPROVEMENTS === */

body {
    font-family: 'Prompt', sans-serif;
    background-color: #f9fafb;
    color: #374151;
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Modern page layout */
#main-content {
    background-color: #f9fafb;
    min-height: calc(100vh - 4rem);
}

/* Modern cards for dashboard */
.bg-white.rounded-xl {
    background-color: white !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1) !important;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.bg-white.rounded-xl:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1) !important;
    transform: translateY(-1px) !important;
}

/* Modern hero gradient - unified green */
.bg-gradient-to-r.from-green-500.to-emerald-600 {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    border: none !important;
    box-shadow: 0 4px 6px -1px rgb(34 197 94 / 0.2) !important;
}

/* Simple statistics cards - Clean green/white theme - Maximum specificity */
.learning-indicators-stats div.bg-gradient-to-br.from-blue-500.to-blue-600.rounded-xl,
.learning-indicators-stats div.bg-gradient-to-br.from-green-500.to-green-600.rounded-xl,
.learning-indicators-stats div.bg-gradient-to-br.from-orange-500.to-orange-600.rounded-xl,
.learning-indicators-stats div.bg-gradient-to-br.from-purple-500.to-purple-600.rounded-xl,
.learning-indicators-stats .bg-gradient-to-br {
    background: #ffffff !important; /* Clean white background */
    border: 1px solid #e5e7eb !important; /* Light gray border */
    border-left: 4px solid #22c55e !important; /* Green accent bar */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important; /* Subtle shadow */
    border-radius: 8px !important; /* Simple rounded corners */
}

/* Numbers - consistent dark gray - Maximum specificity */
.learning-indicators-stats div.bg-gradient-to-br .text-2xl,
.learning-indicators-stats .bg-gradient-to-br .text-2xl {
    color: #1f2937 !important; /* Dark gray text for numbers */
}

/* Labels - consistent medium gray - Maximum specificity */
.learning-indicators-stats div.bg-gradient-to-br div.text-blue-100,
.learning-indicators-stats div.bg-gradient-to-br div.text-green-100,
.learning-indicators-stats div.bg-gradient-to-br div.text-orange-100,
.learning-indicators-stats div.bg-gradient-to-br div.text-purple-100,
.learning-indicators-stats .bg-gradient-to-br .text-blue-100,
.learning-indicators-stats .bg-gradient-to-br .text-green-100,
.learning-indicators-stats .bg-gradient-to-br .text-orange-100,
.learning-indicators-stats .bg-gradient-to-br .text-purple-100 {
    color: #6b7280 !important; /* Medium gray text for labels */
}

/* Icons - consistent green - Maximum specificity */
.learning-indicators-stats div.bg-gradient-to-br i.fas,
.learning-indicators-stats .bg-gradient-to-br i {
    color: #22c55e !important; /* Green icons */
}

/* ========== DARK MODE OVERRIDES FOR STATISTICS CARDS ========== */
/* Dark mode - restore beautiful gradient backgrounds */
html.dark .learning-indicators-stats div.bg-gradient-to-br.from-blue-500.to-blue-600.rounded-xl,
html.dark .learning-indicators-stats div.bg-gradient-to-br.from-blue-500.to-blue-600 {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border: none !important;
    border-left: none !important;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3) !important;
}

html.dark .learning-indicators-stats div.bg-gradient-to-br.from-green-500.to-green-600.rounded-xl,
html.dark .learning-indicators-stats div.bg-gradient-to-br.from-green-500.to-green-600 {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    border: none !important;
    border-left: none !important;
    box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.3) !important;
}

html.dark .learning-indicators-stats div.bg-gradient-to-br.from-orange-500.to-orange-600.rounded-xl,
html.dark .learning-indicators-stats div.bg-gradient-to-br.from-orange-500.to-orange-600 {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    border: none !important;
    border-left: none !important;
    box-shadow: 0 4px 6px -1px rgba(249, 115, 22, 0.3) !important;
}

html.dark .learning-indicators-stats div.bg-gradient-to-br.from-purple-500.to-purple-600.rounded-xl,
html.dark .learning-indicators-stats div.bg-gradient-to-br.from-purple-500.to-purple-600 {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%) !important;
    border: none !important;
    border-left: none !important;
    box-shadow: 0 4px 6px -1px rgba(168, 85, 247, 0.3) !important;
}

/* Dark mode - white text for numbers */
html.dark .learning-indicators-stats div.bg-gradient-to-br .text-2xl,
html.dark .learning-indicators-stats .bg-gradient-to-br .text-2xl {
    color: #ffffff !important;
}

/* Dark mode - light text for labels */
html.dark .learning-indicators-stats div.bg-gradient-to-br div.text-blue-100,
html.dark .learning-indicators-stats div.bg-gradient-to-br div.text-green-100,
html.dark .learning-indicators-stats div.bg-gradient-to-br div.text-orange-100,
html.dark .learning-indicators-stats div.bg-gradient-to-br div.text-purple-100,
html.dark .learning-indicators-stats .bg-gradient-to-br .text-blue-100,
html.dark .learning-indicators-stats .bg-gradient-to-br .text-green-100,
html.dark .learning-indicators-stats .bg-gradient-to-br .text-orange-100,
html.dark .learning-indicators-stats .bg-gradient-to-br .text-purple-100 {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Dark mode - white icons */
html.dark .learning-indicators-stats div.bg-gradient-to-br i.fas,
html.dark .learning-indicators-stats .bg-gradient-to-br i {
    color: #ffffff !important;
}

/* Modern statistics cards */
.grid.grid-cols-1.md\\:grid-cols-3 > div {
    background-color: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 24px !important;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1) !important;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.grid.grid-cols-1.md\\:grid-cols-3 > div:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1) !important;
    transform: translateY(-2px) !important;
}

/* Modern icon backgrounds - reduce color intensity */
.bg-blue-100 {
    background-color: rgba(59, 130, 246, 0.1) !important;
}

.bg-green-100 {
    background-color: rgba(34, 197, 94, 0.1) !important;
}

.bg-purple-100 {
    background-color: rgba(168, 85, 247, 0.1) !important;
}

.bg-orange-100 {
    background-color: rgba(251, 146, 60, 0.1) !important;
}

/* Modern text hierarchy */
.text-2xl.font-bold {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    line-height: 1.2 !important;
}

.text-lg.font-semibold {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    color: #111827 !important;
}

.text-gray-600 {
    color: #6b7280 !important;
}

.text-gray-500 {
    color: #9ca3af !important;
}

/* Modern spacing improvements */
.space-y-6 > * + * {
    margin-top: 2rem !important;
}

.space-y-4 > * + * {
    margin-top: 1.5rem !important;
}

/* Modern buttons */
button.bg-white.text-green-600 {
    background-color: white !important;
    color: #16a34a !important;
    border: 1px solid #d1d5db !important;
    font-weight: 500 !important;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

button.bg-white.text-green-600:hover {
    background-color: #f9fafb !important;
    border-color: #16a34a !important;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1) !important;
}

/* === MODERN JAVASCRIPT GENERATED STYLES === */
/* Replace all inline styles from JavaScript files with unified CSS */

/* Subject color coding - Modern muted tones */
.subject-thai { 
    background: rgba(254, 202, 202, 0.7) !important; 
    color: #7f1d1d !important; 
    border: 1px solid rgba(252, 165, 165, 0.8) !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

.subject-math { 
    background: rgba(191, 219, 254, 0.7) !important; 
    color: #1e3a8a !important; 
    border: 1px solid rgba(147, 197, 253, 0.8) !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

.subject-science { 
    background: rgba(187, 247, 208, 0.7) !important; 
    color: #14532d !important; 
    border: 1px solid rgba(134, 239, 172, 0.8) !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

.subject-social { 
    background: rgba(254, 215, 170, 0.7) !important; 
    color: #9a3412 !important; 
    border: 1px solid rgba(253, 186, 116, 0.8) !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

.subject-health { 
    background: rgba(233, 213, 255, 0.7) !important; 
    color: #581c87 !important; 
    border: 1px solid rgba(216, 180, 254, 0.8) !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

.subject-art { 
    background: rgba(254, 243, 199, 0.7) !important; 
    color: #78350f !important; 
    border: 1px solid rgba(253, 230, 138, 0.8) !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

.subject-work { 
    background: rgba(236, 253, 245, 0.7) !important; 
    color: #064e3b !important; 
    border: 1px solid rgba(167, 243, 208, 0.8) !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

.subject-foreign { 
    background: rgba(243, 232, 255, 0.7) !important; 
    color: #5b21b6 !important; 
    border: 1px solid rgba(196, 181, 253, 0.8) !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

/* Modern status badges */
.status-draft {
    background-color: #f3f4f6 !important;
    color: #6b7280 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 16px !important;
    padding: 4px 12px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

.status-pending {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
    border-radius: 16px !important;
    padding: 4px 12px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

.status-approved {
    background-color: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 16px !important;
    padding: 4px 12px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

.status-rejected {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
    border-radius: 16px !important;
    padding: 4px 12px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

/* Modern question types */
.type-single-choice,
.type-multiple-answer,
.type-true-false,
.type-matching,
.type-essay {
    background-color: #f8fafc !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 3px 8px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

/* Modern difficulty levels */
.difficulty-easy {
    background-color: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
}

.difficulty-medium {
    background-color: #fef3c7 !important;
    color: #d97706 !important;
    border: 1px solid #fde68a !important;
}

.difficulty-hard {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
}

.difficulty-very-hard {
    background-color: #f3e8ff !important;
    color: #7c3aed !important;
    border: 1px solid #d8b4fe !important;
}

/* Modern table row states */
tr.bg-green-50 {
    background-color: rgba(240, 253, 244, 0.5) !important;
}

tr.border-green-200 {
    border-color: rgba(187, 247, 208, 0.6) !important;
}

.bg-gray-50 {
    background-color: #f9fafb !important;
}

/* Modern form elements */
.form-input,
.form-select,
.form-textarea {
    background-color: white !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none !important;
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1) !important;
}

/* Modern pagination */
.pagination-button {
    background-color: white !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.pagination-button:hover {
    background-color: #f9fafb !important;
    border-color: #9ca3af !important;
}

.pagination-button.active {
    background-color: #22c55e !important;
    border-color: #22c55e !important;
    color: white !important;
}

/* Modern modal styles */
.modal-overlay {
    background-color: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px) !important;
}

.modal-content {
    background: white !important;
    border-radius: 12px !important;
    padding: 24px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    border: 1px solid #e5e7eb !important;
}

/* Modern loading states */
.loading-spinner {
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #e5e7eb !important;
    border-top: 2px solid #22c55e !important;
    border-radius: 50% !important;
    animation: spin 1s linear infinite !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modern action buttons */
.action-button-edit {
    background-color: #f3f4f6 !important;
    color: #6b7280 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.action-button-edit:hover {
    background-color: #e5e7eb !important;
    color: #374151 !important;
}

.action-button-delete {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.action-button-delete:hover {
    background-color: #fee2e2 !important;
}

.action-button-approve {
    background-color: #f0fdf4 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.action-button-approve:hover {
    background-color: #dcfce7 !important;
}

/* Login screen specific background */
#login-screen {
    background: linear-gradient(135deg, #f8fafc 0%, #e4f4e7 100%) !important;
}

/* Question Bank Search Enhancement Styles */
.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 1.5rem;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    user-select: none;
}

.chip:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
}

.chip.active {
    background-color: #22c55e;
    border-color: #22c55e;
    color: #ffffff;
}

.chip.active:hover {
    background-color: #16a34a;
    border-color: #16a34a;
}

/* Search Results Highlighting */
.search-highlight {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: 600;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

/* Advanced Filters Animation */
#advanced-filters-bank {
    transition: all 0.3s ease-in-out;
}

#advanced-filters-bank.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Question Bank List View Styles */
.question-bank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1rem;
}

.question-bank-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* === QUESTION CARD ENHANCED (Advanced Question Cards) === */
.question-card-enhanced {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition-all-normal);
    position: relative;
    overflow: hidden;
}

.question-card-enhanced:hover {
    transform: translateY(-3px);
    border-color: var(--primary-400);
    box-shadow: var(--shadow-xl);
}

.question-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--bg-gradient-primary);
    transform: scaleY(0);
    transition: transform var(--transition-normal);
    transform-origin: bottom;
}

.question-card-enhanced:hover::before {
    transform: scaleY(1);
}

/* Usage Statistics Styles */
.question-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.question-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.question-stats .stat-icon {
    width: 12px;
    height: 12px;
    opacity: 0.7;
}

/* Enhanced Rating Display */
.question-stats .rating-display {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.question-stats .stars-container {
    display: flex;
    align-items: center;
    gap: 1px;
}

.question-stats .stars-container i {
    font-size: 0.75rem;
}

.question-stats .rating-text {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

/* Enhanced Tag Styles */
.question-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0.5rem 0;
}

.question-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    background-color: #6366f1;
    border: 1px solid #6366f1;
    border-radius: 1rem;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.question-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    opacity: 0.9;
}

.question-tag.tag-small {
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
}

.question-tag.tag-large {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.question-tag .tag-icon {
    margin-right: 0.25rem;
    font-size: 0.75em;
}

.question-tag .tag-name {
    flex: 1;
}

.question-tag .tag-count {
    margin-left: 0.25rem;
    opacity: 0.8;
    font-size: 0.8em;
}

.question-tag .tag-remove {
    margin-left: 0.375rem;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    transition: background-color 0.2s;
}

.question-tag .tag-remove:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Tag Selector Styles */
.tag-selector-container {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.75rem;
    background-color: white;
}

.selected-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
    min-height: 2rem;
    align-items: center;
}

.no-tags-selected {
    color: #9ca3af;
    font-style: italic;
    font-size: 0.875rem;
}

.tag-input-container {
    position: relative;
}

.tag-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

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

.tag-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tag-dropdown-category {
    padding: 0.5rem 0.75rem;
    background-color: #f9fafb;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}

.tag-dropdown-item {
    padding: 0.625rem 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s;
}

.tag-dropdown-item:hover {
    background-color: #f3f4f6;
}

.tag-dropdown-item.no-results,
.tag-dropdown-item.error {
    cursor: default;
    color: #9ca3af;
    font-style: italic;
}

.tag-dropdown-item.no-results:hover,
.tag-dropdown-item.error:hover {
    background-color: transparent;
}

.tag-preview {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag-preview i {
    margin-right: 0.25rem;
    font-size: 0.625rem;
}

.tag-usage {
    color: #6b7280;
    font-size: 0.75rem;
    background-color: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.75rem;
}

.create-tag-btn {
    margin-top: 0.5rem;
    width: 100%;
}

/* Legacy tag class for backward compatibility */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 1rem;
    border: 1px solid transparent;
    background-color: #f3f4f6;
    color: #374151;
}

.tag-blue {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
}

.tag-green {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.tag-orange {
    background-color: #fed7aa;
    color: #ea580c;
    border-color: #fdba74;
}

.tag-purple {
    background-color: #e9d5ff;
    color: #7c3aed;
    border-color: #c4b5fd;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* ========================================
   UNIFIED CARD SYSTEM
   ======================================== */

/* === BASE CARD STYLES === */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition-all-normal);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--primary-400);
}

/* === CARD VARIANTS === */
.card-elevated {
    box-shadow: var(--shadow-lg);
}

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

.card-flat {
    border: 1px solid var(--gray-200);
    box-shadow: none;
    background: var(--bg-primary);
}

.card-flat:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-sm);
}

.card-gradient {
    background: var(--bg-gradient-light);
    border: 1px solid var(--primary-200);
}

.card-gradient:hover {
    background: var(--bg-gradient-primary);
    color: white;
    border-color: var(--primary-500);
}

/* === CARD SIZES === */
.card-sm {
    padding: var(--space-3);
    border-radius: var(--radius-md);
}

.card-md {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
}

.card-lg {
    padding: var(--space-6);
    border-radius: var(--radius-xl);
}

.card-xl {
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
}

/* ========================================
   UNIFIED SIDEBAR & NAVIGATION SYSTEM
   ======================================== */

/* === SIDEBAR CONTAINER (Compatible with TailwindCSS) === */
.sidebar {
    background: white !important;
    border-right: 1px solid var(--gray-200) !important;
    box-shadow: var(--shadow-md) !important;
}

/* Remove problematic pseudo-element */
.sidebar::before {
    display: none !important;
}

/* ===== PROFESSIONAL SIDEBAR NAVIGATION ===== */
.nav-item {
    position: relative;
    text-decoration: none;
    display: block;
    border-radius: 0.75rem !important;
    margin: 0 0 0.25rem 0 !important;
}

.nav-item > div {
    transition: all 0.2s ease !important;
    border-radius: 0.75rem !important;
    margin: 0 !important;
    background: transparent !important;
}

/* ===== FORCE OVERRIDE ALL HOVER STATES ===== */
/* Clean hover states - subtle and consistent - Override ALL color variants */
.nav-item:hover > div,
.nav-item:hover > .flex,
.nav-item:hover > div.hover\\:bg-blue-100,
.nav-item:hover > div.hover\\:bg-green-100,
.nav-item:hover > div.hover\\:bg-orange-100,
.nav-item:hover > div.hover\\:bg-purple-100,
.nav-item:hover > div.hover\\:bg-indigo-100,
.nav-item:hover > div.hover\\:bg-gray-100,
.nav-item.group:hover > div,
.nav-item.group:hover > .flex {
    background: var(--gray-100) !important;
    transform: none !important;
}

/* Force override specific case that's causing green background */
.nav-item.group:hover > .flex.items-center.px-4.py-3 {
    background: var(--gray-100) !important;
}

/* Override Tailwind's hover:bg-* classes completely */
.hover\\:bg-blue-100:hover {
    background: var(--gray-100) !important;
}

.nav-item.active > div {
    background: #22c55e !important;
    color: white !important;
    border-radius: 0.75rem !important;
    box-shadow: none !important;
    transform: none !important;
    border-left: none !important;
}

/* ===== UNIFIED SIDEBAR ICONS ===== */
/* Override ALL icon background colors to use consistent gray theme */

.nav-item .w-8.h-8,
.nav-item .w-8.h-8.bg-blue-100,
.nav-item .w-8.h-8.bg-green-100,
.nav-item .w-8.h-8.bg-orange-100,
.nav-item .w-8.h-8.bg-purple-100,
.nav-item .w-8.h-8.bg-indigo-100,
.nav-item .w-8.h-8.bg-gray-100 {
    background: var(--gray-100) !important;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease !important;
}

.nav-item:hover .w-8.h-8,
.nav-item:hover .w-8.h-8.bg-blue-100,
.nav-item:hover .w-8.h-8.bg-green-100,
.nav-item:hover .w-8.h-8.bg-orange-100,
.nav-item:hover .w-8.h-8.bg-purple-100,
.nav-item:hover .w-8.h-8.bg-indigo-100,
.nav-item:hover .w-8.h-8.bg-gray-100 {
    background: var(--gray-200) !important;
}

.nav-item.active .w-8.h-8 {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* ===== UNIFIED SIDEBAR ICON COLORS ===== */
/* Override ALL icon colors to use consistent gray theme */

.nav-item i,
.nav-item i.text-blue-600,
.nav-item i.text-green-600,
.nav-item i.text-orange-600,
.nav-item i.text-purple-600,
.nav-item i.text-indigo-600,
.nav-item i.text-gray-600 {
    color: var(--gray-600) !important;
}

.nav-item:hover i,
.nav-item:hover i.text-blue-600,
.nav-item:hover i.text-green-600,
.nav-item:hover i.text-orange-600,
.nav-item:hover i.text-purple-600,
.nav-item:hover i.text-indigo-600,
.nav-item:hover i.text-gray-600 {
    color: var(--gray-700) !important;
}

.nav-item.active i,
.nav-item.active i.text-blue-600,
.nav-item.active i.text-green-600,
.nav-item.active i.text-orange-600,
.nav-item.active i.text-purple-600,
.nav-item.active i.text-indigo-600,
.nav-item.active i.text-gray-600 {
    color: white !important;
}

/* Fix active text colors */
.nav-item.active span,
.nav-item.active .text-gray-700,
.nav-item.active .text-gray-500 {
    color: white !important;
}

/* Logo icon fix */
.sidebar .w-10.h-10 {
    background: var(--primary-600) !important;
    border-radius: 0.75rem !important;
}

/* Duplicate removed - already exists above */

/* Fix hover text colors */
.nav-item:hover .text-gray-700 {
    color: var(--primary-700) !important;
}

/* ===== NAVIGATION COUNTERS (Unified System) ===== */
/* Standardized counter badges for all navigation items */

.nav-item .bg-green-600,
.nav-item .bg-orange-600,
.nav-item .bg-blue-600,
.nav-item .bg-purple-600,
#my-questions-count,
#pending-questions-count,
#approved-questions-count,
#total-users-count {
    background: var(--gray-500) !important;
    color: white !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    padding: 0.125rem 0.5rem !important;
    border-radius: 9999px !important;
    min-width: 1.5rem !important;
    height: 1.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s ease !important;
}

.nav-item:hover .bg-green-600,
.nav-item:hover .bg-orange-600,
.nav-item:hover .bg-blue-600,
.nav-item:hover .bg-purple-600,
.nav-item:hover #my-questions-count,
.nav-item:hover #pending-questions-count,
.nav-item:hover #approved-questions-count,
.nav-item:hover #total-users-count {
    background: var(--gray-600) !important;
    transform: none !important;
}

/* Active state badges - white with dark text for contrast */
.nav-item.active .bg-green-600,
.nav-item.active .bg-orange-600,
.nav-item.active .bg-blue-600,
.nav-item.active .bg-purple-600,
.nav-item.active #my-questions-count,
.nav-item.active #pending-questions-count,
.nav-item.active #approved-questions-count,
.nav-item.active #total-users-count {
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--primary-700) !important;
}

/* Active indicator line */
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--primary-500);
    border-radius: 0 4px 4px 0;
}

/* === ADDITIONAL SIDEBAR FIXES === */
/* Fix spacing and prevent weird gaps */
.sidebar nav {
    padding: 16px !important;
}

.sidebar .nav-item > div {
    margin: 1px 4px !important;
    padding: 8px 12px !important;
}

/* Ensure proper hover areas */
.nav-item:hover > div {
    background: rgba(34, 197, 94, 0.1) !important;
}

/* Prevent text selection issues */
.nav-item, .nav-item * {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

/* Fix section headers */
.sidebar .text-xs.font-semibold.text-gray-400 {
    color: var(--gray-500) !important;
    font-weight: 600 !important;
    margin: 16px 0 8px 12px !important;
}

/* Fix logo section */
.sidebar .p-6 {
    border-bottom: 1px solid var(--gray-200) !important;
    padding: 20px !important;
}

/* === FORM INPUT SYSTEM === */
.form-input:focus,
.search-filter:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-500) !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1) !important;
    outline: none !important;
}

/* === OVERRIDE ALL BLUE BUTTONS TO GREEN SYSTEM === */
/* Search and Filter buttons */
button[class*="bg-blue"],
.bg-blue-600,
.bg-blue-500 {
    background: var(--primary-600) !important;
    color: white !important;
}

button[class*="bg-blue"]:hover,
.bg-blue-600:hover,
.bg-blue-500:hover {
    background: var(--primary-700) !important;
}

/* Blue text elements */
.text-blue-600,
.text-blue-500 {
    color: var(--primary-600) !important;
}

/* Blue background highlights */
.bg-blue-50,
.bg-blue-100 {
    background: var(--primary-50) !important;
}

.bg-blue-50:hover,
.bg-blue-100:hover {
    background: var(--primary-100) !important;
}

/* Focus ring overrides */
.focus\:ring-blue-500:focus {
    --tw-ring-color: rgba(34, 197, 94, 0.5) !important;
}

/* Advanced search specific fixes */
#toggle-advanced-search {
    background: var(--primary-50) !important;
    color: var(--primary-700) !important;
    border: 1px solid var(--primary-200) !important;
}

#toggle-advanced-search:hover {
    background: var(--primary-100) !important;
    color: var(--primary-800) !important;
}

/* Submit button */
button[type="submit"] {
    background: var(--bg-gradient-primary) !important;
    color: white !important;
    box-shadow: var(--shadow-colored) !important;
    border: 1px solid var(--primary-600) !important;
}

button[type="submit"]:hover {
    background: var(--bg-gradient-dark) !important;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35) !important;
}

/* Loading spinner color */
.text-blue-600 svg {
    color: var(--primary-600) !important;
}

/* === OVERRIDE ALL INLINE GREEN GRADIENTS === */
/* Force override inline styles with the same color system */
button[style*="background"],
button[style*="from-green"],
.bg-gradient-to-r {
    background: var(--primary-600) !important;
    background-image: none !important;
}

button[style*="from-green"]:hover,
.bg-gradient-to-r:hover {
    background: var(--primary-700) !important;
    background-image: none !important;
}

/* Apply filters button specifically */
#apply-filters,
button[id="apply-filters"] {
    background: var(--primary-600) !important;
    background-image: none !important;
    border: 1px solid var(--primary-600) !important;
}

#apply-filters:hover,
button[id="apply-filters"]:hover {
    background: var(--primary-700) !important;
    background-image: none !important;
}

/* Focus states override */
button[class*="focus:ring-green"]:focus {
    --tw-ring-color: rgba(22, 163, 74, 0.5) !important;
}

/* === CENTRALIZED COMPONENT STYLING (Replaces all inline styles) === */

/* LOGIN SCREEN COMPONENTS */
#login-screen {
    background: linear-gradient(to bottom right, #f9fafb, #f0fdf4) !important;
}

#login-screen .mx-auto.w-16.h-16.rounded-full {
    background: var(--primary-600) !important;
}

#login-screen button[type="submit"] {
    background: var(--primary-600) !important;
    border: 1px solid var(--primary-600) !important;
}

/* SIDEBAR MOBILE MENU BUTTON */
.w-8.h-8.rounded-lg.mr-3.lg\:hidden {
    background: var(--primary-600) !important;
}

/* USER AVATAR */
#user-avatar {
    background: var(--primary-600) !important;
}

/* DASHBOARD STATISTIC CARDS */
.w-10.h-10.rounded-xl {
    background: var(--primary-600) !important;
}

/* ALL GRADIENTS TO SOLID COLOR */
.bg-gradient-to-br,
.bg-gradient-to-r,
[class*="from-green"],
[class*="to-emerald"],
[class*="to-green"] {
    background: var(--primary-600) !important;
    background-image: none !important;
}

/* ADVANCED SEARCH COMPONENT BUTTONS */
#toggle-advanced-search {
    color: var(--primary-600) !important;
    background-color: rgba(34, 197, 94, 0.1) !important;
    border-color: rgba(34, 197, 94, 0.2) !important;
}

#toggle-advanced-search:hover {
    background-color: rgba(34, 197, 94, 0.2) !important;
}

/* SEARCH SUBMIT BUTTONS */
#advanced-search-form button[type="submit"],
button[type="submit"]:not(.bg-gray-100):not(.text-gray-600) {
    background: var(--primary-600) !important;
    border: 1px solid var(--primary-600) !important;
    color: white !important;
}

/* BULK OPERATIONS BUTTONS */
#bulk-approve {
    background: var(--primary-600) !important;
    border: 1px solid var(--primary-600) !important;
    color: white !important;
}

/* === COMPREHENSIVE BLUE TO GREEN CONVERSION === */
/* All blue elements should be green to maintain consistency */

/* Background colors - Minimal Design */
.bg-blue-50 {
    background-color: var(--gray-50) !important; /* Use light gray for minimal look */
}

.bg-blue-100 {
    background-color: rgba(34, 197, 94, 0.15) !important;
}

.bg-blue-200 {
    background-color: rgba(34, 197, 94, 0.25) !important;
}

.bg-blue-300 {
    background-color: rgba(34, 197, 94, 0.4) !important;
}

.bg-blue-400 {
    background-color: rgba(34, 197, 94, 0.6) !important;
}

.bg-blue-500 {
    background-color: var(--primary-500) !important;
}

.bg-blue-600 {
    background-color: var(--primary-600) !important;
}

.bg-blue-700 {
    background-color: var(--primary-700) !important;
}

.bg-blue-800 {
    background-color: var(--primary-800) !important;
}

.bg-blue-900 {
    background-color: var(--primary-900) !important;
}

/* Text colors */
.text-blue-50 {
    color: rgba(34, 197, 94, 0.1) !important;
}

.text-blue-100 {
    color: rgba(34, 197, 94, 0.15) !important;
}

.text-blue-200 {
    color: rgba(34, 197, 94, 0.25) !important;
}

.text-blue-300 {
    color: rgba(34, 197, 94, 0.4) !important;
}

.text-blue-400 {
    color: rgba(34, 197, 94, 0.6) !important;
}

.text-blue-500 {
    color: var(--primary-500) !important; /* Use primary color */
}

.text-blue-600 {
    color: var(--gray-600) !important; /* Use gray for minimal look */
}

.text-blue-700 {
    color: var(--gray-700) !important; /* Use dark gray for headers */
}

.text-blue-800 {
    color: var(--primary-800) !important;
}

.text-blue-900 {
    color: var(--primary-900) !important;
}

/* Border colors */
.border-blue-50 {
    border-color: rgba(34, 197, 94, 0.1) !important;
}

.border-blue-100 {
    border-color: rgba(34, 197, 94, 0.15) !important;
}

.border-blue-200 {
    border-color: var(--gray-200) !important; /* Light gray border for minimal design */
}

.border-blue-300 {
    border-color: rgba(34, 197, 94, 0.4) !important;
}

.border-blue-400 {
    border-color: rgba(34, 197, 94, 0.6) !important;
}

.border-blue-500 {
    border-color: var(--primary-500) !important;
}

.border-blue-600 {
    border-color: var(--primary-600) !important;
}

.border-blue-700 {
    border-color: var(--primary-700) !important;
}

.border-blue-800 {
    border-color: var(--primary-800) !important;
}

.border-blue-900 {
    border-color: var(--primary-900) !important;
}

/* Hover states */
.hover\:bg-blue-50:hover {
    background-color: rgba(34, 197, 94, 0.1) !important;
}

.hover\:bg-blue-100:hover {
    background-color: rgba(34, 197, 94, 0.2) !important;
}

.hover\:bg-blue-200:hover {
    background-color: rgba(34, 197, 94, 0.3) !important;
}

.hover\:bg-blue-600:hover {
    background-color: var(--primary-600) !important;
}

.hover\:bg-blue-700:hover {
    background-color: var(--primary-700) !important;
}

.hover\:text-blue-600:hover {
    color: var(--primary-600) !important;
}

.hover\:text-blue-700:hover {
    color: var(--primary-700) !important;
}

/* Focus states */
.focus\:ring-blue-200:focus {
    --tw-ring-color: rgba(34, 197, 94, 0.25) !important;
}

.focus\:ring-blue-300:focus {
    --tw-ring-color: rgba(34, 197, 94, 0.4) !important;
}

.focus\:ring-blue-500:focus {
    --tw-ring-color: rgba(22, 163, 74, 0.5) !important;
}

.focus\:border-blue-500:focus {
    border-color: var(--primary-500) !important;
}

.focus\:border-blue-600:focus {
    border-color: var(--primary-600) !important;
}

/* Group hover states */
.group-hover\:bg-blue-50:hover {
    background-color: rgba(34, 197, 94, 0.1) !important;
}

.group-hover\:text-blue-600:hover {
    color: var(--primary-600) !important;
}

/* JavaScript dynamically created elements */
button[class*="blue-"],
div[class*="blue-"],
span[class*="blue-"],
.btn-blue,
.button-blue {
    background-color: var(--primary-600) !important;
    color: white !important;
    border-color: var(--primary-600) !important;
}

/* ===== PROFESSIONAL BUTTON SYSTEM ===== */
/* Standardized button classes to replace inline styles */

/* Primary Green Buttons - Standard Brand Color */
.btn-primary-gradient,
.bg-gradient-to-r.from-green-500.to-green-600 {
    background: linear-gradient(to right, var(--primary-500), var(--primary-600)) !important;
    color: white !important;
    transition: all 0.2s ease !important;
}

.btn-primary-gradient:hover,
.bg-gradient-to-r.from-green-500.to-green-600:hover {
    background: linear-gradient(to right, var(--primary-600), var(--primary-700)) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3) !important;
}

/* Icon Containers - Standard Design */
.icon-container-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600)) !important;
    color: white !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 1rem !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

.icon-container-primary:hover {
    transform: scale(1.05) !important;
}

/* Filter Buttons */
.filter-btn {
    background: linear-gradient(to right, var(--primary-500), var(--primary-600)) !important;
    color: white !important;
    border: none !important;
    transition: all 0.2s ease !important;
}

.filter-btn:hover {
    background: linear-gradient(to right, var(--primary-600), var(--primary-700)) !important;
}

/* ===== PROFESSIONAL NAVIGATION TABS ===== */
/* Clean, minimal tab design */
.metadata-tab {
    position: relative;
    padding: 1rem 1.5rem !important;
    border-bottom: 2px solid transparent !important;
    color: var(--gray-500) !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
    background: none !important;
    border-radius: 0 !important;
    margin: 0 0.5rem 0 0 !important;
}

.metadata-tab:hover {
    color: var(--gray-700) !important;
    border-bottom-color: var(--gray-300) !important;
    background: var(--gray-50) !important;
}

.metadata-tab.active {
    color: var(--primary-600) !important;
    border-bottom-color: var(--primary-600) !important;
    background: none !important;
}

/* Learning strands styles */
.learning-strands-content {
    transition: all 0.3s ease-in-out;
}

.learning-strands-content.hidden {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.learning-strands-content:not(.hidden) {
    max-height: 1000px;
    opacity: 1;
}

/* Fix tab navigation positioning */
nav[aria-label="Tabs"] {
    padding-left: 0 !important;
    margin-left: 0 !important;
    border-bottom: 1px solid var(--gray-200) !important;
}

/* ===== UNIVERSAL BUTTON STANDARDIZATION ===== */
/* Fix all blue text buttons to use consistent styling */

.text-blue-600,
.text-blue-800,
button.text-blue-600,
button.text-blue-800,
.hover\\:text-blue-800 {
    color: var(--gray-600) !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.375rem 0.75rem !important;
    border-radius: 0.375rem !important;
    border: 1px solid transparent !important;
}

.text-blue-600:hover,
.text-blue-800:hover,
button.text-blue-600:hover,
button.text-blue-800:hover,
.hover\\:text-blue-800:hover {
    color: var(--primary-600) !important;
    background: var(--gray-50) !important;
    border-color: var(--gray-200) !important;
}

/* Filter chips and advanced search buttons */
#toggle-advanced-search,
button[onclick*="filterByChip"],
button[onclick*="toggleAdvancedSearch"] {
    background: white !important;
    color: var(--gray-600) !important;
    border: 1px solid var(--gray-300) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
}

#toggle-advanced-search:hover,
button[onclick*="filterByChip"]:hover,
button[onclick*="toggleAdvancedSearch"]:hover {
    background: var(--gray-50) !important;
    border-color: var(--gray-400) !important;
    color: var(--primary-600) !important;
}

/* ===== QUESTION BANK SPECIFIC FIXES ===== */
/* Reduce excessive green in question bank */

.question-bank-header {
    background: white !important;
    border: 1px solid var(--gray-200) !important;
    border-radius: 0.75rem !important;
}

/* Quick actions should be minimal */
.quick-actions-btn {
    background: white !important;
    color: var(--gray-700) !important;
    border: 1px solid var(--gray-300) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.5rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.quick-actions-btn:hover {
    background: var(--gray-50) !important;
    border-color: var(--gray-400) !important;
    color: var(--gray-900) !important;
    transform: translateY(-1px) !important;
}

.quick-actions-btn.primary {
    background: var(--primary-600) !important;
    color: white !important;
    border-color: var(--primary-600) !important;
}

.quick-actions-btn.primary:hover {
    background: var(--primary-700) !important;
    border-color: var(--primary-700) !important;
}

/* ===== COMPREHENSIVE INLINE STYLE REPLACEMENT ===== */
/* Replace ALL bg-gradient-to-r from-green-* to-green-* with standard classes */

/* Standard green gradients from JavaScript - use sparingly */
.bg-gradient-to-r.from-green-500.to-green-600,
.bg-gradient-to-r.from-green-400.to-green-600,
.bg-gradient-to-br.from-green-500.to-green-600 {
    background: var(--primary-600) !important; /* Simple solid color instead of gradient */
}

/* Hover states for green gradients */
.hover\\:from-green-600.hover\\:to-green-700:hover,
.from-green-500.to-green-600:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700)) !important;
}

/* Progress bars */
.progress-fill {
    background: linear-gradient(to right, var(--primary-400), var(--primary-600)) !important;
    height: 100% !important;
    border-radius: 9999px !important;
    transition: all 0.5s ease-out !important;
}

/* Notification styles - Minimal Design */
.notification-success {
    background: linear-gradient(to right, var(--primary-500), var(--primary-600)) !important;
    position: fixed !important;
    top: 1rem !important;
    right: 1rem !important;
    color: white !important;
    padding: 0.75rem 1rem !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15) !important;
    z-index: 9999 !important;
    max-width: 18rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
}

/* ===== PROFESSIONAL TABLE SYSTEM ===== */

/* Table headers - clean and minimal */
.table-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 1.5rem 2rem !important;
    background: white !important;
    border: 1px solid var(--gray-200) !important;
    border-radius: 0.75rem 0.75rem 0 0 !important;
    margin-bottom: 0 !important;
}

.table-title {
    display: flex !important;
    align-items: center !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: var(--gray-900) !important;
    margin: 0 !important;
}

.table-title i {
    margin-right: 0.5rem !important;
    color: var(--primary-600) !important;
    font-size: 1.125rem !important;
}

.table-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
}

/* Professional button system */
.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    border-radius: 0.5rem !important;
    text-decoration: none !important;
    border: 1px solid transparent !important;
}

.btn-sm {
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    line-height: 1.25rem !important;
}

.btn-outline {
    background: white !important;
    color: var(--gray-700) !important;
    border-color: var(--gray-300) !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.btn-outline:hover {
    background: var(--gray-50) !important;
    border-color: var(--gray-400) !important;
    color: var(--gray-900) !important;
}

.btn-primary {
    background: var(--primary-600) !important;
    color: white !important;
    border-color: var(--primary-600) !important;
}

.btn-primary:hover {
    background: var(--primary-700) !important;
    border-color: var(--primary-700) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.2) !important;
}

.btn-success {
    background: var(--primary-600) !important;
    color: white !important;
    border-color: var(--primary-600) !important;
}

.btn-success:hover {
    background: var(--primary-700) !important;
    border-color: var(--primary-700) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.2) !important;
}

.btn i {
    margin-right: 0.375rem !important;
    font-size: 0.875rem !important;
}

/* ===== PROFESSIONAL PAGE HEADERS ===== */
/* Standardized header system for all pages */

.page-header {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    background: white !important;
    border-radius: 1rem !important;
    padding: 2rem !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
    border: 1px solid var(--gray-200) !important;
    margin-bottom: 2rem !important;
}

@media (min-width: 1024px) {
    .page-header {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
}

.page-header-content {
    display: flex !important;
    align-items: flex-start !important;
    gap: 1rem !important;
}

.page-header-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 4rem !important;
    height: 4rem !important;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600)) !important;
    border-radius: 1rem !important;
    color: white !important;
    font-size: 1.5rem !important;
    flex-shrink: 0 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.page-header-text h1 {
    font-size: 1.875rem !important;
    font-weight: 700 !important;
    color: var(--gray-900) !important;
    margin: 0 0 0.5rem 0 !important;
}

.page-header-text p {
    font-size: 1.125rem !important;
    color: var(--gray-600) !important;
    margin: 0 0 0.75rem 0 !important;
}

.page-header-meta {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    font-size: 0.875rem !important;
    color: var(--gray-500) !important;
    margin-top: 0.75rem !important;
}

.page-header-meta span {
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
}

.page-header-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
}

@media (min-width: 640px) {
    .page-header-actions {
        flex-direction: row !important;
    }
}

/* Create question button specific styling */
#create-question-btn {
    background: linear-gradient(to right, var(--primary-500), var(--primary-600)) !important;
    color: white !important;
}

#create-question-btn:hover {
    background: linear-gradient(to right, var(--primary-600), var(--primary-700)) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3) !important;
}

/* Apply filters button */
#apply-filters {
    background: linear-gradient(to right, var(--primary-500), var(--primary-600)) !important;
    color: white !important;
}

#apply-filters:hover {
    background: linear-gradient(to right, var(--primary-600), var(--primary-700)) !important;
}

/* ===== FONT AWESOME ICON FIX ===== */
/* Ensure Font Awesome icons display correctly */

/* Font Awesome Base - ENHANCED */
.fas, .far, .fab, .fal, .fat, .fass, .fasr, .fasl, .fad, .fak, 
[class*="fa-"], i[class*="fa-"] {
    -moz-osx-font-smoothing: grayscale !important;
    -webkit-font-smoothing: antialiased !important;
    display: inline-block !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
    speak: never !important;
    font-size: inherit !important;
    vertical-align: baseline !important;
}

/* Font Awesome Solid */
.fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* Font Awesome Regular */
.far {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

/* Font Awesome Brands */
.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

/* Clean icon styling - remove shadows but keep font properties */
i.fas, i.far, i.fab, i.fal,
i[class*="fa-"],
button i.fas, button i.far, button i.fab,
.btn i.fas, .btn i.far, .btn i.fab,
.text-white i.fas, .text-white i.far, .text-white i.fab {
    text-shadow: none !important;
    filter: none !important;
    -webkit-text-stroke: 0 !important;
    text-stroke: 0 !important;
    box-shadow: none !important;
    drop-shadow: none !important;
    /* Keep color inheritance */
    color: inherit !important;
}

/* Clean icon styling for all components */
#login-screen i.text-white,
.w-8.h-8.rounded-lg i.text-white,
#user-avatar i.text-white,
.w-10.h-10.rounded-xl i.text-white,
button[style*="background"] i.text-white,
.bg-green-600 i.text-white,
.bg-green-500 i.text-white,
.bg-gradient-to-br i.text-white {
    color: white !important;
    text-shadow: none !important;
    filter: none !important;
    font-weight: normal !important;
}

/* Specific icon fixes - ENHANCED */
.fas.fa-clipboard-list.text-white,
.fas.fa-graduation-cap.text-white,
.fas.fa-file-alt.text-white,
.fas.fa-graduation-cap,
i.fas.fa-graduation-cap {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    color: white !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)) !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Green background containers with white icons */
.bg-green-500 i.text-white,
.bg-green-600 i.text-white,
.bg-gradient-to-br i.text-white,
[style*="background"] i.text-white {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
    font-weight: 900 !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)) !important;
}

/* Hero section and card icons */
.hero-gradient i,
.stats-card i.text-white,
.action-card i.text-white {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2)) !important;
}

/* Table header icons */
.table-header i,
.table-title i {
    color: var(--gray-700) !important;
    text-shadow: none !important;
    filter: none !important;
}

/* Facet items active state */
.facet-item.active {
    background-color: var(--primary-600) !important;
    border-color: var(--primary-600) !important;
    color: white !important;
}

/* === NAVIGATION ICON COLOR CONSISTENCY === */
/* Fix blue icons in navigation */
.nav-item .bg-blue-100 {
    background: var(--primary-100) !important;
}

.nav-item .bg-blue-100:hover,
.nav-item .group-hover\:bg-blue-200:hover {
    background: var(--primary-200) !important;
}

.nav-item .text-blue-600 {
    color: var(--primary-600) !important;
}

/* Fix other miscellaneous blue elements */
.hover\:bg-blue-100:hover {
    background: var(--primary-100) !important;
}

.hover\:bg-blue-700:hover {
    background: var(--primary-700) !important;
}

/* === BULK OPERATIONS COLOR CONSISTENCY === */
/* Fix bulk operation buttons */
#bulk-approve {
    background: var(--primary-600) !important;
}

#bulk-approve:hover {
    background: var(--primary-700) !important;
}

/* === TABLE HEADER CONSISTENCY === */
/* Ensure all table headers use consistent styling */
th {
    color: var(--gray-700) !important;
    background: var(--gray-50) !important;
    border-color: var(--gray-200) !important;
}

/* === STATUS BADGE IMPROVEMENTS === */
/* Ensure status badges use design system colors */
.bg-red-500,
.bg-red-600 {
    background: var(--danger) !important;
}

.bg-yellow-500,
.bg-yellow-600 {
    background: var(--warning) !important;
}

.bg-gray-500,
.bg-gray-600 {
    background: var(--gray-500) !important;
}

/* === MODAL AND POPUP CONSISTENCY === */
/* Ensure modals use consistent styling */
.modal-header {
    border-color: var(--gray-200) !important;
}

.modal-content {
    box-shadow: var(--shadow-xl) !important;
    border-radius: var(--radius-lg) !important;
}

/* === COMPREHENSIVE COLOR SYSTEM OVERRIDES === */
/* Fix any remaining inconsistent colors throughout the system */

/* Login and Auth elements */
.bg-gradient-to-r.from-green-500 {
    background: var(--bg-gradient-primary) !important;
}

.focus\:ring-green-500:focus {
    --tw-ring-color: rgba(34, 197, 94, 0.5) !important;
}

.focus\:border-green-500:focus {
    border-color: var(--primary-500) !important;
}

/* Cards and containers */
.bg-gradient-to-br {
    background: var(--bg-gradient-light) !important;
}

/* Links and interactive elements */
a:hover,
.hover\:text-gray-900:hover {
    color: var(--gray-900) !important;
}

/* Dropdown and select elements */
.hover\:bg-gray-50:hover {
    background: var(--gray-50) !important;
}

.hover\:bg-gray-100:hover {
    background: var(--gray-100) !important;
}

/* Badge and counter elements */
.rounded-full {
    transition: var(--transition-all-fast) !important;
}

/* Error and success states */
.text-red-600 {
    color: var(--danger) !important;
}

.text-green-600 {
    color: var(--success) !important;
}

.text-yellow-600 {
    color: var(--warning-dark) !important;
}

/* === WIZARD AND MODAL IMPROVEMENTS === */
/* Question wizard specific fixes */
.wizard-modal .bg-gradient-to-r {
    background: var(--bg-gradient-primary) !important;
}

/* Step indicators */
.step-indicator {
    border-color: var(--gray-300) !important;
    background: var(--gray-100) !important;
}

.step-indicator.active {
    background: var(--primary-600) !important;
    color: white !important;
    border-color: var(--primary-600) !important;
}

.step-indicator.completed {
    background: var(--success) !important;
    color: white !important;
    border-color: var(--success) !important;
}

/* === RESPONSIVE AND MOBILE FIXES === */
/* Ensure mobile elements use consistent colors */
@media (max-width: 768px) {
    .mobile-menu-btn,
    .mobile-header button {
        color: var(--gray-600) !important;
    }
    
    .mobile-menu-btn:hover,
    .mobile-header button:hover {
        color: var(--primary-600) !important;
        background: var(--primary-50) !important;
    }
}

/* ========================================
   UNIFIED BUTTON SYSTEM
   ======================================== */

/* === BASE BUTTON STYLES === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border: none;
    border-radius: var(--button-radius);
    font-family: var(--font-family-primary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-all-normal);
    box-shadow: var(--button-shadow);
    position: relative;
    overflow: hidden;
    user-select: none;
    background-color: var(--gray-500);
    color: white;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--button-hover-shadow);
}

.btn:active {
    transform: translateY(0);
    transition-duration: var(--transition-fast);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

/* === BUTTON VARIANTS === */
/* btn-primary defined above with flat colors - gradient version removed */

.btn-secondary {
    background: var(--gray-500);
    color: white;
    border: 1px solid var(--gray-500);
}

.btn-secondary:hover {
    background: var(--gray-600);
    border-color: var(--gray-600);
}

/* === ADDITIONAL BUTTON VARIANTS === */
.btn-outline {
    background: transparent;
    color: var(--primary-600);
    border: 1px solid var(--primary-300);
}

.btn-outline:hover {
    background: var(--primary-50);
    color: var(--primary-700);
    border-color: var(--primary-400);
}

.btn-success {
    background: var(--bg-gradient-primary);
    color: white;
    border: 1px solid var(--success);
    box-shadow: var(--shadow-colored);
}

.btn-success:hover {
    background: var(--bg-gradient-dark);
    box-shadow: 0 6px 20px 0 rgba(34, 197, 94, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
    color: white;
    border: 1px solid var(--warning);
    box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.25);
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--warning-dark) 0%, #b45309 100%);
    box-shadow: 0 6px 20px 0 rgba(245, 158, 11, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
    color: white;
    border: 1px solid var(--danger);
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--danger-dark) 0%, #b91c1c 100%);
    box-shadow: 0 6px 20px 0 rgba(239, 68, 68, 0.35);
}

.btn-info {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-dark) 100%);
    color: white;
    border: 1px solid var(--info);
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.25);
}

.btn-info:hover {
    background: linear-gradient(135deg, var(--info-dark) 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.35);
}

/* === BUTTON SIZES === */
.btn-xs {
    padding: var(--space-1) var(--space-3);
    font-size: var(--font-size-xs);
    border-radius: var(--radius-sm);
}

.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-xs);
    border-radius: var(--radius-md);
}

.btn-md {
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-sm);
    border-radius: var(--button-radius);
}

.btn-lg {
    padding: var(--space-4) var(--space-6);
    font-size: var(--font-size-md);
    border-radius: var(--radius-lg);
}

.btn-xl {
    padding: var(--space-5) var(--space-8);
    font-size: var(--font-size-lg);
    border-radius: var(--radius-xl);
}

/* === BUTTON STATES === */
.btn-loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: var(--animate-spin);
}

.btn-info {
    background-color: #3b82f6;
    color: white;
}

.btn-info:hover {
    background-color: #2563eb;
}

/* === STATS CARD (Dashboard Statistics) === */
.stats-card {
    /* Light mode by default */
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px 0 rgb(0 0 0 / 0.06);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

/* Dark mode stats cards */
[data-theme="dark"] .stats-card {
    background: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Dark mode text colors in stats cards */
[data-theme="dark"] .stats-card .text-gray-800 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .stats-card .text-gray-600 {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .stats-card h3,
[data-theme="dark"] .stats-card p {
    color: inherit !important;
}

.stats-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-400);
    box-shadow: var(--card-hover-shadow);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bg-gradient-primary);
    transition: var(--transition-all-fast);
    opacity: 0;
}

.stats-card:hover::before {
    opacity: 1;
}

/* ========================================
   ENHANCED DASHBOARD COMPONENTS
   ======================================== */

/* === HERO SECTIONS === */
.hero-gradient {
    background: var(--bg-gradient-primary);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-colored);
    position: relative;
    overflow: hidden;
    transition: var(--transition-all-normal);
}

.hero-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(34, 197, 94, 0.3);
}

.hero-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

/* === DASHBOARD GRID SYSTEM === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    margin: var(--space-6) 0;
}

/* === ENHANCED STAT CARDS === */
.stat-card-primary {
    background: var(--bg-gradient-primary);
    color: white;
    border: 1px solid var(--primary-500);
    position: relative;
    overflow: hidden;
}

.stat-card-primary:hover {
    background: var(--bg-gradient-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-2xl);
}

.stat-card-primary::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: var(--transition-slow);
    opacity: 0;
}

.stat-card-primary:hover::before {
    opacity: 1;
    top: -10%;
    right: -10%;
}

/* === QUICK ACTION CARDS === */
.action-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: var(--space-6);
    transition: var(--transition-all-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.action-card:hover {
    border-color: var(--primary-400);
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
}

.action-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bg-gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.action-card:hover::after {
    transform: scaleX(1);
}

/* === DASHBOARD METRICS === */
.metric-value {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--primary-600);
    line-height: 1;
    margin-bottom: var(--space-1);
}

.metric-label {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-trend {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
    margin-top: var(--space-2);
}

.metric-trend.positive {
    background: var(--success-light);
    color: var(--success-dark);
}

.metric-trend.negative {
    background: var(--danger-light);
    color: var(--danger-dark);
}

.metric-trend.neutral {
    background: var(--gray-100);
    color: var(--gray-600);
}

.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid transparent;
    border-top-color: var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Question specific styles */
.questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
    padding: 0;
    width: 100%;
}

@media (max-width: 1024px) {
    .questions-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .questions-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #questions-section .max-w-7xl,
    #approvals-section .max-w-7xl,
    #question-bank-section .max-w-7xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .lg\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .xl\\:grid-cols-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .questions-grid {
        gap: 0.75rem;
    }
    
    .lg\\:grid-cols-4,
    .xl\\:grid-cols-5,
    .md\\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .flex-col.sm\\:flex-row {
        flex-direction: column;
    }
    
    .lg\\:flex-row {
        flex-direction: column;
    }
    
    .lg\\:items-center {
        align-items: stretch;
    }
}

/* === QUESTION CARD (Question Bank & Management) === */
.question-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition-all-normal);
    overflow: hidden;
    position: relative;
}

.question-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-400);
    box-shadow: var(--card-hover-shadow);
}

.question-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--bg-gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-fast);
}

.question-card:hover::after {
    transform: scaleX(1);
}

/* Question Type Selection Cards */
.question-type-card.selected > div {
    border-color: var(--primary-green) !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.2);
}

.wizard-modal {
    animation: modalFadeIn 0.3s ease-out;
}

.wizard-container {
    animation: modalSlideIn 0.3s ease-out;
}

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

/* Wizard Modal Header Enhancement */
.wizard-modal .bg-gradient-to-r {
    position: relative;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Progress indicators styling */
.wizard-modal .step-indicator {
    border: 2px solid transparent !important;
}

.wizard-modal .step-indicator.bg-white {
    background: white !important;
    color: #16a34a !important;
    border-color: white !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.wizard-modal .progress-line {
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3) !important;
}

/* Fix: Ensure wizard header stays green */
.wizard-modal div[class*="bg-gradient"] {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
}

/* Fix: Remove any white/gray backgrounds from header area */
.wizard-modal .relative.z-10,
.wizard-modal .flex.justify-between.items-center {
    background: transparent !important;
    backdrop-filter: none !important;
}

.wizard-modal .backdrop-blur-sm {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Responsive wizard modal */
@media (max-width: 640px) {
    .wizard-modal .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .wizard-container {
        max-height: 90vh !important;
        margin: 0.5rem;
    }
    
    #wizard-content {
        padding: 1rem;
    }
}

.status-draft { color: #f59e0b; }
.status-pending { color: #3b82f6; }
.status-approved { color: var(--primary-green); }
.status-rejected { color: #ef4444; }

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: modalFadeIn 0.3s ease-out;
}

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

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    max-width: 1000px;
    width: 100%;
    max-height: 95vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

/* Modern flat modal header - replaces complex gradient version */
.modal-header {
    background: white;
    color: var(--gray-900);
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    color: var(--gray-900);
}

.modal-header h3 i {
    margin-right: 10px;
    font-size: 16px;
    color: var(--primary-600);
}

.modal-body {
    padding: 2rem;
    max-height: calc(95vh - 120px);
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 3px;
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.form-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.form-section h4 {
    color: var(--primary-green-dark);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.form-section h4 i {
    margin-right: 0.5rem;
    color: var(--primary-green);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group label .required {
    color: #ef4444;
    margin-left: 0.25rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    background: #f8fafc;
    margin: -2rem -2rem 0 -2rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.screen {
    min-height: 100vh;
    display: flex;
}

/* Login Screen */
#login-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.login-header h1 i {
    color: #667eea;
    margin-right: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 1px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

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

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

.error-message {
    color: #dc3545;
    margin-top: 1rem;
    padding: 0.5rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
}

/* App Screen */
#app-screen {
    flex-direction: column;
}

/* Navigation */
.navbar {
    background: #343a40;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: bold;
}

.nav-brand i {
    margin-right: 0.5rem;
    color: #667eea;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-role {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
}


.nav-menu {
    list-style: none;
}

.nav-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
    display: block;
    padding: 1rem 1.5rem;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: #34495e;
    color: white;
}

.nav-link i {
    margin-right: 0.75rem;
    width: 20px;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 2rem;
    min-height: calc(100vh - 80px);
    margin-top: 80px;
}

/* Pages */
.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    color: #2c3e50;
    font-size: 2rem;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.stat-content p {
    color: #666;
    font-size: 0.9rem;
}

/* Search */
.search-section {
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    max-width: 500px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-item:hover {
    background: #f8f9fa;
}

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

.search-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.search-meta {
    font-size: 0.875rem;
    color: #666;
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filters select,
.filters input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    min-width: 150px;
}

/* Questions */

/* === QUESTION ITEM (Alternative Question Cards) === */
.question-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--transition-all-normal);
    position: relative;
}

.question-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary-400);
    box-shadow: var(--card-hover-shadow);
}

.question-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--bg-gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-fast);
}

.question-item:hover::after {
    transform: scaleX(1);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.question-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.question-type {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

.question-status {
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-draft {
    background: #6c757d;
    color: white;
}

.status-pending {
    background: #ffc107;
    color: #212529;
}

.status-approved {
    background: #28a745;
    color: white;
}

.status-rejected {
    background: #dc3545;
    color: white;
}

.question-actions {
    display: flex;
    gap: 0.5rem;
}

.question-content {
    padding: 1rem;
}

.question-text {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.question-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.question-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Questions List */
.questions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Users */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.user-item {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.user-info h3 {
    margin-bottom: 0.25rem;
    color: #2c3e50;
}

.user-role {
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: bold;
}

.role-admin {
    background: #dc3545;
    color: white;
}

.role-academic_admin {
    background: #28a745;
    color: white;
}

.role-teacher {
    background: #667eea;
    color: white;
}

.role-executive {
    background: #6f42c1;
    color: white;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.user-details {
    padding: 1rem;
}

.user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.user-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: #2c3e50;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.form-section {
    margin: 1.5rem 0;
}

.form-section h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Option and Pair Fields */
.option-field,
.pair-field {
    margin-bottom: 1rem;
}

.option-input,
.pair-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.option-input input[type="radio"],
.option-input input[type="checkbox"] {
    width: auto;
}

.option-input input[type="text"],
.pair-input input[type="text"] {
    flex: 1;
}

.pair-separator {
    font-weight: bold;
    color: #667eea;
    font-size: 1.2rem;
}

.option-explanation {
    margin-left: 2rem;
    font-size: 0.9rem;
    font-style: italic;
}

/* Loading Spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifications - Minimal Design */
.notification {
    position: fixed;
    top: 80px;
    right: 16px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    z-index: 3001;
    animation: slideIn 0.3s ease;
    max-width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification-success {
    background: var(--primary-600);
}

.notification-error {
    background: var(--error);
}

.notification-warning {
    background: var(--warning);
    color: #1a1a1a;
}

.notification-info {
    background: var(--info);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Utility Classes */
.no-data {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-style: italic;
}

.admin-only,
.academic-admin-only {
    display: none;
}

.pending-approval {
    border-left: 4px solid #ffc107;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .navbar {
        padding: 1rem;
    }

    .nav-user {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .questions-grid {
        grid-template-columns: 1fr;
    }

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

    .filters {
        flex-direction: column;
    }

    .filters select,
    .filters input {
        min-width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .question-header,
    .user-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .question-actions,
    .user-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .question-meta,
    .user-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .option-input,
    .pair-input {
        flex-wrap: wrap;
    }

    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .question-actions,
    .user-actions {
        flex-wrap: wrap;
    }

    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   MOBILE NAVIGATION & SIDEBAR RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    /* Sidebar Mobile */
    .sidebar {
        position: fixed;
        left: -300px;
        width: 300px;
        height: 100vh;
        top: 0;
        z-index: 50;
        background: white;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 40;
        display: none;
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* Mobile Header with Menu Button */
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        background: white;
        border-bottom: 1px solid #e5e7eb;
        position: sticky;
        top: 0;
        z-index: 30;
    }

    .mobile-menu-btn {
        background: none;
        border: none;
        font-size: 1.25rem;
        color: #374151;
        cursor: pointer;
        padding: 0.5rem;
        border-radius: 0.375rem;
        transition: background-color 0.2s;
    }

    .mobile-menu-btn:hover {
        background: #f3f4f6;
    }
    
    /* Mobile Menu States - Improved animations */
    .sidebar {
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        will-change: transform;
        height: 100vh !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 50 !important;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0) !important;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15) !important;
    }
    
    #sidebar-overlay {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
        pointer-events: none;
        backdrop-filter: blur(2px);
        z-index: 40 !important;
    }
    
    #sidebar-overlay.mobile-active {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: all !important;
    }
    
    /* Mobile menu specific styling */
    @media (max-width: 1023px) {
        .sidebar {
            background: white !important;
            border-right: 1px solid #e5e7eb !important;
            width: 280px !important;
            min-width: 280px !important;
        }
        
        /* Debug: Add temporary visible border */
        .sidebar.mobile-open {
            border: 3px solid #22c55e !important;
        }
        
        .sidebar .nav-item {
            display: flex !important;
            align-items: center !important;
            padding: 12px 16px !important;
            color: #374151 !important;
            font-weight: 500 !important;
            border-radius: 8px !important;
            margin-bottom: 4px !important;
            text-decoration: none !important;
            transition: all 0.2s ease !important;
        }
        
        .sidebar .nav-item:hover {
            background-color: #f3f4f6 !important;
            color: var(--gray-700) !important;
        }
        
        .sidebar .nav-item.active {
            background-color: #22c55e !important;
            color: white !important;
            border-left: 4px solid var(--gray-600) !important;
        }
        
        .sidebar .nav-item i {
            margin-right: 12px !important;
            width: 20px !important;
            text-align: center !important;
        }
        
        /* Logo section for mobile */
        .sidebar .p-6 {
            padding: 24px 16px !important;
            background: #f8fafc !important;
        }
        
        /* Navigation section for mobile */
        .sidebar nav {
            padding: 16px !important;
            background: white !important;
        }
    }

    .mobile-logo {
        font-weight: 600;
        color: var(--primary-green);
        font-size: 1.125rem;
    }

    .mobile-user-menu {
        position: relative;
    }

    .mobile-user-btn {
        background: none;
        border: none;
        width: 2rem;
        height: 2rem;
        border-radius: 50%;
        background: var(--primary-green);
        color: white;
        font-size: 0.875rem;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Navigation Items Mobile */
    .nav-item {
        display: flex;
        align-items: center;
        padding: 0.875rem 1.25rem;
        color: #374151;
        text-decoration: none;
        transition: all 0.2s;
        border-left: 3px solid transparent;
        font-size: 0.9375rem;
    }

    .nav-item:hover {
        background: #f9fafb;
        color: var(--gray-700);
    }

    .nav-item.active {
        background: #22c55e;
        color: white;
        border-left-color: var(--gray-600);
        font-weight: 600;
    }

    .nav-item i {
        margin-right: 0.75rem;
        width: 1.25rem;
        text-align: center;
        font-size: 1rem;
    }

    /* Section Headers in Sidebar */
    .nav-section-header {
        padding: 1rem 1.25rem 0.5rem;
        font-size: 0.6875rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #9ca3af;
    }

    /* Main Content with Sidebar */
    .main-content {
        padding: 0;
        margin: 0;
        width: 100%;
        min-height: calc(100vh - 60px);
    }

    /* Content Area */
    .content-area {
        padding: 1rem;
    }

    /* Hide desktop sidebar */
    .desktop-sidebar {
        display: none;
    }

    /* User Dropdown Mobile */
    .user-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        background: white;
        border-radius: 0.5rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        min-width: 200px;
        z-index: 60;
        padding: 0.5rem 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.2s;
    }

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

    .user-dropdown-item {
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        color: #374151;
        text-decoration: none;
        transition: background-color 0.2s;
        font-size: 0.875rem;
    }

    .user-dropdown-item:hover {
        background: #f9fafb;
    }

    .user-dropdown-item i {
        margin-right: 0.75rem;
        width: 1rem;
        text-align: center;
        color: #6b7280;
    }

    .user-dropdown-divider {
        height: 1px;
        background: #e5e7eb;
        margin: 0.5rem 0;
    }

    /* Badge styles for mobile */
    .nav-badge {
        background: #ef4444;
        color: white;
        font-size: 0.6875rem;
        padding: 0.125rem 0.375rem;
        border-radius: 9999px;
        margin-left: auto;
        font-weight: 600;
        min-width: 1.25rem;
        text-align: center;
    }

    .nav-badge.green {
        background: var(--primary-green);
    }

    .nav-badge.orange {
        background: #f59e0b;
    }
}

/* Tablet Adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .mobile-header {
        display: none;
    }
    
    .sidebar {
        position: static;
        width: 240px;
        left: 0;
        box-shadow: none;
    }

    .main-content {
        padding: 1.5rem;
    }
}

/* Desktop - Hide Mobile Elements */
@media (min-width: 1025px) {
    .mobile-header,
    .mobile-menu-btn,
    .sidebar-overlay {
        display: none;
    }

    .sidebar {
        position: static;
        left: 0;
        width: 280px;
        height: auto;
        box-shadow: none;
    }
}
   /* Modern Professional Table Design - Clean Tailwind Style */
/* สไตล์ตารางใหม่ แบบ modern, clean, professional */

/* ===== RESET & OVERRIDE ===== */
/* ลบ styling เก่าออกให้หมด */
td:nth-child(2), 
td:nth-child(3), 
td:nth-child(4), 
td:nth-child(5) {
    background: none !important;
    padding: 0.75rem 1rem !important;
    border-radius: 0 !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    min-width: auto !important;
    max-width: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

/* ===== MODERN TABLE CONTAINER ===== */
.professional-table-container {
    background: white !important;
    border-radius: 16px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
    overflow: hidden !important;
    margin-bottom: 2rem !important;
    border: 1px solid #f1f5f9 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* ===== MODERN TABLE HEADER - FLAT GREEN ===== */
.table-header {
    background-color: #22c55e !important; /* bg-green-500 */
    padding: 0.5rem 1rem !important; /* px-4 py-2 */
    color: white !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: none !important;
    border-radius: 0.5rem !important; /* rounded-lg */
    transition: background-color 0.2s ease !important;
}

.table-header:hover {
    background-color: #16a34a !important; /* hover:bg-green-600 */
}

.table-title {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.table-title i {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1rem !important;
}

/* ===== MINIMAL TABLE ACTIONS - WHITE THEME ===== */
.table-actions {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.table-actions .btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.375rem !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 0.5rem !important;
    font-size: 0.8125rem !important;
    font-weight: 400 !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

/* === MINIMAL WHITE SYSTEM FOR ALL TABLE ACTIONS === */

/* Base styles - Clean white buttons */
.table-actions .btn,
.table-actions button {
    background: white !important;
    color: var(--gray-700) !important;
    border: 1px solid var(--gray-300) !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    font-weight: 400 !important;
}

.table-actions .btn:hover,
.table-actions button:hover {
    background: var(--gray-50) !important;
    border-color: var(--gray-400) !important;
    color: var(--gray-800) !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
}

/* Export Button - Same minimal style */
.table-actions .btn-outline {
    background: white !important;
    color: var(--gray-700) !important;
    border: 1px solid var(--gray-300) !important;
}

.table-actions .btn-outline:hover {
    background: var(--gray-50) !important;
    color: var(--gray-800) !important;
    border-color: var(--gray-400) !important;
}

/* Primary button - Subtle green accent */
.table-actions .btn-primary {
    background: white !important;
    color: var(--primary-700) !important;
    border: 1px solid var(--primary-300) !important;
}

.table-actions .btn-primary:hover {
    background: var(--primary-50) !important;
    border-color: var(--primary-400) !important;
    color: var(--primary-800) !important;
}

/* Create Button - Primary action with subtle emphasis */
.table-actions .btn-success {
    background: var(--primary-600) !important;
    color: white !important;
    border: 1px solid var(--primary-600) !important;
    box-shadow: 0 1px 2px 0 rgba(34, 197, 94, 0.1) !important;
}

.table-actions .btn-success:hover {
    background: var(--primary-700) !important;
    border-color: var(--primary-700) !important;
    box-shadow: 0 2px 4px 0 rgba(34, 197, 94, 0.15) !important;
}

/* Dashboard Search Results Styles */
.search-results {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 50;
    max-height: 400px;
    overflow-y: auto;
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.search-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

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

/* Dark mode for search results */
[data-theme="dark"] .search-results {
    background: var(--bg-secondary) !important;
    border-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .search-results .hover\:bg-gray-50:hover {
    background: var(--bg-tertiary) !important;
}

[data-theme="dark"] .search-results .text-gray-900 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .search-results .text-gray-600 {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .search-results .text-gray-500 {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .search-results .bg-blue-100 {
    background: #1e3a8a !important;
}

[data-theme="dark"] .search-results .text-blue-800 {
    color: #93c5fd !important;
}

/* NUCLEAR STATS CARDS DARK MODE FIX */
[data-theme="dark"] .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4.gap-6 > div {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .grid[class*="grid-cols"] .stats-card[class*="bg-white"] {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] div[class="stats-card bg-white p-6 rounded-xl shadow-sm border border-gray-200 hover:shadow-md transition-shadow"] {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .grid .stats-card h3[class*="text-gray"] {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .grid .stats-card p[class*="text-gray"] {
    color: var(--text-secondary) !important;
}

/* Force all stats cards children text colors */
[data-theme="dark"] .stats-card * {
    color: inherit !important;
}

[data-theme="dark"] .stats-card .text-gray-800 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .stats-card .text-gray-600 {
    color: var(--text-secondary) !important;
}

/* SUPER NUCLEAR OVERRIDE - Override the .bg-white.rounded-xl rule at line 222 */
[data-theme="dark"] .bg-white.rounded-xl.stats-card,
[data-theme="dark"] .stats-card.bg-white.rounded-xl,
[data-theme="dark"] div.stats-card.bg-white.rounded-xl,
[data-theme="dark"] .bg-white.rounded-xl[class*="stats-card"],
[data-theme="dark"] .grid .bg-white.rounded-xl {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Override grid columns rule from line 242 */
[data-theme="dark"] .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-4 > div,
[data-theme="dark"] .grid.grid-cols-1.md\\:grid-cols-3 > div,
[data-theme="dark"] .grid[class*="grid-cols"] > div.bg-white,
[data-theme="dark"] .grid[class*="grid-cols"] > div[class*="bg-white"] {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* ===== QUESTION DETAILS MODAL DARK MODE ===== */
[data-theme="dark"] .question-modal {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .question-modal-header {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .question-modal-header h2 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .question-modal-close {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

[data-theme="dark"] .question-modal-close:hover {
    background: var(--bg-quaternary) !important;
}

[data-theme="dark"] .btn-back {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

[data-theme="dark"] .btn-back:hover {
    background: var(--bg-quaternary) !important;
}

[data-theme="dark"] .question-modal-body {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .question-content-compact {
    background: var(--bg-primary) !important;
}

[data-theme="dark"] .question-text {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .answer-option {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .answer-option.correct {
    background: #065f46 !important;
    border-color: #10b981 !important;
    color: #d1fae5 !important;
}

[data-theme="dark"] .answer-option-label {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .explanation-box {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .explanation-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .explanation-text {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .metadata-compact,
[data-theme="dark"] .question-modal .metadata-compact,
[data-theme="dark"] div.metadata-compact {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .meta-item,
[data-theme="dark"] .metadata-row .meta-item,
[data-theme="dark"] .metadata-compact .meta-item {
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .meta-item strong,
[data-theme="dark"] .metadata-row .meta-item strong,
[data-theme="dark"] .metadata-compact .meta-item strong {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .metadata-row,
[data-theme="dark"] .metadata-compact .metadata-row {
    background: transparent !important;
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .status-badge {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

[data-theme="dark"] .status-approved {
    background: #065f46 !important;
    color: #d1fae5 !important;
}

/* ===== QUESTION WIZARD MODAL DARK MODE ===== */
[data-theme="dark"] #wizard-content {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] #wizard-content h3 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] #wizard-content p {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .question-type-card .group {
    background: var(--bg-secondary) !important;
    border: 2px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .question-type-card .group:hover {
    border-color: var(--primary-400) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .question-type-card h4 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .question-type-card p {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .question-type-card .bg-gray-100 {
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .question-type-card .text-gray-500 {
    color: var(--text-secondary) !important;
}

/* SUPER NUCLEAR OVERRIDE for metadata-compact (override line 5888) */
[data-theme="dark"] .metadata-compact,
[data-theme="dark"] div.metadata-compact,
[data-theme="dark"] .question-modal .metadata-compact,
[data-theme="dark"] .question-modal-body .metadata-compact {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Force override any remaining white backgrounds in metadata area */
[data-theme="dark"] .metadata-compact * {
    color: inherit !important;
}

/* Override status badge gradients */
[data-theme="dark"] .metadata-compact .status-approved {
    background: #065f46 !important;
    color: #d1fae5 !important;
    border-color: #10b981 !important;
    box-shadow: none !important;
}

/* Icons - Smaller and subtle */
.table-actions .btn i {
    font-size: 0.875rem !important;
}

/* Responsive design - Even smaller on mobile */
@media (max-width: 640px) {
    .table-actions .btn {
        padding: 0.375rem 0.5rem !important;
        font-size: 0.75rem !important;
        gap: 0.25rem !important;
    }
    
    .table-actions .btn i {
        font-size: 0.8125rem !important;
    }
}

/* ===== MODERN TABLE FILTERS ===== */
.table-filters {
    padding: 1.5rem 2rem 1rem 2rem !important;
    background: #fafafa !important;
    border-bottom: 1px solid #e2e8f0 !important;
    display: flex !important;
    gap: 1rem !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

.table-search {
    position: relative !important;
    flex: 1 !important;
    min-width: 250px !important;
}

.table-search i {
    position: absolute !important;
    left: 0.75rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #64748b !important;
    z-index: 1 !important;
    font-size: 0.875rem !important;
}

.table-search input {
    width: 100% !important;
    padding: 0.625rem 1rem 0.625rem 2.5rem !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 0.875rem !important;
    background: white !important;
    transition: all 0.2s ease !important;
    color: #1e293b !important;
}

.table-search input:focus {
    outline: none !important;
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.table-search input::placeholder {
    color: #94a3b8 !important;
}

.table-filter-select {
    padding: 0.625rem 0.875rem !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 0.875rem !important;
    background: white !important;
    color: #1e293b !important;
    min-width: 130px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.table-filter-select:focus {
    outline: none !important;
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.table-filter-select:hover {
    border-color: #cbd5e1 !important;
}

/* ===== MODERN TABLE CORE ===== */
table.professional-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 0.875rem !important;
    background: white !important;
}

table.professional-table thead {
    background: white !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

table.professional-table th {
    padding: 1rem 1.5rem !important;
    text-align: left !important;
    font-weight: 600 !important;
    color: #475569 !important;
    font-size: 0.8125rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    background: white !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

table.professional-table tbody tr {
    border-bottom: 1px solid #f1f5f9 !important;
    transition: all 0.15s ease !important;
}

table.professional-table tbody tr:hover {
    background: #fafafa !important;
}

table.professional-table tbody tr:last-child {
    border-bottom: none !important;
}

table.professional-table td {
    padding: 1rem 1.5rem !important;
    text-align: left !important;
    vertical-align: middle !important;
    color: #334155 !important;
    font-size: 0.875rem !important;
}

/* ===== MODERN BADGES ===== */
/* Subject Badges - สีจะถูกกำหนดทันทีจาก table-renderer.js */
.subject-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 9999px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    /* No default colors - will be applied immediately via JavaScript */
}

/* Grade Badges - น้ำเงินสะอาด */
.grade-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.25rem 0.75rem !important;
    background: #dbeafe !important;
    color: #1e40af !important;
    border-radius: 9999px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    border: 1px solid #bfdbfe !important;
}

/* Status Badges - สีสวยตามสถานะ */
.status-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.375rem 0.875rem !important;
    border-radius: 1rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    min-width: 90px !important;
    text-align: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.025em !important;
    transition: all 0.2s ease-in-out !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* อนุมัติแล้ว */
.status-badge.approved {
    background: var(--status-approved-bg) !important;
    color: var(--status-approved) !important;
    border: 1px solid var(--status-approved) !important;
}

/* รออนุมัติ */
.status-badge.pending {
    background: var(--status-pending-bg) !important;
    color: var(--status-pending) !important;
    border: 1px solid var(--status-pending) !important;
    animation: pulse-pending 2s infinite !important;
}

/* แบบร่าง */
.status-badge.draft {
    background: var(--status-draft-bg) !important;
    color: var(--status-draft) !important;
    border: 1px solid var(--status-draft) !important;
}

/* ปฏิเสธ */
.status-badge.rejected {
    background: var(--status-rejected-bg) !important;
    color: var(--status-rejected) !important;
    border: 1px solid var(--status-rejected) !important;
}

/* Hover Effects */
.status-badge:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.status-badge.approved:hover {
    background: var(--status-approved) !important;
    color: white !important;
}

.status-badge.pending:hover {
    background: var(--status-pending) !important;
    color: white !important;
}

.status-badge.draft:hover {
    background: var(--status-draft) !important;
    color: white !important;
}

.status-badge.rejected:hover {
    background: var(--status-rejected) !important;
    color: white !important;
}

/* Pulse Animation for Pending */
@keyframes pulse-pending {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Legacy Support - เก่า */
.status-approved {
    background: var(--status-approved-bg) !important;
    color: var(--status-approved) !important;
    border: 1px solid var(--status-approved) !important;
}

.status-pending {
    background: var(--status-pending-bg) !important;
    color: var(--status-pending) !important;
    border: 1px solid var(--status-pending) !important;
}

.status-draft {
    background: var(--status-draft-bg) !important;
    color: var(--status-draft) !important;
    border: 1px solid var(--status-draft) !important;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .status-badge {
        padding: 0.25rem 0.625rem !important;
        font-size: 0.6875rem !important;
        min-width: 75px !important;
    }
}

.status-rejected {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
}

/* Role Badges for Users Table */
.role-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 9999px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    text-align: center !important;
}

.role-admin {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
}

.role-academic {
    background: #e0e7ff !important;
    color: #3730a3 !important;
    border: 1px solid #c7d2fe !important;
}

.role-teacher {
    background: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
}

.role-executive {
    background: #f3e8ff !important;
    color: #6b21a8 !important;
    border: 1px solid #e9d5ff !important;
}

/* ===== MODERN ACTION BUTTONS ===== */
.action-btn, .btn-table-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    background: white !important;
    color: #64748b !important;
    cursor: pointer !important;
    margin-right: 0.25rem !important;
    transition: all 0.15s ease !important;
    font-size: 0.875rem !important;
    text-decoration: none !important;
}

.action-btn:hover, .btn-table-action:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-1px) !important;
    text-decoration: none !important;
}

.view-btn:hover, .btn-table-action.view:hover {
    background: #22c55e !important;
    color: white !important;
    border-color: #22c55e !important;
}

.edit-btn:hover, .btn-table-action.edit:hover {
    background: #3b82f6 !important;
    color: white !important;
    border-color: #3b82f6 !important;
}

.delete-btn:hover, .btn-table-action.delete:hover {
    background: #ef4444 !important;
    color: white !important;
    border-color: #ef4444 !important;
}

.download-btn:hover, .btn-table-action.download:hover {
    background: #6366f1 !important;
    color: white !important;
    border-color: #6366f1 !important;
}

.submit-btn:hover, .btn-table-action.approve:hover {
    background: #f59e0b !important;
    color: white !important;
    border-color: #f59e0b !important;
}

.btn-table-action.reject:hover {
    background: #ef4444 !important;
    color: white !important;
    border-color: #ef4444 !important;
}

/* Button text responsiveness */
.btn-table-action .hidden {
    display: none !important;
}

@media (min-width: 640px) {
    .btn-table-action .sm\:inline {
        display: inline !important;
        margin-left: 0.25rem !important;
        font-size: 0.75rem !important;
    }
    
    .btn-table-action {
        width: auto !important;
        min-width: 36px !important;
        padding: 0.5rem 0.75rem !important;
    }
}

/* ===== BULK ACTIONS BAR ===== */
.bulk-actions-bar {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    border: 2px solid #f59e0b !important;
    border-radius: 12px !important;
    padding: 1rem 1.5rem !important;
    margin-bottom: 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.1) !important;
    animation: slideDown 0.3s ease-out !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Enhanced styling for Question Bank bulk actions */
#bulk-actions-bar-bank {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    border: 2px solid #3b82f6 !important;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1) !important;
}

#bulk-actions-bar-bank .bulk-actions-info {
    color: #1e40af !important;
}

#bulk-actions-bar-bank .bulk-actions-info span {
    background: #3b82f6 !important;
}

.bulk-actions-bar.hidden {
    display: none !important;
}

.bulk-actions-info {
    display: flex !important;
    align-items: center !important;
    color: #92400e !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
}

.bulk-actions-info span {
    background: #f59e0b !important;
    color: white !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 9999px !important;
    font-weight: 700 !important;
    margin-right: 0.5rem !important;
    min-width: 24px !important;
    text-align: center !important;
    font-size: 0.75rem !important;
}

.bulk-actions-buttons {
    display: flex !important;
    gap: 0.75rem !important;
    align-items: center !important;
}

.bulk-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.625rem 1.25rem !important;
    border: 2px solid transparent !important;
    border-radius: 8px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

.bulk-action-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    text-decoration: none !important;
}

/* Delete button - Red theme */
.bulk-action-btn[onclick*="bulkDelete"] {
    background: #ef4444 !important;
    color: white !important;
    border-color: #dc2626 !important;
}

.bulk-action-btn[onclick*="bulkDelete"]:hover {
    background: #dc2626 !important;
    border-color: #b91c1c !important;
}

/* Cancel/Clear button - Gray theme */
.bulk-action-btn[onclick*="clearSelection"] {
    background: white !important;
    color: #64748b !important;
    border-color: #cbd5e1 !important;
}

.bulk-action-btn[onclick*="clearSelection"]:hover {
    background: #f8fafc !important;
    color: #475569 !important;
    border-color: #94a3b8 !important;
}

/* Export button - Blue theme for Question Bank */
.bulk-action-btn[onclick*="exportSelected"] {
    background: #3b82f6 !important;
    color: white !important;
    border-color: #2563eb !important;
}

.bulk-action-btn[onclick*="exportSelected"]:hover {
    background: #2563eb !important;
    border-color: #1d4ed8 !important;
}

/* Enhanced icon styling for export buttons */
.bulk-action-btn[onclick*="exportSelected"] i.fa-download {
    margin-right: 0.5rem !important;
    font-size: 0.875rem !important;
}

.bulk-action-btn[onclick*="exportSelected"]:hover i.fa-download {
    animation: bounce 0.3s ease-in-out !important;
}

/* ===== CRITICAL ICON FIX - FA-GRADUATION-CAP ===== */
/* Force graduation cap icon to display properly */
.fa-graduation-cap:before {
    content: "\f19d" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* All graduation cap variations */
i.fas.fa-graduation-cap,
.fas.fa-graduation-cap,
i[class*="fa-graduation-cap"] {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
}

i.fas.fa-graduation-cap:before,
.fas.fa-graduation-cap:before {
    content: "\f19d" !important;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

/* Approve button - Green theme */
.bulk-action-btn[onclick*="bulkApprove"] {
    background: #22c55e !important;
    color: white !important;
    border-color: #16a34a !important;
}

.bulk-action-btn[onclick*="bulkApprove"]:hover {
    background: #16a34a !important;
    border-color: #15803d !important;
}

/* Reject button - Red theme */
.bulk-action-btn[onclick*="bulkReject"] {
    background: #ef4444 !important;
    color: white !important;
    border-color: #dc2626 !important;
}

.bulk-action-btn[onclick*="bulkReject"]:hover {
    background: #dc2626 !important;
    border-color: #b91c1c !important;
}

/* Animation for showing bulk actions bar */
@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .bulk-actions-bar {
        flex-direction: column !important;
        gap: 1rem !important;
        padding: 1rem !important;
    }
    
    .bulk-actions-info {
        width: 100% !important;
        justify-content: center !important;
    }
    
    .bulk-actions-buttons {
        width: 100% !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }
    
    .bulk-action-btn {
        flex: 1 !important;
        justify-content: center !important;
        padding: 0.75rem 1rem !important;
    }
}

/* ===== MODERN PAGINATION ===== */
.pagination-container {
    display: flex !important;
    align-items: center !important;
    justify-content: between !important;
    background: #fafafa !important;
    padding: 1rem 2rem !important;
    border-top: 1px solid #e2e8f0 !important;
    border-radius: 0 0 16px 16px !important;
}

.pagination-info {
    color: #64748b !important;
    font-size: 0.875rem !important;
}

.pagination-controls {
    display: flex !important;
    gap: 0.25rem !important;
    align-items: center !important;
}

.pagination-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border: 1px solid #e2e8f0 !important;
    background: white !important;
    color: #64748b !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    text-decoration: none !important;
    font-size: 0.875rem !important;
}

.pagination-btn:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    text-decoration: none !important;
}

/* Duplicate pagination rule removed - uses .pagination-button.active above */

.pagination-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .table-header {
        padding: 1rem !important;
    }
    
    .table-filters {
        padding: 1rem !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }
    
    .table-search {
        min-width: auto !important;
    }
    
    .table-filter-select {
        min-width: auto !important;
    }
    
    table.professional-table th,
    table.professional-table td {
        padding: 0.75rem 1rem !important;
        font-size: 0.8125rem !important;
    }
    
    .action-btn {
        width: 32px !important;
        height: 32px !important;
        margin-right: 0.125rem !important;
    }
    
    .pagination-container {
        padding: 1rem !important;
        flex-direction: column !important;
        gap: 1rem !important;
        text-align: center !important;
    }
}/* ===== NAVIGATION ENHANCEMENTS ===== */
/* Extracted from HTML inline styles */

/* Navigation Styles */
.nav-item.active .rounded-xl {
    background-color: #22c55e !important;
    color: white !important;
}

.nav-item.active .w-8 {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.nav-item.active span {
    color: white !important;
}

/* Smooth transitions */
.nav-item {
    transition: all 0.2s ease-in-out;
}

/* Badge animations */
.badge-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Create button hover effect */
.create-question-nav button:hover {
    transform: translateY(-1px);
}

/* Sidebar height fix */
.sidebar {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Make navigation scrollable */
nav.flex-1 {
    flex: 1;
    overflow-y: auto;
}

/* Professional gradients */
.hero-gradient {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

/* Enhanced shadows */
.enhanced-shadow {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.enhanced-shadow:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    /* Touch-friendly buttons */
    .nav-item > div {
        min-height: 48px;
        padding: 12px 16px;
    }
    
    /* Larger hero sections on mobile */
    .hero-gradient {
        padding: 24px !important;
    }
    
    /* Better spacing for mobile */
    .space-y-6 > * + * {
        margin-top: 16px !important;
    }
    
    /* Mobile dashboard cards */
    .stats-card, .bg-white.rounded-xl.p-6 {
        padding: 16px !important;
    }
    
    /* Hide subtitle on small screens */
    #page-subtitle {
        display: none;
    }
    
    /* Swipe-friendly action areas */
    .question-card {
        margin-bottom: 12px;
        touch-action: pan-y;
    }
    
    /* Mobile modal adjustments */
    .wizard-modal {
        padding: 8px !important;
    }
    
    .wizard-container {
        max-height: 90vh !important;
        margin: 8px 0 !important;
    }
    
    /* Mobile navigation */
    .lg\:ml-64 {
        margin-left: 0 !important;
    }
    
    /* Full width buttons on mobile */
    .create-question-nav button {
        width: 100%;
        padding: 16px;
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    /* Extra small screens */
    .grid-cols-1 {
        gap: 12px;
    }
    
    /* Compress navigation spacing */
    .nav-item > div {
        padding: 10px 12px;
    }
    
    /* Stack dashboard cards */
    .md\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    /* Smaller text on mobile */
    .text-2xl {
        font-size: 1.5rem !important;
    }
    
    /* Responsive hero button */
    .hero-gradient button {
        width: 100%;
        margin-top: 16px;
        padding: 12px 24px;
    }
    
    /* Mobile-first sidebar */
    .sidebar {
        width: 280px;
    }
}

/* ===== QUESTION DETAILS MODAL ===== */
#question-details-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 50 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1rem !important;
}

.question-modal {
    background: white !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    max-width: 800px !important;
    width: 100% !important;
    max-height: 90vh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.question-modal.compact {
    max-width: 900px !important;
}

.question-modal-header {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: white !important;
    padding: 1.5rem 2rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-bottom: none !important;
}

.modal-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
}

.btn-back {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    color: white !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateX(-2px) !important;
}

.question-modal-header h2 {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
}

.modal-icon {
    width: 36px !important;
    height: 36px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 0.75rem !important;
}

.modal-icon i {
    font-size: 1rem !important;
    color: white !important;
}

.question-modal-close {
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.question-modal-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.question-modal-body {
    padding: 2rem !important;
    overflow-y: auto !important;
    flex: 1 !important;
}

.question-content-compact {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
}

.question-header-row {
    border-bottom: 1px solid #e2e8f0 !important;
    padding-bottom: 1rem !important;
}

.question-text {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    line-height: 1.6 !important;
}

/* Answer Options */
.answer-options {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
}

.answer-option {
    display: flex !important;
    align-items: flex-start !important;
    padding: 0.75rem !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    transition: all 0.2s ease !important;
}

.answer-option.correct {
    border-color: #22c55e !important;
    background: #ecfdf5 !important;
}

.answer-option-label {
    width: 28px !important;
    height: 28px !important;
    background: #64748b !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    margin-right: 0.75rem !important;
    flex-shrink: 0 !important;
}

.answer-option.correct .answer-option-label {
    background: #22c55e !important;
}

.answer-option-text {
    flex: 1 !important;
    color: #334155 !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
}

/* Metadata Compact Layout */
.metadata-compact {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    padding: 2rem !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    margin-top: 1.5rem !important;
}

.metadata-row {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 1.25rem !important;
    margin-bottom: 1.25rem !important;
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.metadata-row:last-child {
    margin-bottom: 0 !important;
    border-bottom: none !important;
}

.meta-item {
    display: flex !important;
    flex-direction: column !important;
    background: white !important;
    padding: 1rem !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease !important;
}

.meta-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-1px) !important;
}

.meta-item strong {
    color: #16a34a !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 0.5rem !important;
    opacity: 0.8 !important;
}

.meta-item span:not(strong) {
    color: #1e293b !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* Status badges in modal */
.metadata-compact .status-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.5rem 1rem !important;
    border-radius: 12px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.025em !important;
    margin-top: 0.5rem !important;
}

.metadata-compact .status-pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    color: #92400e !important;
    border: 1px solid #f59e0b !important;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2) !important;
}

.metadata-compact .status-approved {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%) !important;
    color: #166534 !important;
    border: 1px solid #16a34a !important;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2) !important;
}

.metadata-compact .status-rejected {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%) !important;
    color: #991b1b !important;
    border: 1px solid #dc2626 !important;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2) !important;
}

.metadata-compact .status-draft {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%) !important;
    color: #374151 !important;
    border: 1px solid #6b7280 !important;
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.2) !important;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .question-modal {
        max-width: 95vw !important;
        margin: 1rem !important;
    }
    
    .question-modal-header {
        padding: 1rem 1.5rem !important;
    }
    
    .question-modal-body {
        padding: 1.5rem !important;
    }
    
    .metadata-row {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .meta-item {
        padding: 0.75rem !important;
    }
    
    .meta-item strong {
        font-size: 0.7rem !important;
        margin-bottom: 0.375rem !important;
    }
    
    .meta-item span:not(strong) {
        font-size: 0.875rem !important;
    }
    
    .metadata-compact {
        padding: 1.25rem !important;
        margin-top: 1rem !important;
    }
    
    .question-text {
        font-size: 1rem !important;
    }
}

/* ===== QUESTION DETAILS MODAL DARK MODE ===== */
[data-theme="dark"] #question-detail-modal .bg-white,
[data-theme="dark"] #question-detail-modal div.bg-white {
    background: #374151 !important; /* gray-700 */
    color: #f9fafb !important; /* gray-50 */
}

[data-theme="dark"] #question-detail-modal h2 {
    color: #f9fafb !important;
}

[data-theme="dark"] #question-detail-modal button {
    color: #9ca3af !important; /* gray-400 */
}

[data-theme="dark"] #question-detail-modal button:hover {
    color: #f9fafb !important; /* gray-50 */
}

[data-theme="dark"] #question-detail-modal .question-text,
[data-theme="dark"] #question-detail-modal .answer-option-text {
    color: #f9fafb !important;
}

/* Force override all white backgrounds in modal */
[data-theme="dark"] #question-detail-modal *[class*="bg-white"],
[data-theme="dark"] #question-detail-modal *.bg-white {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Nuclear option: force dark backgrounds */
[data-theme="dark"] #question-detail-modal > div {
    background: #374151 !important; /* gray-700 */
    color: #f9fafb !important;
}

/* ACTUAL: Dark mode styling for modal */
#question-detail-modal[data-theme="dark"] {
    background: rgba(0, 0, 0, 0.8) !important;
}

#question-detail-modal[data-theme="dark"] > div {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

#question-detail-modal[data-theme="dark"] .metadata-compact {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

#question-detail-modal[data-theme="dark"] .meta-item {
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}

/* ===== METADATA CLEAN DESIGN (GitHub-like) ===== */
.metadata-clean {
    background: transparent !important;
    padding: 0 !important;
    margin: 1.5rem 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.metadata-clean .meta-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
}

.metadata-clean .meta-row:last-child {
    border-bottom: none !important;
}

.metadata-clean .meta-row strong {
    color: #374151 !important;
    font-weight: 500 !important;
    margin-right: 1rem !important;
    min-width: 100px !important;
    flex-shrink: 0 !important;
}

.metadata-clean .meta-row > span:not(strong):not(.status-badge):not(.difficulty-badge) {
    color: #6b7280 !important;
    text-align: right !important;
    flex: 1 !important;
}

/* Difficulty badge in clean design */
.metadata-clean .difficulty-badge {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 6px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    text-transform: capitalize !important;
}

.metadata-clean .difficulty-badge.easy {
    background: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #16a34a !important;
}

.metadata-clean .difficulty-badge.medium {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #f59e0b !important;
}

.metadata-clean .difficulty-badge.hard {
    background: #fecaca !important;
    color: #991b1b !important;
    border: 1px solid #dc2626 !important;
}

.metadata-clean .difficulty-badge.very_hard {
    background: #ede9fe !important;
    color: #6b21a8 !important;
    border: 1px solid #9333ea !important;
}

/* Status badge in clean design */
.metadata-clean .status-badge {
    padding: 0.25rem 0.75rem !important;
    border-radius: 6px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.025em !important;
}

.metadata-clean .status-pending {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #f59e0b !important;
}

.metadata-clean .status-approved {
    background: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #16a34a !important;
}

.metadata-clean .status-rejected {
    background: #fecaca !important;
    color: #991b1b !important;
    border: 1px solid #dc2626 !important;
}

.metadata-clean .status-draft {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border: 1px solid #6b7280 !important;
}

/* Dark mode for clean design */
[data-theme="dark"] .metadata-clean .meta-row {
    border-bottom-color: #30363d !important;
}

[data-theme="dark"] .metadata-clean .meta-row strong {
    color: #f0f6fc !important;
}

[data-theme="dark"] .metadata-clean .meta-row > span:not(strong):not(.status-badge):not(.difficulty-badge) {
    color: #8b949e !important;
}

[data-theme="dark"] .metadata-clean .difficulty-badge.easy {
    background: #0d5016 !important;
    color: #57d364 !important;
    border-color: #238636 !important;
}

[data-theme="dark"] .metadata-clean .difficulty-badge.medium {
    background: #7c2d12 !important;
    color: #fb923c !important;
    border-color: #ea580c !important;
}

[data-theme="dark"] .metadata-clean .difficulty-badge.hard {
    background: #7f1d1d !important;
    color: #fca5a5 !important;
    border-color: #dc2626 !important;
}

[data-theme="dark"] .metadata-clean .difficulty-badge.very_hard {
    background: #581c87 !important;
    color: #c084fc !important;
    border-color: #9333ea !important;
}

[data-theme="dark"] .metadata-clean .status-pending {
    background: #7c2d12 !important;
    color: #fb923c !important;
    border-color: #ea580c !important;
}

[data-theme="dark"] .metadata-clean .status-approved {
    background: #0d5016 !important;
    color: #57d364 !important;
    border-color: #238636 !important;
}

[data-theme="dark"] .metadata-clean .status-rejected {
    background: #7f1d1d !important;
    color: #fca5a5 !important;
    border-color: #dc2626 !important;
}

[data-theme="dark"] .metadata-clean .status-draft {
    background: #21262d !important;
    color: #8b949e !important;
    border-color: #30363d !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .metadata-clean .meta-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 1rem 0 !important;
    }
    
    .metadata-clean .meta-row strong {
        margin-bottom: 0.5rem !important;
        min-width: auto !important;
    }
    
    .metadata-clean .meta-row > span:not(strong):not(.status-badge):not(.difficulty-badge) {
        text-align: left !important;
    }
}

/* ===== QUESTION WIZARD MODAL ===== */
/* Full Screen Wizard Modal */
.wizard-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.5) 0%, rgba(6, 78, 59, 0.3) 100%) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 50 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1rem !important;
    overflow-y: auto !important;
}

.wizard-container {
    background: white !important;
    border-radius: 0 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Desktop Styling */
@media (min-width: 1024px) {
    .wizard-container {
        border-radius: 1rem !important;
        max-width: 1728px !important; /* max-w-7xl */
        height: 95vh !important;
        margin: 1rem 0 !important;
    }
}

/* Wizard Header */
.wizard-modal .bg-gradient-to-r {
    padding: 0.75rem 1.5rem !important;
    position: relative !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

@media (min-width: 1024px) {
    .wizard-modal .bg-gradient-to-r {
        padding: 1.5rem !important;
    }
}

/* Progress Container */
.progress-container {
    margin-top: 1rem !important;
}

.progress-line {
    transition: width 0.5s ease-out !important;
}

/* Step Indicators */
.step-indicator {
    width: 3rem !important;
    height: 3rem !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

.step-indicator.active {
    background: white !important;
    color: #16a34a !important;
    transform: scale(1.1) !important;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3) !important;
}

.step-indicator.completed {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #16a34a !important;
    transform: scale(1.05) !important;
}

.step-indicator.inactive {
    background: rgba(255, 255, 255, 0.5) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    transform: scale(0.95) !important;
}

/* Question Type Cards */
.question-type-card {
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.question-type-card:hover {
    transform: translateY(-2px) !important;
}

.question-type-card.selected > div {
    border-color: #22c55e !important;
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.2) !important;
    background: #ecfdf5 !important;
}

.question-type-card.selected .group::before {
    content: '' !important;
    position: absolute !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
    width: 24px !important;
    height: 24px !important;
    background: #22c55e !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
}

.question-type-card.selected .group::after {
    content: '✓' !important;
    position: absolute !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
    width: 24px !important;
    height: 24px !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 11 !important;
}

/* Form Elements */
.wizard-modal input, 
.wizard-modal textarea, 
.wizard-modal select {
    border: 2px solid #e5e7eb !important;
    border-radius: 0.75rem !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
    background: white !important;
}

.wizard-modal input:focus,
.wizard-modal textarea:focus,
.wizard-modal select:focus {
    outline: none !important;
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Answer Options in Wizard */
.answer-option-input {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    margin-bottom: 0.75rem !important;
    padding: 0.75rem !important;
    background: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 0.75rem !important;
    transition: all 0.2s ease !important;
}

.answer-option-input:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

.answer-option-input.correct {
    background: #ecfdf5 !important;
    border-color: #22c55e !important;
}

.answer-option-label {
    width: 32px !important;
    height: 32px !important;
    background: #64748b !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    flex-shrink: 0 !important;
}

.answer-option-input.correct .answer-option-label {
    background: #22c55e !important;
}

/* Wizard Buttons */
.wizard-modal button {
    transition: all 0.2s ease !important;
    border-radius: 0.75rem !important;
    font-weight: 500 !important;
}

.wizard-modal button:hover {
    transform: translateY(-1px) !important;
}

/* Wizard Content Area */
#wizard-content {
    flex: 1 !important;
    background: linear-gradient(135deg, #f9fafb 0%, rgba(16, 185, 129, 0.05) 100%) !important;
    overflow: hidden !important;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .wizard-modal {
        padding: 0 !important;
    }
    
    .question-type-card {
        margin-bottom: 1rem !important;
    }
    
    .wizard-modal .grid-cols-2 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .wizard-modal input,
    .wizard-modal textarea {
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
}

/* Loading States */
.wizard-loading {
    opacity: 0.6 !important;
    pointer-events: none !important;
}

.wizard-loading::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 32px !important;
    height: 32px !important;
    border: 3px solid #f3f4f6 !important;
    border-top: 3px solid #22c55e !important;
    border-radius: 50% !important;
    transform: translate(-50%, -50%) !important;
    animation: spin 1s linear infinite !important;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Matching Questions Specific */
.matching-pairs {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
    margin-top: 1rem !important;
}

.matching-column {
    background: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 0.75rem !important;
    padding: 1rem !important;
}

.matching-item {
    padding: 0.75rem !important;
    background: white !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.matching-item:hover {
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
}

.matching-item.selected {
    background: #ecfdf5 !important;
    border-color: #22c55e !important;
    color: #065f46 !important;
}

/* Essay Questions Specific */
.essay-question-container {
    margin-top: 1rem !important;
}

.essay-rubric {
    background: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 0.75rem !important;
    padding: 1rem !important;
    margin-top: 1rem !important;
}

.rubric-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.5rem 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.rubric-item:last-child {
    border-bottom: none !important;
}

/* ===== COMPREHENSIVE WIZARD STYLING ===== */
/* Content Area Styling for All Steps */
.wizard-modal #wizard-content {
    /* Light mode: subtle gray background */
    background: #f8fafc !important;
}

/* Dark mode wizard content */
[data-theme="dark"] .wizard-modal #wizard-content,
[data-theme="dark"] #wizard-content {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* ===== COMPREHENSIVE WIZARD DARK MODE ===== */
/* Wizard modal container */
[data-theme="dark"] .wizard-modal,
[data-theme="dark"] #question-wizard-modal {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* Wizard header */
[data-theme="dark"] .wizard-modal .modal-header,
[data-theme="dark"] .wizard-header {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Wizard header text */
[data-theme="dark"] .wizard-modal h2,
[data-theme="dark"] .wizard-modal h3,
[data-theme="dark"] .wizard-header h2 {
    color: var(--text-primary) !important;
}

/* Wizard close button */
[data-theme="dark"] .wizard-modal .modal-close,
[data-theme="dark"] .wizard-close {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

/* Step indicators */
[data-theme="dark"] .step-indicator {
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

[data-theme="dark"] .step-indicator.active,
[data-theme="dark"] .step-indicator.completed {
    background: var(--primary-600) !important;
    color: white !important;
    border-color: var(--primary-600) !important;
}

/* Progress bar */
[data-theme="dark"] .progress-bar {
    background: var(--bg-tertiary) !important;
}

[data-theme="dark"] .progress-fill {
    background: var(--primary-600) !important;
}

/* Form inputs in wizard */
[data-theme="dark"] .wizard-modal input,
[data-theme="dark"] .wizard-modal textarea,
[data-theme="dark"] .wizard-modal select {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .wizard-modal input:focus,
[data-theme="dark"] .wizard-modal textarea:focus,
[data-theme="dark"] .wizard-modal select:focus {
    border-color: var(--primary-500) !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1) !important;
}

/* Labels */
[data-theme="dark"] .wizard-modal label {
    color: var(--text-primary) !important;
}

/* Help text */
[data-theme="dark"] .wizard-modal .text-gray-500,
[data-theme="dark"] .wizard-modal .text-gray-600 {
    color: var(--text-secondary) !important;
}

/* Navigation buttons */
[data-theme="dark"] .wizard-nav .btn-secondary {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

[data-theme="dark"] .wizard-nav .btn-secondary:hover {
    background: var(--bg-quaternary) !important;
}

/* ===== QUESTION TYPE SPECIFIC DARK MODE ===== */
/* Answer options containers */
[data-theme="dark"] .answer-options-container,
[data-theme="dark"] .options-container {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

/* Option inputs */
[data-theme="dark"] .option-input,
[data-theme="dark"] .answer-option-input {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Correct answer indicators */
[data-theme="dark"] .correct-indicator {
    background: var(--primary-600) !important;
    color: white !important;
}

/* Matching pairs */
[data-theme="dark"] .matching-pair,
[data-theme="dark"] .matching-item {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Essay scoring criteria */
[data-theme="dark"] .scoring-criteria,
[data-theme="dark"] .essay-criteria {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

/* Image upload area */
[data-theme="dark"] .image-upload-area {
    background: var(--bg-secondary) !important;
    border: 2px dashed var(--border-color) !important;
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .image-upload-area:hover {
    border-color: var(--primary-400) !important;
    background: var(--bg-tertiary) !important;
}

/* Preview sections */
[data-theme="dark"] .question-preview,
[data-theme="dark"] .preview-section {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Validation messages */
[data-theme="dark"] .validation-error {
    color: #fca5a5 !important;
    background: #7f1d1d !important;
    border-color: #dc2626 !important;
}

[data-theme="dark"] .validation-success {
    color: #bbf7d0 !important;
    background: #065f46 !important;
    border-color: #10b981 !important;
}

/* Tags and badges */
[data-theme="dark"] .difficulty-badge,
[data-theme="dark"] .type-badge {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

/* Question cards/panels */
[data-theme="dark"] .question-panel,
[data-theme="dark"] .question-card {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* ===== FORM SECTIONS IN WIZARD ===== */
/* Form sections */
[data-theme="dark"] .form-section,
[data-theme="dark"] .wizard-modal .form-section,
[data-theme="dark"] div.form-section {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Form inputs - comprehensive override */
[data-theme="dark"] .form-input,
[data-theme="dark"] input.form-input,
[data-theme="dark"] select.form-input,
[data-theme="dark"] textarea.form-input,
[data-theme="dark"] .wizard-modal .form-input,
[data-theme="dark"] .wizard-modal input,
[data-theme="dark"] .wizard-modal select,
[data-theme="dark"] .wizard-modal textarea {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Force override for specific bg-white selects */
[data-theme="dark"] select.bg-white,
[data-theme="dark"] input.bg-white,
[data-theme="dark"] .wizard-modal select.bg-white,
[data-theme="dark"] .wizard-modal input.bg-white {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* Required badges */
[data-theme="dark"] .bg-red-100 {
    background: #7f1d1d !important;
    color: #fca5a5 !important;
}

[data-theme="dark"] .text-red-700 {
    color: #fca5a5 !important;
}

/* Form labels */
[data-theme="dark"] .form-section label,
[data-theme="dark"] .wizard-modal label {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-gray-700 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-gray-800 {
    color: var(--text-primary) !important;
}

/* Dropdown arrows */
[data-theme="dark"] .text-gray-400 {
    color: var(--text-secondary) !important;
}

/* ===== COMPACT WIZARD HEADER ===== */
/* Make wizard headers more compact */
.wizard-modal .text-center.flex-shrink-0 {
    margin-bottom: 1rem !important; /* Reduce from mb-6 to smaller */
}

/* Smaller icon container */
.wizard-modal .text-center .inline-flex.items-center.justify-center {
    width: 3rem !important;        /* w-12 instead of w-16 */
    height: 3rem !important;       /* h-12 instead of h-16 */
    margin-bottom: 0.75rem !important; /* Reduce margin */
}

/* Smaller icon */
.wizard-modal .text-center .fas {
    font-size: 1.25rem !important; /* text-xl instead of text-2xl */
}

/* Compact title */
.wizard-modal .text-center h3 {
    font-size: 1.25rem !important;  /* text-xl instead of text-2xl */
    line-height: 1.75rem !important;
    margin-bottom: 0.5rem !important; /* Reduce from mb-3 */
}

/* Compact description */
.wizard-modal .text-center p {
    font-size: 0.875rem !important; /* text-sm instead of default */
    line-height: 1.25rem !important;
    margin-bottom: 0 !important;
}

/* Mobile specific - even more compact */
@media (max-width: 768px) {
    .wizard-modal .text-center.flex-shrink-0 {
        margin-bottom: 0.75rem !important;
    }
    
    .wizard-modal .text-center .inline-flex.items-center.justify-center {
        width: 2.5rem !important;
        height: 2.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .wizard-modal .text-center .fas {
        font-size: 1rem !important;
    }
    
    .wizard-modal .text-center h3 {
        font-size: 1.125rem !important; /* text-lg */
        margin-bottom: 0.25rem !important;
    }
    
    .wizard-modal .text-center p {
        font-size: 0.75rem !important; /* text-xs */
        line-height: 1rem !important;
    }
}

/* ===== ALTERNATIVE: STICKY HEADER OPTION ===== */
/* If you want to make header sticky and scrollable content */
.wizard-modal-sticky-header .text-center.flex-shrink-0 {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: inherit !important;
    padding: 0.75rem 0 !important;
    margin-bottom: 0.5rem !important;
    border-bottom: 1px solid var(--border-color) !important;
}

/* Make wizard content scrollable when using sticky header */
.wizard-modal-sticky-header #wizard-content {
    max-height: 70vh !important;
    overflow-y: auto !important;
}

/* ===== WIZARD LAYOUT OPTIMIZATION ===== */
/* Reduce padding in wizard content */
.wizard-modal #wizard-content {
    padding: 1rem 1.5rem !important; /* Reduce from default padding */
}

/* Mobile wizard content padding */
@media (max-width: 768px) {
    .wizard-modal #wizard-content {
        padding: 0.75rem 1rem !important;
    }
}

/* Form sections spacing */
.wizard-modal .form-section {
    margin-bottom: 1.5rem !important; /* Reduce spacing between sections */
    padding: 1rem !important; /* Reduce internal padding */
}

@media (max-width: 768px) {
    .wizard-modal .form-section {
        margin-bottom: 1rem !important;
        padding: 0.75rem !important;
    }
}

/* Common Content Container */
.wizard-modal .space-y-6 {
    max-width: none !important;
    padding: 2rem !important;
}

/* Headers and Descriptions */
.wizard-modal .text-center {
    margin-bottom: 2rem !important;
}

.wizard-modal .text-center h3 {
    color: #1f2937 !important;
    font-weight: 600 !important;
    font-size: 1.25rem !important;
    margin-bottom: 0.5rem !important;
}

.wizard-modal .text-center p {
    color: #6b7280 !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
}

/* Form Labels */
.wizard-modal label {
    display: block !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
    margin-bottom: 0.5rem !important;
}

.wizard-modal label .text-red-500 {
    color: #ef4444 !important;
}

/* Form Inputs - Universal Styling */
.wizard-modal input[type="text"],
.wizard-modal input[type="number"],
.wizard-modal input[type="email"],
.wizard-modal textarea,
.wizard-modal select {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border: 2px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    transition: all 0.2s ease !important;
    background-color: white !important;
    color: #1f2937 !important;
}

.wizard-modal input:focus,
.wizard-modal textarea:focus,
.wizard-modal select:focus {
    outline: none !important;
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.wizard-modal input::placeholder,
.wizard-modal textarea::placeholder {
    color: #9ca3af !important;
    font-style: italic !important;
}

/* Question Type Cards Enhancement */
.wizard-modal .grid {
    gap: 1.5rem !important;
}

.wizard-modal .question-type-card {
    transition: all 0.3s ease !important;
}

.wizard-modal .question-type-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

/* Answer Options Containers */
.answer-options-container {
    background: #f8fafc !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 0.75rem !important;
    padding: 1.5rem !important;
    margin-top: 1rem !important;
}

.answer-options-container h4 {
    color: #1f2937 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin-bottom: 1rem !important;
}

/* Answer Option Input Groups */
.answer-option-group {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    margin-bottom: 1rem !important;
    padding: 0.75rem !important;
    background: white !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease !important;
}

.answer-option-group:hover {
    border-color: #d1d5db !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.answer-option-group.correct {
    background: #ecfdf5 !important;
    border-color: #22c55e !important;
}

.answer-option-group .option-letter {
    width: 32px !important;
    height: 32px !important;
    background: #6b7280 !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    flex-shrink: 0 !important;
}

.answer-option-group.correct .option-letter {
    background: #22c55e !important;
}

.answer-option-group input[type="text"] {
    flex: 1 !important;
    border: none !important;
    background: transparent !important;
    padding: 0.5rem !important;
    font-size: 0.875rem !important;
}

.answer-option-group input[type="text"]:focus {
    box-shadow: none !important;
    border: none !important;
}

/* Checkbox and Radio Styling */
.wizard-modal input[type="checkbox"],
.wizard-modal input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    margin-right: 0.5rem !important;
    accent-color: #22c55e !important;
}

/* True/False Options */
.true-false-container {
    display: flex !important;
    gap: 1rem !important;
    margin-top: 1rem !important;
}

.true-false-option {
    flex: 1 !important;
    padding: 1rem !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 0.75rem !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    background: white !important;
}

.true-false-option:hover {
    border-color: #d1d5db !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.true-false-option.selected {
    background: #ecfdf5 !important;
    border-color: #22c55e !important;
    color: #065f46 !important;
}

/* Matching Questions Specific */
.matching-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem !important;
    margin-top: 1rem !important;
}

.matching-column {
    background: white !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 0.75rem !important;
    padding: 1rem !important;
}

.matching-column h4 {
    color: #1f2937 !important;
    font-weight: 600 !important;
    margin-bottom: 1rem !important;
    text-align: center !important;
}

.matching-pair-input {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin-bottom: 0.75rem !important;
}

.matching-pair-input .pair-number {
    width: 24px !important;
    height: 24px !important;
    background: #22c55e !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    flex-shrink: 0 !important;
}

/* Step Navigation Enhancement - DISABLED TO PREVENT WHITE BACKGROUND */
/* .wizard-modal .flex.justify-between {
    padding: 1.5rem 2rem !important;
    background: rgba(249, 250, 251, 0.8) !important;
    backdrop-filter: blur(4px) !important;
    border-top: 1px solid #e5e7eb !important;
} */

.wizard-modal button {
    padding: 0.75rem 2rem !important;
    border-radius: 0.75rem !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
}

.wizard-modal button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Success/Error States */
.wizard-modal .success {
    background: #ecfdf5 !important;
    border-color: #22c55e !important;
    color: #065f46 !important;
}

.wizard-modal .error {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #991b1b !important;
}

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
    .wizard-modal .space-y-6 {
        padding: 1rem !important;
    }
    
    .matching-container {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .true-false-container {
        flex-direction: column !important;
    }
    
    .answer-option-group {
        flex-wrap: wrap !important;
    }
}

/* iOS Safari fixes */
@supports (-webkit-touch-callout: none) {
    .sidebar {
        height: -webkit-fill-available;
    }
    
    .fixed.inset-0 {
        height: -webkit-fill-available;
    }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices */
    .hover\:shadow-md:hover {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }
    
    .nav-item {
        -webkit-tap-highlight-color: rgba(16, 185, 129, 0.1);
    }
    
    button, .nav-item {
        -webkit-tap-highlight-color: transparent;
        tap-highlight-color: transparent;
    }
}
/* ===== QUESTION STATUS BADGES ===== */
.question-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.875rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border: 1px solid transparent;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    min-width: 80px;
}

/* Status Badge Variants */
.question-status-badge.approved {
    background-color: var(--status-approved-bg);
    color: var(--status-approved);
    border-color: var(--status-approved);
}

.question-status-badge.approved::before {
    content: "✓";
    margin-right: 0.25rem;
    font-weight: bold;
}

.question-status-badge.pending {
    background-color: var(--status-pending-bg);
    color: var(--status-pending);
    border-color: var(--status-pending);
    animation: pulse-pending 2s infinite;
}

.question-status-badge.pending::before {
    content: "⏳";
    margin-right: 0.25rem;
}

.question-status-badge.draft {
    background-color: var(--status-draft-bg);
    color: var(--status-draft);
    border-color: var(--status-draft);
}

.question-status-badge.draft::before {
    content: "📝";
    margin-right: 0.25rem;
}

.question-status-badge.rejected {
    background-color: var(--status-rejected-bg);
    color: var(--status-rejected);
    border-color: var(--status-rejected);
}

.question-status-badge.rejected::before {
    content: "✕";
    margin-right: 0.25rem;
    font-weight: bold;
}

/* Hover Effects */
.question-status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.question-status-badge.approved:hover {
    background-color: var(--status-approved);
    color: white;
}

.question-status-badge.pending:hover {
    background-color: var(--status-pending);
    color: white;
}

.question-status-badge.draft:hover {
    background-color: var(--status-draft);
    color: white;
}

.question-status-badge.rejected:hover {
    background-color: var(--status-rejected);
    color: white;
}

/* Pulse Animation for Pending Status */
@keyframes pulse-pending {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Responsive Badge Sizes */
@media (max-width: 640px) {
    .question-status-badge {
        padding: 0.25rem 0.625rem;
        font-size: 0.6875rem;
        min-width: 70px;
    }
}

/* Badge in Table Cells */
.table-cell .question-status-badge {
    margin: 0;
    vertical-align: middle;
}



/* ========== REPORTS DASHBOARD STYLES ========== */

/* Reports Tab Styling - White Text for Active Tab */
.report-tab {
    transition: all 0.2s ease-in-out;
    position: relative;
}

.report-tab:hover {
    border-color: var(--gray-400) !important;
    color: var(--gray-700) !important;
}

.report-tab.active {
    color: white !important;
    border-color: var(--primary-600) !important;
    background-color: var(--primary-600) !important;
}

.report-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
}

/* Matrix Cell Numbers */
.matrix-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 1.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    cursor: default;
}

.matrix-cell[data-clickable="true"] {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.matrix-cell[data-clickable="true"]:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Export Buttons */
.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.export-pdf-btn {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
}

.export-pdf-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.export-excel-btn {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;
}

.export-excel-btn:hover {
    background: linear-gradient(135deg, #15803d, #16a34a);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ========================================
   EXTRACTED INLINE STYLES FROM JS FILES
   ======================================== */

/* === Table Styling Fix Container === */
.professional-table-container {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

/* === Search Results Dropdown === */
#search-results {
    display: none;
}

#search-results.show {
    display: block;
}

/* === Auto-save Indicator === */
#auto-save-indicator {
    display: none;
}

#auto-save-indicator.active {
    display: block;
}

#auto-save-status {
    display: none;
}

#auto-save-status.active {
    display: block;
}

/* === Bulk Operations Checkbox === */
.bulk-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.question-element-with-checkbox {
    position: relative;
}

/* === Modals === */
#confirmation-modal-overlay,
#prompt-modal-overlay {
    z-index: 9999;
}

/* === Notifications Badge === */
.notification-badge {
    display: none;
}

.notification-badge.has-count {
    display: inline-block;
}

/* === UI Enhancements === */
.progress-bar {
    transition: width 0.3s ease;
}

.tooltip {
    opacity: 0;
    display: none;
    transition: opacity 0.2s ease;
    position: absolute;
    z-index: 1000;
}

.tooltip.visible {
    opacity: 1;
    display: block;
}

/* === Mobile Menu === */
body.mobile-menu-open {
    overflow: hidden;
}

/* === Tags Color Selection === */
.color-option {
    border: 2px solid transparent;
    transform: scale(1);
    transition: transform 0.2s ease, border 0.2s ease;
    cursor: pointer;
}

.color-option.selected {
    border: 2px solid #000;
    transform: scale(1.1);
}

/* === Question Bank Export === */
.question-card.selectable {
    position: relative;
    padding-left: 3rem;
    cursor: pointer;
}

.question-card.export-mode {
    position: relative;
}

/* === Single Question Download === */
.download-link {
    display: none;
}

/* === Question Tags === */
.question-tag.tag-small {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.25rem;
}

.cognitive-level-tag {
    background-color: #3b82f6;
    color: white;
}

.topic-tag {
    background-color: #22c55e;
    color: white;
}

.difficulty-tag {
    background-color: #f59e0b;
    color: white;
}

/* === Analytics Charts === */
.chart-legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.chart-legend-color {
    width: 1rem;
    height: 1rem;
    border-radius: 0.125rem;
    margin-right: 0.5rem;
}

.chart-bar-container {
    position: relative;
    height: 200px;
    width: 3rem;
    background-color: #e5e7eb;
    border-radius: 0.25rem;
}

.chart-bar {
    position: absolute;
    bottom: 0;
    width: 100%;
    border-radius: 0.25rem;
    transition: height 0.3s ease;
}

/* === Progress Bar Export === */
.export-progress-bar {
    width: 0%;
    transition: width 0.3s ease;
}

/* === Body State Classes === */
body.overflow-hidden {
    overflow: hidden;
}

/* === Display Utilities === */
.display-block {
    display: block !important;
}

.display-none {
    display: none !important;
}

/* === Modern Action Buttons === */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.action-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.action-button.edit {
    background: #3b82f6;
    color: white;
}

.action-button.edit:hover {
    background: #2563eb;
}

.action-button.delete {
    background: #ef4444;
    color: white;
}

.action-button.delete:hover {
    background: #dc2626;
}

.action-button.view {
    background: #22c55e;
    color: white;
}

.action-button.view:hover {
    background: #16a34a;
}

.action-button.secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.action-button.secondary:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Button Group Spacing */
.button-group {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.button-group .action-button {
    flex-shrink: 0;
}

/* Icon-only buttons for compact spaces */
.action-button-sm {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
}

.action-button-lg {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1rem;
}

/* Disabled state */
.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Modern pill-style variant */
.action-button.pill {
    border-radius: 9999px;
    padding: 0 0.75rem;
    width: auto;
    min-width: 2rem;
}

/* Text + icon buttons */
.action-button.with-text {
    padding: 0 0.75rem;
    width: auto;
    min-width: 2rem;
    gap: 0.25rem;
}

.action-button.with-text i {
    font-size: 0.75rem;
}

/* === DARK MODE - GITHUB STYLE === */
:root {
    /* Light mode (default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Brand colors (same in both modes) */
    --brand-primary: #22c55e;
    --brand-primary-hover: #16a34a;
    --brand-danger: #ef4444;
    --brand-danger-hover: #dc2626;
    --brand-info: #3b82f6;
    --brand-info-hover: #2563eb;
    --brand-warning: #f59e0b;
}

/* Dark mode variables */
[data-theme="dark"] {
    --bg-primary: #0d1117;          /* GitHub dark background */
    --bg-secondary: #161b22;        /* GitHub dark secondary */
    --bg-tertiary: #21262d;         /* GitHub dark tertiary */
    --text-primary: #f0f6fc;        /* GitHub dark text primary */
    --text-secondary: #8b949e;      /* GitHub dark text secondary */
    --text-muted: #6e7681;          /* GitHub dark text muted */
    --border-color: #30363d;        /* GitHub dark border */
    --border-hover: #484f58;        /* GitHub dark border hover */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* Apply dark mode styles */
[data-theme="dark"] body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* === LAYOUT COMPONENTS === */
[data-theme="dark"] #app {
    background-color: var(--bg-secondary) !important;
}

/* Navigation */
[data-theme="dark"] nav {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

/* Sidebar */
[data-theme="dark"] #sidebar,
[data-theme="dark"] .sidebar {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .sidebar .nav-item {
    color: var(--text-secondary);
}

[data-theme="dark"] .sidebar .nav-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="dark"] .sidebar .nav-item.active {
    background-color: var(--brand-primary);
    color: white;
}

/* === SIDEBAR ICON FIXES === */
[data-theme="dark"] .sidebar .nav-item i {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .sidebar .nav-item:hover i {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .sidebar .nav-item.active i {
    color: white !important;
}

/* Specific icon containers in sidebar */
[data-theme="dark"] .sidebar .nav-item .icon-container,
[data-theme="dark"] .sidebar .nav-item .w-10,
[data-theme="dark"] .sidebar .nav-item .w-8 {
    background-color: var(--bg-tertiary) !important;
}

[data-theme="dark"] .sidebar .nav-item:hover .icon-container,
[data-theme="dark"] .sidebar .nav-item:hover .w-10,
[data-theme="dark"] .sidebar .nav-item:hover .w-8 {
    background-color: var(--border-hover) !important;
}

[data-theme="dark"] .sidebar .nav-item.active .icon-container,
[data-theme="dark"] .sidebar .nav-item.active .w-10,
[data-theme="dark"] .sidebar .nav-item.active .w-8 {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Fix nav item icons that might be using bg-white */
[data-theme="dark"] .sidebar .nav-item .bg-white {
    background-color: var(--bg-tertiary) !important;
}

[data-theme="dark"] .sidebar .nav-item:hover .bg-white {
    background-color: var(--border-hover) !important;
}

[data-theme="dark"] .sidebar .nav-item.active .bg-white {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Ensure icon text/symbols are visible */
[data-theme="dark"] .sidebar .nav-item .fas,
[data-theme="dark"] .sidebar .nav-item .fa {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .sidebar .nav-item:hover .fas,
[data-theme="dark"] .sidebar .nav-item:hover .fa {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .sidebar .nav-item.active .fas,
[data-theme="dark"] .sidebar .nav-item.active .fa {
    color: white !important;
}

/* === CARDS & CONTAINERS === */
[data-theme="dark"] .bg-white,
[data-theme="dark"] .card {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .bg-gray-50,
[data-theme="dark"] .bg-gray-100 {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .bg-gray-200 {
    background-color: var(--bg-tertiary) !important;
}

/* === TEXT COLORS === */
[data-theme="dark"] .text-gray-900,
[data-theme="dark"] .text-gray-800 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-gray-600 {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .text-gray-500,
[data-theme="dark"] .text-gray-400 {
    color: var(--text-muted) !important;
}

/* === BORDERS === */
[data-theme="dark"] .border-gray-200,
[data-theme="dark"] .border-gray-300 {
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .border-gray-100 {
    border-color: var(--border-color) !important;
}

/* === BUTTONS === */
[data-theme="dark"] button:not(.action-button):not(.btn-primary):not(.btn-danger) {
    color: var(--text-secondary);
}

[data-theme="dark"] .hover\\:bg-gray-50:hover,
[data-theme="dark"] .hover\\:bg-gray-100:hover {
    background-color: var(--bg-tertiary) !important;
}

/* === FORMS === */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    border-color: var(--brand-primary) !important;
    background-color: var(--bg-primary) !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--text-muted) !important;
}

/* === DROPDOWNS & MODALS === */
[data-theme="dark"] #user-dropdown,
[data-theme="dark"] .dropdown-menu {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .modal-content {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .modal-header {
    border-color: var(--border-color) !important;
}

/* === TABLES === */
[data-theme="dark"] table {
    background-color: var(--bg-primary) !important;
}

[data-theme="dark"] th {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] td {
    border-color: var(--border-color) !important;
    color: var(--text-secondary) !important;
}

[data-theme="dark"] tr:hover {
    background-color: var(--bg-secondary) !important;
}

/* === STATS CARDS === */
[data-theme="dark"] .stat-card {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

/* === SEARCH & FILTERS === */
[data-theme="dark"] .search-container,
[data-theme="dark"] .filter-container {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

/* === CHIPS & BADGES === */
[data-theme="dark"] .chip,
[data-theme="dark"] .badge {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .chip:hover {
    background-color: var(--border-hover) !important;
}

/* === LOADING STATES === */
[data-theme="dark"] .loading-spinner {
    border-color: var(--border-color) !important;
    border-top-color: var(--brand-primary) !important;
}

/* === SCROLLBARS === */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background-color: var(--border-hover);
    border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-muted);
}

/* === SPECIAL CASES === */
[data-theme="dark"] .login-container {
    background-color: var(--bg-primary) !important;
}

[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%) !important;
}

/* === THEME TOGGLE ICON === */
[data-theme="dark"] #theme-toggle i {
    color: #fbbf24; /* Sun icon color in dark mode */
}

[data-theme="dark"] #theme-toggle i::before {
    content: "\f185"; /* fa-sun */
}

/* Light mode sun icon */
[data-theme="light"] #theme-toggle i::before {
    content: "\f186"; /* fa-moon */
}

/* === MODERN THEME TOGGLE SWITCH === */
.theme-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.theme-toggle-switch .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    border-radius: 24px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Checked state (dark mode ON) */
#theme-toggle:checked + .toggle-slider {
    background-color: #22c55e;
}

#theme-toggle:checked + .toggle-slider:before {
    transform: translateX(20px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Dark mode toggle styling */
[data-theme="dark"] .toggle-slider {
    background-color: #374151;
}

[data-theme="dark"] .toggle-slider:before {
    background-color: #1f2937;
}

[data-theme="dark"] #theme-toggle:checked + .toggle-slider {
    background-color: #22c55e;
}

[data-theme="dark"] #theme-toggle:checked + .toggle-slider:before {
    background-color: white;
}

/* === LANGUAGE TOGGLE SWITCH (MATCHING THEME TOGGLE) === */
.language-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.language-toggle-switch .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.language-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    border-radius: 24px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px;
}

.language-toggle-slider:before {
    position: absolute;
    content: "TH";
    height: 20px;
    width: 20px;
    left: 2px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #374151;
    font-family: 'Inter', sans-serif;
}

/* Checked state (English selected) */
#language-toggle:checked + .language-toggle-slider {
    background-color: #3b82f6;
}

#language-toggle:checked + .language-toggle-slider:before {
    content: "EN";
    transform: translateX(22px);
    color: #1f2937;
}

/* Dark mode support */
[data-theme="dark"] .language-toggle-slider {
    background-color: #4b5563;
}

[data-theme="dark"] #language-toggle:checked + .language-toggle-slider {
    background-color: #3b82f6;
}

[data-theme="dark"] .language-toggle-slider:before {
    background-color: white;
}

/* Hover effects */
.language-toggle-switch:hover .language-toggle-slider:before {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

#language-toggle:checked + .language-toggle-slider:hover:before {
    transform: translateX(22px) scale(1.05);
}

/* Focus state for accessibility */
#language-toggle:focus + .language-toggle-slider {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Dark mode language toggle styling */
[data-theme="dark"] .language-toggle-slider {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    border-color: #111827;
}

[data-theme="dark"] .language-toggle-slider:before {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-color: #374151;
}

[data-theme="dark"] .language-toggle-slider .language-text-left,
[data-theme="dark"] .language-toggle-slider .language-text-right {
    color: #d1d5db;
}

[data-theme="dark"] #language-toggle:not(:checked) + .language-toggle-slider .language-text-left {
    color: #f3f4f6;
}

[data-theme="dark"] #language-toggle:checked + .language-toggle-slider {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

[data-theme="dark"] #language-toggle:checked + .language-toggle-slider:before {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

/* === ADDITIONAL DARK MODE FIXES === */

/* Fix dropdown content backgrounds */
[data-theme="dark"] .bg-white {
    background-color: var(--bg-primary) !important;
}

/* Fix search containers and filters */
[data-theme="dark"] .search-bar,
[data-theme="dark"] .filter-bar {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

/* Fix question cards and content areas */
[data-theme="dark"] .question-card,
[data-theme="dark"] .content-area {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

/* Fix status badges */
[data-theme="dark"] .status-badge {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
}

/* Fix form sections */
[data-theme="dark"] .form-section {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

/* Fix pagination and navigation */
[data-theme="dark"] .pagination,
[data-theme="dark"] .nav-controls {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

/* === ENHANCED LEARNING REPORTS CSS (Scoped) === */
#reports-content .grid {
    display: grid !important;
}

#reports-content .grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
}

#reports-content .grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#reports-content .grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

#reports-content .grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

#reports-content .gap-4 {
    gap: 1rem !important;
}

#reports-content .gap-6 {
    gap: 1.5rem !important;
}

/* Responsive Grid Classes (Scoped to reports only) */
@media (min-width: 768px) {
    #reports-content .md\\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    
    #reports-content .md\\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    
    #reports-content .md\\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1024px) {
    #reports-content .lg\\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    
    #reports-content .lg\\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    
    #reports-content .lg\\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
    
    #reports-content .lg\\:grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}

/* Enhanced Stats Cards (Scoped to reports only) */
#reports-content .bg-gradient-to-br {
    color: white !important;
}

#reports-content .bg-gradient-to-br * {
    color: white !important;
}

/* Specific gradient backgrounds for enhanced reports */
#reports-content .from-blue-500 {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: white !important;
}

#reports-content .from-green-500 {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    color: white !important;
}

#reports-content .from-yellow-500 {
    background: linear-gradient(135deg, #eab308, #ca8a04) !important;
    color: white !important;
}

#reports-content .from-purple-500 {
    background: linear-gradient(135deg, #a855f7, #9333ea) !important;
    color: white !important;
}

/* Enhanced Reports Dark Mode Support */
[data-theme="dark"] #reports-content .bg-white {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] #reports-content .text-gray-800 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] #reports-content .text-gray-600 {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] #reports-content .text-gray-400 {
    color: var(--text-muted) !important;
}

[data-theme="dark"] #reports-content .bg-gray-50 {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] #reports-content .border-gray-200 {
    border-color: var(--border-color) !important;
}

/* Report header dark mode */
[data-theme="dark"] #reports-content .report-header h3 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] #reports-content .report-header p {
    color: var(--text-secondary) !important;
}

/* Fix stats grid and dashboard cards */
[data-theme="dark"] .stats-grid,
[data-theme="dark"] .dashboard-card {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

/* Fix any remaining white sections */
[data-theme="dark"] .section-white,
[data-theme="dark"] .container-white,
[data-theme="dark"] .panel-white {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* === COMPREHENSIVE DARK MODE FIXES === */

/* Fix all white backgrounds */
[data-theme="dark"] *:not(.action-button):not(.btn-primary):not(.btn-danger):not(.btn-success)[class*="bg-white"] {
    background-color: var(--bg-primary) !important;
}

/* Fix all gray backgrounds */
[data-theme="dark"] *[class*="bg-gray-50"],
[data-theme="dark"] *[class*="bg-gray-100"] {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] *[class*="bg-gray-200"] {
    background-color: var(--bg-tertiary) !important;
}

/* Fix main content areas */
[data-theme="dark"] main,
[data-theme="dark"] .main-content,
[data-theme="dark"] .content-wrapper {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Fix sections and panels */
[data-theme="dark"] section,
[data-theme="dark"] .panel,
[data-theme="dark"] .widget {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

/* Fix dropdown specific styling */
[data-theme="dark"] .dropdown-content,
[data-theme="dark"] .menu-content {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    box-shadow: var(--shadow-lg);
}

/* Fix specific UI components that might remain white */
[data-theme="dark"] .rounded-lg,
[data-theme="dark"] .rounded-md {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

/* Fix question list and table rows */
[data-theme="dark"] .question-item,
[data-theme="dark"] .table-row {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .question-item:hover,
[data-theme="dark"] .table-row:hover {
    background-color: var(--bg-secondary) !important;
}

/* Fix dashboard cards specifically */
[data-theme="dark"] .dashboard-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .metric-card {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Fix user dropdown dark mode */
[data-theme="dark"] .text-gray-500 {
    color: #fbbf24 !important; /* Yellow for sun icon */
}

[data-theme="light"] .text-gray-500 {
    color: #6b7280 !important; /* Original gray */
}

/* === CRITICAL BODY & HTML FIXES === */
[data-theme="dark"] html {
    background-color: var(--bg-primary) !important;
}

[data-theme="dark"] body {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Force all root level containers */
[data-theme="dark"] #root,
[data-theme="dark"] #app-root,
[data-theme="dark"] .app-container {
    background-color: var(--bg-secondary) !important;
}

/* === HEADER FIXES === */
[data-theme="dark"] header,
[data-theme="dark"] .header {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

/* Top navigation specific */
[data-theme="dark"] .top-nav,
[data-theme="dark"] .navbar {
    background-color: var(--bg-primary) !important;
    border-bottom-color: var(--border-color) !important;
}

/* === HOVER STATE FIXES === */
/* Fix white text on light hover backgrounds */
[data-theme="dark"] .hover\\:bg-gray-50:hover,
[data-theme="dark"] .hover\\:bg-gray-100:hover,
[data-theme="dark"] .hover\\:bg-white:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Navigation item hovers */
[data-theme="dark"] .nav-item:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Button hover states */
[data-theme="dark"] button:not(.action-button):not(.btn-primary):not(.btn-danger):hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Menu item hovers */
[data-theme="dark"] .menu-item:hover,
[data-theme="dark"] .dropdown-item:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Link hovers */
[data-theme="dark"] a:hover:not(.action-button) {
    color: var(--text-primary) !important;
}

/* Table row hovers */
[data-theme="dark"] tr:hover,
[data-theme="dark"] .table-row:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Card hovers */
[data-theme="dark"] .card:hover,
[data-theme="dark"] .question-card:hover {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* === SPECIFIC UI COMPONENT FIXES === */

/* Dashboard quick actions */
[data-theme="dark"] .quick-actions {
    background-color: var(--bg-primary) !important;
}

/* Stats cards */
[data-theme="dark"] .stats-card,
[data-theme="dark"] .metric-card {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

/* Search and filter sections */
[data-theme="dark"] .search-section,
[data-theme="dark"] .filter-section {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

/* Content sections */
[data-theme="dark"] .content-section {
    background-color: var(--bg-primary) !important;
}

/* Sidebar sections */
[data-theme="dark"] .sidebar-section {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

/* Fix any remaining contrast issues */
[data-theme="dark"] .text-white {
    color: var(--text-primary) !important;
}

/* Ensure proper contrast for all text elements */
[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] h5, 
[data-theme="dark"] h6 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] div {
    color: inherit !important;
}

/* Force dark backgrounds on all containers */
[data-theme="dark"] .container,
[data-theme="dark"] .wrapper {
    background-color: var(--bg-secondary) !important;
}

/* === CRITICAL HOVER FIXES FOR TAILWIND CLASSES === */

/* Fix all Tailwind hover gray backgrounds */
[data-theme="dark"] .hover\\:bg-gray-50:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .hover\\:bg-gray-100:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .hover\\:bg-gray-200:hover {
    background-color: var(--border-hover) !important;
    color: var(--text-primary) !important;
}

/* Fix specific hover states for buttons and menu items */
[data-theme="dark"] button.hover\\:bg-gray-50:hover,
[data-theme="dark"] .menu-item.hover\\:bg-gray-50:hover,
[data-theme="dark"] .nav-item.hover\\:bg-gray-50:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Fix hover states for dropdown items */
[data-theme="dark"] .dropdown-menu button:hover,
[data-theme="dark"] .user-dropdown button:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Fix hover states for navigation */
[data-theme="dark"] nav button:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Fix hover states for user menu */
[data-theme="dark"] #user-menu-btn:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] #user-menu-btn:hover span {
    color: var(--text-primary) !important;
}

/* Fix text color inheritance issues */
[data-theme="dark"] button:hover span,
[data-theme="dark"] .menu-item:hover span,
[data-theme="dark"] a:hover span {
    color: inherit !important;
}

/* === FORCE OVERRIDE ALL WHITE TEXT ISSUES === */
[data-theme="dark"] *:hover {
    color: var(--text-primary) !important;
}

/* But preserve brand colors in buttons */
[data-theme="dark"] .action-button:hover,
[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-danger:hover,
[data-theme="dark"] .btn-success:hover {
    color: white !important;
}

/* Preserve icon colors */
[data-theme="dark"] *:hover i {
    color: inherit !important;
}

[data-theme="dark"] .text-green-600:hover,
[data-theme="dark"] .text-red-600:hover,
[data-theme="dark"] .text-blue-600:hover {
    color: var(--text-primary) !important;
}

/* === SPECIFIC COMPONENT HOVER FIXES === */

/* Question list items hover */
[data-theme="dark"] .question-item:hover * {
    color: var(--text-primary) !important;
}

/* Table cells hover */
[data-theme="dark"] td:hover,
[data-theme="dark"] th:hover {
    color: var(--text-primary) !important;
}

/* Navigation items hover text */
[data-theme="dark"] .nav-item:hover *:not(i) {
    color: var(--text-primary) !important;
}

/* === SPECIFIC COMPONENT FIXES FROM HTML INSPECTION === */

/* Fix gradient backgrounds */
[data-theme="dark"] .bg-gradient-to-br,
[data-theme="dark"] .bg-gradient-to-r,
[data-theme="dark"] .bg-gradient-to-l,
[data-theme="dark"] .bg-gradient-to-t,
[data-theme="dark"] .bg-gradient-to-b {
    background: var(--bg-primary) !important;
}

/* Fix main content area */
[data-theme="dark"] #main-content {
    background-color: var(--bg-secondary) !important;
}

/* Fix professional table components */
[data-theme="dark"] .professional-table-container {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .professional-table {
    background-color: var(--bg-primary) !important;
}

[data-theme="dark"] .professional-table th {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .professional-table td {
    background-color: var(--bg-primary) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .professional-table tr:hover {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .professional-table tr:hover td {
    color: var(--text-primary) !important;
}

/* Fix table header */
[data-theme="dark"] .table-header {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .table-title {
    color: var(--text-primary) !important;
}

/* Fix table filters */
[data-theme="dark"] .table-filters {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .table-search {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .table-search input {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .table-filter-select {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

/* Fix pagination */
[data-theme="dark"] .table-pagination {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .pagination-info {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .pagination-btn {
    background-color: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .pagination-btn:hover:not(:disabled) {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Fix bulk actions bar */
[data-theme="dark"] .bulk-actions-bar {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .bulk-actions-info {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .bulk-action-btn {
    background-color: var(--bg-primary) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .bulk-action-btn:hover {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Fix table action buttons */
[data-theme="dark"] .btn-table-action {
    background-color: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .btn-table-action:hover {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .btn-table-action.view:hover {
    background-color: var(--brand-primary) !important;
    color: white !important;
}

[data-theme="dark"] .btn-table-action.approve:hover {
    background-color: var(--brand-primary) !important;
    color: white !important;
}

[data-theme="dark"] .btn-table-action.reject:hover {
    background-color: var(--brand-danger) !important;
    color: white !important;
}

/* Fix action buttons group */
[data-theme="dark"] .action-buttons-group {
    background-color: transparent !important;
}

/* Fix subject badges */
[data-theme="dark"] .subject-badge {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

/* Fix icon containers */
[data-theme="dark"] .icon-container-primary {
    background-color: var(--brand-primary) !important;
}

/* Fix truncate text */
[data-theme="dark"] .truncate-text {
    color: var(--text-primary) !important;
}

/* Fix all font weights and text colors */
[data-theme="dark"] .font-medium {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .font-bold {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-3xl {
    color: var(--text-primary) !important;
}

/* Fix specific text color classes */
[data-theme="dark"] .text-gray-900,
[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-gray-700 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-500 {
    color: var(--text-secondary) !important;
}

/* Fix table responsive wrapper */
[data-theme="dark"] .table-responsive {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

/* Fix space-y and gap containers */
[data-theme="dark"] .space-y-6 > * {
    background-color: inherit !important;
}

/* Fix buttons with specific classes */
[data-theme="dark"] .inline-flex.items-center.justify-center {
    background-color: var(--bg-primary) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .inline-flex.items-center.justify-center:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* === DASHBOARD STATS CARDS SPECIFIC FIXES === */

/* Grid layout containers */
[data-theme="dark"] .grid {
    background-color: inherit !important;
}

/* Stats cards - FORCE OVERRIDE with maximum specificity */
[data-theme="dark"] div.stats-card.bg-white.p-6.rounded-xl.shadow-sm.border.border-gray-200,
[data-theme="dark"] .stats-card.bg-white,
[data-theme="dark"] .stats-card[class*="bg-white"] {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .stats-card:hover {
    background-color: var(--bg-secondary) !important;
}

/* Icon containers in stats cards */
[data-theme="dark"] .bg-blue-100 {
    background-color: rgba(59, 130, 246, 0.1) !important;
}

[data-theme="dark"] .bg-yellow-100 {
    background-color: rgba(245, 158, 11, 0.1) !important;
}

[data-theme="dark"] .bg-green-100 {
    background-color: rgba(34, 197, 94, 0.1) !important;
}

[data-theme="dark"] .bg-purple-100 {
    background-color: rgba(168, 85, 247, 0.1) !important;
}

/* Icon colors stay the same but ensure visibility */
[data-theme="dark"] .text-blue-600 {
    color: #3b82f6 !important;
}

[data-theme="dark"] .text-yellow-600 {
    color: #d97706 !important;
}

[data-theme="dark"] .text-green-600 {
    color: #22c55e !important;
}

[data-theme="dark"] .text-purple-600 {
    color: #a855f7 !important;
}

/* Stats numbers and text */
[data-theme="dark"] .stats-card .text-2xl.font-bold {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .stats-card .text-gray-600 {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .stats-card .text-gray-800 {
    color: var(--text-primary) !important;
}

/* Ensure all text inside stats cards is visible */
[data-theme="dark"] .stats-card h3 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .stats-card p {
    color: var(--text-secondary) !important;
}

/* Fix any nested elements */
[data-theme="dark"] .stats-card .ml-4 h3,
[data-theme="dark"] .stats-card .ml-4 p {
    color: inherit !important;
}

/* Hover shadows in dark mode */
[data-theme="dark"] .stats-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .stats-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4) !important;
}

/* === NUCLEAR OPTION - FORCE ALL WHITE BACKGROUNDS IN DARK MODE === */

/* Target any element with bg-white in dark mode */
[data-theme="dark"] *[class*="bg-white"]:not(.action-button):not(.btn-primary):not(.btn-danger):not(.btn-success) {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* Specific targeting for stats cards that resist change */
[data-theme="dark"] .grid > div[class*="stats-card"][class*="bg-white"] {
    background-color: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
}

/* Force override any inline styles */
[data-theme="dark"] .stats-card[style*="background"] {
    background-color: var(--bg-primary) !important;
}

[data-theme="dark"] .stats-card[style*="background-color"] {
    background-color: var(--bg-primary) !important;
}

/* Use attribute selector to catch all variations */
[data-theme="dark"] div[class~="stats-card"][class~="bg-white"] {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* Target by parent grid */
[data-theme="dark"] .grid-cols-1 > .stats-card,
[data-theme="dark"] .grid > .stats-card {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Brute force approach - target by structure */
[data-theme="dark"] .grid .bg-white.p-6.rounded-xl {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

/* CSS reset approach */
[data-theme="dark"] .grid > div:nth-child(1),
[data-theme="dark"] .grid > div:nth-child(2), 
[data-theme="dark"] .grid > div:nth-child(3),
[data-theme="dark"] .grid > div:nth-child(4) {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* ========================================
   MINIMAL THEME CONSISTENCY FIXES - 2025
   ======================================== */

/* Unified hover effects - consistent green theme */
.p-3.rounded-lg.border.border-gray-100.hover\:border-blue-300 {
    border-color: #e5e7eb !important;
    transition: all 0.15s ease;
}

.p-3.rounded-lg.border.border-gray-100.hover\:border-blue-300:hover,
.p-3.rounded-lg.border.border-gray-100.hover\:border-green-300:hover {
    border-color: var(--primary-300) !important;
    background-color: var(--hover-green) !important;
    transform: none;
}

/* Remove unnecessary hover on background areas */
.p-3.rounded-lg.border.border-gray-100.hover\:bg-blue-50:hover,
.p-3.rounded-lg.border.border-gray-100.hover\:bg-green-50:hover {
    background-color: var(--hover-green) !important;
}

/* Minimal card hover - reduce visual noise */
.metadata-card-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    transition: border-color 0.15s ease;
}

.metadata-card-item:hover {
    border-color: var(--primary-300);
}

/* Subject group selection - consistent styling */
.subject-group-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.subject-group-card:hover {
    border-color: var(--primary-300);
    background-color: var(--hover-green);
}

.subject-group-card.selected {
    border-color: var(--primary-500);
    background-color: var(--primary-50);
}

/* ========================================
   User Groups Action Buttons
   ======================================== */

.user-group-btn {
    padding: 0.5rem 0.75rem !important;
    border-radius: 0.5rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    display: inline-flex !important;
    align-items: center !important;
    font-size: 0.875rem !important;
    border: none !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.user-group-btn:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    transform: translateY(-1px) !important;
}

.user-group-btn i {
    margin-right: 0.25rem !important;
}

.user-group-btn.edit {
    background-color: #dbeafe !important;
    color: #1d4ed8 !important;
}

.user-group-btn.edit:hover {
    background-color: #bfdbfe !important;
    color: #1e40af !important;
}

.user-group-btn.members {
    background-color: #dcfce7 !important;
    color: #166534 !important;
}

.user-group-btn.members:hover {
    background-color: #bbf7d0 !important;
    color: #15803d !important;
}

.user-group-btn.subjects {
    background-color: #f3e8ff !important;
    color: #7c3aed !important;
}

.user-group-btn.subjects:hover {
    background-color: #e9d5ff !important;
    color: #6d28d9 !important;
}

.user-group-btn.delete {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
}

.user-group-btn.delete:hover {
    background-color: #fecaca !important;
    color: #b91c1c !important;
}

/* Learning strand cards - consistent with green theme */
.learning-strand-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    transition: all 0.15s ease;
}

.learning-strand-card:hover {
    border-color: var(--primary-300);
    background-color: var(--hover-green);
}

/* Button consistency */
.action-button-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.action-button-sm.edit {
    background-color: #f59e0b;
    color: white;
}

.action-button-sm.edit:hover {
    background-color: #d97706;
}

.action-button-sm.delete {
    background-color: #ef4444;
    color: white;
}

.action-button-sm.delete:hover {
    background-color: #dc2626;
}

/* Remove excessive animations and transforms */
* {
    transform: none !important;
}

*:hover {
    transform: none !important;
}

/* Override any conflicting hover transforms */
.hover\:transform:hover,
.hover\:translateY:hover,
.hover\:-translate-y-1:hover {
    transform: none !important;
}

/* Minimal focus states */
select:focus,
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-200);
    border-color: var(--primary-500);
}

/* Consistent spacing and typography */
.minimal-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
}

.minimal-card:hover {
    border-color: var(--primary-200);
}

/* ========================================
   USER GROUPS & INFO BOXES - MINIMAL DESIGN
   ======================================== */

/* Info Box Component - Minimal Style */
.info-box,
.bg-blue-50.border-blue-200 {
    background-color: var(--gray-50) !important;  /* Light gray background - minimal */
    border-color: var(--gray-200) !important;     /* Subtle gray border */
    border-width: 1px !important;
}

/* Info Box Text Colors - Using gray palette for minimal look */
.info-box .text-blue-700,
.bg-blue-50 .text-blue-700 {
    color: var(--gray-700) !important; /* Dark gray for headers */
}

.info-box .text-blue-600,
.bg-blue-50 .text-blue-600 {
    color: var(--gray-600) !important; /* Medium gray for text */
}

/* Info Icon - Subtle primary color */
.info-box .text-blue-500,
.bg-blue-50 .text-blue-500,
.bg-blue-50 .fa-info-circle {
    color: var(--primary-600) !important; /* Use primary green for icon */
}

/* Remove hover effects - keep minimal */
.bg-blue-50:hover,
.info-box:hover {
    background-color: var(--gray-50) !important; /* No change on hover */
}

/* User Groups Subject Cards - No Hover */
.user-groups-modal .border.rounded-lg,
[data-subject-search] {
    transition: none !important;
}

.user-groups-modal .border.rounded-lg:hover,
[data-subject-search]:hover {
    background-color: transparent !important;
    transform: none !important;
}

/* Clean up any excessive shadows */
.shadow-lg,
.shadow-xl,
.hover\:shadow-lg:hover,
.hover\:shadow-xl:hover {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
}

/* ========================================
   Learning Indicator Tooltip Styles
   ======================================== */

/* Indicator suggestion item with tooltip */
.indicator-suggestion-item {
    position: relative;
}

/* Tooltip container */
.indicator-tooltip {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 0.5rem;
    padding: 0.75rem;
    background-color: #1f2937;
    color: white;
    font-size: 0.75rem;
    line-height: 1.4;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    white-space: normal;
    max-width: 28rem;
    z-index: 9999;
    transition: opacity 0.2s ease-in-out;
}

/* Show tooltip on hover */
.indicator-suggestion-item:hover .indicator-tooltip {
    opacity: 1;
}

/* Tooltip arrow */
.tooltip-arrow {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 6px 6px 0;
    border-color: transparent #1f2937 transparent transparent;
}

/* Mobile adjustments - show tooltip above instead of side */
@media (max-width: 768px) {
    .indicator-tooltip {
        left: 50%;
        top: auto;
        bottom: 100%;
        margin-left: 0;
        margin-bottom: 0.5rem;
        transform: translateX(-50%);
        max-width: 90vw;
    }
    
    .tooltip-arrow {
        right: auto;
        left: 50%;
        top: 100%;
        transform: translateX(-50%);
        border-width: 6px 6px 0 6px;
        border-color: #1f2937 transparent transparent transparent;
    }
}

/* Truncate text helper classes */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dark mode support */
[data-theme="dark"] .indicator-tooltip {
    background-color: #374151;
    color: #f3f4f6;
}

[data-theme="dark"] .tooltip-arrow {
    border-color: transparent #374151 transparent transparent;
}

@media (max-width: 768px) {
    [data-theme="dark"] .tooltip-arrow {
        border-color: #374151 transparent transparent transparent;
    }
}
