/* assets/css/login.css */
/* Professional Redesign for Login Page */

/* 1. Core Variables & Body Styles
-------------------------------------------------- */
:root {
    --primary-color: #4a90e2; /* A modern, friendly blue */
    --primary-hover: #357abd;
    --background-light: #f7f9fc;
    --background-white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #8fa4b8;
    --border-color: #e6eaf0;
    --error-bg: #ffebee;
    --error-text: #c62828;
    --success-bg: #e8f5e9;
    --success-text: #2e7d32;
    --font-family: 'Inter', 'Poppins', sans-serif;
}

/* Hide the default header and footer on the login page for a more immersive experience */
body > .navbar, 
body > .footer-section { /* Adjust footer selector if needed */
    display: none;
}

/* Ensure the wrapper takes full viewport height */
body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--background-light);
    font-family: var(--font-family);
    overflow: hidden; /* Prevent scrollbars from the main layout */
}


/* 2. Main Login Wrapper Layout
-------------------------------------------------- */
.login-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 3. Art & Animation Column (Left)
-------------------------------------------------- */
.login-art-column {
    flex: 1;
    position: relative;
    background: linear-gradient(45deg, #4a90e2, #50e3c2); /* Gradient background */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#3d-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.art-overlay {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    max-width: 80%;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.logo-img {
    width: 50px;
    height: 50px;
    margin-right: 1rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.art-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.art-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
}


/* 4. Form Column (Right)
-------------------------------------------------- */
.login-form-column {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--background-light);
    padding: 2rem;
    overflow-y: auto;
}

.form-container {
    width: 100%;
    max-width: 420px;
}

.form-card {
    background-color: var(--background-white);
    padding: 2.5rem 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(44, 62, 80, 0.1);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.form-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}


/* 5. Form Elements & Inputs
-------------------------------------------------- */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-dark);
    background-color: var(--background-light);
    transition: all 0.2s ease-in-out;
}

.input-group input::placeholder {
    color: var(--text-light);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
    background-color: var(--background-white);
}

.form-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.forgot-password-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

.btn-submit {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.btn-submit:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.form-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-light);
}

.form-footer a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}


/* 6. Error & Success States
-------------------------------------------------- */
.error-container {
    background-color: var(--error-bg);
    border: 1px solid var(--error-text);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.error-message {
    color: var(--error-text);
    font-size: 0.9rem;
}

.error-message:not(:last-child) {
    margin-bottom: 0.5rem;
}

.error-message .alert-link {
    color: var(--error-text);
    font-weight: 600;
    text-decoration: underline;
}

.success-state {
    text-align: center;
    padding: 3rem;
}

.success-icon {
    color: var(--success-text);
    margin-bottom: 1rem;
}

.success-state .btn-submit {
    margin-top: 1.5rem;
    background-color: var(--success-text);
}
.success-state .btn-submit:hover {
    background-color: #1b5e20;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}


/* 7. Responsive Design
-------------------------------------------------- */
@media (max-width: 992px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-art-column {
        flex: 0 0 300px; /* Fixed height for the art on mobile */
    }

    .login-form-column {
        flex-grow: 1;
        align-items: flex-start; /* Align form to top on mobile */
        padding-top: 2rem;
    }
    
    .form-card {
        padding: 2rem;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background-color: transparent;
    }
}

@media (max-width: 768px) {
    .login-art-column {
        display: none; /* Hide art column on small screens to save space */
    }
    
    .login-form-column {
        padding: 1rem;
    }

    .form-card {
        padding: 1.5rem;
    }
}
