
:root {
    font-family: 'pelak', 'vazir', sans-serif;
    line-height: 1.5;
    font-weight: 400;
    color-scheme: #000;
    background-color: #ffffff;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

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

body {
    width: 100vw;
    height: 100vh;
    background: #fff;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

main {
    height: 100vh;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 24px;
}

section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.form {
    padding-right: 24px;
    font-family: vazir;
}

.form__title {
    text-align: center;
    color: #030712;
    font-weight: 600;
    font-size: 30px;
    margin: 0 0 8px;
}

.form__description {
    color: #374151;
    text-align: center;
    margin: 0 0 32px;
}

.form__animation {
    background-color: #f7f8fa;
    border-radius: 24px;
    overflow: hidden;
    /* height: 97%; */
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 100%;
    background: #5e7ba3;
    font-family: auto;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.logo svg {
    width: 24px;
    height: 24px;
}

form {
    width: 100%;
    max-width: 420px;
}

.form-control__label {
    display: block;
    margin: 10px 0 4px;
    color: #0d0c22;
    font-weight: 500;
}

.form-control {
    height: 52px;
    display: block;
    width: 100%;
    border: 1px solid #6b7280;
    padding: 18px 20px;
    transition: outline 200ms ease, box-shadow 200ms ease;
    border-radius: 12px;
    outline: none;
    background-color: #fff;
    color: #0d0c22;
    margin-bottom: 28px;
    font-size: 16px;
}

.form-control:focus {
    border-color: #0d0c22;
    box-shadow: 0 0 0 4px rgb(0 0 0 / 10%);
}

.form-control:user-invalid {
    border-color: #dc2626;
}

.form-control:user-invalid:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgb(220, 38, 38, .1);
}

.password-field {
    position: relative;
}

.password-field svg {
    position: absolute;
    width: 24px;
    height: 24px;
    right: 13px;
    top: 13px;
}

.form__submit {
    height: 52px;
    width: 100%;
    display: block;
    font-family: 'vazir';
    background: #6f9dde;
    border-radius: 100px;
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: .2s;
}

.form__submit:hover {
    box-shadow: 0 -1px 10px rgba(13,12,34, 0.3);
}

.password__settings {
    display: flex;
    justify-content: space-between;
    margin-bottom: 28px;
}

.password__settings__remember {
    font-size: 14px;
    color: #0d0c22;
    font-weight: 500;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.password__settings__remember input {
    width: 0;
    height: 0;
    opacity: 0;
    margin: 0;
}

.custom__checkbox {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1px solid #6b7280;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
}

.custom__checkbox svg {
    transform: scale(0);
    width: 16px;
    height: 16px;
}

input:focus + .custom__checkbox {
    border-color: #0d0c22;
    box-shadow: 0 0 0 4px rgb(0 0 0 / 10%);
}

input:checked + .custom__checkbox svg {
    transform: scale(1);
}

a {
    font-size: 14px;
    color: #0875e4;
    font-weight: 500;
    text-decoration: none;
}

.form__footer {
    font-size: 14px;
    text-align: center;
    margin: 15px 0 0;
}

.ball {
    width: 300px;
    height: 300px;
    padding: 1px;
    border-radius: 100%;
    background: #ffffff00;
    animation: bounce 3s ease-out forwards;
    transform: translateY(calc(-50vh - 116px));
}

@keyframes bounce {
    5% {
        height: 300px;
        width: 300px;
    }
    10% {
        height: 300px;
        width: 280px;
    }
    15% {
        height: 280px;
        width: 320px;
        transform: translateY(0);
    }
    20%{
        height: 300px;
        width: 320px;
    }
    25% {
        transform: translateY(-200px);
    }
    30% {
        height: 300px;
        width: 300px;
    }
    35% {
        height: 300px;
        width: 280px;
    }
    40% {
        height: 280px;
        width: 320px;
        transform: translateY(0);
    }
    45%{
        height: 300px;
        width: 320px;
    }
    50% {
        transform: translateY(-160);
    }
    55% {
        height: 300px;
        width: 300px;
    }
    60% {
        height: 300px;
        width: 280px;
    }
    65% {
        height: 280px;
        width: 320px;
        transform: translateY(0);
    }
    70%{
        height: 300px;
        width: 320px;
    }
    75% {
        transform: translateY(-60px);
    }
    80% {
        height: 300px;
        width: 280px;
    }
    85% {
        height: 280px;
        width: 320px;
        transform: translateY(-20px);
    }
    90%{
        height: 300px;
        width: 320px;
    }
    100% {
        transform: translateY(0);
    }
}

.ball__eyes {
    display: flex;
    gap: 60px;
    margin-top: 50px;
    justify-content: center;
}

.eye {
    background: #fff;
    width: 30px;
    height: 30px;
    border-radius: 100%;
    padding: 3px;
    display: block;
}

.eye:before {
    content: "";
    width: 15px;
    height: 15px;
    background: #000;
    border-radius: 100%;
    display: block;
}

.ball__mouth {
    width: 30px;
    height: 30px;
    border-radius: 100%;
    background: #000;
    margin: 10px auto;
    clip-path: polygon(100% 50%, 100% 100%, 0 100%, 0 50%);
    transition: .3s;
}

.eye_wrap {
    overflow: hidden;
    animation: blink 5s infinite;
    width: 30px;
    height: 30px;
    transition: .3s;;
}

#face, #ball {
    transition: .3s;
}

#ball.sad .eye_wrap:first-child {
    clip-path: polygon(67% 0, 100% 0, 100% 50%, 100% 100%, 0 100%, 0% 50%);
}

#ball.sad .eye_wrap:last-child {
    clip-path: polygon(0 0, 43% 0, 100% 50%, 100% 100%, 0 100%, 0% 50%);
}

