.auth-body {
    min-height: 100vh;
    background: var(--bg);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, .9fr) minmax(520px, 1.1fr);
}

.auth-story {
    min-height: 100vh;
    padding: clamp(32px, 5vw, 72px);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 70% 15%, rgba(255,255,255,.18), transparent 22rem),
        radial-gradient(circle at 10% 88%, rgba(238,180,142,.20), transparent 26rem),
        linear-gradient(145deg, #5f3556 0%, #704264 48%, #8d5c6f 100%);
}

.auth-story::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -130px;
    bottom: 10%;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 46% 54% 62% 38%;
    transform: rotate(18deg);
}

.auth-story__brand {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.auth-story__brand strong,
.auth-story__brand span {
    display: block;
}

.auth-story__brand strong {
    font-size: 1.08rem;
    letter-spacing: -.01em;
}

.auth-story__brand span {
    margin-top: 2px;
    color: rgba(255,255,255,.68);
    font-size: .82rem;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--primary);
    color: #fff;
    font-weight: 850;
    letter-spacing: -.03em;
    box-shadow: var(--shadow-sm);
}

.brand-mark--large {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    backdrop-filter: blur(10px);
}

.auth-story__content {
    max-width: 620px;
    margin: auto 0;
    position: relative;
    z-index: 1;
}

.auth-kicker {
    display: inline-flex;
    margin-bottom: 18px;
    color: #f6d6c9;
    font-weight: 800;
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.auth-story h1 {
    max-width: 620px;
    margin: 0;
    color: #fff;
    font-size: clamp(2.55rem, 5vw, 5.1rem);
    letter-spacing: -.055em;
    line-height: .98;
}

.auth-story__content > p {
    max-width: 560px;
    margin: 24px 0 0;
    color: rgba(255,255,255,.76);
    font-size: 1.03rem;
    line-height: 1.75;
}

.auth-feature-list {
    display: grid;
    gap: 12px;
    margin-top: 32px;
}

.auth-feature-list div {
    display: flex;
    align-items: center;
    gap: 11px;
    color: rgba(255,255,255,.88);
    font-size: .94rem;
}

.auth-feature-list span {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    font-size: .72rem;
}

.auth-highlight {
    max-width: 520px;
    display: flex;
    gap: 15px;
    margin-top: 34px;
    padding: 17px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 18px;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(8px);
}

.auth-highlight__icon {
    width: 36px;
    height: 36px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    background: rgba(255,255,255,.14);
}

.auth-highlight strong {
    display: block;
    margin-bottom: 4px;
}

.auth-highlight p {
    margin: 0;
    color: rgba(255,255,255,.7);
    font-size: .87rem;
    line-height: 1.5;
}

.auth-story__foot {
    margin: 0;
    position: relative;
    z-index: 1;
    color: rgba(255,255,255,.55);
    font-size: .78rem;
}

.auth-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px clamp(24px, 6vw, 86px) 48px;
    background:
        radial-gradient(circle at 100% 0%, var(--primary-soft), transparent 28rem),
        var(--surface);
}

.auth-panel__top {
    min-height: 48px;
    display: flex;
    justify-content: flex-end;
}

.auth-form-wrap {
    width: min(500px, 100%);
    margin: auto;
}

.auth-form-wrap--login {
    width: min(450px, 100%);
}

.auth-form-wrap h2 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -.045em;
    line-height: 1.05;
}

.auth-subtitle {
    margin: 0 0 28px;
    color: var(--text-muted);
    line-height: 1.65;
}

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

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

.field label {
    color: var(--text);
    font-size: .88rem;
    font-weight: 750;
}

.field input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    outline: none;
    color: var(--text);
    background: var(--surface-soft);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.field input:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 13%, transparent);
}

.field-help,
.field-error {
    font-size: .77rem;
}

.field-help {
    color: var(--text-muted);
}

.field-error {
    color: var(--danger);
    font-weight: 650;
}

.password-field {
    position: relative;
}

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

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    border: 0;
    padding: 7px 9px;
    border-radius: 9px;
    color: var(--primary);
    background: transparent;
    font-size: .77rem;
    font-weight: 800;
}

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

.auth-submit {
    min-height: 52px;
    margin-top: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    box-shadow: 0 12px 26px color-mix(in srgb, var(--primary) 25%, transparent);
    font-weight: 800;
    transition: transform .18s ease, box-shadow .18s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 30px color-mix(in srgb, var(--primary) 30%, transparent);
}

.auth-security-note,
.auth-login-help {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .8rem;
    line-height: 1.55;
}

.auth-login-help {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.alert {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: .87rem;
    line-height: 1.45;
}

.alert--danger {
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 25%, var(--border));
    background: color-mix(in srgb, var(--danger) 8%, var(--surface));
}

.alert--success {
    color: var(--success);
    border-color: color-mix(in srgb, var(--success) 25%, var(--border));
    background: color-mix(in srgb, var(--success) 8%, var(--surface));
}

.alert--info {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 25%, var(--border));
    background: var(--primary-soft);
}

@media (max-width: 960px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-story {
        min-height: 320px;
        padding: 34px 26px;
    }

    .auth-story__content {
        margin: 60px 0 20px;
    }

    .auth-story h1 {
        max-width: 720px;
        font-size: clamp(2.4rem, 9vw, 4.3rem);
    }

    .auth-story__foot {
        display: none;
    }

    .auth-panel {
        min-height: auto;
        padding: 22px 24px 60px;
    }

    .auth-form-wrap {
        margin: 34px auto 0;
    }
}

@media (max-width: 540px) {
    .auth-story {
        min-height: 285px;
    }

    .auth-story__content > p,
    .auth-feature-list,
    .auth-highlight {
        display: none;
    }

    .auth-story__content {
        margin-top: 46px;
    }

    .auth-story h1 {
        font-size: 2.65rem;
    }
}
