:root {
    --institucional: #1B4D3E;
    --dorado: #F5C518;
    --hueso: #FAF7F0;
    --texto: #2B2B2B;
    --borde: #E4DFD3;
    --peligro: #A32424;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--hueso);
    color: var(--texto);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.55;
}

h1 { font-size: 1.6rem; margin: 0; color: var(--institucional); }
h2 { font-size: 1.15rem; margin: 0 0 .25rem; color: var(--institucional); }

.barra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1.5rem;
    background: var(--institucional);
    color: var(--hueso);
}

.marca { color: var(--hueso); font-weight: 600; text-decoration: none; }
.barra .boton-texto { color: var(--dorado); }

.contenido {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.encabezado {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ayuda { color: rgba(43, 43, 43, .65); font-size: .9rem; margin: .15rem 0 0; }

.tarjeta {
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: 14px;
    padding: 1.5rem;
}

.tarjeta--angosta { max-width: 420px; margin: 3rem auto 0; }
.vacio { text-align: center; display: grid; gap: 1rem; justify-items: center; }

.formulario { display: flex; flex-direction: column; gap: .4rem; }
.formulario label { font-weight: 600; margin-top: .8rem; }
.formulario label:first-of-type { margin-top: 0; }

input[type="text"],
input[type="password"],
input[type="date"],
textarea {
    font: inherit;
    color: inherit;
    padding: .6rem .75rem;
    border: 1px solid var(--borde);
    border-radius: 9px;
    background: #fff;
    width: 100%;
}

input:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--institucional);
    outline-offset: 2px;
}

textarea { resize: vertical; }
.error { color: var(--peligro); font-size: .88rem; }

.boton {
    display: inline-block;
    margin-top: 1.2rem;
    padding: .65rem 1.2rem;
    border: 0;
    border-radius: 999px;
    background: var(--institucional);
    color: var(--hueso);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
}

.boton:hover { background: #16402f; }
.boton--claro { background: #fff; color: var(--institucional); border: 1px solid var(--institucional); }
.boton--claro:hover { background: #f0efe8; }
.boton--peligro { background: var(--peligro); }
.boton--peligro:hover { background: #8b1e1e; }
.encabezado .boton { margin-top: 0; }

.boton-texto {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    color: var(--institucional);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.boton-texto--peligro { color: var(--peligro); }

.acciones { display: flex; gap: .75rem; margin-top: 1.2rem; align-items: center; }
.acciones .boton { margin-top: 0; }

.aviso {
    margin: 0;
    padding: .8rem 1rem;
    border-radius: 10px;
    border-left: 4px solid var(--institucional);
    background: #eef3f0;
}

.aviso--error { border-left-color: var(--peligro); background: #fbeeee; }

.lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .75rem; }

.fila {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: 14px;
    padding: .75rem 1rem;
}

.fila__foto {
    width: 72px;
    height: 72px;
    flex: none;
    border-radius: 10px;
    overflow: hidden;
    background: #f0efe8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fila__foto img { width: 100%; height: 100%; object-fit: cover; }
.sin-foto { font-size: .75rem; color: rgba(43, 43, 43, .5); text-align: center; }
.fila__datos { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.fila__acciones { display: flex; align-items: center; gap: 1rem; flex: none; }
.fila__acciones .boton { margin-top: 0; }

.soltar {
    border: 2px dashed var(--borde);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    background: #fdfcf9;
    transition: border-color .2s, background .2s;
}

.soltar--activo { border-color: var(--institucional); background: #eef3f0; }
.soltar__texto { margin: 0 0 .25rem; }

.previsualizacion,
.galeria {
    list-style: none;
    margin: .75rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: .6rem;
}

.previsualizacion:empty { margin: 0; }

.previsualizacion li,
.galeria li {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: #f0efe8;
}

.previsualizacion img,
.galeria img { width: 100%; height: 100%; object-fit: cover; display: block; }

.quitar {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.quitar:hover { background: var(--peligro); }
