/* Shared auth recovery pages — matches Orivex login */
:root {
    --ink: #0f172a;
    --ink-soft: #1e293b;
    --muted: #64748b;
    --muted-2: #94a3b8;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --field: #f8fafc;
    --field-hover: #f1f5f9;
    --brand: #92400e;
    --brand-hover: #a16207;
    --brand-dark: #78350f;
    --brand-soft: rgba(146, 64, 14, 0.08);
    --brand-ring: rgba(146, 64, 14, 0.18);
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --danger-line: #fecaca;
    --success: #059669;
    --success-soft: #ecfdf5;
    --page: #ffffff;
    --radius: 12px;
    --radius-sm: 10px;
    --shadow-btn: 0 14px 32px rgba(146, 64, 14, 0.22);
    --shadow-focus: 0 0 0 4px var(--brand-ring);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --space-xs: clamp(4px, 0.6vh, 8px);
    --space-sm: clamp(8px, 1.1vh, 12px);
    --space-md: clamp(12px, 1.6vh, 18px);
    --space-lg: clamp(16px, 2.2vh, 28px);
    --input-h: clamp(44px, 5.2vh, 50px);
    --btn-h: clamp(46px, 5.4vh, 52px);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    overflow: hidden;
    background: var(--page);
    color: var(--ink);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

.material-symbols-rounded {
    font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
    font-size: 20px;
    line-height: 1;
    user-select: none;
}

a {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-page {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-columns: minmax(340px, 42%) 1fr;
    min-height: 0;
}

.auth-side {
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 2.5vh, 36px) clamp(20px, 3.5vw, 56px);
    background: var(--page);
    overflow-y: auto;
}

.auth-content {
    width: min(400px, 100%);
    margin: auto 0;
    animation: rise-in 0.5s var(--ease) both;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    width: min(200px, 72%);
    height: auto;
    max-height: 52px;
    display: block;
    margin-bottom: var(--space-lg);
    object-fit: contain;
    object-position: left center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: var(--space-md);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover {
    color: var(--brand);
    text-decoration: none;
}

.back-link .material-symbols-rounded {
    font-size: 18px;
}

/* Steps */
.steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: var(--space-lg);
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid var(--line-strong);
    background: var(--page);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted-2);
    white-space: nowrap;
}

.step.is-active .step-num {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.step.is-active .step-label {
    color: var(--brand);
}

.step.is-done .step-num {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand);
}

.step.is-done .step-label {
    color: var(--ink-soft);
}

.step-line {
    flex: 1;
    height: 2px;
    margin: 0 8px;
    background: var(--line);
    min-width: 12px;
    border-radius: 999px;
}

.step-line.is-done {
    background: rgba(146, 64, 14, 0.35);
}

.icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand);
    margin-bottom: var(--space-sm);
}

.icon-badge .material-symbols-rounded {
    font-size: 26px;
}

.icon-badge.success {
    background: var(--success-soft);
    color: var(--success);
}

h1 {
    margin: 0;
    font-size: clamp(1.45rem, 2vw + 0.4vh, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.15;
    color: var(--ink);
}

.intro {
    margin: var(--space-xs) 0 var(--space-md);
    color: var(--muted);
    font-size: clamp(13px, 1.4vh, 15px);
    line-height: 1.55;
    font-weight: 500;
}

.intro strong {
    color: var(--ink-soft);
    font-weight: 700;
}

.field {
    margin-bottom: var(--space-sm);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field-row .field {
    min-width: 0;
}

@media (max-width: 520px) {
    .field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.field-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

label {
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
}

.hint {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted-2);
}

.input-wrap {
    position: relative;
}

.input-wrap > .leading-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-2);
    pointer-events: none;
    z-index: 1;
}

.input-wrap:focus-within > .leading-icon {
    color: var(--brand);
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="date"],
input[type="tel"],
input[type="number"],
select {
    width: 100%;
    height: var(--input-h);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: var(--field);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 550;
    outline: none;
    padding: 0 46px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

/* Native date control — keep room for icon + calendar picker */
input[type="date"] {
    min-width: 0;
    padding-right: 14px;
    letter-spacing: 0.02em;
    color-scheme: light;
    -webkit-appearance: none;
    appearance: none;
}

/* Empty date looks like a muted placeholder (browser shows dd/mm/yyyy) */
input[type="date"]:invalid,
input[type="date"].is-empty {
    color: var(--muted-2);
}

input[type="date"]:focus,
input[type="date"]:valid:not(.is-empty) {
    color: var(--ink);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.55;
    margin-left: 4px;
    padding: 4px;
    border-radius: 6px;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background: var(--brand-soft);
}

input[type="date"]::-webkit-datetime-edit {
    padding: 0;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

input[type="date"]::-webkit-datetime-edit-text {
    color: var(--muted-2);
    padding: 0 2px;
}

input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
    padding: 0 1px;
}

/* Date field: slightly wider gap so dd / mm / yyyy does not crush together */
.input-wrap.is-date input[type="date"] {
    padding-left: 46px;
    padding-right: 12px;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 420px) {
    input[type="date"] {
        font-size: 13px;
    }
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 42px;
    /* muted placeholder look when empty */
    color: var(--ink);
}

select.is-empty {
    color: var(--muted-2);
}

select option {
    color: var(--ink);
    font-weight: 550;
}

select option[value=""] {
    color: var(--muted-2);
}

.input-wrap.is-select .select-caret {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-2);
    pointer-events: none;
    font-size: 22px;
    z-index: 1;
}

