/* ═══════════════════════════════════════════════════════════════════════
   cuenta.css · pantallas de ingreso, registro, recuperación y verificación

   Hoja compartida (no scoped) porque las seis páginas usan exactamente la
   misma tarjeta y los mismos campos: duplicarla en seis .razor.css garantiza
   que se desincronicen. La carga SesionLayout.razor.
   Paleta y tipografía homologadas al resto de la plataforma.
   ═══════════════════════════════════════════════════════════════════════ */
.cta {
    --ink: #0C2740;
    --muted: #5b7186;
    --line: #e3e9f0;
    --azul: #185FA5;
    --verde: #2e7d32;
    --ambar: #e0a128;
    --rojo: #c62828;
    width: 100%;
    max-width: 430px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 28px 26px;
    box-shadow: 0 4px 18px rgba(12,39,64,.07);
    font-family: 'IBM Plex Sans', system-ui, sans-serif;
    color: var(--ink);
}

.cta-ancha { max-width: 470px; }

/* ── Encabezado de la tarjeta ── */
.cta h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
    letter-spacing: -.01em;
}

.cta .cta-ayuda {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 20px;
    line-height: 1.55;
}

.cta .cta-eyebrow {
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
}

/* ── Enlace de regreso ── */
.cta-volver {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: 14px;
}

    .cta-volver:hover { color: var(--azul); }
    .cta-volver .material-symbols-outlined { font-size: 16px; }

/* ── Campos ── */
.cta-campo { margin-bottom: 14px; }

    .cta-campo > label {
        display: block;
        font-size: 12.5px;
        font-weight: 600;
        margin-bottom: 6px;
        color: var(--ink);
    }

.cta-campo-cab {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

    .cta-campo-cab label {
        font-size: 12.5px;
        font-weight: 600;
        color: var(--ink);
        margin: 0;
    }

/* Radzen pinta sus propios inputs; esta regla es más específica que .rz-textbox
   y unifica alto, radio y color de foco con el resto de la plataforma. */
.cta .form-control,
.cta .rz-textbox,
.cta .rz-password {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid #cdd7e1;
    border-radius: 9px;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}

    .cta .form-control:hover { border-color: #a9bccd; }

    .cta .form-control:focus,
    .cta .rz-textbox:focus,
    .cta .rz-password:focus {
        outline: none;
        border-color: var(--azul);
        box-shadow: 0 0 0 3px rgba(24,95,165,.14);
    }

/* Campo de contraseña con botón de ver/ocultar */
.cta-pass { position: relative; }

    .cta-pass .form-control { padding-right: 42px; }

.cta-ojo {
    position: absolute;
    top: 0;
    right: 0;
    height: 42px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--muted);
    border-radius: 0 9px 9px 0;
}

    .cta-ojo:hover { color: var(--azul); }
    .cta-ojo .material-symbols-outlined { font-size: 19px; }

/* ── Aviso de bloqueo de mayúsculas ──
   Nace apagado y lo enciende cuenta.js añadiendo .cta-mayus-on. Se resuelve con
   una clase y no con un @if de Blazor porque la tecla pulsada no debe cruzar a
   C#: lo que viaja es el hecho de que CapsLock está activo, y ni siquiera eso
   sale del navegador. */
.cta-mayus {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    padding: 6px 10px;
    border-radius: 8px;
    background: #fffdf7;
    border: 1px solid rgba(224,161,40,.45);
    color: #7a5710;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
}

    .cta-mayus.cta-mayus-on { display: flex; }

    .cta-mayus .material-symbols-outlined { font-size: 16px; flex: none; }

/* Mensajes de validación de Radzen */
.cta .rz-message,
.cta .rz-messages-error {
    display: block;
    position: static !important;
    font-size: 11.5px;
    color: var(--rojo);
    background: none;
    border: none;
    padding: 4px 0 0;
    margin: 0;
}

/* ── Enlaces secundarios ── */
.cta-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--azul);
    text-decoration: none;
}

    .cta-link:hover { text-decoration: underline; }

/* ── Casilla "mantener sesión" ── */
.cta-recordar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 18px;
    font-size: 12.5px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

    .cta-recordar input[type="checkbox"] {
        width: 15px;
        height: 15px;
        margin: 0;
        accent-color: var(--azul);
        cursor: pointer;
    }

/* ── Botones ── */
.cta-btn {
    width: 100%;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border-radius: 9px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, transform .05s;
}

    .cta-btn .material-symbols-outlined { font-size: 19px; }

    .cta-btn:active { transform: scale(.995); }

