﻿:root {
    --auth-coral: #FF6B5A;
    --auth-dark: #2E2E2E;
    --auth-bg: #F8F5F1;
    --auth-border: rgba(46, 46, 46, 0.10);
    --auth-border-soft: rgba(255, 255, 255, 0.62);
    --auth-text-soft: rgba(46, 46, 46, 0.68);
    --auth-shadow: 0 30px 80px rgba(0, 0, 0, 0.10);
    --auth-shadow-soft: 0 18px 44px rgba(0, 0, 0, 0.08);
    --auth-font-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --auth-font-serif: "Playfair Display", Georgia, serif;
    --auth-ease: cubic-bezier(.22, 1, .36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    min-height: 100%;
    margin: 0;
}

    body.auth-body {
        min-height: 100dvh;
        height: 100dvh;
        background: #f3f1ee;
        color: var(--auth-dark);
        font-family: var(--auth-font-sans);
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        overflow: hidden;
    }

.auth-page {
    --auth-page-pad: clamp(10px, 1.8vw, 20px);
    min-height: 100dvh;
    height: 100dvh;
    padding: var(--auth-page-pad);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.auth-shell {
    position: relative;
    width: min(1180px, 100%);
    height: min(760px, calc(100dvh - (var(--auth-page-pad) * 2)));
    max-height: calc(100dvh - (var(--auth-page-pad) * 2));
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    border-radius: 34px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: var(--auth-shadow);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

    .auth-shell::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(255,255,255,.30), rgba(255,255,255,.12));
        pointer-events: none;
    }

.auth-side {
    position: relative;
    z-index: 1;
    padding: clamp(18px, 2.4vh, 34px) clamp(18px, 2.2vw, 34px);
    background: linear-gradient(180deg, rgba(255,255,255,.52), rgba(255,255,255,.34));
    border-right: 1px solid rgba(46, 46, 46, 0.06);
    overflow: hidden;
}

.auth-side-inner {
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto;
}

.auth-side-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0 24px;
}

    .auth-side-logo img {
        width: clamp(120px, 18vw, 240px);
        height: clamp(120px, 18vw, 240px);
        max-width: 100%;
        max-height: 32vh;
        object-fit: contain;
        filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.08));
    }

.auth-side-copy {
    display: grid;
    gap: 18px;
    align-content: end;
}

    .auth-side-copy h1 {
        margin: 0;
        font-family: var(--auth-font-serif);
        font-size: clamp(2.8rem, 4vw, 4.25rem);
        line-height: .95;
        letter-spacing: -.03em;
        color: var(--auth-dark);
    }

.auth-side-btn,
.auth-mini-pill,
.auth-switch {
    font-family: inherit;
    cursor: pointer;
}

.auth-side-btn,
.auth-mini-pill {
    border: 1px solid rgba(46,46,46,.08);
    background: rgba(255,255,255,.72);
    color: var(--auth-dark);
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.07);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, color .25s ease, background .25s ease;
}

.auth-side-btn {
    width: fit-content;
    min-width: 165px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 14px 24px;
    border-radius: 999px;
}

    .auth-side-btn:hover,
    .auth-mini-pill:hover {
        transform: translateY(-2px);
        color: var(--auth-coral);
        border-color: rgba(255,107,90,.20);
        text-decoration: none;
    }