.input-wrap.is-select:focus-within .select-caret {
    color: var(--brand);
}

input::placeholder {
    color: var(--muted-2);
    font-weight: 500;
}

input:hover,
select:hover {
    background: var(--field-hover);
    border-color: var(--line-strong);
}

input:focus,
select:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: var(--shadow-focus);
}

.field.has-error input,
.field.has-error select {
    border-color: var(--danger);
    background: var(--danger-soft);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.field.has-error .leading-icon {
    color: var(--danger);
}

.field-error {
    display: none;
    margin-top: 6px;
    color: var(--danger);
    font-size: 12.5px;
    font-weight: 600;
    align-items: center;
    gap: 4px;
}

.field.has-error .field-error {
    display: flex;
}

.toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted-2);
    cursor: pointer;
}

.toggle:hover {
    color: var(--ink-soft);
    background: rgba(15, 23, 42, 0.05);
}

/* OTP boxes + premium UPI-style success animation
   Spring ease: snappy in, soft settle + celebratory bloops */
.otp-stage {
    --otp-spring: cubic-bezier(0.22, 1.2, 0.36, 1);
    --otp-snap: cubic-bezier(0.2, 0.85, 0.25, 1);
    --otp-out: cubic-bezier(0.4, 0, 0.2, 1);
    --otp-bloop: cubic-bezier(0.18, 1.35, 0.32, 1);
    position: relative;
    margin: var(--space-md) 0 var(--space-sm);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
    overflow: visible;
}

/* Floating bloop / sparkle particles */
.otp-bloops {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    z-index: 4;
    pointer-events: none;
}

.otp-bloop {
    position: absolute;
    left: 0;
    top: 0;
    width: var(--bs, 10px);
    height: var(--bs, 10px);
    margin: calc(var(--bs, 10px) / -2) 0 0 calc(var(--bs, 10px) / -2);
    border-radius: 50%;
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.2);
    animation: otp-bloop-fly 0.78s var(--otp-bloop) var(--bd, 0ms) both;
    will-change: transform, opacity;
}

.otp-bloop--orb {
    box-shadow:
        inset 0 -2px 4px rgba(255, 255, 255, 0.55),
        0 4px 12px rgba(5, 150, 105, 0.2);
}

.otp-bloop--orb::after {
    content: "";
    position: absolute;
    top: 18%;
    left: 22%;
    width: 38%;
    height: 30%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    filter: blur(0.4px);
}

.otp-bloop--spark {
    border-radius: 2px;
    transform: translate3d(0, 0, 0) scale(0.2) rotate(25deg);
    animation-name: otp-bloop-spark;
    box-shadow: 0 0 10px currentColor;
}

.otp-bloop--dot {
    animation-duration: 0.65s;
}

.otp-bloop--ring {
    background: transparent !important;
    border: 2px solid rgba(16, 185, 129, 0.55);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
    animation-name: otp-bloop-ring;
    animation-duration: 0.7s;
}

