body {
    margin: 0;
    padding: 0;
    background-color: #121212; /* Gris oscuro elegante */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: white;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    width: 85%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.05); /* Cristal traslúcido */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.logo {
    width: 120px;
    margin-bottom: 30px;
}

input {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    box-sizing: border-box; /* Para que el padding no rompa el ancho */
}

button {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    border-radius: 12px;
    border: none;
    background: #4CAF50; /* Un verde sutil para resaltar */
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.forgot-pass {
    margin-top: 20px;
    font-size: 0.8em;
    color: #aaa;
    text-decoration: none;
    display: block;
}

#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none; /* Que no bloquee clicks */
}

.toast {
    padding: 15px 25px;
    margin-bottom: 10px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.5s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.toast.success { background-color: #2e7d32; } /* Verde éxito */
.toast.error { background-color: #c62828; }   /* Rojo error */

.profile-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.profile-card {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    font-weight: bold;
    overflow: hidden;
    transition: transform 0.2s;
}

.profile-name {
    font-size: 0.85em;
    color: #ccc;
    text-align: center;
    white-space: nowrap;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    justify-items: center; /* Esto centra los elementos en su celda */
    width: 100%;
    max-width: 320px;
}

/* El fondo que bloquea la pantalla */
#modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    
    /* Configuración inicial */
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* <--- IMPORTANTE: Permite hacer clic en lo que está atrás */
    transition: opacity 0.3s ease, visibility 0.3s;
}

#modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* <--- IMPORTANTE: Bloquea los clics cuando está abierto */
}

#modal-overlay.active .modal-box {
    transform: scale(1);
}

/* La cajita del modal */
.modal-box {
    background: #1e1e1e;
    padding: 25px;
    border-radius: 20px;
    width: 80%;
    max-width: 300px;
    text-align: center;
    border: 1px solid #333;
    
    /* Estado inicial */
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}


.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions button { flex: 1; padding: 10px; border-radius: 10px; border: none; }
.btn-save { background: #4CAF50; color: white; }
.btn-cancel { background: #444; color: white; }