#ball.sad .ball__mouth {
    transform: scaleY(-1.05);
}

#ball.sad {
    animation: shake 1.5s;
}

@keyframes shake {
    0% {
        transform: rotateY(0);
    }
    25% {
        transform: rotateY(-15deg);
    }
    50% {
        transform: rotateY(15deg);
    }
    100% {
        transform: rotateY(0);
    }
}

@keyframes blink {
    0%, 100% {
        transform: scale(1, .05);
    }
    5%,
    95% {
        transform: scale(1, 1);
    }
}

.ball__shadow {
    background: rgb(0 0 0 / 5%);
    box-shadow: 0 0 10px rgb(0 0 0 / 6%);
    height: 20px;
    width: 240px;
    border-radius: 50%;
    transform: scale(0.1);
    animation: shrink 3s forwards;
}

@keyframes shrink {
    5%, 25%, 50%, 75% {
        transform: scale(0.1);
    }
    15%, 40%, 65%, 100% {
        transform: scale(1.1);
    }
}

#ball.look_at {
    transform: rotate(-17deg);
}

@media (max-width: 768px) {
    .form__animation {
        position: fixed;
        background: none;
        right: 0;
        bottom: 0;
    }

    .form__title {
        font-size: 28px;
    }

    .ball {
        width: 100px;
        height: 100px;
        animation: roll_out 1s ease-out forwards;
        transform: translate(103px, 0);
    }

    @keyframes roll_out {
        0% {
            transform: translate(103px, 0) rotate(0);
        }
        100% {
            transform: translate(0, 0) rotate(-360deg);
        }
    }

    .ball__eyes {
        gap: 12px;
        margin-top: 24px;
    }

    .ball__mouth {
        width: 20px;
        height: 20px;
        margin: -1px auto;
    }

    .eye, .eye_wrap {
        width: 20px;
        height: 20px;
    }
    .eye:before {
        width: 10px;
        height: 10px;
    }

    .ball__shadow {
        display: none;
    }

    main {
        display: block;
        padding: 40px 16px;
    }

    .form {
        padding: 0;
        /* height: 100%; */
    }
    .form__submit{
        margin-bottom: 2rem !important;
    }
    .form__description {
        margin-bottom: 16px;
    }

    #face {
        transform: none !important;
    }
}

.status-not-available{
    color: #fa2f2f;
    border: 1px solid;
    padding: 5px;
    border-radius: 10px;
    font-size: 12px;
}

.password-field {
    position: relative;
}

.toggle-password {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #2d2e2e;
}

.toggle-password:hover {
    color: #007bff;
}


span.status-available, span.status-not-available {
    display: block;
    padding: 5px;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
    border-radius: 4px;
    margin-top: 5px;
}

span.status-available {
    background: #e0f5d7;
    color: #449626;
}

span.status-not-available {
    background-color: #ffe6e6;
    color: #ea5252;
}


