/**
 * ALMS Dashboard Styles - v3.1.17 CRITICAL FIX
 * Synchronized with Moodle Dashboard v1.0.9
 * 
 * v3.1.17: FIXED practice questions to count only PASSED (not attempted)
 *          Reduced gap in course card header between percentage and name
 */

/* ========================================
   FULL-PAGE DASHBOARD LAYOUT
   ======================================== */

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: #f5f7fa;
}

.sidebar {
    width: 280px;
    background: white;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
    border: none !important; /* v3.1.27 - Remove theme borders */
}

/* Standalone sidebar widget (when used via shortcode) */
.alms-sidebar-widget {
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.alms-sidebar-widget * {
    border: none !important;
    box-shadow: none !important;
}

.alms-sidebar-widget .sidebar-header,
.alms-sidebar-widget .menu-section,
.alms-sidebar-widget .menu-item {
    border: none !important;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-logo {
    font-size: 24px;
    font-weight: 700;
    color: #1848a0;
    margin-bottom: 8px;
}

.sidebar-user {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.membership-badge-sidebar {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
    color: #333;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-section {
    margin-bottom: 24px;
}

.menu-section-title {
    padding: 0 20px;
    font-size: 10px;
    text-transform: uppercase;
    color: #999;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: #f8f9fa;
    color: #1848a0;
    border-left-color: #1848a0;
}

.menu-item.active {
    background: #e7f5ff;
    color: #1848a0;
    border-left-color: #1848a0;
    font-weight: 600;
}

.menu-item.warning:hover {
    background: #fffbf0;
    color: #ffc107;
    border-left-color: #ffc107;
}

.menu-item.danger:hover {
    background: #fff5f5;
    color: #dc3545;
    border-left-color: #dc3545;
}

.menu-icon {
    font-size: 18px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.menu-text {
    flex: 1;
    font-size: 14px;
}

.menu-badge {
    background: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
}

.main-content {
    flex: 1;
    padding: 32px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, #1848a0 0%, #2e5cb8 100%);
    padding: 28px 32px;
    border-radius: 16px;
    color: white;
    margin-bottom: 32px;
    box-shadow: 0 4px 16px rgba(24, 72, 160, 0.15);
}

.header-title {
    font-size: 32px;
    margin: 0 0 8px 0;
    font-weight: 600;
    color: white;
}

.header-subtitle {
    opacity: 0.9;
    font-size: 16px;
    margin: 0;
}

/* Summary Cards Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.summary-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.summary-card.practice::before {
    background: linear-gradient(180deg, #28a745, #20c997);
}

.summary-card.mock::before {
    background: linear-gradient(180deg, #ffc107, #ffb300);
}

.summary-card.score::before {
    background: linear-gradient(180deg, #1848a0, #2e5cb8);
}

.summary-card.daily::before {
    background: linear-gradient(180deg, #17a2b8, #138496);
}

/* Legacy time card kept for backwards compatibility */
.summary-card.time::before {
    background: linear-gradient(180deg, #dc3545, #e74c3c);
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.card-title {
    color: #999;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    font-weight: 600;
}

.card-value {
    font-size: 32px;
    font-weight: 700;
    color: #1848a0;
    margin-bottom: 8px;
    line-height: 1;
}

.card-subtitle {
    color: #666;
    font-size: 13px;
    margin: 0;
}

/* Progress Bar (v3.1.11 - Matching Moodle v1.0.9) */
.card-progress-bar {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin: 12px 0 8px 0;
}

.card-progress-fill {
    height: 100%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.card-progress-practice {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.card-progress-mock {
    background: linear-gradient(90deg, #ffc107, #ffb300);
}

/* Review Alert Link (v3.1.11 - Matching Moodle v1.0.9) */
.card-alert {
    display: inline-block;
    margin-top: 10px;
    color: #dc3545;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.card-alert:hover {
    color: #c82333;
    text-decoration: none;
}

/* Remove sidebar logo, update header */
.sidebar-logo {
    display: none;
}

.sidebar-user {
    font-size: 16px;
    font-weight: 600;
    color: #1848a0;
    margin-bottom: 8px;
}

.membership-badge-sidebar {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 11px;
    color: #333;
    letter-spacing: 0.3px;
}

/* Menu divider (v3.1.11 - Matching Moodle) */
.menu-divider {
    height: 1px;
    background: #e9ecef;
    margin: 8px 20px;
}

/* Locked menu item (v3.1.11 - Matching Moodle) */
.menu-item-locked {
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none;
}

.lock-icon {
    margin-left: 4px;
    font-size: 10px;
}

/* Inline upgrade button (v3.1.11 - Matching Moodle) */
.menu-upgrade-inline {
    display: block;
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: white !important;
    text-align: center;
    padding: 8px 12px;
    margin: 4px 20px 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s;
}

.menu-upgrade-inline:hover {
    background: linear-gradient(135deg, #ffb300 0%, #ffa000 100%);
    transform: translateY(-2px);
    text-decoration: none;
    color: white !important;
}

/* Remove menu-section-title "Overview" styling - make it invisible */
.menu-section > .menu-section-title:first-child {
    display: none;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.section-subtitle {
    color: #999;
    font-size: 14px;
}

/* Course Grid */
.course-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s;
    border: 2px solid transparent;
    position: relative;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: #1848a0;
}

.alms-course-card-compact.locked {
    opacity: 0.7;
}

.alms-course-card-compact.locked .alms-course-body-compact {
    filter: blur(3px);
    pointer-events: none;
}

.course-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 10;
}

.course-card-overlay .padlock-icon {
    font-size: 64px;
    margin-bottom: 16px;
    color: #666;
}

.course-card-overlay .padlock-icon svg {
    display: block;
    margin: 0 auto;
    stroke: #666;
}

.course-card-overlay .unlock-message {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.course-card-overlay .unlock-btn {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.course-card-overlay .unlock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.4);
}

/* v3.3.27: Paused overlay */
.course-card-overlay--paused {
    background: rgba(255, 255, 255, 0.92);
}

.course-card-overlay--paused .padlock-icon {
    font-size: 48px;
    margin-bottom: 10px;
    color: #1848a0;
}

.course-card-overlay--paused .unlock-message {
    font-size: 16px;
    font-weight: 700;
    color: #1848a0;
    margin-bottom: 6px;
}

.pause-resume-date {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.course-header {
    background: linear-gradient(135deg, #1848a0 0%, #2e5cb8 100%);
    padding: 20px 24px;
    color: white;
    display: flex;
    justify-content: flex-start; /* v3.1.23 - Align left instead of space-between */
    align-items: center;
    gap: 12px; /* v3.1.23 - Small gap between percentage and name */
}

.course-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.course-id {
    font-size: 11px;
    opacity: 0.85;
}

.course-progress-circle {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    border: 3px solid white;
    flex-shrink: 0;
}

.course-body {
    padding: 20px 24px;
}

.special-badge {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 16px;
}

.course-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.stat-box {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

/* NEW COMPACT LAYOUT */

/* Section Title - 17px, centered, bold */
.section-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Passed Line - 15px, centered, green */
.passed-line {
    font-size: 15px;
    text-align: center;
    margin-bottom: 12px;
    color: #28a745;
    font-weight: 600;
}

.passed-line .stat-number {
    font-weight: 700;
    font-size: 20px;
    display: block;
    margin-bottom: 4px;
}

/* Two-column layout for Attempted | Failed */
.two-column-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.stat-item {
    text-align: center;
    font-size: 14px;
}

.stat-item .stat-number {
    font-weight: 700;
    font-size: 20px;
    display: block;
    margin-bottom: 4px;
}

.stat-item .stat-label {
    font-size: 13px;
}

.stat-attempted {
    color: #666;
}

.stat-failed {
    color: #dc3545;
}

/* Progress Bar */
.progress-bar-container {
    margin-top: 12px;
    background: #e9ecef;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #28a745;
    transition: width 0.3s ease;
}

/* OLD CSS - Keep for backwards compatibility */
.stat-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value-large {
    font-size: 24px;
    font-weight: 700;
    color: #1848a0;
    margin-bottom: 4px;
    line-height: 1.4;
}

.course-count-blue {
    color: #1848a0;
    font-weight: 700;
    font-size: 24px;
    display: block;
}

.course-label-blue {
    color: #1848a0;
    font-size: 14px;
    font-weight: 500;
    display: block;
    margin-top: 4px;
}

.course-progress-text {
    font-size: 13px;
    margin-top: 6px;
    line-height: 1.3;
    display: block;
}

.course-progress-text.course-progress-orange {
    color: #ff6b35;
}

.course-progress-text.course-progress-green {
    color: #28a745;
}

.course-pct-value {
    font-weight: 700;
}

.course-pct-label {
    font-weight: 400;
}

.stat-percentage {
    font-size: 13px;
    color: #666;
}

/* Updated Course Meta - Better spacing, spread full width */
.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

.course-meta span {
    flex: 1;
    text-align: center;
    padding: 0 10px;
}

.course-meta span:first-child {
    text-align: left;
}

.course-meta span:last-child {
    text-align: right;
}

.course-link {
    display: block;
    background: #1848a0;
    color: white !important;
    text-align: center;
    padding: 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
}

.course-link:hover {
    background: #123570;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 72, 160, 0.3);
}

.course-link-icon {
    margin-right: 8px;
}

/* Dashboard Actions */
.dashboard-actions {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dashboard-actions .btn.btn-primary,
#alms-refresh-btn.btn-primary {
    background: #1848a0 !important;
    color: white !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-transform: none !important; /* v3.1.24 - Prevent uppercase override */
    border: none !important;
    padding: 14px 28px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

.btn-primary:hover {
    background: #123570;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 72, 160, 0.3);
}

/* Responsive Design for Full Dashboard */
@media (max-width: 1200px) {
    .course-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
    }
    
    .main-content {
        padding: 20px 16px;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        padding: 20px 24px;
    }
    
    .header-title {
        font-size: 24px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ========================================
   SIDEBAR WIDGET STYLES
   ======================================== */

.alms-sidebar-widget {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.alms-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
}

.alms-sidebar-logo {
    font-size: 20px;
    font-weight: 700;
    color: #1848a0;
    margin-bottom: 6px;
}

.alms-sidebar-user {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.alms-membership-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 11px;
    color: #333;
    letter-spacing: 0.5px;
}

.alms-sidebar-nav {
    padding: 16px 0;
    max-height: 600px;
    overflow-y: auto;
}

.alms-menu-section {
    margin-bottom: 20px;
}

.alms-menu-section-title {
    padding: 0 16px;
    font-size: 10px;
    text-transform: uppercase;
    color: #999;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.alms-menu-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.alms-menu-item:hover {
    background: #f8f9fa;
    color: #1848a0;
    border-left-color: #1848a0;
}

.alms-menu-item.active {
    background: #e7f5ff;
    color: #1848a0;
    border-left-color: #1848a0;
    font-weight: 600;
}

.alms-menu-item.alms-menu-cancel:hover {
    background: #fff5f5;
    color: #dc3545;
    border-left-color: #dc3545;
}

.alms-menu-item.alms-menu-upgrade:hover {
    background: #fffbf0;
    color: #ffc107;
    border-left-color: #ffc107;
}

.alms-menu-icon {
    font-size: 16px;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.alms-menu-text {
    flex: 1;
    font-size: 13px;
}

.alms-menu-badge {
    background: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
}

/* ========================================
   MAIN DASHBOARD COMPACT STYLES
   ======================================== */

.alms-main-dashboard {
    max-width: 100%;
}

/* Header - Compact */
.alms-dashboard-header-compact {
    background: linear-gradient(135deg, #1848a0 0%, #2e5cb8 100%);
    padding: 20px 24px;
    border-radius: 12px;
    color: white;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(24, 72, 160, 0.15);
}

.alms-header-title-compact {
    font-size: 24px;
    margin: 0 0 6px 0;
    font-weight: 600;
    color: white; /* v3.1.9: Match Moodle white text */
}

.alms-header-subtitle-compact {
    opacity: 0.9;
    font-size: 14px;
    margin: 0;
    color: white; /* v3.1.9: Ensure subtitle is also white */
}

/* Summary Cards - Compact with Progress Bars */
.alms-summary-grid-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.alms-summary-card-compact {
    background: white;
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    border-left: 3px solid #1848a0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.alms-summary-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.alms-summary-card-compact.alms-card-practice { border-left-color: #28a745; }
.alms-summary-card-compact.alms-card-mock { border-left-color: #ffc107; }
.alms-summary-card-compact.alms-card-score { border-left-color: #1848a0; }
.alms-summary-card-compact.alms-card-time { border-left-color: #dc3545; }

.alms-card-icon-compact {
    font-size: 28px;
    margin-bottom: 8px;
}

.alms-card-title-compact {
    color: #999;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.alms-card-value-compact {
    font-size: 24px;
    font-weight: 700;
    color: #1848a0;
    margin-bottom: 8px;
    line-height: 1;
}

.alms-progress-bar-compact {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin: 8px 0;
}

.alms-progress-fill-compact {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s ease;
}

.alms-progress-fill-compact.alms-progress-practice {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.alms-progress-fill-compact.alms-progress-mock {
    background: linear-gradient(90deg, #ffc107, #ffb300);
}

.alms-card-subtitle-compact {
    color: #666;
    font-size: 12px;
    margin: 0;
}

/* v3.1.10 BETA: Review link for failed quizzes */
.alms-card-review-link {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: #ff6b35;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.alms-card-review-link:hover {
    color: #dc3545;
    text-decoration: underline;
}

/* v3.1.9: Target goal line for Daily Average card */
.alms-card-target-compact {
    color: #999;
    font-size: 11px;
    margin: 4px 0;
    font-weight: 500;
}

/* Section Header - Compact */
.alms-section-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.alms-section-title-compact {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.alms-section-subtitle-compact {
    color: #999;
    font-size: 13px;
}

/* Course Cards - Compact Horizontal Layout */
.alms-course-list-compact {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.alms-course-card-compact {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.alms-course-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-color: #1848a0;
}

.alms-course-header-compact {
    background: linear-gradient(135deg, #1848a0 0%, #2e5cb8 100%);
    padding: 16px 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alms-course-info-compact {
    flex: 1;
    padding-right: 16px;
}

.alms-course-name-compact {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.alms-course-id-compact {
    font-size: 11px;
    opacity: 0.85;
}

.alms-course-progress-circle-compact {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    border: 2px solid white;
    flex-shrink: 0;
}

.alms-course-body-compact {
    padding: 16px 20px;
}

.alms-special-badge-compact {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 12px;
}

.alms-special-badge-compact.alms-badge-gold {
    background: #d4edda;
    color: #155724;
}

.alms-course-stats-row-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 12px;
}

.alms-course-stats-row-compact.alms-single-stat {
    grid-template-columns: 1fr;
}

.alms-stat-item-compact {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.alms-stat-label-compact {
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alms-stat-value-compact {
    font-size: 18px;
    font-weight: 700;
    color: #1848a0;
    margin-bottom: 2px;
}

.alms-stat-percent-compact {
    font-size: 11px;
    color: #666;
}

.alms-course-meta-compact {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
}

.alms-course-link-compact {
    display: block;
    background: #1848a0;
    color: white !important;
    text-align: center;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.alms-course-link-compact:hover {
    background: #123570;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(24, 72, 160, 0.3);
}

.alms-course-link-icon {
    margin-right: 6px;
}

/* Actions */
.alms-dashboard-actions-compact {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.alms-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.alms-btn-primary {
    background: #1848a0;
    color: white;
}

.alms-btn-primary:hover {
    background: #123570;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(24, 72, 160, 0.3);
}

/* Error Message */
.alms-error {
    background: #fff5f5;
    border-left: 4px solid #dc3545;
    padding: 12px;
    border-radius: 6px;
    color: #dc3545;
    margin: 16px 0;
    font-size: 14px;
}

.alms-no-courses {
    text-align: center;
    padding: 32px;
    color: #999;
    font-size: 14px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .alms-summary-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .alms-summary-grid-compact {
        grid-template-columns: 1fr;
    }
    
    .alms-dashboard-header-compact {
        padding: 16px;
    }
    
    .alms-header-title-compact {
        font-size: 20px;
    }
    
    .alms-course-header-compact {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .alms-course-progress-circle-compact {
        margin-top: 12px;
    }
    
    .alms-course-stats-row-compact {
        grid-template-columns: 1fr;
    }
    
    .alms-course-meta-compact {
        flex-direction: column;
        gap: 6px;
    }
}

/* ========================================
   v3.3.3 COMPACT SIDEBAR MENU
   ======================================== */

.sidebar-compact {
    padding: 8px 0;
}

.menu-item-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #444;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.menu-item-compact:hover {
    background: #f0f4ff;
    color: #1848a0;
}

.menu-item-compact.active {
    background: #e8eeff;
    color: #1848a0;
    font-weight: 700;
    border-left: 3px solid #1848a0;
}

.menu-icon-sm {
    font-size: 14px;
    width: 18px;
    flex-shrink: 0;
}

.menu-locked-compact {
    color: #aaa;
    font-size: 13px;
    padding: 7px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-upgrade-compact {
    display: block;
    margin: 2px 16px 6px 42px;
    font-size: 11px;
    color: #fff;
    background: linear-gradient(135deg, #ffd700, #ffb300);
    padding: 3px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
}

.warning-compact {
    color: #e65100 !important;
}

.danger-compact {
    color: #b71c1c !important;
}

.menu-divider-compact {
    height: 1px;
    background: #eee;
    margin: 6px 16px;
}

/* course-stats-stack removed — using course-stats-grid */

/* ========================================
   v3.3.3 EMPTY STATE
   ======================================== */

.alms-empty-state {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border-radius: 12px;
    border: 2px dashed #d0d7e8;
    margin: 20px 0;
}

.empty-state-icon {
    font-size: 3.5em;
    margin-bottom: 12px;
}

.empty-state-title {
    font-size: 1.2em;
    color: #1848a0;
    margin: 0 0 8px;
}

.empty-state-text {
    color: #666;
    font-size: 0.95em;
    max-width: 360px;
    margin: 0 auto;
}

/* ========================================
   v3.3.3 LOADING SKELETON
   ======================================== */

@keyframes alms-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}

.alms-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 600px 100%;
    animation: alms-shimmer 1.4s infinite;
    border-radius: 8px;
}

.alms-skeleton-card {
    height: 220px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.alms-skeleton-line {
    height: 14px;
    margin: 8px 0;
    border-radius: 4px;
}

.alms-skeleton-line.short { width: 40%; }
.alms-skeleton-line.med   { width: 65%; }
.alms-skeleton-line.full  { width: 100%; }

/* ========================================
   v3.3.3 ERROR PAGE
   ======================================== */

.alms-error-page {
    padding: 20px;
}

/* ========================================
   v3.3.3 DOWNLOAD RESOURCES — ASPIRE BLUE BUTTON
   ======================================== */

.resource-card {
    border-left: 3px solid #1848a0 !important;
}

.resource-card:hover {
    border-color: #1848a0 !important;
    background: #f0f4ff !important;
}

/* ========================================
   v3.3.3 MOBILE: STACK PRACTICE + MOCK
   ======================================== */

@media (max-width: 768px) {
    .course-stats-grid {
        grid-template-columns: 1fr !important;
    }
}


/* ========================================
   [alms_enrol_btn] shortcode button
   ======================================== */

.alms-enrol-btn {
    display: inline-block;
    background: #1848a0;
    color: #fff !important;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    text-align: center;
}

.alms-enrol-btn:hover {
    background: #123570;
    transform: translateY(-2px);
    color: #fff !important;
    text-decoration: none;
}

.alms-enrol-btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

/* ========================================
   [alms_enrol_btn] full-width button
   ======================================== */
.alms-btn-full {
    display: block;
    width: 100%;
}

.alms-btn-full .btn,
.alms-btn-full button.btn {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}
