/* B2B customer login & register */

.customer-auth-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg, var(--surface));
}

[data-theme="dark"] .customer-auth-main {
    background: var(--bg);
}

[data-theme="dark"] .customer-auth-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
}

[data-theme="dark"] .customer-auth-input-wrap input,
[data-theme="dark"] .customer-auth-input-wrap select,
[data-theme="dark"] .customer-auth-input-wrap textarea {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-strong);
}

.customer-auth {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

/* Showcase panel */
.customer-auth-showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;
    overflow: hidden;
    color: #fff;
}

.customer-auth-showcase-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    animation: customerAuthKenBurns 22s ease-in-out infinite alternate;
}

@keyframes customerAuthKenBurns {
    from { transform: scale(1.04); }
    to { transform: scale(1.1); }
}

.customer-auth-showcase-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        165deg,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(86, 85, 84, 0.72) 50%,
        rgba(0, 0, 0, 0.92) 100%
    );
}

.customer-auth-showcase-content {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.customer-auth-showcase-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}

.customer-auth-showcase-brand:hover {
    color: var(--brand);
}

.brand-logo--customer-auth {
    display: block;
    height: 52px;
    width: auto;
    max-width: min(280px, 85vw);
    object-fit: contain;
}

.customer-auth-showcase-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    background: rgba(202, 89, 27, 0.25);
    border-radius: 14px;
    font-size: 1.2rem;
    color: var(--brand);
}

.customer-auth-showcase-tag {
    display: inline-block;
    margin: 0 0 1.25rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(202, 89, 27, 0.35);
    border: 1px solid rgba(202, 89, 27, 0.5);
    border-radius: 50px;
}

.customer-auth-showcase blockquote {
    margin: 0 0 1.75rem;
    padding: 0;
    border: none;
}

.customer-auth-showcase blockquote p {
    margin: 0;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.customer-auth-features {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.customer-auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.45;
}

.customer-auth-features i {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--brand);
    font-size: 0.9rem;
}

.customer-auth-showcase-footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
}

.customer-auth-showcase-footer span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.customer-auth-showcase-footer i {
    color: var(--brand);
}

/* Form panel */
.customer-auth-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem clamp(1.25rem, 4vw, 3rem);
    overflow-y: auto;
}

.customer-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
}

.customer-auth-back:hover {
    color: var(--brand);
}

.customer-auth-card {
    width: min(480px, 100%);
    margin-inline: auto;
}

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

.customer-auth-card-header {
    margin-bottom: 1.75rem;
    text-align: center;
}

.brand-logo--customer-auth-card {
    display: block;
    height: 48px;
    width: auto;
    max-width: 220px;
    margin: 0 auto 1.25rem;
    object-fit: contain;
}

.customer-auth-card-header .customer-auth-icon-ring {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    background: var(--brand-light);
    color: var(--brand);
    border-radius: 18px;
    font-size: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.customer-auth-card-header h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.65rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--black);
}

.customer-auth-card-header p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.customer-auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.customer-auth-alert i {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.customer-auth-alert-error {
    background: #fdecea;
    color: #9f1d18;
    border: 1px solid #f5c4c0;
}

.customer-auth-alert-error i {
    color: #b42318;
}

.customer-auth-alert-success {
    background: #e8f8f0;
    color: #1b6b42;
    border: 1px solid #a8e6c4;
}

.customer-auth-alert-success i {
    color: #1b6b42;
}

.customer-auth-alert a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.customer-auth-form {
    display: grid;
    gap: 1.1rem;
}

.customer-auth-form--grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem 1rem;
}

.customer-auth-form--grid .customer-auth-field--full {
    grid-column: 1 / -1;
}

.customer-auth-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--black);
}

.customer-auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.customer-auth-input-wrap > i:first-of-type {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.customer-auth-input-wrap input,
.customer-auth-input-wrap select,
.customer-auth-input-wrap textarea {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.65rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--black);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.customer-auth-input-wrap textarea {
    min-height: 88px;
    resize: vertical;
    padding-top: 0.75rem;
}

.customer-auth-input-wrap select {
    padding-right: 2rem;
    cursor: pointer;
}

.customer-auth-input-wrap input::placeholder,
.customer-auth-input-wrap textarea::placeholder {
    color: #a8a6a5;
}

.customer-auth-input-wrap input:hover,
.customer-auth-input-wrap select:hover,
.customer-auth-input-wrap textarea:hover {
    border-color: #c9c6c4;
}

.customer-auth-input-wrap input:focus,
.customer-auth-input-wrap select:focus,
.customer-auth-input-wrap textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(202, 89, 27, 0.12);
}

.customer-auth-input-wrap:focus-within > i:first-of-type {
    color: var(--brand);
}

.customer-auth-input-wrap input[type="password"] {
    padding-right: 2.75rem;
}

.customer-auth-password-toggle {
    position: absolute;
    right: 0.35rem;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.customer-auth-password-toggle:hover {
    color: var(--brand);
    background: var(--brand-muted);
}

.customer-auth-field .field-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.customer-auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    margin-top: 0.35rem;
    padding: 1rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: var(--shadow-brand);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.customer-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(202, 89, 27, 0.38);
    color: var(--white);
}

.customer-auth-submit:active {
    transform: translateY(0);
}

.customer-auth-submit i {
    transition: transform 0.2s ease;
}

.customer-auth-submit:hover i {
    transform: translateX(4px);
}

.customer-auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.customer-auth-footer a {
    font-weight: 700;
    color: var(--brand);
}

.customer-auth-footer a:hover {
    color: var(--brand-dark);
}

.customer-auth-success-panel {
    text-align: center;
    padding: 2rem 1rem;
}

.customer-auth-success-panel .customer-auth-icon-ring {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    display: grid;
    place-items: center;
    background: #e8f8f0;
    color: #1b6b42;
    border-radius: 50%;
    font-size: 2rem;
}

.customer-auth-success-panel h2 {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--black);
}

.customer-auth-success-panel p {
    margin: 0 0 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
}

a.customer-auth-submit {
    text-decoration: none;
    color: var(--white);
}

.customer-auth-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

.customer-auth-trust span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.customer-auth-trust i {
    color: var(--brand);
}

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

    .customer-auth-showcase {
        min-height: 280px;
        padding: 2rem 1.5rem;
    }

    .customer-auth-features {
        display: none;
    }

    .customer-auth-showcase blockquote p {
        font-size: 1.2rem;
    }

    .customer-auth-showcase-footer span:last-child {
        display: none;
    }
}

@media (max-width: 520px) {
    .customer-auth-form--grid {
        grid-template-columns: 1fr;
    }

    .customer-auth-main {
        padding-top: 1.25rem;
    }
}
