/* =========================================================
   🛡️ PREMIUM SAAS AUTHENTICATION (auth.css)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,600;0,700&display=swap');

:root {
    --bg-main: #050507;
    --bg-surface: #0a0a0c;
    --glass-input: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --gold: #D4AF37;
    --gold-hover: #F3E5AB;
    --gold-gradient: linear-gradient(135deg, #D4AF37 0%, #AA7C11 100%);
    --gold-glow: rgba(212, 175, 55, 0.2);
    
    --text-main: #F8F8F8;
    --text-muted: #A1A1AA;
    
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --spring: cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* 📱 100dvh ensures the page doesn't hide under mobile browser URL bars */
body { 
    font-family: var(--font-sans); 
    background: var(--bg-main); 
    color: var(--text-main); 
    min-height: 100dvh; 
    overflow-x: hidden; 
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
button { all: unset; box-sizing: border-box; cursor: pointer; }

/* =========================================================
   📐 SPLIT-SCREEN LAYOUT & SLIDER
   ========================================================= */
.auth-layout {
    display: flex;
    min-height: 100dvh;
    width: 100vw;
}

.auth-visual {
    flex: 1.2;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 5rem;
    overflow: hidden;
    background-color: #000;
}

/* Container for the slider */
.visual-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.visual-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0; /* Hidden by default */
    transform: scale(1);
    /* Smooth crossfade and slow cinematic zoom */
    transition: opacity 1.5s ease-in-out, transform 12s linear; 
}

/* When the JS adds the 'active' class */
.visual-bg.active {
    opacity: 0.5;
    transform: scale(1.08);
}

.auth-visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5,5,7,0.95) 0%, rgba(5,5,7,0.4) 60%, transparent 100%);
    z-index: 1;
}

.auth-quote { position: relative; z-index: 2; max-width: 520px; }

/* --- REFINED: SLEEK & ELEGANT MASTHEAD --- */
.visual-brand {
    font-family: var(--font-serif);
    color: #fff;
    font-size: 2.6rem; 
    font-weight: 700;
    letter-spacing: 0.5px; 
    line-height: 1.2;
    margin-bottom: 1.5rem; 
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.auth-quote h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-style: italic;
    font-weight: 400;
    color: var(--gold);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.auth-quote p {
    color: #c4c4c4;
    font-size: 1.05rem;
    line-height: 1.6;
    font-weight: 300;
}

/* --- RIGHT SIDE: SMOOTH SAAS PANEL --- */
.auth-panel {
    flex: 1;
    max-width: 550px;
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 3rem 4rem;
    box-shadow: -20px 0 50px rgba(0,0,0,0.6);
    z-index: 10;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* Beautiful Back Button */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 3rem;
    padding: 8px 16px 8px 12px;
    border-radius: 100px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    align-self: flex-start;
}
.back-link:hover { color: #fff; background: rgba(255,255,255,0.08); transform: translateX(-4px); }
.back-link i { width: 16px; height: 16px; }

/* =========================================================
   📝 FORM TYPOGRAPHY & SMOOTH INPUTS
   ========================================================= */
.auth-header { margin-bottom: 2.5rem; }
.auth-header h1 { font-family: var(--font-serif); font-size: 2.4rem; color: #fff; margin-bottom: 0.5rem; }
.auth-header p { color: var(--text-muted); font-size: 0.95rem; }

.auth-form { display: flex; flex-direction: column; gap: 1.5rem; }

.input-group { display: flex; flex-direction: column; gap: 0.5rem; }

.label-row { display: flex; justify-content: space-between; align-items: baseline; }

.auth-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.forgot-link { font-size: 0.75rem; color: var(--gold); font-weight: 500; }
.forgot-link:hover { color: var(--gold-hover); text-decoration: underline; }

.input-with-icon { position: relative; display: flex; align-items: center; width: 100%; }

.input-icon {
    position: absolute;
    left: 1.2rem;
    width: 18px;
    height: 18px;
    color: #666;
    pointer-events: none;
    transition: all 0.3s ease;
}

.auth-input {
    width: 100%;
    background: var(--glass-input);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1rem 1rem 3.2rem;
    color: #fff;
    /* 📱 EXACTLY 16px prevents iOS Safari from automatically zooming in when users tap the input! */
    font-size: 16px; 
    font-family: var(--font-sans);
    transition: all 0.3s ease;
}

.auth-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
    background: rgba(255,255,255,0.06);
}

.auth-input:focus + .input-icon, 
.input-with-icon:focus-within .input-icon {
    color: var(--gold);
    transform: scale(1.1);
}

/* =========================================================
   🖱️ TOP CLASS GLOW BUTTON & FOOTER
   ========================================================= */
.auth-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: var(--gold-gradient);
    color: #000;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--gold-glow);
}

.btn-icon { width: 18px; height: 18px; transition: transform 0.3s var(--spring); }

.auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
}

