/* Customer auth — branded login composition (uses site tokens) */
.customer-auth {
    --auth-ink: #1a1212;
    --auth-muted: rgba(255, 248, 240, 0.9);
    --auth-surface: #fffdf9;
    --auth-line: rgba(132, 18, 18, 0.22);
    position: relative;
    isolation: isolate;
    min-height: calc(100vh - 90px);
    display: grid;
    align-items: center;
    padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem);
    overflow: hidden;
}

.customer-auth__media {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.customer-auth__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    transform: scale(1.04);
    animation: customer-auth-drift 18s ease-in-out infinite alternate;
}

.customer-auth__veil {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, rgba(18, 8, 8, 0.82) 0%, rgba(18, 8, 8, 0.55) 38%, rgba(18, 8, 8, 0.28) 62%, rgba(132, 18, 18, 0.2) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.35) 100%);
}

.customer-auth__stage {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 420px);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.customer-auth__intro {
    color: #fff;
    max-width: 34rem;
    animation: customer-auth-rise 0.75s ease both;
}

.customer-auth__brand {
    margin: 0 0 1rem;
    font-family: 'Open Sans', sans-serif;
    font-size: clamp(2rem, 4.8vw, 3.4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 2px 28px rgba(0, 0, 0, 0.55);
}

.customer-auth__title {
    margin: 0 0 0.75rem;
    font-family: 'Open Sans', sans-serif;
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    font-weight: 600;
    color: var(--default-color, #ffe000);
}

.customer-auth__lead {
    margin: 0;
    max-width: 28ch;
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--auth-muted);
}

.customer-auth__form {
    background: var(--auth-surface);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-top: 3px solid var(--primary-color, #841212);
    border-radius: 2px;
    padding: clamp(1.5rem, 3vw, 2.1rem);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    animation: customer-auth-rise 0.85s ease 0.12s both;
}

.customer-auth__field {
    margin-bottom: 1.1rem;
}

.customer-auth__field label,
.customer-auth__label-row label {
    display: block;
    margin-bottom: 0.4rem;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary-color, #841212);
}

.customer-auth__label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.customer-auth__label-row label {
    margin-bottom: 0;
}

.customer-auth__label-row a {
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--secondary-color, #0066b3);
    text-decoration: none;
    transition: color 0.25s ease;
}

.customer-auth__label-row a:hover {
    color: var(--primary-color, #841212);
}

.customer-auth__field input[type="email"],
.customer-auth__field input[type="password"],
.customer-auth__field input[type="text"],
.customer-auth__field input[type="file"],
.customer-auth__field select {
    width: 100%;
    height: 3rem;
    padding: 0 0.95rem;
    border: 1px solid var(--auth-line);
    border-radius: 2px;
    background: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: var(--auth-ink);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.customer-auth__field input[type="file"] {
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.customer-auth__field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23841212' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    padding-right: 2.4rem;
}

.customer-auth__field input::placeholder {
    color: #9a9090;
}

.customer-auth__field input:focus,
.customer-auth__field select:focus {
    outline: none;
    border-color: var(--primary-color, #841212);
    box-shadow: 0 0 0 3px rgba(132, 18, 18, 0.12);
}

.customer-auth__field input.is-invalid,
.customer-auth__field select.is-invalid {
    border-color: #b42318;
}

.customer-auth__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 1rem;
}

.customer-auth__field--full {
    grid-column: 1 / -1;
}

.customer-auth--wide .customer-auth__stage {
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 560px);
    align-items: start;
}

.customer-auth--wide .customer-auth__form {
    padding: clamp(1.35rem, 2.5vw, 1.85rem);
}

.customer-auth--wide .customer-auth__grid {
    grid-template-columns: 1fr 1fr;
}

.customer-auth--wide .customer-auth__submit {
    margin-top: 0.35rem;
}

.customer-auth__switch--secondary {
    margin-top: 0.55rem;
}

.customer-auth__error {
    display: block;
    margin-top: 0.35rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: #b42318;
}

.customer-auth__remember {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0.15rem 0 1.35rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: var(--text-color, #58585b);
    cursor: pointer;
    user-select: none;
}

.customer-auth__remember input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color, #841212);
}

.customer-auth__submit {
    display: block;
    width: 100%;
    height: 3.15rem;
    border: 0;
    border-radius: 2px;
    background: var(--primary-color, #841212);
    color: #fff;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.customer-auth__submit:hover {
    background: #6a0e0e;
}

.customer-auth__submit:active {
    transform: translateY(1px);
}

.customer-auth__switch {
    margin: 1.25rem 0 0;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: var(--text-color, #58585b);
}

.customer-auth__switch a {
    color: var(--primary-color, #841212);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease;
}

.customer-auth__switch a:hover {
    border-bottom-color: var(--primary-color, #841212);
}

@keyframes customer-auth-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes customer-auth-drift {
    from {
        transform: scale(1.04) translate3d(0, 0, 0);
    }
    to {
        transform: scale(1.08) translate3d(-1.2%, -0.6%, 0);
    }
}

@media (max-width: 860px) {
    .customer-auth {
        min-height: calc(100vh - 70px);
        align-items: stretch;
        padding-top: 1.75rem;
        padding-bottom: 3rem;
    }

    .customer-auth__stage,
    .customer-auth--wide .customer-auth__stage {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 1.5rem;
    }

    .customer-auth__intro {
        order: 2;
    }

    .customer-auth__form {
        order: 1;
        width: min(420px, 100%);
        margin: 0 auto;
    }

    .customer-auth--wide .customer-auth__form {
        width: min(560px, 100%);
    }

    .customer-auth--wide .customer-auth__grid {
        grid-template-columns: 1fr;
    }

    .customer-auth__brand {
        font-size: clamp(1.75rem, 7vw, 2.4rem);
    }

    .customer-auth__lead {
        max-width: 36ch;
    }
}

@media (prefers-reduced-motion: reduce) {
    .customer-auth__photo,
    .customer-auth__intro,
    .customer-auth__form {
        animation: none;
    }
}