.otp-bloop--mint { background: radial-gradient(circle at 30% 30%, #a7f3d0, #34d399 55%, #059669); color: #34d399; }
.otp-bloop--lime { background: radial-gradient(circle at 30% 30%, #d9f99d, #84cc16 60%, #65a30d); color: #a3e635; }
.otp-bloop--emerald { background: radial-gradient(circle at 30% 30%, #6ee7b7, #10b981 50%, #047857); color: #10b981; }
.otp-bloop--soft { background: radial-gradient(circle at 30% 30%, #ecfdf5, #86efac 70%, #6ee7b7); color: #86efac; }
.otp-bloop--gold { background: radial-gradient(circle at 30% 30%, #fef3c7, #fbbf24 55%, #d97706); color: #fbbf24; }
.otp-bloop--rose { background: radial-gradient(circle at 30% 30%, #fecaca, #f87171 55%, #dc2626); color: #f87171; }
.otp-bloop--coral { background: radial-gradient(circle at 30% 30%, #fed7aa, #fb7185 55%, #e11d48); color: #fb7185; }
.otp-bloop--ring-red {
    background: transparent !important;
    border-color: rgba(239, 68, 68, 0.55);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.28);
}

@keyframes otp-bloop-fly {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(0.15);
    }
    18% {
        opacity: 1;
        transform: translate3d(calc(var(--bx) * 0.25), calc(var(--by) * 0.2), 0) scale(1.15);
    }
    55% {
        opacity: 0.95;
        transform: translate3d(calc(var(--bx) * 0.85), calc(var(--by) * 0.8 - 6px), 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--bx), calc(var(--by) - 14px), 0) scale(0.35);
    }
}

@keyframes otp-bloop-spark {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(0.1) rotate(0deg);
    }
    20% {
        opacity: 1;
        transform: translate3d(calc(var(--bx) * 0.3), calc(var(--by) * 0.25), 0) scale(1.2) rotate(40deg);
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--bx), calc(var(--by) - 18px), 0) scale(0.2) rotate(120deg);
    }
}

@keyframes otp-bloop-ring {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(0.2);
    }
    25% {
        opacity: 0.85;
        transform: translate3d(calc(var(--bx) * 0.35), calc(var(--by) * 0.3), 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--bx), var(--by), 0) scale(1.8);
    }
}

.otp-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    will-change: transform, opacity;
    transition:
        transform 0.38s var(--otp-spring),
        opacity 0.22s var(--otp-out),
        filter 0.28s var(--otp-out);
}

.otp-row.is-reenter {
    animation: otp-row-reenter 0.4s var(--otp-spring) both;
}

@keyframes otp-row-reenter {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(6px);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

.otp-row input {
    width: 100%;
    max-width: 58px;
    flex: 0 0 58px;
    height: 58px;
    padding: 0;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
    border-radius: 14px;
    will-change: transform, box-shadow, border-color, background;
    transition:
        border-color 0.18s var(--otp-out),
        background 0.18s var(--otp-out),
        color 0.18s var(--otp-out),
        box-shadow 0.28s var(--otp-spring),
        transform 0.32s var(--otp-spring),
        opacity 0.2s var(--otp-out),
        flex-basis 0.32s var(--otp-snap),
        max-width 0.32s var(--otp-snap),
        margin 0.32s var(--otp-snap),
        border-radius 0.32s var(--otp-snap);
}

/* Keep digit boxes vivid while animating (disabled for input lock) */
.otp-row input:disabled {
    opacity: 1;
    -webkit-text-fill-color: currentColor;
    color: inherit;
    cursor: default;
}

.otp-row.has-error input {
    border-color: var(--danger);
    background: var(--danger-soft);
    animation: otp-shake 0.32s var(--otp-snap);
}

/* Lines between digit boxes */
.otp-connector {
    flex: 1 1 18px;
    min-width: 12px;
    max-width: 28px;
    height: 3px;
    margin: 0 4px;
    border-radius: 999px;
    background: var(--line);
    position: relative;
    overflow: hidden;
    transition:
        flex-basis 0.3s var(--otp-snap),
        max-width 0.3s var(--otp-snap),
        min-width 0.3s var(--otp-snap),
        margin 0.3s var(--otp-snap),
        opacity 0.18s var(--otp-out),
        transform 0.3s var(--otp-snap);
}

.otp-connector i {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #34d399 0%, #10b981 55%, #059669 100%);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.55);
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
    transition: transform 0.2s var(--otp-snap);
}

/* Phase 1: staggered green highlight + connector draw */
.otp-stage.is-connecting .otp-row.is-success input {
    border-color: #10b981;
    background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
    color: #047857;
    box-shadow:
        0 0 0 3px rgba(16, 185, 129, 0.2),
        0 8px 18px rgba(5, 150, 105, 0.12);
    animation: otp-box-glow 0.38s var(--otp-spring) both;
}

.otp-stage.is-connecting .otp-row.is-success input:nth-child(1) { animation-delay: 0s; }
.otp-stage.is-connecting .otp-row.is-success input:nth-child(3) { animation-delay: 0.05s; }
.otp-stage.is-connecting .otp-row.is-success input:nth-child(5) { animation-delay: 0.1s; }
.otp-stage.is-connecting .otp-row.is-success input:nth-child(7) { animation-delay: 0.15s; }
.otp-stage.is-connecting .otp-row.is-success input:nth-child(9) { animation-delay: 0.2s; }
.otp-stage.is-connecting .otp-row.is-success input:nth-child(11) { animation-delay: 0.25s; }

/* Phase 1 fail: red connectors + boxes */
.otp-stage.is-connecting.is-failing .otp-connector i {
    background: linear-gradient(90deg, #f87171 0%, #ef4444 55%, #dc2626 100%);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

.otp-stage.is-connecting .otp-row.is-fail input {
    border-color: #ef4444;
    background: linear-gradient(180deg, #fef2f2 0%, #fecaca 100%);
    color: #b91c1c;
    box-shadow:
        0 0 0 3px rgba(239, 68, 68, 0.18),
        0 8px 18px rgba(220, 38, 38, 0.12);
    animation: otp-box-glow-fail 0.38s var(--otp-spring) both;
}

.otp-stage.is-connecting .otp-row.is-fail input:nth-child(1) { animation-delay: 0s; }
.otp-stage.is-connecting .otp-row.is-fail input:nth-child(3) { animation-delay: 0.05s; }
.otp-stage.is-connecting .otp-row.is-fail input:nth-child(5) { animation-delay: 0.1s; }
.otp-stage.is-connecting .otp-row.is-fail input:nth-child(7) { animation-delay: 0.15s; }
.otp-stage.is-connecting .otp-row.is-fail input:nth-child(9) { animation-delay: 0.2s; }
.otp-stage.is-connecting .otp-row.is-fail input:nth-child(11) { animation-delay: 0.25s; }

.otp-stage.is-connecting .otp-connector i {
    transform: scaleX(1);
}

/* connectors between digit inputs (4-digit: 2,4,6 · 6-digit: +8,10) */
.otp-stage.is-connecting .otp-connector:nth-child(2) i { transition-delay: 0.03s; }
.otp-stage.is-connecting .otp-connector:nth-child(4) i { transition-delay: 0.08s; }
.otp-stage.is-connecting .otp-connector:nth-child(6) i { transition-delay: 0.13s; }
.otp-stage.is-connecting .otp-connector:nth-child(8) i { transition-delay: 0.18s; }
.otp-stage.is-connecting .otp-connector:nth-child(10) i { transition-delay: 0.23s; }

/* 6-digit rows need a wider track */
.otp-row.is-six {
    max-width: 100%;
}

.otp-row.is-six input {
    flex-basis: 44px;
    max-width: 44px;
    height: 50px;
    font-size: 18px;
}

.otp-stage.is-merging .otp-row.is-six {
    max-width: 200px;
}

.otp-stage.is-merging .otp-row.is-six input {
    flex-basis: 32px;
    max-width: 32px;
}

.otp-stage.is-merging .otp-row.is-six input:nth-child(1) { transform: scale(0.88) translateX(8px); }
.otp-stage.is-merging .otp-row.is-six input:nth-child(3) { transform: scale(0.88) translateX(5px); }
.otp-stage.is-merging .otp-row.is-six input:nth-child(5) { transform: scale(0.88) translateX(2px); }
.otp-stage.is-merging .otp-row.is-six input:nth-child(7) { transform: scale(0.88) translateX(-2px); }
.otp-stage.is-merging .otp-row.is-six input:nth-child(9) { transform: scale(0.88) translateX(-5px); }
.otp-stage.is-merging .otp-row.is-six input:nth-child(11) { transform: scale(0.88) translateX(-8px); }

.otp-stage.is-unmerging.is-expanded .otp-row.is-six {
    max-width: 100%;
}

.otp-stage.is-unmerging.is-expanded .otp-row.is-six input {
    flex-basis: 44px;
    max-width: 44px;
    height: 50px;
}

/* Phase 2: boxes snap / combine toward center */
.otp-stage.is-merging .otp-connector {
    flex-basis: 0;
    max-width: 0;
    min-width: 0;
    margin: 0;
    opacity: 0;
    transform: scaleX(0);
}

.otp-stage.is-merging .otp-row {
    gap: 0;
    max-width: 168px;
    transition:
        max-width 0.34s var(--otp-snap),
        transform 0.34s var(--otp-spring),
        opacity 0.22s var(--otp-out),
        filter 0.28s var(--otp-out);
}

.otp-stage.is-merging .otp-row input {
    flex-basis: 40px;
    max-width: 40px;
    margin: 0 -4px;
    border-radius: 50%;
    transform: scale(0.9);
    box-shadow:
        0 0 0 2px rgba(16, 185, 129, 0.28),
        0 10px 22px rgba(5, 150, 105, 0.16);
}

/* outer boxes pull harder into the middle */
.otp-stage.is-merging .otp-row input:nth-child(1) { transform: scale(0.9) translateX(6px); }
.otp-stage.is-merging .otp-row input:nth-child(3) { transform: scale(0.9) translateX(2px); }
.otp-stage.is-merging .otp-row input:nth-child(5) { transform: scale(0.9) translateX(-2px); }
.otp-stage.is-merging .otp-row input:nth-child(7) { transform: scale(0.9) translateX(-6px); }

.otp-stage.is-merging.is-failing .otp-row input {
    border-color: #ef4444;
    background: linear-gradient(180deg, #fef2f2 0%, #fecaca 100%);
    color: #b91c1c;
    box-shadow:
        0 0 0 2px rgba(239, 68, 68, 0.32),
        0 10px 22px rgba(220, 38, 38, 0.18);
}

.otp-stage.is-merging:not(.is-failing) .otp-row input {
    border-color: #10b981;
    background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
    color: #047857;
}

/* Phase 3: soft morph → premium tick / red X */
.otp-stage.is-ticked .otp-row,
.otp-stage.is-failed .otp-row {
    opacity: 0;
    transform: scale(0.28);
    filter: blur(5px);
    pointer-events: none;
    transition:
        transform 0.3s var(--otp-snap),
        opacity 0.16s var(--otp-out),
        filter 0.2s var(--otp-out);
}

/* Reverse: X dissolves → combined cluster → boxes expand back */
.otp-stage.is-unmerging .otp-fail {
    opacity: 0 !important;
    transform: scale(0.55) !important;
    pointer-events: none;
    transition:
        opacity 0.18s var(--otp-out),
        transform 0.24s var(--otp-snap) !important;
}

.otp-stage.is-unmerging .otp-row {
    opacity: 1;
    transform: scale(1);
    filter: none;
    max-width: 168px;
    pointer-events: none;
    transition:
        max-width 0.38s var(--otp-spring),
        transform 0.34s var(--otp-spring),
        opacity 0.2s var(--otp-out),
        filter 0.2s var(--otp-out);
}

.otp-stage.is-unmerging .otp-row input {
    flex-basis: 40px;
    max-width: 40px;
    margin: 0 -4px;
    border-radius: 50%;
    border-color: #ef4444;
    background: linear-gradient(180deg, #fef2f2 0%, #fecaca 100%);
    color: #b91c1c;
    opacity: 1;
    transform: scale(0.9);
    box-shadow:
        0 0 0 2px rgba(239, 68, 68, 0.22),
        0 8px 16px rgba(220, 38, 38, 0.12);
}

.otp-stage.is-unmerging.is-expanded .otp-row {
    max-width: 320px;
}

.otp-stage.is-unmerging.is-expanded .otp-connector {
    flex-basis: 18px;
    max-width: 28px;
    min-width: 12px;
    margin: 0 4px;
    opacity: 1;
    transform: scaleX(1);
    background: var(--line);
}

.otp-stage.is-unmerging.is-expanded .otp-connector i {
    transform: scaleX(0);
}

.otp-stage.is-unmerging.is-expanded .otp-row input {
    flex-basis: 58px;
    max-width: 58px;
    margin: 0;
    border-radius: 14px;
    border-color: var(--line);
    background: var(--field);
    color: var(--ink);
    box-shadow: none;
    transform: scale(1) translateX(0);
}

.otp-success {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transform: scale(0.55);
    pointer-events: none;
    will-change: transform, opacity;
    z-index: 3;
    overflow: visible;
}

.otp-stage.is-ticked .otp-success {
    opacity: 1;
    transform: scale(1);
    transition:
        opacity 0.16s var(--otp-out),
        transform 0.42s var(--otp-spring);
}

/* Concentric shockwave rings behind the tick */
.otp-success-burst {
    position: absolute;
    left: 50%;
    top: calc(50% - 10px);
    width: 74px;
    height: 74px;
    margin: -37px 0 0 -37px;
    pointer-events: none;
    z-index: 0;
}

.otp-success-burst::before,
.otp-success-burst::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(16, 185, 129, 0.5);
    opacity: 0;
}

.otp-stage.is-ticked .otp-success-burst::before {
    animation: otp-shockwave 0.65s var(--otp-out) 0.02s both;
}

.otp-stage.is-ticked .otp-success-burst::after {
    border-color: rgba(52, 211, 153, 0.4);
    animation: otp-shockwave 0.75s var(--otp-out) 0.1s both;
}

.otp-success-ring {
    position: relative;
    z-index: 1;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, #6ee7b7 0%, #10b981 48%, #047857 100%);
    box-shadow:
        0 14px 32px rgba(5, 150, 105, 0.34),
        0 0 0 0 rgba(16, 185, 129, 0.35);
    display: grid;
    place-items: center;
    animation:
        otp-ring-pop 0.48s var(--otp-spring) both,
        otp-ring-bloom 0.7s var(--otp-out) 0.05s both;
}

/* soft expanding halo */
.otp-success-ring::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid rgba(16, 185, 129, 0.45);
    opacity: 0;
    transform: scale(0.7);
    animation: otp-halo 0.55s var(--otp-out) 0.06s both;
    pointer-events: none;
}

.otp-success-ring::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.35), transparent 55%);
    pointer-events: none;
    animation: otp-sheen 0.7s var(--otp-out) 0.12s both;
}

.otp-success-svg {
    width: 74px;
    height: 74px;
    display: block;
    position: relative;
    z-index: 1;
}

.otp-success-circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.28);
    stroke-width: 2.5;
    stroke-dasharray: 201;
    stroke-dashoffset: 201;
}

.otp-stage.is-ticked .otp-success-circle {
    animation: otp-circle-draw 0.36s var(--otp-snap) 0.04s both;
}

.otp-success-check {
    fill: none;
    stroke: #fff;
    stroke-width: 4.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

.otp-stage.is-ticked .otp-success-check {
    animation: otp-check-draw 0.32s var(--otp-snap) 0.16s both;
}

.otp-success-label {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #047857;
    opacity: 0;
    transform: translateY(8px);
}

.otp-stage.is-ticked .otp-success-label {
    animation: otp-label-in 0.28s var(--otp-spring) 0.28s both;
}

/* ── Fail state: red X (mirror of success) ── */
.otp-fail {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transform: scale(0.55);
    pointer-events: none;
    will-change: transform, opacity;
    z-index: 3;
    overflow: visible;
}

.otp-stage.is-failed .otp-fail {
    opacity: 1;
    transform: scale(1);
    transition:
        opacity 0.16s var(--otp-out),
        transform 0.42s var(--otp-spring);
}

.otp-stage.is-resetting .otp-fail {
    opacity: 0;
    transform: scale(0.7);
    transition:
        opacity 0.22s var(--otp-out),
        transform 0.28s var(--otp-snap);
}

.otp-stage.is-resetting .otp-row {
    opacity: 0;
}

.otp-fail-burst {
    position: absolute;
    left: 50%;
    top: calc(50% - 10px);
    width: 74px;
    height: 74px;
    margin: -37px 0 0 -37px;
    pointer-events: none;
    z-index: 0;
}

.otp-fail-burst::before,
.otp-fail-burst::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(239, 68, 68, 0.5);
    opacity: 0;
}

.otp-stage.is-failed .otp-fail-burst::before {
    animation: otp-shockwave 0.65s var(--otp-out) 0.02s both;
}

.otp-stage.is-failed .otp-fail-burst::after {
    border-color: rgba(248, 113, 113, 0.4);
    animation: otp-shockwave 0.75s var(--otp-out) 0.1s both;
}

.otp-fail-ring {
    position: relative;
    z-index: 1;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, #fca5a5 0%, #ef4444 48%, #b91c1c 100%);
    box-shadow:
        0 14px 32px rgba(220, 38, 38, 0.34),
        0 0 0 0 rgba(239, 68, 68, 0.35);
    display: grid;
    place-items: center;
    animation:
        otp-ring-pop 0.48s var(--otp-spring) both,
        otp-ring-bloom-fail 0.7s var(--otp-out) 0.05s both;
}

.otp-fail-ring::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid rgba(239, 68, 68, 0.45);
    opacity: 0;
    transform: scale(0.7);
    animation: otp-halo 0.55s var(--otp-out) 0.06s both;
    pointer-events: none;
}

.otp-fail-ring::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.32), transparent 55%);
    pointer-events: none;
    animation: otp-sheen 0.7s var(--otp-out) 0.12s both;
}

