  * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background: linear-gradient(135deg, #e0f2fe 0%, #f0fdfa 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .login-container {
            display: flex;
            background: white;
            border-radius: 24px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
            overflow: hidden;
            max-width: 1000px;
            width: 100%;
            height: 600px;
        }

        .login-image {
            flex: 1;
            background: linear-gradient(135deg, #0ea5e9 0%, #0d9488 100%);
            display: none; /* Oculto por defecto, se muestra en pantallas grandes */
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 40px;
            color: white;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        /* Se muestra la imagen solo en pantallas de más de 768px */
        @media (min-width: 769px) {
            .login-image {
                display: flex;
            }
        }

        .login-image::before {
            content: '';
            position: absolute;
            top: -50px;
            right: -50px;
            width: 200px;
            height: 200px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
        }

        .login-image::after {
            content: '';
            position: absolute;
            bottom: -80px;
            left: -30px;
            width: 250px;
            height: 250px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.08);
        }

        .logo {
            position: relative;
            z-index: 2;
            margin-bottom: 30px;
        }

        .logo-icon {
            width: 80px;
            height: 80px;
            background: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 20px;
        }

        .logo-icon i {
            font-size: 36px;
            color: #0ea5e9;
        }

        .logo-text {
            font-size: 28px;
            font-weight: 700;
            background: linear-gradient(to right, white, #e0f2fe);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .login-image h2 {
            font-size: 24px;
            font-weight: 600;
            margin-bottom: 15px;
            position: relative;
            z-index: 2;
        }

        .login-image p {
            font-size: 16px;
            opacity: 0.9;
            line-height: 1.6;
            position: relative;
            z-index: 2;
            max-width: 350px;
        }

        .login-form {
            flex: 1; /* Ocupa todo el espacio en móvil */
            padding: 60px 50px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            position: relative; 
        }

        .form-header {
            margin-bottom: 30px; /* Reducido para dar espacio a la alerta */
        }

        .form-header h1 {
            font-size: 32px;
            color: #1e293b;
            font-weight: 700;
            margin-bottom: 8px;
        }

        .form-header p {
            color: #64748b;
            font-size: 16px;
        }

        /* == ANIMACIÓN Y ESTILO DE ALERTA FLOTANTE == */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* **NUEVO**: Animación para desaparecer */
        @keyframes fadeOut {
            from { opacity: 1; transform: translateY(0); }
            to { opacity: 0; transform: translateY(-10px); }
        }

        .alert.fading-out {
            animation: fadeOut 0.5s ease-out forwards;
        }
        /* ========================================= */

        .alert-container {
            position: absolute;
            /* **MODIFICADO**: Posicionado en el espacio entre el header y el form */
            top: 155px; 
            left: 50px;
            right: 50px;
            z-index: 100;
            pointer-events: none;
        }

        .alert {
            padding: 16px;
            border-radius: 12px;
            font-size: 15px;
            font-weight: 500;
            text-align: center;
            animation: fadeIn 0.5s ease-out forwards;
            pointer-events: auto;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        .alert-error {
            background: #fee2e2;
            color: #b91c1c;
            border: 1px solid #fecaca;
        }
        .alert-success {
            background: #dcfce7;
            color: #15803d;
            border: 1px solid #bbf7d0;
        }
        /* ========================================= */

        /* **NUEVO**: Contenedor del formulario para dar espacio a la alerta */
        #loginForm {
            margin-top: 40px; /* Empuja el formulario hacia abajo para dejar espacio a la alerta */
        }

        .input-group {
            margin-bottom: 24px;
            position: relative;
        }

        .input-group label {
            display: block;
            margin-bottom: 8px;
            color: #334155;
            font-weight: 500;
            font-size: 14px;
        }

        .input-group input {
            width: 100%;
            padding: 16px 20px 16px 48px;
            border: 2px solid #e2e8f0;
            border-radius: 16px;
            font-size: 16px;
            color: #1e293b;
            transition: all 0.3s ease;
            background: #f8fafc;
        }
        
        .input-group input#password {
            padding-right: 48px;
        }

        .input-group input:focus {
            outline: none;
            border-color: #0ea5e9;
            box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
            background: white;
        }

        .input-icon {
            position: absolute;
            left: 16px;
            top: 42px; 
            color: #64748b;
            font-size: 18px;
        }
        
        #password-icon {
             top: 42px;
        }

        .password-toggle-icon {
            position: absolute;
            right: 18px;
            top: 42px;
            color: #64748b;
            font-size: 18px;
            cursor: pointer;
            z-index: 10;
        }

        .remember-forgot {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
            font-size: 14px;
        }

        .remember {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #334155;
        }

        .remember input {
            width: 18px;
            height: 18px;
            accent-color: #0ea5e9;
        }

        .forgot-password {
            color: #0ea5e9;
            text-decoration: none;
            font-weight: 500;
            transition: color 0.2s ease;
        }

        .forgot-password:hover {
            color: #0284c7;
            text-decoration: underline;
        }

        .login-button {
            background: linear-gradient(135deg, #0ea5e9 0%, #0d9488 100%);
            color: white;
            border: none;
            padding: 16px;
            border-radius: 16px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
            width: 100%;
            margin-top: 10px;
        }

        .login-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
        }

        .login-button:active {
            transform: translateY(0);
        }

        /* Responsive Design */
        @media (max-width: 768px) {
            .login-container {
                flex-direction: column;
                height: auto;
                max-width: 500px; /* Hacemos el contenedor más estrecho en móvil */
            }
            
            .login-form {
                padding: 40px 30px;
                flex-basis: auto; /* Permitir que el formulario defina la altura */
            }

            .alert-container {
                position: static; /* La alerta ya no es flotante en móvil */
                left: auto;
                right: auto;
                top: auto;
                margin-bottom: 20px; /* Se posiciona antes del header */
            }

            /* **NUEVO**: Mover la alerta antes del header en móvil */
            .login-form {
                display: flex;
                flex-direction: column;
            }
            .alert-container {
                order: -1; /* Mueve la alerta al principio del .login-form */
            }
            #loginForm {
                margin-top: 0; /* Reseteamos el margen en móvil */
            }
        }

        @media (max-width: 480px) {
            .login-form {
                padding: 30px 20px;
            }
            
            .form-header h1 {
                font-size: 26px;
            }

            .alert-container {
                padding: 0 5px; /* Ajuste para que no pegue a los bordes */
            }
        }