/* Login Page Specific Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: #fff;
    height: 100vh;
    overflow: hidden;
    /* Prevent scroll on desktop split layout */
}

/* Variables (copied from main style for consistency) */
:root {
    --primary-color: #E85018;
    --primary-hover: #d14413;
    --text-main: #1C1E21;
    --text-muted: #65676B;
    --border-color: #E4E6EB;
}

/* --- Split Layout Container --- */
.auth-split-layout {
    display: flex;
    width: 100%;
    height: 100vh;
    background: #fff;
}

/* Left Panel (Form) */
.auth-left {
    flex: 0 0 500px;
    /* Fixed width */
    width: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    position: relative;
    z-index: 10;

    /* The Oval Curve Effect */
    border-radius: 0 60px 60px 0;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.05);
}

.auth-left-content {
    padding: 0 60px;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

/* Right Panel (Image) */
.auth-right {
    flex: 1;
    position: relative;
    z-index: 1;
    /* Image Background */
    background: url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80') center center/cover no-repeat;

    /* Pull image slightly under the left panel to ensure no gap */
    margin-left: -40px;
}

/* Optional Overlay on Image */
.auth-right-overlay {
    position: absolute;
    bottom: 50px;
    left: 80px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 24px 32px;
    border-radius: 20px;
    color: #fff;
    max-width: 400px;
}

.auth-right-overlay h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.auth-right-overlay p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.5;
}

/* --- Form Elements --- */

/* Brand/Logo */
.brand-logo-large {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    margin-bottom: 40px;
}

.brand-logo-large i {
    color: var(--primary-color);
}

/* Header Text */
.auth-header-new {
    margin-bottom: 35px;
}

.auth-header-new h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 10px 0;
}

.auth-header-new p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

/* Form Group */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

/* Input Wrapper & Icons */
.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.3s;
}

.form-control-new {
    width: 100%;
    padding: 16px 16px 16px 50px;
    /* Left padding for icon */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #FAFAFA;
    transition: all 0.2s ease;
    outline: none;
    color: var(--text-main);
}

.form-control-new:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(232, 80, 24, 0.1);
}

.form-control-new:focus+.input-icon,
.input-icon-wrapper:focus-within .input-icon {
    color: var(--primary-color);
}

/* Actions Row (Forgot Password) */
.form-actions-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -10px;
    margin-bottom: 25px;
}

.forgot-password {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: var(--primary-color);
}

/* Submit Button */
.btn-auth-submit {
    display: block;
    width: 100%;
    padding: 16px;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-auth-submit:hover {
    background-color: var(--primary-hover);
}

.btn-auth-submit:active {
    transform: scale(0.98);
}

/* Footer (Register Link) */
.auth-footer-new {
    margin-top: 30px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.auth-footer-new a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    margin-left: 5px;
}

.auth-footer-new a:hover {
    text-decoration: underline;
}

/* Error Message */
.error-msg {
    background: #FEF2F2;
    color: #DC2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid #FCA5A5;
}

/* Mobile Responsiveness - Robust Fix */
@media (max-width: 900px) {

    html,
    body {
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100% !important;
        background: #f4f6f8;
        /* Contrast background for mobile */
    }

    .auth-split-layout {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
        min-height: 100vh;
    }

    /* 1. Logo Section (Top) - Outside of form for better visibility? 
       No, let's keep it inside but ensure high contrast. */

    /* 2. Right Panel (Image) becomes Top Header */
    .auth-right {
        order: 1;
        flex: none;
        width: 100%;
        height: 200px;
        /* Reduced height */
        background-position: center top;
        margin: 0;
        border-radius: 0 0 30px 30px;
        /* Curve bottom of header image */
        z-index: 1;
    }

    /* 3. Left Panel (Form) becomes Main Content */
    .auth-left {
        order: 2;
        flex: 1;
        width: 100%;
        background: transparent;
        /* Remove white block bg to allow card style */
        display: block;
        /* Reset flex vertical centering */
        padding: 0 20px 40px 20px;
        /* Padding for mobile */
        margin-top: -40px;
        /* Overlap header slightly */
        border-radius: 0;
        box-shadow: none;
    }

    .auth-left-content {
        background: #fff;
        padding: 30px 24px;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    /* Fix Logo Visibility */
    .brand-logo-large {
        justify-content: center;
        margin-bottom: 25px;
        color: var(--text-main);
    }

    .brand-logo-large i {
        color: var(--primary-color) !important;
    }

    .auth-header-new {
        text-align: center;
    }

    .auth-header-new h2 {
        font-size: 1.5rem;
    }

    .auth-footer-new {
        margin-bottom: 20px;
    }

    /* Hide Desktop Overlay */
    .auth-right-overlay {
        display: none;
    }
}