.auth-switch {
    position: absolute;
    left: 332px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(255,255,255,.94);
    color: var(--auth-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(46,46,46,.08);
    box-shadow: 0 14px 30px rgba(0,0,0,.12);
    transition: transform .25s ease, color .25s ease, box-shadow .25s ease, background .25s ease;
}

    .auth-switch svg {
        width: 24px;
        height: 24px;
        transition: transform .45s var(--auth-ease);
    }

    .auth-switch:hover {
        transform: translateY(-50%) scale(1.06);
        color: var(--auth-coral);
        background: rgba(255,255,255,.98);
        box-shadow: 0 18px 34px rgba(0,0,0,.14);
    }

.auth-shell.is-register-active .auth-switch svg {
    transform: rotate(180deg);
}

.auth-main {
    position: relative;
    display: block;
    padding: clamp(18px, 2.4vh, 34px) clamp(18px, 2.6vw, 42px);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
}

.auth-panel-top {
    position: absolute;
    top: clamp(18px, 2.4vh, 34px);
    right: clamp(18px, 2.6vw, 42px);
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0;
    z-index: 4;
}

.auth-mini-pill {
    min-width: 132px;
    padding: 12px 18px;
    border-radius: 999px;
}

.auth-only-register {
    display: none;
}

.auth-shell.is-login-active .auth-only-login {
    display: inline-flex;
}

.auth-shell.is-login-active .auth-only-register {
    display: none;
}

.auth-shell.is-register-active .auth-only-login {
    display: none;
}

.auth-shell.is-register-active .auth-only-register {
    display: inline-flex;
}

.auth-stage {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.auth-view {
    grid-area: 1 / 1;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    will-change: transform, opacity;
    transition: transform .68s var(--auth-ease), opacity .40s ease, visibility 0s linear .68s;
}

.auth-view-shell {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 8px 10px 10px;
}

.auth-view--login {
    transform: translateX(18%) scale(.98);
}

.auth-view--register {
    transform: translateX(-18%) scale(.98);
}

.auth-shell.is-login-active .auth-view--login,
.auth-shell.is-register-active .auth-view--register {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(0) scale(1);
    transition: transform .68s var(--auth-ease), opacity .40s ease, visibility 0s linear 0s;
}

.auth-shell.is-login-active .auth-view--register {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateX(-18%) scale(.97);
}

.auth-shell.is-register-active .auth-view--login {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateX(18%) scale(.97);
}

.auth-shell.is-login-active .auth-stage {
    padding-top: 0;
}

.auth-shell.is-register-active .auth-stage {
    padding-top: 42px;
}

.auth-head {
    margin-bottom: clamp(12px, 1.6vh, 24px);
    text-align: center;
}

    .auth-head h2 {
        margin: 0;
        font-family: var(--auth-font-serif);
        font-size: clamp(1.9rem, 3vw, 3.2rem);
        line-height: 1;
        letter-spacing: .01em;
        color: rgba(46,46,46,.92);
    }

.auth-form {
    display: grid;
    gap: clamp(10px, 1.3vh, 16px);
}

.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(10px, 1.3vh, 16px);
}

.auth-col-span-2 {
    grid-column: 1 / -1;
}

.auth-grid .auth-col-span-2:last-child {
    display: flex;
    justify-content: center;
}

.auth-form-group {
    display: grid;
    gap: 8px;
}

    .auth-form-group label {
        color: rgba(46,46,46,.80);
        font-size: .88rem;
        font-weight: 700;
    }

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: rgba(46,46,46,.62);
    pointer-events: none;
}

    .auth-input-icon svg {
        width: 100%;
        height: 100%;
        display: block;
    }

.auth-input,
.auth-file-input {
    width: 100%;
    min-height: clamp(46px, 5.4vh, 56px);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.34);
    background: rgba(255,255,255,.42);
    color: var(--auth-dark);
    padding: 0 18px;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 10px 30px rgba(0,0,0,.06);
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease, transform .25s ease;
}

.auth-input-wrap .auth-input {
    padding-left: 48px;
    padding-right: 76px;
}

.auth-input::placeholder {
    color: rgba(46,46,46,.48);
}

.auth-input:focus,
.auth-file-input:focus {
    border-color: rgba(255,107,90,.30);
    background: rgba(255,255,255,.62);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.60), 0 0 0 4px rgba(255,107,90,.10), 0 16px 34px rgba(255,107,90,.10);
    transform: translateY(-1px);
}

.auth-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    background: transparent;
    color: var(--auth-dark);
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

    .auth-toggle:hover {
        background: rgba(255,255,255,.52);
        color: var(--auth-coral);
    }

.auth-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(46,46,46,.82);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
}

    .auth-check input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: var(--auth-coral);
    }

.auth-inline-link,
.auth-bottom-links a {
    color: rgba(46,46,46,.74);
    text-decoration: none;
    font-weight: 700;
    transition: color .2s ease;
}

    .auth-inline-link:hover,
    .auth-bottom-links a:hover {
        color: var(--auth-coral);
        text-decoration: none;
    }

