@import url("../../../assets/css/fonts.css");

:root {
    --to-auth-orange: #ff6600;
    --to-auth-orange-hover: #e85d00;
    --to-auth-orange-soft: #fff1e8;
    --to-auth-dark: #2f2f2f;
    --to-auth-text: #555555;
    --to-auth-muted: #797979;
    --to-auth-bg: #f3f4f6;
    --to-auth-surface: #ffffff;
    --to-auth-border: #d9d9d9;
    --to-auth-border-soft: #ececec;
    --to-auth-success: #198754;
    --to-auth-success-bg: #eaf7f0;
    --to-auth-danger: #dc3545;
    --to-auth-danger-bg: #fff0f1;
    --to-auth-warning: #b7791f;
    --to-auth-warning-bg: #fff8e6;
    --to-auth-focus: rgba(255, 102, 0, 0.22);
    --to-auth-shadow: 0 24px 70px rgba(47, 47, 47, 0.12);
    --to-auth-shadow-soft: 0 16px 38px rgba(47, 47, 47, 0.08);
    --to-auth-radius-lg: 28px;
    --to-auth-radius-md: 18px;
    --to-auth-radius-sm: 12px;
    --to-auth-font: var(--to-font-primary, "DanaFaNum", "Dana", "IRANYekanFaNum", "IRANSansFaNum", Tahoma, Arial, sans-serif);
    --to-auth-font-heading: var(--to-font-heading, "DanaFaNum", "Dana", "IRANYekanFaNum", Tahoma, Arial, sans-serif);
    --to-auth-font-number: var(--to-font-number, "DanaFaNum", "YekanBakhFaNum", "IRANSansFaNum", Tahoma, Arial, sans-serif);
}

body.to-auth-page,
body.to-auth-page *,
body.to-auth-page *::before,
body.to-auth-page *::after {
    box-sizing: border-box;
}

body.to-auth-page {
    min-height: 100vh;
    margin: 0;
    direction: rtl;
    overflow-x: hidden;
    color: var(--to-auth-dark);
    background:
        radial-gradient(circle at top right, rgba(255, 102, 0, 0.16), transparent 34%),
        radial-gradient(circle at bottom left, rgba(121, 121, 121, 0.16), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, var(--to-auth-bg) 100%);
    font-family: var(--to-auth-font);
    line-height: 1.8;
    text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.to-auth-page input,
body.to-auth-page textarea,
body.to-auth-page select,
body.to-auth-page button,
body.to-auth-page table,
body.to-auth-page th,
body.to-auth-page td {
    font-family: var(--to-auth-font);
}

body.to-auth-page h1,
body.to-auth-page h2,
body.to-auth-page h3,
body.to-auth-page h4,
body.to-auth-page h5,
body.to-auth-page h6 {
    font-family: var(--to-auth-font-heading);
}

body.to-auth-page a {
    color: inherit;
    text-decoration: none;
}

body.to-auth-page button,
body.to-auth-page input,
body.to-auth-page textarea,
body.to-auth-page select {
    font: inherit;
}

body.to-auth-page img,
body.to-auth-page svg {
    display: block;
    max-width: 100%;
}

body.to-auth-page [hidden] {
    display: none !important;
}

body.to-auth-page ::selection {
    color: var(--to-auth-surface);
    background: var(--to-auth-orange);
}

.to-auth-shell {
    width: min(1180px, calc(100% - 32px));
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 520px) minmax(320px, 1fr);
    align-items: center;
    gap: 28px;
    margin: 0 auto;
    padding: 42px 0;
}

.to-auth-panel,
.to-auth-aside {
    min-width: 0;
}

.to-auth-brand {
    margin-bottom: 18px;
}

.to-auth-brand__link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.to-auth-brand__link:focus-visible {
    outline: 3px solid var(--to-auth-focus);
    outline-offset: 6px;
    border-radius: var(--to-auth-radius-sm);
}

.to-auth-brand__mark {
    width: 48px;
    min-width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: var(--to-auth-surface);
    background: linear-gradient(135deg, var(--to-auth-orange) 0%, var(--to-auth-orange-hover) 100%);
    box-shadow: 0 14px 30px rgba(255, 102, 0, 0.25);
    font-family: var(--to-auth-font-heading);
    font-size: 24px;
    font-weight: 950;
    line-height: 1;
}

.to-auth-brand__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.to-auth-brand__title {
    color: var(--to-auth-dark);
    font-family: var(--to-auth-font-heading);
    font-size: 18px;
    font-weight: 950;
    line-height: 1.5;
    letter-spacing: -0.02em;
}

.to-auth-brand__subtitle {
    color: var(--to-auth-muted);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.7;
}

.to-auth-card,
.to-auth-aside__inner {
    border: 1px solid rgba(217, 217, 217, 0.78);
    border-radius: var(--to-auth-radius-lg);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--to-auth-shadow);
    backdrop-filter: blur(18px);
}

