/* Variables CSS para colores corporativos */
:root {
  --hazwat-green: #8BC34A;
  --hazwat-green-dark: #7CB342;
  --hazwat-blue: #1E3A8A;
  --hazwat-blue-dark: #1E40AF;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --blue-50: #eff6ff;
  --green-50: #f0fdf4;
  --red-300: #fca5a5;
  --red-600: #dc2626;
}

/* Reset y base */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: linear-gradient(135deg, var(--blue-50), var(--green-50));
  min-height: 100vh;
}

/* Container principal del login */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue-50), var(--green-50));
  padding: 3rem 1rem;
  position: relative;
  overflow: hidden;
}

/* Decoración de fondo */
.login-container::before {
  content: '';
  position: fixed;
  top: -10rem;
  right: -8rem;
  width: 20rem;
  height: 20rem;
  background: var(--hazwat-green);
  opacity: 0.1;
  border-radius: 50%;
  filter: blur(3rem);
  z-index: -1;
}

.login-container::after {
  content: '';
  position: fixed;
  bottom: -10rem;
  left: -8rem;
  width: 20rem;
  height: 20rem;
  background: var(--hazwat-blue);
  opacity: 0.1;
  border-radius: 50%;
  filter: blur(3rem);
  z-index: -1;
}

/* Card principal */
.login-card {
  max-width: 28rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Header con logo */
.login-header {
  text-align: center;
}

.logo-container {
  margin: 0 auto 1.5rem;
  height: 5rem;
  width: 5rem;
  background: var(--hazwat-green);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.logo-icon {
  color: white;
  font-weight: 700;
  font-size: 1.5rem;
}

.login-title {
  margin: 1.5rem 0 0 0;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--hazwat-blue);
  line-height: 1.2;
}

.login-subtitle {
  margin: 0.5rem 0 0 0;
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* Formulario */
.login-form-container {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 2rem;
  border: 1px solid var(--gray-100);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Campos de entrada */
.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.input-container {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.input-icon svg {
  height: 1.25rem;
  width: 1.25rem;
  color: var(--gray-400);
}

.form-input {
  appearance: none;
  position: relative;
  display: block;
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  border: 1px solid var(--gray-300);
  background: white;
  color: var(--gray-900);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.2s ease-in-out;
  outline: none;
}

.form-input::placeholder {
  color: var(--gray-500);
}

.form-input:focus {
  outline: none;
  ring: 2px;
  ring-color: var(--hazwat-green);
  border-color: var(--hazwat-green);
  z-index: 10;
}

.form-input.error {
  border-color: var(--red-300);
}

/* Mensajes de error */
.error-message {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--red-600);
  display: flex;
  align-items: center;
}

.error-message svg {
  width: 1rem;
  height: 1rem;
  margin-right: 0.25rem;
}

/* Checkbox recordar */
.remember-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkbox-group {
  display: flex;
  align-items: center;
}

.checkbox-input {
  height: 1rem;
  width: 1rem;
  color: var(--hazwat-green);
  border: 1px solid var(--gray-300);
  border-radius: 0.25rem;
  margin-right: 0.5rem;
}

.checkbox-input:focus {
  ring: 2px;
  ring-color: var(--hazwat-green);
}

.checkbox-label {
  font-size: 0.875rem;
  color: var(--gray-700);
}

/* Botón de login */
.login-button {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 1rem;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  color: white;
  background: linear-gradient(135deg, var(--hazwat-green), var(--hazwat-green-dark));
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  outline: none;
}

.login-button:hover {
  background: linear-gradient(135deg, var(--hazwat-green-dark), var(--hazwat-green));
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(139, 195, 74, 0.3);
}

.login-button:focus {
  outline: none;
  ring: 2px;
  ring-offset: 2px;
  ring-color: var(--hazwat-green);
}

.login-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.login-button svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.5rem;
}

/* Estados de carga */
.loading-content {
  display: flex;
  align-items: center;
}

.loading-hidden {
  display: none;
}

.loading-spinner {
  animation: spin 1s linear infinite;
  margin-left: -0.25rem;
  margin-right: 0.75rem;
  height: 1.25rem;
  width: 1.25rem;
  color: white;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Información adicional */
.access-info {
  text-align: center;
}

.access-info-card {
  background: white;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  border: 1px solid var(--gray-100);
}

.access-info-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--hazwat-blue);
  margin-bottom: 0.5rem;
}

.access-info-content {
  font-size: 0.75rem;
  color: var(--gray-600);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.access-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.access-info-type {
  color: var(--gray-600);
}

.access-info-domain {
  font-weight: 500;
}

.access-info-domain.super {
  color: var(--hazwat-green);
}

.access-info-domain.domain {
  color: var(--hazwat-blue);
}

/* Footer */
.login-footer {
  text-align: center;
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 0.25rem;
}

.footer-company {
  font-size: 0.75rem;
  color: var(--gray-400);
}

/* Responsive */
@media (max-width: 640px) {
  .login-container {
    padding: 1.5rem 1rem;
  }
  
  .login-form-container {
    padding: 1.5rem;
  }
  
  .login-title {
    font-size: 1.5rem;
  }
}

/* Clases utilitarias específicas de HAZWAT */
.hazwat-green {
  color: var(--hazwat-green) !important;
}

.bg-hazwat-green {
  background-color: var(--hazwat-green) !important;
}

.hazwat-blue {
  color: var(--hazwat-blue) !important;
}

.bg-hazwat-blue {
  background-color: var(--hazwat-blue) !important;
}

.hazwat-btn-primary {
  background: linear-gradient(135deg, var(--hazwat-green), var(--hazwat-green-dark));
  border: none;
  color: white;
}

.hazwat-btn-primary:hover {
  background: linear-gradient(135deg, var(--hazwat-green-dark), var(--hazwat-green));
}

/* Soporte para clases Tailwind faltantes */
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.bg-gradient-to-br { background: linear-gradient(135deg, var(--blue-50), var(--green-50)); }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.max-w-md { max-width: 28rem; }
.w-full { width: 100%; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.h-20 { height: 5rem; }
.w-20 { width: 5rem; }
.rounded-2xl { border-radius: 1rem; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.text-white { color: white; }
.font-bold { font-weight: 700; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.bg-white { background-color: white; }
.p-8 { padding: 2rem; }
.border { border-width: 1px; }
.border-gray-100 { border-color: var(--gray-100); }
.border-gray-300 { border-color: var(--gray-300); }
.border-red-300 { border-color: var(--red-300); }
.block { display: block; }
.font-medium { font-weight: 500; }
.text-gray-700 { color: var(--gray-700); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-400 { color: var(--gray-400); }
.text-gray-900 { color: var(--gray-900); }
.text-red-600 { color: var(--red-600); }
.mb-2 { margin-bottom: 0.5rem; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-y-0 { top: 0; bottom: 0; }
.left-0 { left: 0; }
.pl-3 { padding-left: 0.75rem; }
.pointer-events-none { pointer-events: none; }
.h-5 { height: 1.25rem; }
.w-5 { width: 1.25rem; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.appearance-none { appearance: none; }
.pl-10 { padding-left: 2.5rem; }
.pr-3 { padding-right: 0.75rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.placeholder-gray-500::placeholder { color: var(--gray-500); }
.rounded-lg { border-radius: 0.5rem; }
.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px var(--hazwat-green); }
.focus\:border-hazwat-green:focus { border-color: var(--hazwat-green); }
.focus\:z-10:focus { z-index: 10; }
.transition-colors { transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.ml-2 { margin-left: 0.5rem; }
.justify-between { justify-content: space-between; }
.rounded { border-radius: 0.25rem; }
.group { /* group class for hover effects */ }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.border-transparent { border-color: transparent; }
.focus\:ring-offset-2:focus { box-shadow: 0 0 0 2px white, 0 0 0 4px var(--hazwat-green); }
.focus\:ring-hazwat-green:focus { box-shadow: 0 0 0 2px var(--hazwat-green); }
.disabled\:opacity-50:disabled { opacity: 0.5; }
.disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }
.animate-spin { animation: spin 1s linear infinite; }
.-ml-1 { margin-left: -0.25rem; }
.mr-3 { margin-right: 0.75rem; }
.opacity-25 { opacity: 0.25; }
.opacity-75 { opacity: 0.75; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.space-y-1 > * + * { margin-top: 0.25rem; }
.mt-1 { margin-top: 0.25rem; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.-z-10 { z-index: -10; }
.overflow-hidden { overflow: hidden; }
.-top-40 { top: -10rem; }
.-right-32 { right: -8rem; }
.-bottom-40 { bottom: -10rem; }
.-left-32 { left: -8rem; }
.w-80 { width: 20rem; }
.h-80 { height: 20rem; }
.opacity-10 { opacity: 0.1; }
.rounded-full { border-radius: 50%; }
.blur-3xl { filter: blur(3rem); }
