/* 1. VARIABLES GLOBALES (Unificadas) */
:root {
    --bg-dark: #1e2229;
    --card-bg: #2d323c;
    --accent: #ff8c00;
    --text-light: #f4f4f4;
    --text-muted: #a0aab4;
    --line: #444;
    /* Variable faltante en tu código original */
}

/* 2. RESET Y CONFIGURACIÓN BASE */
* {
    box-sizing: border-box;
    /* Previene el desplazamiento a la derecha */
}

body {
    background-color: var(--bg-dark);
    background: radial-gradient(circle, #2c313c 0%, #1e2229 100%);
    color: var(--text-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Cambiamos a columna */
    align-items: center;
    overflow-x: hidden;
    padding-top: 80px;

}

/* 3. BARRA DE NAVEGACIÓN (Fija arriba) */
.navbar {
    width: 100%;
    background-color: #1a1a1a;
    border-bottom: 2px solid var(--accent);
    padding: 0.8rem 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 15px;
}

.nav-item {
    background: #252525;
    border: 1px solid var(--line);
    color: var(--text-light);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.3s;
}

.nav-item:hover {
    background: var(--accent);
    color: #000;
}

/* CONTENEDOR PRINCIPAL CON ESPACIO PARA EL HEADER */
.app-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem;
    margin-top: 80px;
    /* Margen para que el header fijo no pise la app */
    max-width: 1200px;
    width: 100%;
}

.wizard-section,
.visual-section {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 5. TARJETA (Consolidada) */
.card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 100%;
    /* Para que ocupe su contenedor */
    box-sizing: border-box;
}

h2 {
    color: var(--accent);
    margin-bottom: 2rem;
}

.options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-opt {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 0.8rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-opt:hover {
    background: var(--accent);
    color: var(--bg-dark);
}

/* 6. GRÁFICOS Y RESUMEN */
.chart-box {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

#summary {
    margin-top: 2rem;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.info-acervo {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 140, 0, 0.05);
    /* Un sutil tinte naranja */
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    max-width: 100%;
}

.info-acervo p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
}

.info-acervo strong {
    color: var(--accent);
}

span {
    color: var(--text-light);
    font-weight: bold;
}
/* Estilo base para el input de texto */
#input-texto {
    transition: all 0.3s ease;
    padding: 12px; /* Aumento general del padding */
}

/* 7. ESTILOS DEL INFORME FINAL (Barra Lateral) */
.report-container-final {
    max-width: 900px;
    margin: 0 auto;
    padding: 10px;
    width: 100%;
}

.report-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--card-bg);

    border-radius: 12px;
    overflow: hidden;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* El área de la tabla */
.report-content {

    padding: 20px;
    width: 100%;
}

/* La barra lateral ancha */
.report-sidebar-bar {
    width: 100% !important;
    height: 45px;
    /* Altura fija para que entren bien los números */
    display: flex !important;
    flex-direction: row !important;
    /* Colores uno al lado del otro */
    background: #1a1d23;
    border-top: 1px solid var(--line);
    margin: 0;
    padding: 0;
}

.bar-seg {
    height: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Evita el amontonamiento */
    transition: width 0.5s ease;
}

.bar-seg span {
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    /* Para que se lea bien sobre cualquier color */
    pointer-events: none;
    /* Para que el title del div siga funcionando al pasar el mouse */
}

.seg-leg {
    background: #444;
}

.seg-ley {
    background: #777;
}

.seg-test {
    background: var(--accent);
}

.seg-mejora {
    background: #b35900;
}
/* 8 --Estilo específico para el selector de cantidad */
.input-cantidad {
    font-size: 1.5rem;
    text-align: center;
    padding: 10px;
    width: 80px; /* Un poco más ancho para las flechas */
    border: 2px solid var(--accent);
    border-radius: 8px;
    background: #252525;
    color: white;
}


.btn-step {
    background: #333;
    color: var(--accent);
    border: 1px solid var(--accent);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-step:hover {
    background: var(--accent);
    color: #000;
}

.input-cantidad::-webkit-outer-spin-button,
.input-cantidad::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Elimina las flechas en Firefox */
.input-cantidad {
    -moz-appearance: textfield;
}

/* RESPONSIVE MOBILE */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
        
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 20px;
        background: #1a1a1a;
        padding: 15px;
        border: 1px solid var(--line);
        border-radius: 8px;
        width: 200px;
        z-index: 1001;
    }

    .nav-links.show {
        display: flex !important;
    }

    .app-container {
        padding: 1rem;
        margin-top: 70px;
    }

    .wizard-section,
    .visual-section {
        flex: none;
        width: 100%;
        min-width: 0;
    }

    .visual-section {
        min-height: auto;
        /* Evita que fuerce altura innecesaria */
        padding: 10px 0;
    }

    .card {
        padding: 1.5rem;
    }

    #summary {
        font-size: 1rem;
        /* Achicamos un poco el texto del porcentaje central */
        margin-top: 1rem;
    }

    .chart-box {
        max-width: 180px !important;
        /* Reducimos el tamaño de la rueda */
        margin: 0 auto;
    }

    /* Ajustes específicos del informe en Mobile */
    .report-content {
        padding: 15px;
    }

    .report-sidebar-bar {
        height: 40px;
        /* Un poco más pequeña en mobile */
    }

    .bar-seg span {
        font-size: 0.7rem;
    }
    #input-texto {
        height: 60px;          /* Altura bien cómoda para el dedo */
        font-size: 1.2rem;     /* Fuente un poco más grande para que se lea bien */
        width: 80%;           /* Que ocupe todo el ancho disponible */
        box-sizing: border-box; /* Asegura que el padding no desborde el ancho */
    }
    
}