.to-auth-card {
    padding: 34px;
}

.to-auth-card__header {
    margin-bottom: 24px;
}

.to-auth-card__eyebrow,
.to-auth-aside__eyebrow {
    margin: 0 0 8px;
    color: var(--to-auth-orange);
    font-size: 13px;
    font-weight: 950;
    line-height: 1.8;
    letter-spacing: -0.01em;
}

.to-auth-card__title,
.to-auth-aside__title {
    margin: 0;
    color: var(--to-auth-dark);
    font-family: var(--to-auth-font-heading);
    font-weight: 950;
    line-height: 1.45;
    letter-spacing: -0.045em;
}

.to-auth-card__title {
    font-size: clamp(28px, 4vw, 42px);
}

.to-auth-aside__title {
    font-size: clamp(26px, 3vw, 38px);
}

.to-auth-card__description {
    margin: 12px 0 0;
    color: var(--to-auth-text);
    font-size: 15px;
    font-weight: 650;
    line-height: 2;
}

.to-auth-alert {
    width: 100%;
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: var(--to-auth-radius-sm);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.9;
}

.to-auth-alert--success {
    color: var(--to-auth-success);
    border-color: rgba(25, 135, 84, 0.2);
    background: var(--to-auth-success-bg);
}

.to-auth-alert--danger {
    color: var(--to-auth-danger);
    border-color: rgba(220, 53, 69, 0.2);
    background: var(--to-auth-danger-bg);
}

.to-auth-alert--warning {
    color: var(--to-auth-warning);
    border-color: rgba(183, 121, 31, 0.24);
    background: var(--to-auth-warning-bg);
}

.to-auth-alert__title {
    display: block;
    margin-bottom: 6px;
    font-weight: 950;
}

.to-auth-alert__list {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0 20px 0 0;
}

.to-auth-form {
    display: grid;
    gap: 18px;
}

.to-auth-form + .to-auth-form {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--to-auth-border-soft);
}

.to-auth-form--compact {
    gap: 0;
}

.to-auth-field {
    display: grid;
    gap: 8px;
}

.to-auth-field__label {
    color: var(--to-auth-dark);
    font-size: 14px;
    font-weight: 950;
    line-height: 1.7;
}

.to-auth-field__control {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid var(--to-auth-border);
    border-radius: var(--to-auth-radius-sm);
    outline: none;
    color: var(--to-auth-dark);
    background: var(--to-auth-surface);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.8;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.to-auth-field__control::placeholder {
    color: rgba(85, 85, 85, 0.54);
}

.to-auth-field__control:focus {
    border-color: var(--to-auth-orange);
    background: #fffdfb;
    box-shadow: 0 0 0 4px var(--to-auth-focus);
}

.to-auth-field__control.is-invalid,
.to-auth-field__control[aria-invalid="true"] {
    border-color: var(--to-auth-danger);
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.09);
}

.to-auth-field__control--center {
    direction: ltr;
    text-align: center;
    letter-spacing: 0.18em;
    font-family: var(--to-auth-font-number);
}

.to-auth-field__hint {
    margin: 0;
    color: var(--to-auth-muted);
    font-size: 12.5px;
    font-weight: 650;
    line-height: 1.7;
}

.to-auth-field__error {
    margin: 0;
    color: var(--to-auth-danger);
    font-size: 12.5px;
    font-weight: 850;
    line-height: 1.8;
}

.to-auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.to-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--to-auth-text);
    cursor: pointer;
    user-select: none;
}

.to-auth-check__input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--to-auth-orange);
    cursor: pointer;
}

.to-auth-check__input:focus-visible {
    outline: 3px solid var(--to-auth-focus);
    outline-offset: 3px;
}

.to-auth-check__text {
    color: var(--to-auth-text);
    font-size: 13.5px;
    font-weight: 750;
    line-height: 1.8;
}

.to-auth-button,
.to-auth-link-button {
    appearance: none;
    border: 0;
    cursor: pointer;
    text-decoration: none;
}

.to-auth-button {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: var(--to-auth-radius-sm);
    font-size: 15px;
    font-weight: 950;
    line-height: 1.6;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        opacity 160ms ease;
}

.to-auth-button:focus-visible,
.to-auth-link-button:focus-visible {
    outline: 3px solid var(--to-auth-focus);
    outline-offset: 4px;
}

.to-auth-button:hover {
    transform: translateY(-1px);
}

.to-auth-button:disabled,
.to-auth-button[aria-busy="true"] {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.to-auth-button--primary {
    color: var(--to-auth-surface);
    background: linear-gradient(135deg, var(--to-auth-orange) 0%, var(--to-auth-orange-hover) 100%);
    box-shadow: 0 14px 32px rgba(255, 102, 0, 0.26);
}

.to-auth-button--primary:hover {
    box-shadow: 0 18px 38px rgba(255, 102, 0, 0.34);
}

.to-auth-button--secondary {
    color: var(--to-auth-orange-hover);
    border: 1px solid rgba(255, 102, 0, 0.2);
    background: var(--to-auth-orange-soft);
}

.to-auth-button--secondary:hover {
    color: var(--to-auth-surface);
    background: var(--to-auth-orange);
    box-shadow: 0 14px 32px rgba(255, 102, 0, 0.2);
}

.to-auth-card__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--to-auth-border-soft);
    color: var(--to-auth-muted);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.8;
}

