﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700;800&display=swap');

:root {
    /* Brand Colors */
    --aipcm-brand-green: #1eada6;
    --aipcm-brand-teal: #1eada6;
    --aipcm-brand-teal-dark: #157a73;
    --aipcm-brand-orange: #f59e0b;

    /* UI Text Colors */
    --aipcm-text-primary: #213a58;
    /* Navy Dark */
    --aipcm-text-dark: #1f2937;
    --aipcm-text-gray: #6b7280;
    --aipcm-text-light: #94a3b8;

    /* Backgrounds */
    --aipcm-page-bg: #f3f7fa;
    --aipcm-header-bg: rgba(255, 255, 255, 0.95);
    --aipcm-sidebar-bg: #f3f7fa;
    --aipcm-card-bg: #ffffff;

    /* Spacing & Borders */
    --aipcm-header-height: 100px;
    --aipcm-card-radius: 24px;
    --aipcm-input-radius: 12px;

    /* Fonts */
    --aipcm-font-heading: 'Outfit', 'Inter', sans-serif;
    --aipcm-font-body: 'Inter', sans-serif;
}

/* Estilos Públicos del LMS */

/* Courses Grid Catalog */
.aipcm-courses-grid {
    display: grid;
    gap: 30px;
}

.aipcm-course-card {
    background: var(--aipcm-card-bg, #fff);
    border-radius: var(--aipcm-card-radius, 16px);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.aipcm-course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.aipcm-course-thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.aipcm-course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.aipcm-course-card:hover .aipcm-course-thumbnail img {
    transform: scale(1.1);
}

/* Badges */
.aipcm-card-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.aipcm-badge-level {
    background: var(--aipcm-brand-green);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.aipcm-badge-level.avanzado {
    background: #ef4444;
}

.aipcm-badge-level.intermedio {
    background: #f59e0b;
}

.aipcm-badge-level.principiante {
    background: #10b981;
}

.aipcm-badge-masterclass {
    background: linear-gradient(45deg, #f06, #ff0080);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(255, 0, 128, 0.3);
}

/* Content */
.aipcm-course-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.aipcm-card-title {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    font-family: var(--aipcm-font-heading);
    line-height: 1.3;
}

.aipcm-card-title a {
    color: var(--aipcm-text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.aipcm-card-title a:hover {
    color: var(--aipcm-brand-green);
}

/* Catalog Buttons Improvements */
.aipcm-course-card .aipcm-btn {
    border-radius: 50px;
    padding: 10px 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.aipcm-course-card .aipcm-btn-outline {
    border: 2px solid #e2e8f0;
    color: #4a5568;
}

.aipcm-course-card .aipcm-btn-outline:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.aipcm-course-card .continue-btn {
    background: var(--aipcm-brand-green) !important;
    color: white !important;
    border: none;
    box-shadow: 0 4px 12px rgba(30, 173, 166, 0.2);
}

.aipcm-course-card .continue-btn:hover {
    background: var(--aipcm-brand-teal-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(30, 173, 166, 0.3);
}

.aipcm-course-card .aipcm-enrolled-tag {
    background: #f0fff4;
    color: #2f855a;
    border: 1px solid #c6f6d5;
    padding: 6px 12px;
    border-radius: 50px;
}

/* Rating Styles */
.aipcm-rating-shortcode-display {
    display: flex;
    flex-direction: column;
    margin: 10px 0;
}

.aipcm-rating-shortcode-display .stars-row {
    display: flex;
    align-items: center;
}

.aipcm-rating-shortcode-display .stars-row .dashicons {
    margin-right: 2px;
}

.aipcm-course-meta-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--aipcm-text-gray);
}

.aipcm-course-meta-row span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.aipcm-card-progress {
    margin: 10px 0 15px;
}

.aipcm-card-progress .aipcm-progress-bar {
    height: 8px;
    background: #edf2f7;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.aipcm-card-progress .aipcm-progress-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, #1eada6, #4fd1c5);
}

.aipcm-card-progress .progress-text {
    font-size: 11px;
    font-weight: 700;
    color: #718096;
}

.aipcm-enrolled-tag {
    background: #e6fffa;
    color: #234e52;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid #b2f5ea;
}

.continue-btn {
    background: #1eada6 !important;
    color: white !important;
}

/* Header Progress */
.aipcm-header-progress {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0 30px;
    border: 1px solid #edf2f7;
}

.aipcm-header-progress .progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.aipcm-header-progress .progress-label {
    font-weight: 800;
    color: #2d3748;
}

.aipcm-header-progress .progress-percent {
    color: #1eada6;
    font-weight: 800;
}

.aipcm-header-progress .aipcm-progress-bar {
    height: 12px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.aipcm-header-progress .aipcm-progress-bar .fill {
    height: 100%;
    background: #1eada6;
}

.aipcm-nav-locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.aipcm-nav-locked:hover {
    background: #f0f0f0 !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.aipcm-card-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aipcm-card-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--aipcm-text-primary);
}

.aipcm-plan-tag {
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.aipcm-btn-view {
    color: var(--aipcm-brand-green);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.aipcm-btn-view:hover {
    gap: 8px;
}

/* Progress Bar */
.aipcm-progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
}

.aipcm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #50a7e1);
    transition: width 0.5s ease;
}

/* Course Header */
.aipcm-course-header {
    padding: 40px 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

.aipcm-course-meta-header {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.aipcm-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

/* Curriculum */
.aipcm-course-curriculum {
    margin: 30px 0;
}

.aipcm-curriculum-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.aipcm-lesson-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    gap: 15px;
}

.aipcm-lesson-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2271b1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.aipcm-lesson-info {
    flex: 1;
}

.aipcm-lesson-info h4 {
    margin: 0 0 5px 0;
}

.aipcm-lesson-completed .aipcm-lesson-number {
    background: #4caf50;
}

/* Sidebar */
.aipcm-course-sidebar {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.aipcm-sidebar-section {
    margin-bottom: 20px;
}

/* Access Denied */
.aipcm-access-denied {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.aipcm-lock-icon {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

/* Subscription Plans */
.aipcm-subscription-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.aipcm-plan-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
}

.aipcm-plan-card:hover {
    border-color: #2271b1;
    transform: translateY(-5px);
}

.aipcm-plan-price {
    font-size: 2em;
    font-weight: bold;
    color: #2271b1;
    margin: 20px 0;
}

.aipcm-plan-features ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.aipcm-plan-features li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

/* Dashboard */
.aipcm-user-dashboard {
    padding: 20px 0;
}

.aipcm-dashboard-header {
    margin-bottom: 30px;
}

.aipcm-dashboard-subtitle {
    color: #666;
    font-size: 1.1em;
    margin-top: 5px;
}

.aipcm-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.aipcm-stat-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s;
}

.aipcm-stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    font-size: 32px;
    background: #f0f7ff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-data h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.aipcm-stat-number {
    font-size: 28px;
    font-weight: 800;
    color: #2271b1;
}

/* Dashboard Tabs */
.aipcm-dashboard-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.aipcm-tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    white-space: nowrap;
}

.aipcm-tab-btn:hover {
    color: #2271b1;
}

.aipcm-tab-btn.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
}

/* Dashboard Tabs - Academia Ivan Pirucho */
#aipcm-dashboard .aipcm-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    background: transparent;
    padding: 6px;
    border-radius: 12px;
    overflow-x: auto;
}

#aipcm-dashboard .aipcm-tabs .aipcm-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: #2ecc71;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex: 1;
}

#aipcm-dashboard .aipcm-tabs .aipcm-tab:hover {
    background: white;
    color: #2ecc71;
}

#aipcm-dashboard .aipcm-tabs .aipcm-tab:hover .aipcm-tab-icon {
    color: #2ecc71;
}

#aipcm-dashboard .aipcm-tabs .aipcm-tab.active {
    background: #18949C;
    color: white;
}

#aipcm-dashboard .aipcm-tabs .aipcm-tab .aipcm-tab-icon,
#aipcm-dashboard .aipcm-tabs .aipcm-tab.active .aipcm-tab-icon {
    color: white;
}

#aipcm-dashboard .aipcm-tab-icon {
    font-size: 14px;
    color: white;
}

.aipcm-tab-content {
    display: none;
    animation: fadeIn 0.5s;
}

.aipcm-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Continue Learning Card */
.aipcm-continue-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.aipcm-continue-card h4 {
    margin: 0;
    font-size: 1.2em;
}

