/* --- Variables de paleta de colores --- */
:root {
    --bg-principal: #aab895;      /* Verde claro de fondo */
    --verde-botones: #7d8e6a;     /* Verde medio de los botones superiores */
    --verde-oscuro: #2d3e2d;      /* Verde muy oscuro para el botón Analizar/Guardar */
    --input-bg: #e9f0e1;          /* Color crema/blanco roto de los inputs */
    --borde-azul: #4a90e2;        /* Borde azul de selección que se ve en tu diseño */
    --texto-oscuro: #1a1a1a;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-principal);
    color: var(--texto-oscuro);
}

/* --- Navegación Superior (Común en todas las páginas) --- */
.top-nav {
    display: flex;
    justify-content: space-between; /* Espaciado uniforme */
    padding: 10px 0;
    background-color: var(--bg-principal);
    margin-bottom: 20px;
    border: none; /* Eliminamos el recuadro azul */
}

.nav-item {
    background-color: var(--verde-botones);
    color: #1a1a1a;
    padding: 15px;
    text-align: center;
    text-decoration: none; /* Quita el subrayado de enlace */
    font-weight: bold;
    flex-grow: 1;
    margin: 0 10px;
    text-transform: uppercase;
    border: none; /* Eliminamos líneas grises discontinuas */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Sombra suave opcional */
    transition: background-color 0.3s;
}

.nav-item:hover {
    background-color: #6d7d5a; /* Un tono más oscuro al pasar el ratón */
}

/* --- Pantalla de Login --- */
.login-container {
    width: 300px;
    margin: 100px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    text-align: center;
}

.login-container input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #999;
}

/* --- Pantalla Index --- */
.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60vh;
}

.upload-section {
    text-align: center;
}

/* Simulación del input de archivo tipo "Browse" */
.file-input-group {
    background-color: white;
    border: 1px solid #333;
    padding: 10px;
    display: inline-block;
    margin-bottom: 30px;
}

.btn-dark {
    background-color: var(--verde-oscuro);
    color: white;
    padding: 12px 40px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: opacity 0.3s;
}

.btn-dark:hover {
    opacity: 0.9;
}

/* --- Pantalla Evidencias --- */
.form-container {
    margin: 20px;
    padding: 20px;
    border: none;
    border-radius: 5px;
}

h3 {
    margin-top: 0;
    font-weight: bold;
}

.grid-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas principales */
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 5px;
    font-size: 15px;
}

input, select, textarea {
    background-color: var(--input-bg);
    border: 1px solid #777;
    padding: 8px;
    margin-bottom: 15px;
    border-radius: 2px;
}

.full-width {
    grid-column: span 3;
}

textarea {
    width: 100%;
    height: 120px;
    resize: none;
}

.form-footer {
    grid-column: span 3;
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
    margin-top: 10px;
}

.btn-circle {
    background-color: var(--verde-botones);
    border: 1px solid #333;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

/* --- Pantalla Tabla --- */
.table-container {
    margin: 20px;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--input-bg);
}

.data-table th {
    background-color: white;
    padding: 12px;
    text-align: left;
    border: 1px solid #ccc;
    font-size: 13px;
}

.data-table td {
    padding: 10px;
    border: 1px solid #ccc;
    font-size: 12px;
    color: #444;
}

/* --- Utilidades para los Paneles (Wizard) --- */
.panel {
    display: none;
    animation: fadeIn 0.4s;
}

.panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Botones dinámicos y separadores --- */
.dynamic-section {
    border-left: 3px solid var(--verde-botones);
    padding-left: 15px;
    margin-bottom: 20px;
    position: relative;
}

.btn-remove {
    background-color: #d9534f;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 15px;
    font-size: 12px;
}

.add-section-container {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.add-section-container hr {
    flex-grow: 1;
    border: none;
    border-top: 2px solid var(--verde-oscuro);
    margin-right: 15px;
}

.btn-add {
    background-color: var(--verde-oscuro);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.btn-add:hover {
    background-color: var(--verde-botones);
}

/* --- Utilidades para Sub-Paneles (Relaciones 0:N dentro de 1:N) --- */
.sub-dynamic-section {
    border-left: 3px solid #4a90e2; /* Diferente color para distinguir jerarquía */
    padding-left: 15px;
    margin-top: 10px;
    margin-bottom: 10px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 5px;
    padding: 10px 15px;
}

.btn-sub-add {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 5px;
    transition: background-color 0.3s;
}

.btn-sub-add:hover { background-color: #357abd; }

.section-title {
    font-weight: bold;
    color: var(--verde-oscuro);
    margin: 15px 0 5px 0;
    font-size: 14px;
    border-bottom: 1px dashed var(--verde-botones);
    padding-bottom: 3px;
}

/* Checkboxes y selects múltiples */
select[multiple] {
    height: 80px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--input-bg);
    padding: 8px;
    border: 1px solid #777;
    border-radius: 2px;
}
.checkbox-group input { margin: 0; }