.otp-fail-svg {
    width: 74px;
    height: 74px;
    display: block;
    position: relative;
    z-index: 1;
}

.otp-fail-circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.28);
    stroke-width: 2.5;
    stroke-dasharray: 201;
    stroke-dashoffset: 201;
}

.otp-stage.is-failed .otp-fail-circle {
    animation: otp-circle-draw 0.36s var(--otp-snap) 0.04s both;
}

.otp-fail-x {
    fill: none;
    stroke: #fff;
    stroke-width: 4.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 56;
    stroke-dashoffset: 56;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

.otp-stage.is-failed .otp-fail-x {
    animation: otp-x-draw 0.34s var(--otp-snap) 0.16s both;
}

.otp-fail-label {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #b91c1c;
    opacity: 0;
    transform: translateY(8px);
}

.otp-stage.is-failed .otp-fail-label {
    animation: otp-label-in 0.28s var(--otp-spring) 0.28s both;
}

#otp-field-top.is-fading,
#resend-row.is-fading,
#demo-hint.is-fading,
#email-field-top.is-fading,
#email-resend-row.is-fading,
#totp-field-top.is-fading,
#method-tabs.is-fading,
#email-submit.is-fading,
#totp-submit.is-fading,
#submit-btn.is-hidden-anim {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--otp-out), transform 0.24s var(--otp-snap);
}

