/* ─────────────────────────────────────────────────────────────────────
   login-steps.css — verification-code steps of the login flow ONLY
   (step 2: Vali code, step 3: xPal out-of-band 2FA code).

   Deliberately kept out of login.css / site.css: the two step screens are
   brand-skinned panels (Vali blue+orange, xPal black+indigo) and share
   nothing with the admin theme. Each panel is the SAME layout — only the
   logo and the colour variables differ, via .step-vali / .step-xpal.
   ───────────────────────────────────────────────────────────────────── */

/* Step screens take over the whole viewport (the login card is hidden). The
   backdrop stays white, matching the login screen, so the brand panel is the
   only coloured element. */
body.step-active {
    background: #fff;
}

/* width:100% because the login body is itself a flex container — without it the
   wrap would shrink to its content and lose the horizontal centring. */
.step-panel-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* One brand panel. Colours come from the variables set by the skin classes
   below, so the markup and layout rules never repeat per brand. */
.step-panel {
    width: 360px;
    max-width: 100%;
    padding: 34px 30px 30px;
    background: linear-gradient(180deg, var(--step-bg-top) 0%, var(--step-bg-bottom) 100%);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    color: #fff;
    text-align: center;
}

/* ── Brand skins ──────────────────────────────────────────────────── */

/* Vali: shield-blue panel with the orange accent from the Vali logo. */
.step-vali {
    --step-bg-top: #0a3d7c;
    --step-bg-bottom: #00173a;
    --step-accent: #f7941e;
    --step-accent-hover: #ffa738;
    --step-accent-text: #fff;
    --step-box-border: rgba(255, 255, 255, 0.35);
    --step-box-focus: #f7941e;
}

/* xPal: carbon black panel with Indigo Prime / Soft Periwinkle. */
.step-xpal {
    --step-bg-top: #1c1a4a;
    --step-bg-bottom: #0d0d0d;
    --step-accent: #3631c6;
    --step-accent-hover: #4b45e0;
    --step-accent-text: #fafaff;
    --step-box-border: rgba(150, 162, 246, 0.45);
    --step-box-focus: #96a2f6;
}

/* ── Logo ─────────────────────────────────────────────────────────── */
/* Both marks are square insignia (Vali shield / xPal bubble), so one fixed box
   keeps the two panels the same height. */
.step-logo {
    height: 92px;
    margin-bottom: 18px;
}

.step-logo img {
    width: 60px;
    height: 80px;
    object-fit: contain;
}

/* ── Heading + accent divider ─────────────────────────────────────── */
.step-title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
    margin: 0 0 18px;
    padding-bottom: 18px;
    /* Two lines' worth, so a shorter heading doesn't shrink one panel relative
       to the other. */
    /* + the padding, because box-sizing is border-box. */
    min-height: calc(2 * 1.4em + 18px);
    /* Hairline that fades out at both ends, in the brand accent. */
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--step-accent), transparent) 1;
}

/* ── Code boxes ───────────────────────────────────────────────────── */
.step-code-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 22px;
}

.step-code-box {
    width: 38px;
    height: 38px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0;
    color: #fff;
    background: transparent;
    border: 1px solid var(--step-box-border);
    border-radius: 3px;
    outline: none;
    -moz-appearance: textfield;
}

.step-code-box::-webkit-outer-spin-button,
.step-code-box::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.step-code-box:focus {
    border-color: var(--step-box-focus);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

/* ── Verify button ────────────────────────────────────────────────── */
.step-submit {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    color: var(--step-accent-text);
    background: var(--step-accent);
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.step-submit:hover:not(:disabled) {
    background: var(--step-accent-hover);
}

.step-submit:disabled {
    opacity: 0.65;
    cursor: default;
}

/* ── Error line ───────────────────────────────────────────────────── */
.step-error {
    margin: 0 0 14px;
    font-size: 0.875rem;
    color: #ff6e6e;
}

@media (max-width: 420px) {
    .step-panel {
        padding: 26px 18px 22px;
    }

    .step-code-group {
        gap: 7px;
    }

    .step-code-box {
        width: 34px;
        height: 34px;
    }
}