.to-auth-card__footer--stacked {
    flex-direction: column;
    gap: 10px;
}

.to-auth-card__footer a,
.to-auth-link-button {
    padding: 0;
    color: var(--to-auth-orange);
    background: transparent;
    font-size: 14px;
    font-weight: 950;
    text-decoration: none;
}

.to-auth-card__footer a:hover,
.to-auth-link-button:hover {
    color: var(--to-auth-orange-hover);
}

.to-auth-inline-form {
    margin: 0;
}

.to-auth-secure-note {
    margin: 0 0 18px;
    padding: 16px;
    border: 1px solid rgba(255, 102, 0, 0.16);
    border-radius: var(--to-auth-radius-md);
    background: linear-gradient(135deg, rgba(255, 241, 232, 0.88), rgba(255, 255, 255, 0.96));
}

.to-auth-secure-note__label {
    display: block;
    margin-bottom: 4px;
    color: var(--to-auth-muted);
    font-size: 12px;
    font-weight: 950;
    line-height: 1.7;
}

.to-auth-secure-note__value {
    display: block;
    direction: ltr;
    color: var(--to-auth-dark);
    font-family: var(--to-auth-font-number);
    font-size: 20px;
    font-weight: 950;
    line-height: 1.7;
    text-align: right;
}

.to-auth-secure-note__text {
    margin: 8px 0 0;
    color: var(--to-auth-text);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.8;
}

.to-auth-aside__inner {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px;
    color: var(--to-auth-surface);
    background:
        linear-gradient(135deg, rgba(47, 47, 47, 0.96), rgba(121, 121, 121, 0.92)),
        var(--to-auth-dark);
}

.to-auth-aside__inner::before,
.to-auth-aside__inner::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.to-auth-aside__inner::before {
    width: 240px;
    height: 240px;
    top: -80px;
    left: -80px;
    background: rgba(255, 102, 0, 0.26);
}

.to-auth-aside__inner::after {
    width: 190px;
    height: 190px;
    right: -70px;
    bottom: -70px;
    background: rgba(255, 255, 255, 0.12);
}

.to-auth-aside__eyebrow,
.to-auth-aside__title,
.to-auth-steps {
    position: relative;
    z-index: 1;
}

.to-auth-aside__eyebrow {
    color: #ffd9bf;
}

.to-auth-aside__title {
    color: var(--to-auth-surface);
}

.to-auth-steps {
    display: grid;
    gap: 14px;
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}

.to-auth-steps__item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--to-auth-radius-md);
    background: rgba(255, 255, 255, 0.08);
}

.to-auth-steps__number {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--to-auth-dark);
    background: var(--to-auth-surface);
    font-family: var(--to-auth-font-number);
    font-size: 15px;
    font-weight: 950;
}

.to-auth-steps__text {
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    font-weight: 850;
    line-height: 1.8;
}

@media (max-width: 1024px) {
    .to-auth-shell {
        width: min(720px, calc(100% - 28px));
        grid-template-columns: 1fr;
        padding: 28px 0;
    }

    .to-auth-aside__inner {
        min-height: auto;
    }
}

@media (max-width: 640px) {
    body.to-auth-page {
        background:
            radial-gradient(circle at top right, rgba(255, 102, 0, 0.14), transparent 36%),
            linear-gradient(180deg, #ffffff 0%, var(--to-auth-bg) 100%);
    }

    .to-auth-shell {
        width: min(100% - 20px, 560px);
        gap: 18px;
        padding: 18px 0;
    }

    .to-auth-brand__mark {
        width: 42px;
        min-width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 21px;
    }

    .to-auth-brand__title {
        font-size: 16px;
    }

    .to-auth-brand__subtitle {
        font-size: 12px;
    }

    .to-auth-card,
    .to-auth-aside__inner {
        padding: 22px;
        border-radius: 22px;
    }

    .to-auth-card__title {
        font-size: 27px;
    }

    .to-auth-card__description {
        font-size: 14px;
    }

    .to-auth-field__control,
    .to-auth-button {
        min-height: 50px;
    }

    .to-auth-options,
    .to-auth-card__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .to-auth-card__footer {
        text-align: right;
    }

    .to-auth-aside__title {
        font-size: 25px;
    }

    .to-auth-steps__item {
        grid-template-columns: 38px minmax(0, 1fr);
        padding: 12px;
    }

    .to-auth-steps__number {
        width: 38px;
        height: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.to-auth-page *,
    body.to-auth-page *::before,
    body.to-auth-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}