/* --- 1. FONTS SETUP --- */
@font-face {
    font-family: 'Pally';
    src: url('../fonts/Pally-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Pally';
    src: url('../fonts/Pally-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Pally';
    src: url('../fonts/Pally-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

/* --- 2. GLOBAL RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pally', sans-serif;
}

body {
    background-color: #F0F2F5; /* Slightly cooler grey to make the warm card pop */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px; /* Prevents card from touching edges on smaller laptops */
}

/* --- 3. MAIN CARD CONTAINER (Resized for Dell G15) --- */
.login-container {
    display: flex;
    /* CHANGE: Instead of fixed pixels, we use viewport percentage */
    width: 90vw;           /* Take up 90% of screen width */
    max-width: 1400px;     /* Stop it from getting too wide on 4k screens */
    min-height: 80vh;      /* Take up 80% of screen height */
    
    background-color: #FFF;
    border-radius: 30px;   /* Larger border radius for the larger card */
    box-shadow: 0 20px 60px rgba(0,0,0,0.08); /* Softer, larger shadow */
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

/* --- 4. LEFT SIDE (The Tree) --- */
.login-left {
    flex: 1.2; /* Give the image slightly more space than the form */
    background-color: #EFDECD;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px; /* More breathing room */
}

.hero-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* Adds a subtle pop to the image */
    filter: drop-shadow(0 10px 20px rgba(62, 39, 35, 0.15)); 
}

/* --- 5. RIGHT SIDE (The Form) --- */
.login-right {
    flex: 1;
    background-color: #FDFBF7;
    padding: 60px 80px; /* Increased padding for the "Big Screen" feel */
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Top Right Logo */
.logo-corner {
    position: absolute;
    top: 80px;
    right: 80px;
}
.logo-corner img {
    height: 80px; /* Slightly larger logo */
}

/* Headings */
h1 {
    font-size: 36px; /* Bigger title */
    color: #1A1A1A;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 50px;
    font-size: 16px;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 10px;
    color: #444;
    font-size: 15px;
    font-weight: 500;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 16px 20px; /* Chunky, comfortable inputs */
    border: 2px solid #EAEAEA; /* Slightly thicker border looks more modern */
    border-radius: 12px; /* More rounded */
    background-color: #FFF;
    font-size: 16px;
    outline: none;
    transition: all 0.2s;
}

input:focus {
    border-color: #3E2723;
    background-color: #FFF;
    box-shadow: 0 0 0 4px rgba(62, 39, 35, 0.05); /* Subtle glow */
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 30px;
    color: #555;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

/* Custom Checkbox Appearance */
.checkbox-container input {
    accent-color: #3E2723;
    width: 16px;
    height: 16px;
}

.forgot-password {
    color: #3E2723;
    text-decoration: none;
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 18px; /* Taller button */
    background-color: #3E2723;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
}

.btn-primary:hover {
    background-color: #5D4037;
    transform: translateY(-1px);
}

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

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: #888;
    font-size: 14px;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #E0E0E0;
}
.divider span {
    padding: 0 10px;
}

/* Google Button */
.btn-google {
    width: 100%;
    padding: 16px;
    background-color: #FFF;
    border: 2px solid #EAEAEA;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-google:hover {
    background-color: #F9F9F9;
    border-color: #DDD;
}

.terms-agreement {
    font-size: 13px;
    color: #888;
    text-align: center;
    margin: 20px 0 10px;
    line-height: 1.4;
}

.terms-agreement a {
    color: #3E2723;
    text-decoration: none;
    font-weight: 600;
}

.legal-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
    font-size: 12px;
}

.legal-link {
    color: #BCAAA4;
    text-decoration: none;
    transition: color 0.2s;
}

.legal-link:hover {
    color: #3E2723;
}

.error-message {
    color: #D32F2F;
    font-size: 14px;
    text-align: center;
    margin-top: 15px;
    font-weight: 500;
}

/* --- 6. MOBILE RESPONSIVENESS --- */
@media (max-width: 900px) {
    body {
        background-color: #FFF; /* White background on mobile looks cleaner */
        padding: 0;
        align-items: flex-start; /* Start from top */
    }

    .login-container {
        width: 100%;
        height: 100vh; /* Full screen height */
        min-height: 100vh;
        border-radius: 0; /* Remove corners for full screen */
        flex-direction: column; /* Stack them */
        box-shadow: none;
        border: none;
    }

    /* Option A: Show a small banner of the tree at the top */
    .login-left {
        flex: 0 0 200px; /* Fixed height header */
        padding: 20px;
        background-color: #EFDECD;
        align-items: flex-end; /* Push image to bottom of header */
    }
    
    .hero-image {
        max-height: 160px; /* Smaller image */
    }

    .login-right {
        flex: 1; /* Take remaining space */
        padding: 40px 30px;
        border-top-left-radius: 30px; /* Nice curve overlapping the header */
        border-top-right-radius: 30px;
        margin-top: -30px; /* Pull it up over the image bg */
        box-shadow: 0 -10px 20px rgba(0,0,0,0.05); /* Shadow for depth */
    }

    .logo-corner {
        top: 20px;
        right: 20px;
    }

    h1 {
        font-size: 28px;
        margin-top: 10px;
    }
    
    .subtitle {
        margin-bottom: 30px;
    }
}

/* Small Phones */
@media (max-width: 400px) {
    .login-left {
        display: none; /* Hide image completely on very small screens */
    }
    .login-right {
        margin-top: 0;
        border-radius: 0;
        box-shadow: none;
    }
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 40px; /* Make space for the icon so text doesn't overlap */
}

.password-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    display: flex;
    align-items: center;
    opacity: 0.6; /* Matches the grey color in your Flutter screenshot */
}

.password-icon:hover {
    opacity: 1;
}