/*
 * Login + register split screen - Figma "Shop / Login" + "Shop / Register".
 * Full-bleed two-pane layout (purple brand panel + form); loaded only on the
 * auth pages, which override the shop shell.
 */

.auth {
    position: relative;
    display: grid;
    grid-template-columns: 5fr 6fr;
    min-height: 100vh;
}

.auth--wide {
    grid-template-columns: 5fr 7fr;
}

@media (max-width: 860px) {
    .auth,
    .auth--wide {
        grid-template-columns: 1fr;
    }
}

.auth__aside {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    padding: 56px 60px;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(255, 255, 255, 0.14), transparent 50%),
        linear-gradient(155deg, var(--color-bg-brand) 0%, #4a1659 100%);
    color: #fff;
}

@media (max-width: 860px) {
    .auth__aside {
        display: none;
    }
}

.auth__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #fff;
    text-decoration: none;
}

.auth__logo img {
    height: 30px;
    width: auto;
    /* purple wordmark -> white on the purple brand panel */
    filter: brightness(0) invert(1);
}

.auth__headline {
    margin: 0;
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.6px;
}

.auth__lead {
    margin: 12px 0 0;
    max-width: 40ch;
    font-size: var(--text-md);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
}

.auth__bullets {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth__bullets li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--text-md);
    color: rgba(255, 255, 255, 0.92);
}

.auth__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.auth__main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: var(--color-bg-surface);
    overflow-y: auto;
}

/* Back-to-home link, pinned top-left of the brand panel. It is absolutely
   positioned so it stays out of the 2-column grid flow, and white on the purple
   aside. Below 860px the aside is hidden, so it flips to dark over the white
   form panel - the one spot where it stays visible on mobile. */
.auth__back {
    position: absolute;
    top: 32px;
    left: 60px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-base);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 150ms ease;
}

.auth__back svg {
    color: rgba(255, 255, 255, 0.65);
    transition: transform 150ms ease, color 150ms ease;
}

.auth__back:hover {
    color: #fff;
}

.auth__back:hover svg {
    transform: translateX(-2px);
    color: #fff;
}

/* Mobile-only header inside the form pane: a back "pill" + the IMTOS logo. On
   desktop the purple aside carries both, so this is hidden there. */
.auth__head {
    display: none;
}

@media (max-width: 860px) {
    /* The purple aside is hidden here, so the form pane stacks: header, then
       card. The desktop corner link is replaced by the in-flow header. */
    .auth__main {
        flex-direction: column;
        padding: 28px 24px 44px;
    }

    .auth__back {
        display: none;
    }

    .auth__head {
        display: flex;
        flex-direction: column;
        gap: 22px;
        width: 100%;
        max-width: 400px;
        margin-bottom: 32px;
    }

    .auth--wide .auth__head {
        max-width: 560px;
    }

    .auth__head-back {
        align-self: flex-start;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: var(--text-base);
        font-weight: 500;
        color: var(--color-text-secondary);
        text-decoration: none;
        transition: color 150ms ease;
    }

    .auth__head-back svg {
        color: var(--color-text-muted);
        transition: transform 150ms ease, color 150ms ease;
    }

    .auth__head-back:hover {
        color: var(--color-text-brand);
    }

    .auth__head-back:hover svg {
        transform: translateX(-2px);
        color: var(--color-text-brand);
    }

    .auth__head-logo {
        align-self: center;
        display: inline-flex;
    }

    .auth__head-logo img {
        height: 34px;
        width: auto;
    }
}

.auth__card {
    width: 100%;
    max-width: 400px;
}

.auth__card--wide {
    max-width: 560px;
}

.auth__title {
    margin: 0;
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--color-text-primary);
}

.auth__sub {
    margin: 6px 0 0;
    font-size: var(--text-base);
    color: var(--color-text-secondary);
}

.auth__form {
    margin-top: 26px;
}

.auth__form button[type='submit'] {
    margin-top: 4px;
}

.auth__error {
    margin: 22px 0 0;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--color-status-danger-bg);
    font-size: var(--text-base);
    color: var(--color-status-danger-fg);
}

.auth__flash {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 500;
}

.auth__flash--success {
    background: var(--color-status-success-bg);
    color: var(--color-status-success-fg);
}

.auth__flash--error,
.auth__flash--danger {
    background: var(--color-status-danger-bg);
    color: var(--color-status-danger-fg);
}

.auth__flash--warning {
    background: var(--color-status-warning-bg);
    color: var(--color-status-warning-fg);
}

.auth__alt {
    margin: 22px 0 0;
    text-align: center;
    font-size: var(--text-base);
    color: var(--color-text-secondary);
}

.auth__alt a {
    color: var(--color-text-brand);
    font-weight: 600;
    text-decoration: none;
}

.auth__alt a:hover {
    text-decoration: underline;
}
