/* =========================================================================
   AUTH REDESIGN — Viviana "Stitch" Brand Language
   Applies to #authScreen, #verificationScreen, #passwordResetScreen
   Loaded LAST among auth-related styles so it wins over style.css,
   critical-ui-fix.css and vivid-redesign.css without !important hammers.
   ========================================================================= */

:root {
    --auth-bg-base: #0D0A0F;
    --auth-bg-surface-1: #161218;
    --auth-bg-surface-2: #1C1620;
    --auth-bg-input: #201A26;
    --auth-pink: #E91E63;
    --auth-pink-light: #FF4081;
    --auth-pink-soft: #FF80AB;
    --auth-pink-deep: #C2185B;
    --auth-purple: #9C27B0;
    --auth-purple-soft: #7C4DFF;
    --auth-text-p: #FFFFFF;
    --auth-text-s: rgba(255, 255, 255, 0.62);
    --auth-text-m: rgba(255, 255, 255, 0.42);
    --auth-text-f: rgba(255, 255, 255, 0.28);
    --auth-border: rgba(255, 255, 255, 0.07);
    --auth-accent-grad: linear-gradient(135deg, #FF4081 0%, #E91E63 55%, #C2185B 100%);
    --auth-ring-grad: linear-gradient(140deg, #FF80AB 0%, #E91E63 50%, #9C27B0 100%);
    --auth-header-grad: linear-gradient(135deg, #FFFFFF 0%, #FFCAD9 55%, #FF80AB 100%);
}

/* ---------- Screen backgrounds ---------- */

#authScreen,
#verificationScreen,
#passwordResetScreen {
    background:
        radial-gradient(ellipse 80% 55% at 50% -10%,
            rgba(233, 30, 99, 0.28) 0%,
            rgba(156, 39, 176, 0.12) 35%,
            transparent 65%),
        radial-gradient(ellipse 75% 45% at 80% 110%,
            rgba(124, 77, 255, 0.20) 0%,
            transparent 60%),
        radial-gradient(ellipse 60% 40% at 10% 90%,
            rgba(255, 64, 129, 0.14) 0%,
            transparent 60%),
        var(--auth-bg-base);
    background-attachment: fixed;
    overflow-y: auto;
    justify-content: center;
    align-items: center;
    padding: 0;
    color: var(--auth-text-p);
    position: relative;
}

/* Soft blurred halo layer that floats above the gradient for extra depth */
#authScreen::before,
#verificationScreen::before,
#passwordResetScreen::before {
    content: "";
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    max-width: 640px;
    height: 380px;
    background: radial-gradient(ellipse at 50% 40%,
        rgba(233, 30, 99, 0.32) 0%,
        rgba(156, 39, 176, 0.10) 40%,
        transparent 70%);
    filter: blur(6px);
    pointer-events: none;
    z-index: 0;
}

#authScreen::after,
#verificationScreen::after,
#passwordResetScreen::after {
    content: "";
    position: absolute;
    bottom: -120px;
    right: -10%;
    width: 90%;
    max-width: 520px;
    height: 320px;
    background: radial-gradient(ellipse at 50% 50%,
        rgba(124, 77, 255, 0.22) 0%,
        transparent 60%);
    filter: blur(8px);
    pointer-events: none;
    z-index: 0;
}

/* ---------- Container ---------- */

#authScreen .auth-container,
#verificationScreen .auth-container,
#passwordResetScreen .auth-container {
    position: relative;
    z-index: 1;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 50px 26px 30px;
    padding-top: calc(50px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px));
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    box-shadow: none;
    color: var(--auth-text-p);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    animation: authFadeIn .5s cubic-bezier(.2, .9, .3, 1.1);
}

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

/* ---------- Brand logo row ---------- */

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 34px;
}