.cta-btn-primario {
    background: var(--ink);
    color: #fff;
}

    .cta-btn-primario:hover { background: #123b5e; }

    .cta-btn-primario:disabled {
        background: #a9bccd;
        cursor: not-allowed;
    }

.cta-btn-claro {
    background: #fff;
    color: var(--ink);
    border-color: #cdd7e1;
}

    .cta-btn-claro:hover {
        background: #f7f9fb;
        border-color: #a9bccd;
    }

    .cta-btn-claro img { height: 18px; width: auto; }

.cta-btn-texto {
    width: 100%;
    background: none;
    border: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    padding: 10px;
    cursor: pointer;
}

    .cta-btn-texto:hover { color: var(--azul); }

/* ── Separador "o continúa con" ── */
.cta-divisor {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
}

    .cta-divisor::before,
    .cta-divisor::after {
        content: "";
        flex: 1;
        height: 1px;
        background: var(--line);
    }

    .cta-divisor span {
        font-size: 11px;
        color: #8095a8;
        white-space: nowrap;
    }

/* ── Avisos ── */
.cta-aviso {
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 16px;
    font-size: 12.5px;
    line-height: 1.55;
}

.cta-aviso-tit {
    font-weight: 700;
    margin: 0 0 4px;
    font-size: 13px;
}

.cta-aviso p { margin: 0; }

.cta-aviso.ambar {
    background: #fffdf7;
    border: 1px solid rgba(224,161,40,.45);
    color: #7a5710;
}

.cta-aviso.azul {
    background: #f5f9fd;
    border: 1px solid rgba(24,95,165,.28);
    color: #16456f;
}

.cta-aviso.rojo {
    background: #fdf7f7;
    border: 1px solid rgba(198,40,40,.35);
    color: #8e2020;
}

.cta-aviso.verde {
    background: #f6fbf7;
    border: 1px solid rgba(46,125,50,.35);
    color: #1f5c23;
}

.cta-aviso .cta-aviso-btn {
    margin-top: 9px;
    background: #fff;
    border: 1px solid currentColor;
    border-radius: 7px;
    padding: 6px 12px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: inherit;
    cursor: pointer;
}

    .cta-aviso .cta-aviso-btn:disabled {
        opacity: .55;
        cursor: default;
    }

/* ── Pie de la tarjeta ── */
.cta-pie {
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
    margin: 18px 0 0;
}

    .cta-pie a {
        color: var(--azul);
        font-weight: 600;
        text-decoration: none;
    }

        .cta-pie a:hover { text-decoration: underline; }

.cta-nota {
    font-size: 11.5px;
    color: #8095a8;
    text-align: center;
    margin: 14px 0 0;
    line-height: 1.5;
}

/* ── Estados centrados (éxito, error, cargando) ── */
.cta-centrado { text-align: center; }

    .cta-centrado h1 { margin-bottom: 8px; }

    .cta-centrado .cta-ayuda { margin-bottom: 18px; }

.cta-icono {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px auto 14px;
}

    .cta-icono .material-symbols-outlined { font-size: 28px; }

    .cta-icono.verde { background: rgba(46,125,50,.10); color: var(--verde); }
    .cta-icono.rojo { background: rgba(198,40,40,.10); color: var(--rojo); }
    .cta-icono.azul { background: rgba(24,95,165,.10); color: var(--azul); }
    .cta-icono.ambar { background: rgba(224,161,40,.12); color: var(--ambar); }

.cta-spinner {
    width: 34px;
    height: 34px;
    margin: 6px auto 14px;
    border: 3px solid var(--line);
    border-top-color: var(--ink);
    border-radius: 50%;
    animation: cta-giro .8s linear infinite;
}

@keyframes cta-giro {
    to { transform: rotate(360deg); }
}

/* ── Medidor de fortaleza de contraseña ── */
.cta-fortaleza {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

    .cta-fortaleza i {
        flex: 1;
        height: 4px;
        border-radius: 999px;
        background: #e6ebf0;
    }

.cta-fortaleza-txt {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 6px;
}

.cta-fortaleza.n1 i:nth-child(-n+1) { background: var(--rojo); }
.cta-fortaleza.n2 i:nth-child(-n+2) { background: var(--ambar); }
.cta-fortaleza.n3 i:nth-child(-n+3) { background: #7cb342; }
.cta-fortaleza.n4 i { background: var(--verde); }

/* Requisitos de la contraseña */
.cta-requisitos {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
}

    .cta-requisitos li {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: 11.5px;
        color: var(--muted);
    }

        .cta-requisitos li::before {
            content: "";
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #cdd7e1;
            flex: none;
        }

        .cta-requisitos li.ok {
            color: var(--verde);
            font-weight: 600;
        }

            .cta-requisitos li.ok::before { background: var(--verde); }

@media (max-width: 480px) {
    .cta {
        padding: 22px 18px;
        border-radius: 12px;
    }

    .cta-requisitos { grid-template-columns: 1fr; }
}