/* User Courses List */
.aipcm-user-courses {
    display: grid;
    gap: 20px;
}

.aipcm-user-course-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.aipcm-user-course-item .aipcm-course-thumbnail {
    width: 100px;
    flex-shrink: 0;
}

.aipcm-user-course-item .aipcm-course-thumbnail img {
    border-radius: 4px;
}

.aipcm-user-course-item .aipcm-course-info {
    flex-grow: 1;
}

.aipcm-user-course-item h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.aipcm-user-course-item h4 a {
    color: #333;
    text-decoration: none;
}

/* Live Classes */
.aipcm-upcoming-classes {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.aipcm-live-class-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .aipcm-courses-grid {
        grid-template-columns: 1fr;
    }

    .aipcm-course-meta-header {
        flex-direction: column;
        gap: 10px;
    }

    .aipcm-user-course-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .aipcm-user-course-item .aipcm-course-thumbnail {
        width: 100%;
    }
}

/* Gamification Widget */
.aipcm-gamification-widget {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.aipcm-gamification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.aipcm-user-level-badge {
    background: #2271b1;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.aipcm-streak-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ff9800;
    font-weight: bold;
    font-size: 18px;
}

.aipcm-xp-info {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.aipcm-xp-bar {
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.aipcm-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #81c784);
    transition: width 0.5s ease-out;
}

.aipcm-badges-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.aipcm-badge-item {
    width: 60px;
    height: 60px;
    background: #f9f9f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #eee;
    transition: all 0.3s;
    position: relative;
    cursor: help;
}

.aipcm-badge-item:hover {
    transform: scale(1.1);
    border-color: #2271b1;
}

.aipcm-badge-item.active {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1976d2;
}

.aipcm-badge-item span {
    font-size: 24px;
}

.aipcm-badge-tooltip {
    visibility: hidden;
    width: 150px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 10;
    bottom: 125%;
    left: 50%;
    margin-left: -75px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    line-height: 1.4;
}

.aipcm-badge-item:hover .aipcm-badge-tooltip {
    visibility: visible;
    opacity: 1;
}

/* Leaderboard Styles */
.aipcm-leaderboard {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin: 30px 0;
}

.aipcm-leaderboard-title {
    margin-bottom: 25px;
    font-size: 1.8em;
    font-weight: 700;
    color: #333;
    text-align: center;
}

.aipcm-leaderboard-container {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.aipcm-leaderboard-header {
    display: grid;
    grid-template-columns: 80px 1fr 120px 120px;
    background: #f8f9fa;
    padding: 15px 20px;
    font-weight: 700;
    color: #666;
    border-bottom: 2px solid #eee;
}

.aipcm-leaderboard-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px 120px;
    padding: 15px 20px;
    border-bottom: 1px solid #f5f5f5;
    align-items: center;
    transition: background 0.2s;
}

.aipcm-leaderboard-row:last-child {
    border-bottom: none;
}

.aipcm-leaderboard-row:hover {
    background: #f8fbff;
}

.aipcm-leaderboard-row.current-user {
    background: #fff9e6;
    border-left: 4px solid #ffc107;
}

.aipcm-rank-number {
    font-size: 1.2em;
    font-weight: 700;
}

.aipcm-rank-number .medal {
    font-size: 1.5em;
}

.aipcm-user-name {
    font-weight: 600;
    color: #2271b1;
}

.aipcm-badge-self {
    background: #ffc107;
    color: #000;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: middle;
}

.level-pill {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.xp-val {
    font-weight: 700;
    color: #4caf50;
}

.aipcm-no-data {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 12px;
    color: #888;
    font-style: italic;
}

@media (max-width: 600px) {
    .aipcm-leaderboard-header {
        display: none;
    }

    .aipcm-leaderboard-row {
        grid-template-columns: 50px 1fr 1fr;
        gap: 10px;
        padding: 15px;
    }

    .aipcm-user-xp {
        grid-column: 2 / span 2;
        text-align: right;
    }
}

/* Live Class PRO Styles */
.aipcm-live-countdown-widget {
    background: linear-gradient(135deg, #1a1a1a, #333);
    color: #fff;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.aipcm-live-countdown-info h3 {
    color: #ff9800;
    margin: 0 0 5px 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.aipcm-live-countdown-info h4 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 700;
}

.aipcm-live-timer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.timer-segment {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
    min-width: 60px;
}

.timer-val {
    display: block;
    font-size: 28px;
    font-weight: 800;
    font-family: monospace;
}

.timer-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.7;
}

.aipcm-live-today-notice {
    background: #fff5f5;
    border-left: 5px solid #ff4d4d;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(255, 77, 77, 0.1);
}

.notice-icon {
    font-size: 24px;
}

.notice-content {
    flex-grow: 1;
}

.notice-content strong {
    display: block;
    color: #d32f2f;
    font-size: 14px;
}

.notice-content p {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.aipcm-live-today-notice .aipcm-btn-small {
    padding: 8px 15px;
    font-size: 13px;
    background: #ff4d4d;
}

.aipcm-live-today-notice .aipcm-btn-small:hover {
    background: #e60000;
}

/* Lesson Comments Styles */
.aipcm-lesson-comments {
    border-top: 2px solid #eee;
    margin-top: 50px;
    padding-top: 30px;
}

.aipcm-comment-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.aipcm-comment-form textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    font-size: 15px;
}

.aipcm-comment-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
}

.aipcm-comment-item.instructor-reply {
    background: #f0f7ff;
    border-color: #bee3f8;
}

.aipcm-comment-avatar img {
    border-radius: 50%;
}

.aipcm-comment-meta {
    margin-bottom: 5px;
    font-size: 14px;
}

.instructor-badge {
    background: #2b6cb0;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
}

.comment-date {
    color: #888;
    margin-left: 10px;
}

.aipcm-comment-text {
    font-size: 15px;
    line-height: 1.6;
    color: #4a5568;
}

.aipcm-comment-actions {
    margin-top: 10px;
}

.aipcm-comment-actions a {
    font-size: 13px;
    color: #2b6cb0;
    font-weight: 600;
    text-decoration: none;
}

/* Certificates Styles */
.aipcm-user-certificates {
    margin: 30px 0;
}

.aipcm-certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.aipcm-certificate-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.aipcm-certificate-card:hover {
    transform: translateY(-5px);
}

.certificate-icon {
    font-size: 32px;
    background: #fff9e6;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.certificate-info {
    flex-grow: 1;
}

.certificate-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.cert-date {
    display: block;
    font-size: 12px;
    color: #666;
}

.cert-code {
    display: block;
    font-size: 10px;
    color: #999;
    font-family: monospace;
    margin-top: 5px;
}

.certificate-link .aipcm-btn-small {
    background: #2b6cb0;
    color: #fff;
    font-size: 12px;
}

.cert-pending {
    font-size: 12px;
    color: #ff9800;
    font-style: italic;
}

/* --- DASHBOARD REFACTOR: REFERENCE DESIGN --- */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Quicksand:wght@300;400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

:root {
    --aipcm-brand-teal: #1eada6;
    /* Bright Teal from image */
    --aipcm-brand-teal-dark: #168d87;
    --aipcm-brand-teal-light: #e6f7f6;
    /* Very light teal for active backgrounds */
    --aipcm-text-dark: #1f2937;
    --aipcm-text-gray: #6b7280;
    --aipcm-bg-body: #f3f4f6;
    --aipcm-card-radius: 24px;
    --aipcm-font-heading: 'Anton', sans-serif;
    --aipcm-font-body: 'Quicksand', sans-serif;
}

/* Global Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 400 !important;
    /* Anton and Outfit should be normal weight as per user request */
}

.aipcm-classroom-wrapper,
.aipcm-classroom-wrapper * {
    font-family: 'Quicksand', sans-serif !important;
}

.aipcm-classroom-wrapper h1,
.aipcm-classroom-wrapper h2,
.aipcm-classroom-wrapper h3 {
    font-family: 'Anton', sans-serif !important;
    font-weight: 400 !important;
    text-transform: uppercase;
}

:root {
    /* SISTEMA DE COLORES - ACADEMIA IVÁN PIRUCHO */
    /*
     * Verde Principal (Verde1): #16909B - RGB(22, 144, 155)
     * Uso: Botones principales, acentos, estados activos
     * 
     * Verde Alternativo (Verde2): #47DEB1
     * Uso: Gradientes, hover effects, elementos decorativos
     * 
     * Verde Oscuro: #117a83
     * Uso: Estados hover, sombras, profundidad
     * 
     * Azul Principal: #213A58
     * Uso: Textos principales, títulos, botones activos, fondos oscuros
     * 
     * Fondo Página: #f3f4f6
     * Uso: Background general del dashboard
     * 
     * Fondo Header: #f3f4f6
     * Uso: Background del header (mismo que página)
     */
    --aipcm-brand-green: #16909B;
    --aipcm-brand-green-light: #47DEB1;
    --aipcm-brand-green-dark: #117a83;
    --aipcm-header-bg: #f3f4f6;
    --aipcm-page-bg: #f3f4f6;
    --aipcm-header-height: 90px;
    --aipcm-text-primary: #213A58;
}

/* Títulos con color #213A58 */
.aipcm-app-layout h1,
.aipcm-app-layout h2,
.aipcm-app-layout h3,
.aipcm-app-layout h4,
.aipcm-app-layout h5,
.aipcm-app-layout h6 {
    color: var(--aipcm-text-primary);
}

/* Excepciones para elementos con fondo oscuro */
.aipcm-hero-card h1,
.aipcm-hero-card h2,
.aipcm-hero-card h3,
.card-overlay-v2 h3 {
    color: white;
}

/* ============================================
   SISTEMA DE RESEÑAS
   ============================================ */

.aipcm-reviews-section {
    margin-top: 40px;
}

.aipcm-review-item {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.aipcm-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.aipcm-review-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.aipcm-review-stars {
    color: #ffb900;
}

.aipcm-review-text {
    color: #475569;
    line-height: 1.6;
}

/* Formulario de Reseña */
.aipcm-review-form-container {
    background: #f8fafc;
    padding: 30px;
    border-radius: 16px;
    margin-top: 30px;
}

.aipcm-star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 20px;
}

.aipcm-star-rating input {
    display: none;
}

.aipcm-star-rating label {
    font-size: 30px;
    color: #cbd5e1;
    cursor: pointer;
    transition: color 0.2s;
}

.aipcm-star-rating label:hover,
.aipcm-star-rating label:hover~label,
.aipcm-star-rating input:checked~label {
    color: #ffb900;
}


/* ============================================
   DASHBOARD HEADER - NAVEGACIÓN PRINCIPAL
   ============================================ */

.aipcm-dashboard-header {
    position: fixed;
    top: 5px;
    left: 20px;
    right: 20px;
    height: var(--aipcm-header-height);
    background: var(--aipcm-header-bg);
    border-bottom: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 1000;
    border-radius: 16px;
}

/* LADO IZQUIERDO: Logo + Menú */
.aipcm-header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

/* Logo */
.aipcm-header-branding {
    display: flex;
    align-items: center;
}

.aipcm-header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    width: fit-content;
    height: 100%;
    /* Anchor should fill header height for better alignment */
}