.auth-brand-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--auth-accent-grad);
    box-shadow:
        0 8px 24px rgba(233, 30, 99, 0.55),
        0 0 0 2px rgba(233, 30, 99, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

/* When the brand dot hosts the Viv SVG mascot, the mascot supplies its own
   gradient body + glow halo, so strip the pink disc backdrop to avoid a
   double-glow / hard circle behind the soft blob silhouette. */
.auth-brand-dot[data-viv] {
    width: 44px;
    height: 44px;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    filter: drop-shadow(0 6px 18px rgba(233, 30, 99, 0.45));
}
/* Fallback SVG inside the brand-dot. viv-logo.js replaces this <img> with
   the animated inline SVG once it runs; the static image is what users on
   browsers that blocked or haven't yet executed the script see instead of
   a bare letter "V". */
.auth-brand-dot[data-viv] img {
    width: 100%;
    height: 100%;
    display: block;
}

.auth-brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
    background: var(--auth-header-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

/* ---------- Headline + subtitle ---------- */

#authScreen .auth-container h2,
#verificationScreen .auth-container h2,
#passwordResetScreen .auth-container h2 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.9px;
    line-height: 1.05;
    margin: 0 0 10px;
    background: var(--auth-header-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

#authScreen .auth-subtitle,
#verificationScreen .auth-subtitle,
#passwordResetScreen .auth-subtitle {
    font-size: 15px;
    font-weight: 500;
    color: var(--auth-text-s);
    margin: 0 0 28px;
    line-height: 1.5;
    max-width: 340px;
}

#verificationScreen .auth-subtitle strong,
#passwordResetScreen .auth-subtitle strong {
    color: var(--auth-pink-soft);
    font-weight: 700;
}

/* ---------- Tabs (login / signup) ---------- */

#authScreen .auth-toggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    margin-bottom: 22px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#authScreen .toggle-btn {
    flex: 1;
    padding: 11px;
    background: transparent;
    border: none;
    color: var(--auth-text-m);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    border-radius: 11px;
    transition: color .2s ease, background .25s ease, box-shadow .25s ease;
    box-shadow: none;
}

#authScreen .toggle-btn:hover { color: var(--auth-text-s); }

#authScreen .toggle-btn.active {
    background: var(--auth-accent-grad);
    color: #fff;
    box-shadow:
        0 6px 18px rgba(233, 30, 99, 0.45),
        0 0 0 1px rgba(233, 30, 99, 0.25);
}

/* ---------- Form ---------- */

#authScreen .auth-form,
#verificationScreen .auth-form,
#passwordResetScreen .auth-form {
    display: none;
}

#authScreen .auth-form.active,
#verificationScreen .auth-form,
#passwordResetScreen .auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: authFormSlide .4s cubic-bezier(.2, .9, .3, 1.1);
}

@keyframes authFormSlide {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

#authScreen .input-group,
#verificationScreen .input-group,
#passwordResetScreen .input-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#authScreen .input-group label,
#verificationScreen .input-group label,
#passwordResetScreen .input-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--auth-pink-soft);
    letter-spacing: 1px;
    text-transform: uppercase;
    padding-left: 4px;
    margin-bottom: 0;
}

#authScreen .input-group input,
#verificationScreen .input-group input,
#passwordResetScreen .input-group input {
    background: var(--auth-bg-input);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 14px 16px;
    color: #fff;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 500;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    width: 100%;
    box-sizing: border-box;
}

#authScreen .input-group input::placeholder,
#verificationScreen .input-group input::placeholder,
#passwordResetScreen .input-group input::placeholder {
    color: var(--auth-text-f);
}

#authScreen .input-group input:focus,
#verificationScreen .input-group input:focus,
#passwordResetScreen .input-group input:focus {
    border-color: rgba(233, 30, 99, 0.4);
    background: rgba(32, 26, 38, 0.9);
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.12);
}

#authScreen .input-group input:-webkit-autofill,
#verificationScreen .input-group input:-webkit-autofill,
#passwordResetScreen .input-group input:-webkit-autofill {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px var(--auth-bg-input) inset;
    caret-color: #fff;
}

/* ---------- Forgot password link ---------- */

#authScreen .forgot-password-row {
    display: flex;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
}

#authScreen .btn-forgot-password {
    background: transparent;
    border: none;
    color: var(--auth-pink-soft);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    letter-spacing: 0.1px;
    transition: color .2s ease;
}

