/*@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');*/

@font-face {
    font-family: 'Estedad';
    src: url('/public/fonts/estedad/Estedad-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Estedad';
    src: url('/public/fonts/estedad/Estedad-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Estedad';
    src: url('/public/fonts/estedad/Estedad-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Estedad';
    src: url('/public/fonts/estedad/Estedad-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Estedad';
    src: url('/public/fonts/estedad/Estedad-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Estedad';
    src: url('/public/fonts/estedad/Estedad-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Estedad';
    src: url('/public/fonts/estedad/Estedad-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Estedad';
    src: url('/public/fonts/estedad/Estedad-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Estedad';
    src: url('/public/fonts/estedad/Estedad-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/*=========== InterFnt*/

/* static fonts */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-Thin.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: italic;
    font-weight: 100;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-ThinItalic.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 200;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-ExtraLight.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: italic;
    font-weight: 200;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-ExtraLightItalic.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-Light.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: italic;
    font-weight: 300;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-LightItalic.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-Regular.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-Italic.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-Medium.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: italic;
    font-weight: 500;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-MediumItalic.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-SemiBold.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: italic;
    font-weight: 600;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-SemiBoldItalic.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-Bold.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: italic;
    font-weight: 700;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-BoldItalic.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-ExtraBold.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: italic;
    font-weight: 800;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-ExtraBoldItalic.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-Black.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: italic;
    font-weight: 900;
    font-display: swap;
    src: url("/public/fonts/inter/Inter-BlackItalic.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: normal;
    font-weight: 100;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-Thin.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: italic;
    font-weight: 100;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-ThinItalic.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: normal;
    font-weight: 200;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-ExtraLight.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: italic;
    font-weight: 200;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-ExtraLightItalic.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-Light.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: italic;
    font-weight: 300;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-LightItalic.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-Regular.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-Italic.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-Medium.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: italic;
    font-weight: 500;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-MediumItalic.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-SemiBold.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: italic;
    font-weight: 600;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-SemiBoldItalic.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-Bold.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: italic;
    font-weight: 700;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-BoldItalic.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-ExtraBold.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: italic;
    font-weight: 800;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-ExtraBoldItalic.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-Black.woff2") format("woff2");
}

@font-face {
    font-family: "InterDisplay";
    font-style: italic;
    font-weight: 900;
    font-display: swap;
    src: url("/public/fonts/inter/InterDisplay-BlackItalic.woff2") format("woff2");
}

:root {
    --bg: #fbfbff;
    --surface: rgba(255,255,255,.34);
    --surface-strong: rgba(255,255,255,.82);
    --text: #101b3a;
    --muted: #7f8eb3;
    --line: rgba(101,126,207,.24);
    --accent: #39c6f3;
    --accent-2: #9070ff;
    --danger: #e66b91;
    --success: #34c759;
    --shadow: 0 28px 80px rgba(70, 83, 165, .13);
    --crystal-opacity: 1;
}

html[data-theme="dark"] {
    --bg: #09071b;
    --surface: rgba(10,9,24,.45);
    --surface-strong: rgba(13,12,31,.78);
    --text: #f6f7ff;
    --muted: #8e91b0;
    --line: rgba(148,164,255,.24);
    --shadow: 0 28px 90px rgba(0,0,0,.46);
    --crystal-opacity: .88;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    /*    font-family: "Outfit", system-ui, sans-serif;*/
    font-family: Inter, system-ui, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 20% 50%, rgba(100, 207, 255, .10), transparent 26%), radial-gradient(circle at 80% 58%, rgba(151, 112, 255, .12), transparent 28%), var(--bg);
    transition: background .55s ease, color .4s ease;
    direction: inherit;
}

.lang-fa {
    font-family: Estedad, sans-serif;
}

.lang-fa body {
    font-family: Estedad, sans-serif;
}

button, input {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

/* ===== Scene ===== */
.scene, .aurora, .crystal {
    position: fixed;
    pointer-events: none;
}

.scene {
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.aurora {
    width: 55vw;
    height: 24vw;
    filter: blur(55px);
    opacity: .5;
    transform: rotate(-20deg);
    transition: opacity .5s ease;
}

.aurora-a {
    left: -16vw;
    top: 37vh;
    background: rgba(68, 196, 255, .24);
}

.aurora-b {
    right: -18vw;
    top: 52vh;
    background: rgb(255 100 213 / 22%);
    transform: rotate(18deg);
}

.aurora-c {
    left: 25vw;
    bottom: -12vw;
    background: rgba(116, 137, 255, .18);
}

.crystal {
    opacity: var(--crystal-opacity);
    filter: drop-shadow(0 24px 28px rgba(76, 108, 206, .13));
    transform-style: preserve-3d;
    animation: float 7s ease-in-out infinite;
}

    .crystal span {
        position: absolute;
        inset: 0;
        display: block;
        clip-path: polygon(17% 7%, 82% 0, 100% 37%, 81% 91%, 29% 100%, 0 54%);
        background: linear-gradient(135deg, rgba(255,255,255,.85), rgba(101,225,255,.42) 28%, rgba(255,139,225,.50) 54%, rgba(105,89,255,.55) 78%, rgba(255,255,255,.7));
        border: 1px solid rgba(255,255,255,.8);
        box-shadow: inset 18px 10px 25px rgba(255,255,255,.4);
    }

        .crystal span:nth-child(2) {
            transform: translate(14%, 10%) scale(.65) rotate(13deg);
            background: linear-gradient(145deg, rgba(255,230,168,.72), rgba(85,210,255,.48) 35%, rgba(195,89,255,.55) 72%);
        }

        .crystal span:nth-child(3) {
            transform: translate(-5%, 20%) scale(.48) rotate(-22deg);
            background: linear-gradient(135deg, rgba(74,227,255,.62), rgba(255,176,234,.6), rgba(104,97,255,.65));
        }

        .crystal span:nth-child(4) {
            transform: translate(18%, -3%) scale(.37) rotate(35deg);
            background: linear-gradient(160deg, rgba(255,255,255,.9), rgba(255,202,125,.62), rgba(104,205,255,.55));
        }

        .crystal span:nth-child(5) {
            transform: translate(0, 14%) scale(.28) rotate(-8deg);
            background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(126,106,255,.72), rgba(255,116,213,.55));
        }

        .crystal span:nth-child(6) {
            transform: translate(22%, 28%) scale(.22) rotate(45deg);
            background: linear-gradient(145deg, rgba(255,255,255,.7), rgba(65,206,255,.75));
        }

.crystal-top-right {
    width: 260px;
    height: 260px;
    right: 52%;
    top: 13vh;
    transform: translateX(calc(50% + 275px)) rotate(25deg);
    animation-delay: -1s;
}

.crystal-bottom-left {
    width: 310px;
    height: 310px;
    left: 52%;
    bottom: 5vh;
    transform: translateX(calc(-50% - 265px)) rotate(285deg);
    animation-delay: -6s;
}

@keyframes float {
    0%, 100% {
        translate: 0 0;
        rotate: 0deg;
    }

    50% {
        translate: 0 -12px;
        rotate: 2deg;
    }
}

/* ===== App Shell ===== */
.app-shell {
    position: relative;
    z-index: 2;
    width: min(100%, 720px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 40px 24px 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.brand-mark {
    width: 200px;
    height: 160px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111b3b;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -5px;
    padding-right: 5px;
    backdrop-filter: blur(14px);
    margin-top: -50px;
}

    .brand-mark i {
        color: #5e75ff;
        font-style: normal;
        font-size: 18px;
    }

.theme-toggle {
    position: fixed;
    top: 26px;
    left: 28px;
    z-index: 10;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(60,70,150,.12), inset 0 0 0 1px var(--line);
    backdrop-filter: blur(14px);
    transition: transform .25s ease, background .4s ease;
}

    .theme-toggle:hover {
        transform: rotate(15deg) scale(1.06);
    }

.theme-icon {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    transition: .3s ease;
    font-size: 20px;
}

.moon {
    opacity: 0;
    transform: rotate(-70deg) scale(.5);
}

body[data-theme="dark"] .sun {
    opacity: 0;
    transform: rotate(70deg) scale(.5);
}

body[data-theme="dark"] .moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* ===== Auth Card ===== */
.auth-card {
    width: min(100%, 490px);
    /* min-height: 570px; */
    min-height: 500px;
    padding: 72px 50px;
    border: 1px solid var(--line);
    border-radius: 45px;
    background: linear-gradient(145deg, var(--surface-strong), var(--surface));
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    transition: background .5s ease, box-shadow .5s ease, border-color .4s ease;
}

    .auth-card::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(120deg, rgba(255,255,255,.18), transparent 35%, rgba(115,156,255,.05));
    }

.step {
    position: relative;
    z-index: 1;
}

.step-otp {
    display: none;
    opacity: 0;
    transform: translateX(36px);
}

.heading {
    text-align: center;
    margin-bottom: 18px;
}

    .heading h1 {
        margin: 0;
        font-size: clamp(28px, 4vw, 33px);
        line-height: 1.1;
        letter-spacing: -.04em;
    }

    .heading p {
        margin: 8px 0 0;
        color: var(--muted);
        font-size: 17px;
    }

    .heading strong {
        color: var(--text);
        font-weight: 500;
    }

label {
    display: block;
    margin: 0 0 7px;
    color: var(--muted);
    font-size: 15px;
}

.field-wrap {
    position: relative;
    margin-bottom: 21px;
}

    .field-wrap input {
        width: 100%;
        height: 60px;
        padding: 0 50px 0 59px;
        border-radius: 17px;
        border: 1px solid var(--line);
        outline: none;
        color: var(--text);
        background: rgba(255,255,255,.34);
        box-shadow: inset 0 1px 2px rgba(80,90,150,.025);
        transition: border-color .25s ease, box-shadow .25s ease, background .3s ease;
        text-align: start;
        direction: inherit;
    }

body[data-theme="dark"] .field-wrap input {
    background: rgba(255,255,255,.025);
}

.field-wrap input::placeholder {
    color: #9aa7c9;
}

.field-wrap input:focus {
    border-color: #5baaff;
    box-shadow: 0 0 0 4px rgba(77,180,255,.11);
}

.field-icon {
    position: absolute;
    right: 21px;
    left: 0px;
    top: 50%;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    fill: none;
    stroke: var(--text);
    stroke-width: 1.55;
    opacity: .9;
}

[dir="ltr"] .field-icon{
    left: 21px;
    right: 0px;
}

.field-icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    background: transparent;
    color: var(--muted);
}

    .field-icon-left svg {
        width: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.6;
    }

.form-meta {
    min-height: 23px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -11px;
    margin-bottom: 10px;
}

.link-btn {
    color: #526cff;
    background: transparent;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
}

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

.error-text, .otp-error {
    color: var(--danger);
    font-size: 13px;
    min-height: 17px;
}

.primary-btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 67px;
    border-radius: 36px;
    cursor: pointer;
    color: white;
    font-weight: 600;
    font-size: 20px;
    background: linear-gradient(100deg, #35c5ee 0%, #b460f7 58%, #ff7cf5 100%);
    box-shadow: 0 17px 32px rgba(82,121,235,.20);
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

    .primary-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 21px 38px rgba(82,121,235,.28);
        filter: saturate(1.06);
    }

    .primary-btn:active {
        transform: translateY(0);
    }

    .primary-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

.btn-shine {
    position: absolute;
    inset: -40% auto -40% -25%;
    width: 30%;
    transform: skewX(-18deg);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
    animation: shine 3.8s ease-in-out infinite;
}

@keyframes shine {
    0%,45% {
        left: -35%;
    }

    75%,100% {
        left: 120%;
    }
}

.signup {
    margin: 40px 0 0;
    color: var(--muted);
    font-size: 17px;
}

    .signup button {
        color: #233db6;
        background: transparent;
        font-weight: 600;
        cursor: pointer;
    }

body[data-theme="dark"] .signup button {
    color: #8da0ff;
}

.otp-badge {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin: 0 auto 15px;
    border-radius: 18px;
    color: #6c73ff;
    background: rgba(102,127,255,.10);
    box-shadow: inset 0 0 0 1px rgba(102,127,255,.14);
}

.back-btn {
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .back-btn:hover {
        color: var(--text);
    }

.otp-inputs {
    display: grid;
    grid-template-columns: repeat(6,1fr);
    gap: 9px;
    margin: 30px 0 10px;
    direction: ltr; 
}

    .otp-inputs input {
        width: 100%;
        height: 62px;
        border-radius: 16px;
        border: 1px solid var(--line);
        outline: none;
        background: rgba(255,255,255,.3);
        color: var(--text);
        text-align: center;
        font-size: 25px;
        font-weight: 600;
        transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
    }

        .otp-inputs input:focus {
            transform: translateY(-2px);
            border-color: #5baaff;
            box-shadow: 0 0 0 4px rgba(77,180,255,.10);
        }

    .otp-inputs.shake {
        animation: shake .4s ease;
    }

@keyframes shake {
    20%,80% {
        transform: translateX(-5px);
    }

    40%,60% {
        transform: translateX(5px);
    }
}

.resend-row {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 14px;
    flex-wrap: wrap;
}

    .resend-row .link-btn {
        color: var(--muted);
    }

        .resend-row .link-btn:not(:disabled) {
            color: #526cff;
        }

        .resend-row .link-btn:disabled {
            cursor: not-allowed;
            opacity: 0.6;
        }

.demo-hint {
    display: block;
    text-align: center;
    color: var(--muted);
    margin-top: 20px;
    opacity: .75;
}

.auth-card.otp-mode .step-login {
    display: none;
}

.auth-card.otp-mode .step-otp {
    display: block;
    animation: otpIn .55s cubic-bezier(.2,.8,.2,1) forwards;
}

@keyframes otpIn {
    from {
        opacity: 0;
        transform: translateX(36px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== Welcome Screen ===== */
.auth-card.welcome-mode, .auth-card.hidden {
    display: none;
}

.welcome-screen {
    display: none;
    width: min(100%, 670px);
    min-height: 570px;
    position: relative;
    overflow: hidden;
    padding: 80px 70px;
    border-radius: 34px;
    text-align: center;
    border: 1px solid var(--line);
    background: linear-gradient(145deg,var(--surface-strong),var(--surface));
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

    .welcome-screen.is-visible {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        animation: welcomeIn .8s cubic-bezier(.2,.85,.2,1) both;
    }

@keyframes welcomeIn {
    from {
        opacity: 0;
        transform: translateY(35px) scale(.96);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.welcome-check {
    width: 105px;
    height: 105px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(59,201,241,.16), rgba(145,111,255,.16));
    box-shadow: 0 0 0 1px var(--line), 0 25px 70px rgba(94,121,247,.16);
    animation: checkPop .75s .1s cubic-bezier(.17,.89,.32,1.28) both;
}

    .welcome-check svg {
        width: 52px;
        fill: none;
        stroke: #5f7aff;
        stroke-width: 3;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

@keyframes checkPop {
    from {
        transform: scale(.2) rotate(-30deg);
        opacity: 0;
    }

    to {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

.eyebrow {
    margin: 34px 0 7px;
    color: #697dff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
}

.welcome-screen h2 {
    margin: 0;
    font-size: clamp(38px,6vw,56px);
    letter-spacing: -.05em;
}

    .welcome-screen h2 span {
        color: #647aff;
    }

.welcome-copy {
    color: var(--muted);
    font-size: 17px;
    margin: 10px 0 30px;
}

.welcome-btn {
    max-width: 270px;
    height: 60px;
    font-size: 17px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 25px;
    z-index: 20;
    transform: translate(-50%,20px);
    padding: 12px 24px;
    border-radius: 14px;
    color: var(--text);
    background: var(--surface-strong);
    box-shadow: 0 15px 35px rgba(50,60,130,.15);
    border: 1px solid var(--line);
    opacity: 0;
    pointer-events: none;
    transition: .3s ease;
    backdrop-filter: blur(16px);
    font-size: 14px;
}

    .toast.show {
        opacity: 1;
        transform: translate(-50%,0);
    }

    .toast.success {
        border-color: var(--success);
    }

    .toast.error {
        border-color: var(--danger);
    }

/* ===== Loading Spinner ===== */
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s ease-in-out infinite;
}

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

/* ===== Responsive ===== */
@media (max-width: 850px) {
    .app-shell {
        padding-top: 90px;
    }

    .brand-mark {
        margin-bottom: 35px;
    }

    .auth-card {
        padding: 60px 70px 50px;
    }

    .crystal-top-right {
        right: 3vw;
        top: 12vh;
        transform: scale(.8);
    }

    .crystal-bottom-left {
        left: 2vw;
        transform: scale(.8);
    }

    .theme-toggle {
        top: 17px;
        left: 17px;
    }
}

@media (max-width: 620px) {
    .app-shell {
        padding: 80px 14px 35px;
        justify-content: flex-start;
    }

    .theme-toggle {
        top: 17px;
        left: 17px;
        width: 42px;
        height: 42px;
    }

    .brand-mark {
        width: 150px;
        height: 120px;
        margin-bottom: 25px;
    }

    .auth-card, .welcome-screen {
        min-height: 0;
        padding: 42px 23px 38px;
        border-radius: 30px;
    }

    .heading h1 {
        font-size: 29px;
    }

    .heading p {
        font-size: 14px;
    }

    .field-wrap input {
        height: 56px;
        padding-left: 52px;
    }

    .primary-btn {
        height: 60px;
        font-size: 18px;
    }

    .signup {
        margin-top: 34px;
        font-size: 14px;
    }

    .otp-inputs {
        gap: 6px;
    }

        .otp-inputs input {
            height: 54px;
            border-radius: 13px;
            font-size: 21px;
        }

    .resend-row {
        flex-direction: column;
        align-items: center;
        gap: 3px;
    }

    .crystal-top-right {
        right: -90px;
        top: 14vh;
        transform: scale(.55);
    }

    .crystal-bottom-left {
        left: -65px;
        bottom: -10px;
        transform: scale(.58);
    }
}

.btn-back {
    text-align: center;
    display: block;
    text-decoration: none;
    margin-top: 10px;
    font-size: 0.95rem;
}

.footer-logo-box {
    background: url("/media/public/images/Dr-Logo-Ver.png");
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.8;
}

[data-theme=dark] .footer-logo-box{
    background: url("/media/public/images/Dr-Logo-Ver-dark.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}