/* ==========================================================================
   Modern Auth & Login Styling - AI Auto Trader
   ========================================================================== */
@import url('../vendor/fonts/plus-jakarta-sans.css');

:root {
    --brand-primary: #3b82f6;
    --brand-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --brand-glow: rgba(59, 130, 246, 0.35);
    --bg-dark: #090d16;
    --bg-card: rgba(15, 23, 42, 0.85);
    --border-card: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --input-bg: rgba(30, 41, 59, 0.6);
    --input-border: rgba(255, 255, 255, 0.12);
}

*, *::before, *::after { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent;
}

html {
    height: 100%;
    min-height: 100%;
    background-color: #090d16 !important;
}

body { 
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    background-color: #090d16 !important;
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.22) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.15) 0px, transparent 45%),
        radial-gradient(at 50% 100%, rgba(99, 102, 241, 0.18) 0px, transparent 55%),
        radial-gradient(circle at 50% 50%, #0f172a 0%, #090d16 100%) !important;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 20px 16px;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
}

/* Background Ambient Glow Elements */
.auth-bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
.auth-bg-glow-1 {
    width: 320px;
    height: 320px;
    top: -80px;
    right: -80px;
    background: rgba(59, 130, 246, 0.2);
}
.auth-bg-glow-2 {
    width: 280px;
    height: 280px;
    bottom: -60px;
    left: -60px;
    background: rgba(16, 185, 129, 0.15);
}

.login-container { 
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
    margin: auto;
}

.login-card { 
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 36px 28px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #10b981);
}

.logo { 
    text-align: center;
    margin-bottom: 24px;
}

.logo-icon-wrap {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
}

.logo-icon-wrap i { 
    font-size: 32px;
    color: #60a5fa;
    display: inline-block;
}

.logo h1 { 
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
    margin: 0 0 4px 0;
}

.logo p {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}

.form-group { 
    margin-bottom: 18px;
}

.form-label { 
    font-size: 0.78rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.2px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i.input-icon {
    position: absolute;
    left: 14px;
    color: #64748b;
    font-size: 1.05rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.form-control, .input-wrapper input { 
    width: 100%;
    padding: 12px 46px 12px 42px;
    border: 1px solid var(--input-border);
    border-radius: 12px;
    font-size: 0.88rem;
    font-family: inherit;
    color: #ffffff;
    background: var(--input-bg);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.form-control:focus, .input-wrapper input:focus { 
    border-color: #3b82f6;
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.input-wrapper input:focus + i.input-icon,
.input-wrapper:focus-within i.input-icon {
    color: #60a5fa;
}

.input-wrapper .toggle-password {
    position: absolute;
    right: 14px;
    color: #94a3b8;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 6px;
    z-index: 10;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    transition: color 0.2s ease, transform 0.15s ease;
}

.input-wrapper .toggle-password:hover {
    color: #60a5fa;
    transform: scale(1.1);
}

.input-wrapper .toggle-password:active {
    transform: scale(0.95);
}

.form-check { 
    margin: 16px 0 22px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-check-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-input { 
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #3b82f6;
    border-radius: 4px;
}

.form-check-label { 
    font-size: 0.78rem;
    color: #94a3b8;
    cursor: pointer;
    font-weight: 500;
}

.forgot-link {
    font-size: 0.78rem;
    color: #60a5fa;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.btn-login { 
    width: 100%;
    padding: 13px 20px;
    background: var(--brand-gradient);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.2px;
}

.btn-login:hover { 
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(59, 130, 246, 0.55);
}

.btn-login:active { 
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-login:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.alert { 
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.alert-danger { 
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success { 
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.alert-warning { 
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

.alert ul { 
    margin: 4px 0 0 16px;
    padding: 0;
}

/* Biometric Login Styling */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0 16px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}
.auth-divider span {
    padding: 0 12px;
}

.btn-biometric {
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(5, 150, 105, 0.25) 100%);
    border: 1px solid rgba(16, 185, 129, 0.45);
    border-radius: 12px;
    color: #34d399;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

.btn-biometric:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.26) 0%, rgba(5, 150, 105, 0.36) 100%);
    border-color: rgba(52, 211, 153, 0.7);
    color: #6ee7b7;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.25);
}

.btn-biometric i {
    font-size: 1.25rem;
}

.biometric-status {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    text-align: center;
    line-height: 1.4;
}
.biometric-status.info {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.biometric-status.error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.biometric-status.success {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

@media (max-width: 480px) {
    body {
        padding: 16px 12px;
    }
    
    .login-card { 
        padding: 28px 20px;
        border-radius: 20px;
    }
    
    .logo h1 { 
        font-size: 1.25rem;
    }
    
    .logo-icon-wrap {
        width: 56px;
        height: 56px;
        margin-bottom: 12px;
    }
    
    .logo-icon-wrap i {
        font-size: 28px;
    }
}