.auth-btn:hover .btn-icon { transform: translateX(6px); }

.auth-footer { margin-top: 2rem; text-align: center; font-size: 0.9rem; color: var(--text-muted); }
.highlight-link { color: var(--text-main); font-weight: 600; border-bottom: 1px solid var(--glass-border); padding-bottom: 2px; transition: all 0.2s ease;}
.highlight-link:hover { color: var(--gold); border-color: var(--gold); }

.auth-error-msg {
    display: none; align-items: center; gap: 10px;
    background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444; padding: 1rem; border-radius: 12px;
    font-size: 0.85rem; margin-bottom: 1.5rem; font-weight: 500;
}
.auth-error-msg i { width: 18px; height: 18px; }

/* =========================================================
   ✨ ANIMATIONS
   ========================================================= */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.animate-fade-in { animation: fadeIn 1s ease forwards; opacity: 0; }
.animate-slide-up { animation: slideUp 0.8s var(--spring) forwards; opacity: 0; }

/* =========================================================
   📱 RESPONSIVE DESIGN (THE MOBILE MAGIC)
   ========================================================= */

@media (max-width: 1200px) {
    .auth-visual { padding: 4rem; }
    .visual-brand { font-size: 2.2rem; }
    .auth-quote h2 { font-size: 1.5rem; }
    .auth-panel { padding: 3rem; max-width: 480px; }
}

@media (max-width: 900px) {
    .auth-layout { 
        flex-direction: column; 
        /* 📱 Adds a subtle, premium glow to the mobile background */
        background: radial-gradient(circle at top left, #121218 0%, #050507 80%);
    }
    
    .auth-visual { display: none; }
    
    .auth-panel { 
        max-width: 100%; 
        width: 100%; 
        padding: 2rem 1.5rem; 
        box-shadow: none;
        background: transparent;
        align-items: center;
        justify-content: center; /* Perfectly centers on mobile */
    }
    
    .auth-form-wrapper {
        max-width: 100%; /* Allows it to flow naturally on small screens */
        width: 100%;
        margin-top: 0;
    }

    /* 📱 Back button is now in the document flow, preventing notch/status bar overlap */
    .back-link {
        margin-bottom: 2rem;
        background: rgba(255,255,255,0.05);
    }
}

@media (max-width: 480px) {
    .auth-header h1 { font-size: 2rem; }
    .auth-header p { font-size: 0.9rem; }
    .auth-form { gap: 1.25rem; } /* Slightly tighter spacing for small phones */
    
    /* Ensure touch targets remain perfectly sized for thumbs */
    .auth-input { padding: 0.875rem 1rem 0.875rem 3rem; }
    .auth-btn { padding: 0.875rem; }
}
/* --- SLIDER INDICATORS --- */
.slider-indicators {
    position: absolute;
    bottom: 5rem;
    right: 5rem;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.4s var(--spring);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.6);
}

.indicator.active {
    width: 24px; /* Expands into a modern pill shape */
    background: var(--gold);
}

/* Adjust indicator position for laptops so it doesn't overlap */
@media (max-width: 1200px) {
    .slider-indicators {
        bottom: 4rem;
        right: 4rem;
    }
}