/* ── BODY OVERRIDE ── */
html, body {
    height: auto !important;
    min-height: 100vh !important;
    overflow-x: clip !important;
    overflow-y: auto !important;
    background: var(--dark-primary-60) !important;
}

/* ── TOAST/NOTIFICATION OVERRIDE ── */
.toast-container .toast {
    background: var(--site-overlay) !important;
    border: 1px solid rgba(255,215,0,0.15) !important;
    color: var(--site-text) !important;
}

/* ── CUSTOMER AUTH PAGES ── */
.auth-page {
    min-height: calc(100svh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-primary-60);
    position: relative;
    overflow: visible;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: auto;
    padding: 2rem 1rem;
}

/* Grid background matching the hero */
.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,215,0,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,215,0,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Ambient glow effects */
.auth-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}
.auth-glow-1 {
    width: 500px; height: 500px;
    top: -120px; right: -80px;
    background: radial-gradient(circle, rgba(255,215,0,0.10) 0%, transparent 70%);
    animation: authGlow1 10s ease-in-out infinite;
}
.auth-glow-2 {
    width: 400px; height: 400px;
    bottom: -80px; left: -60px;
    background: radial-gradient(circle, rgba(255,180,0,0.07) 0%, transparent 70%);
    animation: authGlow2 12s ease-in-out infinite;
}
@keyframes authGlow1 { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(-20px,20px) scale(1.08);} }
@keyframes authGlow2 { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(15px,-15px) scale(1.06);} }

/* Card container */
.auth-card {
    position: relative;
    z-index: 2;
    background: var(--dark-secondary-30-panel);
    border: 1px solid rgba(255,215,0,0.15);
    border-radius: 24px;
    padding: 3rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 40px 80px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.05);
    width: 100%;
    max-width: 460px;
    animation: cardSlideUp 0.6s ease both;
}
.auth-card.auth-card--wide {
    max-width: 560px;
}

@keyframes cardSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Brand badge */
.auth-brand {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-brand-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, #FFD700, #FDB931);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #000;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(255,215,0,0.35);
}
.auth-brand h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--site-text);
    letter-spacing: -0.03em;
    margin-bottom: 0.35rem;
}
.auth-brand p {
    font-size: 0.9rem;
    color: var(--site-muted);
    margin: 0;
}

/* Form labels */
.auth-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--site-muted);
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
    display: block;
}

/* Input groups */
.auth-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}
.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--site-muted);
    font-size: 0.85rem;
    transition: color 0.2s;
    pointer-events: none;
    z-index: 2;
}
.auth-input {
    width: 100%;
    background: var(--site-panel-tint);
    border: 1.5px solid var(--site-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.85rem 0.75rem 2.5rem;
    font-size: 0.92rem;
    color: var(--site-text);
    outline: none;
    transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.auth-input::placeholder {
    color: var(--site-muted);
}
.auth-input:focus {
    border-color: rgba(255,215,0,0.5);
    background: var(--site-panel-tint);
    box-shadow: 0 0 0 3px rgba(255,215,0,0.08);
}
.auth-input:focus ~ .auth-input-icon,
.auth-input:focus + .auth-input-icon {
    color: var(--site-accent-text);
}

/* Verification badge */
.auth-verify-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--site-success);
    margin-top: 0.4rem;
}
.auth-verify-badge i {
    font-size: 0.7rem;
}

/* Submit button */
.auth-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-10), #FDB931);
    color: #000;
    border: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.875rem 1.5rem;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 20px rgba(255,215,0,0.30);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.auth-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255,215,0,0.45);
    background: linear-gradient(135deg, #FDB931, #FFD700);
}
.auth-submit:active {
    transform: translateY(0);
}

/* Link row */
.auth-link-row {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--site-muted);
}
.auth-link-row a {
    color: var(--site-accent-text);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.auth-link-row a:hover {
    color: var(--site-accent-text);
    text-decoration: underline;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--site-muted);
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--site-panel-tint);
}

/* Security note */
.auth-security {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.72rem;
    color: var(--site-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.auth-security i {
    color: var(--site-success);
    font-size: 0.65rem;
}

/* Error alert */
.auth-alert {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--site-danger);
    animation: shakeIn 0.4s ease;
}
.auth-alert i {
    color: var(--site-danger);
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Success alert */
.auth-alert--success {
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.3);
    color: var(--site-success);
}
.auth-alert--success i {
    color: var(--site-success);
}

@keyframes shakeIn {
    0% { transform: translateX(-8px); opacity: 0; }
    50% { transform: translateX(4px); }
    100% { transform: translateX(0); opacity: 1; }
}

/* Two-column row inside card */
.auth-row {
    display: flex;
    gap: 1rem;
}
.auth-row > * {
    flex: 1;
    min-width: 0;
}

/* Toggle password button */
.auth-toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--site-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
    transition: color 0.2s;
    z-index: 2;
}
.auth-toggle-pw:hover {
    color: var(--site-accent-text);
}

/* ── RESPONSIVE ── */
@media (max-width: 576px) {
    .auth-page {
        align-items: flex-start;
        min-height: calc(100svh - 56px);
        padding: 1.5rem 1rem 3rem;
    }
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 18px;
    }
    .auth-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Explicit light-mode contrast for shared sign-in and recovery screens. */
html[data-color-mode="light"] .auth-brand :is(h1, h2) { color: var(--site-text); }
html[data-color-mode="light"] .auth-label { color: var(--site-text); }
html[data-color-mode="light"] .auth-input {
    background: #ffffff;
    border-color: var(--site-control-border);
    color: var(--site-text);
}
html[data-color-mode="light"] .auth-input:focus {
    border-color: #171717;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, .24);
}

.auth-control-wrap { position: relative; }
.auth-input--password-toggle { padding-right: 2.5rem; }
.auth-otp-input { letter-spacing: 0.5em; text-align: center; font-size: 1.2rem; }
.auth-password-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.25rem; }
.auth-label--compact { margin-bottom: 0; }
.auth-forgot-link { font-size: 0.8rem; font-weight: 500; color: var(--site-accent-text); text-decoration: none; opacity: 0.85; transition: opacity 0.2s; }
html[data-color-mode="light"] .auth-link-row a {
    color: #171717;
    text-decoration: underline;
    text-underline-offset: 3px;
}
html[data-color-mode="light"] .auth-divider::before,
html[data-color-mode="light"] .auth-divider::after { background: var(--site-border); }
html[data-color-mode="light"] .auth-page::before { background-image: none; }
