/**
 * Estilos para Dashboard Análisis Situacional
 * Estilos específicos para la visualización de análisis situacional en el dashboard
 */

/* ===== CONTENEDORES PRINCIPALES ===== */
.analysis-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.section-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.section-header h3 i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0;
}

/* ===== GRIDS MEJORADOS ===== */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.cv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

/* ===== TOOLTIPS Y INTERACTIVIDAD ===== */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #2c3e50;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip:hover::after,
.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ===== EFECTOS DE FOCUS Y ACCESIBILIDAD ===== */
.topic-card:focus-within {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

.practice-btn:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

/* ===== INDICADORES DE ESTADO ===== */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 500;
}

.status-indicator.needs-attention {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #c53030;
}

.status-indicator.improvement {
    background: linear-gradient(135deg, #fef2de 0%, #fbd38d 100%);
    color: #c05621;
}

.status-indicator.good {
    background: linear-gradient(135deg, #e6fffa 0%, #b2f5ea 100%);
    color: #2c7a7b;
}

.status-indicator i {
    font-size: 0.8rem;
}

/* ===== MÉTRICAS VISUALES ===== */
.metric-comparison {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
}

.metric-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
}

.metric-trend.up {
    color: #27ae60;
}

.metric-trend.down {
    color: #e74c3c;
}

.metric-trend.stable {
    color: #6b7280;
}

.metric-trend i {
    font-size: 0.9rem;
}

/* ===== SECCIÓN DE TEMAS DÉBILES MEJORADA ===== */
.analysis-section.weak-topics-enhanced {
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
    border: 2px solid #fed7d7;
}

.analysis-section.weak-topics-enhanced .section-header h3 {
    color: #c53030;
}

.analysis-section.weak-topics-enhanced .section-header {
    background: linear-gradient(135deg, #fed7d7 0%, transparent 100%);
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    padding: 1.5rem;
    border-radius: 16px 16px 0 0;
}

/* ===== ESTADOS MEJORADOS ===== */
.loading-state, .empty-state, .error-state {
    text-align: center;
    padding: 3rem 1.5rem;
    border-radius: 12px;
    margin: 1rem 0;
}

.loading-state {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    color: #4a5568;
}

.empty-state {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    color: #2d3748;
}

.error-state {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #c53030;
}

.loading-state i, .empty-state i, .error-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.loading-state h4, .empty-state h4, .error-state h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.loading-state p, .empty-state p, .error-state p {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* ===== SPINNER MEJORADO ===== */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* ===== BADGE DE RANK MEJORADO ===== */

/* ===== TARJETAS DE TEMAS MEJORADAS ===== */
.topic-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--topic-color), transparent);
    opacity: 0.8;
}

.topic-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--topic-color) 0%, transparent 50%);
    opacity: 0.03;
    pointer-events: none;
}

.topic-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: var(--topic-color);
}

.topic-card.critical {
    --topic-color: #e74c3c;
    background: linear-gradient(135deg, #ffebee 0%, #ffffff 100%);
    border-left: 4px solid #e74c3c;
}

.topic-card.below-average {
    --topic-color: #f39c12;
    background: linear-gradient(135deg, #fff8e1 0%, #ffffff 100%);
    border-left: 4px solid #f39c12;
}

.topic-card.average {
    --topic-color: #3498db;
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
    border-left: 4px solid #3498db;
}

.topic-card.good {
    --topic-color: #27ae60;
    background: linear-gradient(135deg, #e8f5e8 0%, #ffffff 100%);
    border-left: 4px solid #27ae60;
}

.topic-card.good {
    --topic-color: #27ae60;
    background: linear-gradient(135deg, #e8f5e8 0%, #ffffff 100%);
    border-left: 4px solid #27ae60;
}

.topic-card.excellent {
    --topic-color: #27ae60;
    background: linear-gradient(135deg, #e8f5e8 0%, #ffffff 100%);
    border-left: 4px solid #27ae60;
}

/* ===== CONTENIDO DE TARJETAS DE TEMAS MEJORADO ===== */
.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.topic-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.3rem;
}

.topic-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.score-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    background: linear-gradient(135deg, var(--topic-color), rgba(0,0,0,0.1));
    margin-bottom: 0.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.score-label {
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.topic-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

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

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--topic-color);
}

.stat-label {
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-indicator {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin: 0.75rem 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--topic-color), rgba(255,255,255,0.2));
    border-radius: 3px;
    transition: width 0.8s ease;
}

.practice-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--topic-color), rgba(0,0,0,0.1));
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.75rem;
    width: 100%;
    justify-content: center;
}

