/* Importamos la fuente Poppins para que se vea igual a la imagen */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

:root {
    --naranja: #FF7F50;
    --azul-corp: #007BA7;
    --bg-light: #f0f4f8;
    --bg-dark: #121212;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--bg-light);
    transition: background 0.3s;
}

body.dark-mode {
    background: var(--bg-dark);
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 30px; /* Bordes muy redondeados como la imagen 2 */
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    width: 380px;
    text-align: center;
    transition: transform 0.3s;
}

body.dark-mode .login-card {
    background: #1e1e1e;
    color: white;
}

.logo-area h1 {
    font-weight: 600;
    color: var(--azul-corp);
    margin-bottom: 5px;
}

.logo-area h1 span {
    color: var(--naranja);
}

.logo-area p {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 30px;
}

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

label {
    font-size: 0.85rem;
    color: var(--azul-corp);
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
    margin-left: 5px;
}

input {
    width: 100%;
    padding: 15px 20px;
    border-radius: 15px; /* Bordes redondeados en inputs */
    border: 1px solid #eee;
    background: #f9f9f9;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: 0.3s;
}

input:focus {
    border-color: var(--naranja);
    background: white;
}

button[type="submit"] {
    width: 100%;
    padding: 16px;
    background: var(--naranja);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 127, 80, 0.2);
    transition: 0.3s;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 15px;
    border-radius: 20px;
    border: none;
    background: var(--azul-corp);
    color: white;
    cursor: pointer;
}

/* Estilo para los mensajes de alerta */
.alert-msg {
    padding: 12px 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    text-align: center;
    font-weight: 500;
    animation: slideDown 0.4s ease forwards;
}

/* El color rojo suave para errores */
.alert-msg.error {
    background-color: #ffe4e6;
    color: #e11d48;
    border: 1px solid #fecdd3;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   AJUSTES PARA CELULAR (RESPONSIVE)
   ========================================= */
@media (max-width: 480px) {
    body {
        padding: 20px; /* Evita que la tarjeta choque con los bordes del celular */
        align-items: flex-start; /* Permite scroll si el teclado del celular se abre */
        padding-top: 60px;
    }

    .login-card {
        width: 100%; /* La tarjeta ocupa todo el ancho disponible */
        max-width: 100%; 
        padding: 30px 20px; /* Reducimos un poco el padding interno */
        border-radius: 25px;
    }

    .logo-area h1 {
        font-size: 1.8rem; /* Título un poco más pequeño para que no rompa */
    }

    input {
        padding: 18px; /* Inputs más altos para que sea fácil tocar con el dedo */
        font-size: 16px; /* Evita que el iPhone haga zoom automático al escribir */
    }

    button[type="submit"] {
        padding: 18px;
        font-size: 1.1rem; /* Botón más prominente */
    }

    .theme-toggle {
        top: 10px;
        right: 10px;
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}