.cookieConsentContainer {
    z-index: 999;
    width: 350px;
    min-height: 20px;
    padding: 15px 15px 32px 15px;
    overflow: hidden;
    position: fixed;
    bottom: 30px;
    left: 30px;
    border-radius: 4px;
    direction: rtl;
    font-size: 12px;
    background: #ffffff69;
    /* border: 1px solid #e4e4e4; */
    box-shadow: 2px 3px 4px 0 rgba(0, 0, 0, .05);
    /* display: none; */
}

.cookieConsentContainer .cookieDesc p {
    margin: 0;
    padding: 0;
    display: block;
    margin-top: 10px;
    margin-bottom: 17px;
}

.cookieConsentContainer .cookieButton {
    line-height: 1;

}

@media (max-width: 768px) {
    .cookieConsentContainer {
        display: none;
    }
}


a.button.cookieAcceptButton {
    font-size: 12px;
    position: relative;
    padding: 10px 29px;
    background: linear-gradient(-55deg, #857af57d 29%, #aba6e7 29.1%, #a59bff 68%, #a59bff 68.1%);
    font-weight: 500;
    font-family: 'vazir';
    color: #ffffff;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.2));
}


/* ── Auth pages (login / register) ── */

:root {
    --auth-bg-canvas: #f8fafc;
    /* Brand — matches landing indigo/cyan palette */
    --auth-brand: #6366f1;
    --auth-brand-deep: #4f46e5;
    --auth-brand-light: #4f46e5;
    --auth-brand-cyan: #22d3ee;
    --auth-brand-soft: rgba(99, 102, 241, 0.16);
    --auth-brand-glow: rgba(79, 70, 229, 0.22);
    /* Warm — text accent only, same as landing */
    --auth-warm: #fa7f28;
    --auth-warm-light: #fbbf24;
    --auth-warm-muted: #ea580c;
    --auth-surface: rgba(255, 255, 255, 0.9);
    --auth-text: #0f172a;
    --auth-muted: #475569;
    --auth-subtle: #64748b;
    --auth-border: rgba(15, 23, 42, 0.1);
    --auth-input-bg: rgba(255, 255, 255, 0.82);
    --auth-radius: 26px;
    --auth-radius-sm: 12px;
    --auth-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

/* Ambient background — matches landing */
.auth-ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: var(--auth-bg-canvas);
    pointer-events: none;
}

.auth-ambient__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse 85% 70% at 50% 40%, black 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 40%, black 20%, transparent 100%);
}

.auth-ambient__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    will-change: transform;
    animation: auth-orb-float 32s ease-in-out infinite;
}

.auth-ambient__orb--hero {
    top: 28%;
    left: 50%;
    width: 36rem;
    height: 36rem;
    margin-left: -18rem;
    background: radial-gradient(circle, rgba(254, 243, 199, 0.6) 0%, rgba(251, 191, 36, 0.16) 42%, transparent 68%);
    animation: auth-orb-float-hero 28s ease-in-out infinite;
}

.auth-ambient__orb--edge {
    right: -8rem;
    bottom: -6rem;
    width: 28rem;
    height: 28rem;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.1) 0%, rgba(79, 70, 229, 0.06) 45%, transparent 72%);
    animation-duration: 36s;
    animation-delay: -12s;
}

[dir="rtl"] .auth-ambient__orb--edge {
    right: auto;
    left: -8rem;
}

.auth-ambient__orb--accent {
    left: -10rem;
    top: -8rem;
    width: 22rem;
    height: 22rem;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.12) 0%, rgba(34, 211, 238, 0.06) 50%, transparent 72%);
    animation-duration: 40s;
    animation-delay: -20s;
}

[dir="rtl"] .auth-ambient__orb--accent {
    left: auto;
    right: -10rem;
}

.auth-ambient__vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 120% 80% at 50% 50%, transparent 42%, rgba(226, 232, 240, 0.5) 100%);
}

@keyframes auth-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.85; }
    33% { transform: translate(24px, -18px) scale(1.04); opacity: 1; }
    66% { transform: translate(-16px, 14px) scale(0.98); opacity: 0.9; }
}

@keyframes auth-orb-float-hero {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.85; }
    33% { transform: translate(20px, -14px) scale(1.03); opacity: 1; }
    66% { transform: translate(-12px, 10px) scale(0.99); opacity: 0.9; }
}

body.auth-body {
    width: 100%;
    height: auto;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    background: var(--auth-bg-canvas);
    color: var(--auth-text);
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100dvh;
}

body.auth-body #login-app,
body.auth-body #register-app {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100dvh;
}

.auth-page {
    flex: 1;
    display: flex;
    width: 100%;
    min-height: 100dvh;
}

