:root {
    --texto: #1f2933;
    --suave: #5b5b66;
    --fondo: #f7f7f9;
    --acento: #0b5fff;
    --marino: #0b1f3a;
    --turquesa: #0e9f97;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--texto);
    background: var(--fondo);
    line-height: 1.5;
}

.contenedor {
    flex: 1;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

h1 { margin: 0 0 .5rem; color: var(--acento); }

.lema { font-size: 1.125rem; }

.aviso { color: var(--suave); }

.pie {
    padding: 1rem 1.25rem;
    text-align: center;
    font-size: .875rem;
    color: var(--suave);
    border-top: 1px solid #e3e3e8;
}

.pie a { color: var(--acento); }

/* --- v0.2: formularios, listas, panel --- */
h2 { margin: 1.75rem 0 .5rem; font-size: 1.15rem; }
a { color: var(--acento); }
.paso { margin: 0; color: var(--suave); font-size: .875rem; text-transform: uppercase; letter-spacing: .04em; }
.formulario, form.formulario { display: block; }
label { display: block; margin: .9rem 0 .3rem; font-weight: 600; }
label small, legend small { font-weight: 400; color: var(--suave); }
input, select, textarea {
    width: 100%; padding: .65rem .75rem; font: inherit; color: inherit;
    border: 1px solid #c9c9d1; border-radius: 8px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 3px solid #bcd3ff; border-color: var(--acento); }
.mono, textarea.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
fieldset { margin: 1.25rem 0 0; padding: 0; border: 0; }
legend { font-size: 1.05rem; font-weight: 700; padding: 0; }
.casilla { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.casilla input { width: auto; margin-top: .3rem; }

.boton {
    display: inline-block; margin-top: 1.25rem; padding: .8rem 1.2rem; border: 0; border-radius: 10px;
    background: var(--marino); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.boton:hover { filter: brightness(1.08); }
.boton-secundario { background: #e6efff; color: var(--acento); }
.boton-texto { background: none; border: 0; padding: .4rem; color: var(--acento); font: inherit; text-decoration: underline; cursor: pointer; }

.alerta { margin: 1rem 0; padding: .8rem 1rem; border-radius: 10px; }
.alerta ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.alerta-ok { background: #e6f4ea; border: 1px solid #b7dfc3; }
.alerta-error { background: #fdecea; border: 1px solid #f3c2bd; }
.alerta-aviso { background: #fff6e0; border: 1px solid #f0d9a0; }

.lista { list-style: none; padding: 0; margin: .5rem 0; }
.lista-fila { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid #e3e3e8; }
.etiqueta { display: inline-block; margin-left: .3rem; padding: .05rem .45rem; border-radius: 999px; background: #e6efff; color: var(--acento); font-size: .75rem; font-weight: 700; }
.bloque { margin: 1rem 0; padding: .9rem 1rem; border: 1px solid #e3e3e8; border-radius: 10px; background: #fff; }
.bloque summary { cursor: pointer; font-weight: 700; }

.lienzo-firma { display: block; width: 100%; height: auto; touch-action: none; border: 2px dashed #c9c9d1; border-radius: 10px; background: #fff; }
.codigo-grande { font-size: 2rem; font-weight: 800; letter-spacing: .08em; text-align: center; padding: 1rem; background: #fff; border: 2px solid var(--acento); border-radius: 12px; }

/* Panel */
.contenedor-ancho { max-width: 1100px; }
.barra { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: .75rem 1.25rem; background: #fff; border-bottom: 1px solid #e3e3e8; }
.marca { color: var(--acento); }
.menu { display: flex; gap: .25rem; flex: 1; flex-wrap: wrap; }
.menu a { padding: .4rem .7rem; border-radius: 8px; text-decoration: none; color: var(--texto); }
.menu a.activo, .menu a:hover { background: #e6efff; color: var(--acento); }
.salir { display: flex; align-items: center; gap: .5rem; }
.usuario { color: var(--suave); font-size: .875rem; }
.cabecera-seccion { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.filtro { display: flex; align-items: center; gap: .5rem; }
.filtro input { width: auto; }
.filtro .boton { margin-top: 0; }
.acciones { display: flex; flex-wrap: wrap; gap: .75rem; }
.tabla { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e3e3e8; border-radius: 10px; overflow: hidden; }
.tabla th, .tabla td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid #eee; font-size: .925rem; }
.tabla th { background: #f1f1f4; font-weight: 700; }
.estado { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #eee; }
.estado-completado, .estado-verificado, .estado-ses-aceptada { background: #e6f4ea; color: #1e6b37; }
.estado-pendiente, .estado-en_curso, .estado-ses-pendiente, .estado-ses-error_red { background: #fff6e0; color: #8a5a00; }
.estado-ses-rechazada { background: #fdecea; color: #a1261b; }
.enlace { word-break: break-all; font-family: ui-monospace, Menlo, Consolas, monospace; background: #fff; padding: .5rem; border-radius: 6px; }
[hidden] { display: none !important; }

/* v0.3.0: formularios en línea del panel (enviar enlace por correo) */
.formulario-linea { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.formulario-linea label { display: flex; flex-direction: column; font-size: .9rem; gap: .25rem; }
.acciones form { display: inline; }
.casilla { display: flex; gap: .5rem; align-items: flex-start; font-weight: normal; }
.ayuda { font-size: .9rem; color: #52606d; margin: .75rem 0 .25rem; }

/* v0.4.1: logotipo */
.marca img { display: block; height: 32px; width: auto; }
.pie-marca { display: inline-flex; align-items: center; gap: .35rem; }
.pie-marca img { height: 20px; width: auto; }
.logo-acceso { display: block; margin: 0 auto 1.5rem; max-width: 260px; width: 100%; height: auto; }
h1, h2 { color: var(--marino); }
.estado-cancelada { background: #f1f1f4; color: #5b5b66; }
.valoracion { display: flex; flex-wrap: wrap; gap: .35rem; border: 0; padding: 0; margin: 1rem 0 0; }
.valoracion legend { font-weight: 700; margin-bottom: .4rem; }
.estrella { display: inline-flex; align-items: center; gap: .2rem; border: 1px solid #c9c9d1; border-radius: 8px; padding: .4rem .45rem; background: #fff; font-size: .95rem; }
.valoracion legend { width: 100%; }
.caja-firma { margin: 1rem 0; }
.estado-ses-enviada { background: #e6efff; color: #0b3a99; }
.estado-ses-anulada { background: #f1f1f4; color: #5b5b66; }
.texto-error { color: #a1261b; font-weight: 700; }
.info-privacidad dt { font-weight: 700; margin-top: .6rem; }
.info-privacidad dd { margin: .15rem 0 0; }
details summary { cursor: pointer; color: var(--acento); font-weight: 600; margin-top: .5rem; }

.banda-pruebas { background: #fff3c4; color: #5c4400; text-align: center; font-size: .85rem; padding: .35rem .75rem; font-weight: 600; }