#otp-field-top.is-fading,
#resend-row.is-fading,
#demo-hint.is-fading,
#email-field-top.is-fading,
#email-resend-row.is-fading,
#totp-field-top.is-fading,
#method-tabs.is-fading {
    transform: translateY(-4px);
}

#submit-btn.is-hidden-anim {
    transform: translateY(8px) scale(0.98);
    max-height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    border-width: 0;
}

/* Draw attention to resend after a failed attempt */
#resend-row.is-highlight {
    animation: otp-resend-pulse 1.1s var(--otp-spring) 2;
}

#resend-row.is-highlight #resend-btn {
    color: var(--danger);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#resend-row.is-highlight #resend-hint {
    color: var(--ink-soft);
}

@keyframes otp-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
}

@keyframes otp-box-glow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
    45% {
        transform: scale(1.05);
        box-shadow:
            0 0 0 4px rgba(16, 185, 129, 0.22),
            0 10px 20px rgba(5, 150, 105, 0.16);
    }
    100% {
        transform: scale(1);
        box-shadow:
            0 0 0 3px rgba(16, 185, 129, 0.2),
            0 8px 18px rgba(5, 150, 105, 0.12);
    }
}

@keyframes otp-box-glow-fail {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
    40% {
        transform: scale(1.04) translateX(-2px);
        box-shadow:
            0 0 0 4px rgba(239, 68, 68, 0.2),
            0 10px 20px rgba(220, 38, 38, 0.14);
    }
    70% {
        transform: scale(1.04) translateX(2px);
    }
    100% {
        transform: scale(1) translateX(0);
        box-shadow:
            0 0 0 3px rgba(239, 68, 68, 0.18),
            0 8px 18px rgba(220, 38, 38, 0.12);
    }
}

