:root {
    color-scheme: light;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
    color: #243443;
    background: #f3f6f9;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

a {
    color: #155787;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 3px solid #f3b24f;
    outline-offset: 2px;
}

.contenedor {
    width: min(1160px, 94%);
    margin-inline: auto;
}

.barra {
    background: #152f43;
    color: white;
}

.barra-interior,
.navegacion,
.cuenta,
.acciones,
.encabezado-seccion,
.descargas {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.barra-interior {
    min-height: 80px;
    justify-content: space-between;
}

.marca {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
}

.navegacion a {
    color: #e7f2fc;
    text-decoration: none;
}

.nombre-cuenta {
    font-size: 0.9rem;
}

button,
input,
select {
    font: inherit;
}

button,
summary {
    cursor: pointer;
}

.boton {
    display: inline-block;
    padding: 11px 16px;
    border: 1px solid #206d9b;
    border-radius: 9px;
    background: #176fa0;
    color: white;
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}

.boton:hover {
    background: #10587e;
}

.boton-secundario {
    background: white;
    border-color: #b6c8d5;
    color: #174563;
}

.boton-secundario:hover {
    background: #e8eff5;
}

.boton-peligro {
    background: #a92c36;
    border-color: #a92c36;
}

.boton-peligro:hover {
    background: #8d2029;
}

.boton-chico {
    padding: 7px 11px;
    font-size: 0.82rem;
}

.encabezado-pagina {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 33px 0 24px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 6px;
}

h2 {
    font-size: 1.35rem;
}

.sobretitulo {
    margin-bottom: 4px;
    font-weight: bold;
    letter-spacing: 0.09em;
    font-size: 0.72rem;
    color: #567a95;
}

.tarjeta {
    border: 1px solid #e2e9ef;
    border-radius: 14px;
    background: white;
    box-shadow: 0 8px 18px rgba(20, 44, 61, 0.04);
}

.cabecera-generada {
    max-width: min(340px, 100%);
    height: auto;
    border-radius: 9px;
}

.estadistica {
    padding: 14px 25px;
    text-align: center;
    background: #e5f1f8;
    border-radius: 12px;
}

.estadistica strong {
    display: block;
    font-size: 2rem;
}

.bloque-subida {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 1fr);
    gap: 28px;
    padding: 25px;
}

.formulario {
    display: grid;
    gap: 9px;
}

.formulario label {
    font-weight: 600;
}

.formulario input:not([type='checkbox']),
.formulario select {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 10px;
    border: 1px solid #b9c9d6;
    border-radius: 8px;
    background: white;
}

.formulario button {
    justify-self: start;
    margin-top: 8px;
}

.vista-subida {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: #eef3f7;
    border: 2px dashed #c6d8e6;
    border-radius: 10px;
    overflow: hidden;
    padding: 15px;
}

.vista-subida img {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
}

.sin-imagen {
    color: #6e8394;
    text-align: center;
}

.espaciado {
    margin-top: 40px;
    margin-bottom: 50px;
}

.encabezado-seccion {
    justify-content: space-between;
    align-items: center;
}

.cuadricula {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
    gap: 20px;
}

.tarjeta-imagen {
    overflow: hidden;
}

.tarjeta-imagen > img {
    display: block;
    width: 100%;
    height: 210px;
    object-fit: cover;
    background: #e2e9ef;
}

.contenido-imagen {
    padding: 16px;
}

.contenido-imagen h3 {
    margin-bottom: 4px;
}

.metadatos,
.nota {
    color: #5c6d7a;
    font-size: 0.88rem;
}

.editar-imagen {
    padding: 9px 0 15px;
}

.editar-imagen summary {
    color: #155787;
    font-weight: 600;
}

.editar-imagen .formulario {
    margin-top: 10px;
}

.estado-vacio {
    padding: 25px;
    border: 1px dashed #b6c8d5;
    background: white;
    border-radius: 10px;
}

.alerta {
    margin: 18px 0;
    padding: 12px 14px;
    border-radius: 8px;
}

.alerta-error {
    border: 1px solid #eaafb4;
    background: #fff0f1;
}

.alerta-exito {
    border: 1px solid #a3d5bd;
    background: #edfbf2;
}

.pagina-acceso {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.acceso {
    width: min(430px, 100%);
    padding: 30px;
}

.casilla {
    display: flex;
    align-items: start;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: normal !important;
}

.texto-centro {
    margin-top: 18px;
    text-align: center;
}

.separacion,
.formulario-edicion {
    padding: 25px;
    margin-bottom: 35px;
}

.formulario-edicion {
    max-width: 640px;
}

.descargas {
    margin: 20px 0;
}

.tabla-contenedor {
    overflow-x: auto;
    margin-bottom: 20px;
}

table {
    border-collapse: collapse;
    width: 100%;
    text-align: left;
}

th,
td {
    border-bottom: 1px solid #e2e8ef;
    padding: 14px;
    vertical-align: middle;
}

th {
    background: #eaf1f7;
}

.pie {
    padding: 25px 0;
    margin-top: 45px;
    font-size: 0.82rem;
    color: #667d8b;
    border-top: 1px solid #d9e3ea;
}

.salto {
    position: absolute;
    transform: translateY(-150%);
    background: white;
    padding: 8px;
    z-index: 10;
}

.salto:focus {
    transform: translateY(0);
}

@media (max-width: 760px) {
    .bloque-subida {
        grid-template-columns: 1fr;
    }

    .barra-interior {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px 0;
    }

    .encabezado-pagina {
        align-items: flex-start;
        flex-direction: column;
    }

    .estadistica {
        align-self: stretch;
    }

    .nombre-cuenta {
        display: none;
    }
}
