:root {
    --primary-color: #4e60ff;
    --primary-light: #edeeff;
    --secondary-color: #fd6d22;
    --dark-color: #2b2b43;
    --light-color: #f8f9ff;
    --gray-color: #83859c;
    --light-gray: #edeeff;
    --white: #ffffff;
    --black: #000000;
    --success-color: #4caf50;
    --error-color: #f44336;
    --secondary-font: #415357;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    display: flex;
    min-height: 100vh;
}

.login-container {
    display: flex;
    width: 100%;
}

.login-illustration {
    flex: 1;
    background-image: url('/static/media/hero.png');
    background-position: top center;  /* 👈 mueve la imagen arriba */
    background-size: cover;   
    display: flex;
    flex-direction: column;
    /* justify-content: center; */
    align-items: center;
    padding: 2rem;
    color: var(--white);
    display: none;
}

.login-illustration img {
    max-width: 80%;
    margin-bottom: -5rem;
}

.login-illustration h2 {
    color: var(--secondary-font);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-align: center;
}

.login-illustration p {
    color: var(--secondary-font);
    text-align: center;
    opacity: 0.9;
    max-width: 400px;
}

.login-form-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.login-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 450px;
    position: relative;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
  max-width: 200px;   
  max-height: 120px;  
  width: auto;        
  height: auto;
  display: block;
  margin: 0 auto 20px; 
}

.login-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.login-header p {
    color: var(--gray-color);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-left: 40px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray-color);
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input {
    width: auto;
    margin-right: 8px;
}

.forgot-password a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.login-button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.login-button:hover {
    background-color: #3a4bff;
    transform: translateY(-2px);
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--light-gray);
}

.divider::before {
    margin-right: 1rem;
}

.divider::after {
    margin-left: 1rem;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--light-gray);
    color: var(--dark-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: var(--light-gray);
}

.register-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-color);
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.input-error {
    border-color: var(--error-color) !important;
}

@media (min-width: 992px) {
    .login-illustration {
        display: flex;
    }
}

.login-button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px; /* espacio entre texto y spinner */
  position: relative;
}

.login-button:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.spinner {
  border: 3px solid rgba(255,255,255,0.3);
  border-top: 3px solid #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: none; /* 👈 por defecto oculto */
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}







/* ======== SweetAlert2 adaptado a paleta ======== */

/* Fondo difuminado detrás de la alerta */
.swal2-container {
  backdrop-filter: blur(5px);
  background-color: rgba(26, 26, 46, 0.35) !important; /* oscuro semitransparente */
}


/* Animación de aparición */
@keyframes fadeInScale {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Títulos */
.swal2-title {
  font-size: 22px !important;
  font-weight: 600 !important;
  margin-bottom: 10px !important;
  color: #111827 !important; /* negro grisáceo */
}

/* Mensaje */
.swal2-html-container, .swal2-content {
  font-size: 16px !important;
  font-weight: 400 !important;
  color: #6b7280 !important; /* gris medio */
  margin: 10px 0 0 0 !important;
}

/* Estilo base para ambos */
.swal2-confirm, .swal2-cancel {
  border-radius: 8px !important;
  padding: 10px 22px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease;
  box-shadow: none !important; /* más limpio */
}

/* Botón confirmar */
.swal2-confirm {
  background: #2563eb !important;  /* azul corporativo */
  color: #fff !important;
}

/* Botón cancelar */
.swal2-cancel {
  background: #e5e7eb !important; /* gris claro */
  color: #374151 !important; /* gris oscuro */
}

/* Íconos */
.swal2-icon {
  border-width: 3px !important;
  box-shadow: 0 0 12px rgba(0,0,0,0.08);
}

.swal2-icon.swal2-success {
  border-color: #16a34a !important; /* verde */
  color: #16a34a !important;
}

.swal2-icon.swal2-error {
  border-color: #dc2626 !important; /* rojo */
  color: #dc2626 !important;
}

.swal2-icon.swal2-warning {
  border-color: #f59e0b !important; /* amarillo */
  color: #f59e0b !important;
}