/* Logo dimensiones ajustadas para cabecera de 100px */
.aipcm-header-logo img,
.aipcm-logo-img {
    width: 180px !important;
    height: 75px !important;
    max-height: 75px !important;
    max-width: 220px !important;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    display: block;
}

.aipcm-header-logo-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.aipcm-logo-icon {
    font-size: 28px;
    margin-right: 4px;
}

.aipcm-logo-name {
    color: #374151;
}

.aipcm-logo-highlight {
    color: var(--aipcm-brand-green);
    position: relative;
}

.aipcm-logo-highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--aipcm-brand-green);
    border-radius: 2px;
}

/* LADO DERECHO: Perfil del Usuario */
.aipcm-header-right {
    display: flex;
    align-items: center;
}

.aipcm-header-user-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.aipcm-header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.aipcm-header-username {
    font-weight: 700;
    font-size: 14px;
    color: var(--aipcm-text-primary);
}

.aipcm-header-logout-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: var(--aipcm-text-gray) !important;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.aipcm-header-logout-btn:hover {
    background: #fff;
    border-color: #e53e3e;
    color: #e53e3e !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.15);
}

.aipcm-header-logout-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.aipcm-btn-dashboard-back {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--aipcm-brand-green);
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 50px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.3s ease;
    margin-left: 20px;
}

.aipcm-btn-dashboard-back:hover {
    background: #f8fafc;
    border-color: var(--aipcm-brand-green);
    transform: translateX(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Avatar Circular con Borde Verde */
.aipcm-header-avatar-wrapper {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 100%;
    overflow: hidden;
}

.aipcm-header-avatar {
    width: 100%;
    height: 100%;
    border-radius: 100%;
    object-fit: cover;
    border: 3px solid var(--aipcm-brand-green);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Indicador de estado online */
.aipcm-header-avatar-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--aipcm-brand-green);
    border: 2px solid #ffffff;
    border-radius: 100%;
    z-index: 2;
}

/* Overlay de cámara para cambiar foto */
.aipcm-avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 3;
}

.aipcm-avatar-overlay .dashicons {
    color: #ffffff;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.aipcm-header-avatar-wrapper:hover .aipcm-avatar-overlay {
    opacity: 1;
}

/* Estados de carga */
.aipcm-header-avatar-wrapper.uploading .aipcm-avatar-overlay {
    opacity: 1;
    background: rgba(34, 197, 94, 0.8);
}

.aipcm-header-avatar-wrapper.uploading .aipcm-avatar-overlay::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: aipcm-spin 1s linear infinite;
}

@keyframes aipcm-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Ajuste del layout principal para ocupar todo el ancho real */
.aipcm-app-layout {
    display: flex;
    background: var(--aipcm-page-bg);
    min-height: 100vh;
    font-family: var(--aipcm-font-body);
    border-radius: 0;
    width: 100vw !important;
    max-width: none !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding-top: calc(var(--aipcm-header-height) + 10px);
    align-items: flex-start;
    box-sizing: border-box;
}

/* --- SIDEBAR --- */
.aipcm-sidebar {
    width: 250px;
    background: var(--aipcm-page-bg);
    padding: 0 20px 40px 20px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    align-self: flex-start;
}

.aipcm-menu-label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--aipcm-text-primary);
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    padding-left: 15px;
    font-weight: 700;
    font-family: var(--aipcm-font-body);
}

.aipcm-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.aipcm-nav-menu.support-menu {
    gap: 0;
}

.aipcm-nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 50px;
    color: white !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 15px;
    background: var(--aipcm-brand-green);
    border: 1px solid var(--aipcm-brand-green);
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: all 0.2s ease;
    font-family: var(--aipcm-font-body);
}

.aipcm-nav-item .dashicons {
    margin-right: 15px;
    font-size: 18px;
    color: white !important;
}

/* Hover State: Fondo Blanco, Borde Verde, Texto/Icono Verde */
.aipcm-nav-item:hover,
.aipcm-nav-item:focus {
    background: white !important;
    border: 1px solid var(--aipcm-brand-green);
    color: var(--aipcm-brand-green) !important;
}

.aipcm-nav-item:hover .dashicons,
.aipcm-nav-item:focus .dashicons {
    color: var(--aipcm-brand-green) !important;
}

/* Active State: Fondo Azul Marca, Texto/Icono Blanco */
.aipcm-nav-item.active {
    background: var(--aipcm-text-primary) !important;
    color: white !important;
    border: 1px solid var(--aipcm-text-primary) !important;
    box-shadow: 0 4px 10px rgba(33, 58, 88, 0.2);
}

.aipcm-nav-item.active .dashicons {
    color: white !important;
}

.support-menu .aipcm-nav-item {
    padding-top: 2px;
    padding-bottom: 2px;
}

/* Soporte: Ayuda y Contacto (Transparentes) */
.aipcm-nav-menu a.aipcm-nav-item[href*="whatsapp"],
.aipcm-nav-menu a.aipcm-nav-item[href*="wa.me"],
.aipcm-nav-menu a.aipcm-nav-item[href*="contacto"] {
    background: transparent !important;
    border: 1px solid transparent !important;
    color: var(--aipcm-text-gray) !important;
    box-shadow: none !important;
}

/* Logout (Separado) */
.aipcm-nav-menu a.aipcm-nav-item.logout-link {
    background: transparent !important;
    border: 1px solid transparent !important;
    color: var(--aipcm-text-gray) !important;
    box-shadow: none !important;
    margin-top: 15px;
}

.aipcm-nav-menu a.aipcm-nav-item[href*="whatsapp"] .dashicons,
.aipcm-nav-menu a.aipcm-nav-item[href*="wa.me"] .dashicons,
.aipcm-nav-menu a.aipcm-nav-item[href*="contacto"] .dashicons,
.aipcm-nav-menu a.aipcm-nav-item.logout-link .dashicons {
    color: var(--aipcm-text-gray) !important;
}