@keyframes otp-ring-pop {
    0% {
        transform: scale(0.28);
        opacity: 0;
    }
    55% {
        transform: scale(1.1);
        opacity: 1;
    }
    78% {
        transform: scale(0.96);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes otp-ring-bloom {
    0% {
        box-shadow:
            0 8px 16px rgba(5, 150, 105, 0.2),
            0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    100% {
        box-shadow:
            0 14px 32px rgba(5, 150, 105, 0.34),
            0 0 0 12px rgba(16, 185, 129, 0);
    }
}

@keyframes otp-ring-bloom-fail {
    0% {
        box-shadow:
            0 8px 16px rgba(220, 38, 38, 0.2),
            0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    100% {
        box-shadow:
            0 14px 32px rgba(220, 38, 38, 0.34),
            0 0 0 12px rgba(239, 68, 68, 0);
    }
}

@keyframes otp-x-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes otp-resend-pulse {
    0%, 100% {
        transform: scale(1);
        background: transparent;
    }
    40% {
        transform: scale(1.02);
        background: rgba(254, 242, 242, 0.9);
    }
}

@keyframes otp-halo {
    0% {
        opacity: 0.7;
        transform: scale(0.75);
    }
    100% {
        opacity: 0;
        transform: scale(1.45);
    }
}

@keyframes otp-shockwave {
    0% {
        opacity: 0.75;
        transform: scale(0.55);
    }
    100% {
        opacity: 0;
        transform: scale(2.35);
    }
}

@keyframes otp-sheen {
    0% {
        opacity: 0.15;
        transform: scale(0.9);
    }
    40% {
        opacity: 1;
        transform: scale(1.02);
    }
    100% {
        opacity: 0.85;
        transform: scale(1);
    }
}

@keyframes otp-circle-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes otp-check-draw {
    0% { stroke-dashoffset: 48; }
    70% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 0; }
}

@keyframes otp-label-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .otp-bloop,
    .otp-success-burst::before,
    .otp-success-burst::after {
        animation: none !important;
        opacity: 0 !important;
    }
}

.resend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 10px;
    transition: background 0.25s ease, transform 0.25s ease;
}

.resend-row button {
    border: 0;
    background: none;
    color: var(--brand);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.resend-row button:disabled {
    color: var(--muted-2);
    cursor: not-allowed;
}

.resend-row button:not(:disabled):hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Password strength */
.strength {
    margin-top: 8px;
    display: none;
}

.strength.is-visible {
    display: block;
}

.strength-bars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 6px;
}

.strength-bars span {
    height: 4px;
    border-radius: 999px;
    background: var(--line);
}

.strength-bars[data-level="1"] span:nth-child(-n+1) { background: #ef4444; }
.strength-bars[data-level="2"] span:nth-child(-n+2) { background: #f59e0b; }
.strength-bars[data-level="3"] span:nth-child(-n+3) { background: #a16207; }
.strength-bars[data-level="4"] span:nth-child(-n+4) { background: #059669; }

.strength-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.rules {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rules li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
}

.rules li .material-symbols-rounded {
    font-size: 16px;
    color: var(--muted-2);
}

.rules li.is-met {
    color: var(--success);
}

.rules li.is-met .material-symbols-rounded {
    color: var(--success);
}

/* Buttons & alerts */
.btn {
    position: relative;
    width: 100%;
    height: var(--btn-h);
    border: 0;
    border-radius: var(--radius);
    font: inherit;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
    transition: transform 0.15s var(--ease), filter 0.15s ease, box-shadow 0.15s ease;
}

.btn-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.btn .material-symbols-rounded {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.btn-primary {
    background: linear-gradient(180deg, var(--brand-hover) 0%, var(--brand) 100%);
    color: #ffffff !important;
    box-shadow: var(--shadow-btn);
    -webkit-text-fill-color: #ffffff;
}

/* Keep label + icons pure white on brand (no inherited brand orange) */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary .btn-label,
.btn-primary .material-symbols-rounded,
.btn-primary .btn-label .material-symbols-rounded {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
}

.btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 52%);
    pointer-events: none;
    z-index: 0;
}

.btn-primary:hover:not(:disabled) {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(146, 64, 14, 0.28);
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: none;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--page);
    color: var(--ink-soft) !important;
    -webkit-text-fill-color: var(--ink-soft);
    border: 1.5px solid var(--line);
    box-shadow: none;
    margin-top: 10px;
}

.btn-secondary,
.btn-secondary .btn-label,
.btn-secondary .material-symbols-rounded {
    color: var(--ink-soft) !important;
    -webkit-text-fill-color: var(--ink-soft);
}

.btn-secondary:hover {
    background: var(--field);
}

.btn .spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
    position: relative;
    z-index: 1;
}

.btn.is-loading .spinner {
    display: block;
}

.btn.is-loading .btn-label {
    display: none;
}

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

.form-alert {
    display: none;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: var(--space-sm);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--danger-line);
    background: var(--danger-soft);
    color: #991b1b;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.form-alert.is-visible {
    display: flex;
}

.form-alert.is-success {
    border-color: #a7f3d0;
    background: var(--success-soft);
    color: #065f46;
}

.form-alert .material-symbols-rounded {
    flex-shrink: 0;
    color: var(--danger);
}

.form-alert.is-success .material-symbols-rounded {
    color: var(--success);
}

.footer-note {
    margin-top: var(--space-md);
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.demo-hint {
    margin-top: var(--space-md);
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #fafbfc, #f8fafc);
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.5;
    font-weight: 500;
}

.demo-hint strong {
    color: var(--ink-soft);
    font-weight: 700;
}

.demo-hint code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--brand);
    background: var(--brand-soft);
    padding: 1px 6px;
    border-radius: 5px;
}

