/* --- Global & Layout Wrappers --- */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
}

.login-page-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- Left Side: Login Form --- */
.login-left {
    flex: 1 1 50%;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    padding: 20px;
    padding-bottom: 80px;
}

.auth-container {
    width: 100%;
    max-width: 320px;
}

.login-card {
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.brand-logo {
    max-width: 200px;
    margin-bottom: 40px;
}

.error-text {
    color: red;
    font-size: 0.9em;
    margin-bottom: 15px;
}

/* Input Fields & Pill Shapes */
.input-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0a0a0;
    font-size: 1.1em;
}

/* Target the inputs generated by Django */
.input-wrapper input {
    width: 100%;
    padding: 12px 15px 12px 45px; /* Extra left padding for the icon */
    border: 1px solid #5a5a5a;
    border-radius: 25px; /* Creates the pill shape */
    box-sizing: border-box;
    font-size: 14px;
    outline: none;
}

.input-wrapper input:focus {
    border-color: var(--green); /* Highlights green on focus */
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--green); /* Match the green from the design */
    border: 1px solid #5c8724; /* Slightly darker green border */
    border-radius: 25px;
    color: #000000;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: var(--green-deep);
}

/* --- New additions for Logo and Link --- */

.title-graphic {
    width: 100%;
    max-width: 160px;
    margin: 0 auto 10px;
    display: block;
}

.forgot-password-link {
    display: block;
    margin-top: 15px;
    font-size: 0.9em;
    color: #5a5a5a; /* Grey color to match borders */
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-password-link:hover {
    color: var(--green); /* Turns brand green on hover */
    text-decoration: underline;
}

/* Position the eye icon on the right */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #a0a0a0;
    font-size: 1.1em;
    user-select: none; /* Prevents text highlighting on double click */
}

/* Give the text some breathing room so it doesn't run under the eye */
.input-wrapper input[type="password"], 
.input-wrapper input[type="text"] {
    padding-right: 45px; 
}

/* The Spinner Circle */
.spinner {
    display: none; /* Hidden by default */
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #000000; /* Match text color */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

/* The Spin Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Optional: Disable button appearance when loading */
.login-btn:disabled {
    background-color: #a5d66d;
    cursor: not-allowed;
    opacity: 0.8;
}

/* --- Right Side: Green Banner --- */
.login-right {
    flex: 1 1 50%;
    min-width: 0;
    flex-shrink: 2;
    background-color: #d83d96;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.right-graphic-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slogan-text {
    font-family: 'Brush Script MT', cursive, sans-serif; /* Fallback for handwritten look */
    font-size: 3rem;
    color: var(--sidebar-deep);
    line-height: 1.2;
    margin: 0;
}

.heart-graphic {
    width: 70%;
    max-width: 400px;
    min-width: 120px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* --- Responsive Design --- */
@media (max-width: 850px) {
    .login-page-wrapper {
        flex-direction: column-reverse;
    }

    .login-left {
        padding: 30px 20px;
        align-items: center;
    }

    .auth-container {
        max-width: 100%;
    }
    
    .login-right {
        flex: none;
        min-height: 200px;
        padding: 30px 20px;
    }
    
    .right-graphic-container {
        flex-direction: column;
        text-align: center;
    }

    .heart-graphic {
        max-width: 150px;
    }
}

/* --- Password Reset Styles --- */
.reset-subtitle {
    font-size: 0.85rem;
    color: #5a5a5a;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}

.reset-info-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background-color: #f0f7e6;
    border: 1px solid var(--green);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.reset-info-icon {
    font-size: 1.8rem;
}
