:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --bg-gradient-start: #f3f4f6;
    --bg-gradient-end: #e5e7eb;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #e2e8f0;
    --input-bg: #f8fafc;
    --transition-speed: 0.3s;
}

body {
    background-color: var(--bg-gradient-start);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Mesh Gradient Background */
    background-image:
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
}

/* --- Navbar Styling (Restored & Modernized) --- */
.navbar {
    display: flex !important;
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;

    /* Glassmorphism Effect */
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02) !important;

    padding: 0.75rem 2rem !important;
}

/* Navbar Brand & Links */
.navbar-light .navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--text-main) !important;
    font-weight: 500;
    transition: color 0.2s;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hide the old black top bar if it exists */
.header-top-black-bg {
    display: none !important;
}

/* --- Main Wrapper --- */
.login-page-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    padding-top: 80px;
    /* Space for fixed navbar */
    box-sizing: border-box;
}

/* --- Statement Container --- */
.statement-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50px;
    /* Pill shape */
    padding: 1rem 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    width: auto;
    text-align: center;
    animation: fadeDown 0.8s ease-out;
}

.system-statement {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
    margin: 0;
    line-height: 1.5;
}

.system-statement strong {
    color: var(--primary-color);
}

/* --- Login Card --- */
.login-card {
    display: flex;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 1000px;
    overflow: hidden;
    min-height: 600px;
    opacity: 0;
    /* For animation */
    animation: fadeUp 0.8s ease-out forwards;
    animation-delay: 0.2s;
}

/* --- Visual Side (Left) --- */
.login-visual {
    flex: 1.2;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow: hidden;
}

/* Decorative Circles in BG */
.login-visual::before,
.login-visual::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.login-visual::before {
    width: 300px;
    height: 300px;
    top: -50px;
    right: -50px;
}

.login-visual::after {
    width: 200px;
    height: 200px;
    bottom: 50px;
    left: -50px;
}

.visual-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.visual-logo {
    max-width: 120px;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.visual-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: white !important;
}

.visual-content p {
    font-size: 1.1rem;
    opacity: 0.8;
    line-height: 1.6;
    max-width: 80%;
    margin: 0 auto;
    color: white !important;
}

/* --- Form Side (Right) --- */
.login-form-container {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.app-logo {
    height: 40px;
    margin-bottom: 1rem;
}

.login-header h3 {
    font-size: 1.75rem;
    color: var(--text-main);
    font-weight: 700;
    margin: 0;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Input Wrapper for Icons */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 10;
}

.form-control {
    width: 100%;
    padding: 14px 16px 14px 48px;
    /* Extra padding left for icon */
    border: 2px solid transparent;
    border-radius: 12px;
    background-color: var(--input-bg);
    font-size: 0.95rem;
    transition: all var(--transition-speed);
    box-sizing: border-box;
    color: var(--text-main);
}

.form-control:focus {
    background-color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Toggle Password Eye */
.toggle-password {
    position: absolute;
    right: 16px;
    cursor: pointer;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
    background-color: var(--primary-dark);
}

.forgot-password-link {
    display: block;
    text-align: right;
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-top: 0.5rem;
}

.login-footer {
    margin-top: auto;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-top: 2rem;
}

/* Animations */
@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .login-card {
        flex-direction: column;
        min-height: auto;
        max-width: 500px;
    }

    .login-page-wrapper {
        padding-top: 80px;
        /* Ensure nav doesn't cover content */
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .login-visual {
        padding: 30px;
        flex: 0 0 120px;
    }

    .visual-logo {
        max-width: 60px;
        margin-bottom: 0.5rem;
    }

    .visual-content h2,
    .visual-content p {
        display: none;
    }

    .login-form-container {
        padding: 30px;
    }
}