.auth-submit {
    width: min(280px, 100%);
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #3a3a3a 0%, #242424 100%);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: .02em;
    position: relative;
    box-shadow: 0 18px 34px rgba(0,0,0,.16), 0 10px 24px rgba(255,107,90,.12);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

    .auth-submit::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, transparent 18%, rgba(255,255,255,.18) 46%, transparent 74%);
        transform: translateX(-140%);
        transition: transform .75s ease;
    }

    .auth-submit:hover {
        transform: translateY(-2px);
        filter: brightness(1.03);
        box-shadow: 0 22px 38px rgba(0,0,0,.18), 0 14px 28px rgba(255,107,90,.16);
    }

        .auth-submit:hover::before {
            transform: translateX(140%);
        }

    .auth-submit:disabled {
        opacity: .96;
        cursor: not-allowed;
    }

    .auth-submit.is-loading {
        pointer-events: none;
    }

.auth-submit-text {
    position: relative;
    z-index: 1;
}

.auth-submit-spinner {
    display: none;
    width: 18px;
    height: 18px;
    margin-left: 10px;
    vertical-align: middle;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.34);
    border-top-color: #fff;
    animation: authSpin .8s linear infinite;
    position: relative;
    z-index: 1;
}

.auth-submit.is-loading .auth-submit-spinner {
    display: inline-block;
}

.auth-summary {
    display: none;
    border-radius: 18px;
    padding: 12px 14px;
    background: rgba(229,57,53,.10);
    border: 1px solid rgba(229,57,53,.18);
    color: #b1332f;
    font-size: .92rem;
}

    .auth-summary:not(:empty) {
        display: block;
    }

    .auth-summary ul {
        margin: 0;
        padding-left: 18px;
    }

.auth-validation,
.field-validation-error,
.text-danger {
    color: #c53b35 !important;
    font-size: .82rem;
}

.input-validation-error {
    border-color: rgba(229,57,53,.28) !important;
    box-shadow: 0 0 0 4px rgba(229,57,53,.08) !important;
}

.auth-bottom-links {
    text-align: center;
    margin-top: 6px;
}

.auth-form-group.auth-col-span-2 {
    justify-items: center;
}

    .auth-form-group.auth-col-span-2 > label {
        text-align: center;
    }

.auth-upload {
    width: 100%;
    display: grid;
    gap: 18px;
    justify-items: center;
}

.auth-avatar-preview {
    margin: 0 auto;
}

.auth-avatar-preview {
    width: 108px;
    height: 108px;
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(255,255,255,.44);
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .auth-avatar-preview img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 4px;
        background: transparent;
    }

.auth-file-input {
    padding: 10px 14px;
    border-radius: 22px;
    min-height: 58px;
}

    .auth-file-input::file-selector-button {
        border: 0;
        margin-right: 12px;
        padding: 10px 14px;
        border-radius: 999px;
        background: rgba(255,255,255,.68);
        color: var(--auth-dark);
        font-weight: 700;
        cursor: pointer;
    }

@keyframes authSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1100px) {
    body.auth-body {
        height: auto;
        min-height: 100dvh;
        overflow: auto;
    }

    .auth-page {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
        --auth-page-pad: 14px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
        min-height: auto;
    }

    .auth-side {
        border-right: 0;
        border-bottom: 1px solid rgba(46,46,46,.06);
        padding-bottom: 20px;
    }

    .auth-side-inner {
        grid-template-rows: auto auto;
        gap: 16px;
    }

    .auth-side-logo {
        padding-top: 4px;
        padding-bottom: 0;
    }

        .auth-side-logo img {
            width: 120px;
            height: 120px;
            max-height: none;
        }

    .auth-switch {
        display: none;
    }

    .auth-panel-top {
        position: static;
        margin-bottom: 14px;
    }

    .auth-main {
        padding: 22px 18px 22px;
    }

    .auth-stage {
        height: auto;
        min-height: auto;
    }

    .auth-shell.is-register-active .auth-stage,
    .auth-shell.is-login-active .auth-stage {
        padding-top: 0;
    }

    .auth-shell.is-register-active .auth-view--register .auth-view-shell {
        height: auto;
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }
}

