/* Custom styles for LC Service */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f6fa;
}

/* Hover effects */
.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Stats cards */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.stats-card.success {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stats-card.info {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stats-card.warning {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stats-card.danger {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stats-card.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Tables */
.table-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.table thead th {
    position: sticky;
    top: 0;
    background-color: #495057;
    color: white;
    z-index: 1;
}

/* Buttons */
.btn-export {
    background: linear-gradient(45deg, #28a745, #20c997);
    border: none;
    color: white;
}

.btn-export:hover {
    background: linear-gradient(45deg, #218838, #1ea080);
    color: white;
}

/* Loading spinner */
.loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
}

/* Chart containers - ARREGLADO PARA EVITAR ALTURA INFINITA */
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

/* Fix específico para Chart.js - evitar crecimiento infinito */
#tiempoProcesoChart, 
#aceptacionChart, 
#comparisonChart {
    height: 300px !important;
    max-height: 300px !important;
    width: 100% !important;
}

.card-body canvas {
    height: 300px !important;
    max-height: 300px !important;
    width: 100% !important;
}

/* Contenedores de gráficos con altura fija */
.chart-card .card-body {
    height: 350px !important;
    padding: 1rem;
}

/* Para cualquier canvas en la página de resultados */
canvas {
    max-height: 350px !important;
}

/* Específico para gráfico de comparación (más alto) */
#comparisonChart {
    height: 400px !important;
    max-height: 400px !important;
}

/* Asegurar que los contenedores de cards no crezcan */
.card.shadow {
    overflow: hidden;
}

.card.shadow .card-body {
    overflow: hidden;
}

/* Table search */
.table-search {
    margin-bottom: 1rem;
}

.table-search input {
    border-radius: 25px;
    padding-left: 2.5rem;
}

.table-search .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* Status badges */
.status-aceptada {
    background-color: #198754 !important;
}

.status-rechazada {
    background-color: #dc3545 !important;
}

.status-pendiente {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.status-enviada {
    background-color: #0dcaf0 !important;
}

.status-vencida {
    background-color: #6c757d !important;
}

/* Analysis cards */
.analysis-card {
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.analysis-card:hover {
    border-left-color: var(--success-color);
}

/* Comparison cards */
.comparison-card {
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.comparison-card.pre-test {
    border-color: var(--danger-color);
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

.comparison-card.post-test {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
}

/* Progress bars */
.progress-animated {
    animation: progress-animation 2s ease-in-out;
}

@keyframes progress-animation {
    0% { width: 0%; }
    100% { width: var(--progress-width); }
}

/* Error states */
.error-message {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: 0.375rem;
    margin: 1rem 0;
}

/* Success states */
.success-message {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border: 1px solid #badbcc;
    color: #155724;
    padding: 1rem;
    border-radius: 0.375rem;
    margin: 1rem 0;
}