/* Login Page Styles - Image Overlay Redesign */
:root {
    --primary-color: #4361ee;
    --hover-color: #3a0ca3;
    --text-color: #2b2d42;
    --text-muted: #64748b;
    --input-bg: rgba(255, 255, 255, 0.8);
    --input-border: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.login-page {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../images/login-bg-v2.jpg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #ffffff;
    /* background-attachment: fixed; Removed to allow natural flow with contain */
    position: relative;
    overflow: hidden;
}

/* Overlay to ensure text readability on busy backgrounds */
.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.1);
    /* Slight dark overlay */
    /* backdrop-filter: blur(2px); Removed to show clear picture */
    z-index: 1;
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.85);
    /* Glassmorphism */
    /* backdrop-filter: blur(12px); */
    /* -webkit-backdrop-filter: blur(12px); */
    border-radius: 24px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: slideUp 0.6s ease-out;
    margin: 1rem;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transform: none;
    transition: all 0.3s ease;
}

.login-container:hover .logo-container {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    margin-left: 0.25rem;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    transition: color 0.3s ease;
    z-index: 2;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 14px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1e293b;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.15);
}

.form-control:focus+.input-icon {
    color: var(--primary-color);
}

/* Checkbox & Forgot Password */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    font-size: 0.875rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #475569;
    cursor: pointer;
}

.remember-me input {
    width: 1rem;
    height: 1rem;
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Button */
.btn-login {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--hover-color) 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(67, 97, 238, 0.2);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(67, 97, 238, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

/* Footer & Errors */
.login-footer {
    text-align: center;
    margin-top: 1.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

.error-message {
    background-color: #fef2f2;
    color: #ef4444;
    padding: 0.75rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid #fee2e2;
}

/* Dark Mode Support (optional, largely overrides glassmorphism to look good) */
@media (prefers-color-scheme: dark) {
    .login-overlay {
        background: rgba(0, 0, 0, 0.4);
    }

    .login-container {
        background: rgba(15, 23, 42, 0.75);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .login-header h1 {
        color: #f8fafc;
    }

    .login-header p {
        color: #94a3b8;
    }

    .form-control {
        background: rgba(30, 41, 59, 0.6);
        border-color: rgba(148, 163, 184, 0.2);
        color: #fff;
    }

    .form-control:focus {
        background: rgba(30, 41, 59, 0.9);
        border-color: var(--primary-color);
    }

    .logo-container {
        background: #1e293b;
    }

    .form-group label {
        color: #cbd5e1;
    }

    .remember-me {
        color: #cbd5e1;
    }
}