/* User Dashboard Styles */

/* Disable text selection on mobile/tablet */
@media (max-width: 1024px) {
    .user-dashboard-container {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
}

.user-dashboard-container {
    margin: 0 auto;
    padding: 0rem 1.5rem;
}

/* Page Header */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.dashboard-header h1 {
    margin: 0;
    padding: 1rem 1.5rem;
    font-size: 1.5rem;
    color: #368BC1;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-header h1 svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.dashboard-header p {
    margin: 0;
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.6;
}

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

.kpi-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.kpi-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.kpi-card-clickable {
    cursor: pointer;
    position: relative;
}

.kpi-card-clickable::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    background: #368BC1;
    border-radius: 50%;
    opacity: 0.6;
}

.kpi-card-clickable:hover::after {
    opacity: 1;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* Drag Handle for KPI cards */
.kpi-drag-handle {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 5;
}

.kpi-card:hover .kpi-drag-handle {
    opacity: 0.4;
}

.kpi-drag-handle:hover {
    opacity: 0.8 !important;
}

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

.kpi-drag-handle svg {
    width: 14px;
    height: 14px;
    stroke: #666;
}

/* Draggable KPI states */
.draggable-kpi {
    position: relative;
}

.draggable-kpi.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.draggable-kpi.drag-over {
    border: 2px dashed #368BC1;
    background: rgba(54, 139, 193, 0.05);
}

/* Adjust drag handle on mobile */
@media (max-width: 768px) {
    .kpi-drag-handle {
        top: 4px;
        left: 4px;
        width: 16px;
        height: 16px;
    }

    .kpi-drag-handle svg {
        width: 12px;
        height: 12px;
    }
}

/* ============================================
   CARD DRAG AND DROP
   ============================================ */

/* Drag Handle for dashboard cards */
.card-drag-handle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.card-header:hover .card-drag-handle {
    opacity: 0.4;
}

.card-drag-handle:hover {
    opacity: 0.8 !important;
}

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

.card-drag-handle svg {
    width: 16px;
    height: 16px;
    stroke: #666;
}


/* Draggable card states */
.draggable-card {
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* On mobile, prevent text selection on card headers */
@media (max-width: 768px) {
    .draggable-card .card-header {
        -webkit-user-select: none;
        user-select: none;
    }

    /* Prevent text selection on the entire card during drag */
    .draggable-card.card-dragging,
    .draggable-card.card-dragging * {
        -webkit-user-select: none !important;
        user-select: none !important;
        touch-action: none !important;
    }

    /* Prevent text selection while drag is active */
    .cards-container.cards-drag-active {
        -webkit-user-select: none;
        user-select: none;
    }

    /* Body class to prevent scrolling during card drag */
    body.card-dragging-active {
        overflow: hidden !important;
    }
}

.dashboard-card.draggable-card.card-dragging {
    opacity: 0.6 !important;
    outline: 3px dashed #368BC1 !important;
    outline-offset: 2px;
    background: #e8f4fc !important;
    box-shadow: 0 0 20px rgba(54, 139, 193, 0.5) !important;
}

/* Only disable pointer-events on mobile (touch dragging) - desktop needs them for native drag API */
@media (max-width: 768px) {
    .dashboard-card.draggable-card.card-dragging {
        pointer-events: none; /* Allow touch events to pass through to cards underneath */
    }
}

/* Also dim children to make it obvious */
.dashboard-card.draggable-card.card-dragging .card-header,
.dashboard-card.draggable-card.card-dragging .collapsible-body,
.dashboard-card.draggable-card.card-dragging .card-body {
    opacity: 0.7;
}

.dashboard-card.draggable-card.card-drag-over {
    box-shadow: 0 0 0 3px #368BC1, 0 8px 24px rgba(54, 139, 193, 0.4) !important;
    transform: scale(1.02);
    background: #f0f8ff !important;
}

/* Container state when dragging */
.cards-container.cards-drag-active .draggable-card:not(.card-dragging) {
    transition: transform 0.2s ease;
}

/* Show drag handle on mobile with white color */
@media (max-width: 768px) {
    .card-drag-handle {
        opacity: 0.7 !important;
    }

    .card-drag-handle svg {
        stroke: #fff !important;
    }

    /* White chevrons on collapse button */
    .collapsible-card .collapse-btn svg {
        stroke: #fff;
    }
}

/* Drag hint banner */
.kpi-drag-hint {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #e8f4fc 0%, #d6ebf7 100%);
    border: 1px solid #b8daef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #2c5282;
    animation: slideDown 0.3s ease-out;
}

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

.kpi-drag-hint svg {
    width: 18px;
    height: 18px;
    stroke: #368BC1;
    flex-shrink: 0;
}

.kpi-drag-hint span {
    flex: 1;
}

.kpi-drag-hint-dismiss {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #5a8bb8;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.kpi-drag-hint-dismiss:hover {
    color: #2c5282;
}

@media (max-width: 768px) {
    .kpi-drag-hint {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
        margin: 0 0.5rem 0.75rem 0.5rem;
    }

    .kpi-drag-hint svg {
        width: 14px;
        height: 14px;
    }
}

.kpi-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-card--mock-unlocked {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%) !important;
}

.kpi-card--mock-unlocked .kpi-icon {
    background: #28a745 !important;
}

.kpi-card--mock-locked .kpi-icon {
    background: #9b59b6 !important;
}

/* Ranking KPI card styles */
.kpi-card--ranking-top {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%) !important;
}

.kpi-card--ranking-top .kpi-icon {
    background: #10b981 !important;
}

.kpi-card--ranking .kpi-icon {
    background: #6366f1 !important;
}

/* Smart Review KPI card styles */
.kpi-card--sr-due {
    background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%) !important;
    border: 1px solid rgba(13, 148, 136, 0.3) !important;
}

.kpi-card--sr-due .kpi-icon {
    background: #0d9488 !important;
}

.kpi-card--sr-due .kpi-value {
    color: #0f766e !important;
}

.kpi-card--sr-due .kpi-label {
    color: #115e59 !important;
}

.kpi-card--sr-due .kpi-meta {
    color: #0d9488 !important;
}

.kpi-card--sr-done .kpi-icon {
    background: #6c757d !important;
}

.kpi-card--sr-done .kpi-value {
    color: #495057 !important;
}

/* Study Plan KPI card styles */
.kpi-card--plan-active {
    background: linear-gradient(135deg, #e7f3ff 0%, #dbeafe 100%) !important;
    border: 1px solid rgba(54, 139, 193, 0.3) !important;
}

.kpi-card--plan-active .kpi-icon {
    background: #368BC1 !important;
}

.kpi-card--plan-active .kpi-value {
    color: #1e5f88 !important;
}

.kpi-card--plan-active .kpi-label {
    color: #1e5f88 !important;
}

.kpi-card--plan-active .kpi-meta {
    color: #368BC1 !important;
}

.kpi-card--plan-complete {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%) !important;
    border: 1px solid rgba(40, 167, 69, 0.3) !important;
}

.kpi-card--plan-complete .kpi-icon {
    background: #28a745 !important;
}

.kpi-card--plan-complete .kpi-value {
    color: #155724 !important;
}

.kpi-card--plan-complete .kpi-label {
    color: #155724 !important;
}

.kpi-card--plan-complete .kpi-meta {
    color: #28a745 !important;
}

.kpi-card--plan-none .kpi-icon {
    background: #6c757d !important;
}

.kpi-card--plan-none .kpi-value {
    color: #495057 !important;
}

/* Exam Ready KPI card - celebration style */
.kpi-card--exam-ready {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fbbf24 100%) !important;
    border: 2px solid #f59e0b !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3) !important;
    animation: exam-ready-glow 2s ease-in-out infinite;
}

.kpi-card--exam-ready .kpi-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.kpi-card--exam-ready .kpi-value {
    color: #92400e !important;
    font-size: 1.6rem !important;
}

.kpi-card--exam-ready .kpi-label {
    color: #78350f !important;
    font-weight: 600 !important;
}

.kpi-card--exam-ready .kpi-meta {
    color: #92400e !important;
}

@keyframes exam-ready-glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(245, 158, 11, 0.5);
    }
}

.kpi-icon svg {
    width: 28px;
    height: 28px;
    stroke: white;
}