.auth-panel-top {
    position: static;
    margin-bottom: 20px;
}

@media (max-width: 760px) {
    body.auth-body {
        overflow: auto;
    }

    .auth-page {
        --auth-page-pad: 10px;
        padding: var(--auth-page-pad);
    }

    .auth-shell {
        border-radius: 24px;
    }

    .auth-side,
    .auth-main {
        padding: 18px 14px;
    }

    .auth-grid {
        grid-template-columns: 1fr;
    }

    .auth-col-span-2 {
        grid-column: auto;
    }

    .auth-head h2 {
        font-size: 2rem;
    }

    .auth-inline {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-submit {
        width: 100%;
    }

    .auth-side-copy h1 {
        font-size: 2.4rem;
    }

    .auth-view-shell {
        width: 100%;
        padding: 0;
    }

    .auth-shell.is-register-active .auth-main {
        overflow: visible;
    }

    .auth-shell.is-register-active .auth-stage {
        height: auto;
        min-height: auto;
        padding-top: 0;
        padding-bottom: 0;
    }

    .auth-shell.is-register-active .auth-view--register .auth-view-shell {
        overflow-y: visible;
        max-height: none;
        padding: 0;
    }
}

@media (max-height: 820px) and (min-width: 1101px) {
    .auth-page {
        --auth-page-pad: 10px;
    }

    .auth-shell {
        height: calc(100dvh - (var(--auth-page-pad) * 2));
        max-height: calc(100dvh - (var(--auth-page-pad) * 2));
    }

    .auth-side,
    .auth-main {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .auth-side-logo img {
        width: 160px;
        height: 160px;
        max-height: 22vh;
    }

    .auth-head {
        margin-bottom: 10px;
    }

    .auth-form,
    .auth-grid {
        gap: 10px;
    }

    .auth-input,
    .auth-file-input {
        min-height: 46px;
    }

    .auth-shell.is-register-active .auth-stage {
        padding-top: 8px;
    }
}

.auth-shell.is-register-active .auth-main {
    overflow: hidden;
}

.auth-shell.is-register-active .auth-stage {
    height: 100%;
    min-height: 0;
    display: grid;
    align-items: stretch;
    justify-items: stretch;
    padding-top: 16px;
    padding-bottom: 16px;
}

.auth-shell.is-register-active .auth-view--register {
    height: 100%;
    min-height: 0;
}

    .auth-shell.is-register-active .auth-view--register .auth-view-shell {
        width: min(760px, 100%);
        height: 100%;
        max-height: 100%;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0 10px 120px 0;
        box-sizing: border-box;
        scrollbar-width: thin;
        scrollbar-color: rgba(46, 46, 46, 0.28) transparent;
    }

    .auth-shell.is-register-active .auth-view--register .auth-form {
        padding-bottom: 12px;
    }

    .auth-shell.is-register-active .auth-view--register .auth-view-shell::-webkit-scrollbar {
        width: 8px;
    }

    .auth-shell.is-register-active .auth-view--register .auth-view-shell::-webkit-scrollbar-track {
        background: transparent;
        border-radius: 999px;
    }

    .auth-shell.is-register-active .auth-view--register .auth-view-shell::-webkit-scrollbar-thumb {
        background: rgba(46, 46, 46, 0.22);
        border-radius: 999px;
    }

        .auth-shell.is-register-active .auth-view--register .auth-view-shell::-webkit-scrollbar-thumb:hover {
            background: rgba(46, 46, 46, 0.34);
        }

.auth-shell.is-register-active .auth-head {
    margin-bottom: 18px;
}

.auth-shell.is-register-active .auth-panel-top {
    z-index: 6;
}

.auth-shell.is-register-active .auth-view--register .auth-form-group.auth-col-span-2:first-child {
    margin-top: 8px;
    margin-bottom: 6px;
}

.auth-shell.is-register-active .auth-upload {
    padding-top: 4px;
}