.aipcm-nav-menu a.aipcm-nav-item[href*="whatsapp"]:hover,
.aipcm-nav-menu a.aipcm-nav-item[href*="wa.me"]:hover,
.aipcm-nav-menu a.aipcm-nav-item[href*="contacto"]:hover,
.aipcm-nav-menu a.aipcm-nav-item.logout-link:hover {
    background: transparent !important;
    color: var(--aipcm-brand-green) !important;
    border: 1px solid transparent !important;
}

.aipcm-nav-menu a.aipcm-nav-item[href*="whatsapp"]:hover .dashicons,
.aipcm-nav-menu a.aipcm-nav-item[href*="wa.me"]:hover .dashicons,
.aipcm-nav-menu a.aipcm-nav-item[href*="contacto"]:hover .dashicons,
.aipcm-nav-menu a.aipcm-nav-item.logout-link:hover .dashicons {
    color: var(--aipcm-brand-green) !important;
}

.mt-auto {
    margin-top: auto;
}

/* --- MAIN AREA --- */
.aipcm-main-area {
    flex-grow: 1;
    background: var(--aipcm-page-bg);
    padding: 10px clamp(0px, 4vw, 40px) 40px clamp(0px, 4vw, 40px);
    height: auto;
    overflow-y: visible;
    align-self: flex-start;
    width: 100%;
    box-sizing: border-box;
}

/* Top bar */
.aipcm-topbar {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
}

.aipcm-search-bar {
    width: 100%;
    max-width: 450px;
    position: relative;
    margin-right: auto;
}

.aipcm-search-bar input {
    width: 100%;
    background: white;
    border: none;
    padding: 14px 20px 14px 50px;
    border-radius: 30px;
    font-size: 15px;
    color: var(--aipcm-text-dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.01);
    font-family: var(--aipcm-font-body);
}

.aipcm-search-bar .dashicons {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #cbd5e1;
    font-size: 20px;
}

/* Hero Section V4 - Estilo Premium */
.aipcm-hero-card {
    background: linear-gradient(135deg, var(--aipcm-brand-green) 0%, var(--aipcm-brand-teal-dark) 100%);
    border-radius: var(--aipcm-card-radius);
    padding: 50px 60px;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
    min-height: 280px;
    display: flex;
    align-items: center;
    box-shadow: 0 15px 35px rgba(30, 173, 166, 0.2);
}

/* Patrón de líneas decorativo */
.aipcm-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 30%);
    z-index: 1;
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 40px;
}

.hero-text-col {
    max-width: 650px;
}

.aipcm-hero-card h1 {
    color: white !important;
    font-family: var(--aipcm-font-heading);
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 15px 0;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 18px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 30px !important;
    font-weight: 400;
    max-width: 500px;
}

.hero-circle-actions {
    display: flex;
    gap: 15px;
}

.hero-circle-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0;
}

.hero-circle-btn:hover {
    background: white;
    color: var(--aipcm-brand-green) !important;
    transform: translateY(-5px) scale(1.05);
}

.hero-circle-btn .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Dashboard Grid */
.aipcm-dashboard-grid-layout {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 30px;
}

/* Card General */
.aipcm-card {
    background: white;
    border-radius: var(--aipcm-card-radius);
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: none;
    margin-bottom: 30px;
}

.aipcm-card h3 {
    font-family: var(--aipcm-font-heading);
    font-size: 22px;
    margin: 0 0 20px 0;
    color: var(--aipcm-text-primary);
}

/* Level Card */
.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.level-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-box-circle {
    width: 50px;
    height: 50px;
    background: #e0f2f1;
    color: var(--aipcm-brand-teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.level-text h3 {
    margin: 0;
    font-size: 18px;
    font-family: var(--aipcm-font-heading);
    color: var(--aipcm-text-primary);
}

.level-text span {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
}

.level-badge {
    background: #1eada6;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
}

.level-progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--aipcm-text-dark);
}

.xp-total {
    color: #9ca3af;
}

.aipcm-progress-bar-lg {
    height: 12px;
    background: #f3f4f6;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.aipcm-progress-fill {
    height: 100%;
    background: var(--aipcm-brand-teal);
    border-radius: 6px;
}

.small-note {
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Logros Recientes List */
.achievement-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.achievement-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.achievement-icon {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--aipcm-brand-teal);
    flex-shrink: 0;
    font-size: 22px;
}

.achievement-details strong {
    display: block;
    margin-bottom: 4px;
    color: var(--aipcm-text-dark);
    font-size: 15px;
}

.achievement-details span {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.4;
}

.btn-view-all {
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 12px;
    color: var(--aipcm-text-dark);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--aipcm-font-body);
}

.btn-view-all:hover {
    border-color: var(--aipcm-brand-teal);
    color: var(--aipcm-brand-teal);
}

/* Course Cards */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header-row h3 {
    font-family: var(--aipcm-font-heading);
    font-size: 22px;
    color: var(--aipcm-text-primary);
    margin: 0;
}

.link-all {
    color: var(--aipcm-brand-teal);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.course-card-modern {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
}

.course-img-modern {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #eee;
}

.level-tag {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: transparent;
    color: #4fd1c5;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.course-title-overlay {
    position: absolute;
    bottom: 15px;
    left: 15px;
    width: 90%;
}

.course-title-overlay span {
    display: block;
    color: #4fd1c5;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.course-title-overlay h4 {
    color: white;
    font-size: 18px;
    margin: 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-family: var(--aipcm-font-body);
}

.course-meta-modern {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* Masterclass Cards */
.masterclass-card {
    background: #f9fafb;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.mc-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.mc-info h5 {
    margin: 0 0 5px;
    font-size: 15px;
    color: var(--aipcm-text-dark);
}

.mc-date {
    font-size: 11px;
    color: var(--aipcm-brand-teal);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
    display: block;
}

.mc-author {
    font-size: 12px;
    color: #9ca3af;
}

/* --- EMPTY STATE DESIGN --- */
.aipcm-courses-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 20px 0;
}

.empty-state-card {
    background: white;
    border-radius: 32px;
    padding: 60px 40px;
    text-align: center;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

.empty-state-illustration {
    width: 120px;
    height: 120px;
    margin: 0 auto 25px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 35px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}

.empty-state-illustration::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, color-mix(in srgb, var(--aipcm-brand-green), transparent 92%) 0%, transparent 75%);
    border-radius: 35px;
}

/* Minimalist Content for Illustrations */
.courses-empty-img::after {
    content: "🎹";
    font-size: 54px;
    opacity: 0.9;
}

.mc-empty-img::after {
    content: "🎬";
    font-size: 54px;
    opacity: 0.9;
}

.cert-empty-img::after {
    content: "📜";
    font-size: 54px;
    opacity: 0.9;
}

.empty-state-card h2 {
    font-family: var(--aipcm-font-heading);
    font-size: 26px;
    margin-bottom: 12px;
    color: var(--aipcm-text-primary);
}

