/* ============================================================
   2FA — challenge de login + wizard de activación
   Portado del handoff Claude Design "design_handoff_2fa".
   Shell "seguridad" (variante del split de onboarding).
   Hardcoded Argenplas (igual que login/onboarding).
   ============================================================ */

/* ───────── Visibility ───────── */
.sec--desktop { display: flex; }
.sec--mobile { display: none; }

@media (max-width: 599px) {
    .sec--desktop { display: none; }
    .sec--mobile { display: block; }
}

/* ───────── Shell desktop ───────── */
.sec {
    width: 100%;
    min-height: 100vh;
    background: #f6f6f4;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow: hidden;
}

.sec__brand {
    flex: 0 0 38%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(155deg, #0a2540 0%, #1656a8 45%, #2b8fd6 85%, #3fb8d9 100%);
    display: flex;
    flex-direction: column;
    padding: 40px 44px;
    color: #fff;
    box-sizing: border-box;
}

.sec__orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.sec__orb--tr {
    top: -140px;
    right: -120px;
    width: 440px;
    height: 440px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
}

.sec__orb--bl {
    bottom: -180px;
    left: -140px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(63, 184, 217, 0.35) 0%, transparent 65%);
}

.sec__brand-logo {
    position: relative;
    z-index: 1;
}

.sec__brand-logo img {
    width: 180px;
    height: auto;
    display: block;
}

.sec__brand-center {
    position: relative;
    z-index: 1;
    margin-top: auto;
    margin-bottom: auto;
    padding-top: 32px;
}

