@charset "UTF-8";
/*
 * Kit visual de acceso y doble factor (prefijo a6-). Independiente de Bootstrap.
 * Se copia igual en httpdocs, areacliente.ar6.es y agentes.ar6.es: si cambia uno, hay que cambiar los otros.
 *   .a6-page   → pantalla de login completa (fondo + tarjeta centrada)
 *   .a6-card   → tarjeta; .a6-card-inline para usarla dentro de una página de la aplicación
 */
.a6-card, .a6-card * { box-sizing: border-box; }

.a6-card {
    --a6-accent: #2f8eb5;
    --a6-accent-2: #23779a;
    --a6-ink: #18212b;
    --a6-muted: #5f6b77;
    --a6-line: #d3dbe4;
    --a6-field: #ffffff;
    --a6-soft: #eef3f8;
    --a6-ok: #1f8f4d;
    --a6-err: #b32222;
    --a6-warn-bg: #fff6df;
    --a6-warn-line: #ecd48a;
    --a6-warn-ink: #6b4e00;
    font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
    color: var(--a6-ink);
    line-height: 1.45;
}

/* ------------------------------------------------------------------ pantalla de login */
body.a6-page {
    margin: 0;
    min-height: 100vh;
    background-color: #0f1622;
    background-image: linear-gradient(130deg, rgba(10, 18, 28, .35), rgba(20, 8, 25, .25)), url("../images/fondo.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}
.a6-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.a6-page .a6-card {
    width: 100%;
    max-width: 440px;
    background: rgba(247, 249, 252, .95);
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 20px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, .45);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding: 30px 28px 24px;
}
.a6-page .a6-card.a6-wide { max-width: 500px; }
.a6-card-inline {
    max-width: 520px;
    background: #fff;
    border: 1px solid var(--a6-line);
    border-radius: 16px;
    padding: 24px;
    margin: 0 0 18px;
    box-shadow: 0 2px 10px rgba(20, 40, 60, .06);
}
.a6-logo { display: block; width: 100%; max-width: 230px; margin: 0 auto 18px; border-radius: 8px; }

@media (prefers-color-scheme: dark) {
    .a6-page .a6-card {
        --a6-ink: #e9eff6;
        --a6-muted: #a3b2c1;
        --a6-line: #36444f;
        --a6-field: #121a25;
        --a6-soft: #1b2635;
        --a6-warn-bg: #3a2f10;
        --a6-warn-line: #7d6420;
        --a6-warn-ink: #f2dc9a;
        background: rgba(21, 29, 41, .94);
        border-color: rgba(255, 255, 255, .08);
    }
    .a6-page .a6-logo { background: #fff; padding: 6px 10px; }
}

/* ------------------------------------------------------------------ cabecera */
.a6-head { text-align: center; margin-bottom: 20px; }
.a6-badge {
    width: 56px; height: 56px; margin: 0 auto 12px;
    display: grid; place-items: center;
    border-radius: 16px;
    background: linear-gradient(160deg, #3aa0c9, var(--a6-accent-2));
    color: #fff;
    box-shadow: 0 8px 18px rgba(35, 119, 154, .35);
}
.a6-badge svg { width: 28px; height: 28px; }
.a6-badge.is-ok { background: linear-gradient(160deg, #2fb36a, var(--a6-ok)); box-shadow: 0 8px 18px rgba(31, 143, 77, .35); }
.a6-title { margin: 0 0 4px; font-size: 1.35rem; font-weight: 800; letter-spacing: .1px; }
.a6-sub { margin: 0; color: var(--a6-muted); font-size: .95rem; }

/* ------------------------------------------------------------------ campos y botones */
.a6-field { display: block; margin-bottom: 14px; }
.a6-label { display: block; margin: 0 0 5px; font-size: .8rem; font-weight: 700; color: var(--a6-muted); letter-spacing: .2px; }
.a6-input {
    display: block; width: 100%; height: 48px;
    padding: 10px 14px;
    font: inherit; font-size: 16px; color: var(--a6-ink);
    background: var(--a6-field);
    border: 1.5px solid var(--a6-line); border-radius: 12px;
    transition: border-color .15s, box-shadow .15s;
}
.a6-input:focus { outline: 0; border-color: var(--a6-accent); box-shadow: 0 0 0 4px rgba(47, 142, 181, .18); }
.a6-pass { position: relative; }
.a6-pass .a6-input { padding-right: 48px; }
.a6-eye {
    position: absolute; right: 4px; top: 4px; width: 40px; height: 40px;
    display: grid; place-items: center;
    background: none; border: 0; border-radius: 9px; color: var(--a6-muted); cursor: pointer;
}
.a6-eye:hover { background: var(--a6-soft); color: var(--a6-ink); }
.a6-eye svg { width: 20px; height: 20px; }

.a6-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; min-height: 48px; padding: 10px 16px;
    font: inherit; font-size: 1rem; font-weight: 700; text-decoration: none;
    color: #fff; background: linear-gradient(180deg, #3398c0, var(--a6-accent));
    border: 0; border-radius: 12px; cursor: pointer;
    transition: transform .08s, filter .15s, opacity .15s;
}
.a6-btn:hover { filter: brightness(.94); color: #fff; }
.a6-btn:active { transform: translateY(1px); }
.a6-btn:focus-visible, .a6-link:focus-visible, .a6-chip-btn:focus-visible { outline: 3px solid rgba(47, 142, 181, .45); outline-offset: 2px; }
.a6-btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.a6-btn.is-busy { opacity: .75; cursor: progress; }
.a6-btn-ghost { color: var(--a6-ink); background: transparent; border: 1.5px solid var(--a6-line); }
.a6-btn-ghost:hover { color: var(--a6-ink); background: var(--a6-soft); filter: none; }
.a6-btn-danger { background: linear-gradient(180deg, #cb4a4a, var(--a6-err)); }
.a6-row { display: flex; gap: 10px; margin-top: 10px; }
.a6-row > * { flex: 1; }
.a6-link {
    display: inline-block; padding: 6px 4px; background: none; border: 0;
    font: inherit; font-size: .92rem; font-weight: 600; color: #0f6081; text-decoration: none; cursor: pointer;
}
.a6-link:hover { text-decoration: underline; }
.a6-center { text-align: center; margin-top: 10px; }

.a6-alert {
    margin: 0 0 16px; padding: 11px 14px; border-radius: 12px;
    font-size: .92rem; font-weight: 600; border: 1px solid;
}
.a6-alert.is-error { color: #7d1717; background: #fdecec; border-color: #f2b8b8; }
.a6-alert.is-ok { color: #12663a; background: #e6f6ed; border-color: #a9dcbf; }
.a6-alert.is-info { color: #0f4f6b; background: #e7f3f9; border-color: #b4d9e9; }
.a6-alert.is-warn { color: var(--a6-warn-ink); background: var(--a6-warn-bg); border-color: var(--a6-warn-line); }
@media (prefers-color-scheme: dark) {
    .a6-page .a6-alert.is-error { color: #ffc9c9; background: #3d1b1b; border-color: #7d3535; }
    .a6-page .a6-alert.is-ok { color: #b6ecca; background: #17301f; border-color: #2e6a45; }
    .a6-page .a6-alert.is-info { color: #bfe3f2; background: #16303c; border-color: #2c5a70; }
}

/* ------------------------------------------------------------------ interruptor de confianza */
.a6-switch { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; cursor: pointer; user-select: none; }
.a6-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.a6-switch-ui {
    flex: none; position: relative; width: 44px; height: 26px;
    background: #aab6c2; border-radius: 99px; transition: background .2s;
}
.a6-switch-ui::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
    background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s;
}
.a6-switch input:checked + .a6-switch-ui { background: var(--a6-accent); }
.a6-switch input:checked + .a6-switch-ui::after { transform: translateX(18px); }
.a6-switch input:focus-visible + .a6-switch-ui { outline: 3px solid rgba(47, 142, 181, .45); outline-offset: 2px; }
.a6-switch-text strong { display: block; font-size: .92rem; }
.a6-switch-text small { display: block; color: var(--a6-muted); font-size: .8rem; }

/* ------------------------------------------------------------------ código de 6 dígitos */
.a6-otp { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 4px 0 16px; }
.a6-otp-box {
    width: 50px; height: 60px; padding: 0; text-align: center;
    font: inherit; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--a6-ink);
    background: var(--a6-field); border: 1.5px solid var(--a6-line); border-radius: 12px;
    caret-color: var(--a6-accent);
    transition: border-color .15s, box-shadow .15s, transform .1s;
}
.a6-otp-box:focus { outline: 0; border-color: var(--a6-accent); box-shadow: 0 0 0 4px rgba(47, 142, 181, .2); transform: translateY(-1px); }
.a6-otp-box.is-filled { border-color: var(--a6-accent); background: var(--a6-soft); }
.a6-otp-dash { width: 10px; height: 2px; background: var(--a6-line); border-radius: 2px; }
.a6-otp.is-error .a6-otp-box { border-color: var(--a6-err); animation: a6-shake .35s; }
@keyframes a6-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.a6-recovery-input { text-align: center; font-size: 1.15rem; letter-spacing: .12em; font-weight: 700; margin-bottom: 14px; }
@media (max-width: 420px) {
    .a6-otp { gap: 5px; }
    .a6-otp-box { width: 42px; height: 54px; font-size: 1.35rem; border-radius: 10px; }
    .a6-otp-dash { width: 6px; }
}

/* ------------------------------------------------------------------ asistente de alta */
.a6-steps { display: flex; justify-content: space-between; gap: 6px; list-style: none; margin: 0 0 22px; padding: 0; counter-reset: s; }
.a6-steps li { flex: 1; text-align: center; font-size: .72rem; font-weight: 700; color: var(--a6-muted); position: relative; }
.a6-steps li::before {
    counter-increment: s; content: counter(s);
    display: grid; place-items: center; width: 28px; height: 28px; margin: 0 auto 5px;
    border-radius: 50%; border: 2px solid var(--a6-line); background: var(--a6-field); position: relative; z-index: 1;
    font-size: .8rem;
}
.a6-steps li::after { content: ""; position: absolute; top: 13px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; background: var(--a6-line); }
.a6-steps li:last-child::after { display: none; }
.a6-steps li.is-current { color: var(--a6-ink); }
.a6-steps li.is-current::before { border-color: var(--a6-accent); background: var(--a6-accent); color: #fff; }
.a6-steps li.is-done::before { border-color: var(--a6-ok); background: var(--a6-ok); color: #fff; content: "✓"; }
.a6-steps li.is-done::after { background: var(--a6-ok); }
.a6-step-title { margin: 0 0 6px; font-size: 1.05rem; font-weight: 800; }
.a6-step-text { margin: 0 0 14px; color: var(--a6-muted); font-size: .92rem; }
.a6-step[hidden] { display: none; }
.a6-step + .a6-step { margin-top: 22px; }

.a6-apps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.a6-apps li { padding: 7px 12px; font-size: .85rem; font-weight: 700; background: var(--a6-soft); border: 1px solid var(--a6-line); border-radius: 99px; }

.a6-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 14px; }
.a6-qr {
    position: relative; width: 216px; height: 216px; padding: 14px;
    background: #fff; border-radius: 16px; border: 1px solid var(--a6-line);
    box-shadow: 0 6px 18px rgba(20, 40, 60, .12);
    display: grid; place-items: center;
}
.a6-qr svg { display: block; width: 100%; height: 100%; }
.a6-qr-fail { font-size: .8rem; color: #5f6b77; text-align: center; padding: 6px; }
.a6-secret {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 8px 8px 8px 14px; background: var(--a6-soft); border: 1px solid var(--a6-line); border-radius: 12px;
}
.a6-secret code {
    flex: 1; min-width: 0; font: 700 1rem/1.3 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    letter-spacing: .08em; color: var(--a6-ink); word-break: break-all; user-select: all;
}
.a6-chip-btn {
    flex: none; padding: 7px 12px; font: inherit; font-size: .82rem; font-weight: 700;
    color: var(--a6-ink); background: var(--a6-field); border: 1px solid var(--a6-line); border-radius: 9px; cursor: pointer;
}
.a6-chip-btn:hover { background: var(--a6-soft); }
.a6-chip-btn.is-done { color: var(--a6-ok); border-color: var(--a6-ok); }
.a6-hint { font-size: .8rem; color: var(--a6-muted); text-align: center; margin: 0 0 4px; }

/* ------------------------------------------------------------------ códigos de recuperación */
.a6-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.a6-codes li {
    padding: 11px 8px; text-align: center; background: var(--a6-soft); border: 1px dashed var(--a6-line); border-radius: 10px;
    font: 700 1.02rem/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .08em; user-select: all;
}
.a6-actions { display: flex; gap: 8px; margin-bottom: 14px; }
.a6-actions .a6-chip-btn { flex: 1; padding: 10px 6px; text-align: center; }
.a6-check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; font-size: .92rem; font-weight: 600; cursor: pointer; }
.a6-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--a6-accent); flex: none; }

/* ------------------------------------------------------------------ estado en páginas de seguridad */
.a6-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.a6-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; font-size: .8rem; font-weight: 800; border-radius: 99px; background: var(--a6-soft); }
.a6-pill.is-on { color: #12663a; background: #e6f6ed; }
.a6-pill.is-req { color: #6b4e00; background: #fff1c9; }
.a6-meta { margin: 0 0 16px; color: var(--a6-muted); font-size: .92rem; }
.a6-meta strong { color: var(--a6-ink); }

@media (prefers-reduced-motion: reduce) {
    .a6-card *, .a6-card *::before, .a6-card *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------ impresión de códigos */
@media print {
    body * { visibility: hidden !important; }
    .a6-print-area, .a6-print-area * { visibility: visible !important; }
    .a6-print-area { position: absolute; left: 0; top: 0; width: 100%; padding: 24px; }
    .a6-print-area .a6-codes li { border: 1px solid #000; color: #000; background: #fff; }
}

/* ------------------------------------------------------------------ sin JavaScript / sin caja propia */
html:not(.a6-js) [data-a6-next], html:not(.a6-js) [data-a6-prev], html:not(.a6-js) .a6-steps { display: none; }
.a6-card.a6-bare { background: transparent; border: 0; box-shadow: none; padding: 0; margin: 0; max-width: none; }

/* El atributo hidden debe ganar siempre (los estilos de .a6-input / .a6-otp usan display) */
.a6-card [hidden] { display: none !important; }
/* Alta con QR: tarjeta más compacta para que quepa en pantallas de 800 px de alto */
.a6-page .a6-card.a6-wide { padding-top: 22px; }
.a6-wide .a6-logo { max-width: 150px; margin-bottom: 12px; }
.a6-wide .a6-head { margin-bottom: 14px; }
.a6-wide .a6-qr { width: 190px; height: 190px; padding: 12px; }
.a6-wide .a6-steps { margin-bottom: 16px; }
@media (max-height: 760px) { .a6-wide .a6-qr { width: 168px; height: 168px; } }

/* Dentro de las páginas de la aplicación, sus estilos globales de input/label no deben pisar el kit */
.a6-card label { font-weight: inherit; }
.a6-card .a6-field { margin-bottom: 16px; }
.a6-card .a6-switch { font-weight: 400; }
.a6-card .a6-check { font-weight: 600; }
.a6-card .a6-input:focus, .a6-card .a6-otp-box:focus {
    background-color: var(--a6-field) !important; outline: 0 !important;
    border-color: var(--a6-accent) !important; box-shadow: 0 0 0 4px rgba(47, 142, 181, .2) !important;
}
.a6-card .a6-otp-box.is-filled:not(:focus) { background-color: var(--a6-soft); }
.a6-card-inline > .a6-title { margin-bottom: 14px !important; }

/* Más aire entre el último campo y el botón de entrar */
.a6-card form[role="login"] .a6-field:last-of-type { margin-bottom: 28px; }

/* Tarjeta inicial de "activar el doble factor": a todo el ancho, texto en una línea y botón al lado (en móvil se apila) */
.a6-card-inline.is-wide { max-width: none; }
.a6-intro { display: flex; align-items: center; justify-content: space-between; gap: 14px 28px; flex-wrap: wrap; }
.a6-intro .a6-meta { flex: 1 1 520px; margin: 0; }
.a6-intro form { flex: none; }
.a6-btn-auto { width: auto; padding-left: 30px; padding-right: 30px; }

/* ------------------------------------------------------------------ paso 1: descarga de la app (iPhone / Android) */
.a6-seg { display: inline-flex; padding: 3px; margin: 0 0 12px; background: var(--a6-soft); border: 1px solid var(--a6-line); border-radius: 12px; }
.a6-seg-btn { padding: 8px 24px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: .9rem; font-weight: 700; color: var(--a6-muted); cursor: pointer; }
.a6-seg-btn[aria-selected="true"] { background: var(--a6-field); color: var(--a6-ink); box-shadow: 0 1px 4px rgba(20, 40, 60, .2); }
.a6-seg-btn:focus-visible { outline: 3px solid rgba(47, 142, 181, .45); outline-offset: 2px; }
.a6-store-panel { display: flex; align-items: center; gap: 18px; margin: 0 0 12px; padding: 14px; background: var(--a6-soft); border: 1px solid var(--a6-line); border-radius: 14px; }
.a6-store-panel + .a6-store-panel { margin-top: 10px; }
.a6-store-panel[hidden] { display: none !important; }
.a6-qr.a6-qr-sm { flex: none; width: 150px; height: 150px; padding: 10px; border-radius: 12px; }
.a6-store-info { flex: 1; min-width: 0; }
.a6-store-info p { margin: 0 0 10px; font-size: .88rem; color: var(--a6-muted); }
.a6-store-mobile { display: none; }
.a6-mobile .a6-store-panel .a6-qr { display: none !important; }
.a6-mobile .a6-store-desktop { display: none; }
.a6-mobile .a6-store-mobile { display: block; }
.a6-hint-apps { margin: 2px 0 14px; text-align: left; }
html:not(.a6-js) .a6-seg { display: none; }
@media (max-width: 440px) { .a6-store-panel { flex-direction: column; text-align: center; } }

/* ------------------------------------------------------------------ ayuda y explicaciones en las pantallas de 2FA */
.a6-help { margin: 14px 0 0; padding: 11px 14px; background: var(--a6-soft); border: 1px solid var(--a6-line); border-radius: 12px; font-size: .86rem; color: var(--a6-muted); }
.a6-help strong { color: var(--a6-ink); }
.a6-help a, .a6-more a { color: #0f6081; font-weight: 700; }
.a6-more { margin: 14px 0 6px; border: 1px solid var(--a6-line); border-radius: 12px; background: var(--a6-soft); }
.a6-more summary { padding: 11px 14px; cursor: pointer; font-size: .88rem; font-weight: 700; color: var(--a6-ink); }
.a6-more ul { margin: 0; padding: 0 16px 12px 32px; font-size: .86rem; color: var(--a6-muted); }
.a6-more li { margin: 6px 0; }
.a6-only-mobile { display: none; }
.a6-mobile .a6-only-mobile { display: block; padding: 10px 12px; background: var(--a6-warn-bg); border: 1px solid var(--a6-warn-line); border-radius: 10px; color: var(--a6-warn-ink); }
.a6-sub strong { color: var(--a6-ink); }

.a6-store-info .a6-btn { display: inline-flex; width: auto; padding: 10px 20px; white-space: nowrap; }