/* --- COMPONENTES COMPARTIDOS: NAVBAR --- */
.navbar {
    background: #1e1e1e;
    padding: 0.8rem 1.5rem;
    border-bottom: 2px solid var(--accent);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-weight: bold;
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    gap: 15px;
}

.nav-item {
    background: transparent;
    border: 1px solid #444;
    color: #e0e0e0; /* Color de texto base */
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.nav-item:hover {
    background: var(--accent);
    color: #000 !important;
}

/* Hamburguesa para Móvil */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #1e1e1e;
        padding: 1rem;
        border-bottom: 1px solid var(--accent);
    }
    .nav-links.show {
        display: flex;
    }
    .hamburger {
        display: block;
    }
}

/* Contenedor principal de la mejora */
.mejora-discapacidad-container {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #333;
    margin-top: 15px;
}

.mejora-discapacidad-container h3 {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 15px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

/* Etiquetas de texto */
.mejora-discapacidad-container label {
    display: block;
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Inputs y Selects dentro de la mejora */
.mejora-discapacidad-container input[type="text"],
.mejora-discapacidad-container select {
    width: 100%;
    height: 50px; /* Altura cómoda */
    background: #252525;
    border: 1px solid #444;
    border-radius: 8px;
    color: white;
    padding: 0 15px;
    margin-bottom: 20px;
    font-size: 1rem;
}

.mejora-discapacidad-container select:focus,
.mejora-discapacidad-container input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 8px rgba(255, 140, 0, 0.2);
}

/* Lista de mejoras ya agregadas (El "carrito") */
#lista-mejoras-agregadas {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 20px;
}

.item-mejora {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2a2a2a;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 4px solid var(--accent);
}

/* Botón de Agregar (Diferente al de Continuar) */
.btn-agregar-mejora {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-weight: bold;
    width: 100%;
    height: 50px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-agregar-mejora:hover {
    background: var(--accent);
    color: black;
}

/* Estilos específicos para Indemnizaciones - No afectan a Sucesiones */
#seccion-indemnizaciones .question-card {
    width: 100%; 
    max-width: 800px; 
    margin: 20px auto;
    padding: 40px; 
    min-height: 400px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#seccion-indemnizaciones .container-main {
    display: block; 
    width: 90%;
    margin: 0 auto;
}

/* Ocultamos el panel lateral de "Indemnización Estimada" solo en esta sección */
#seccion-indemnizaciones .sidebar-estimado, 
#seccion-indemnizaciones #contenedor-total-lateral {
    display: none !important;
}
#seccion-indemnizaciones .date-row-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#seccion-indemnizaciones .stepper-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 80%;
    max-width: 300px;
    background: #222;
    border-radius: 10px;
    padding: 5px;
}

#seccion-indemnizaciones .btn-step {
    background: var(--accent);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    border-radius: 8px;
    cursor: pointer;
}

#seccion-indemnizaciones .value-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    min-width: 100px;
    text-align: center;
}

#seccion-indemnizaciones .stepper-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    max-width: 320px;
    background: #252525; /* Color exacto de los inputs de sucesiones */
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px;
}

#seccion-indemnizaciones .btn-step {
    background: #333;
    color: var(--accent);
    border: 1px solid var(--accent);
    width: 45px;
    height: 45px;
    border-radius: 50%; /* Redondos como en sucesiones */
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}

#seccion-indemnizaciones .btn-step:hover {
    background: var(--accent);
    color: #000;
}

#seccion-indemnizaciones .value-display {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-light);
    min-width: 80px;
    text-align: center;
    font-family: 'Segoe UI', sans-serif;
}
/* Reducimos el margen superior del contenedor para que suba la tarjeta */
#seccion-indemnizaciones .app-container {
    margin-top: 20px !important; /* Menos espacio respecto al navbar */
    padding-top: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Alinea al inicio, no al centro */
    min-height: auto;
}

/* Ajustamos la tarjeta de preguntas */
#seccion-indemnizaciones .question-card {
    margin-top: 10px !important; /* Casi pegado al header */
    padding: 20px 30px; /* Reducimos padding interno para ganar espacio vertical */
    min-height: 300px; /* Un poco más compacta */
}

/* Ajuste específico para mobile */
@media (max-width: 768px) {
    body {
        padding-top: 60px; /* Menos espacio arriba en el body */
    }
    #seccion-indemnizaciones .app-container {
        margin-top: 10px !important;
    }
}