/* =========================
   AUTH BODY OVERRIDES
========================= */

.auth-body {
    --auth-header-height: 96px;
}

.auth-body .site-main {
    position: relative;
    padding: 0;
}

.auth-body .site-main > .site-container {
    width: 100%;
    max-width: none;
    margin: 0;
}

.auth-body .site-footer {
    margin-top: 0;
}

.auth-body .messages-stack {
    position: absolute;
    top: 18px;
    left: 50%;
    z-index: 20;
    width: min(470px, calc(100% - 32px));
    margin: 0;
    transform: translateX(-50%);
}

/* =========================
   AUTH PAGE
========================= */

.auth-page {
    width: 100%;
    min-height: calc(100vh - var(--auth-header-height));
    background: #f3f2ee;
    padding: 0;
    margin: 0;
}

.auth-layout {
    width: 100%;
    min-height: calc(100vh - var(--auth-header-height));
    display: grid;
    grid-template-columns: 46% 54%;
    align-items: center;
    background: linear-gradient(
        90deg,
        #f3f2ee 0%,
        #f3f2ee 46%,
        #0b0b0b 46%,
        #0b0b0b 100%
    );
    overflow: hidden;
}

/* =========================
   LEFT SIDE
========================= */

.auth-form-side {
    min-height: calc(100vh - var(--auth-header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f2ee;
    padding: 0;
}

.auth-form-wrap {
    width: min(100%, 470px);
    padding: 0;
}

.auth-heading {
    margin-bottom: clamp(30px, 3vw, 42px);
}

.auth-heading h1 {
    margin: 0;
    color: #050505;
    font-family: var(--font-display);
    font-size: clamp(54px, 5vw, 86px);
    font-weight: 400;
    line-height: 0.86;
    letter-spacing: -0.07em;
    text-transform: uppercase;
}

.auth-heading p {
    margin: clamp(10px, 1vw, 14px) 0 0;
    color: #6f6f6f;
    font-size: clamp(14px, 1vw, 17px);
    font-weight: 700;
    line-height: 1.2;
}

/* =========================
   FORM
========================= */

.auth-form {
    width: 100%;
    margin: 0;
    padding: 0;
}

.auth-alert {
    margin-bottom: 18px;
    padding: 13px 15px;
    background: rgba(255, 59, 48, 0.08);
    border: 1px solid rgba(255, 59, 48, 0.18);
    color: #c62828;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.auth-field + .auth-field {
    margin-top: clamp(22px, 2vw, 28px);
}

.auth-field label {
    display: block;
    margin-bottom: clamp(9px, 0.8vw, 12px);
    color: #050505;
    font-family: var(--font-display);
    font-size: clamp(10px, 0.76vw, 12px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.015em;
    text-transform: uppercase;
}

.auth-input-wrap {
    width: 100%;
}

.auth-input-wrap input {
    width: 100%;
    height: clamp(42px, 3vw, 50px);
    padding: 0 2px;
    border: 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.42);
    background: transparent;
    color: #050505;
    font-family: var(--font-display);
    font-size: clamp(14px, 0.95vw, 17px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
    outline: none;
    box-shadow: none;
    border-radius: 0;
    transition: border-color 0.2s ease, color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.auth-input-wrap input::placeholder {
    color: #aaa;
    font-family: var(--font-display);
    font-size: clamp(13px, 0.9vw, 15px);
    font-weight: 400;
    letter-spacing: -0.02em;
    opacity: 1;
}

.auth-input-wrap input:focus {
    border-bottom-color: #050505;
    background: transparent;
    box-shadow: none;
}

.auth-input-wrap input:-webkit-autofill,
.auth-input-wrap input:-webkit-autofill:hover,
.auth-input-wrap input:-webkit-autofill:focus,
.auth-input-wrap input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #f3f2ee inset !important;
    -webkit-text-fill-color: #050505 !important;
    transition: background-color 5000s ease-in-out 0s;
    border-bottom: 2px solid rgba(0, 0, 0, 0.42);
    font-family: var(--font-display) !important;
}

.auth-error {
    margin-top: 8px;
    color: #d32f2f;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

/* =========================
   FORM ROW / LINKS
========================= */

.auth-form-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: clamp(18px, 1.6vw, 22px);
    margin-bottom: clamp(20px, 1.8vw, 26px);
}

.auth-form-row--right {
    justify-content: flex-end;
}

.auth-link {
    color: #050505;
    font-family: var(--font-display);
    font-size: clamp(10px, 0.75vw, 12px);
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #ff2118;
}

/* =========================
   BUTTONS
========================= */

.auth-submit,
.auth-register {
    width: 100%;
    min-height: clamp(50px, 4vw, 58px);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 20px;
    border-radius: 0;
    font-family: var(--font-display);
    font-size: clamp(12px, 0.9vw, 15px);
    font-weight: 400;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -0.035em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.auth-submit::after,
.auth-register::after {
    content: "→";
    flex: 0 0 auto;
    font-family: Arial, sans-serif;
    font-size: clamp(18px, 1.25vw, 23px);
    font-weight: 900;
    line-height: 1;
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

.auth-submit {
    border: 1px solid #ff2118;
    background: #ff2118;
    color: #ffffff;
}

.auth-submit:hover {
    border-color: #050505;
    background: #050505;
    color: #ffffff;
}

.auth-submit:hover::after {
    transform: translate(4px, -1px);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-register {
    border: 1px solid rgba(0, 0, 0, 0.34);
    background: transparent;
    color: #050505;
}

.auth-register:hover {
    border-color: #050505;
    background: #050505;
    color: #ffffff;
}

.auth-register:hover::after {
    transform: translate(4px, -1px);
}

.auth-register:active {
    transform: translateY(1px);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: clamp(22px, 2vw, 28px) 0;
}

.auth-divider span {
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.24);
}

.auth-divider b {
    color: #050505;
    font-family: var(--font-display);
    font-size: clamp(10px, 0.75vw, 12px);
    font-weight: 400;
    line-height: 1;
    text-transform: uppercase;
}

/* =========================
   RIGHT SIDE
========================= */

.auth-image-side {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--auth-header-height) - 28px);
    min-height: 560px;
    max-height: 820px;
    align-self: center;
    overflow: hidden;
    background: #0b0b0b;
}

.auth-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    filter: grayscale(1) contrast(1.05) brightness(0.88);
}

.auth-image-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.03) 0%,
            rgba(0, 0, 0, 0.1) 45%,
            rgba(0, 0, 0, 0.52) 100%
        );
    pointer-events: none;
}