#authScreen .btn-forgot-password:hover {
    color: var(--auth-pink-light);
    text-decoration: none;
}

/* ---------- Primary CTA ---------- */

#authScreen .auth-form .btn-primary,
#verificationScreen .btn-primary,
#passwordResetScreen .btn-primary {
    margin: 10px 0 0;
    padding: 16px 24px;
    background: var(--auth-accent-grad);
    border: none;
    border-radius: 18px;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow:
        0 8px 28px rgba(233, 30, 99, 0.50),
        0 0 0 1px rgba(233, 30, 99, 0.25),
        0 1px 0 rgba(255, 255, 255, 0.18) inset;
    width: 100%;
    max-width: none;
    transition: transform .18s ease, box-shadow .28s ease, filter .2s ease;
}

#authScreen .auth-form .btn-primary:hover,
#verificationScreen .btn-primary:hover,
#passwordResetScreen .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 36px rgba(233, 30, 99, 0.60),
        0 0 0 1px rgba(233, 30, 99, 0.35),
        0 1px 0 rgba(255, 255, 255, 0.22) inset;
}

#authScreen .auth-form .btn-primary:active,
#verificationScreen .btn-primary:active,
#passwordResetScreen .btn-primary:active {
    transform: scale(0.985);
}

/* ---------- Divider ---------- */

#authScreen .divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 12px;
    color: var(--auth-text-m);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: static;
    text-align: left;
    background: none;
    border: 0;
}

#authScreen .divider::before,
#authScreen .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    position: static;
    width: auto;
    top: auto;
    left: auto;
    transform: none;
}

#authScreen .divider span {
    position: static;
    background: transparent;
    padding: 0;
    color: var(--auth-text-m);
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600;
}

/* ---------- Google button ---------- */

#authScreen .btn-google {
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--auth-border);
    border-radius: 16px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    transition: background .2s ease, border-color .2s ease, transform .18s ease;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

#authScreen .btn-google:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 128, 171, 0.25);
}

#authScreen .btn-google:active {
    transform: scale(0.985);
    background: rgba(255, 255, 255, 0.06);
}

#authScreen .btn-google svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ---------- Consent + Legal footer ---------- */

#authScreen .auth-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 2px 4px;
    font-size: 13px;
    color: var(--auth-text-s);
    line-height: 1.5;
    cursor: pointer;
    margin: 4px 0 2px;
}

#authScreen .auth-consent input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--auth-pink);
    cursor: pointer;
}

#authScreen .auth-consent-text a {
    color: var(--auth-pink-soft);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(255, 128, 171, 0.4);
}

#authScreen .auth-consent-text a:hover {
    color: var(--auth-pink-light);
    text-decoration-color: var(--auth-pink-light);
}

/* Shake animation when the user clicks Google Sign-In without accepting T&C. */
.auth-consent-shake {
    animation: authConsentShake 0.6s ease;
}
.auth-consent-shake input[type="checkbox"] {
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.45);
    border-radius: 4px;
}
@keyframes authConsentShake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

#authScreen .auth-legal-footer {
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    color: var(--auth-text-m);
}

#authScreen .auth-legal-footer a {
    color: var(--auth-pink-soft);
    text-decoration: none;
    font-weight: 600;
}

#authScreen .auth-legal-footer a:hover {
    color: var(--auth-pink-light);
    text-decoration: underline;
}

/* ---------- Back button (verification + reset) ---------- */

#verificationScreen .back-btn,
#passwordResetScreen .back-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--auth-border);
    color: var(--auth-text-p);
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    padding: 0;
    transition: background .2s ease, border-color .2s ease, transform .18s ease;
}

#verificationScreen .back-btn:hover,
#passwordResetScreen .back-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 128, 171, 0.3);
}

#verificationScreen .back-btn:active,
#passwordResetScreen .back-btn:active {
    transform: scale(0.94);
}

#verificationScreen .back-btn svg,
#passwordResetScreen .back-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* ---------- Verification / Reset icon ---------- */