.auth-layout {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 24px 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    margin: auto;
    animation: authFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-card__surface {
    padding: 36px 32px 28px;
    position: relative;
    overflow: hidden;
}

.auth-card__surface::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 42%),
        radial-gradient(circle at 0% 100%, rgba(34, 211, 238, 0.1) 0%, transparent 38%);
    pointer-events: none;
}

.auth-card__surface > * {
    position: relative;
    z-index: 1;
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
    text-decoration: none;
}

.auth-logo img {
    height: 42px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(15, 23, 42, 0.08));
}

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

.auth-progress {
    margin-bottom: 24px;
}

.auth-progress__track {
    height: 4px;
    background: rgba(15, 23, 42, 0.08);
    border-radius: 99px;
    overflow: hidden;
}

.auth-progress__bar {
    height: 100%;
    background: linear-gradient(90deg, var(--auth-brand-deep), var(--auth-brand), var(--auth-brand-cyan));
    border-radius: 99px;
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-progress__label {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: var(--auth-muted);
    text-align: center;
}

.auth-card__head {
    margin-bottom: 24px;
    text-align: center;
}

.auth-card__title {
    font-size: 1.625rem;
    font-weight: 600;
    color: var(--auth-text);
    margin: 0;
    letter-spacing: -0.03em;
    line-height: 1.25;
}

.auth-card__subtitle {
    font-size: 0.9375rem;
    color: var(--auth-muted);
    margin: 10px 0 0;
    line-height: 1.6;
    font-weight: 400;
}

.auth-card__subtitle--warm {
    color: var(--auth-warm-muted);
}

.auth-card__body {
    padding: 0;
}

.auth-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 8px;
    text-align: start;
}

.auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.auth-label-row .auth-label {
    margin-bottom: 0;
}

.auth-link {
    font-size: 0.8125rem;
    color: var(--auth-brand-light);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.15s;
}

.auth-link:hover {
    color: var(--auth-brand-cyan);
}

.auth-form {
    font-family: pelak;
    display: flex;
    flex-direction: column;
}

.auth-field {
    margin-bottom: 18px;
}

.auth-form > .auth-btn {
    margin-top: 22px;
    font-family: vazir;
}

.auth-password {
    position: relative;
}

.auth-input {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    font-size: 0.9375rem;
    color: var(--auth-text);
    background: var(--auth-input-bg);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    font-family: inherit;
    text-align: start;
}

.auth-input::placeholder {
    color: #94a3b8;
}

.auth-input:hover {
    border-color: rgba(79, 70, 229, 0.22);
    background: rgba(255, 255, 255, 0.96);
}

.auth-input:focus {
    border-color: rgba(79, 70, 229, 0.45);
    background: #ffffff;
    box-shadow: 0 0 0 4px var(--auth-brand-soft);
}

.auth-input--otp {
    text-align: center;
    font-size: 1.375rem;
    letter-spacing: 0.45em;
    font-weight: 600;
    height: 54px;
    padding-inline: 16px;
    direction: ltr;
}

.auth-password .auth-input {
    padding-inline-end: 46px;
}

.auth-password__toggle {
    position: absolute;
    inset-inline-end: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--auth-subtle);
    font-size: 15px;
    padding: 8px 10px;
    z-index: 1;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}

.auth-password__toggle:hover {
    color: var(--auth-brand-cyan);
    background: var(--auth-brand-soft);
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--auth-muted);
    user-select: none;
    margin: 18px 0 22px;
}

.auth-checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.auth-checkbox__box {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    background: rgba(255, 255, 255, 0.72);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, background 0.15s;
}

.auth-checkbox__box::after {
    content: '✓';
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.12s, transform 0.12s;
}

.auth-checkbox input:checked + .auth-checkbox__box {
    background: var(--auth-brand);
    border-color: var(--auth-brand);
}

.auth-checkbox input:checked + .auth-checkbox__box::after {
    opacity: 1;
    transform: scale(1);
}

.auth-checkbox input:focus-visible + .auth-checkbox__box {
    box-shadow: 0 0 0 3px var(--auth-brand-soft);
}

@keyframes auth-btn-gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes auth-btn-glow {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(79, 70, 229, 0.12),
            0 8px 22px rgba(79, 70, 229, 0.24);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(99, 102, 241, 0.18),
            0 12px 30px rgba(79, 70, 229, 0.32);
    }
}

