:root {
    --primary: var(--color-primary, var(--primary-color, #E05F2C));
    --primary-rgb: var(--color-primary-rgb, var(--primary-color-rgb, 224, 95, 44));
    --primary-dark: #C44E1F;
    --primary-soft: var(--color-primary-soft, rgba(var(--primary-rgb), 0.1));
    --primary-glow: rgba(var(--primary-rgb), 0.25);
    
    --dark-navy: #0c1222;
    --surface-light: var(--color-bg, var(--bg-body, #fcfcfd));
    --surface-white: var(--color-surface, var(--bg-surface, #ffffff));
    
    --text-main: var(--color-text, var(--text-dark, #1f2937));
    --text-muted: var(--color-text-muted, #6b7280);
    --text-on-dark: rgba(255, 255, 255, 0.9);
    
    --glass-bg: rgba(255, 255, 255, 0.88);
    --glass-border: var(--color-border, rgba(255, 255, 255, 0.7));
    --glass-blur: 24px;
    
    --shadow-premium: var(--shadow-card, 0 25px 60px rgba(0, 0, 0, 0.1));
    --shadow-glow: 0 12px 28px -6px rgba(var(--primary-rgb), 0.35);
    
    --radius-xl: 32px;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    min-height: 100vh;
    background-color: var(--surface-light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-text {
    font-family: var(--font-heading);
    letter-spacing: -0.035em;
    font-weight: 400;
}

/* Typography Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Marketing panel: warm orange → white gradient on dark background */
.auth-split-marketing .text-gradient {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.9) 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fw-800 { font-weight: 800; }

/* Layout Architecture */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 0% 0%, rgba(var(--primary-rgb), 0.04) 0%, transparent 50%),
                radial-gradient(circle at 100% 100%, rgba(var(--primary-rgb), 0.04) 0%, transparent 50%);
}

.auth-split-marketing {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(3rem, 7vw, 5rem) !important;
    padding-bottom: 5rem !important;
}

/* Global Component Overrides */
.btn {
    border-radius: 10px !important;
    font-weight: 600 !important;
    transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease !important;
    padding: 14px 32px !important;
    letter-spacing: -0.01em;
}

.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    color: #fff !important;
}

.auth-page .btn-primary-theme,
.auth-page .btn-outline-primary-theme {
    border-radius: 10px !important;
}

.btn-light {
    background-color: #f1f5f9 !important;
    border: none !important;
}

.btn-light:hover {
    background-color: #e2e8f0 !important;
    transform: translateY(-2px);
}

.form-control {
    border-radius: 10px !important;
    height: 60px !important;
    padding-left: 1.85rem !important;
    padding-right: 1.85rem !important;
    border: 1px solid #e2e8f0 !important;
    background-color: var(--surface-light) !important;
    transition: var(--transition-smooth) !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
}

.form-control::placeholder {
    color: #c8d2db !important;
    opacity: 1;
}

.form-control:focus {
    background-color: var(--surface-white) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px var(--primary-soft) !important;
}

.form-control.is-invalid,
.form-control.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.12) !important;
    background-image: none !important;
    padding-right: 3.5rem !important;
}

.was-validated .form-control:invalid {
    background-image: none !important;
}

/* Auth Card System */
.auth-card {
    border-radius: var(--radius-xl);
    padding: clamp(2rem, 5vw, 3.5rem) !important;
    width: 100%;
    max-width: 520px;
    animation: cardEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth-page .filter-label {
    letter-spacing: 0.04em;
}

.auth-marketing-icon {
    width: 5.5rem;
    height: 5.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.25rem;
    padding: .85rem;
    flex-shrink: 0;
}

/* Override glass-surface on the dark panel */
.auth-split-marketing .auth-marketing-icon {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
    backdrop-filter: blur(12px);
}

.auth-icon-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    filter: brightness(0) invert(1);
    display: block;
    object-fit: contain;
}

.auth-mobile-logo {
    max-height: 42px;
    width: auto;
}

.auth-panel-logo {
    max-height: 38px;
    width: auto;
    /* keep the logo bright on the dark panel */
    filter: brightness(0) invert(1);
}

.auth-panel-wordmark {
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
}

.auth-divider-badge {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
}

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

/* DRY Utilities for Social Buttons */
.social-btn {
    border-radius: 10px !important;
    background: #fff !important;
    border: 1.5px solid rgba(15,23,42,.07) !important;
    transition: var(--transition-smooth) !important;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.16) !important;
}

/* Icon Boxes */
.icon-box-soft {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 16px;
    color: var(--primary);
    transition: var(--transition-smooth);
}

.icon-box-soft:hover {
    background: var(--primary);
    color: var(--surface-white);
    transform: scale(1.1) rotate(5deg);
}

/* Input Icon System */
.form-icon-group {
    position: relative;
}

.form-icon-group .form-control {
    padding-left: 3.5rem !important;
    padding-right: 3.5rem !important;
}

.form-icon-group .input-icon {
    position: absolute;
    top: 50%;
    left: 1.5rem;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    z-index: 10;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.form-icon-group .form-control:focus + .input-icon {
    color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.form-icon-group .password-toggle {
    position: absolute;
    top: 50%;
    right: 1.5rem;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    z-index: 10;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.form-icon-group .password-toggle:hover {
    color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

/* Marketing Hero Architecture */
.auth-marketing-content {
    position: relative;
    z-index: 5;
    max-width: 520px;
}

/* Feature icon boxes — warm semi-transparent on dark */
.auth-split-marketing .icon-box-soft {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 12px !important;
}

/* Description paragraph */
.auth-split-marketing .lead {
    color: rgba(255, 255, 255, 0.72);
}

/* Feature sub-text */
.auth-split-marketing .opacity-60 {
    color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
}

/* Feature title */
.auth-split-marketing h5 {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
}

/* Copyright */
.auth-split-marketing .auth-footer-copyright {
    color: rgba(255, 255, 255, 0.35) !important;
    opacity: 1 !important;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

/* Divider Badge Protocol */
.divider-badge {
    font-size: 0.6rem;
    letter-spacing: 1.5px;
    white-space: nowrap;
}

/* Interactive Element Refinements */
.custom-check-input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    border-radius: 6px !important;
}

.custom-check-label {
    cursor: pointer;
    user-select: none;
    line-height: 1.2;
}

.form-check-input {
    border: 2px solid #e2e8f0 !important;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px var(--primary-soft) !important;
}

/* Autofill Shield Protocol */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover, 
.form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px var(--surface-white) inset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Typography */
.font-outfit { font-family: 'Outfit', sans-serif; }

/* Global Footer Utility */
.auth-footer-copyright {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.6;
}

/* ── Single-column centered auth layout ──────────────────────────────── */
.auth-solo .auth-wrapper {
    background: #F4F0EC;
    align-items: stretch;
}

.auth-solo-topbar {
    height: 72px;
    border-bottom: 1.5px solid rgba(15,23,42,.06);
    flex-shrink: 0;
}

.auth-solo .form-control {
    background-color: #fff !important;
}

.auth-solo .auth-divider-badge {
    background: #F4F0EC !important;
}

/* Responsive Architecture */
@media (max-width: 991.98px) {
    .auth-card {
        padding: 2.5rem 1.5rem !important;
        box-shadow: none;
        background: transparent;
        border: none;
        backdrop-filter: none;
        animation: none;
    }
    .auth-split-marketing {
        padding: 2.5rem 1.5rem !important;
    }
    .auth-marketing-content {
        max-width: 100%;
    }
}

/* Alert System Overrides */
.alert {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
    padding: 1.25rem 1.5rem !important;
}
.alert-danger {
    background-color: #fef2f2 !important;
    color: #991b1b !important;
}
.alert-success {
    background-color: #f0fdf4 !important;
    color: #166534 !important;
}
.alert-info {
    background-color: #eff6ff !important;
    color: #1e40af !important;
}