.sec__steplabel {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.sec__steplabel-ic {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.sec__steplabel-txt {
    font-size: 11px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.85;
}

.sec__headline {
    margin: 0;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.sec__headline-accent {
    background: linear-gradient(90deg, #a8e6f0 0%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sec__subline {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 12px;
    line-height: 1.55;
    max-width: 400px;
}

.sec__bullets {
    margin-top: 28px;
    padding: 16px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.sec__bullets-title {
    font-size: 10.5px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.85;
    margin-bottom: 10px;
}

.sec__bullet {
    display: flex;
    gap: 11px;
    padding: 7px 0;
    font-size: 12.8px;
    line-height: 1.45;
}

.sec__bullet-ic {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sec__bullet-body { flex: 1; opacity: 0.95; }
.sec__bullet-t { font-weight: 700; }
.sec__bullet-s { opacity: 0.75; font-size: 11.5px; margin-top: 1px; }

.sec__brand-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 16px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sec__brand-footer .sec__copy { opacity: 0.6; }
.sec__brand-footer .sec__note { opacity: 0.7; }

/* ───────── Right panel ───────── */
.sec__body-wrap {
    flex: 1;
    overflow: auto;
    min-height: 100vh;
}

.sec__body {
    max-width: 540px;
    margin: 0 auto;
    padding: 52px 48px;
}

.sec__body--wide { max-width: 720px; padding: 40px 48px 48px; }
.sec__body--mid { max-width: 620px; padding: 40px 48px 48px; }

/* ───────── Hero ───────── */
.sec__hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
}

.sec__hero-circle {
    width: 94px;
    height: 94px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e6f3fb 0%, #e6f7f8 100%);
    border: 2px solid rgba(46, 180, 188, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
    color: #0070B7;
}

.sec__hero-circle--sm { width: 84px; height: 84px; margin-bottom: 14px; }

.sec__hero-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #0070B7;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.sec__hero-circle--success {
    width: 92px;
    height: 92px;
    background: linear-gradient(135deg, #1f7a3f 0%, #2da855 100%);
    border: none;
    color: #fff;
    box-shadow: 0 8px 24px rgba(31, 122, 63, 0.3);
}

.sec__pill-success {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #e7f6ec;
    color: #1f7a3f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.sec__pill-success::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1f7a3f;
}

.sec__h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: #0a2540;
    letter-spacing: -0.02em;
}

.sec__subtext {
    font-size: 14px;
    color: #4a4a44;
    margin-top: 8px;
    max-width: 460px;
    line-height: 1.55;
}

.sec__subtext b, .sec__subtext strong { color: #0a2540; }

/* ───────── Stepper mini ───────── */
.sec__stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 22px;
    font-size: 11.5px;
    font-weight: 600;
    flex-wrap: wrap;
}

.sec__step {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6e6e66;
}

.sec__step-n {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #eeeeea;
    color: #6e6e66;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.sec__step--active { color: #0a2540; }
.sec__step--active .sec__step-n { background: #0070B7; color: #fff; }

.sec__step-div { width: 24px; height: 1px; background: #e3e3dd; }

/* ───────── Cards ───────── */
.sec__card {
    padding: 18px;
    background: #fff;
    border: 1px solid #e3e3dd;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(10, 37, 64, 0.06);
    margin-bottom: 18px;
}

.sec__kicker {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 700;
    color: #6e6e66;
    margin-bottom: 10px;
}

/* QR + clave manual */
.sec__qr-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
}

.sec__qr-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.sec__qr-box {
    padding: 12px;
    background: #fff;
    border: 2px solid #0a2540;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(10, 37, 64, 0.12);
}

.sec__qr-box .sec__qr-canvas {
    width: 180px;
    height: 180px;
}

.sec__qr-canvas svg { width: 100%; height: 100%; display: block; }

.sec__qr-hint {
    font-size: 11px;
    color: #6e6e66;
    text-align: center;
}

.sec__steps-list {
    margin: 0;
    padding: 0 0 0 16px;
    font-size: 13px;
    color: #2f2f2b;
    line-height: 1.7;
}

.sec__manualkey {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f6f6f4;
    border: 1px solid #e3e3dd;
    border-radius: 8px;
    padding: 8px 12px;
}

.sec__manualkey-value {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 13px;
    font-weight: 700;
    color: #0a2540;
    letter-spacing: 1.2px;
    word-break: break-all;
}

.sec__copykey {
    background: #fff;
    border: 1px solid #e3e3dd;
    border-radius: 6px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 600;
    color: #0070B7;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.sec__copykey:hover { background: #f6f6f4; }

.sec__account-caption {
    font-size: 11px;
    color: #6e6e66;
    margin-top: 6px;
    line-height: 1.4;
}

.sec__account-caption b { color: #2f2f2b; }

.sec__otp-caption {
    text-align: center;
    font-size: 11.5px;
    color: #6e6e66;
    margin-top: 10px;
}

/* ───────── OTP cells (spec del handoff 2FA) ───────── */
.otp-cells {
    display: flex;
    justify-content: center;
    gap: 11px;
}

.otp-cells__cell {
    width: 56px;
    height: 66px;
    border-radius: 10px;
    border: 2px solid #e3e3dd;
    background: #fbfbfa;
    text-align: center;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 30px;
    font-weight: 700;
    color: #0a2540;
    outline: none;
    caret-color: #0070B7;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.otp-cells__cell--filled {
    border-color: #0070B7;
    background: #fff;
}

.otp-cells__cell:focus {
    border-color: #005A94;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(29, 111, 199, 0.18);
}

.otp-cells__cell:disabled {
    background: #f6f6f4;
    color: #9e9e95;
}

.otp-cells--error .otp-cells__cell { border-color: #c33; }

.otp-cells--dense { gap: 8px; }

.otp-cells--dense .otp-cells__cell {
    width: 42px;
    height: 54px;
    font-size: 22px;
}

/* ───────── Botones ───────── */
.sec__cta {
    width: 100%;
    height: 50px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(90deg, #1d6fc7 0%, #2b8fd6 55%, #3fb8d9 100%);
    color: #fff;
    font-size: 14.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(22, 86, 168, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sec__cta:disabled {
    opacity: 0.55;
    cursor: default;
}

.sec__btn {
    flex: 0 0 auto;
    height: 50px;
    padding: 0 18px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e3e3dd;
    color: #2f2f2b;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.sec__btn:hover { background: #f6f6f4; }

.sec__cta-row { display: flex; gap: 10px; }
.sec__cta-row .sec__cta { flex: 1; }

.sec__spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sec-spin 0.7s linear infinite;
}

@keyframes sec-spin { to { transform: rotate(360deg); } }

/* ───────── Error ───────── */
.sec__error {
    text-align: center;
    font-size: 12px;
    color: #c33;
    margin-top: 10px;
}

/* ───────── Card de ayuda (challenge) ───────── */
.sec__help {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f6f6f4;
    border: 1px solid #e3e3dd;
}

.sec__help-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e3e3dd;
    cursor: pointer;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.sec__help-row:last-child { border-bottom: none; }

.sec__help-ic {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e3e3dd;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #0070B7;
}

.sec__help-t { font-size: 13px; font-weight: 600; color: #0a2540; }
.sec__help-s { font-size: 11.5px; color: #6e6e66; margin-top: 1px; }
.sec__help-body { flex: 1; min-width: 0; }

.sec__foot {
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
    color: #6e6e66;
}

.sec__foot button {
    background: none;
    border: none;
    padding: 0;
    color: #0070B7;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

/* Input de código de respaldo (modo recovery del challenge) */
.sec__recovery-input {
    width: 100%;
    box-sizing: border-box;
    height: 52px;
    border-radius: 10px;
    border: 2px solid #e3e3dd;
    background: #fff;
    text-align: center;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #0a2540;
    outline: none;
}

.sec__recovery-input:focus {
    border-color: #005A94;
    box-shadow: 0 0 0 3px rgba(29, 111, 199, 0.18);
}

/* ───────── Backup codes ───────── */
.sec__notice-amber {
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff8eb;
    border: 1px solid #f5d78a;
    display: flex;
    gap: 11px;
    margin-bottom: 18px;
    align-items: flex-start;
}

.sec__notice-amber-ic {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f5b842;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sec__notice-amber-txt {
    flex: 1;
    font-size: 12.5px;
    color: #6b4a0d;
    line-height: 1.5;
}

.sec__codes-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.sec__codes-stamp {
    font-size: 11px;
    color: #6e6e66;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.sec__codes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sec__code {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f6f6f4;
    border: 1px solid #e3e3dd;
    border-radius: 8px;
    padding: 10px 12px;
}

.sec__code-n {
    font-size: 10.5px;
    color: #6e6e66;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 700;
    min-width: 18px;
}

.sec__code-v {
    flex: 1;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 13.5px;
    font-weight: 700;
    color: #0a2540;
    letter-spacing: 0.8px;
}

.sec__actions {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.sec__action {
    flex: 1 1 auto;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e3e3dd;
    color: #0070B7;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.sec__action:hover { background: #f6f6f4; }

.sec__ack {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f6f6f4;
    border: 1px solid #e3e3dd;
    margin-bottom: 14px;
}

.sec__ack input { display: none; }

.sec__ack-box {
    flex-shrink: 0;
    margin-top: 1px;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid #cfcfc7;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.sec__ack-box--on {
    border-color: #0070B7;
    background: #0070B7;
}

.sec__ack-txt {
    font-size: 12.5px;
    color: #2f2f2b;
    line-height: 1.5;
}

/* ───────── Mobile ───────── */
.sec-m__header {
    background: linear-gradient(135deg, #0a2540 0%, #1656a8 50%, #2b8fd6 100%);
    padding: 18px 20px 26px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.sec-m__orb {
    position: absolute;
    top: -60px;
    right: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 65%);
    pointer-events: none;
}

.sec-m__back {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    position: relative;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.9;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.sec-m__kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    position: relative;
    font-size: 10.5px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.9;
}

.sec-m__title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    position: relative;
}

.sec-m__subtitle {
    font-size: 13px;
    opacity: 0.88;
    margin-top: 8px;
    line-height: 1.5;
    position: relative;
}

.sec-m__body {
    padding: 22px 18px 32px;
    background: #f6f6f4;
    min-height: calc(100vh - 120px);
}

.sec--mobile .sec__hero-circle { width: 76px; height: 76px; }
.sec--mobile .sec__hero-circle--sm { width: 70px; height: 70px; }
.sec--mobile .sec__hero-circle--success { width: 76px; height: 76px; }
.sec--mobile .sec__h2 { font-size: 20px; }
.sec--mobile .sec__subtext { font-size: 12.5px; max-width: 300px; }
.sec--mobile .sec__card { padding: 14px; }
.sec--mobile .sec__qr-grid { grid-template-columns: 1fr; gap: 18px; }
.sec--mobile .sec__qr-box .sec__qr-canvas { width: 156px; height: 156px; }
.sec--mobile .sec__code-v { font-size: 12px; }
.sec--mobile .sec__code { padding: 8px 10px; }
.sec--mobile .sec__action { min-width: calc(50% - 4px); }

/* Aire extra en pantallas grandes */
@media (min-width: 1600px) {
    .sec__body { padding-top: 72px; }
}
