/* ========================================
   DISEÑO MEJORADO - PÁGINA DE LOGIN
   Paleta canon Home Studio (ordenes.html)
   ======================================== */

:root {
  --hs-primary: #d44a7a;
  --hs-primary-light: #e85a8f;
  --hs-primary-dark: #c53f6d;
  --hs-text: #1f2937;
  --hs-text-muted: #6c757d;
  --hs-page-bg:
    radial-gradient(circle at top, rgba(232, 90, 143, 0.12), transparent 32%),
    linear-gradient(180deg, #fff7fb 0%, #f7f8fc 24%, #ffffff 100%);
  --hs-brand-gradient: linear-gradient(135deg, #e85a8f 0%, #d44a7a 58%, #c53f6d 100%);
  --hs-brand-gradient-hover: linear-gradient(135deg, #d44a7a 0%, #c53f6d 100%);
  --hs-focus-ring: rgba(212, 74, 122, 0.25);
  --hs-shadow-brand: rgba(212, 74, 122, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: var(--hs-page-bg);
  color: var(--hs-text);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  position: relative;
  overflow: hidden;
  padding: 1rem;
}

/* Efecto de partículas de fondo */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
  z-index: 1;
}

.login-container {
  position: relative;
  z-index: 2;
  max-width: 400px;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 3rem 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-container {
  margin-bottom: 2rem;
  position: relative;
}

.logo {
  max-width: 140px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease;
  background: #000;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-placeholder {
  width: 120px;
  height: 120px;
  background: var(--hs-brand-gradient);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.logo-placeholder i {
  font-size: 2rem;
  color: white;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--hs-text);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-subtitle {
  font-size: 1rem;
  color: var(--hs-text-muted);
  margin-bottom: 2rem;
  font-weight: 500;
}

.login-form {
  text-align: left;
}

.form-group-enhanced {
  margin-bottom: 1.5rem;
}

.form-label-enhanced {
  font-weight: 600;
  color: var(--hs-text);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-control-enhanced {
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
  width: 100%;
  font-size: 1rem;
}

.form-control-enhanced:focus {
  border-color: var(--hs-primary);
  box-shadow: 0 0 0 0.2rem var(--hs-focus-ring);
  background: white;
  outline: none;
}

.btn-login {
  width: 100%;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
}

.btn-login::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-login:hover::before {
  left: 100%;
}

.btn-login-primary {
  background: var(--hs-brand-gradient);
  color: white;
  box-shadow: 0 4px 15px var(--hs-shadow-brand);
}

.btn-login-primary:hover {
  background: var(--hs-brand-gradient-hover);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--hs-shadow-brand);
}

.btn-login-primary:active {
  transform: translateY(0);
}

.footer-info {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  color: #6c757d;
  font-size: 0.9rem;
}

.error-message {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-weight: 500;
  display: none;
}

.success-message {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-weight: 500;
  display: none;
}

.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Responsive */
@media (max-width: 768px) {
  .login-container {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }

  .login-title {
    font-size: 1.75rem;
  }

  .login-subtitle {
    font-size: 0.9rem;
  }

  .btn-login {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
  .login-container {
    background: rgba(45, 55, 72, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .login-title {
    color: #e2e8f0;
  }

  .login-subtitle {
    color: #a0aec0;
  }

  .form-label-enhanced {
    color: #e2e8f0;
  }

  .form-control-enhanced {
    background: #2d3748;
    border-color: #718096;
    color: #e2e8f0;
  }

  .form-control-enhanced:focus {
    background: #4a5568;
    border-color: var(--hs-primary-light);
  }

  .footer-info {
    color: #a0aec0;
    border-color: rgba(255, 255, 255, 0.1);
  }
}

/* Estados de validación */
.form-control-enhanced.is-valid {
  border-color: #28a745;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-control-enhanced.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Animación de entrada para mensajes */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-message.show,
.success-message.show {
  display: block;
  animation: slideInDown 0.3s ease-out;
} 