﻿:root {
    --primary-color: #1e3a8a; /* Deep Indigo */
    --primary-hover: #1e40af;
    --bg-gradient-start: #f8fafc;
    --bg-gradient-end: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --focus-ring: rgba(30, 58, 138, 0.2);
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
}

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.login-container {
    width: min(1100px, 100%);
    min-height: 650px;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0,0,0,0.02);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Brand Section (Left) --- */
.login-brand-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 60px;
    background: linear-gradient(145deg, #0f172a 0%, #1e3a8a 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

    /* Subtle decorative circles */
    .login-brand-section::before {
        content: '';
        position: absolute;
        top: -100px;
        right: -100px;
        width: 300px;
        height: 300px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    }

    .login-brand-section::after {
        content: '';
        position: absolute;
        bottom: -150px;
        left: -100px;
        width: 400px;
        height: 400px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 70%);
    }

.brand-logo {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 35px;
    color: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.login-brand-section h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.login-brand-section p {
    max-width: 420px;
    font-size: 18px;
    line-height: 1.6;
    color: #cbd5e1;
    font-weight: 400;
}

/* --- Login Card (Right) --- */
.login-card {
    padding: 60px 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-muted);
    margin-bottom: 35px;
    font-size: 16px;
}

.form-label {
    font-weight: 600;
    font-size: 14px;
    color: #334155;
    margin-bottom: 8px;
}

.form-control {
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 14px 16px;
    font-size: 15px;
    transition: all 0.2s ease;
    background-color: #f8fafc;
}

    .form-control:focus {
        background-color: #ffffff;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px var(--focus-ring);
        outline: none;
    }

/* Password Toggle */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

    .password-toggle:hover {
        color: var(--primary-color);
        background: #f1f5f9;
    }

/* Options (Remember me / Forgot password) */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--text-muted);
    cursor: pointer;
}

    .remember-me input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: var(--primary-color);
        cursor: pointer;
    }

.login-options a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

    .login-options a:hover {
        color: var(--primary-hover);
        text-decoration: underline;
    }

/* Submit Button */
.login-button {
    min-height: 54px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    background-color: var(--primary-color);
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

    .login-button:hover {
        background-color: var(--primary-hover);
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(30, 58, 138, 0.3);
    }

    .login-button:active {
        transform: translateY(0);
    }

/* Footer */
.login-footer {
    margin-top: 40px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
}

/* Alert styling override */
.text-danger {
    font-size: 14px;
    color: #dc2626 !important;
}

.alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
}

/* Ensure the spinner and text are aligned */
.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    /* Smooth transition for the disabled state */
    .login-button:disabled {
        cursor: not-allowed;
        background-color: #1e40af; /* Slightly darker blue */
    }

/* --- Responsive Design --- */
@media (max-width: 900px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 500px;
        min-height: auto;
    }

    .login-brand-section {
        display: none; /* Hide brand section on smaller screens */
    }

    .login-card {
        padding: 50px 40px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 40px 24px;
    }

    .login-header h2 {
        font-size: 28px;
    }
}

/* Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
