/* ===== ESTILOS GENERALES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(90deg, #f8e6f0 30%, #e8f2f6 30%);
}

/* ===== DISTRIBUCIÓN GENERAL ===== */
.layout {
  display: flex;
  width: 100%;
  height: 100%;
}

/* ===== PANEL LATERAL (SIN BOTONES) ===== */
.sidebar {
  background-color: #f3d3e0;
  width: 22%;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-content {
  text-align: center;
  color: #654ea3;
}

.sidebar-content h2 {
  font-size: 24px;
  margin-bottom: 15px;
  font-weight: 500;
}

.sidebar-content p {
  font-size: 14px;
  line-height: 1.5;
  color: #7a5bac;
}

/* ===== SECCIÓN PRINCIPAL ===== */
.login-section {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
}

/* ===== CAJA DE LOGIN ===== */
.login-box {
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  padding: 50px 60px;
  width: 380px;
  text-align: center;
}

.login-box h1 {
  font-size: 28px;
  color: #333;
  margin-bottom: 30px;
}

/* ===== FORMULARIO ===== */
form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

label {
  font-size: 14px;
  text-align: left;
  color: #444;
}

input {
  padding: 12px 14px;
  border: 2px solid #ccc;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.3s ease;
  font-size: 15px;
}

input:focus {
  border-color: #654ea3;
}

.btn-login {
  margin-top: 10px;
  background-color: #654ea3;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 12px;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s;
}

.btn-login:hover {
  background-color: #7b5dc6;
  transform: scale(1.05);
}

/* ===== MENSAJES ===== */
.message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  display: none;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

.message.loading {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
  display: block;
}

/* ===== RESPONSIVIDAD ===== */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    padding: 20px;
    box-shadow: none;
  }

  .sidebar-content {
    max-width: 400px;
  }

  .login-box {
    width: 90%;
    margin-top: 30px;
    padding: 40px 30px;
  }
}

/* ===== NOTIFICACIONES TOAST ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #654ea3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease-out;
    transform: translateX(100%);
    opacity: 0;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    animation: slideOut 0.3s ease-in forwards;
}

.toast.success {
    border-left-color: #28a745;
}

.toast.error {
    border-left-color: #dc3545;
}

.toast.warning {
    border-left-color: #ffc107;
}

.toast.info {
    border-left-color: #17a2b8;
}

.toast-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-icon {
    font-size: 18px;
}

.toast-message {
    font-size: 14px;
    color: #333;
    margin: 0;
}

.toast-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #333;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Toast para móviles */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}

/* MEJORAS PARA MÓVILES EN LOGIN */
@media (max-width: 480px) {
  .layout {
    flex-direction: column;
  }
  
  .sidebar {
    padding: 20px 15px;
    height: auto;
  }
  
  .sidebar-content h2 {
    font-size: 20px;
  }
  
  .login-box {
    width: 95%;
    padding: 30px 20px;
    margin: 10px auto;
  }
  
  input {
    padding: 14px 12px;
    font-size: 16px; /* Mejor para iOS */
  }
  
  .btn-login {
    padding: 14px;
    font-size: 16px;
  }
}