:root {
    --azul-oscuro: #0d2c54;
    --azul: #1a4d8f;
    --azul-claro: #eaf1fb;
    --verde: #1a8f4d;
    --verde-claro: #e3f7e9;
    --rojo: #c0392b;
    --rojo-claro: #fbe7e7;
    --gris: #6b7280;
    --gris-claro: #f4f6fb;
    --borde: #e3e8f0;
    --radio: 12px;
    --sombra: 0 4px 14px rgba(13, 44, 84, 0.12);
    --fuente: 'Poppins', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--fuente);
    color: #1c1c1c;
    background: var(--gris-claro);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.saltar-contenido {
    position: absolute;
    left: -999px;
    top: 0;
    background: #fff;
    color: var(--azul-oscuro);
    padding: 0.5rem 1rem;
    z-index: 100;
}

.saltar-contenido:focus {
    left: 0.5rem;
    top: 0.5rem;
}

/* Encabezado */

.encabezado {
    background: linear-gradient(135deg, var(--azul-oscuro), var(--azul));
    color: #fff;
}

.encabezado-interior {
    max-width: 1024px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.marca {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
}

.navegacion {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.navegacion a {
    color: #dbe7fa;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.navegacion a:hover,
.navegacion a:focus {
    color: #fff;
    border-color: #fff;
}

/* Contenido */

.contenido {
    flex: 1;
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

/* Mensajes */

.mensajes {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mensaje {
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.mensaje-success { background: var(--verde-claro); color: var(--verde); }
.mensaje-error, .mensaje-warning { background: var(--rojo-claro); color: var(--rojo); }
.mensaje-info { background: var(--azul-claro); color: var(--azul); }

/* Tarjetas / bloques */

.tarjeta, .bloque {
    background: #fff;
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    padding: 1.1rem 1.35rem;
}

.bloque + .bloque {
    margin-top: 1.25rem;
}

.bloque h2 {
    margin: 0 0 0.5rem;
    color: var(--azul-oscuro);
    font-size: 1.2rem;
}

.texto-ayuda {
    color: var(--gris);
    font-size: 0.85rem;
    margin: 0 0 0.75rem;
    line-height: 1.4;
}

/* Botones */

.boton {
    display: inline-block;
    border: none;
    border-radius: 10px;
    background: var(--azul);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s ease, transform 0.05s ease;
}

.boton:hover { background: var(--azul-oscuro); }
.boton:active { transform: translateY(1px); }
.boton-bloque { display: block; width: 100%; }

/* Tablas responsivas */

.tabla-contenedor {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    background: #fff;
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 520px;
}

th, td {
    padding: 0.65rem 0.9rem;
    text-align: left;
    white-space: nowrap;
}

thead th {
    background: var(--azul);
    color: #fff;
    font-weight: 600;
    position: sticky;
    top: 0;
}

tbody tr:nth-child(even) {
    background: var(--azul-claro);
}

tbody tr:first-child td {
    font-weight: 700;
}

/* Pie */

.pie {
    text-align: center;
    color: var(--gris);
    font-size: 0.8rem;
    padding: 1.5rem 1rem;
}

/* Utilidades responsivas */

@media (max-width: 640px) {
    .encabezado-interior {
        flex-direction: column;
        align-items: flex-start;
    }

    th, td {
        white-space: normal;
    }
}
