/* ============================================
   MÓDULO: INNO RESEARCH - Estilos del Componente de Investigación
   Plataforma de Investigación Clínica - One MEDITEL LATAM
   Fecha: 2026-01-30
   ============================================ */

/* =====================================================
   VARIABLES Y TEMA
   ===================================================== */
:root {
    --research-primary: #1F6BA7;
    --research-primary-dark: #155a8a;
    --research-primary-light: #2482B8;
    --research-accent: #5bbad5;
    --research-success: #10b981;
    --research-warning: #f59e0b;
    --research-danger: #ef4444;
    --research-info: #3b82f6;
    --research-purple: #7c3aed;
    --research-bg: #f8fafc;
    --research-card-bg: #ffffff;
    --research-border: #e2e8f0;
    --research-text: #1e293b;
    --research-text-secondary: #64748b;
    --research-radius: 12px;
    --research-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --research-shadow-hover: 0 4px 12px rgba(31,107,167,0.15), 0 8px 24px rgba(0,0,0,0.08);
    --research-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   CONTENEDOR PRINCIPAL
   ===================================================== */
.research-container {
    background: var(--research-bg);
    min-height: 100%;
    padding: 0;
}

.research-header {
    background: linear-gradient(135deg, var(--research-primary) 0%, var(--research-primary-light) 50%, var(--research-accent) 100%);
    padding: 28px 32px 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.research-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.research-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 20%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}

.research-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.research-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.research-header h2 i {
    font-size: 24px;
    opacity: 0.9;
}

.research-header p {
    margin: 4px 0 0;
    font-size: 13px;
    opacity: 0.85;
}

.research-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* =====================================================
   TABS DE NAVEGACIÓN
   ===================================================== */
.research-tabs {
    display: flex;
    gap: 0;
    background: white;
    border-bottom: 2px solid var(--research-border);
    padding: 0 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.research-tab-btn {
    padding: 14px 20px;
    border: none;
    background: transparent;
    color: var(--research-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: var(--research-transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.research-tab-btn:hover {
    color: var(--research-primary);
    background: rgba(31,107,167,0.04);
}

.research-tab-btn.active {
    color: var(--research-primary);
    font-weight: 600;
}

.research-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--research-primary);
    border-radius: 3px 3px 0 0;
}

.research-tab-btn .badge {
    background: var(--research-primary);
    color: white;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
}

/* =====================================================
   CONTENIDO DE TABS
   ===================================================== */
.research-tab-content {
    display: none;
    padding: 24px;
    animation: researchFadeIn 0.3s ease-out;
}

.research-tab-content.active {
    display: block;
}

@keyframes researchFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   KPI CARDS
   ===================================================== */
.research-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.research-kpi-card {
    background: var(--research-card-bg);
    border-radius: var(--research-radius);
    padding: 20px;
    box-shadow: var(--research-shadow);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: var(--research-transition);
    border: 1px solid var(--research-border);
}

.research-kpi-card:hover {
    box-shadow: var(--research-shadow-hover);
    transform: translateY(-2px);
}

.research-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.research-kpi-icon.blue { background: linear-gradient(135deg, #1F6BA7, #2482B8); }
.research-kpi-icon.green { background: linear-gradient(135deg, #059669, #10b981); }
.research-kpi-icon.purple { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.research-kpi-icon.orange { background: linear-gradient(135deg, #d97706, #f59e0b); }
.research-kpi-icon.red { background: linear-gradient(135deg, #dc2626, #ef4444); }
.research-kpi-icon.cyan { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.research-kpi-icon.indigo { background: linear-gradient(135deg, #4f46e5, #6366f1); }
.research-kpi-icon.pink { background: linear-gradient(135deg, #be185d, #ec4899); }

.research-kpi-content {
    flex: 1;
    min-width: 0;
}

.research-kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--research-text);
    line-height: 1.1;
}

.research-kpi-label {
    font-size: 12px;
    color: var(--research-text-secondary);
    margin-top: 4px;
    line-height: 1.3;
}

/* =====================================================
   CARDS GENÉRICAS
   ===================================================== */
.research-card {
    background: var(--research-card-bg);
    border-radius: var(--research-radius);
    box-shadow: var(--research-shadow);
    border: 1px solid var(--research-border);
    overflow: hidden;
    transition: var(--research-transition);
}

.research-card:hover {
    box-shadow: var(--research-shadow-hover);
}

.research-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--research-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafbfc;
}

.research-card-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--research-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.research-card-header h3 i {
    color: var(--research-primary);
    font-size: 16px;
}

.research-card-body {
    padding: 20px;
}

/* =====================================================
   GRID LAYOUTS
   ===================================================== */
.research-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.research-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .research-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .research-grid-2, .research-grid-3 { grid-template-columns: 1fr; }
    .research-kpi-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

/* =====================================================
   PROYECTO CARDS (Portfolio)
   ===================================================== */
.research-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.research-project-card {
    background: var(--research-card-bg);
    border-radius: var(--research-radius);
    box-shadow: var(--research-shadow);
    border: 1px solid var(--research-border);
    padding: 0;
    transition: var(--research-transition);
    cursor: pointer;
    overflow: hidden;
}

.research-project-card:hover {
    box-shadow: var(--research-shadow-hover);
    transform: translateY(-3px);
    border-color: var(--research-primary-light);
}

.research-project-card-top {
    padding: 18px 20px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.research-project-card-code {
    font-size: 11px;
    font-weight: 600;
    color: var(--research-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.research-project-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--research-text);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.research-project-card-body {
    padding: 14px 20px;
}

.research-project-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.research-project-card-footer {
    padding: 12px 20px;
    background: #fafbfc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.research-project-pi {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--research-text-secondary);
}

.research-project-pi i {
    color: var(--research-primary);
}

/* =====================================================
   PROGRESS BAR
   ===================================================== */
.research-progress {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0;
}

.research-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
    background: linear-gradient(90deg, var(--research-primary), var(--research-accent));
}

.research-progress-bar.success { background: linear-gradient(90deg, #059669, #10b981); }
.research-progress-bar.warning { background: linear-gradient(90deg, #d97706, #f59e0b); }
.research-progress-bar.danger { background: linear-gradient(90deg, #dc2626, #ef4444); }

.research-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--research-text-secondary);
    margin-top: 4px;
}

/* =====================================================
   BADGES Y ETIQUETAS
   ===================================================== */
.research-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* Estados del proyecto */
.research-badge.borrador { background: #f1f5f9; color: #64748b; }
.research-badge.en-revision { background: #fef3c7; color: #92400e; }
.research-badge.aprobado { background: #d1fae5; color: #065f46; }
.research-badge.en-curso { background: #dbeafe; color: #1e40af; }
.research-badge.suspendido { background: #fde68a; color: #78350f; }
.research-badge.completado { background: #d1fae5; color: #065f46; }
.research-badge.cancelado { background: #fecaca; color: #991b1b; }
.research-badge.publicado { background: #ede9fe; color: #5b21b6; }

/* Prioridad */
.research-badge.critica { background: #fecaca; color: #991b1b; border: 1px solid #fca5a5; }
.research-badge.alta { background: #fed7aa; color: #9a3412; }
.research-badge.media { background: #fef3c7; color: #92400e; }
.research-badge.baja { background: #e0f2fe; color: #075985; }

/* Fases */
.research-badge.fase { background: linear-gradient(135deg, var(--research-primary), var(--research-accent)); color: white; }

/* Categoría con color dinámico */
.research-badge.category {
    border: 1px solid currentColor;
    background: transparent;
}

/* =====================================================
   TABLA DE DATOS
   ===================================================== */
.research-table-container {
    overflow-x: auto;
    border-radius: var(--research-radius);
    border: 1px solid var(--research-border);
}

.research-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.research-table thead {
    background: #f8fafc;
}

.research-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--research-text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--research-border);
    white-space: nowrap;
}

.research-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--research-text);
}

.research-table tbody tr:hover {
    background: rgba(31,107,167,0.03);
}

.research-table tbody tr:last-child td {
    border-bottom: none;
}

/* =====================================================
   TIMELINE / FASES
   ===================================================== */
.research-timeline {
    position: relative;
    padding-left: 32px;
}

.research-timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--research-border);
}

.research-timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.research-timeline-item:last-child {
    padding-bottom: 0;
}

.research-timeline-dot {
    position: absolute;
    left: -26px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--research-border);
    background: white;
}

.research-timeline-dot.completed {
    background: var(--research-success);
    border-color: var(--research-success);
}

.research-timeline-dot.active {
    background: var(--research-primary);
    border-color: var(--research-primary);
    box-shadow: 0 0 0 4px rgba(31,107,167,0.15);
}

.research-timeline-dot.pending {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.research-timeline-content {
    background: var(--research-card-bg);
    border: 1px solid var(--research-border);
    border-radius: 8px;
    padding: 14px 16px;
}

.research-timeline-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--research-text);
    margin-bottom: 4px;
}

.research-timeline-date {
    font-size: 12px;
    color: var(--research-text-secondary);
}

/* =====================================================
   PIPELINE VISUAL DE FASES
   ===================================================== */
.research-phase-pipeline {
    display: flex;
    gap: 4px;
    align-items: center;
    overflow-x: auto;
    padding: 16px 0;
}

.research-phase-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    flex: 1;
    position: relative;
}

.research-phase-bubble {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
    background: #cbd5e1;
    transition: var(--research-transition);
    position: relative;
    z-index: 1;
}

.research-phase-bubble.completed { background: var(--research-success); }
.research-phase-bubble.active { background: var(--research-primary); box-shadow: 0 0 0 4px rgba(31,107,167,0.2); }
.research-phase-bubble.pending { background: #cbd5e1; color: #94a3b8; }

.research-phase-label {
    margin-top: 8px;
    font-size: 10px;
    font-weight: 500;
    color: var(--research-text-secondary);
    text-align: center;
    line-height: 1.2;
}

.research-phase-arrow {
    color: #cbd5e1;
    font-size: 12px;
    margin: 0 -2px;
    margin-bottom: 20px;
}

/* =====================================================
   FORMULARIOS Y MODALES
   ===================================================== */
.research-form-group {
    margin-bottom: 16px;
}

.research-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--research-text);
    margin-bottom: 6px;
}

.research-form-group label .required {
    color: var(--research-danger);
    margin-left: 2px;
}

.research-form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--research-border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--research-text);
    background: white;
    transition: var(--research-transition);
    box-sizing: border-box;
}

.research-form-control:focus {
    outline: none;
    border-color: var(--research-primary);
    box-shadow: 0 0 0 3px rgba(31,107,167,0.1);
}

.research-form-control::placeholder {
    color: #94a3b8;
}

select.research-form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 36px;
}

textarea.research-form-control {
    resize: vertical;
    min-height: 80px;
}

.research-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.research-form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .research-form-row, .research-form-row-3 { grid-template-columns: 1fr; }
}

/* =====================================================
   BOTONES
   ===================================================== */
.research-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--research-transition);
    white-space: nowrap;
}

.research-btn-primary {
    background: linear-gradient(135deg, var(--research-primary), var(--research-primary-light));
    color: white;
}

.research-btn-primary:hover {
    background: linear-gradient(135deg, var(--research-primary-dark), var(--research-primary));
    box-shadow: 0 4px 12px rgba(31,107,167,0.3);
    transform: translateY(-1px);
}

.research-btn-secondary {
    background: white;
    color: var(--research-text);
    border: 1px solid var(--research-border);
}

.research-btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--research-primary);
    color: var(--research-primary);
}

.research-btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
}

.research-btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
}

.research-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.research-btn-icon {
    padding: 8px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--research-border);
    color: var(--research-text-secondary);
    cursor: pointer;
    transition: var(--research-transition);
}

.research-btn-icon:hover {
    background: var(--research-primary);
    color: white;
    border-color: var(--research-primary);
}

/* =====================================================
   MODAL
   ===================================================== */
.research-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: researchFadeIn 0.2s ease-out;
}

.research-modal {
    background: white;
    border-radius: var(--research-radius);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: researchSlideUp 0.3s ease-out;
}

@keyframes researchSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.research-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--research-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafbfc;
}

.research-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--research-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.research-modal-header h3 i {
    color: var(--research-primary);
}

.research-modal-close {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--research-text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: var(--research-transition);
}

.research-modal-close:hover {
    background: #fee2e2;
    color: #dc2626;
}

.research-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.research-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--research-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #fafbfc;
}

/* =====================================================
   FILTROS Y BÚSQUEDA
   ===================================================== */
.research-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: var(--research-card-bg);
    border-radius: var(--research-radius);
    border: 1px solid var(--research-border);
}

.research-search {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.research-search input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    border: 1px solid var(--research-border);
    border-radius: 8px;
    font-size: 13px;
    background: white;
    box-sizing: border-box;
}

.research-search input:focus {
    outline: none;
    border-color: var(--research-primary);
    box-shadow: 0 0 0 3px rgba(31,107,167,0.1);
}

.research-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--research-text-secondary);
    font-size: 14px;
}

.research-filter-select {
    padding: 9px 32px 9px 12px;
    border: 1px solid var(--research-border);
    border-radius: 8px;
    font-size: 13px;
    background: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 18px;
    cursor: pointer;
}

/* =====================================================
   ESTADOS VACÍOS Y LOADING
   ===================================================== */
.research-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

.research-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--research-primary), var(--research-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(31,107,167,0.2);
}

.research-empty-icon i {
    font-size: 32px;
    color: white;
}

.research-empty-state h3 {
    font-size: 18px;
    color: var(--research-text);
    margin-bottom: 8px;
}

.research-empty-state p {
    color: var(--research-text-secondary);
    max-width: 400px;
    margin-bottom: 20px;
    font-size: 14px;
}

.research-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    color: var(--research-primary);
}

.research-loading p {
    margin-top: 12px;
    color: var(--research-text-secondary);
    font-size: 14px;
}

/* =====================================================
   DONUT CHART SIMPLE
   ===================================================== */
.research-donut-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.research-donut {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.research-donut-center {
    position: absolute;
    font-size: 20px;
    font-weight: 700;
    color: var(--research-text);
}

.research-donut-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.research-donut-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.research-donut-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* =====================================================
   DETALLE DE PROYECTO — SECCIONES
   ===================================================== */
.research-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.research-detail-info h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--research-text);
    margin: 0 0 6px;
}

.research-detail-code {
    font-size: 12px;
    color: var(--research-primary);
    font-weight: 600;
}

.research-detail-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.research-detail-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.research-detail-section {
    background: var(--research-card-bg);
    border: 1px solid var(--research-border);
    border-radius: var(--research-radius);
    overflow: hidden;
}

.research-detail-section-header {
    padding: 14px 20px;
    background: #fafbfc;
    border-bottom: 1px solid var(--research-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.research-detail-section-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--research-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.research-detail-section-header h4 i {
    color: var(--research-primary);
}

.research-detail-section-body {
    padding: 20px;
}

/* =====================================================
   ESTADÍSTICAS Y CHARTS SIMPLES
   ===================================================== */
.research-stat-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.research-stat-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.research-stat-bar-label {
    min-width: 120px;
    font-size: 12px;
    color: var(--research-text-secondary);
    text-align: right;
}

.research-stat-bar-track {
    flex: 1;
    height: 24px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.research-stat-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--research-primary), var(--research-accent));
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    transition: width 0.8s ease;
    min-width: fit-content;
}

.research-stat-bar-value {
    min-width: 40px;
    font-size: 13px;
    font-weight: 600;
    color: var(--research-text);
    text-align: right;
}

/* =====================================================
   ANIMACIONES
   ===================================================== */
.research-pulse {
    animation: researchPulse 2s infinite;
}

@keyframes researchPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* =====================================================
   RESPONSIVE FINAL
   ===================================================== */
@media (max-width: 640px) {
    .research-header { padding: 20px 16px 16px; }
    .research-header h2 { font-size: 18px; }
    .research-tabs { padding: 0 8px; }
    .research-tab-btn { padding: 12px 14px; font-size: 12px; }
    .research-tab-content { padding: 16px; }
    .research-project-grid { grid-template-columns: 1fr; }
    .research-filters { padding: 12px 16px; }
    .research-modal { max-width: 100%; margin: 10px; }
}