#verificationScreen .verification-icon,
#passwordResetScreen .verification-icon {
    text-align: center;
    margin: 8px 0 28px;
    position: relative;
}

#verificationScreen .verification-icon::before,
#passwordResetScreen .verification-icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle,
        rgba(233, 30, 99, 0.28) 0%,
        transparent 60%);
    filter: blur(4px);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

#verificationScreen .verification-icon svg,
#passwordResetScreen .verification-icon svg {
    width: 72px;
    height: 72px;
    stroke: url(#authIconGradient);
    stroke: var(--auth-pink-light);
    opacity: 1;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 6px 18px rgba(233, 30, 99, 0.45));
}

/* ---------- Verification error banner ---------- */

#verificationScreen .verification-error {
    background: rgba(255, 59, 48, 0.14);
    color: #ff8b85;
    border: 1px solid rgba(255, 59, 48, 0.3);
    padding: 12px 14px;
    border-radius: 14px;
    margin: 0 0 4px;
    font-size: 13.5px;
    font-weight: 500;
    text-align: center;
}

/* ---------- Resend section (verification) ---------- */

#verificationScreen .resend-section {
    text-align: center;
    margin-top: 26px !important;
    padding-top: 24px;
    border-top: none;
    position: relative;
}

#verificationScreen .resend-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 128, 171, 0.25), transparent);
}

#verificationScreen .resend-section p {
    font-size: 13.5px;
    color: var(--auth-text-s);
    margin-bottom: 10px;
}

#verificationScreen .btn-resend {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--auth-border);
    color: var(--auth-pink-soft);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 10px 22px;
    border-radius: 999px;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

#verificationScreen .btn-resend:hover {
    background: rgba(255, 128, 171, 0.1);
    color: var(--auth-pink-light);
    border-color: rgba(255, 128, 171, 0.3);
}

#verificationScreen .btn-resend:disabled {
    color: var(--auth-text-m);
    cursor: not-allowed;
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.03);
}

#verificationScreen .resend-timer {
    font-size: 12.5px;
    color: var(--auth-text-m);
    margin-top: 10px !important;
}

#verificationScreen .resend-timer span {
    font-weight: 700;
    color: var(--auth-pink-soft);
}

/* ---------- Password reset: "link sent" success state ---------- */

#passwordResetScreen #resetEmailSent {
    margin-top: 20px;
    text-align: center;
    padding: 22px 20px;
    background: linear-gradient(135deg,
        rgba(74, 222, 128, 0.08) 0%,
        rgba(233, 30, 99, 0.04) 100%);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 22px;
}

#passwordResetScreen #resetEmailSent p:first-child {
    color: #4ade80 !important;
    font-weight: 800 !important;
    font-size: 16px;
    margin-bottom: 10px;
}

#passwordResetScreen #resetEmailSent p {
    color: var(--auth-text-s) !important;
    line-height: 1.5;
}

/* ---------- Footer: push legal/auth-footer to the bottom ---------- */

#authScreen .auth-form {
    flex: 1 1 auto;
}

#authScreen .auth-legal-footer {
    margin-top: auto;
    padding-top: 20px;
}

/* ---------- Responsive tweaks ---------- */

@media (max-width: 380px) {
    #authScreen .auth-container,
    #verificationScreen .auth-container,
    #passwordResetScreen .auth-container {
        padding: 40px 20px 24px;
        padding-top: calc(40px + env(safe-area-inset-top, 0px));
    }

    #authScreen .auth-container h2,
    #verificationScreen .auth-container h2,
    #passwordResetScreen .auth-container h2 {
        font-size: 30px;
    }
}

@media (min-width: 600px) {
    #authScreen .auth-container,
    #verificationScreen .auth-container,
    #passwordResetScreen .auth-container {
        padding: 60px 40px 40px;
    }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    #authScreen .auth-container,
    #verificationScreen .auth-container,
    #passwordResetScreen .auth-container,
    #authScreen .auth-form.active,
    #verificationScreen .auth-form,
    #passwordResetScreen .auth-form {
        animation: none;
    }

    #authScreen .auth-form .btn-primary:hover,
    #verificationScreen .btn-primary:hover,
    #passwordResetScreen .btn-primary:hover {
        transform: none;
    }
}