.practice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.practice-btn i {
    font-size: 0.9rem;
}

/* ===== BADGE DE RANK MEJORADO ===== */
.topic-rank {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    border: 3px solid white;
    animation: pulse-rank 2s infinite;
    z-index: 10;
}

.topic-rank.critical-rank {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
    animation: pulse-critical 2s infinite;
}

.topic-rank.warning-rank {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

/* ===== ANIMACIONES ===== */
@keyframes pulse-rank {
    0% { 
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }
}

@keyframes pulse-critical {
    0% { 
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 8px 20px rgba(231, 76, 60, 0.7);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
    }
}

/* ===== EFECTOS DE ENTRADA ===== */
.topic-card.animate-in {
    animation: slideInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== BADGES DE PRIORIDAD ===== */
.priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
}

.priority-badge.high {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #c53030;
}

.priority-badge.medium {
    background: linear-gradient(135deg, #fef2de 0%, #fbd38d 100%);
    color: #c05621;
}

.priority-badge.low {
    background: linear-gradient(135deg, #e6fffa 0%, #b2f5ea 100%);
    color: #2c7a7b;
}

.topic-info {
    margin-top: 0.5rem;
}

.topic-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.topic-score {
    margin-bottom: 0.75rem;
}

.score-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--topic-color);
    display: block;
    margin-bottom: 0.5rem;
}

.score-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--topic-color), rgba(var(--topic-color), 0.7));
    border-radius: 4px;
    transition: width 0.6s ease;
    position: relative;
}

.score-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.topic-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #6b7280;
}

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