.empty-state-card p {
    color: var(--aipcm-text-gray);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 35px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.demo-preview-label {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--aipcm-text-gray);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.demo-preview-label::after {
    content: '';
    flex-grow: 1;
    height: 2px;
    background: #e5e7eb;
}

.demo-mode {
    opacity: 0.6;
    pointer-events: none;
    filter: saturate(0.5);
}

/* View Content Visibility */
.aipcm-view-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.aipcm-view-content.active {
    display: block;
}

/* View Content Visibility */
.aipcm-view-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.aipcm-view-content.active {
    display: block;
}

/* Responsive - Header */
@media (max-width: 1024px) {
    .aipcm-dashboard-header {
        padding: 0 20px;
    }

    .aipcm-header-left {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .aipcm-dashboard-header {
        top: 5px;
        left: 10px;
        right: 10px;
        padding: 0 15px;
        height: 65px;
    }

    .aipcm-header-left {
        gap: 15px;
    }

    /* Logo responsive - mantener proporción */
    .aipcm-header-logo img,
    .aipcm-logo-img,
    .aipcm-dashboard-header .aipcm-header-logo img {
        width: 115px !important;
        height: 50px !important;
        max-height: 50px !important;
        max-width: 140px !important;
    }

    .aipcm-header-logo-text {
        font-size: 16px;
    }

    .aipcm-logo-icon {
        font-size: 22px;
    }

    .aipcm-header-username {
        display: none;
    }

    .aipcm-header-avatar-wrapper {
        width: 40px;
        height: 40px;
    }

    .aipcm-app-layout {
        padding-top: 100px;
    }
}

/* Responsive - Layout General */
@media (max-width: 900px) {
    .aipcm-dashboard-header {
        position: relative;
        top: 0;
        left: 0;
        right: 0;
        border-radius: 0;
        margin-bottom: 20px;
        width: 100% !important;
    }

    .aipcm-app-layout {
        flex-direction: column;
        padding-top: 0;
        max-width: 100%;
    }

    .aipcm-sidebar {
        width: 100%;
        padding: 15px;
        border-bottom: 1px solid #e5e7eb;
        background: #fff;
    }

    .aipcm-nav-menu {
        flex-direction: row;
        overflow-x: auto;
        margin-bottom: 0;
        gap: 10px;
        padding: 5px 0 15px 0;
        -webkit-overflow-scrolling: touch;
    }

    .aipcm-nav-item {
        width: auto;
        white-space: nowrap;
        border-radius: 12px;
        padding: 8px 16px;
        font-size: 14px;
    }

    .aipcm-main-area {
        padding: 20px 15px;
    }

    .aipcm-dashboard-grid-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .aipcm-hero-card {
        padding: 30px 20px;
        min-height: auto;
    }

    .hero-content-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .aipcm-hero-card h1 {
        font-size: 32px;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .aipcm-search-bar {
        max-width: 100%;
    }
}

/* --- V2 COURSES DESIGN (Specific for "Mis Cursos" Grid) --- */

.courses-header-v2 {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.course-filters-pill {
    background: #fff;
    padding: 6px;
    border-radius: 50px;
    display: inline-flex;
    gap: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.filter-pill {
    background: transparent;
    border: none;
    padding: 8px 24px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--aipcm-font-body);
    text-decoration: none !important;
}

.filter-pill.active {
    background: var(--aipcm-brand-green);
    color: white;
    box-shadow: 0 4px 12px rgba(22, 144, 155, 0.25);
}

.filter-pill:hover:not(.active) {
    background: #f3f4f6;
    color: var(--aipcm-text-dark);
}

.aipcm-courses-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    /* Responsive grid */
    gap: 30px;
}

/* Card V2 */
.course-card-v2 {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.course-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

/* Image V2 */
.card-image-v2 {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: 24px 24px 0 0;
    /* Important for the look */
    margin: 15px 15px 0 15px;
    /* Inset style from reference image */
}

/* Overlay Inside Image */
.card-overlay-v2 {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2;
    text-align: left;
}

.badge-v2 {
    display: inline-block;
    background: rgba(31, 100, 117, 0.9);
    /* Dark teal pill */
    color: #a5f3fc;
    /* Light teal text */
    font-size: 10px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    backdrop-filter: blur(4px);
}

.card-overlay-v2 h3 {
    color: white;
    font-family: var(--aipcm-font-heading);
    /* Or a bold sans */
    font-size: 24px;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Card Body V2 */
.card-body-v2 {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Progress V2 */
.progress-wrapper-v2 {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-info-v2 {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: var(--aipcm-text-dark);
}

.progress-info-v2 .value {
    color: #1f6475;
}

.progress-bar-v2 {
    height: 8px;
    background: #f0f2f5;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
}

.fill-v2 {
    height: 100%;
    background: #1f6475;
    border-radius: 4px;
}

/* Buttons V2 */
/* Buttons V2 - Matching Menu Rule */
.btn-action-primary {
    background: var(--aipcm-brand-green);
    color: white !important;
    border: 1px solid var(--aipcm-brand-green);
    border-radius: 50px;
    padding: 14px 24px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-action-primary:hover {
    background: white !important;
    color: var(--aipcm-brand-green) !important;
    border-color: var(--aipcm-brand-green);
}

.btn-action-outline {
    background: white;
    color: var(--aipcm-brand-green) !important;
    border: 1px solid var(--aipcm-brand-green);
    border-radius: 50px;
    padding: 13px 24px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-action-outline:hover {
    background: var(--aipcm-brand-green) !important;
    color: white !important;
}

/* Locked State */
.course-card-v2.locked .badge-v2 {
    background: rgba(107, 114, 128, 0.9);
    color: #e5e7eb;
}

.lock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: rgba(255, 255, 255, 0.7);
}

.btn-action-locked {
    background: #f3f4f6;
    color: #9ca3af;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    font-size: 20px;
    width: 20px;
    height: 20px;
    transition: all 0.3s;
}

.nav-icon-dashboard {
    color: #6366f1;
}

/* Indigo */
.nav-icon-courses {
    color: #3b82f6;
}

/* Blue */
.nav-icon-masterclasses {
    color: #10b981;
}

/* Emerald */
.nav-icon-achievements {
    color: #14b8a6;
}

/* Teal */
.nav-icon-certificates {
    color: #10b981;
}

/* Emerald second variant */
.nav-icon-profile {
    color: #0d9488;
}

/* Teal dark */

/* --- ACHIEVEMENTS PAGE V2 --- */
.achievements-page-v2 {
    padding: 10px 0;
}

.section-v2-header {
    margin-bottom: 40px;
}

.section-v2-header h2 {
    font-family: var(--aipcm-font-heading);
    font-size: 34px;
    color: var(--aipcm-text-primary);
    margin-bottom: 5px;
}

.section-v2-header p {
    color: var(--aipcm-text-gray);
    font-size: 16px;
    margin: 0;
}

.achievements-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.achievement-card-v2 {
    background: white;
    border-radius: 28px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.achievement-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.progress-main-card {
    grid-column: span 2;
    flex-direction: row;
    gap: 30px;
    text-align: left;
    padding: 40px;
}

.circular-progress-box {
    width: 130px;
    height: 130px;
    flex-shrink: 0;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
}

.circle-bg {
    fill: none;
    stroke: #f1f5f9;
    stroke-width: 2.8;
}

.circle {
    fill: none;
    stroke: #14b8a6;
    stroke-width: 2.8;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease 0s;
}

.percentage {
    fill: var(--aipcm-text-primary);
    font-family: var(--aipcm-font-heading);
    font-size: 9px;
    font-weight: 800;
    text-anchor: middle;
}

.level-text {
    fill: var(--aipcm-text-gray);
    font-size: 3px;
    font-weight: 800;
    text-anchor: middle;
    text-transform: uppercase;
}

.progress-details h3 {
    margin: 0 0 8px 0;
    font-family: var(--aipcm-font-heading);
    font-size: 20px;
    color: var(--aipcm-text-primary);
}

.progress-details span {
    font-size: 15px;
    font-weight: 700;
    color: var(--aipcm-text-gray);
}

/* Badge Cards */
.badge-icon-box {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    transition: all 0.3s;
}

.badge-card.completado .badge-icon-box,
.badge-card.en-progreso .badge-icon-box {
    background: color-mix(in srgb, var(--badge-color), white 85%);
}

.badge-emoji {
    font-size: 32px;
    line-height: 1;
    display: block;
}

.badge-card.bloqueado .badge-icon-box {
    filter: grayscale(1) opacity(0.5);
}

.badge-card.bloqueado {
    opacity: 0.7;
}

.badge-card h3 {
    margin: 0 0 5px 0;
    font-family: var(--aipcm-font-heading);
    font-size: 16px;
    color: var(--aipcm-text-primary);
}

.badge-state {
    font-size: 12px;
    font-weight: 700;
    color: var(--aipcm-text-gray);
}

.badge-card.completado .badge-state {
    color: #10b981;
}

.badge-card.en-progreso .badge-state {
    color: #f59e0b;
}

/* --- CERTIFICATES PAGE V3 (Grid & Cards) --- */
.certificates-page-v3 {
    padding-top: 10px;
}

.certificates-header-v3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.certificates-header-v3 h2 {
    font-family: var(--aipcm-font-heading);
    font-size: 30px;
    color: var(--aipcm-text-primary);
    margin: 0 0 5px 0;
}

.certificates-header-v3 p {
    color: var(--aipcm-text-gray);
    font-size: 15px;
    margin: 0;
}

.cert-count-pill {
    background: #f0fdfa;
    border: 1px solid #ccfbf1;
    color: #0d9488;
    padding: 10px 20px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
}

.cert-count-pill .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.certificates-grid-v3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.certificate-card-v3 {
    background: white;
    border-radius: 24px;
    padding: 24px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.certificate-card-v3:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border-color: #e2e8f0;
}

.cert-card-media {
    background: #f8fafc;
    border-radius: 18px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.cert-media-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.cert-media-icon .dashicons {
    color: #0d9488;
    font-size: 30px;
    width: 30px;
    height: 30px;
}

.cert-card-content h3 {
    margin: 0 0 12px 0;
    font-family: var(--aipcm-font-heading);
    font-size: 18px;
    color: var(--aipcm-text-primary);
    line-height: 1.4;
    min-height: 50px;
}

.cert-date-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--aipcm-text-gray);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.cert-date-info .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.btn-download-v3 {
    background: #157373;
    /* Academic Teal */
    color: white !important;
    text-decoration: none !important;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-download-v3:hover {
    background: #0d5c5c;
    transform: scale(1.02);
}

/* --- FOOTER CTA BOX --- */
.certificates-footer-cta {
    background: white;
    border: 2px dashed #e2e8f0;
    border-radius: 28px;
    padding: 50px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.cta-icon-box {
    width: 50px;
    height: 50px;
    background: #f8fafc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.cta-icon-box .dashicons {
    color: #94a3b8;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.certificates-footer-cta h3 {
    margin: 0;
    font-family: var(--aipcm-font-heading);
    font-size: 22px;
    color: var(--aipcm-text-primary);
}

.certificates-footer-cta p {
    margin: 0;
    color: var(--aipcm-text-gray);
    font-size: 15px;
    max-width: 500px;
    line-height: 1.6;
}

.btn-outline-v3 {
    display: inline-block;
    padding: 12px 30px;
    border: 1.5px solid #0d9488;
    color: #0d9488 !important;
    text-decoration: none !important;
    border-radius: 100px;
    font-weight: 700;
    font-size: 14px;
    margin-top: 15px;
    transition: all 0.3s;
}

.btn-outline-v3:hover {
    background: #0d9488;
    color: white !important;
}

/* CSS for Master Classes Tab V2 */
.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-title-row h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--aipcm-font-heading);
    font-size: 20px;
    margin: 0;
    color: var(--aipcm-text-primary);
}

.section-title-row h3 .dashicons {
    color: var(--aipcm-brand-green);
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.view-all-link {
    color: var(--aipcm-brand-green);
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Recorded Grid */
.masterclasses-grid-grabadas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.mc-recorded-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.mc-recorded-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.mc-card-thumb {
    height: 140px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.play-btn-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--aipcm-text-primary) !important;
    text-decoration: none !important;
    opacity: 0.9;
    transition: all 0.2s;
}

.play-btn-overlay:hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
}

.mc-duration-tag {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.mc-card-info {
    padding: 15px;
}

.mc-card-info h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
    font-family: var(--aipcm-font-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mc-author {
    font-size: 12px;
    color: var(--aipcm-text-gray);
    display: flex;
    align-items: center;
    gap: 5px;
}

.mc-author .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Live Masterclasses Container */
.live-masterclasses-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
}

.live-event-card {
    background: white;
    border-radius: 28px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    /* Horizontal on large screens */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.live-card-hero {
    width: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    flex-shrink: 0;
}

.live-status-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--aipcm-text-primary);
    color: #4fd1c5;
    font-size: 9px;
    font-weight: 900;
    padding: 5px 10px;
    border-radius: 6px;
    letter-spacing: 1px;
}

.live-date-block {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.live-date-block .day {
    display: block;
    font-size: 38px;
    font-weight: 900;
    line-height: 1;
}

.live-date-block .month {
    display: block;
    font-size: 14px;
    font-weight: 800;
}

.live-card-body {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.live-time-info {
    font-size: 13px;
    font-weight: 700;
    color: var(--aipcm-text-gray);
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-time-info .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--aipcm-brand-green);
}

.live-card-body h2 {
    margin: 0;
    font-family: var(--aipcm-font-heading);
    font-size: 24px;
    color: var(--aipcm-text-primary);
    line-height: 1.2;
}

.live-instructor-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.instructor-icon-mini {
    width: 40px;
    height: 40px;
    background: #e6f6f5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.instructor-text {
    display: flex;
    flex-direction: column;
}

.instructor-text strong {
    font-size: 14px;
}

.instructor-text span {
    font-size: 11px;
    color: var(--aipcm-text-gray);
}

.aipcm-empty-mini {
    padding: 40px;
    background: #f8fafc;
    border-radius: 20px;
    text-align: center;
    border: 2px dashed #e2e8f0;
}

/* --- PROFILE PAGE V3 --- */
.profile-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.profile-page-header .header-left h2 {
    font-size: 34px;
    margin: 0 0 8px 0;
    font-weight: 800;
    color: var(--aipcm-text-primary);
    letter-spacing: -1px;
}

.profile-page-header .header-left p {
    color: var(--aipcm-text-gray);
    margin: 0;
    font-size: 16px;
}

.profile-page-header .header-right .btn-action-primary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    font-size: 15px;
}

.aipcm-profile-grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.profile-main-col {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.card-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.card-title-row .dashicons {
    font-size: 20px;
    color: var(--aipcm-brand-green);
}

.card-title-row h3 {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--aipcm-text-primary) !important;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 700;
    font-size: 13px;
    color: var(--aipcm-text-primary);
    margin-bottom: 10px;
    display: block;
}

.form-group .input-wrapper input,
.form-group .input-wrapper select,
.form-group .input-wrapper textarea {
    width: 100%;
    padding: 18px 22px;
    border: 1.5px solid #e1e8ed;
    border-radius: 16px;
    background: #ffffff;
    font-size: 16px;
    color: var(--aipcm-text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--aipcm-font-body);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    appearance: none;
}

.form-group .input-wrapper select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231eada6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 18px;
    padding: 16px 50px 16px 22px;
    cursor: pointer;
    min-height: 56px;
    line-height: 24px;
}

.form-group .input-wrapper input:hover,
.form-group .input-wrapper select:hover,
.form-group .input-wrapper textarea:hover {
    border-color: var(--aipcm-brand-green);
    background: #fcfdfe;
}

.form-group .input-wrapper input:focus,
.form-group .input-wrapper select:focus,
.form-group .input-wrapper textarea:focus {
    background: white;
    border-color: var(--aipcm-brand-green);
    outline: none;
    box-shadow: 0 0 0 5px rgba(30, 173, 166, 0.12), 0 8px 20px rgba(30, 173, 166, 0.08);
    transform: translateY(-2px);
}

.input-wrapper.disabled input {
    background: #f7fafc !important;
    color: #a0aec0 !important;
    border-color: #e2e8f0 !important;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

.password-actions {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
}

.btn-text-only {
    background: rgba(30, 173, 166, 0.1);
    border: 1.5px solid rgba(30, 173, 166, 0.15);
    color: var(--aipcm-brand-green);
    font-weight: 800;
    cursor: pointer;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.btn-text-only:hover {
    background: var(--aipcm-brand-green);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(30, 173, 166, 0.2);
    border-color: var(--aipcm-brand-green);
}

.stats-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: #f0fdfa;
    color: var(--aipcm-brand-green);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-big-val {
    font-size: 20px;
    font-weight: 800;
    color: var(--aipcm-text-primary);
    line-height: 1.2;
    font-family: var(--aipcm-font-heading);
}

.stat-label {
    font-size: 11px;
    color: var(--aipcm-text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.milestone-progress {
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.milestone-progress .milestone-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--aipcm-text-primary);
}

.milestone-note {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 12px;
    margin-bottom: 0;
}

/* Premium Card (Sidebar) - High End Style */
.premium-plan-card {
    background: linear-gradient(135deg, #1eada6 0%, #157a73 100%) !important;
    color: white;
    text-align: center;
    padding: 45px 30px;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(30, 173, 166, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-plan-card::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    z-index: 1;
}

.premium-plan-card::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    z-index: 1;
}

.premium-plan-card .card-icon {
    font-size: 64px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 8px 15px rgba(255, 191, 0, 0.4));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

.premium-plan-card:hover .card-icon {
    transform: scale(1.2) rotate(15deg);
}

.premium-plan-card h3 {
    color: white !important;
    margin: 0 0 15px 0 !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    position: relative;
    z-index: 2;
    letter-spacing: -0.5px;
}

.premium-plan-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    margin-bottom: 35px;
    line-height: 1.6;
    position: relative;
    z-index: 2;
    padding: 0 10px;
}

.btn-premium-action {
    background: #ffffff;
    color: #157a73 !important;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 800;
    text-decoration: none;
    display: inline-block;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn-premium-action:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    background: #f8fafc;
}

@media (max-width: 900px) {
    .aipcm-profile-grid-layout {
        grid-template-columns: 1fr;
    }

    .profile-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Dashboard MC List */
.aipcm-mc-dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aipcm-mc-mini-card {
    background: #ffffff;
    border: 1.5px solid #f1f5f9;
    border-radius: 18px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.aipcm-mc-mini-card:hover {
    transform: translateX(8px);
    border-color: var(--aipcm-brand-green);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.mc-mini-date {
    background: rgba(30, 173, 166, 0.08);
    color: var(--aipcm-brand-green);
    padding: 8px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
}

.mc-mini-date .d {
    font-weight: 800;
    font-size: 18px;
    line-height: 1;
}

.mc-mini-date .m {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mc-mini-info {
    flex-grow: 1;
}

.mc-mini-info h4 {
    margin: 0;
    font-size: 14px;
    color: var(--aipcm-text-primary);
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mc-mini-info span {
    font-size: 12px;
    color: var(--aipcm-text-gray);
}

.mc-mini-btn {
    width: 32px;
    height: 32px;
    background: #f8fafc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--aipcm-text-light);
    transition: all 0.2s;
    text-decoration: none !important;
}

.aipcm-mc-mini-card:hover .mc-mini-btn {
    background: var(--aipcm-brand-green);
    color: white;
}

.aipcm-empty-mini {
    background: white;
    padding: 30px;
    border-radius: 20px;
    border: 2px dashed #e2e8f0;
    text-align: center;
    color: var(--aipcm-text-gray);
}

.aipcm-empty-mini .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Password Reset Box */
.aipcm-password-reset-box {
    padding: 10px 0;
}

.password-reset-action #aipcm-request-pwd-reset {
    margin-top: 5px;
}

/* Ensure the dashicons spin */
.spin {
    animation: aipcm-spin 1s infinite linear;
    display: inline-block;
}

@keyframes aipcm-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(359deg);
    }
}

/* Premium Modal */
.aipcm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.aipcm-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.aipcm-modal-box {
    background: white;
    padding: 45px 40px;
    border-radius: 32px;
    width: 90%;
    max-width: 440px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.aipcm-modal-overlay.active .aipcm-modal-box {
    transform: scale(1) translateY(0);
}

.modal-icon-circle {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 42px;
}

.modal-icon-circle.success {
    background: rgba(30, 173, 166, 0.12);
    color: var(--aipcm-brand-green);
}

.modal-icon-circle.error {
    background: rgba(229, 62, 62, 0.12);
    color: #e53e3e;
}

.aipcm-modal-box h3 {
    font-family: var(--aipcm-font-heading);
    font-size: 26px;
    margin-bottom: 15px;
    color: var(--aipcm-text-primary);
    font-weight: 800;
}

.aipcm-modal-box p {
    color: var(--aipcm-text-gray);
    line-height: 1.6;
    margin-bottom: 35px;
    font-size: 16px;
}

.btn-modal-close {
    background: var(--aipcm-brand-green);
    color: white;
    padding: 14px 40px;
    border-radius: 50px;
    border: none;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 15px rgba(30, 173, 166, 0.2);
}

.btn-modal-close:hover {
    background: var(--aipcm-brand-teal-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(30, 173, 166, 0.3);
}

.btn-modal-close:active {
    transform: scale(0.95);
}

/* Quiz & Evaluation Styles */
.aipcm-quiz-container,
.aipcm-evaluation-container {
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 12px;
    margin: 20px 0;
}

.quiz-intro h3,
.aipcm-evaluation-container h3 {
    margin-top: 0;
    color: #333;
}

.quiz-q-box {
    animation: fadeIn 0.3s ease-out;
}

.quiz-progress-mini {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.quiz-q-text {
    font-size: 18px;
    margin-bottom: 20px;
    color: #222;
}

.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option label {
    display: block;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-option input {
    margin-right: 10px;
}

.quiz-option:hover label {
    border-color: var(--aipcm-brand-green);
    background: #f0fafa;
}

.quiz-option input:checked+label {
    border-color: var(--aipcm-brand-green);
    background: #f0fafa;
    box-shadow: 0 0 0 1px var(--aipcm-brand-green);
}

.evaluation-status {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #ccc;
}

.evaluation-status.pending {
    background: #fffdf0;
    border-color: #ffc107;
    color: #856404;
}

.evaluation-status.approved {
    background: #f0fff4;
    border-color: #28a745;
    color: #155724;
}

.evaluation-status.rejected {
    background: #fff5f5;
    border-color: #dc3545;
    color: #721c24;
}

.instructor-feedback {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px dashed #ccc;
    font-size: 0.9em;
}

.quiz-results {
    text-align: center;
    padding: 30px;
}

.quiz-results h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.quiz-results.success {
    color: #28a745;
}

.quiz-results.error {
    color: #dc3545;
}

.quiz-results .score {
    font-size: 1.2em;
    font-weight: bold;
    margin: 20px 0;
}


.aipcm-nav-locked {
    opacity: 0.5;
    cursor: not-allowed !important;
}

/* Dynamic Mini Cart */
.aipcm-dynamic-cart-wrapper {
    position: relative;
    display: inline-block;
}

.aipcm-mini-cart-button {
    background: #1eada6;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(30, 173, 166, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.aipcm-mini-cart-button:hover {
    transform: scale(1.1);
    background: #1a9690;
    color: white;
}

.aipcm-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4d4d;
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.aipcm-cart-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    overflow: hidden;
    animation: aipcm-fade-up 0.3s ease-out;
}

@keyframes aipcm-fade-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aipcm-dynamic-cart-wrapper:hover .aipcm-cart-dropdown {
    display: block;
}

.aipcm-cart-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.aipcm-cart-header h4 {
    margin: 0;
    font-size: 16px;
    color: #1e293b;
}

.aipcm-cart-close {
    cursor: pointer;
    font-size: 20px;
    color: #94a3b8;
}

.aipcm-cart-items {
    max-height: 250px;
    overflow-y: auto;
    padding: 10px 0;
}

.aipcm-cart-item {
    display: flex;
    padding: 12px 20px;
    gap: 12px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.aipcm-cart-item:hover {
    background: #f8fafc;
}

.aipcm-cart-item .item-img img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    background: #eee;
}

.aipcm-cart-item .item-info h5 {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #334155;
    line-height: 1.2;
}

.aipcm-cart-item .item-price {
    font-size: 13px;
    color: #1eada6;
    font-weight: 700;
}

.aipcm-cart-footer {
    padding: 20px;
    background: #f8fafc;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 15px;
}

.aipcm-btn-mini {
    background: #1eada6;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.aipcm-btn-mini:hover {
    background: #1a9690;
    box-shadow: 0 4px 10px rgba(30, 173, 166, 0.2);
}

/* Toasts */
.aipcm-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 24px;
    background: #1e293b;
    color: white;
    border-radius: 12px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: aipcm-toast-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.aipcm-toast.success {
    border-left: 4px solid #1eada6;
}

.aipcm-toast.error {
    border-left: 4px solid #ff4d4d;
}

@keyframes aipcm-toast-in {
    from {
        transform: translateX(100%) scale(0.8);
        opacity: 0;
    }

    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.spin {
    animation: aipcm-spin 1s linear infinite;
}

@keyframes aipcm-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE STYLES — ACADEMIA LMS FULL PLUGIN
   ═══════════════════════════════════════════════════════════════════ */

/* Tablet grande (≤1200px) */
@media (max-width: 1200px) {
    .aipcm-dashboard-grid-layout {
        grid-template-columns: 1fr;
    }

    .aipcm-hero-card {
        padding: 40px;
        min-height: 220px;
    }

    .aipcm-hero-card h1 {
        font-size: 32px;
    }
}

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
    :root {
        --aipcm-header-height: 90px;
    }

    .aipcm-sidebar {
        width: 200px;
        padding: 0 12px 40px;
    }

    .aipcm-nav-item {
        font-size: 13px;
        padding: 10px 14px;
    }

    .aipcm-main-area {
        padding: 0 24px 30px;
    }

    .aipcm-hero-card {
        padding: 30px;
    }

    /* Course cards 2 cols */
    .aipcm-courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
    :root {
        --aipcm-header-height: 65px;
    }

    /* ── HEADER ── */
    .aipcm-dashboard-header {
        top: 0;
        left: 0;
        right: 0;
        border-radius: 0;
        padding: 0 16px;
        height: var(--aipcm-header-height);
    }

    .aipcm-logo-img {
        height: 50px !important;
        max-width: 140px !important;
    }

    .aipcm-header-username {
        display: none;
    }

    .aipcm-header-left {
        gap: 16px;
    }

    /* ── APP LAYOUT: stack sidebar below header ── */
    .aipcm-app-layout {
        flex-direction: column;
        padding-top: var(--aipcm-header-height);
    }

    /* ── SIDEBAR: horizontal scrollable tab bar ── */
    .aipcm-sidebar {
        width: 100%;
        padding: 10px 12px 0;
        flex-direction: row;
        overflow: hidden;
        border-bottom: 2px solid #e8ecf0;
    }

    .aipcm-menu-label {
        display: none;
    }

    .aipcm-nav-menu {
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
        margin-bottom: 0;
        padding-bottom: 10px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        flex-wrap: nowrap;
        width: 100%;
    }

    .aipcm-nav-menu::-webkit-scrollbar {
        display: none;
    }

    .aipcm-nav-item {
        border-radius: 20px;
        font-size: 12px;
        padding: 8px 14px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .aipcm-nav-item .dashicons {
        margin-right: 6px;
        font-size: 15px;
    }

    .aipcm-nav-menu.support-menu {
        display: none;
    }

    /* hide support on mobile */

    /* ── MAIN AREA ── */
    .aipcm-main-area {
        padding: 20px 16px 80px;
    }

    /* ── HERO CARD ── */
    .aipcm-hero-card {
        padding: 24px;
        min-height: auto;
        flex-direction: column;
    }

    .hero-content-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .aipcm-hero-card h1 {
        font-size: 24px;
    }

    .hero-subtitle {
        font-size: 14px !important;
    }

    .hero-circle-actions {
        gap: 10px;
    }

    .hero-circle-btn {
        width: 44px;
        height: 44px;
    }

    /* ── GRID ── */
    .aipcm-dashboard-grid-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* ── COURSES GRID ── */
    .aipcm-courses-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* ── STATS ── */
    .aipcm-dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .aipcm-stat-box {
        padding: 18px;
    }

    .aipcm-stat-number {
        font-size: 22px;
    }

    /* ── CARDS ── */
    .aipcm-card {
        padding: 20px;
        border-radius: 16px;
    }

    /* ── USER COURSE ITEMS ── */
    .aipcm-user-course-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .aipcm-user-course-item .aipcm-course-thumbnail {
        width: 100%;
        aspect-ratio: 16/9;
    }

    /* ── SUBSCRIPTION PLANS ── */
    .aipcm-subscription-plans {
        grid-template-columns: 1fr;
    }

    /* ── TOPBAR ── */
    .aipcm-topbar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .aipcm-search-bar {
        max-width: 100%;
    }

    /* ── LIVE CLASSES ── */
    .aipcm-live-class-item {
        flex-direction: column;
        align-items: flex-start;
    }

    /* ── COURSE META ROW ── */
    .aipcm-course-meta-header {
        flex-direction: column;
        gap: 8px;
    }

    /* Toast mobile */
    .aipcm-toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        font-size: 13px;
    }
}

/* Small mobile (≤480px) */
@media (max-width: 480px) {
    .aipcm-hero-card h1 {
        font-size: 20px;
    }

    .aipcm-dashboard-stats {
        grid-template-columns: 1fr;
    }

    .aipcm-stat-box {
        flex-direction: row;
        align-items: center;
        padding: 14px 16px;
    }

    .aipcm-nav-item span:last-child {
        display: none;
        /* show only icon on very small screens */
    }

    .aipcm-nav-item .dashicons {
        margin-right: 0;
    }

    .aipcm-nav-item {
        padding: 8px 12px;
        min-width: 40px;
        justify-content: center;
    }

    .aipcm-course-meta-row {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Print */
@media print {

    .aipcm-sidebar,
    .aipcm-dashboard-header,
    .aipcm-topbar {
        display: none;
    }

    .aipcm-app-layout {
        padding-top: 0;
    }

    .aipcm-main-area {
        padding: 0;
    }
}

/* ─── Dashboard Course Grids ──────────────────────────────────────── */
.aipcm-courses-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, 1fr);
}

.aipcm-courses-grid.two-col {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.aipcm-courses-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

/* Course card modern (compact card inside dashboard) */
.course-card-modern {
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all .3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.course-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--aipcm-brand-green);
}

.course-img-modern {
    position: relative;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.course-card-modern:hover .course-img-modern {
    transform: scale(1.02);
}

.course-title-overlay {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.course-title-overlay span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--aipcm-brand-green);
    display: block;
    margin-bottom: 8px;
}

.course-title-overlay h4 {
    margin: 0;
    font-size: 17px;
    font-family: var(--aipcm-font-heading);
    font-weight: 800;
    color: var(--aipcm-text-primary);
    line-height: 1.4;
}

.level-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    color: var(--aipcm-brand-green);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.course-meta-modern {
    padding: 0 20px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-meta-modern span {
    font-size: 12px;
    font-weight: 700;
    color: var(--aipcm-text-gray);
}

.course-meta-modern .progress-value {
    color: var(--aipcm-brand-green);
    background: #e6fffa;
    padding: 2px 10px;
    border-radius: 20px;
}

.aipcm-progress-bar.micro {
    height: 6px;
    margin: 0;
    border-radius: 0;
    background: #f1f5f9;
}

.aipcm-progress-bar.micro .aipcm-progress-fill {
    background: linear-gradient(90deg, var(--aipcm-brand-green), #4fd1c5);
}

/* Responsive grids */
@media (max-width: 1024px) {
    .aipcm-courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .aipcm-courses-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .aipcm-courses-grid.two-col {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .aipcm-courses-grid-v2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/*  Achievements Tooltips  */
.aipcm-has-tooltip {
    position: relative;
    cursor: help;
}

.tooltip-content {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #213a58;
    color: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    width: 220px;
    text-align: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    pointer-events: none;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #213a58 transparent transparent transparent;
}

.aipcm-has-tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/*  Leaderboard Premium Styles  */
.aipcm-leaderboard {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

.aipcm-leaderboard-container {
    width: 100%;
}

.aipcm-leaderboard-header {
    display: grid;
    grid-template-columns: 80px 1fr 120px 140px;
    padding: 20px;
    background: #f8fafc;
    border-bottom: 1px solid #edf2f7;
    font-weight: 800;
    font-size: 13px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aipcm-leaderboard-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px 140px;
    padding: 15px 20px;
    align-items: center;
    transition: all 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.aipcm-leaderboard-row:last-child {
    border-bottom: none;
}

.aipcm-leaderboard-row:hover {
    background: #f0fdfa;
}

.aipcm-leaderboard-row.current-user {
    background: #e6fffa;
    border-left: 4px solid #1eada6;
}

.aipcm-rank-number {
    font-weight: 900;
    font-size: 16px;
    color: #94a3b8;
}

.aipcm-rank-number .medal {
    font-size: 22px;
}

.aipcm-user-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.aipcm-user-name .display-name {
    font-weight: 700;
    color: #213a58;
    font-size: 15px;
}

.badge-self {
    font-size: 10px;
    background: #1eada6;
    color: #fff;
    padding: 2px 8px;
    border-radius: 50px;
    text-transform: uppercase;
    font-weight: 800;
}

.level-pill {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
}

.aipcm-user-xp .xp-val {
    font-weight: 800;
    color: #1eada6;
    font-size: 15px;
}

.achievements-page-v2 {
    max-width: 1100px;
    margin: 0 auto;
}

.achievements-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.achievement-card-v2 {
    background: #fff;
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s;
}

.achievement-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.badge-icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--badge-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.achievement-card-v2 h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 800;
    color: #213a58;
}

.badge-state {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 50px;
}

.achievement-card-v2.completado .badge-state {
    background: #f0fff4;
    color: #2f855a;
}

.achievement-card-v2.bloqueado {
    filter: grayscale(0.8);
    opacity: 0.7;
}

.achievement-card-v2.en-progreso .badge-state {
    background: #fff7ed;
    color: #c2410e;
}

@media (max-width: 600px) {

    .aipcm-leaderboard-header,
    .aipcm-leaderboard-row {
        grid-template-columns: 50px 1fr 80px;
    }

    .aipcm-level-head,
    .aipcm-user-level {
        display: none;
    }
}

