@font-face {
    font-family: "Vazir";
    src: url("/assets/fonts/vazir/Vazir.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

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

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

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

:root {
    --brand: #5b2f96;
    --brand-deep: #32145d;
    --brand-dark: #24103f;
    --violet: #8c5ce1;
    --coral: #eb896f;
    --rose: #d36b94;
    --magenta: #a32ed0;
    --ink: #181321;
    --muted: #6d6577;
    --paper: #fbf9fd;
    --white: #ffffff;
    --line: rgba(91, 47, 150, 0.14);
    --error: #b9435c;
    --success: #258665;
    --gradient: linear-gradient(120deg, #5b2f96 0%, #eb896f 54%, #a32ed0 100%);
    --shadow: 0 24px 70px rgba(50, 20, 93, 0.13);
}

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

html {
    background: var(--paper);
}

body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 95% 5%, rgba(140, 92, 225, 0.12), transparent 29%),
        radial-gradient(circle at 8% 95%, rgba(235, 137, 111, 0.12), transparent 28%),
        var(--paper);
    font-family: "Vazir", "Segoe UI", Tahoma, Arial, sans-serif;
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    color: var(--white);
    background: var(--brand);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input {
    font: inherit;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid rgba(163, 46, 208, 0.36);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    width: 1px;
    height: 1px;
    overflow: hidden;
    padding: 0;
    color: var(--white);
    border: 0;
    border-radius: 10px;
    background: var(--brand-dark);
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link:focus {
    width: auto;
    height: auto;
    overflow: visible;
    inset-block-start: 12px;
    inset-inline-start: 12px;
    padding: 9px 15px;
    clip: auto;
    clip-path: none;
}

.auth-page {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    padding: 18px;
}

.auth-header {
    position: absolute;
    z-index: 20;
    inset-block-start: 18px;
    inset-inline: 18px;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding-inline: clamp(22px, 4vw, 58px);
    pointer-events: none;
}

.auth-header > * {
    pointer-events: auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    overflow: hidden;
    border: 1px solid rgba(91, 47, 150, 0.12);
    border-radius: 14px;
    background: var(--white);
    box-shadow: 0 8px 25px rgba(91, 47, 150, 0.13);
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.brand-copy {
    display: grid;
    line-height: 1.1;
}

.brand-copy strong {
    color: var(--brand-dark);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.brand-copy small {
    margin-block-start: 4px;
    color: var(--muted);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.home-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
}

.home-link:hover {
    color: var(--white);
    transform: translateX(3px);
}

.home-link svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-main {
    min-height: calc(100vh - 36px);
    min-height: calc(100svh - 36px);
    display: grid;
    grid-template-columns: minmax(460px, 0.92fr) minmax(520px, 1.08fr);
    overflow: hidden;
    border: 1px solid rgba(91, 47, 150, 0.08);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 30px 90px rgba(50, 20, 93, 0.1);
    backdrop-filter: blur(18px);
}

.form-panel {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    padding: 122px clamp(45px, 6vw, 100px) 58px;
}

.form-panel::before {
    content: "";
    position: absolute;
    width: 380px;
    height: 380px;
    inset-inline-end: -190px;
    inset-block-start: -190px;
    border-radius: 50%;
    background: rgba(140, 92, 225, 0.07);
    filter: blur(10px);
    pointer-events: none;
}

.form-wrap {
    position: relative;
    z-index: 2;
    width: min(100%, 475px);
}

.form-heading {
    margin-block-end: 32px;
}

.form-heading-compact {
    margin-block-end: 24px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 12px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
}

.eyebrow i {
    width: 8px;
    height: 8px;
    border: 2px solid rgba(163, 46, 208, 0.28);
    border-radius: 50%;
    background: var(--magenta);
    box-shadow: 0 0 0 5px rgba(163, 46, 208, 0.08);
}

.form-heading h1 {
    margin: 0;
    color: var(--brand-dark);
    font-size: clamp(36px, 4vw, 49px);
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -0.045em;
}

.form-heading > p:last-child {
    max-width: 430px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-block-end: 22px;
    padding: 13px 14px;
    border: 1px solid;
    border-radius: 13px;
    font-size: 12px;
}

.alert svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    margin-block-start: 1px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.alert > div {
    display: grid;
}

.alert strong {
    font-size: 12px;
}

.alert span {
    line-height: 1.6;
}

.alert-error {
    color: #9f344c;
    border-color: rgba(185, 67, 92, 0.18);
    background: rgba(185, 67, 92, 0.065);
}

.alert-success {
    color: #176b50;
    border-color: rgba(37, 134, 101, 0.19);
    background: rgba(37, 134, 101, 0.07);
}

.login-form {
    display: grid;
    gap: 20px;
}

.field-group {
    display: grid;
    gap: 8px;
}

.field-group > label,
.label-row label {
    color: #3e3547;
    font-size: 13px;
    font-weight: 700;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.label-row a {
    color: var(--brand);
    font-size: 11px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.label-row a:hover {
    color: var(--magenta);
}

.input-shell {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 57px;
    border: 1px solid rgba(91, 47, 150, 0.14);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 25px rgba(50, 20, 93, 0.035);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-shell:focus-within {
    border-color: rgba(91, 47, 150, 0.52);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(91, 47, 150, 0.075), 0 12px 28px rgba(50, 20, 93, 0.06);
}

.input-shell.has-error {
    border-color: rgba(185, 67, 92, 0.58);
    box-shadow: 0 0 0 4px rgba(185, 67, 92, 0.055);
}

.field-icon {
    position: absolute;
    inset-inline-start: 17px;
    color: #8c8197;
    pointer-events: none;
}

.field-icon svg,
.password-toggle svg {
    width: 21px;
    height: 21px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.input-shell input {
    width: 100%;
    min-height: 55px;
    padding: 14px 51px 14px 17px;
    color: var(--ink);
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
}

.input-shell input::placeholder {
    color: #a29aa9;
}

.input-shell input[type="email"] {
    direction: ltr;
    text-align: left;
}

.input-shell:has(.password-toggle) input {
    padding-inline-end: 51px;
}

.password-toggle {
    position: absolute;
    inset-inline-end: 10px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #8c8197;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.password-toggle:hover {
    color: var(--brand);
    background: rgba(91, 47, 150, 0.07);
}

.password-toggle .eye-closed {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-open {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
    display: block;
}

.field-error {
    margin: -1px 3px 0;
    color: var(--error);
    font-size: 11px;
}

.remember-option {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #655b6e;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}

.remember-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.checkmark {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    color: var(--white);
    border: 1px solid rgba(91, 47, 150, 0.24);
    border-radius: 6px;
    background: var(--white);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.checkmark svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.remember-option input:checked + .checkmark {
    border-color: transparent;
    background: var(--gradient);
    box-shadow: 0 6px 14px rgba(91, 47, 150, 0.18);
}

.remember-option input:checked + .checkmark svg {
    opacity: 1;
    transform: scale(1);
}

.remember-option input:focus-visible + .checkmark {
    outline: 3px solid rgba(163, 46, 208, 0.3);
    outline-offset: 3px;
}

.submit-button {
    position: relative;
    overflow: hidden;
    min-height: 57px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-block-start: 3px;
    padding: 14px 23px;
    color: var(--white);
    border: 0;
    border-radius: 15px;
    background: var(--gradient);
    background-size: 150% 150%;
    box-shadow: 0 15px 34px rgba(91, 47, 150, 0.24);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.2s ease;
}

.submit-button::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: -80%;
    width: 45%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    transition: inset-inline-start 0.55s ease;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 19px 40px rgba(91, 47, 150, 0.3);
}

.submit-button:hover::before {
    inset-inline-start: 140%;
}

.submit-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.submit-button .button-loading {
    display: none;
}

.submit-button.is-loading {
    cursor: wait;
    opacity: 0.78;
}

.submit-button.is-loading .button-label,
.submit-button.is-loading svg {
    display: none;
}

.submit-button.is-loading .button-loading {
    display: inline;
}

.form-support {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-block-start: 25px;
    padding-block-start: 20px;
    color: #756c7c;
    border-block-start: 1px solid rgba(91, 47, 150, 0.1);
    font-size: 11px;
}

.form-support a {
    color: var(--brand);
    font-weight: 700;
}

.form-support a:hover {
    color: var(--magenta);
}

.form-legal {
    margin: 14px 0 0;
    color: #aaa2af;
    text-align: center;
    font-size: 9px;
}

.brand-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    margin: 0;
    color: var(--white);
    border-radius: 32px 0 0 32px;
    background: linear-gradient(145deg, #24103f 0%, #4c2077 48%, #713388 72%, #9c467e 100%);
}

.brand-grid {
    position: absolute;
    z-index: -3;
    inset: 0;
    opacity: 0.52;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
}

.brand-panel::before,
.brand-panel::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.brand-panel::before {
    width: 500px;
    height: 500px;
    inset-inline-end: -270px;
    inset-block-start: -250px;
    box-shadow: 0 0 0 65px rgba(255, 255, 255, 0.018), 0 0 0 130px rgba(255, 255, 255, 0.012);
}

.brand-panel::after {
    width: 360px;
    height: 360px;
    inset-inline-start: -170px;
    inset-block-end: -180px;
    box-shadow: 0 0 0 45px rgba(255, 255, 255, 0.018);
}

.brand-orb {
    position: absolute;
    z-index: -2;
    border-radius: 50%;
    filter: blur(65px);
    pointer-events: none;
}

.brand-orb-one {
    width: 420px;
    height: 420px;
    inset-inline-start: -190px;
    inset-block-start: -170px;
    background: rgba(235, 137, 111, 0.34);
}

.brand-orb-two {
    width: 380px;
    height: 380px;
    inset-inline-end: -190px;
    inset-block-end: -170px;
    background: rgba(163, 46, 208, 0.34);
}

.brand-panel-content {
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding: 30px clamp(50px, 6vw, 92px) 36px;
}

.panel-label {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    direction: ltr;
    color: rgba(255, 255, 255, 0.55);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.panel-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.65);
}

.panel-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #62e6b5;
    box-shadow: 0 0 0 5px rgba(98, 230, 181, 0.12);
}

.panel-copy {
    max-width: 610px;
    margin-block: auto 48px;
}

.panel-logo {
    width: 108px;
    height: 108px;
    overflow: hidden;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 31px;
    background: var(--white);
    box-shadow: 0 24px 50px rgba(20, 5, 37, 0.34);
    transform: rotate(-4deg);
}

.panel-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 25px;
}

.panel-copy > p {
    margin: 28px 0 8px;
    color: #f1b5a7;
    font-size: 12px;
    font-weight: 700;
}

.panel-copy h2 {
    max-width: 600px;
    margin: 0;
    font-size: clamp(37px, 4.6vw, 62px);
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: -0.055em;
}

.panel-copy h2 span {
    color: #f0a18d;
}

.panel-copy blockquote {
    max-width: 555px;
    margin: 25px 0 0;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.68);
    border-inline-start: 2px solid var(--coral);
    background: rgba(255, 255, 255, 0.045);
    font-size: 13px;
}

.panel-journey {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-block-end: 36px;
}

.panel-journey.is-three {
    grid-template-columns: repeat(3, 1fr);
}

.journey-line {
    position: absolute;
    inset-inline: 6%;
    inset-block-start: 19px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
}

.journey-step {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 7px;
}

.journey-step span {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(9px);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 9px;
}

.journey-step strong {
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
}

.journey-step.is-current span {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, rgba(235, 137, 111, 0.92), rgba(163, 46, 208, 0.88));
    box-shadow: 0 12px 25px rgba(20, 5, 37, 0.25);
}

.journey-step.is-current strong {
    color: #f4bdaf;
}

.panel-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding-block-start: 21px;
    color: rgba(255, 255, 255, 0.48);
    border-block-start: 1px solid rgba(255, 255, 255, 0.09);
    font-size: 10px;
}

.panel-footer i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--coral);
}

@media (max-width: 1120px) {
    .auth-main {
        grid-template-columns: minmax(440px, 1fr) minmax(430px, 0.9fr);
    }

    .form-panel {
        padding-inline: 55px;
    }

    .brand-panel-content {
        padding-inline: 46px;
    }

    .panel-copy h2 {
        font-size: 43px;
    }
}

@media (max-width: 900px) {
    .auth-page {
        padding: 0;
    }

    .auth-header {
        position: relative;
        inset: auto;
        min-height: 78px;
        padding-inline: 24px;
        background: rgba(255, 255, 255, 0.76);
        border-block-end: 1px solid rgba(91, 47, 150, 0.08);
        backdrop-filter: blur(15px);
    }

    .home-link {
        color: var(--brand);
    }

    .home-link:hover {
        color: var(--magenta);
    }

    .auth-main {
        min-height: calc(100vh - 78px);
        min-height: calc(100svh - 78px);
        display: block;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .form-panel {
        min-height: calc(100vh - 78px);
        min-height: calc(100svh - 78px);
        padding: 60px 28px 50px;
    }

    .brand-panel {
        display: none;
    }
}

@media (max-width: 560px) {
    .auth-header {
        padding-inline: 17px;
    }

    .brand-mark {
        width: 43px;
        height: 43px;
        border-radius: 13px;
    }

    .brand-copy strong {
        font-size: 20px;
    }

    .brand-copy small {
        display: none;
    }

    .home-link span {
        display: none;
    }

    .home-link {
        width: 43px;
        height: 43px;
        justify-content: center;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--white);
    }

    .form-panel {
        align-items: start;
        padding: 44px 19px 38px;
    }

    .form-heading {
        margin-block-end: 27px;
    }

    .form-heading h1 {
        font-size: 37px;
    }

    .form-heading > p:last-child {
        font-size: 13px;
    }

    .input-shell,
    .input-shell input,
    .submit-button {
        min-height: 55px;
    }

    .form-support {
        flex-wrap: wrap;
    }
}

@media (max-width: 360px) {
    .form-panel {
        padding-inline: 15px;
    }

    .form-heading h1 {
        font-size: 34px;
    }
}

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