/* Success state */
.success-panel {
    text-align: center;
}

.success-panel .icon-badge {
    margin-left: auto;
    margin-right: auto;
}

.success-panel h1 {
    margin-bottom: 8px;
}

/* Premium panel entrance (reset password, account created, etc.) */
.success-panel.is-anim-in .success-tick-wrap {
    animation: otp-ring-pop 0.5s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

.success-panel.is-anim-in .success-tick-ring {
    animation: otp-ring-bloom 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.04s both;
}

.success-panel.is-anim-in .success-tick-check {
    animation: otp-check-draw 0.36s cubic-bezier(0.2, 0.85, 0.25, 1) 0.18s both;
}

.success-panel.is-anim-in h1,
.success-panel.is-anim-in .intro,
.success-panel.is-anim-in .btn {
    animation: otp-label-in 0.35s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

.success-panel.is-anim-in h1 { animation-delay: 0.28s; }
.success-panel.is-anim-in .intro { animation-delay: 0.36s; }
.success-panel.is-anim-in .btn { animation-delay: 0.44s; }

.success-tick-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
}

.success-tick-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #6ee7b7 0%, #10b981 48%, #047857 100%);
    box-shadow:
        0 14px 32px rgba(5, 150, 105, 0.34),
        0 0 0 8px rgba(16, 185, 129, 0.12);
    display: grid;
    place-items: center;
    position: relative;
}