.priority-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-badge.critical {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.priority-badge.high {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.priority-badge.medium {
    background: rgba(241, 196, 15, 0.1);
    color: #f1c40f;
}

.priority-badge.low {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

/* ===== TARJETAS DE CV ===== */
.cv-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cv-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.cv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f8f9fa;
}

.cv-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    flex: 1;
}

.cv-score {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: #f8f9fa;
    min-width: 60px;
    text-align: center;
}

.cv-score.excellent {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.cv-score.good {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.cv-score.average {
    background: rgba(241, 196, 15, 0.1);
    color: #f1c40f;
}

.cv-score.below-average {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.cv-score.critical {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.cv-details {
    margin-bottom: 1rem;
}

.cv-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.field-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 0.9rem;
}

.field-value {
    color: #2c3e50;
    font-size: 0.9rem;
    text-align: right;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cv-strengths {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.strengths-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.strengths-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.strength-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===== ESTADOS ESPECIALES ===== */
.loading-state,
.error-state,
.no-data-message,
.no-auth-message {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
}

.loading-state .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.error-state i,
.no-data-message i,
.no-auth-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.error-state h4,
.no-data-message h4,
.no-auth-message h4 {
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.btn-retry,
.btn-create {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.btn-retry:hover,
.btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ===== CONTENEDORES EN EL DASHBOARD ===== */
#analysis-progress-topics,
#analysis-cv-info {
    min-height: 200px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .topics-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .cv-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .analysis-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .section-header h3 {
        font-size: 1.25rem;
    }
    
    .topic-card,
    .cv-card {
        padding: 1rem;
    }
    
    .cv-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .cv-score {
        align-self: flex-end;
    }
    
    .cv-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .field-value {
        max-width: 100%;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .analysis-section {
        padding: 0.75rem;
        border-radius: 12px;
    }
    
    .section-header {
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .section-header h3 {
        font-size: 1.1rem;
    }
    
    .topic-rank {
        width: 25px;
        height: 25px;
        font-size: 0.7rem;
    }
    
    .topic-name {
        font-size: 0.95rem;
    }
    
    .score-value {
        font-size: 1.1rem;
    }
    
    .strengths-list {
        flex-direction: column;
    }
    
    .strength-tag {
        text-align: center;
    }
}

/* ===== ANIMACIONES ===== */
.analysis-section {
    animation: fadeInUp 0.6s ease-out;
}

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

.topic-card,
.cv-card {
    animation: slideInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.topic-card:nth-child(1) { animation-delay: 0.1s; }
.topic-card:nth-child(2) { animation-delay: 0.2s; }
.topic-card:nth-child(3) { animation-delay: 0.3s; }
.topic-card:nth-child(4) { animation-delay: 0.4s; }
.topic-card:nth-child(5) { animation-delay: 0.5s; }

.cv-card:nth-child(1) { animation-delay: 0.1s; }
.cv-card:nth-child(2) { animation-delay: 0.2s; }
.cv-card:nth-child(3) { animation-delay: 0.3s; }

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

/* ===== EFECTOS HOVER ===== */
.topic-card:hover .score-fill::after {
    animation-duration: 1s;
}

.cv-card:hover .strength-tag {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
    .topic-card,
    .cv-card,
    .analysis-section {
        animation: none;
    }
    
    .score-fill::after {
        animation: none;
    }
    
    .loading-state .spinner {
        animation: none;
        border-top-color: #667eea;
    }
}

/* ===== MODO OSCURO (futuro) ===== */
@media (prefers-color-scheme: dark) {
    .analysis-section {
        background: rgba(30, 41, 59, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .section-header h3 {
        color: #f1f5f9;
    }
    
    .section-header p {
        color: #94a3b8;
    }
    
    .topic-card,
    .cv-card {
        background: #334155;
        border-color: #475569;
    }
    
    .topic-name,
    .cv-name {
        color: #f1f5f9;
    }
    
    .field-label,
    .strengths-label {
        color: #94a3b8;
    }
    
    .field-value {
        color: #e2e8f0;
    }
}

/* ===== ESTILOS ADICIONALES PARA ELEMENTOS FALTANTES ===== */

/* Tarjetas de análisis mejoradas */
.analysis-item {
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.analysis-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

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

.analysis-date {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.analysis-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.analysis-content h4 {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.analysis-content p {
    color: #6b7280;
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
}

.cv-details {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.detail-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.analysis-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.view-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Tarjetas de temas débiles */
.topic-card {
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.topic-card.weak-topic {
    border-left: 4px solid #ef4444;
}

.topic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.topic-rank {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.topic-info h5 {
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

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

.topic-score {
    font-weight: 700;
    font-size: 1.1rem;
}

.topic-score.critical {
    color: #ef4444;
}

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

.topic-score.good {
    color: #10b981;
}

.topic-questions {
    color: #6b7280;
    font-size: 0.875rem;
}

.topic-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    background: #f1f5f9;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.progress-fill.critical {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

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

.progress-fill.good {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.topic-actions {
    display: flex;
    justify-content: center;
}

.study-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.study-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Tarjetas de resumen de CV */
.cv-summary-card {
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cv-summary-card h5 {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.stat-label {
    display: block;
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 700;
}

.opec-distribution {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.opec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 6px;
}

.opec-label {
    color: #374151;
    font-weight: 500;
}

.opec-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Resumen de CV */
.cv-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
}

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

.summary-card i {
    font-size: 1.5rem;
    color: #667eea;
}

.summary-info {
    display: flex;
    flex-direction: column;
}

.summary-label {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.summary-value {
    color: #2c3e50;
    font-size: 1.25rem;
    font-weight: 700;
}

/* Pestañas mejoradas */
.tab-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* ===== ESTILOS PARA ANÁLISIS DE CV ===== */
.cv-summary-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.cv-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.cv-summary-card.summary-main {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #3498db;
}

.summary-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f5f9;
}

.summary-header h5,
.summary-header h6 {
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-header h5 {
    font-size: 1.2rem;
}

.summary-header h6 {
    font-size: 1rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    text-align: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.stat-value.good {
    color: #10b981;
}

.stat-value.warning {
    color: #f59e0b;
}

.stat-value.critical {
    color: #ef4444;
}

/* OPEC Distribution */
.opec-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.opec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.opec-name {
    font-weight: 600;
    color: #374151;
}

.opec-count {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.opec-bar {
    flex: 1;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin: 0 0.75rem;
    overflow: hidden;
}

.opec-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Recent Analyses */
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
}

.recent-item:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: #3b82f6;
    transform: translateX(2px);
}

.recent-info {
    flex: 1;
}

.recent-name {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.recent-details {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.recent-score {
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    color: white;
}

.recent-score.good {
    background: #10b981;
}

.recent-score.warning {
    background: #f59e0b;
}

.recent-score.critical {
    background: #ef4444;
}

/* Quick Actions */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.action-btn {
    flex: 1;
    min-width: 140px;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.action-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.action-btn.secondary {
    background: #f8fafc;
    color: #374151;
    border: 1px solid #d1d5db;
}

.action-btn.secondary:hover {
    background: #f1f5f9;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

/* Estilos para temas débiles mejorados */
.weak-topics-summary {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 10px;
    border: 1px solid #f59e0b;
}

.summary-card h6 {
    color: #92400e;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.summary-card p {
    margin: 0.25rem 0;
    color: #78350f;
}

.summary-tip {
    font-style: italic;
    font-size: 0.9rem;
    margin-top: 0.5rem !important;
}

/* Botones de acción para temas */
.topic-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.study-btn,
.practice-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.study-btn.btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.practice-btn.btn-secondary {
    background: #f8fafc;
    color: #374151;
    border: 1px solid #d1d5db;
}

.study-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.3);
}

.practice-btn:hover {
    background: #f1f5f9;
    border-color: #9ca3af;
}

/* Estados de color mejorados */
.topic-score.improvement,
.topic-status.improvement {
    color: #f59e0b;
}

.topic-details {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0.5rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        min-width: auto;
    }
    
    .recent-details {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* ===== ESTILOS RESPONSIVOS PARA TEMAS DÉBILES ===== */
@media (max-width: 768px) {
    .topics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .topic-card {
        padding: 1.25rem;
    }
    
    .topic-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .topic-score {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        min-width: auto;
    }
    
    .score-circle {
        width: 45px;
        height: 45px;
        font-size: 0.9rem;
    }
    
    .topic-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .stat-item {
        flex: 1;
        min-width: 80px;
    }
    
    .topic-rank {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
        top: -6px;
        right: -6px;
    }
}

@media (max-width: 480px) {
    .analysis-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .topics-grid {
        gap: 0.75rem;
    }
    
    .topic-card {
        padding: 1rem;
    }
    
    .topic-title {
        font-size: 1rem;
    }
    
    .score-circle {
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }
    
    .practice-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .topic-card {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .topic-card.critical {
        background: linear-gradient(135deg, #4a2c2a 0%, #2d1b1b 100%);
    }
    
    .topic-card.below-average {
        background: linear-gradient(135deg, #4a3e2a 0%, #2d261b 100%);
    }
    
    .topic-card.average {
        background: linear-gradient(135deg, #2a3f4a 0%, #1b2d35 100%);
    }
    
    .topic-card.good {
        background: linear-gradient(135deg, #2a4a32 0%, #1b2d20 100%);
    }
    
    .topic-title {
        color: #e2e8f0;
    }
    
    .loading-state, .empty-state, .error-state {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        color: #e2e8f0;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .topic-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .practice-btn {
        display: none;
    }
    
    .topic-rank {
        position: static;
        display: inline-flex;
        margin-left: 0.5rem;
    }
}

/* Estados especiales: vacío y excelente performance */
.empty-state {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    border: 2px dashed #e2e8f0;
    transition: all 0.3s ease;
}

.empty-state:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.empty-state i {
    font-size: 4rem;
    color: #4a90e2;
    margin-bottom: 1.5rem;
    display: block;
}

.empty-state h4 {
    color: #2d3748;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.excellent-performance {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #e8f5e8 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(46, 204, 113, 0.1);
    border: 2px solid #c6f6d5;
    margin: 2rem 0;
    transition: all 0.3s ease;
}

.excellent-performance:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(46, 204, 113, 0.15);
}

.excellent-performance h4 {
    color: #2d3748;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.excellent-performance p {
    color: #4a5568;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Botones especiales para estados */
.empty-state .practice-btn,
.excellent-performance .practice-btn {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.3);
}

.empty-state .practice-btn:hover,
.excellent-performance .practice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.4);
}

.excellent-performance .practice-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    box-shadow: 0 4px 16px rgba(39, 174, 96, 0.3);
}

.excellent-performance .practice-btn:hover {
    box-shadow: 0 8px 24px rgba(39, 174, 96, 0.4);
}

/* Iconos animados */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.empty-state i,
.excellent-performance div:first-child {
    animation: pulse 2s infinite;
}

/* ===== DISEÑO MEJORADO ESTILO MIPROGRESO ===== */

/* Contenedor principal de temas débiles - AMPLIADO PARA 6+ TEMAS */
.weak-topics-main-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 600px;
}

/* Header con estadísticas generales */
.topics-header-stats {
    margin-bottom: 2rem;
}

.stat-summary-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.25);
}

.stat-summary-card .stat-item {
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-summary-card .stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.stat-summary-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.stat-summary-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-summary-card .priority-critical .stat-value {
    color: #ffccd5;
}

.stat-summary-card .priority-improving .stat-value {
    color: #c6f6d5;
}

/* Grid mejorado de temas - VERSIÓN OPTIMIZADA PARA MÁXIMA VISUALIZACIÓN */
.topics-enhanced-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    max-height: none; /* Eliminar limitación de altura */
    overflow: visible; /* Permitir que se vea todo el contenido */
    padding-right: 8px;
}

/* Responsive breakpoints optimizados */
@media (min-width: 1600px) {
    .topics-enhanced-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) and (max-width: 1599px) {
    .topics-enhanced-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .topics-enhanced-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .topics-enhanced-grid {
        grid-template-columns: 1fr;
    }
}

/* Tarjetas de temas mejoradas - VERSIÓN COMPACTA */
.topic-card-enhanced {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
    min-height: 220px;
    max-height: 260px;
}

.topic-card-enhanced:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.topic-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 20px 20px 0 0;
}

/* Estilo especial para temas simulados */
.topic-card-enhanced.simulated {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px dashed #cbd5e1;
    opacity: 0.85;
}

.topic-card-enhanced.simulated::before {
    background: linear-gradient(90deg, #94a3b8, #64748b);
}

.topic-card-enhanced.simulated::after {
    content: '🎯 Tema de práctica';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    font-weight: 500;
}

/* Header de tarjeta de tema - COMPACTO */
.topic-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.topic-rank-badge {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.topic-priority-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 50px;
    border: 1px solid;
}

.topic-priority-badge.priority-critica {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

.topic-priority-badge.priority-alta {
    background: #fed7aa;
    color: #ea580c;
    border-color: #fdba74;
}

.topic-priority-badge.priority-media {
    background: #fef3c7;
    color: #d97706;
    border-color: #fde68a;
}

.topic-priority-badge.priority-baja {
    background: #dcfce7;
    color: #16a34a;
    border-color: #bbf7d0;
}

/* Contenido principal de la tarjeta - COMPACTO */
.topic-content-main {
    margin-bottom: 1rem;
}

.topic-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6rem;
}

/* Display de puntaje mejorado - COMPACTO */
.topic-score-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.score-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.score-inner {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.score-value {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.score-details {
    flex: 1;
}

.score-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
}

.score-stat .label {
    color: #64748b;
    font-weight: 500;
}

.score-stat .value {
    color: #1e293b;
    font-weight: 600;
}

.score-stat.trend-mejorando .value {
    color: #16a34a;
}

.score-stat.trend-empeorando .value {
    color: #dc2626;
}

.score-stat.trend-estable .value {
    color: #64748b;
}

/* Metadata del tema - COMPACTO */
.topic-metadata {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    color: #64748b;
}

.metadata-item i {
    color: #94a3b8;
    font-size: 0.75rem;
}

/* Acciones del tema - COMPACTO */
.topic-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.practice-btn-enhanced,
.study-btn-enhanced {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    text-decoration: none;
    color: white;
}

.practice-btn-enhanced {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.practice-btn-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.practice-btn-enhanced.priority-critica {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.practice-btn-enhanced.priority-critica:hover {
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.study-btn-enhanced {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.study-btn-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

/* Indicador de progreso */
.progress-indicator {
    position: relative;
    margin-top: 1rem;
}

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

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease-out;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

/* Sección motivacional */
.motivational-section {
    margin-top: 3rem;
}

.motivation-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid #bae6fd;
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.1);
}

.motivation-icon {
    font-size: 3rem;
    color: #0284c7;
    flex-shrink: 0;
}

.motivation-content h4 {
    color: #0c4a6e;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.motivation-content p {
    color: #0369a1;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.plan-link {
    background: #0284c7;
    color: white;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.plan-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.4);
}

.practice-link {
    background: white;
    color: #0284c7;
    border: 2px solid #0284c7;
}

.practice-link:hover {
    background: #0284c7;
    color: white;
    transform: translateY(-2px);
}

/* Animaciones */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Responsivo para estados especiales */
@media (max-width: 768px) {
    .empty-state,
    .excellent-performance {
        padding: 2.5rem 1.5rem;
    }
    
    .empty-state h4,
    .excellent-performance h4 {
        font-size: 1.5rem;
    }
    
    .empty-state p,
    .excellent-performance p {
        font-size: 1rem;
    }
    
    .empty-state i {
        font-size: 3rem;
    }
    
    .empty-state .practice-btn,
    .excellent-performance .practice-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    /* Responsive para diseño mejorado */
    .topics-enhanced-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-summary-card {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .stat-summary-card .stat-value {
        font-size: 2rem;
    }
    
    .topic-score-display {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .topic-actions {
        flex-direction: column;
    }
    
    .motivation-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .quick-actions {
        justify-content: center;
    }
}

/* ===== ESTILOS PARA ANÁLISIS DE CV DETALLADO ===== */

/* Header del CV mejorado */
.cv-name-section {
    flex: 1;
}

.cv-document {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
    background: #f1f5f9;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    display: inline-block;
}

.cv-total-score {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    min-width: 120px;
}

/* Información básica del CV */
.cv-basic-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.info-item i {
    color: #667eea;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.info-item span {
    color: #374151;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Estilos especiales para dictamen */
.info-item.dictamen-apto {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
}

.info-item.dictamen-apto i {
    color: #10b981;
}

.info-item.dictamen-apto span {
    color: #065f46;
    font-weight: 600;
}

/* Sección de puntuaciones detalladas */
.cv-scores-detail {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

.scores-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
}

.scores-title i {
    color: #667eea;
    font-size: 1.2rem;
}

.scores-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.score-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
}

.score-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.score-item.highest-score {
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.score-item.highest-score::after {
    content: '🏆 Mejor puntuación';
    position: absolute;
    top: -8px;
    right: 1rem;
    background: #10b981;
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-weight: 600;
}

.score-category {
    flex: 1;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.score-points {
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 70px;
    text-align: center;
    padding: 0.5rem;
    border-radius: 8px;
    color: white;
}

.score-points.excellent {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.score-points.good {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.score-points.average {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.score-points.below-average {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.score-points.critical {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
}

.score-bar-container {
    flex: 1;
    margin-left: 1rem;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.score-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

/* Información adicional del CV */
.cv-additional-info {
    margin-bottom: 1.5rem;
}

.info-section {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.info-section.fortalezas {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #bbf7d0;
}

.info-section.brechas {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fca5a5;
}

.info-section h6 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: #374151;
}

.info-section.fortalezas h6 {
    color: #065f46;
}

.info-section.fortalezas i {
    color: #10b981;
}

.info-section.brechas h6 {
    color: #7f1d1d;
}

.info-section.brechas i {
    color: #ef4444;
}

.info-text {
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
    font-size: 0.9rem;
}

/* Footer del CV */
.cv-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* ===== NUEVOS ESTILOS PARA ANÁLISIS MEJORADO ===== */

/* Badge de versión */
.version-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Recomendaciones de perfil */
.cv-recommendations, .cv-thematic-line {
    background: #f8f9ff;
    border-left: 4px solid #667eea;
    padding: 0.75rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.recommendation-item, .thematic-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.recommendation-item i, .thematic-item i {
    color: #667eea;
    font-size: 1.1rem;
    margin-top: 0.2rem;
}

.rec-content, .thematic-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rec-label, .thematic-label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.85rem;
}

.rec-value, .thematic-value {
    color: #2d3748;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Áreas de especialización */
.cv-specialization-areas {
    margin: 1rem 0;
    padding: 0.75rem;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.cv-specialization-areas h6 {
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.specialization-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.specialization-tag {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Análisis de brechas detallado */
.gap-analysis {
    background: #fffaf0;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.gap-subsection {
    margin-bottom: 1rem;
}

.gap-subsection:last-child {
    margin-bottom: 0;
}

.gap-subsection strong {
    color: #c05621;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.gap-list {
    margin: 0;
    padding-left: 1.5rem;
    color: #744210;
}

.gap-list li {
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.competencias-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.competencia-tag {
    background: #fed7aa;
    color: #c05621;
    padding: 0.25rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Botón de detalles en footer */
.cv-details-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cv-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ===== MODAL DE DETALLES DE CV ===== */
.cv-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(4px);
    }
}

.cv-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.cv-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cv-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cv-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

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

.cv-modal-body {
    padding: 1.5rem;
    max-height: calc(90vh - 180px);
    overflow-y: auto;
}

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

.cv-detail-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #e9ecef;
}

.cv-detail-section.full-width {
    grid-column: 1 / -1;
}

.cv-detail-section h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.cv-detail-section h3 i {
    color: #667eea;
}

.detail-items, .calculo-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item, .calculo-item {
    background: white;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.detail-item strong, .calculo-item strong {
    color: #4a5568;
    font-size: 0.9rem;
}

.score-highlight {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.text-content {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    line-height: 1.6;
    color: #4a5568;
}

.fortalezas-content {
    border-left: 4px solid #48bb78;
}

.brechas-content {
    border-left: 4px solid #ed8936;
}

.recomendaciones-content {
    border-left: 4px solid #4299e1;
}

.cv-modal-footer {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid #e9ecef;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

/* Responsive para modal */
@media (max-width: 768px) {
    .cv-modal-content {
        margin: 0.5rem;
        max-height: 95vh;
    }
    
    .cv-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .cv-modal-header {
        padding: 1rem;
    }
    
    .cv-modal-header h2 {
        font-size: 1.25rem;
    }
    
    .cv-modal-body {
        padding: 1rem;
    }
    
    .cv-modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
}