.auth-btn {
    position: relative;
    overflow: hidden;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--auth-radius-sm);
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 46%, #0891b2 100%);
    background-size: 260% 260%;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.2s;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    animation: auth-btn-gradient 4.5s ease infinite, auth-btn-glow 3s ease-in-out infinite;
}

.auth-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 65%);
    transform: translateX(-120%);
    transition: transform 0.55s ease;
}

.auth-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    animation-duration: 2.5s, 2s;
}

.auth-btn:hover:not(:disabled)::before {
    transform: translateX(120%);
}

.auth-btn > * {
    position: relative;
    z-index: 1;
}

.auth-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.auth-btn__spinner {
    position: relative;
    z-index: 1;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
}

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

.auth-btn--ghost {
    background: rgba(255, 255, 255, 0.76);
    color: var(--auth-muted);
    border: 1px solid var(--auth-border);
    box-shadow: none;
}

.auth-btn--ghost:hover:not(:disabled) {
    background: rgba(15, 23, 42, 0.05);
    color: var(--auth-text);
    transform: none;
    box-shadow: none;
}

.auth-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.auth-actions .auth-btn {
    flex: 1;
}

.auth-error {
    display: block;
    font-size: 0.8125rem;
    color: #dc2626;
    margin-top: 6px;
    line-height: 1.4;
}

.auth-error--block {
    background: rgba(254, 242, 242, 0.9);
    border-radius: var(--auth-radius-sm);
    padding: 12px 14px;
    margin-bottom: 18px;
    text-align: center;
    border: 1px solid rgba(248, 113, 113, 0.28);
    font-size: 0.875rem;
    color: #b91c1c;
}

.auth-footer {
    text-align: center;
    font-size: 0.875rem;
    color: var(--auth-muted);
    margin: 28px 0 0;
    padding-top: 24px;
    border-top: 1px solid var(--auth-border);
    line-height: 1.5;
}

.auth-footer a {
    color: var(--auth-brand-light);
    font-weight: 600;
    text-decoration: none;
    margin-inline-start: 4px;
    transition: color 0.15s;
}

.auth-footer a:hover {
    color: var(--auth-brand-cyan);
}

.auth-footer--warm a {
    color: var(--auth-warm);
}

.auth-footer--warm a:hover {
    color: var(--auth-warm-light);
}

.auth-link-btn {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: var(--auth-brand-light);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    margin-top: 16px;
    padding: 10px;
    border-radius: var(--auth-radius-sm);
    transition: color 0.15s, background 0.15s;
}

.auth-link-btn:hover:not(:disabled) {
    color: var(--auth-brand-cyan);
    background: var(--auth-brand-soft);
}

.auth-link-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.auth-dev-otp {
    display: block;
    font-size: 0.75rem;
    color: #92400e;
    margin-top: 8px;
    padding: 10px 12px;
    background: rgba(255, 251, 235, 0.92);
    border-radius: var(--auth-radius-sm);
    border: 1px solid #fde68a;
    text-align: center;
}

.auth-success {
    text-align: center;
    padding: 8px 0 4px;
}

.auth-success__icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #059669;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border: 1px solid #bbf7d0;
}

.auth-success__text {
    font-size: 0.9375rem;
    color: var(--auth-muted);
    margin: 0 0 22px;
}

.auth-success .auth-btn {
    max-width: 100%;
}

/* ── Minimal auth variant (login / register) ── */

.auth-body--minimal {
    background: #ffffff;
}

.auth-body--minimal .auth-ambient {
    display: none;
}

.auth-page--minimal .auth-layout {
    padding: 32px 20px;
}

.auth-card__surface--minimal {
    padding: 8px 4px 24px;
    border: none;
    border-radius: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.auth-card__surface--minimal::before {
    display: none;
}

.auth-topbar {
    margin-bottom: 28px;
}

.auth-topbar__head {
    display: flex;
    font-family: vazir;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    direction: ltr;
}

.auth-topbar__head--solo {
    justify-content: center;
    direction: inherit;
}

.auth-topbar__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 10px;
    border: none;
    background: none;
    color: var(--auth-text);
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.auth-topbar__back i {
    font-size: 16px;
}

.auth-topbar__back:hover {
    background: #f3f4f6;
    color: var(--auth-brand);
}

.auth-topbar__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--auth-text);
    letter-spacing: -0.02em;
    line-height: 1.3;
    white-space: nowrap;
    text-align: end;
}

.auth-topbar__head--solo .auth-topbar__title {
    text-align: center;
}

