﻿/* Reset básico */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Fondo y centrado de todo el contenedor */
body {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    min-height: 100vh; /* ← usa min-height, no height fija */
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

/* Caja del formulario de login */
.login-container {
    background-color: rgba(30, 41, 59, 0.95);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.15);
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: fadeIn 0.8s ease-in-out;
}

    /* Logo */
    .login-container img {
        max-width: 180px;
        margin-bottom: 20px;
    }

    /* Título */
    .login-container h2 {
        margin-bottom: 24px;
        color: #38bdf8;
    }

/* Estilo de los campos */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: #0f172a;
    color: white;
    font-size: 16px;
    outline: none;
    transition: border 0.2s ease;
}

/* Estilo si hay autocompletado (Chrome) */
input:-webkit-autofill {
    background-color: #0f172a !important;
    color: white !important;
    -webkit-text-fill-color: white !important; /* ?? este es el que te falta */
    -webkit-box-shadow: 0 0 0 1000px #0f172a inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Estilo cuando se enfoca el input */
input:focus {
    border: 1px solid #38bdf8;
}

/* Botón de ingreso */
input[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #2563eb;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    input[type="submit"]:hover {
        background-color: #1d4ed8;
    }

/* Pie de página del login */
.footer {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #94a3b8;
}

/* Animación al cargar */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilo para mensajes de error */
.error-message {
    color: #ff6b6b;
    background-color: rgba(255, 0, 0, 0.1);
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 600px) {
    body {
        display: block; /* ← Desactiva el flexbox en móviles */
        padding: 20px;
    }

    .login-container {
        margin-top: 30px; /* ← Despega el formulario del top */
        max-width: 90%;
        font-size: 18px;
    }

    .login-container h2,
    .login-container h4 {
        font-size: 22px;
    }

    input[type="text"],
    input[type="password"],
    input[type="submit"] {
        font-size: 18px;
        padding: 14px;
    }

    label {
        font-size: 16px;
    }

    .footer {
        font-size: 14px;
    }
}