.kpi-content {
    flex: 1;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.kpi-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.kpi-meta {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.kpi-change {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.kpi-change.positive {
    color: #28a745;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.dashboard-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Dashboard Cards */
.dashboard-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Allow overflow for chart cards so tooltips can display */
.questions-chart-card,
.quizzes-chart-card {
    overflow: visible;
}

.questions-chart-card .card-body,
.quizzes-chart-card .card-body,
.questions-chart-card .collapsible-body,
.quizzes-chart-card .collapsible-body,
.questions-chart-card .chart-wrapper,
.quizzes-chart-card .chart-wrapper {
    overflow: visible !important;
}

/* Ensure chart cards have proper stacking context for tooltips */
.questions-chart-card,
.quizzes-chart-card {
    position: relative;
    z-index: 1;
}

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

/* Ensure title section takes remaining space when drag handle is present */
.card-header > div:not(.card-drag-handle):not(.collapse-btn) {
    flex: 1;
}

.collapsible-card .card-header {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.collapsible-card .card-header:hover {
    background-color: #f8f9fa;
}

.collapsible-card.collapsed .card-header:hover {
    background-color: #e9ecef;
}

.collapse-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.collapse-btn:hover {
    background: #f8f9fa;
}

.collapse-btn svg {
    width: 20px;
    height: 20px;
    stroke: #6c757d;
    transition: transform 0.3s ease;
}

/* Rotate chevron when collapsed (points right instead of down) */
.collapsible-card.collapsed .collapse-btn svg {
    transform: rotate(-90deg);
}

.collapsible-body {
    max-height: 5000px;
    opacity: 1;
    overflow: visible;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

/* Collapsed state for all collapsible cards (works on all screen sizes) */
.collapsible-card.collapsed .collapsible-body {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Chart cards: always visible on desktop, collapsible on mobile */
@media (min-width: 641px) {
    .questions-chart-card .collapse-btn,
    .quizzes-chart-card .collapse-btn {
        display: none;
    }

    .questions-chart-card .card-header,
    .quizzes-chart-card .card-header {
        cursor: default;
        pointer-events: none;
    }

    /* Re-enable pointer events on drag handle so charts can be swapped left/right */
    .questions-chart-card .card-drag-handle,
    .quizzes-chart-card .card-drag-handle {
        pointer-events: auto;
        cursor: grab;
        opacity: 0.5; /* Always visible since header hover doesn't work */
    }

    .questions-chart-card .card-drag-handle:hover,
    .quizzes-chart-card .card-drag-handle:hover {
        opacity: 0.8;
    }

    .questions-chart-card .collapsible-body,
    .quizzes-chart-card .collapsible-body {
        max-height: 5000px !important;
        opacity: 1 !important;
    }

    .questions-chart-card .card-collapse-indicator,
    .quizzes-chart-card .card-collapse-indicator {
        display: none;
    }
}

.card-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header svg {
    width: 20px;
    height: 20px;
    stroke: #368BC1;
}

/* Card count badge in header */
.card-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    background: #368BC1;
    border-radius: 10px;
    margin-left: 0.25rem;
    box-shadow: 0 2px 6px rgba(54, 139, 193, 0.4);
}

.card-count--warning {
    background: #e74c3c;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.4);
}

/* Card-specific icon colors (matching mobile header colors) */
.focus-areas-card .card-header svg {
    stroke: #e74c3c;
}

.questions-progress-card .card-header svg {
    stroke: #17a2b8;
}

.road-to-mock-card .card-header svg {
    stroke: #8b5cf6;
}

.questions-chart-card .card-header svg {
    stroke: #2d9f52;
}

.quizzes-chart-card .card-header svg {
    stroke: #e67e22;
}

.comparison-card .card-header svg {
    stroke: #6366f1;
}

.benchmarks-card .card-header svg {
    stroke: #10b981;
}

.card-subtitle {
    font-size: 0.875rem;
    color: #6c757d;
}

.card-body {
    padding: 1.5rem;
}

/* Focus Areas */
.focus-areas-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.focus-areas-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.focus-area-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.25rem;
    border-left: 4px solid #ffc107;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.focus-area-item:last-child {
    margin-bottom: 0;
}

.focus-area-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.focus-area-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.focus-area-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.focus-area-progress {
    margin-bottom: 0.75rem;
}

.progress-bar-bg {
    width: 100%;
    background: #e9ecef;
    border-radius: 3px;
    height: 4px;
    overflow: hidden;
}

.focus-area-stats {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.subject-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.subject-score {
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.subject-score.warning {
    color: #f59e0b;
}

.subject-score.pass {
    color: #28a745;
}

.subject-score.fail {
    color: #dc3545;
}

.progress-bar-container {
    width: 100%;
    background: #e9ecef;
    border-radius: 3px;
    height: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.progress-bar.warning {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.practice-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #368BC1;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.practice-btn:hover {
    background: #2a6d96;
    transform: translateX(4px);
}

/* Success Message */
.success-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.success-message {
    text-align: center;
    padding: 2rem;
}

.success-message h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #28a745;
    margin: 0 0 0.5rem 0;
}

.success-message p {
    font-size: 0.95rem;
    color: #6c757d;
    margin: 0;
}

.mock-exam-btn {
    color: #368BC1 !important;
    background: transparent !important;
    border: 2px solid #368BC1;
}

.mock-exam-btn:hover {
    background: #368BC1 !important;
    color: white !important;
}

.mock-congrats-dismiss-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #dee2e6;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
}

.mock-congrats-dismiss-btn:hover {
    background: white;
    border-color: #6c757d;
    transform: scale(1.1);
}

.mock-congrats-dismiss-btn svg {
    stroke: #6c757d;
}

/* Questions Progress */
.questions-progress-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.questions-progress-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.question-progress-wrapper {
    margin-bottom: 0.75rem;
}

.question-progress-wrapper:last-child {
    margin-bottom: 0;
}

.question-progress-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.75rem;
    border-left: 4px solid #368BC1;
    transition: all 0.2s ease;
}

/* Category-specific border colors */
.question-progress-item.category-1 { border-left-color: #368BC1; } /* Navigation - Blue */
.question-progress-item.category-2 { border-left-color: #17a2b8; } /* Meteorology - Cyan */
.question-progress-item.category-3 { border-left-color: #6f42c1; } /* Air Law - Purple */
.question-progress-item.category-4 { border-left-color: #e83e8c; } /* Human Performance - Pink */
.question-progress-item.category-5 { border-left-color: #fd7e14; } /* Operational Procedures - Orange */
.question-progress-item.category-6 { border-left-color: #20c997; } /* Principles of Flight - Teal */
.question-progress-item.category-7 { border-left-color: #28a745; } /* Flight Performance - Green */
.question-progress-item.category-8 { border-left-color: #d39e00; } /* Aircraft General Knowledge - Amber */
.question-progress-item.category-9 { border-left-color: #dc3545; } /* Radiotelephony - Red */

.question-progress-item.has-unanswered {
    cursor: pointer;
}

.question-progress-item.has-unanswered:hover {
    background: #e9ecef;
}

.question-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.question-progress-name {
    font-size: 0.875rem;
    color: #2c3e50;
    font-weight: 500;
    flex: 1;
}

.question-progress-stats {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-percentage {
    color: #368BC1;
    font-weight: 700;
}

.question-progress-bar {
    width: 100%;
    background: #dee2e6;
    border-radius: 3px;
    height: 4px;
    overflow: hidden;
}

.question-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #368BC1 0%, #2a6d96 100%);
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* Category-specific progress fill colors */
.category-1 .question-progress-fill { background: linear-gradient(90deg, #368BC1 0%, #2a6d96 100%); } /* Navigation - Blue */
.category-2 .question-progress-fill { background: linear-gradient(90deg, #17a2b8 0%, #128293 100%); } /* Meteorology - Cyan */
.category-3 .question-progress-fill { background: linear-gradient(90deg, #6f42c1 0%, #5a349a 100%); } /* Air Law - Purple */
.category-4 .question-progress-fill { background: linear-gradient(90deg, #e83e8c 0%, #ba3270 100%); } /* Human Performance - Pink */
.category-5 .question-progress-fill { background: linear-gradient(90deg, #fd7e14 0%, #ca6510 100%); } /* Operational Procedures - Orange */
.category-6 .question-progress-fill { background: linear-gradient(90deg, #20c997 0%, #1aa179 100%); } /* Principles of Flight - Teal */
.category-7 .question-progress-fill { background: linear-gradient(90deg, #28a745 0%, #208637 100%); } /* Flight Performance - Green */
.category-8 .question-progress-fill { background: linear-gradient(90deg, #d39e00 0%, #a97f00 100%); } /* Aircraft General Knowledge - Amber */
.category-9 .question-progress-fill { background: linear-gradient(90deg, #dc3545 0%, #b02a37 100%); } /* Radiotelephony - Red */

/* Road to Mock Exam */
.road-to-mock-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.readiness-summary {
    background: linear-gradient(135deg, #368BC1 0%, #2a6d96 100%);
    padding: 1.5rem;
    text-align: center;
    color: white;
}

.readiness-percentage {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.readiness-label {
    font-size: 1rem;
    opacity: 0.95;
}

.requirements-list {
    padding: 1.5rem;
}

.requirement-section {
    margin-bottom: 1.5rem;
}

.requirement-section:last-child {
    margin-bottom: 0;
}

.requirement-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.requirement-item {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid #dee2e6;
    transition: all 0.2s ease;
}

.requirement-item:last-child {
    margin-bottom: 0;
}

.requirement-item.met {
    background: #d4edda;
    border-left-color: #28a745;
}

.requirement-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
}

.requirement-icon svg {
    width: 20px;
    height: 20px;
    stroke: #dee2e6;
}

.requirement-item.met .requirement-icon svg {
    stroke: #28a745;
}

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

.requirement-title {
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 500;
    flex: 1;
    text-align: left;
}

.requirement-value-with-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.requirement-value {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 600;
}

.requirement-check {
    width: 18px;
    height: 18px;
    stroke: #28a745;
    flex-shrink: 0;
}

.requirement-item.met .requirement-value {
    color: #28a745;
}

.requirement-progress,
.requirement-progress-bar {
    position: relative;
    width: 100%;
    background: #dee2e6;
    border-radius: 3px;
    height: 4px;
    overflow: hidden;
}

.requirement-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #368BC1 0%, #2a6d96 100%);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.requirement-item.met .requirement-progress-fill {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.category-requirements {
    margin-top: 1.5rem;
}

.category-requirements h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 1rem 0;
}

.category-requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.category-requirement-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.75rem;
    border-left: 4px solid #dee2e6;
    transition: all 0.2s ease;
    margin-bottom: 0.75rem;
}

.category-requirement-item:last-child {
    margin-bottom: 0;
}

.category-requirement-item.met {
    background: #d4edda;
    border-left-color: #28a745;
}

.category-req-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.category-req-name {
    font-size: 0.875rem;
    color: #2c3e50;
    font-weight: 500;
    flex: 1;
}

.category-req-progress {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-requirement-item.met .category-req-progress {
    color: #28a745;
}

.check-icon {
    width: 16px;
    height: 16px;
    stroke: #28a745;
}

.category-req-bar {
    width: 100%;
    background: #dee2e6;
    border-radius: 3px;
    height: 4px;
    overflow: hidden;
}

.category-req-fill {
    height: 100%;
    background: linear-gradient(90deg, #368BC1 0%, #2a6d96 100%);
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* Category-specific colors for Road to Mock Exam */
.category-requirement-item.category-1 .category-req-fill { background: linear-gradient(90deg, #368BC1 0%, #2a6d96 100%); } /* Navigation - Blue */
.category-requirement-item.category-2 .category-req-fill { background: linear-gradient(90deg, #17a2b8 0%, #128293 100%); } /* Meteorology - Cyan */
.category-requirement-item.category-3 .category-req-fill { background: linear-gradient(90deg, #6f42c1 0%, #5a349a 100%); } /* Air Law - Purple */
.category-requirement-item.category-4 .category-req-fill { background: linear-gradient(90deg, #e83e8c 0%, #ba3270 100%); } /* Human Performance - Pink */
.category-requirement-item.category-5 .category-req-fill { background: linear-gradient(90deg, #fd7e14 0%, #ca6510 100%); } /* Operational Procedures - Orange */
.category-requirement-item.category-6 .category-req-fill { background: linear-gradient(90deg, #20c997 0%, #1aa179 100%); } /* Principles of Flight - Teal */
.category-requirement-item.category-7 .category-req-fill { background: linear-gradient(90deg, #28a745 0%, #208637 100%); } /* Flight Performance - Green */
.category-requirement-item.category-8 .category-req-fill { background: linear-gradient(90deg, #d39e00 0%, #a97f00 100%); } /* Aircraft General Knowledge - Amber */
.category-requirement-item.category-9 .category-req-fill { background: linear-gradient(90deg, #dc3545 0%, #b02a37 100%); } /* Radiotelephony - Red */

.category-requirement-item.met .category-req-fill {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.unanswered-badge {
    display: inline-block;
    background: #ffc107;
    color: #000;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    font-weight: 600;
}

.expand-icon {
    width: 16px;
    height: 16px;
    stroke: #6c757d;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.category-unanswered-questions {
    margin-top: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }
    to {
        opacity: 1;
        max-height: 500px;
        overflow: visible;
    }
}

.unanswered-questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.5rem;
}

.unanswered-question-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #368BC1;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.unanswered-question-link:hover {
    background: #368BC1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(54, 139, 193, 0.3);
}

.category-name {
    font-size: 0.875rem;
    color: #2c3e50;
    font-weight: 500;
}

.category-progress {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 600;
}

.category-requirement-item.met .category-progress {
    color: #28a745;
}

/* Charts - side by side on desktop using subgrid technique */
.cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Most cards span full width */
.cards-container > .draggable-card {
    grid-column: 1 / -1;
    margin-bottom: 0.5rem;
}

/* Chart cards span single column on desktop for side-by-side layout */
.cards-container > .chart-card {
    grid-column: span 1;
}

.chart-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: visible;
}

.chart-wrapper {
    position: relative;
    width: 100%;
}

.chart-wrapper canvas {
    pointer-events: auto !important;
}

/* Unanswered Questions */
.unanswered-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.expand-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background: #f8f9fa;
    border: none;
    border-top: 1px solid #e9ecef;
    color: #368BC1;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.expand-btn:hover {
    background: #e9ecef;
}

.expand-btn svg {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

.expand-btn.expanded svg {
    transform: rotate(180deg);
}

.unanswered-content {
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.category-section {
    margin-bottom: 1.5rem;
}

.category-section:last-child {
    margin-bottom: 0;
}

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

.category-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.category-count {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 600;
}

.question-ids-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.5rem;
}

.question-ids-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #368BC1;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.question-ids-grid a:hover {
    background: #368BC1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(54, 139, 193, 0.3);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

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

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.modal-header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header-title svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: #368BC1;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #6c757d;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

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

/* Readiness Modal Specific */
.readiness-circle {
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.readiness-progress {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.readiness-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 700;
    color: #368BC1;
}

.modal-requirements-list {
    text-align: left;
    margin-top: 1.5rem;
}

.take-exam-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #368BC1 0%, #2a6d96 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    transition: all 0.2s ease;
}

.take-exam-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(54, 139, 193, 0.4);
}

.not-ready-message {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    stroke: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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

    /* Chart cards stack on tablets */
    .cards-container > .chart-card {
        grid-column: 1 / -1;
    }

    .category-requirements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .user-dashboard-container {
        padding: 0.5rem 0.1rem 1rem 0.1rem;
    }

    /* KPI 2-Column Grid on Mobile */
    .kpi-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin-bottom: 1rem;
        padding: 0 0.5rem;
    }

    /* Hide carousel elements */
    .kpi-carousel-container {
        display: none !important;
    }

    .kpi-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin: 0;
        padding: 0.75rem 0.5rem;
        min-height: auto;
    }

    /* Smaller icon on mobile */
    .kpi-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 0.5rem;
    }

    .kpi-icon svg {
        width: 20px;
        height: 20px;
    }

    /* Smaller text on mobile */
    .kpi-value {
        font-size: 1.25rem;
        margin-bottom: 0.125rem;
    }

    .kpi-label {
        font-size: 0.75rem;
        margin-bottom: 0.125rem;
        line-height: 1.2;
    }

    .kpi-meta {
        font-size: 0.65rem;
        line-height: 1.2;
    }

    /* Clickable indicator on mobile - slightly smaller */
    .kpi-card-clickable::after {
        width: 6px;
        height: 6px;
        top: 8px;
        right: 8px;
    }

    /* Compact welcome header on mobile */
    .dashboard-header {
        margin-bottom: 0.5rem;
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .dashboard-header-card {
        border: none;
    }

    .dashboard-header-title {
        background: #368BC1 !important;
        border-radius: 0;
    }

    .dashboard-header-subtitle {
        background: #fff !important;
        border-radius: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .dashboard-header h1 {
        font-size: 1.1rem;
        padding: 0.75rem 1rem;
        color: #fff;
        margin: 0;
    }

    .dashboard-header p {
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
        color: #6c757d;
        margin: 0;
    }

    .card-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        background: rgba(54, 139, 193, 0.08);
        border-bottom: 1px solid rgba(54, 139, 193, 0.15);
        cursor: pointer;
        pointer-events: auto;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        position: relative;
        z-index: 20;
    }

    .card-header h2 {
        font-size: 1rem;
        margin: 0;
    }

    .card-header > div:not(.card-drag-handle) {
        flex: 1;
        min-width: 0;
    }

    /* Make drag handle visible on mobile */
    .card-drag-handle {
        opacity: 0.7;
        flex-shrink: 0;
    }

    .card-drag-handle svg {
        stroke: #fff !important;
    }

    .card-subtitle {
        display: none;
    }

    .collapse-btn {
        padding: 0.25rem;
        background: transparent;
        border-radius: 4px;
    }

    .collapse-btn svg {
        width: 20px;
        height: 20px;
        stroke: #fff;
    }

    /* Single column layout on mobile */
    .cards-container {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .cards-container > .chart-card {
        grid-column: 1;
    }

    .chart-wrapper {
        min-height: 270px;
        height: 270px;
    }

    .chart-wrapper canvas {
        max-height: 270px;
    }

    /* Enable collapse functionality on chart cards for mobile */
    .questions-chart-card .collapse-btn,
    .quizzes-chart-card .collapse-btn {
        display: block !important;
    }

    .questions-chart-card .card-header,
    .quizzes-chart-card .card-header {
        pointer-events: auto;
        cursor: pointer;
    }

    .collapsible-card.collapsed .collapsible-body {
        max-height: 0;
        opacity: 0;
        pointer-events: none;
    }

    .category-requirements-grid {
        grid-template-columns: 1fr;
    }

    .question-ids-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }

    .readiness-percentage {
        font-size: 2.5rem;
    }

    .readiness-circle {
        width: 150px;
        height: 150px;
    }

    .readiness-number {
        font-size: 2.5rem;
    }

    .card-body {
        padding: 1.5rem 0.2rem 0.2rem;
    }
}

/* ============================================
   KPI Carousel Navigation Dots (Mobile) - DEPRECATED
   Carousel replaced with 2-column grid layout
   ============================================ */

/* Hide all carousel-related elements */
.kpi-carousel-dots,
.kpi-carousel-container,
.kpi-carousel-hint {
    display: none !important;
}

/* Hide collapse indicator on desktop - only show on mobile */
.card-collapse-indicator {
    display: none;
}

@media (max-width: 640px) {
    /* Focus Areas Card - Red accent */
    .focus-areas-card {
        margin-bottom: 0.5rem;
    }

    .focus-areas-card .card-header {
        background: white !important;
        border-bottom: 1px solid rgba(231, 76, 60, 0.2) !important;
        border-radius: 6px 6px 0 0;
    }

    .focus-areas-card .card-header:hover {
        background: rgba(231, 76, 60, 0.05) !important;
    }

    .focus-areas-card.collapsed .card-header:hover {
        background: rgba(231, 76, 60, 0.08) !important;
    }

    .focus-areas-card .collapse-btn {
        background: transparent;
    }

    .focus-areas-card .collapse-btn svg {
        stroke: #e74c3c;
    }

    .focus-areas-card .card-header h2,
    .focus-areas-card .card-header h2 svg {
        color: #e74c3c;
        stroke: #e74c3c;
    }

    .focus-areas-card .card-drag-handle svg {
        stroke: #e74c3c !important;
        fill: #e74c3c;
    }

    .focus-areas-card .card-count {
        background: #e74c3c;
        color: #fff;
    }

    /* Collapse indicator at bottom of collapsed card */
    .card-collapse-indicator {
        display: none;
        position: absolute;
        bottom: -20px;
        left: 0;
        right: 0;
        justify-content: center;
        align-items: center;
        padding: 1.5rem 0;
        cursor: pointer;
        transition: all 0.2s ease;
        pointer-events: auto;
        z-index: 10;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        touch-action: manipulation;
        min-height: 44px;
    }

    .card-collapse-indicator svg {
        width: 20px;
        height: 20px;
        stroke: rgba(0, 0, 0, 0.4);
        transition: all 0.2s ease;
        transform: translateY(12px);
    }

    .card-collapse-indicator:hover svg {
        stroke: rgba(0, 0, 0, 0.7);
        transform: translateY(2px);
    }

    /* Show indicator only when card is collapsed */
    .collapsible-card.collapsed .card-collapse-indicator {
        display: flex;
    }

    /* Make parent card position relative for absolute positioning */
    .collapsible-card {
        position: relative;
    }

    .collapsible-card.collapsed {
        overflow: visible;
    }

    /* Questions Progress Card - Teal accent */
    .questions-progress-card {
        margin-bottom: 0.5rem;
    }

    .questions-progress-card .card-header {
        background: white !important;
        border-bottom: 1px solid rgba(23, 162, 184, 0.2) !important;
        border-radius: 6px 6px 0 0;
    }

    .questions-progress-card .card-header:hover {
        background: rgba(23, 162, 184, 0.05) !important;
    }

    .questions-progress-card.collapsed .card-header:hover {
        background: rgba(23, 162, 184, 0.08) !important;
    }

    .questions-progress-card .collapse-btn {
        background: transparent;
    }

    .questions-progress-card .collapse-btn svg {
        stroke: #17a2b8;
    }

    .questions-progress-card .card-header h2,
    .questions-progress-card .card-header h2 svg {
        color: #17a2b8;
        stroke: #17a2b8;
    }

    .questions-progress-card .card-drag-handle svg {
        stroke: #17a2b8 !important;
        fill: #17a2b8;
    }

    /* Road to Mock Exam Card - Purple accent */
    .road-to-mock-card .card-header {
        background: white !important;
        border-bottom: 1px solid rgba(139, 92, 246, 0.2) !important;
        border-radius: 6px 6px 0 0;
    }

    .road-to-mock-card .card-header:hover {
        background: rgba(139, 92, 246, 0.05) !important;
    }

    .road-to-mock-card.collapsed .card-header:hover {
        background: rgba(139, 92, 246, 0.08) !important;
    }

    .road-to-mock-card .collapse-btn {
        background: transparent;
    }

    .road-to-mock-card .collapse-btn svg {
        stroke: #8b5cf6;
    }

    .road-to-mock-card .card-header h2,
    .road-to-mock-card .card-header h2 svg {
        color: #8b5cf6;
        stroke: #8b5cf6;
    }

    .road-to-mock-card .card-drag-handle svg {
        stroke: #8b5cf6 !important;
        fill: #8b5cf6;
    }

    /* Questions Chart Card - Green accent */
    .questions-chart-card .card-header {
        background: white !important;
        border-bottom: 1px solid rgba(45, 159, 82, 0.2) !important;
        border-radius: 6px 6px 0 0;
    }

    .questions-chart-card .card-header:hover {
        background: rgba(45, 159, 82, 0.05) !important;
    }

    .questions-chart-card.collapsed .card-header:hover {
        background: rgba(45, 159, 82, 0.08) !important;
    }

    .questions-chart-card .collapse-btn {
        background: transparent;
    }

    .questions-chart-card .collapse-btn svg {
        stroke: #2d9f52;
    }

    .questions-chart-card .card-header h2,
    .questions-chart-card .card-header h2 svg {
        color: #2d9f52;
        stroke: #2d9f52;
    }

    .questions-chart-card .card-drag-handle svg {
        stroke: #2d9f52 !important;
        fill: #2d9f52;
    }

    /* Quizzes Chart Card - Orange accent */
    .quizzes-chart-card .card-header {
        background: white !important;
        border-bottom: 1px solid rgba(230, 126, 34, 0.2) !important;
        border-radius: 6px 6px 0 0;
    }

    .quizzes-chart-card .card-header:hover {
        background: rgba(230, 126, 34, 0.05) !important;
    }

    .quizzes-chart-card.collapsed .card-header:hover {
        background: rgba(230, 126, 34, 0.08) !important;
    }

    .quizzes-chart-card .collapse-btn {
        background: transparent;
    }

    .quizzes-chart-card .collapse-btn svg {
        stroke: #e67e22;
    }

    .quizzes-chart-card .card-header h2,
    .quizzes-chart-card .card-header h2 svg {
        color: #e67e22;
        stroke: #e67e22;
    }

    .quizzes-chart-card .card-drag-handle svg {
        stroke: #e67e22 !important;
        fill: #e67e22;
    }

    /* Comparison Card - Purple accent (Mobile) */
    .comparison-card {
        margin-bottom: 1.5rem;
    }

    .comparison-card .card-header {
        background: white !important;
        border-bottom: 1px solid rgba(99, 102, 241, 0.2) !important;
        border-radius: 6px 6px 0 0;
    }

    .comparison-card .card-header:hover {
        background: rgba(99, 102, 241, 0.05) !important;
    }

    .comparison-card.collapsed .card-header:hover {
        background: rgba(99, 102, 241, 0.08) !important;
    }

    .comparison-card .collapse-btn {
        background: transparent;
    }

    .comparison-card .collapse-btn svg {
        stroke: #6366f1;
    }

    .comparison-card .card-header h2,
    .comparison-card .card-header h2 svg {
        color: #6366f1 !important;
        stroke: #6366f1 !important;
    }

    .comparison-card .card-subtitle {
        color: #6c757d !important;
    }

    .comparison-card .card-drag-handle svg {
        stroke: #6366f1 !important;
        fill: #6366f1;
    }

    /* Benchmarks Card - Green accent (Mobile) */
    .benchmarks-card {
        margin-bottom: 1.5rem;
    }

    .benchmarks-card .card-header {
        background: white !important;
        border-bottom: 1px solid rgba(16, 185, 129, 0.2) !important;
        border-radius: 6px 6px 0 0;
    }

    .benchmarks-card .card-header:hover {
        background: rgba(16, 185, 129, 0.05) !important;
    }

    .benchmarks-card.collapsed .card-header:hover {
        background: rgba(16, 185, 129, 0.08) !important;
    }

    .benchmarks-card .collapse-btn {
        background: transparent;
    }

    .benchmarks-card .collapse-btn svg {
        stroke: #10b981;
    }

    .benchmarks-card .card-header h2,
    .benchmarks-card .card-header h2 svg {
        color: #10b981 !important;
        stroke: #10b981 !important;
    }

    .benchmarks-card .card-subtitle {
        color: #6c757d !important;
    }

    .benchmarks-card .card-drag-handle svg {
        stroke: #10b981 !important;
        fill: #10b981;
    }
}


/* ============================================
   HOW YOU COMPARE - Comparison Charts Section
   ============================================ */

.comparison-card {
    margin-bottom: 1.5rem;
}

.comparison-card .card-header {
    background: transparent;
}

.comparison-card .card-header h2 {
    color: #212529;
}

.comparison-card .card-subtitle {
    color: #6c757d;
}

.comparison-card.collapsed .card-header:hover {
    background: #f8f9fa;
}

.comparison-card .collapse-btn {
    background: transparent;
}

.comparison-card .collapse-btn:hover {
    background: transparent;
}

@media (min-width: 769px) {
    .comparison-card .collapse-btn svg {
        stroke: #6c757d;
    }
}

.comparison-charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1rem 0;
}

@media (max-width: 900px) {
    .comparison-charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .comparison-charts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.comparison-chart-item {
    text-align: center;
}

.comparison-chart-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.75rem 0;
}

.comparison-chart-container {
    position: relative;
    width: 100%;
    max-width: 160px;
    margin: 0 auto;
}

.comparison-chart-container canvas {
    max-height: 160px;
}

.comparison-legend {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
}

.comparison-legend span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.legend-you .legend-dot {
    background: #368BC1;
}

.legend-avg .legend-dot {
    background: #a8d4f0;
}

.legend-you {
    color: #368BC1;
    font-weight: 600;
}

.legend-avg {
    color: #5a9bc7;
}

/* ============================================
   SUBJECT BENCHMARKS Section
   ============================================ */

.benchmarks-card {
    margin-bottom: 1.5rem;
}

.benchmarks-card .card-header {
    background: transparent;
}

.benchmarks-card .card-header h2 {
    color: #212529;
}

.benchmarks-card .card-subtitle {
    color: #6c757d;
}

.benchmarks-card.collapsed .card-header:hover {
    background: #f8f9fa;
}

.benchmarks-card .collapse-btn {
    background: transparent;
}

.benchmarks-card .collapse-btn:hover {
    background: transparent;
}

@media (min-width: 769px) {
    .benchmarks-card .collapse-btn svg {
        stroke: #6c757d;
    }
}

.benchmarks-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.benchmark-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.75rem;
    border-left: 4px solid #368BC1;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.benchmark-item:last-child {
    margin-bottom: 0;
}

/* Category-specific border colors for benchmarks */
.benchmark-item.category-1 { border-left-color: #368BC1; } /* Navigation - Blue */
.benchmark-item.category-2 { border-left-color: #17a2b8; } /* Meteorology - Cyan */
.benchmark-item.category-3 { border-left-color: #6f42c1; } /* Air Law - Purple */
.benchmark-item.category-4 { border-left-color: #e83e8c; } /* Human Performance - Pink */
.benchmark-item.category-5 { border-left-color: #fd7e14; } /* Operational Procedures - Orange */
.benchmark-item.category-6 { border-left-color: #20c997; } /* Principles of Flight - Teal */
.benchmark-item.category-7 { border-left-color: #28a745; } /* Flight Performance - Green */
.benchmark-item.category-8 { border-left-color: #d39e00; } /* Aircraft General Knowledge - Amber */
.benchmark-item.category-9 { border-left-color: #dc3545; } /* Radiotelephony - Red */

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

.benchmark-name {
    font-size: 0.875rem;
    color: #2c3e50;
    font-weight: 500;
    flex: 1;
}

.benchmark-stats {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.benchmark-you {
    font-weight: 700;
}

.benchmark-you.above {
    color: #368BC1;
}

.benchmark-you.below {
    color: #ef4444;
}

.benchmark-separator {
    color: #9ca3af;
    font-weight: 400;
}

.benchmark-avg {
    color: #a8d4f0;
    font-weight: 600;
}

.benchmark-bar-container {
    position: relative;
    width: 100%;
    background: #dee2e6;
    border-radius: 3px;
    height: 12px;
    overflow: hidden;
}

.benchmark-bar-fill {
    position: absolute;
    left: 0;
    height: 5px;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.benchmark-bar-fill.benchmark-bar-you {
    top: 1px;
    background: linear-gradient(90deg, #368BC1 0%, #2a6d96 100%);
}

.benchmark-bar-fill.benchmark-bar-avg {
    bottom: 1px;
    background: linear-gradient(90deg, #a8d4f0 0%, #7ec4e8 100%);
}

/* Category-specific progress fill colors for benchmarks - User bar */
.benchmark-item.category-1 .benchmark-bar-you { background: linear-gradient(90deg, #368BC1 0%, #2a6d96 100%); }
.benchmark-item.category-2 .benchmark-bar-you { background: linear-gradient(90deg, #17a2b8 0%, #128293 100%); }
.benchmark-item.category-3 .benchmark-bar-you { background: linear-gradient(90deg, #6f42c1 0%, #5a349a 100%); }
.benchmark-item.category-4 .benchmark-bar-you { background: linear-gradient(90deg, #e83e8c 0%, #ba3270 100%); }
.benchmark-item.category-5 .benchmark-bar-you { background: linear-gradient(90deg, #fd7e14 0%, #ca6510 100%); }
.benchmark-item.category-6 .benchmark-bar-you { background: linear-gradient(90deg, #20c997 0%, #1aa179 100%); }
.benchmark-item.category-7 .benchmark-bar-you { background: linear-gradient(90deg, #28a745 0%, #208637 100%); }
.benchmark-item.category-8 .benchmark-bar-you { background: linear-gradient(90deg, #d39e00 0%, #a97f00 100%); }
.benchmark-item.category-9 .benchmark-bar-you { background: linear-gradient(90deg, #dc3545 0%, #b02a37 100%); }

/* Category-specific progress fill colors for benchmarks - Cohort avg bar (lighter shade) */
.benchmark-item.category-1 .benchmark-bar-avg { background: linear-gradient(90deg, #a8d4f0 0%, #7ec4e8 100%); }
.benchmark-item.category-2 .benchmark-bar-avg { background: linear-gradient(90deg, #8ed8e8 0%, #6bcadb 100%); }
.benchmark-item.category-3 .benchmark-bar-avg { background: linear-gradient(90deg, #c4a8e8 0%, #a98ad8 100%); }
.benchmark-item.category-4 .benchmark-bar-avg { background: linear-gradient(90deg, #f5a8c8 0%, #eb8ab5 100%); }
.benchmark-item.category-5 .benchmark-bar-avg { background: linear-gradient(90deg, #fec89a 0%, #fdba74 100%); }
.benchmark-item.category-6 .benchmark-bar-avg { background: linear-gradient(90deg, #8eecd8 0%, #6be4c8 100%); }
.benchmark-item.category-7 .benchmark-bar-avg { background: linear-gradient(90deg, #90d8a0 0%, #70c882 100%); }
.benchmark-item.category-8 .benchmark-bar-avg { background: linear-gradient(90deg, #f0d080 0%, #e8c060 100%); }
.benchmark-item.category-9 .benchmark-bar-avg { background: linear-gradient(90deg, #f0a0a8 0%, #e88890 100%); }

/* ============================================
   FREE ACCOUNT BADGE (User-facing)
   ============================================ */

.free-account-badge-user {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 6px;
    margin-left: 0.75rem;
    vertical-align: middle;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

@media (max-width: 600px) {
    .free-account-badge-user {
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
        margin-left: 0.5rem;
    }
}

/* ============================================
   DARK MODE STYLES
   ============================================ */

/* Dashboard Header Card */
html.dark-mode .dashboard-header-card {
    background: #1a1d23 !important;
    border-color: #363c47 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

html.dark-mode .dashboard-header h1 {
    color: #4a9ed4 !important;
    border-bottom-color: #363c47 !important;
}

html.dark-mode .dashboard-header p {
    color: #9ca3af !important;
}

/* KPI Cards */
html.dark-mode .kpi-card {
    background: #1a1d23 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

html.dark-mode .kpi-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

html.dark-mode .kpi-value {
    color: #f3f4f6 !important;
}

html.dark-mode .kpi-label {
    color: #9ca3af !important;
}

html.dark-mode .kpi-subtitle {
    color: #6b7280 !important;
}

/* Dashboard Cards */
html.dark-mode .dashboard-card {
    background: #1a1d23 !important;
    border-color: #363c47 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

html.dark-mode .dashboard-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

html.dark-mode .dashboard-card-header {
    color: #4a9ed4 !important;
    border-bottom-color: #363c47 !important;
}

html.dark-mode .dashboard-card-body {
    color: #f3f4f6 !important;
}

/* Focus Areas */
html.dark-mode .focus-area-item {
    background: #22262e !important;
    border-color: #363c47 !important;
}

html.dark-mode .focus-area-item:hover {
    background: #2a2f38 !important;
}

html.dark-mode .focus-area-name {
    color: #f3f4f6 !important;
}

html.dark-mode .focus-area-stats {
    color: #9ca3af !important;
}

/* Progress Bars */
html.dark-mode .progress-bar-bg {
    background: #363c47 !important;
}

/* Charts - adjust text colors */
html.dark-mode .chart-container {
    color: #f3f4f6 !important;
}

/* Questions Progress Cards */
html.dark-mode .category-progress-card {
    background: #22262e !important;
    border-color: #363c47 !important;
}

html.dark-mode .category-progress-card:hover {
    background: #2a2f38 !important;
}

html.dark-mode .category-name {
    color: #f3f4f6 !important;
}

html.dark-mode .category-stats {
    color: #9ca3af !important;
}

/* Comparison Section */
html.dark-mode .comparison-card {
    background: #22262e !important;
    border-color: #363c47 !important;
}

html.dark-mode .comparison-label {
    color: #9ca3af !important;
}

html.dark-mode .comparison-value {
    color: #f3f4f6 !important;
}

/* Benchmark Items */
html.dark-mode .benchmark-item {
    background: #22262e !important;
    border-color: #363c47 !important;
}

html.dark-mode .benchmark-category {
    color: #f3f4f6 !important;
}

html.dark-mode .benchmark-score {
    color: #9ca3af !important;
}

html.dark-mode .benchmark-bar-bg {
    background: #363c47 !important;
}

/* Mock Exam Card */
html.dark-mode .mock-exam-card {
    background: #1a1d23 !important;
    border-color: #363c47 !important;
}

html.dark-mode .mock-exam-info {
    color: #9ca3af !important;
}

/* Empty States */
html.dark-mode .empty-state {
    color: #9ca3af !important;
}

html.dark-mode .empty-state-icon {
    color: #4a5568 !important;
}

/* Section Headers */
html.dark-mode .section-header {
    color: #f3f4f6 !important;
}

html.dark-mode .section-subtitle {
    color: #9ca3af !important;
}

/* Cards Grid */
html.dark-mode .cards-section {
    background: transparent !important;
}

/* Card Header Hover */
html.dark-mode .collapsible-card .card-header:hover {
    background-color: #22262e !important;
}

html.dark-mode .collapsible-card.collapsed .card-header:hover {
    background-color: #2a2f38 !important;
}

html.dark-mode .card-header:hover {
    background-color: #22262e !important;
}

/* Question Progress Items */
html.dark-mode .question-progress-item {
    background: #22262e !important;
}

html.dark-mode .question-progress-item.has-unanswered:hover {
    background: #2a2f38 !important;
}

html.dark-mode .question-progress-name {
    color: #f3f4f6 !important;
}

html.dark-mode .question-progress-stats {
    color: #9ca3af !important;
}

html.dark-mode .question-progress-bar {
    background: #363c47 !important;
}

/* Questions Progress Card */
html.dark-mode .questions-progress-card {
    background: #1a1d23 !important;
    border-color: #363c47 !important;
}

html.dark-mode .questions-progress-card .card-header {
    background: #1a1d23 !important;
    border-bottom-color: #363c47 !important;
}

html.dark-mode .questions-progress-card .card-header:hover {
    background: #22262e !important;
}

/* Benchmark Bar Container */
html.dark-mode .benchmark-bar-container {
    background: #363c47 !important;
}

/* Unanswered Questions Grid */
html.dark-mode .category-unanswered-questions {
    background: #1a1d23 !important;
    border-color: #363c47 !important;
}

html.dark-mode .unanswered-question-link {
    background: #22262e !important;
    border-color: #363c47 !important;
    color: #4a9ed4 !important;
}

html.dark-mode .unanswered-question-link:hover {
    background: #4a9ed4 !important;
    color: #ffffff !important;
}

html.dark-mode .unanswered-card {
    background: #1a1d23 !important;
    border-color: #363c47 !important;
}

html.dark-mode .unanswered-content {
    border-top-color: #363c47 !important;
}

html.dark-mode .unanswered-badge {
    background: #d39e00 !important;
    color: #1a1d23 !important;
}

/* Road to Mock Exam - Dark Mode */
html.dark-mode .road-to-mock-card {
    background: #1a1d23 !important;
    border-color: #363c47 !important;
}

html.dark-mode .requirements-list {
    background: #1a1d23 !important;
}

html.dark-mode .requirement-section-title {
    color: #9ca3af !important;
}

html.dark-mode .requirement-item {
    background: #22262e !important;
    border-left-color: #4a5568 !important;
}

html.dark-mode .requirement-item.met {
    background: rgba(40, 167, 69, 0.15) !important;
    border-left-color: #28a745 !important;
}

html.dark-mode .requirement-title {
    color: #f3f4f6 !important;
}

html.dark-mode .requirement-value {
    color: #9ca3af !important;
}

html.dark-mode .requirement-item.met .requirement-value {
    color: #28a745 !important;
}

html.dark-mode .requirement-icon svg {
    stroke: #6b7280 !important;
}

html.dark-mode .requirement-item.met .requirement-icon svg {
    stroke: #28a745 !important;
}

html.dark-mode .requirement-progress,
html.dark-mode .requirement-progress-bar {
    background: #363c47 !important;
}

html.dark-mode .category-requirement-item {
    background: #22262e !important;
    border-left-color: #4a5568 !important;
}

html.dark-mode .category-requirement-item.met {
    background: rgba(40, 167, 69, 0.15) !important;
    border-left-color: #28a745 !important;
}

html.dark-mode .category-req-name {
    color: #f3f4f6 !important;
}

html.dark-mode .category-req-progress {
    color: #9ca3af !important;
}

html.dark-mode .category-requirement-item.met .category-req-progress {
    color: #28a745 !important;
}

html.dark-mode .category-req-bar {
    background: #363c47 !important;
}

html.dark-mode .category-requirements h4 {
    color: #9ca3af !important;
}

/* Auto dark mode */
@media (prefers-color-scheme: dark) {
    html.dark-mode-auto .dashboard-header-card {
        background: #1a1d23 !important;
        border-color: #363c47 !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    }

    html.dark-mode-auto .dashboard-header h1 {
        color: #4a9ed4 !important;
        border-bottom-color: #363c47 !important;
    }

    html.dark-mode-auto .dashboard-header p {
        color: #9ca3af !important;
    }

    html.dark-mode-auto .kpi-card {
        background: #1a1d23 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    }

    html.dark-mode-auto .kpi-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    }

    html.dark-mode-auto .kpi-value {
        color: #f3f4f6 !important;
    }

    html.dark-mode-auto .kpi-label {
        color: #9ca3af !important;
    }

    html.dark-mode-auto .kpi-subtitle {
        color: #6b7280 !important;
    }

    html.dark-mode-auto .dashboard-card {
        background: #1a1d23 !important;
        border-color: #363c47 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    }

    html.dark-mode-auto .dashboard-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    }

    html.dark-mode-auto .dashboard-card-header {
        color: #4a9ed4 !important;
        border-bottom-color: #363c47 !important;
    }

    html.dark-mode-auto .dashboard-card-body {
        color: #f3f4f6 !important;
    }

    html.dark-mode-auto .focus-area-item {
        background: #22262e !important;
        border-color: #363c47 !important;
    }

    html.dark-mode-auto .focus-area-item:hover {
        background: #2a2f38 !important;
    }

    html.dark-mode-auto .focus-area-name {
        color: #f3f4f6 !important;
    }

    html.dark-mode-auto .focus-area-stats {
        color: #9ca3af !important;
    }

    html.dark-mode-auto .progress-bar-bg {
        background: #363c47 !important;
    }

    html.dark-mode-auto .chart-container {
        color: #f3f4f6 !important;
    }

    html.dark-mode-auto .category-progress-card {
        background: #22262e !important;
        border-color: #363c47 !important;
    }

    html.dark-mode-auto .category-progress-card:hover {
        background: #2a2f38 !important;
    }

    html.dark-mode-auto .category-name {
        color: #f3f4f6 !important;
    }

    html.dark-mode-auto .category-stats {
        color: #9ca3af !important;
    }

    html.dark-mode-auto .comparison-card {
        background: #22262e !important;
        border-color: #363c47 !important;
    }

    html.dark-mode-auto .comparison-label {
        color: #9ca3af !important;
    }

    html.dark-mode-auto .comparison-value {
        color: #f3f4f6 !important;
    }

    html.dark-mode-auto .benchmark-item {
        background: #22262e !important;
        border-color: #363c47 !important;
    }

    html.dark-mode-auto .benchmark-category {
        color: #f3f4f6 !important;
    }

    html.dark-mode-auto .benchmark-score {
        color: #9ca3af !important;
    }

    html.dark-mode-auto .benchmark-bar-bg {
        background: #363c47 !important;
    }

    html.dark-mode-auto .mock-exam-card {
        background: #1a1d23 !important;
        border-color: #363c47 !important;
    }

    html.dark-mode-auto .mock-exam-info {
        color: #9ca3af !important;
    }

    html.dark-mode-auto .empty-state {
        color: #9ca3af !important;
    }

    html.dark-mode-auto .empty-state-icon {
        color: #4a5568 !important;
    }

    html.dark-mode-auto .section-header {
        color: #f3f4f6 !important;
    }

    html.dark-mode-auto .section-subtitle {
        color: #9ca3af !important;
    }

    html.dark-mode-auto .cards-section {
        background: transparent !important;
    }

    /* Card Header Hover */
    html.dark-mode-auto .collapsible-card .card-header:hover {
        background-color: #22262e !important;
    }

    html.dark-mode-auto .collapsible-card.collapsed .card-header:hover {
        background-color: #2a2f38 !important;
    }

    html.dark-mode-auto .card-header:hover {
        background-color: #22262e !important;
    }

    /* Question Progress Items */
    html.dark-mode-auto .question-progress-item {
        background: #22262e !important;
    }

    html.dark-mode-auto .question-progress-item.has-unanswered:hover {
        background: #2a2f38 !important;
    }

    html.dark-mode-auto .question-progress-name {
        color: #f3f4f6 !important;
    }

    html.dark-mode-auto .question-progress-stats {
        color: #9ca3af !important;
    }

    html.dark-mode-auto .question-progress-bar {
        background: #363c47 !important;
    }

    /* Questions Progress Card */
    html.dark-mode-auto .questions-progress-card {
        background: #1a1d23 !important;
        border-color: #363c47 !important;
    }

    html.dark-mode-auto .questions-progress-card .card-header {
        background: #1a1d23 !important;
        border-bottom-color: #363c47 !important;
    }

    html.dark-mode-auto .questions-progress-card .card-header:hover {
        background: #22262e !important;
    }

    /* Benchmark Bar Container */
    html.dark-mode-auto .benchmark-bar-container {
        background: #363c47 !important;
    }

    /* Unanswered Questions Grid */
    html.dark-mode-auto .category-unanswered-questions {
        background: #1a1d23 !important;
        border-color: #363c47 !important;
    }

    html.dark-mode-auto .unanswered-question-link {
        background: #22262e !important;
        border-color: #363c47 !important;
        color: #4a9ed4 !important;
    }

    html.dark-mode-auto .unanswered-question-link:hover {
        background: #4a9ed4 !important;
        color: #ffffff !important;
    }

    html.dark-mode-auto .unanswered-card {
        background: #1a1d23 !important;
        border-color: #363c47 !important;
    }

    html.dark-mode-auto .unanswered-content {
        border-top-color: #363c47 !important;
    }

    html.dark-mode-auto .unanswered-badge {
        background: #d39e00 !important;
        color: #1a1d23 !important;
    }

    /* Road to Mock Exam - Auto Dark Mode */
    html.dark-mode-auto .road-to-mock-card {
        background: #1a1d23 !important;
        border-color: #363c47 !important;
    }

    html.dark-mode-auto .requirements-list {
        background: #1a1d23 !important;
    }

    html.dark-mode-auto .requirement-section-title {
        color: #9ca3af !important;
    }

    html.dark-mode-auto .requirement-item {
        background: #22262e !important;
        border-left-color: #4a5568 !important;
    }

    html.dark-mode-auto .requirement-item.met {
        background: rgba(40, 167, 69, 0.15) !important;
        border-left-color: #28a745 !important;
    }

    html.dark-mode-auto .requirement-title {
        color: #f3f4f6 !important;
    }

    html.dark-mode-auto .requirement-value {
        color: #9ca3af !important;
    }

    html.dark-mode-auto .requirement-item.met .requirement-value {
        color: #28a745 !important;
    }

    html.dark-mode-auto .requirement-icon svg {
        stroke: #6b7280 !important;
    }

    html.dark-mode-auto .requirement-item.met .requirement-icon svg {
        stroke: #28a745 !important;
    }

    html.dark-mode-auto .requirement-progress,
    html.dark-mode-auto .requirement-progress-bar {
        background: #363c47 !important;
    }

    html.dark-mode-auto .category-requirement-item {
        background: #22262e !important;
        border-left-color: #4a5568 !important;
    }

    html.dark-mode-auto .category-requirement-item.met {
        background: rgba(40, 167, 69, 0.15) !important;
        border-left-color: #28a745 !important;
    }

    html.dark-mode-auto .category-req-name {
        color: #f3f4f6 !important;
    }

    html.dark-mode-auto .category-req-progress {
        color: #9ca3af !important;
    }

    html.dark-mode-auto .category-requirement-item.met .category-req-progress {
        color: #28a745 !important;
    }

    html.dark-mode-auto .category-req-bar {
        background: #363c47 !important;
    }

    html.dark-mode-auto .category-requirements h4 {
        color: #9ca3af !important;
    }

    html.dark-mode-auto .kpi-drag-hint {
        background: linear-gradient(135deg, #1e3a5f 0%, #1a2d47 100%) !important;
        border-color: #2d5a87 !important;
        color: #93c5fd !important;
    }

    html.dark-mode-auto .kpi-drag-hint svg {
        stroke: #60a5fa !important;
    }

    html.dark-mode-auto .kpi-drag-hint-dismiss {
        color: #60a5fa !important;
    }

    html.dark-mode-auto .kpi-drag-hint-dismiss:hover {
        color: #93c5fd !important;
    }
}

/* KPI Drag Hint - Manual Dark Mode */
html.dark-mode .kpi-drag-hint {
    background: linear-gradient(135deg, #1e3a5f 0%, #1a2d47 100%) !important;
    border-color: #2d5a87 !important;
    color: #93c5fd !important;
}

html.dark-mode .kpi-drag-hint svg {
    stroke: #60a5fa !important;
}

html.dark-mode .kpi-drag-hint-dismiss {
    color: #60a5fa !important;
}

html.dark-mode .kpi-drag-hint-dismiss:hover {
    color: #93c5fd !important;
}

/* ============================================
   MOBILE COLLAPSIBLE CARDS - DARK MODE
   ============================================ */

/* Card Collapse Indicator - Dark Mode */
html.dark-mode .card-collapse-indicator svg {
    stroke: rgba(255, 255, 255, 0.4) !important;
}

html.dark-mode .card-collapse-indicator:hover svg {
    stroke: rgba(255, 255, 255, 0.7) !important;
}

/* Mobile Card Headers - Dark Mode Override */
@media (max-width: 640px) {
    /* Focus Areas Card */
    html.dark-mode .focus-areas-card .card-header {
        background: #1a1d23 !important;
        border-bottom-color: rgba(231, 76, 60, 0.3) !important;
    }

    html.dark-mode .focus-areas-card .card-header:hover {
        background: rgba(231, 76, 60, 0.1) !important;
    }

    html.dark-mode .focus-areas-card.collapsed .card-header:hover {
        background: rgba(231, 76, 60, 0.15) !important;
    }

    /* Questions Progress Card */
    html.dark-mode .questions-progress-card .card-header {
        background: #1a1d23 !important;
        border-bottom-color: rgba(23, 162, 184, 0.3) !important;
    }

    html.dark-mode .questions-progress-card .card-header:hover {
        background: rgba(23, 162, 184, 0.1) !important;
    }

    html.dark-mode .questions-progress-card.collapsed .card-header:hover {
        background: rgba(23, 162, 184, 0.15) !important;
    }

    /* Road to Mock Card */
    html.dark-mode .road-to-mock-card .card-header {
        background: #1a1d23 !important;
        border-bottom-color: rgba(139, 92, 246, 0.3) !important;
    }

    html.dark-mode .road-to-mock-card .card-header:hover {
        background: rgba(139, 92, 246, 0.1) !important;
    }

    html.dark-mode .road-to-mock-card.collapsed .card-header:hover {
        background: rgba(139, 92, 246, 0.15) !important;
    }

    /* Questions Chart Card */
    html.dark-mode .questions-chart-card .card-header {
        background: #1a1d23 !important;
        border-bottom-color: rgba(45, 159, 82, 0.3) !important;
    }

    html.dark-mode .questions-chart-card .card-header:hover {
        background: rgba(45, 159, 82, 0.1) !important;
    }

    html.dark-mode .questions-chart-card.collapsed .card-header:hover {
        background: rgba(45, 159, 82, 0.15) !important;
    }

    /* Quizzes Chart Card */
    html.dark-mode .quizzes-chart-card .card-header {
        background: #1a1d23 !important;
        border-bottom-color: rgba(230, 126, 34, 0.3) !important;
    }

    html.dark-mode .quizzes-chart-card .card-header:hover {
        background: rgba(230, 126, 34, 0.1) !important;
    }

    html.dark-mode .quizzes-chart-card.collapsed .card-header:hover {
        background: rgba(230, 126, 34, 0.15) !important;
    }

    /* Comparison Card */
    html.dark-mode .comparison-card .card-header {
        background: #1a1d23 !important;
        border-bottom-color: rgba(99, 102, 241, 0.3) !important;
    }

    html.dark-mode .comparison-card .card-header:hover {
        background: rgba(99, 102, 241, 0.1) !important;
    }

    html.dark-mode .comparison-card.collapsed .card-header:hover {
        background: rgba(99, 102, 241, 0.15) !important;
    }

    html.dark-mode .comparison-card .card-subtitle {
        color: #9ca3af !important;
    }

    html.dark-mode .comparison-card .card-header h2 {
        color: #f3f4f6 !important;
    }

    html.dark-mode .comparison-card .card-header h2 svg {
        stroke: #6366f1 !important;
    }

    /* Benchmarks Card */
    html.dark-mode .benchmarks-card .card-header {
        background: #1a1d23 !important;
        border-bottom-color: rgba(16, 185, 129, 0.3) !important;
    }

    html.dark-mode .benchmarks-card .card-header:hover {
        background: rgba(16, 185, 129, 0.1) !important;
    }

    html.dark-mode .benchmarks-card.collapsed .card-header:hover {
        background: rgba(16, 185, 129, 0.15) !important;
    }

    html.dark-mode .benchmarks-card .card-subtitle {
        color: #9ca3af !important;
    }

    html.dark-mode .benchmarks-card .card-header h2 {
        color: #f3f4f6 !important;
    }

    html.dark-mode .benchmarks-card .card-header h2 svg {
        stroke: #10b981 !important;
    }
}

/* Auto Dark Mode - Mobile Card Headers */
@media (max-width: 640px) and (prefers-color-scheme: dark) {
    /* Focus Areas Card */
    html.dark-mode-auto .focus-areas-card .card-header {
        background: #1a1d23 !important;
        border-bottom-color: rgba(231, 76, 60, 0.3) !important;
    }

    html.dark-mode-auto .focus-areas-card .card-header:hover {
        background: rgba(231, 76, 60, 0.1) !important;
    }

    html.dark-mode-auto .focus-areas-card.collapsed .card-header:hover {
        background: rgba(231, 76, 60, 0.15) !important;
    }

    /* Questions Progress Card */
    html.dark-mode-auto .questions-progress-card .card-header {
        background: #1a1d23 !important;
        border-bottom-color: rgba(23, 162, 184, 0.3) !important;
    }

    html.dark-mode-auto .questions-progress-card .card-header:hover {
        background: rgba(23, 162, 184, 0.1) !important;
    }

    html.dark-mode-auto .questions-progress-card.collapsed .card-header:hover {
        background: rgba(23, 162, 184, 0.15) !important;
    }

    /* Road to Mock Card */
    html.dark-mode-auto .road-to-mock-card .card-header {
        background: #1a1d23 !important;
        border-bottom-color: rgba(139, 92, 246, 0.3) !important;
    }

    html.dark-mode-auto .road-to-mock-card .card-header:hover {
        background: rgba(139, 92, 246, 0.1) !important;
    }

    html.dark-mode-auto .road-to-mock-card.collapsed .card-header:hover {
        background: rgba(139, 92, 246, 0.15) !important;
    }

    /* Questions Chart Card */
    html.dark-mode-auto .questions-chart-card .card-header {
        background: #1a1d23 !important;
        border-bottom-color: rgba(45, 159, 82, 0.3) !important;
    }

    html.dark-mode-auto .questions-chart-card .card-header:hover {
        background: rgba(45, 159, 82, 0.1) !important;
    }

    html.dark-mode-auto .questions-chart-card.collapsed .card-header:hover {
        background: rgba(45, 159, 82, 0.15) !important;
    }

    /* Quizzes Chart Card */
    html.dark-mode-auto .quizzes-chart-card .card-header {
        background: #1a1d23 !important;
        border-bottom-color: rgba(230, 126, 34, 0.3) !important;
    }

    html.dark-mode-auto .quizzes-chart-card .card-header:hover {
        background: rgba(230, 126, 34, 0.1) !important;
    }

    html.dark-mode-auto .quizzes-chart-card.collapsed .card-header:hover {
        background: rgba(230, 126, 34, 0.15) !important;
    }

    /* Comparison Card */
    html.dark-mode-auto .comparison-card .card-header {
        background: #1a1d23 !important;
        border-bottom-color: rgba(99, 102, 241, 0.3) !important;
    }

    html.dark-mode-auto .comparison-card .card-header:hover {
        background: rgba(99, 102, 241, 0.1) !important;
    }

    html.dark-mode-auto .comparison-card.collapsed .card-header:hover {
        background: rgba(99, 102, 241, 0.15) !important;
    }

    html.dark-mode-auto .comparison-card .card-subtitle {
        color: #9ca3af !important;
    }

    html.dark-mode-auto .comparison-card .card-header h2 {
        color: #f3f4f6 !important;
    }

    html.dark-mode-auto .comparison-card .card-header h2 svg {
        stroke: #6366f1 !important;
    }

    /* Benchmarks Card */
    html.dark-mode-auto .benchmarks-card .card-header {
        background: #1a1d23 !important;
        border-bottom-color: rgba(16, 185, 129, 0.3) !important;
    }

    html.dark-mode-auto .benchmarks-card .card-header:hover {
        background: rgba(16, 185, 129, 0.1) !important;
    }

    html.dark-mode-auto .benchmarks-card.collapsed .card-header:hover {
        background: rgba(16, 185, 129, 0.15) !important;
    }

    html.dark-mode-auto .benchmarks-card .card-subtitle {
        color: #9ca3af !important;
    }

    html.dark-mode-auto .benchmarks-card .card-header h2 {
        color: #f3f4f6 !important;
    }

    html.dark-mode-auto .benchmarks-card .card-header h2 svg {
        stroke: #10b981 !important;
    }

    /* Card Collapse Indicator */
    html.dark-mode-auto .card-collapse-indicator svg {
        stroke: rgba(255, 255, 255, 0.4) !important;
    }

    html.dark-mode-auto .card-collapse-indicator:hover svg {
        stroke: rgba(255, 255, 255, 0.7) !important;
    }
}

/* =============================================================================
   Demo Upgrade Card
   ============================================================================= */

.demo-upgrade-card {
    background: #368BC1;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(54, 139, 193, 0.25);
    position: relative;
    overflow: hidden;
}

.demo-upgrade-content {
    display: flex;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.demo-upgrade-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-upgrade-icon svg {
    width: 32px;
    height: 32px;
    stroke: white;
}

.demo-upgrade-text {
    flex: 1;
}

.demo-upgrade-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.demo-upgrade-text p {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.demo-upgrade-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.demo-upgrade-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
}

.demo-upgrade-features li svg {
    width: 16px;
    height: 16px;
    stroke: #4ade80;
    flex-shrink: 0;
}

.demo-upgrade-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.demo-upgrade-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: white;
    color: #368BC1;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.demo-upgrade-btn span {
    color: #368BC1;
}

.demo-upgrade-btn svg {
    width: 20px;
    height: 20px;
    stroke: #368BC1;
    transition: transform 0.2s ease;
}

.demo-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: #2a7ab0;
}

.demo-upgrade-btn:hover span {
    color: #2a7ab0;
}

.demo-upgrade-btn:hover svg {
    transform: translateX(4px);
    stroke: #2a7ab0;
}

.demo-upgrade-note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.demo-upgrade-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.demo-upgrade-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.demo-upgrade-stat svg {
    width: 16px;
    height: 16px;
    stroke: #4ade80;
}

/* Responsive: Tablet */
@media (max-width: 992px) {
    .demo-upgrade-content {
        flex-wrap: wrap;
    }
    
    .demo-upgrade-action {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        margin-top: 0.5rem;
    }
}

/* Responsive: Mobile */
@media (max-width: 640px) {
    .demo-upgrade-card {
        padding: 1.5rem;
    }
    
    .demo-upgrade-content {
        flex-direction: column;
        text-align: center;
    }
    
    .demo-upgrade-features {
        justify-content: center;
    }
    
    .demo-upgrade-action {
        flex-direction: column;
    }
    
    .demo-upgrade-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Dark Mode */
html.dark-mode .demo-upgrade-card {
    background: #2a6a94;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

html.dark-mode .demo-upgrade-card .demo-upgrade-btn {
    background: white !important;
    color: #1a5276 !important;
}

html.dark-mode .demo-upgrade-card .demo-upgrade-btn span {
    color: #1a5276 !important;
}

html.dark-mode .demo-upgrade-card .demo-upgrade-btn svg {
    stroke: #1a5276 !important;
}

html.dark-mode .demo-upgrade-card .demo-upgrade-btn:hover {
    background: #f0f4f8 !important;
    color: #154360 !important;
}

html.dark-mode .demo-upgrade-card .demo-upgrade-btn:hover span {
    color: #154360 !important;
}

html.dark-mode .demo-upgrade-card .demo-upgrade-btn:hover svg {
    stroke: #154360 !important;
}

@media (prefers-color-scheme: dark) {
    html.dark-mode-auto .demo-upgrade-card {
        background: #2a6a94;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    }

    html.dark-mode-auto .demo-upgrade-card .demo-upgrade-btn {
        background: white !important;
        color: #1a5276 !important;
    }

    html.dark-mode-auto .demo-upgrade-card .demo-upgrade-btn span {
        color: #1a5276 !important;
    }

    html.dark-mode-auto .demo-upgrade-card .demo-upgrade-btn svg {
        stroke: #1a5276 !important;
    }

    html.dark-mode-auto .demo-upgrade-card .demo-upgrade-btn:hover {
        background: #f0f4f8 !important;
        color: #154360 !important;
    }

    html.dark-mode-auto .demo-upgrade-card .demo-upgrade-btn:hover span {
        color: #154360 !important;
    }

    html.dark-mode-auto .demo-upgrade-card .demo-upgrade-btn:hover svg {
        stroke: #154360 !important;
    }
}
