/* ==========================================================================
   VEDIWAY UI - PREMIUM LOGIN MODULE
   ========================================================================== */

:root {
    /* Identical to Index UI to maintain brand consistency */
    --lux-brand-prime: #0f172a;       
    --lux-brand-accent: #f59e0b;      
    --lux-brand-accent-hover: #d97706;
    
    --lux-bg-main: #f8fafc;           
    --lux-bg-card: #ffffff;
    
    --lux-text-dark: #1e293b;
    --lux-text-muted: #64748b;
    --lux-error: #ef4444;
    --lux-error-bg: #fef2f2;
    
    --lux-border: #e2e8f0;
    --lux-radius-sm: 8px;
    --lux-radius-md: 16px;
    --lux-radius-lg: 24px;
    --action-green: #10b981;
    --lux-shadow: 0 4px 15px -3px rgba(15, 23, 42, 0.08);
    --lux-shadow-heavy: 0 20px 40px -10px rgba(15, 23, 42, 0.12);
    --lux-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, sans-serif;
}

.lux-body {
    background-color: var(--lux-bg-main);
    color: var(--lux-text-dark);
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* --- App Shell & Layout --- */
.lux-app-shell {
    width: 100%;
    max-width: 1200px; /* Expands on desktop */
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.02);
}

.lux-top-nav {
    padding: 1.5rem;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

.lux-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--lux-brand-prime);
    text-decoration: none;
    font-weight: 700;
    background: var(--lux-bg-card);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    box-shadow: var(--lux-shadow);
    transition: transform 0.2s;
}

.lux-back-btn:active { transform: scale(0.95); }

/* --- Grid System --- */
.lux-login-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 3.5rem; /* Pulled up closer to the nav */
    justify-content: center;
}

/* --- Visual Panel (The Image) --- */
.lux-login-visual {
    padding: 0.5rem 1rem; /* Reduced padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.lux-image-wrapper {
    width: 100%;
    max-width: 250px; /* Much smaller width on mobile */
    height: 150px; /* Fixed small height on mobile */
    background: var(--lux-bg-card);
    border-radius: var(--lux-radius-lg);
    box-shadow: var(--lux-shadow);
    overflow: hidden;
    margin-bottom: 1rem;
    border: 3px solid #fff;
}

.lux-hero-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* Crops perfectly to fit the 130px height */
    object-position: top; /* Keeps the shop owner's face visible */
}

.lux-visual-text h2 {
    font-size: 1.25rem; /* Smaller text on mobile */
    color: var(--lux-brand-prime);
    margin-bottom: 0.25rem;
}

.lux-visual-text p {
    font-size: 0.85rem;
    color: var(--lux-text-muted);
}

/* --- Form Panel --- */
.lux-login-form-area {
    padding: 0 1.5rem 1.5rem 1.5rem; /* Removed top padding to pull the card up */
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.lux-glass-card {
    background: var(--lux-bg-card);
    width: 100%;
    max-width: 450px;
    padding: 2rem 1.5rem;
    border-radius: var(--lux-radius-lg);
    box-shadow: var(--lux-shadow-heavy);
    border: 1px solid var(--lux-border);
}

.lux-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.lux-card-title {
    font-size: 1.75rem;
    color: var(--lux-text-dark);
    margin-bottom: 0.25rem;
}

.lux-card-subtitle {
    font-size: 0.9rem;
    color: var(--lux-text-muted);
}

/* --- Form Inputs --- */
.lux-step-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: luxFadeIn 0.3s var(--lux-ease);
}

.lux-input-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lux-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid var(--lux-border);
    border-radius: var(--lux-radius-md);
    background: var(--lux-bg-card);
    overflow: hidden;
    transition: border-color 0.2s;
}

.lux-input-wrapper:focus-within {
    border-color: var(--lux-brand-prime);
}

.lux-country-code {
    padding: 1.1rem 1rem;
    background: var(--lux-bg-main);
    color: var(--lux-text-dark);
    font-weight: 700;
    border-right: 2px solid var(--lux-border);
}

.lux-input {
    flex: 1;
    width: 100%;
    border: none;
    padding: 1.1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--lux-text-dark);
    outline: none;
    background: transparent;
}

/* OTP Specific */
.lux-otp-input {
    border: 2px solid var(--lux-border);
    border-radius: var(--lux-radius-md);
    text-align: center;
    letter-spacing: 0.75rem;
    font-size: 1.5rem;
    transition: border-color 0.2s;
}
.lux-otp-input:focus {
    border-color: var(--lux-brand-prime);
}
.lux-instruction {
    text-align: center;
    font-size: 0.9rem;
    color: var(--lux-text-dark);
    font-weight: 500;
}

/* JS Error States */
.lux-error-message {
    font-size: 0.8rem;
    color: var(--lux-error);
    font-weight: 600;
    min-height: 1rem;
}
.input-error { /* Target for JS */
    border-color: var(--lux-error) !important;
    background-color: var(--lux-error-bg) !important;
}

/* --- Buttons & Links --- */
.lux-btn-primary {
    width: 100%;
    background: var(--lux-brand-prime);
    color: #fff;
    border: none;
    padding: 1.1rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--lux-radius-md);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lux-btn-primary:active {
    transform: scale(0.98);
}
.lux-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.lux-timer-box {
    text-align: center;
    font-size: 0.9rem;
    color: var(--lux-text-muted);
}

.lux-footer-link {
    text-align: center;
}

.lux-text-link {
    background: none;
    border: none;
    color: var(--lux-brand-prime);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
}

.lux-text-link.muted {
    color: var(--lux-text-muted);
    font-weight: 500;
    text-decoration: none;
}

/* Footer */
.lux-secure-footer {
    text-align: center;
    padding: 2rem;
    color: var(--lux-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: auto;
}
.lux-secure-footer i { color: #10b981; }

/* Utilities */
.hidden { display: none !important; }

@keyframes luxFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   DESKTOP RESPONSIVE UPGRADE (Split-Focus Layout)
   ========================================================================== */
@media (min-width: 1024px) {
    .lux-login-grid {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 4rem;
        gap: 4rem;
    }

    .lux-top-nav {
        padding: 2rem 4rem;
    }

    /* Left Side: Massive gorgeous visual */
   .lux-login-visual {
        flex: 1;
        align-items: flex-start;
        text-align: left;
        padding: 0;
    }

    .lux-image-wrapper {
        max-width: 500px;
        height: auto; /* Restores full height on desktop */
        border: none;
        box-shadow: none;
        background: transparent;
        margin-bottom: 1.5rem;
    }
.lux-hero-img {
        object-fit: contain; /* Ensures the whole illustration shows on desktop */
        object-position: center;
    }

    .lux-visual-text h2 {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }
    
    .lux-visual-text p {
        font-size: 1.1rem;
    }

    /* Right Side: Form Card */
    .lux-login-form-area {
        flex: 1;
        padding: 0;
        justify-content: flex-end;
    }

    .lux-glass-card {
        padding: 3rem;
    }
}
