:root {
    --auth-wine: #762747;
    --auth-wine-dark: #4c172e;
    --auth-rose: #d8869e;
    --auth-coral: #e69072;
    --auth-teal: #258f84;
    --auth-ink: #251a20;
    --auth-muted: #74666d;
    --auth-line: #eadfe3;
    --auth-ivory: #fffaf7;
    --auth-paper: #ffffff;
    --auth-danger: #b4233f;
    --auth-danger-bg: #fff0f2;
    --auth-shadow: 0 34px 90px rgba(71, 29, 45, 0.16);
    --auth-radius: 34px;
    --role-accent: var(--auth-wine);
    --role-soft: #f7e7ed;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--auth-ivory);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--auth-ink);
    background:
        radial-gradient(circle at 8% 12%, rgba(216, 134, 158, 0.18), transparent 28rem),
        radial-gradient(circle at 90% 85%, rgba(230, 144, 114, 0.15), transparent 25rem),
        var(--auth-ivory);
    font-family: "Manrope", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.auth-client {
    --role-accent: #b74667;
    --role-soft: #fce8ed;
}

body.auth-professional {
    --role-accent: var(--auth-teal);
    --role-soft: #e1f4f0;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    color: #fff;
    background: var(--auth-wine-dark);
    transform: translateY(-150%);
    transition: transform 180ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.auth-page {
    padding: 24px;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    width: min(1360px, 100%);
    min-height: calc(100vh - 48px);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(118, 39, 71, 0.09);
    border-radius: var(--auth-radius);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--auth-shadow);
}

.auth-showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 700px;
    padding: clamp(36px, 5vw, 72px);
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(34, 12, 24, 0.12), rgba(34, 12, 24, 0.52)),
        linear-gradient(135deg, #8b3558 0%, #64203d 48%, #3b1528 100%);
}

.auth-client .auth-showcase {
    background:
        linear-gradient(145deg, rgba(67, 17, 34, 0.06), rgba(66, 17, 36, 0.48)),
        linear-gradient(135deg, #d4718e 0%, #a93f62 52%, #6f2442 100%);
}

.auth-professional .auth-showcase {
    background:
        linear-gradient(145deg, rgba(8, 49, 48, 0.03), rgba(9, 44, 43, 0.5)),
        linear-gradient(135deg, #4ba99d 0%, #237e76 48%, #174e4b 100%);
}

.auth-showcase::before,
.auth-showcase::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    pointer-events: none;
}

.auth-showcase::before {
    width: 520px;
    height: 520px;
    top: -270px;
    right: -160px;
}

.auth-showcase::after {
    width: 300px;
    height: 300px;
    bottom: -145px;
    left: -95px;
}

.auth-brand,
.auth-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-family: "Newsreader", serif;
    font-size: 27px;
    font-weight: 600;
}

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

.brand-copy strong {
    font-size: 18px;
    letter-spacing: -0.03em;
}

.brand-copy small {
    margin-top: 5px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.showcase-copy {
    position: relative;
    z-index: 1;
    max-width: 650px;
    margin: auto 0 32px;
}

.showcase-kicker,
.auth-context {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.showcase-kicker {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.78);
}

.showcase-kicker::before {
    width: 26px;
    height: 1px;
    content: "";
    background: rgba(255, 255, 255, 0.6);
}

.showcase-copy h2 {
    max-width: 620px;
    margin: 0;
    font-size: clamp(42px, 5.3vw, 74px);
    font-weight: 700;
    line-height: 0.97;
    letter-spacing: -0.065em;
}

.showcase-copy h2 em {
    display: block;
    margin-top: 7px;
    font-family: "Newsreader", serif;
    font-weight: 500;
    letter-spacing: -0.04em;
}

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

.showcase-preview {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 610px;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 74px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(12px);
}

.preview-item i {
    display: grid;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: var(--auth-wine-dark);
    background: #fff;
    font-size: 17px;
}

.auth-professional .preview-item i {
    color: #174e4b;
}

.preview-item span {
    display: grid;
    gap: 2px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.63);
}

.preview-item strong {
    color: #fff;
    font-size: 13px;
}

.showcase-status {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
}

.showcase-status span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6ce0bd;
    box-shadow: 0 0 0 5px rgba(108, 224, 189, 0.12);
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(34px, 5vw, 76px);
    background:
        radial-gradient(circle at 100% 0, var(--role-soft), transparent 20rem),
        rgba(255, 255, 255, 0.86);
}