/* ---------- RTL-friendly adjustments ---------- */

body.rtl #authScreen .input-group label,
body.rtl #verificationScreen .input-group label,
body.rtl #passwordResetScreen .input-group label {
    padding-left: 0;
    padding-right: 4px;
}

body.rtl #authScreen .forgot-password-row {
    justify-content: flex-start;
}

/* =========================================================================
   VERIFICATION / RESET REFINEMENT (2026-04)
   Frosted "card" surface, upgraded icon badge, email chip, celebration
   success panel and the new in-app set-new-password screen.
   ========================================================================= */

/* Frosted card that frames the actual step content on verification /
   password-reset screens. The outer auth-container keeps handling the
   brand, back-button and support footer so those stay free-floating on
   the gradient backdrop. */
#verificationScreen .auth-card,
#passwordResetScreen .auth-card,
#passwordResetNewScreen .auth-card {
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.045) 0%,
        rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 30px 24px 28px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.45),
        0 6px 24px rgba(233, 30, 99, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    text-align: center;
    animation: auth-card-enter 360ms cubic-bezier(.2,.9,.25,1) both;
}

@keyframes auth-card-enter {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Icon badge — gradient conic ring with counter-rotating SVG so the glyph
   stays upright while the ring animates. Overrides the prior verification
   -icon rules defined earlier in this file. */
#verificationScreen .verification-icon,
#passwordResetScreen .verification-icon,
#passwordResetNewScreen .verification-icon {
    width: 92px;
    height: 92px;
    margin: 4px auto 22px;
    padding: 2px;
    border-radius: 50%;
    background: conic-gradient(from 140deg,
        #FF80AB, #E91E63, #9C27B0, #7C4DFF, #FF80AB);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: auth-icon-ring-rotate 14s linear infinite;
}

#verificationScreen .verification-icon::before,
#passwordResetScreen .verification-icon::before,
#passwordResetNewScreen .verification-icon::before {
    /* Override the old blurred radial halo — keep only the ring treatment. */
    display: none;
}

#verificationScreen .verification-icon::after,
#passwordResetScreen .verification-icon::after,
#passwordResetNewScreen .verification-icon::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: inherit;
    background:
        radial-gradient(circle at 30% 25%,
            rgba(233, 30, 99, 0.22) 0%,
            rgba(22, 18, 24, 0.98) 65%,
            #161218 100%);
    z-index: 0;
}

#verificationScreen .verification-icon svg,
#passwordResetScreen .verification-icon svg,
#passwordResetNewScreen .verification-icon svg {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    stroke: #FFFFFF;
    filter: drop-shadow(0 4px 14px rgba(233, 30, 99, 0.55));
    animation: auth-icon-svg-counter 14s linear infinite;
}

@keyframes auth-icon-ring-rotate { to { transform: rotate(360deg); } }
@keyframes auth-icon-svg-counter { to { transform: rotate(-360deg); } }

@media (prefers-reduced-motion: reduce) {
    #verificationScreen .verification-icon,
    #passwordResetScreen .verification-icon,
    #passwordResetNewScreen .verification-icon,
    #verificationScreen .verification-icon svg,
    #passwordResetScreen .verification-icon svg,
    #passwordResetNewScreen .verification-icon svg {
        animation: none;
    }
    #verificationScreen .auth-card,
    #passwordResetScreen .auth-card,
    #passwordResetNewScreen .auth-card { animation: none; }
}

/* Prominent email chip — used on the verification screen to show the
   address the link was sent to, and on the new-password screen to show
   the account being updated. A small live-dot hints "we're watching for
   confirmation". */
