:root {
    --primary: #6d3cf0;
    --primary-dark: #4d22b5;
    --primary-soft: #f0ebff;
    --ink: #211d2b;
    --muted: #777080;
    --line: #e5e1eb;
    --error: #bd2d48;
    --error-soft: #fff0f3;
    --green: #27ad76;
}

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

body {
    margin: 0;
    color: var(--ink);
    background: #fff;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

button,
input {
    font: inherit;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(390px, 0.82fr) minmax(600px, 1.18fr);
    min-height: 100vh;
}

.auth-brand-panel {
    position: relative;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    padding: 48px clamp(38px, 5vw, 76px);
    color: #fff;
    background: radial-gradient(circle at 20% 20%, rgba(171, 139, 255, 0.42), transparent 32%), linear-gradient(145deg, #321378, #5d2bcd 60%, #7547e2);
}

.auth-brand-panel::before,
.auth-brand-panel::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
    content: "";
}

.auth-brand-panel::before {
    right: -180px;
    bottom: -180px;
    width: 520px;
    height: 520px;
}

.auth-brand-panel::after {
    right: -80px;
    bottom: -80px;
    width: 320px;
    height: 320px;
}

.brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.7px;
}

.brand > span:last-child > span {
    color: #a98cf9;
}

.brand-light > span:last-child > span {
    color: #d2c2ff;
}

.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(145deg, #865cf4, #6330d7);
    box-shadow: 0 8px 20px rgba(29, 8, 78, 0.28);
}