.auth-card {
    width: min(100%, 460px);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: clamp(32px, 7vh, 70px);
    color: var(--auth-muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: color 160ms ease, transform 160ms ease;
}

.back-link:hover {
    color: var(--role-accent);
    transform: translateX(-3px);
}

.auth-context {
    margin-bottom: 16px;
    padding: 9px 12px;
    border-radius: 999px;
    color: var(--role-accent);
    background: var(--role-soft);
}

.auth-card h1 {
    max-width: 430px;
    margin: 0;
    font-size: clamp(34px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.055em;
}

.auth-intro {
    margin: 16px 0 30px;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.7;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 13px 15px;
    border: 1px solid #f1c7cf;
    border-radius: 15px;
    color: var(--auth-danger);
    background: var(--auth-danger-bg);
    font-size: 13px;
    line-height: 1.5;
}

.auth-alert i {
    margin-top: 1px;
}

.auth-form {
    display: grid;
    gap: 18px;
}

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

.auth-field label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.input-shell {
    position: relative;
}

.input-shell > i {
    position: absolute;
    top: 50%;
    left: 16px;
    color: #9e8e96;
    font-size: 16px;
    transform: translateY(-50%);
    pointer-events: none;
}

.input-shell input {
    width: 100%;
    min-height: 54px;
    padding: 0 48px 0 46px;
    border: 1px solid var(--auth-line);
    border-radius: 16px;
    outline: none;
    color: var(--auth-ink);
    background: #fff;
    font-size: 14px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

.input-shell input:hover {
    border-color: #d8c7ce;
}

.input-shell input:focus {
    border-color: var(--role-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--role-accent) 12%, transparent);
}

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

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

.form-support {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
}

.form-support a,
.signup-link,
.profile-switch a {
    color: var(--role-accent);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.form-support a:hover,
.signup-link:hover,
.profile-switch a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.auth-submit,
.auth-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 54px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-submit {
    border: 1px solid var(--role-accent);
    color: #fff;
    background: var(--role-accent);
    box-shadow: 0 14px 30px color-mix(in srgb, var(--role-accent) 24%, transparent);
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px color-mix(in srgb, var(--role-accent) 30%, transparent);
}

.auth-submit:disabled {
    opacity: 0.72;
    cursor: wait;
    transform: none;
}

.auth-secondary {
    border: 1px solid var(--auth-line);
    color: var(--role-accent);
    background: #fff;
}

.auth-secondary:hover {
    border-color: color-mix(in srgb, var(--role-accent) 38%, var(--auth-line));
    background: var(--role-soft);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 27px 0 20px;
    color: #aa9ca2;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    flex: 1;
    height: 1px;
    content: "";
    background: var(--auth-line);
}

.profile-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
    color: var(--auth-muted);
    font-size: 11px;
}

.profile-switch span {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #cdbfc5;
}

.auth-legal {
    margin: 32px 0 0;
    color: #aa9ca2;
    font-size: 10px;
    line-height: 1.6;
    text-align: center;
}

.mobile-brand {
    display: none;
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--role-accent) 28%, transparent);
    outline-offset: 3px;
}

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

    .auth-shell {
        grid-template-columns: minmax(300px, 0.8fr) minmax(410px, 1.2fr);
        min-height: calc(100vh - 32px);
    }

    .auth-showcase {
        min-height: 680px;
        padding: 38px;
    }

    .showcase-copy h2 {
        font-size: 47px;
    }

    .showcase-preview {
        grid-template-columns: 1fr;
    }

    .preview-item:nth-child(2) {
        display: none;
    }
}

@media (max-width: 760px) {
    .auth-page {
        padding: 0;
        background:
            radial-gradient(circle at 90% 8%, var(--role-soft), transparent 20rem),
            var(--auth-ivory);
    }

    .auth-shell {
        display: block;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .auth-showcase {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
        padding: 26px max(22px, env(safe-area-inset-right)) 34px max(22px, env(safe-area-inset-left));
        background: transparent;
    }

    .auth-card {
        width: min(100%, 480px);
    }

    .mobile-brand {
        display: flex;
        margin-bottom: 38px;
        color: var(--auth-ink);
    }

    .mobile-brand .brand-mark {
        color: #fff;
        border-color: transparent;
        background: var(--role-accent);
    }

    .back-link {
        position: absolute;
        top: 31px;
        right: 24px;
        width: 42px;
        height: 42px;
        margin: 0;
        justify-content: center;
        border: 1px solid var(--auth-line);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.72);
    }

    .back-link span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .auth-card h1 {
        font-size: clamp(34px, 10vw, 46px);
    }
}

@media (max-width: 420px) {
    .auth-panel {
        align-items: flex-start;
    }

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

    .profile-switch {
        flex-wrap: wrap;
    }
}

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