.auth-image-text {
    position: absolute;
    left: auto;
    right: clamp(38px, 4.5vw, 72px);
    bottom: clamp(44px, 5vw, 78px);
    z-index: 2;
    width: 100%;
    max-width: 260px;
}

.auth-image-text h2 {
    margin: 0;
    color: #ff2118;
    font-family: var(--font-display);
    font-size: clamp(22px, 1.8vw, 30px);
    font-weight: 400;
    line-height: 0.92;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

.auth-image-text p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(11px, 0.85vw, 14px);
    font-weight: 700;
    line-height: 1.24;
    text-transform: uppercase;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1500px) {
    .auth-image-side {
        height: calc(100vh - var(--auth-header-height) - 24px);
        min-height: 540px;
        max-height: 760px;
    }
}

@media (max-width: 1400px) {
    .auth-layout {
        grid-template-columns: 47% 53%;
        background: linear-gradient(
            90deg,
            #f3f2ee 0%,
            #f3f2ee 47%,
            #0b0b0b 47%,
            #0b0b0b 100%
        );
    }

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

    .auth-heading h1 {
        font-size: clamp(50px, 4.8vw, 76px);
    }

    .auth-image-side {
        height: calc(100vh - var(--auth-header-height) - 22px);
        min-height: 520px;
        max-height: 720px;
    }

    .auth-image-text {
        right: 42px;
        bottom: 52px;
        max-width: 240px;
    }

    .auth-image-text h2 {
        font-size: 26px;
    }

    .auth-image-text p {
        font-size: 12px;
    }
}

@media (max-width: 1180px) {
    .auth-layout {
        grid-template-columns: 48% 52%;
        background: linear-gradient(
            90deg,
            #f3f2ee 0%,
            #f3f2ee 48%,
            #0b0b0b 48%,
            #0b0b0b 100%
        );
    }

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

    .auth-heading h1 {
        font-size: clamp(46px, 4.6vw, 68px);
    }

    .auth-image-side {
        height: calc(100vh - var(--auth-header-height) - 18px);
        min-height: 500px;
    }

    .auth-image-text {
        right: 34px;
        bottom: 42px;
        max-width: 225px;
    }

    .auth-image-text h2 {
        font-size: 24px;
    }

    .auth-image-text p {
        font-size: 11px;
    }
}

