/* Estilos personalizados para SHUa ERC */
:root {
    --primary-color: #00a19c;
    --secondary-color: #007eb0;
    --accent-color: #1a998e;
    --light-bg: #f5f9fa;
    --dark-text: #3c4858;
    --medium-text: #6c757d;
    --border-color: #dce4e6;
    --warning-color: #f0ad4e;
    --success-color: #5cb85c;
    --info-color: #5bc0de;
    --danger-color: #d9534f;
    --btn-border-color: #c5c5c5;
}

/* ============ ESTILOS GENERALES ============ */
body {
    background-color: #f8f9fa;
}

.main-container {
    padding-top: 30px;
    padding-bottom: 50px;
}

/* Título con icono en línea */
.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.header-icon {
    font-size: 2em;
    color: var(--primary-color);
    margin-right: 15px;
    display: inline-block;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--dark-text);
    text-transform: uppercase;
    margin: 0;
    display: inline-block;
}

/* ============ COMPONENTES COMUNES ============ */

/* Botones */
.btn {
    display: inline-block;
    margin-bottom: 0;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    touch-action: manipulation;
    cursor: pointer;
    background-image: none;
    border: 1px solid transparent;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    border-radius: 4px;
    text-decoration: none;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.btn:hover, .btn:focus {
    text-decoration: none;
}

/* Botones estándar */
.btn-default {
    background-color: #f5f5f5;
    border-color: var(--btn-border-color);
    color: #555;
    border-width: 1px;
    border-style: solid;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-default:hover,
.btn-default:focus {
    background-color: #e6e6e6;
    border-color: #adadad;
    color: #444;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--accent-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.btn-success {
    color: #fff;
    background-color: var(--success-color);
    border-color: #4cae4c;
}

.btn-success:hover, .btn-success:focus {
    background-color: #449d44;
    border-color: #398439;
    color: white;
}

.btn-info {
    background-color: var(--info-color);
    border-color: #46b8da;
    color: white;
    text-decoration: none;
    display: inline-block;
}

.btn-info:hover,
.btn-info:focus {
    background-color: #31b0d5;
    border-color: #269abc;
    color: white;
    text-decoration: none;
}

/* Contenedores */
.stats-container {
    background: linear-gradient(135deg, #ffffff 0%, #f5f9fa 100%);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 40px;
}

.stats-title {
    color: var(--secondary-color);
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 25px;
}

/* Arreglando la altura de las tarjetas de estadísticas */
.stats-row {
    display: flex;
    flex-wrap: wrap;
}

.stats-column {
    display: flex;
    padding: 0 10px;
}

.stat-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.stat-card .panel-heading {
    padding: 18px 15px;
    border-bottom: none;
}

.stat-card .panel-body {
    padding: 25px 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card h3 {
    font-size: 36px;
    font-weight: 600;
    margin: 5px 0;
    color: var(--primary-color);
}

.stat-card .text-muted {
    margin-top: 5px;
}

.panel-primary {
    border-color: var(--primary-color);
}

.panel-primary > .panel-heading {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.tool-description {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 35px;
    margin-bottom: 40px;
}

.tool-title {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.4;
}

.tool-text {
    color: var(--medium-text);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.btn-action {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 161, 156, 0.3);
    transition: all 0.3s ease;
    margin: 20px 0 30px;
}

.btn-action:hover, .btn-action:focus {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 8px 20px rgba(0, 161, 156, 0.4);
    transform: translateY(-2px);
}

/* ============ PÁGINA DE RESULTADOS ============ */
.results-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 20px;
}

.results-title {
    font-size: 20px;
    color: var(--dark-text);
    margin-bottom: 25px;
    text-align: center;
    font-weight: 500;
}

.result-card {
    border-radius: 8px;
    padding: 20px 15px;
    height: 100%;
    transition: transform 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.result-card:hover {
    transform: translateY(-3px);
}

.result-card-title {
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.result-card-count {
    font-size: 18px;
    font-weight: 600;
    padding: 5px 15px;
    border-radius: 20px;
    margin-top: 10px;
}

.result-negative {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.result-positive {
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
}

.result-warning {
    background-color: #fff8e1;
    border: 1px solid #ffecb3;
}

/* Mejorando los círculos de conteo */
.count-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 600;
    font-size: 16px;
    margin-top: 10px;
}

.badge-default {
    background-color: #6c757d;
    color: white;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: #212529;
}

/* Asegurar que los círculos se adapten a números de dos dígitos */
.count-badge.two-digits {
    width: 46px;
    height: 46px;
}

/* Página de resultados de la evaluación */
.action-buttons {
    margin-top: 20px;
    text-align: center;
}

.action-buttons .btn {
    min-width: 160px;
}

/* Estilo para impresión */
@media print {
    .no-print {
        display: none !important;
    }
}

/* ============ CALCULADORA WIZARD ============ */
/* Estilos para la calculadora SHUa */
.shua-calculator {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.shua-calculator .panel-heading {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border-bottom: 1px solid var(--accent-color);
}

/* Botón volver en el header mejorado con hover amarillo */
.shua-calculator .panel-heading .btn-default {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transition: all 0.2s ease;
}

.shua-calculator .panel-heading .btn-default:hover,
.shua-calculator .panel-heading .btn-default:focus {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: #333;
}

.shua-calculator .panel-body {
    padding: 0;
}

.wizard-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--light-bg);
}

.wizard-title {
    margin: 0;
    color: var(--secondary-color);
    font-size: 18px;
}

/* Estilos para el wizard */
.wizard {
    margin: 0 auto;
    position: relative;
}

.wizard .wizard-step-container {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

/* Estilo para pestañas del wizard */
.wizard-nav {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e1e1e1;
}

.wizard-nav-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.wizard-nav-link {
    display: block;
    padding: 15px 10px;
    color: #777;
    text-decoration: none;
    position: relative;
    font-weight: 600;
    transition: all 0.3s ease;
}

.wizard-nav-link:hover {
    text-decoration: none;
    color: var(--secondary-color);
}

.wizard-nav-item.active .wizard-nav-link {
    color: white;
    background-color: var(--secondary-color);
}

.wizard-nav-number {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 26px;
    margin-right: 5px;
    border: 1px solid;
    border-radius: 50%;
    text-align: center;
    font-weight: bold;
}

.wizard-nav-item.active .wizard-nav-number {
    background-color: white;
    color: var(--secondary-color);
}

/* Estilos para los pasos del wizard */
.step-content {
    display: none;
    padding: 20px;
}

.step-content.active {
    display: block;
}

.step-title {
    margin-top: 0;
    color: var(--secondary-color);
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
}

/* Estilos para alertas */
.alert-info {
    background-color: #e8f6fc;
    border-color: #b0dcf0;
    color: #31708f;
}

.alert-success {
    background-color: #dff0d8;
    border-color: #d6e9c6;
    color: #3c763d;
}

.alert-warning {
    background-color: #fcf8e3;
    border-color: #faebcc;
    color: #8a6d3b;
}

/* Estilos para formularios mejorados */
.form-control {
    height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.035);
    transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}

.form-control:focus {
    border-color: var(--secondary-color);
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(0, 126, 176, 0.4);
}

/* Campos numéricos más anchos */
input[type="number"].form-control {
    width: 100%;
    min-width: 160px;
}

/* Estilo para unidades sin marco */
.unit-addon {
    background-color: transparent;
    border: none;
    color: #555;
    font-weight: 600;
    padding-left: 8px;
    display: inline-block;
}

/* Grupos de inputs con unidades */
.input-group-custom {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 300px;
}

.input-group-custom .form-control {
    flex: 1;
    border-top-right-radius: 4px !important;
    border-bottom-right-radius: 4px !important;
}

.form-group label {
    font-weight: 600;
    color: #555;
}

.input-group-addon {
    background-color: #f7f7f7;
    color: #555;
    border: 1px solid var(--border-color);
}

/* Estilos para radio buttons corregidos */
.radio-styled {
    margin-top: 10px;
}

.radio-styled .radio {
    margin-right: 15px;
    display: inline-block;
}

.radio-styled .radio input[type="radio"] {
    display: inline-block;
    opacity: 1;
    margin-right: 5px;
    margin-top: 2px;
    position: relative;
    vertical-align: middle;
}

.radio-styled .radio label {
    display: inline-block;
    font-weight: normal;
    margin-bottom: 0;
    padding-left: 5px;
}

/* Footer del wizard */
.wizard-footer {
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #e5e5e5;
    text-align: right;
}

/* Estilos específicos para botones de navegación en el wizard */
.wizard-footer .btn-prev,
.wizard-footer .btn-reset {
    position: relative;
    z-index: 1;
    border-width: 1px;
    border-style: solid;
    border-color: var(--btn-border-color);
}

/* Estilos para los resultados */
.result-container {
    text-align: center;
    padding: 30px 20px;
}

.result-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.result-icon.success {
    color: var(--success-color);
}

.result-icon.warning {
    color: var(--warning-color);
}

.result-icon.info {
    color: var(--info-color);
}

.result-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.result-details {
    max-width: 600px;
    margin: 0 auto 20px;
}

/* Procesando resultados */
.processing-container {
    text-align: center;
    padding: 50px 0;
}

.processing-spinner {
    margin-bottom: 20px;
}

/* Tooltips */
.tooltip-inner {
    max-width: 250px;
    padding: 8px 12px;
    background-color: var(--secondary-color);
    font-size: 13px;
}

.tooltip.top .tooltip-arrow {
    border-top-color: var(--secondary-color);
}

/* Estilos para indicadores de error */
.has-error .form-control {
    border-color: #a94442;
}

.has-error .help-block {
    color: #a94442;
}

/* Seccion de criterios adicionales */
.criterios-adicionales {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-left: 3px solid var(--secondary-color);
    border-radius: 3px;
}

.criterios-adicionales h4 {
    margin-top: 0;
    color: var(--secondary-color);
}

/* Iconos informativos */
.info-icon {
    color: var(--secondary-color);
    margin-left: 4px;
    cursor: help;
}

/* Spinner para procesamiento */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border-left-color: var(--secondary-color);
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* ============ RESPONSIVIDAD ============ */
@media (max-width: 768px) {
    .wizard-nav-link {
        padding: 10px 5px;
        font-size: 12px;
    }
    
    .wizard-nav-number {
        width: 24px;
        height: 24px;
        line-height: 22px;
    }
    
    .wizard-footer .btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .btn-action {
        padding: 10px 20px;
    }
    
    .stat-card h3 {
        font-size: 28px;
    }
}