/**
 * Worksteep Premium Authentication Styling
 * Single source of truth for the login page and related auth entry screens.
 * Lightweight, high-performance, responsive, and clashing-free.
 * Optimized to fit entirely within the viewport with zero vertical scroll.
 */

:root {
    /* Premium Slate & Indigo Palette */
    --auth-bg: #030712;
    --auth-bg-gradient: radial-gradient(circle at 50% 50%, #0f172a 0%, #030712 100%);
    
    --glass-bg: rgba(15, 23, 42, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(59, 130, 246, 0.3);
    --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.35);
    
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: rgba(255, 255, 255, 0.08);
    --input-focus-border: #3b82f6;
    --input-focus-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base resets specifically for auth pages to avoid global clashing */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-body {
    font-family: var(--font-main);
    background: var(--auth-bg);
    background-image: var(--auth-bg-gradient);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden; /* Force zero vertical scroll in the viewport */
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Split-Screen Auth Layout */
.auth-container {
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    position: relative;
    z-index: 1;
    padding: 0;
    /* Continuous background for the entire screen */
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(3, 7, 18, 0.95) 100%), 
                url('/professional_1.png') no-repeat center center / cover;
}

.auth-visual-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px 64px 64px 80px;
    background: transparent; /* Seamless transparent background */
    position: relative;
    overflow: hidden;
}

.visual-content {
    max-width: 520px;
    z-index: 2;
}

.visual-logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.visual-logo {
    height: 40px;
    width: auto;
}

.visual-brand-text {
    font-family: var(--font-main);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.visual-content h2 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    color: var(--text-main);
    letter-spacing: -1px;
}

.visual-content p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.features-mini-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-mini-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.feature-mini-item i {
    color: var(--primary);
    font-size: 16px;
}

.auth-form-column {
    display: grid;
    place-items: center;
    padding: 40px 24px;
    position: relative;
    overflow: hidden !important; /* Force lock scrolling completely */
    background: transparent;
    width: 100%;
    
    /* Hide scrollbars visually */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

.auth-form-column::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}

.mobile-only-logo {
    display: none;
}

/* visual mockup container styling */
.visual-mockup-wrapper {
    margin-top: 32px;
    width: 100%;
    max-width: 580px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.02);
    transition: transform 0.3s ease;
    z-index: 2;
}

.visual-mockup-wrapper:hover {
    transform: translateY(-5px);
}

.visual-mockup-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Premium Ambient Glowing Lights */
.ambient-glow-1 {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0) 70%);
    top: -100px;
    left: -100px;
    z-index: 0;
    pointer-events: none;
    filter: blur(80px);
}

.ambient-glow-2 {
    position: absolute;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.07) 0%, rgba(139, 92, 246, 0) 70%);
    bottom: -150px;
    right: -100px;
    z-index: 0;
    pointer-events: none;
    filter: blur(80px);
}

/* Glassmorphic Login Card (Optimized compact dimensions) */
.login-card {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 20px;
    padding: 24px 28px; /* Compressed padding */
    width: 100%;
    max-width: 400px;
    box-shadow: var(--glass-shadow);
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: auto; /* Fixes Flexbox Centering Overflow Clipping Bug */
}

.login-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02) 50%, rgba(59, 130, 246, 0.12) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.login-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 25px 60px rgba(59, 130, 246, 0.06);
    transform: translateY(-2px);
}

/* Brand Section styling */
.brand-section {
    text-align: center;
    margin-bottom: 12px; /* Compressed spacing */
}

.brand-logo {
    height: 32px; /* Compressed height */
    width: auto;
    margin-bottom: 6px; /* Compressed spacing */
    filter: drop-shadow(0 4px 10px rgba(59, 130, 246, 0.2));
    object-fit: contain;
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.05);
}

.brand-section h1 {
    font-size: 21px;
    font-weight: 700;
    margin: 0 0 4px 0;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-section p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}

/* Form Layout styling */
.form-group {
    margin-bottom: 10px; /* Compressed spacing */
    position: relative;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.form-control {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    padding: 10px 14px 10px 38px;
    color: var(--text-main);
    font-size: 13.5px;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--input-focus-border);
    background: rgba(15, 23, 42, 0.75);
    box-shadow: var(--input-focus-shadow);
}

.form-control:focus + i {
    color: var(--primary);
}

/* Error Banner styling */
.error-banner {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
    padding: 8px 12px;
    color: #f87171;
    font-size: 12.5px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-banner i {
    font-size: 14px;
}

/* Button & Link styles */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 11px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--primary-glow);
}

.btn-submit:active {
    transform: translateY(1px);
}

.forgot-password-link {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    margin-top: 8px;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.btn-autofill {
    width: 100%;
    margin-top: 12px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 10px;
    padding: 8px;
    color: #60a5fa;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-autofill:hover {
    background: rgba(59, 130, 246, 0.22);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

/* Footer elements */
.auth-footer {
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    padding-top: 14px;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* Responsive design adjustments for mobile devices */
@media (max-width: 992px) {
    .auth-container {
        grid-template-columns: 1fr;
    }
    
    .auth-visual-column {
        display: none;
    }
    
    .mobile-only-logo {
        display: inline-block !important;
    }
}

@media (max-width: 480px) {
    body.auth-body {
        padding: 12px;
        overflow-y: auto; /* Fallback for very small mobile heights (e.g. landscape) */
        height: auto;
        min-height: 100vh;
    }
    
    .login-card {
        padding: 24px 20px;
        border-radius: 16px;
    }
    
    .brand-section {
        margin-bottom: 18px;
    }
    
    .brand-logo {
        height: 32px;
    }
    
    .brand-section h1 {
        font-size: 19px;
    }
    
    .form-control {
        font-size: 14px; /* Maintain touch-friendly text scale to prevent iOS auto-zoom */
    }
}