@media (max-width: 1100px) {
    .auth-page {
        min-height: auto;
    }

    .auth-layout {
        grid-template-columns: 1fr;
        min-height: auto;
        background: #f3f2ee;
    }

    .auth-form-side {
        min-height: auto;
        order: 1;
        padding: 34px 20px 36px;
    }

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

    .auth-image-side {
        order: 2;
        height: 360px;
        min-height: 360px;
        max-height: none;
    }

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

    .auth-heading h1 {
        font-size: clamp(44px, 9vw, 70px);
    }

    .auth-heading p {
        font-size: 14px;
    }

    .auth-input-wrap input {
        font-size: 15px;
    }

    .auth-input-wrap input::placeholder {
        font-size: 14px;
    }

    .auth-image {
        object-position: center 38%;
    }

    .auth-image-text {
        left: auto;
        right: 24px;
        bottom: 24px;
        max-width: 220px;
    }

    .auth-image-text h2 {
        font-size: 24px;
    }

    .auth-image-text p {
        font-size: 12px;
    }
}

@media (max-width: 992px) {
    .auth-body {
        --auth-header-height: 84px;
    }
}

@media (max-width: 768px) {
    .auth-body {
        --auth-header-height: 78px;
    }

    .auth-form-side {
        padding: 30px 18px 34px;
    }

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

    .auth-heading h1 {
        font-size: clamp(42px, 10vw, 62px);
    }

    .auth-image-side {
        height: 330px;
        min-height: 330px;
    }

    .auth-image-text {
        right: 22px;
        bottom: 22px;
        max-width: 210px;
    }

    .auth-image-text h2 {
        font-size: 22px;
    }

    .auth-image-text p {
        font-size: 11px;
    }
}

@media (max-width: 640px) {
    .auth-form-side {
        padding: 26px 16px 30px;
    }

    .auth-form-wrap {
        width: 100%;
    }

    .auth-heading h1 {
        font-size: clamp(38px, 12vw, 58px);
        line-height: 0.9;
    }

    .auth-heading p {
        margin-top: 8px;
        font-size: 13px;
    }

    .auth-field + .auth-field {
        margin-top: 20px;
    }

    .auth-field label {
        margin-bottom: 8px;
        font-size: 10px;
    }

    .auth-input-wrap input {
        height: 40px;
        font-size: 14px;
        border-bottom-width: 2px;
    }

    .auth-input-wrap input::placeholder {
        font-size: 13px;
    }

    .auth-form-row {
        margin-top: 16px;
        margin-bottom: 20px;
    }

    .auth-link {
        font-size: 10px;
    }

    .auth-submit,
    .auth-register {
        min-height: 48px;
        padding: 0 16px;
        font-size: 12px;
    }

    .auth-submit::after,
    .auth-register::after {
        font-size: 18px;
    }

    .auth-divider {
        gap: 12px;
        margin: 20px 0;
    }

    .auth-divider b {
        font-size: 10px;
    }

    .auth-image-side {
        height: 280px;
        min-height: 280px;
        max-height: none;
    }

    .auth-image {
        object-position: center center;
    }

    .auth-image-text {
        left: auto;
        right: 16px;
        bottom: 16px;
        max-width: 190px;
    }

    .auth-image-text h2 {
        font-size: 20px;
    }

    .auth-image-text p {
        margin-top: 7px;
        font-size: 10px;
        line-height: 1.22;
    }
}

@media (max-width: 576px) {
    .auth-body {
        --auth-header-height: 72px;
    }
}

@media (max-width: 420px) {
    .auth-form-side {
        padding: 24px 14px 28px;
    }

    .auth-heading {
        margin-bottom: 26px;
    }

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

    .auth-submit,
    .auth-register {
        min-height: 46px;
        font-size: 11px;
    }

    .auth-image-side {
        height: 250px;
        min-height: 250px;
    }

    .auth-image-text {
        right: 14px;
        bottom: 14px;
        max-width: 170px;
    }

    .auth-image-text h2 {
        font-size: 18px;
    }

    .auth-image-text p {
        font-size: 9px;
    }
}

@media (max-width: 380px) {
    .auth-form-side {
        padding: 24px 12px 26px;
    }

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

    .auth-submit,
    .auth-register {
        font-size: 10px;
    }

    .auth-image-side {
        height: 230px;
        min-height: 230px;
    }
}