.success-tick-ring::before {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 2px solid rgba(16, 185, 129, 0.4);
    animation: otp-halo 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.08s both;
    pointer-events: none;
}

.success-tick-svg {
    width: 80px;
    height: 80px;
    display: block;
    position: relative;
    z-index: 1;
}

.success-tick-check {
    fill: none;
    stroke: #fff;
    stroke-width: 4.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
}

.success-bloops {
    position: absolute;
    left: 50%;
    top: 40px;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 2;
}

/* Field shake (login / forms) */
.field.is-shake .input-wrap,
.field.is-shake input {
    animation: otp-shake 0.36s cubic-bezier(0.2, 0.85, 0.25, 1);
}

/* Visual side */
.visual-side {
    position: relative;
    height: 100%;
    overflow: hidden;
    background: #0b1220;
}

.visual-bg {
    position: absolute;
    inset: 0;
    background: url("../img/loginpagef.webp") center / cover no-repeat;
}

.visual-copy {
    position: absolute;
    left: clamp(24px, 4vw, 48px);
    right: clamp(24px, 4vw, 48px);
    bottom: clamp(28px, 5vh, 52px);
    z-index: 1;
    color: #fff;
}

.visual-copy .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 5px 12px 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.visual-copy .eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d97706;
    box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.25);
}

.visual-copy h2 {
    margin: 0 0 10px;
    font-size: clamp(1.4rem, 1.5vw + 1vh, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    max-width: 480px;
}

.visual-copy p {
    margin: 0;
    max-width: 420px;
    font-size: clamp(0.9rem, 0.8vw + 0.5vh, 1.05rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 500;
}

@media (max-width: 900px) {
    body {
        overflow: auto;
        height: auto;
    }

    .auth-page {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        grid-template-columns: 1fr;
    }

    .auth-side {
        order: 2;
        height: auto;
        padding: 36px 24px 48px;
        overflow: visible;
    }

    .visual-side {
        order: 1;
        height: min(32vh, 280px);
        min-height: 200px;
    }

    .visual-copy h2 {
        font-size: 1.35rem;
    }

    .step-label {
        display: none;
    }
}

@media (max-width: 420px) {
    .otp-row {
        max-width: 100%;
    }

    .otp-row input {
        flex-basis: 52px;
        max-width: 52px;
        height: 52px;
        font-size: 18px;
    }

    .otp-connector {
        max-width: 18px;
        min-width: 8px;
        margin: 0 2px;
    }

    .otp-success-ring {
        width: 66px;
        height: 66px;
    }

    .otp-success-svg {
        width: 66px;
        height: 66px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