.auth-progress--minimal {
    margin-bottom: 20px;
}

.auth-progress--minimal .auth-progress__track {
    height: 3px;
}

.auth-page--minimal .auth-input {
    height: 48px;
    background: #f3f4f6;
    border-color: #e5e7eb;
    border-radius: 16px;
}

.auth-page--minimal .auth-input:hover {
    border-color: #d1d5db;
    background: #f3f4f6;
}

.auth-page--minimal .auth-input:focus {
    border-color: rgba(79, 70, 229, 0.45);
    background: #ffffff;
    box-shadow: 0 0 0 4px var(--auth-brand-soft);
}

.auth-page--minimal .auth-checkbox {
    margin: 14px 0 20px;
}

.auth-page--minimal .auth-form > .auth-btn {
    margin-top: 4px;
}

.auth-page--minimal .auth-btn {
    height: 48px;
    border: none;
    border-radius: 16px;
    background: var(--auth-brand);
    background-size: auto;
    animation: none;
    box-shadow: none;
}

.auth-page--minimal .auth-btn::before {
    display: none;
}

.auth-page--minimal .auth-btn:hover:not(:disabled) {
    background: var(--auth-brand-deep);
    transform: none;
}

.auth-page--minimal .auth-btn:active:not(:disabled) {
    transform: scale(0.99);
}

.auth-page--minimal .auth-btn--ghost {
    background: #ffffff;
    color: var(--auth-muted);
    border: 1px solid #e5e7eb;
}

.auth-page--minimal .auth-btn--ghost:hover:not(:disabled) {
    background: #f9fafb;
    color: var(--auth-text);
    border-color: #d1d5db;
}

.auth-links-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.auth-links-stack__link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--auth-brand-light);
    text-decoration: none;
    transition: color 0.15s;
}

.auth-links-stack__link:hover {
    color: var(--auth-brand-cyan);
}

.auth-field-hint {
    margin: 8px 0 0;
    font-size: 0.8125rem;
    color: var(--auth-subtle);
    line-height: 1.5;
    text-align: start;
}

.auth-page--minimal .auth-link-btn {
    margin-top: 20px;
    color: var(--auth-brand-light);
}

.auth-page--minimal .auth-link-btn:hover:not(:disabled) {
    color: var(--auth-brand-cyan);
    background: transparent;
}

.auth-status {
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: var(--auth-radius-sm);
    padding: 12px 14px;
    margin-bottom: 18px;
    text-align: start;
}

.auth-status--success {
    background: rgba(236, 253, 245, 0.95);
    border: 1px solid #bbf7d0;
    color: #047857;
}

.auth-status--info {
    background: #fefbed;
    border: 1px solid #fde68a;
    color: var(--auth-muted);
}

.auth-captcha {
    margin-bottom: 16px;
}

.auth-page--minimal .auth-footer {
    border-top: none;
    padding-top: 0;
    margin-top: 24px;
}

@media (max-width: 640px) {
    .auth-ambient__orb--hero {
        top: 22%;
        width: 24rem;
        height: 24rem;
        margin-left: -12rem;
    }

    .auth-ambient__orb--edge {
        width: 20rem;
        height: 20rem;
    }
}

@media (max-width: 480px) {
    .auth-layout {
        padding: 20px 16px;
    }

    .auth-page--minimal .auth-layout {
        padding: 24px 16px;
    }

    .auth-card__surface {
        padding: 28px 22px 24px;
        border-radius: 18px;
    }

    .auth-card__surface--minimal {
        padding: 4px 0 20px;
    }

    .auth-topbar__title {
        font-size: 1.125rem;
    }

    .auth-card__title {
        font-size: 1.375rem;
    }

    .auth-input {
        height: 48px;
        font-size: 16px;
    }

    .auth-input--otp {
        height: 52px;
        font-size: 1.25rem;
        letter-spacing: 0.35em;
    }

    .auth-btn {
        height: 48px;
    }

    .auth-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }
}

[dir="rtl"] .auth-body,
[dir="rtl"] .auth-page,
[dir="rtl"] .auth-card {
    font-family: 'vazir', 'pelak', sans-serif;
}

[dir="rtl"] .auth-input--otp {
    letter-spacing: 0.35em;
}

@media (prefers-reduced-motion: reduce) {
    .auth-ambient__orb,
    .auth-btn {
        animation: none;
    }

    .auth-btn::before {
        display: none;
    }
}
