/* ==========================================================================
   ESTILOS MODERNOS Y PROFESIONALES DE AUTENTICACIÓN / LOGIN
   ========================================================================== */

:root {
  --login-primary: #4f46e5;
  --login-primary-hover: #4338ca;
  --login-primary-light: #e0e7ff;
  --login-dark: #0f172a;
  --login-slate: #334155;
  --login-muted: #64748b;
  --login-border: #e2e8f0;
  --login-bg-card: #ffffff;
}

body {
  background: radial-gradient(circle at 15% 20%, rgba(79, 70, 229, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 85% 80%, rgba(14, 165, 233, 0.08) 0%, transparent 40%),
              #f1f5f9 !important;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Envoltorio de la Tarjeta */
.login-card-wrapper {
  background: var(--login-bg-card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.07),
              0 8px 10px -6px rgba(15, 23, 42, 0.04);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-card-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5 0%, #06b6d4 100%);
}

/* Header del Login */
.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-brand-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--login-border);
  border-radius: 14px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  padding: 8px;
}

.login-brand-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.login-title {
  color: var(--login-dark);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}

.login-subtitle {
  color: var(--login-muted);
  font-size: 0.88rem;
  font-weight: 500;
}

/* Campos de Formulario Estilizados */
.login-form-group {
  margin-bottom: 20px;
}

.login-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--login-slate);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.login-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  font-size: 0.95rem;
  pointer-events: none;
  transition: color 0.2s ease;
}

.login-control {
  width: 100%;
  height: 46px;
  padding: 10px 14px 10px 42px;
  background-color: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.94rem;
  color: var(--login-dark);
  font-weight: 500;
  transition: all 0.2s ease;
  outline: none;
}

.login-control::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.login-control:focus {
  background-color: #ffffff;
  border-color: var(--login-primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.login-input-box:focus-within .login-input-icon {
  color: var(--login-primary);
}

/* Botón Ocultar/Ver Contraseña */
.login-toggle-eye {
  position: absolute;
  right: 14px;
  color: #94a3b8;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 6px;
  transition: color 0.2s ease;
}

.login-toggle-eye:hover {
  color: var(--login-dark);
}

/* Checkbox y Enlace Olvidó */
.login-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 0.85rem;
}

.custom-checkbox-login {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0;
  color: var(--login-slate);
  font-weight: 600;
}

.custom-checkbox-login input {
  accent-color: var(--login-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.login-forgot-link {
  color: var(--login-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-forgot-link:hover {
  color: var(--login-primary-hover);
  text-decoration: underline;
}

/* Botón Principal */
.btn-login-submit {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  transition: all 0.2s ease;
}

.btn-login-submit:hover {
  background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
  color: #ffffff;
}

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

.btn-login-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Mensajes de Validación y Alertas */
.field-error-text {
  font-size: 0.78rem;
  color: #dc2626;
  font-weight: 600;
  margin-top: 4px;
  display: block;
}

.login-alert-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
  display: none;
  align-items: center;
  gap: 8px;
}

/* Footer del Login */
.login-footer-meta {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--login-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--login-muted);
}