.brand-mark svg {
    width: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand-copy {
    position: relative;
    z-index: 1;
    max-width: 510px;
    margin: auto 0 34px;
}

.eyebrow,
.form-kicker {
    color: #cbb9ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.brand-copy h1 {
    margin: 18px 0;
    font-size: clamp(38px, 4.1vw, 58px);
    line-height: 1.08;
    letter-spacing: -2.8px;
}

.brand-copy > p {
    max-width: 470px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 16px;
    line-height: 1.75;
}

.brand-preview {
    position: relative;
    z-index: 1;
    max-width: 440px;
    padding: 22px;
    margin-bottom: auto;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 22px 48px rgba(29, 10, 72, 0.24);
    backdrop-filter: blur(15px);
}

.preview-heading,
.preview-client {
    display: flex;
    align-items: center;
}

.preview-heading {
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.68);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.preview-heading b {
    color: #dacfff;
}

.preview-client {
    gap: 12px;
    padding: 18px 0;
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.preview-avatar {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    color: #5b2abb;
    border-radius: 50%;
    background: #ded1ff;
    font-size: 10px;
    font-weight: 800;
}

.preview-client > span:nth-child(2) {
    display: flex;
    flex: 1;
    flex-direction: column;
    font-size: 12px;
}

.preview-client small {
    color: rgba(255, 255, 255, 0.62);
}

.preview-client time {
    font-size: 17px;
    font-weight: 800;
}

.preview-status {
    padding-top: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
}

.preview-status i {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: #5ce1a5;
    box-shadow: 0 0 0 4px rgba(92, 225, 165, 0.13);
}

.benefit-list {
    display: grid;
    gap: 13px;
    padding: 0;
    margin: 30px 0 0;
    list-style: none;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    font-weight: 650;
}

.benefit-list span {
    display: inline-grid;
    width: 21px;
    height: 21px;
    margin-right: 8px;
    place-items: center;
    color: #dcd0ff;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.brand-footer {
    position: relative;
    z-index: 1;
    margin: 28px 0 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
}

.auth-form-panel {
    display: grid;
    place-items: center;
    padding: 50px clamp(35px, 7vw, 110px);
    background: #fff;
}

.form-wrapper {
    width: min(100%, 460px);
}

.form-wrapper-wide {
    width: min(100%, 640px);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 52px;
    color: #797281;
    font-size: 13px;
    font-weight: 650;
    transition: color 160ms ease;
}

.back-link:hover,
.form-switch a:hover {
    color: var(--primary-dark);
}

.back-link span {
    color: var(--primary);
    font-size: 18px;
}

.form-heading {
    margin-bottom: 30px;
}

.form-kicker {
    color: var(--primary);
}

.form-heading h2 {
    margin: 10px 0 7px;
    font-size: clamp(32px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -1.8px;
}

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

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field {
    margin-bottom: 19px;
}

.field label,
.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
    color: #393441;
    font-size: 12px;
    font-weight: 750;
}

.field label small {
    color: #a19ba8;
    font-size: 9px;
    font-weight: 600;
}

.label-row label {
    margin: 0;
}

.muted-link {
    color: #9b95a3;
    font-size: 10px;
    font-weight: 600;
}

.field input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    background: #fcfbfd;
    font-size: 14px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.field input::placeholder {
    color: #aaa4b1;
}

.field input:focus {
    border-color: #9271ed;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(109, 60, 240, 0.1);
}

.field.has-error input {
    border-color: #dd8091;
    background: #fffafb;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    color: #8f8997;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.password-toggle svg {
    width: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle .eye-closed,
.password-toggle.is-visible .eye-open {
    display: none;
}

.password-toggle.is-visible .eye-closed {
    display: block;
}

.field-error {
    display: block;
    margin-top: 6px;
    color: var(--error);
    font-size: 11px;
}

.form-alert {
    padding: 12px 14px;
    margin-bottom: 20px;
    color: var(--error);
    border: 1px solid #f1b5c0;
    border-radius: 11px;
    background: var(--error-soft);
    font-size: 12px;
}

.form-alert p {
    margin: 0;
}

.legal-copy {
    color: #97919e;
    font-size: 10px;
}

.password-confirm-hint {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.password-guidance {
    margin: 4px 0 18px;
    padding: 12px 15px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #faf9fc;
    color: var(--muted);
    font-size: 12px;
}

.password-guidance p {
    margin: 0 0 5px;
    color: var(--ink);
    font-weight: 700;
}

.password-guidance ul {
    margin: 0;
    padding-left: 18px;
}

.password-guidance li + li {
    margin-top: 2px;
}

.submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 0 20px;
    color: #fff;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #7645f4, #5c2bd9);
    box-shadow: 0 13px 28px rgba(109, 60, 240, 0.24);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.submit-button:hover {
    box-shadow: 0 17px 34px rgba(109, 60, 240, 0.32);
    transform: translateY(-2px);
}

.submit-button span {
    font-size: 19px;
}

.legal-copy {
    margin: 14px 20px 0;
    text-align: center;
}

.form-switch {
    margin: 28px 0 0;
    color: #8a8491;
    font-size: 12px;
    text-align: center;
}

.form-switch a {
    color: var(--primary);
    font-weight: 800;
}

.mobile-brand {
    display: none;
}

@media (max-width: 1040px) {
    .auth-layout {
        grid-template-columns: minmax(340px, 0.75fr) minmax(500px, 1.25fr);
    }

    .auth-brand-panel {
        padding-inline: 38px;
    }

    .auth-form-panel {
        padding-inline: 48px;
    }

    .field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 760px) {
    .auth-layout {
        display: block;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-form-panel {
        display: block;
        min-height: 100vh;
        padding: 24px 24px 50px;
    }

    .mobile-brand {
        display: block;
        margin-bottom: 62px;
    }

    .form-wrapper,
    .form-wrapper-wide {
        margin-inline: auto;
    }

    .back-link {
        margin-bottom: 30px;
    }

    .form-heading h2 {
        font-size: 35px;
    }

    .registration-panel .mobile-brand {
        margin-bottom: 38px;
    }
}

@media (max-width: 480px) {
    .auth-form-panel {
        min-height: 100dvh;
        padding: calc(17px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
    }

    .mobile-brand {
        margin-bottom: 24px;
    }

    .form-heading {
        margin-bottom: 18px;
    }

    .form-heading h2 {
        font-size: 28px;
        letter-spacing: -1px;
    }

    .form-heading p {
        font-size: 12px;
    }

    .back-link {
        margin-bottom: 18px;
    }

    .registration-panel .mobile-brand {
        margin-bottom: 21px;
    }

    .field {
        margin-bottom: 14px;
    }

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

    .password-guidance {
        margin-bottom: 14px;
        padding: 10px 12px;
        font-size: 11px;
    }

    .submit-button {
        min-height: 48px;
        box-shadow: none;
    }

    .form-switch {
        margin-top: 20px;
    }
}

