/* login.html */

/* --- 1. RESET Y VARIABLES (Para evitar que se vea corrido) --- */
        :root {
            --primary-red: #b71c1c;
            --primary-hover: #9a1010;
            --text-dark: #334155;
            --text-light: #64748b;
            --border-color: #e2e8f0;
        }

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

        body {
            font-family: 'Inter', sans-serif;
            
            /* IMAGEN DE FONDO CON FILTRO OSCURO */
            background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)), 
                              url('https://images.unsplash.com/photo-1497366216548-37526070297c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
            
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            background-attachment: fixed;
            
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .login-wrapper {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        /* --- 2. TARJETA DE LOGIN --- */
        .login-card {
            background: white;
            width: 100%;
            max-width: 400px; /* Ancho máximo elegante */
            padding: 40px 30px;
            border-radius: 16px;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
            text-align: center;
            animation: fadeInUp 0.5s ease-out;
        }

        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* --- 3. LOGO Y TEXTOS --- */
        .logo-container { margin-bottom: 20px; }
        
        .logo-img {
            max-width: 180px;
            height: auto;
            display: block;
            margin: 0 auto;
        }

        .title-box { margin-bottom: 25px; }
        .title-box h2 {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--text-dark);
            margin-bottom: 5px;
        }
        .title-box p {
            font-size: 0.9rem;
            color: var(--text-light);
        }

        /* --- 4. ALERTAS (MENSAJES DE ERROR) --- */
        .alert {
            padding: 12px 16px;
            margin-bottom: 20px;
            border-radius: 8px;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 12px;
            text-align: left;
        }
        .alert-error { background-color: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
        .alert-success { background-color: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

        /* --- 5. FORMULARIO --- */
        .form-group { margin-bottom: 20px; text-align: left; }
        
        .form-group label {
            display: block;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-dark);
            margin-bottom: 8px;
        }

        .input-wrapper { position: relative; }
        
        .input-wrapper i {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: #94a3b8;
            font-size: 1rem;
            pointer-events: none;
        }

        .form-control {
            width: 100%;
            padding: 12px 16px 12px 45px; /* Espacio para el icono */
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 0.95rem;
            font-family: 'Inter', sans-serif;
            transition: all 0.2s;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--primary-red);
            box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.1);
        }

        /* --- 6. BOTÓN --- */
        .btn-login {
            width: 100%;
            background-color: var(--primary-red);
            color: white;
            padding: 14px;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: background-color 0.2s, transform 0.1s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-top: 10px;
        }

        .btn-login:hover { background-color: var(--primary-hover); }
        .btn-login:active { transform: scale(0.98); }

        .footer-text {
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid var(--border-color);
            font-size: 0.8rem;
            color: var(--text-light);
        }

        /* ===== RESPONSIVE: TABLET (≤768px) ===== */
        @media (max-width: 768px) {
            .login-wrapper { padding: 15px; }
            .login-card { padding: 35px 25px; max-width: 380px; }
            .logo-img { max-width: 150px; }
            .title-box h2 { font-size: 1.3rem; }
            .title-box p { font-size: 0.85rem; }
        }

        /* ===== RESPONSIVE: MOBILE (≤480px) ===== */
        @media (max-width: 480px) {
            .login-wrapper { padding: 10px; }
            .login-card {
                padding: 30px 20px;
                max-width: 100%;
                border-radius: 12px;
                box-shadow: 0 10px 15px rgba(0,0,0,0.2);
            }
            .logo-img { max-width: 130px; }
            .logo-container { margin-bottom: 15px; }
            .title-box { margin-bottom: 20px; }
            .title-box h2 { font-size: 1.2rem; }
            .title-box p { font-size: 0.8rem; }
            .form-control { padding: 10px 14px 10px 40px; font-size: 0.9rem; }
            .btn-login { padding: 12px; font-size: 0.95rem; }
            .alert { font-size: 0.8rem; padding: 10px 12px; }
        }
