/* Manual de funcionamiento de FlyFormWeb */
:root {
    --primario: #3f3fc8;
    --primario-claro: #e9e9fb;
    --texto: #1f2430;
    --texto-suave: #5b6170;
    --borde: #dfe2ea;
    --fondo: #f6f7fb;
    --aviso: #fff4e5;
    --aviso-borde: #f0b45b;
    --info: #e8f1fd;
    --info-borde: #8fb6ee;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Roboto, "Segoe UI", Arial, sans-serif;
    color: var(--texto);
    background: var(--fondo);
    line-height: 1.6;
}

.cabecera {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: var(--primario);
    color: #fff;
}

.cabecera a { color: #fff; text-decoration: none; }
.cabecera .titulo { font-weight: 600; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.cabecera .titulo img { width: 24px; height: 24px; }
.cabecera .ir-web { margin-left: auto; border: 1px solid rgba(255, 255, 255, .6); border-radius: 6px; padding: 4px 12px; font-size: .9rem; }

.cuerpo {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    gap: 32px;
    padding: 24px;
}

#indice {
    flex: 0 0 230px;
    position: sticky;
    top: 72px;
    align-self: flex-start;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    font-size: .92rem;
}

#indice h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-suave); margin: 18px 0 6px; }
#indice h2:first-child { margin-top: 0; }
#indice ul { list-style: none; margin: 0; padding: 0; }
#indice a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--texto); text-decoration: none; }
#indice a:hover { background: var(--primario-claro); }
#indice a.actual { background: var(--primario-claro); color: var(--primario); font-weight: 600; }

main {
    flex: 1;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: 10px;
    padding: 28px 36px 40px;
}

main h1 { margin-top: 0; font-size: 1.8rem; }
main h2 { margin-top: 2rem; font-size: 1.3rem; border-bottom: 1px solid var(--borde); padding-bottom: 4px; }
main h3 { margin-top: 1.4rem; font-size: 1.08rem; }
main p.entradilla { font-size: 1.05rem; color: var(--texto-suave); }

figure { margin: 18px 0 24px; }
figure img { max-width: 100%; border: 1px solid var(--borde); border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
figcaption { font-size: .88rem; color: var(--texto-suave); margin-top: 6px; }

.nota, .aviso {
    border-left: 4px solid var(--info-borde);
    background: var(--info);
    padding: 10px 14px;
    border-radius: 6px;
    margin: 16px 0;
}
.aviso { border-left-color: var(--aviso-borde); background: var(--aviso); }

.pasos { counter-reset: paso; list-style: none; padding-left: 0; }
.pasos > li { counter-increment: paso; position: relative; padding-left: 40px; margin-bottom: 12px; }
.pasos > li::before {
    content: counter(paso);
    position: absolute; left: 0; top: 0;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--primario); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .9rem;
}

.flujos { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin: 16px 0; }
.flujo { border: 1px solid var(--borde); border-radius: 10px; padding: 14px 16px; background: var(--fondo); }
.flujo h3 { margin: 0 0 6px; }
.flujo p { margin: 0 0 8px; font-size: .95rem; }

.estados { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.estado { border-radius: 12px; padding: 2px 12px; font-size: .85rem; font-weight: 600; background: #eee; }
.estado.borrador { background: #ffe9c2; }
.estado.preparada { background: #dcdcf8; }
.estado.presentada { background: #d4ebfb; }
.estado.aprobada { background: #d8f0d8; }
.estado.rechazada { background: #f9d6d6; }

table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: .95rem; }
th, td { border: 1px solid var(--borde); padding: 6px 10px; text-align: left; vertical-align: top; }
th { background: var(--fondo); }

kbd, .boton {
    display: inline-block;
    border: 1px solid var(--borde);
    border-radius: 4px;
    padding: 0 6px;
    background: var(--fondo);
    font-size: .88em;
    white-space: nowrap;
}

.navegacion { display: flex; justify-content: space-between; margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--borde); }
.navegacion a { color: var(--primario); text-decoration: none; }

footer { text-align: center; color: var(--texto-suave); font-size: .85rem; padding: 20px; }

@media (max-width: 860px) {
    .cuerpo { flex-direction: column; padding: 12px; }
    #indice { position: static; max-height: none; flex: none; }
    main { padding: 20px 18px 28px; }
}
