        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--gradient-background);
            padding: 15px;
            /* overflow: hidden;
            position: relative; */
            overflow-y: auto;
        }

        /* Animated Background */
        .bg-animation {
            position: fixed;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            z-index: 0;
            overflow: hidden;
        }

        .grid-overlay {
            position: fixed;
            width: 100%;
            height: 100%;
            background-image: 
                linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
            background-size: 50px 50px;
            animation: gridMove 20s linear infinite;
            z-index: 0;
        }

        @keyframes gridMove {
            0% { transform: translate(0, 0); }
            100% { transform: translate(50px, 50px); }
        }

        .floating-shape {
            position: absolute;
            opacity: 0.1;
            animation: float 20s infinite ease-in-out;
        }

        .shape-1 {
            width: 250px;
            height: 250px;
            background: var(--gradient-primary);
            border-radius: var(--radius-full);
            top: -80px;
            left: -80px;
        }

        .shape-2 {
            width: 200px;
            height: 200px;
            background: var(--gradient-primary);
            border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
            bottom: -60px;
            right: -60px;
            animation-delay: 2s;
        }

        .shape-3 {
            width: 150;
            height: 150;
            background: var(--gradient-primary);
            border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
            top: 50%;
            right: 10%;
            animation-delay: 4s;
        }

        @keyframes float {
            0%, 100% { transform: translate(0, 0) rotate(0deg); }
            25% { transform: translate(30px, -30px) rotate(90deg); }
            50% { transform: translate(-20px, 20px) rotate(180deg); }
            75% { transform: translate(40px, 10px) rotate(270deg); }
        }


        .login-container {
            position: relative;
            z-index: 10;
            display: flex;
            max-width: 900px; /* Reduced from 1000px */
            width: 100%;
            min-height: 550px; /* Reduced from 600px */
            max-height: 90vh; /* Ensure it fits on screen */
            border-radius: var(--radius-2xl);
            overflow: hidden;
            box-shadow: var(--shadow-xl);
            backdrop-filter: blur(10px);
            animation: slideIn 0.6s ease-out;
        }


        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Left Panel */
        .left-panel {
            flex: 1;
            background: var(--gradient-primary);
            padding: 40px 35px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            position: relative;
            overflow: hidden;
        }

        .hr-icons {
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            opacity: 0.15;
        }

        .hr-icon {
            position: absolute;
            font-size: 2.5rem;
            color: var(--white);
            animation: iconFloat 15s infinite ease-in-out;
        }

        .icon-1 { top: 10%; left: 10%; animation-delay: 0s; }
        .icon-2 { top: 20%; right: 15%; animation-delay: 2s; font-size: 2.5rem; }
        .icon-3 { bottom: 30%; left: 15%; animation-delay: 4s; font-size: 2rem; }
        .icon-4 { bottom: 15%; right: 20%; animation-delay: 6s; }
        .icon-5 { top: 60%; left: 5%; animation-delay: 8s; font-size: 2.2rem; }
        .icon-6 { top: 40%; right: 10%; animation-delay: 3s; font-size: 1.8rem; }

        @keyframes iconFloat {
            0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.15; }
            50% { transform: translateY(-20px) rotate(180deg); opacity: 0.25; }
        }

        .left-content {
            position: relative;
            z-index: 2;
        }

        .left-panel h1 {
            font-size: 2.5rem;
            font-weight: 800;
            color: var(--white);
            margin-bottom: 20px;
            line-height: 1.2;
            text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }

        .left-panel p {
            font-size: 1rem;
            color: rgba(255, 255, 255, 0.9);
            line-height: 1.6;
            margin-bottom: 15px;
        }

        .feature-list {
            margin-top: 30px;
        }

        .feature-item {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            animation: fadeInLeft 0.8s ease-out forwards;
            opacity: 0;
        }

        .feature-item:nth-child(1) { animation-delay: 0.2s; }
        .feature-item:nth-child(2) { animation-delay: 0.4s; }
        .feature-item:nth-child(3) { animation-delay: 0.6s; }

        @keyframes fadeInLeft {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .feature-icon {
            width: 40px;
            height: 40px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: var(--radius-full);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
            backdrop-filter: blur(10px);
        }

        .feature-icon i {
            color: var(--white);
            font-size: 1.2rem;
        }

        .feature-text {
            color: var(--white);
            font-size: 0.95rem;
        }

        /* Right Panel */
        .right-panel {
            width: 420px;
            background: rgba(255, 255, 255, 0.98);
            backdrop-filter: blur(20px);
            padding: 60px 50px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            position: relative;
        }

        .logo-section {
            text-align: center;
            margin-bottom: 20px;
        }

        .logo-section img {
            width: 200px;
            height: 150px;
            object-fit: contain;
            filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
            animation: pulse 2s ease-in-out infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        .login-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .login-header h2 {
            font-size: 2rem;
            color: var(--primary-color);
            margin-bottom: 10px;
            font-weight: 700;
        }

        .login-header p {
            color: var(--gray-600);
            font-size: 0.95rem;
        }

        .form-group {
            margin-bottom: 25px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--gray-800);
            font-size: 0.9rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .input-wrapper {
            position: relative;
        }

        .input-icon {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--gray-500);
            font-size: 1rem;
        }

        .form-group input {
            width: 100%;
            padding: 15px 15px 15px 45px;
            border: 2px solid var(--gray-300);
            border-radius: var(--radius-lg);
            font-size: 1rem;
            transition: all var(--transition-base);
            background: var(--white);
        }

        .form-group input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
            transform: translateY(-2px);
        }

        .toggle-btn {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            cursor: pointer;
            color: var(--gray-500);
            font-size: 1rem;
            padding: 8px;
            transition: color var(--transition-base);
        }

        .toggle-btn:hover {
            color: var(--primary-color);
        }

        .btn-login {
            width: 100%;
            padding: 16px;
            background: var(--gradient-primary);
            color: var(--white);
            border: none;
            border-radius: var(--radius-lg);
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            transition: all var(--transition-base);
            margin-top: 10px;
            text-transform: uppercase;
            letter-spacing: 1px;
            box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
        }

        .btn-login:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
        }

        .btn-login:active {
            transform: translateY(0);
        }

        .btn-login:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        .alert-error {
            background: var(--danger-light);
            color: var(--danger-dark);
            padding: 15px 20px;
            border-radius: var(--radius-lg);
            margin-bottom: 20px;
            border-left: 4px solid var(--danger-color);
            font-size: 0.9rem;
            animation: shake 0.5s;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-10px); }
            75% { transform: translateX(10px); }
        }

        .login-footer {
            margin-top: 30px;
            text-align: center;
            font-size: 0.85rem;
            color: var(--gray-600);
        }

        .login-footer a {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 600;
            transition: color var(--transition-base);
        }

        .login-footer a:hover {
            color: var(--primary-dark);
        }

        .spinner {
            display: inline-block;
            width: 16px;
            height: 16px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-top-color: var(--white);
            border-radius: var(--radius-full);
            animation: spin 0.6s linear infinite;
            margin-left: 10px;
        }

        /* New style for the forgot password link */
        .forgot-password-link {
            text-align: right;
            margin-top: -10px;
            margin-bottom: 15px;
        }
        .forgot-password-link a {
            color: var(--primary-color);
            text-decoration: none;
            font-size: 0.9rem;
            font-weight: 500;
            transition: color var(--transition-base);
        }
        .forgot-password-link a:hover {
            color: var(--primary-dark);
            text-decoration: underline;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Responsive Design */
        /* === IMPROVED RESPONSIVE DESIGN === */
        @media (max-width: 992px) {
            .login-container {
                max-width: 480px;
                min-height: auto;
                flex-direction: column;
            }

            /* HIDE the entire left decorative panel on tablets & phones */
            .left-panel {
                display: none;
            }

            /* Make right panel take full width and reduce padding */
            .right-panel {
                width: 100% !important;     /* override the 420px */
                min-height: 80vh;
                padding: 50px 40px;
                border-radius: var(--radius-2xl);
            }

            /* Optional: Add a subtle gradient overlay on mobile so it still feels premium */
            .right-panel::before {
                content: '';
                position: absolute;
                top: 0; left: 0; right: 0; bottom: 0;
                background: linear-gradient(135deg, rgba(5, 150, 105, 0.05), rgba(16, 185, 129, 0.1));
                border-radius: var(--radius-2xl);
                pointer-events: none;
                z-index: 1;
            }

            .right-panel > * {
                position: relative;
                z-index: 2;
            }
        }

        @media (max-width: 480px) {
            body {
                padding: 10px;
            }

            .login-container {
                max-width: 100%;
                margin: 10px;
            }

            .right-panel {
                padding: 40px 25px;
            }

            .logo-section img {
                width: 160px;
                height: 120px;
            }

            .login-header h2 {
                font-size: 1.7rem;
            }

            .form-group input {
                padding: 14px 14px 14px 44px;
                font-size: 16px; /* Prevents zoom on iOS */
            }

            .btn-login {
                padding: 16px;
                font-size: 1.1rem;
            }

            /* Reduce heavy animations on mobile for performance */
            .floating-shape,
            .grid-overlay,
            .hr-icon {
                animation-duration: 30s;     /* slower = less battery/CPU */
            }

            .grid-overlay {
                background-size: 80px 80px;  /* bigger grid = less rendering */
            }
        }

        /* Extra small phones - final safety */
        @media (max-width: 360px) {
            .right-panel {
                padding: 35px 20px;
            }
            .login-header h2 {
                font-size: 1.5rem;
            }
        }

        .mobile-title {
            text-align: center;
            margin-bottom: 30px;
            display: none;
        }
        @media (max-width: 992px) {
            .mobile-title {
                display: block;
            }
            .mobile-title h1 {
                font-size: 2rem;
                color: var(--primary-color);
                font-weight: 800;
            }
            .mobile-title p {
                color: var(--gray-600);
                margin-top: 8px;
            }
        }