.auth-email-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    max-width: 100%;
    margin: 2px auto 16px;
    padding: 9px 16px;
    background: rgba(255, 64, 129, 0.10);
    border: 1px solid rgba(255, 64, 129, 0.28);
    border-radius: 999px;
    color: #FFD3E2;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    letter-spacing: 0.1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(255, 128, 171, 0.05);
}
.auth-email-chip::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
    flex-shrink: 0;
    animation: auth-email-pulse 2.4s ease-in-out infinite;
}
@keyframes auth-email-pulse {
    0%, 100% { box-shadow: 0 0 6px rgba(74, 222, 128, 0.6); }
    50%      { box-shadow: 0 0 14px rgba(74, 222, 128, 0.95); }
}

/* Smaller subtitle variant (already used in the verification layout) */
#verificationScreen .auth-subtitle-small,
#passwordResetScreen .auth-subtitle-small,
#passwordResetNewScreen .auth-subtitle-small {
    margin-top: 8px;
    font-size: 13.5px;
    color: var(--auth-text-m);
}

/* Celebration success panel — used by both the reset-link-sent state and
   the set-new-password success state. Replaces the thin inline green
   block that previously popped up under the form. */
#passwordResetScreen #resetEmailSent,
#passwordResetNewScreen #passwordResetNewSuccess {
    margin: 6px 0 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    text-align: center;
    animation: auth-card-enter 320ms cubic-bezier(.2,.9,.25,1) both;
}

.reset-success-icon {
    width: 82px;
    height: 82px;
    margin: 4px auto 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%,
        rgba(74, 222, 128, 0.26) 0%,
        rgba(74, 222, 128, 0.05) 70%);
    border: 1px solid rgba(74, 222, 128, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 10px 30px rgba(74, 222, 128, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.reset-success-icon svg {
    width: 40px;
    height: 40px;
    stroke: #4ade80;
    filter: drop-shadow(0 3px 12px rgba(74, 222, 128, 0.55));
    stroke-linecap: round;
    stroke-linejoin: round;
}

#passwordResetScreen #resetEmailSent h3,
#passwordResetNewScreen #passwordResetNewSuccess h3 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.3px;
}
#passwordResetScreen #resetEmailSent p.sub,
#passwordResetNewScreen #passwordResetNewSuccess p.sub {
    margin: 0 0 20px;
    font-size: 14px;
    color: var(--auth-text-s);
    line-height: 1.55;
}

/* Step list inside the "link sent" state — explains exactly what to do
   next so users aren't left staring at a wall of toast copy. */
#passwordResetScreen #resetEmailSent .steps {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}
#passwordResetScreen #resetEmailSent .steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    font-size: 13.5px;
    color: var(--auth-text-s);
    line-height: 1.45;
}
#passwordResetScreen #resetEmailSent .steps .step-num {
    background: var(--auth-accent-grad);
    color: #fff;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
    box-shadow: 0 4px 10px rgba(233, 30, 99, 0.35);
}

/* Resend section inside the card — lift padding so the divider sits
   flush against the card's interior rhythm. */
#verificationScreen .auth-card .resend-section {
    margin-top: 22px !important;
    padding-top: 22px;
}
#verificationScreen .auth-card .resend-section p {
    margin-bottom: 10px;
}

/* Error banner margin reset inside the card */
#verificationScreen .auth-card .verification-error,
#passwordResetNewScreen .auth-card .verification-error {
    margin: 0 0 14px;
    text-align: center;
}

/* Support line under each card */
.auth-support-line {
    margin: 20px auto 0;
    text-align: center;
    font-size: 12.5px;
    color: var(--auth-text-f);
    display: flex;
    justify-content: center;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.auth-support-line a {
    color: var(--auth-pink-soft);
    text-decoration: none;
    font-weight: 600;
    transition: color .2s ease;
}
.auth-support-line a:hover { color: var(--auth-pink-light); }

/* Submit button: spinner state for async actions (set new password). */
.btn-primary.is-loading {
    pointer-events: none;
    opacity: 0.75;
    position: relative;
    color: transparent !important;
}
.btn-primary.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #FFFFFF;
    animation: auth-btn-spin 0.7s linear infinite;
}
@keyframes auth-btn-spin { to { transform: rotate(360deg); } }

