/* Mantiene el label arriba cuando el input tiene valor (sin depender de Angular) */
#username:not(:placeholder-shown) ~ label,
#password:not(:placeholder-shown) ~ label,
#username.bc-active ~ label,
#password.bc-active ~ label {
  top: -23px;
  padding-left: 0;
  width: 95%;
  font-size: 0.875rem;
}
/* ===== Loading Modal ===== */
.bc-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #1a1a1a;
  z-index: 99999;
  justify-content: center;
  align-items: center;
}
.bc-modal-overlay.active {
  display: flex;
}
.bc-loading-ring {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.bc-loading-logo {
  width: 68px;
  height: auto;
  z-index: 2;
  position: absolute;
}
.bc-spinner-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  animation: bcSpin 1.2s linear infinite;
}
@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== Preloader / Loader modal (igual a home-realtime) ===== */
.bc-preloader-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(44, 42, 41, 0.85);
  backdrop-filter: blur(6px);
  z-index: 99999;
  justify-content: center;
  align-items: center;
}
.bc-preloader-overlay.show {
  display: flex;
}
.bc-preloader-dialog {
  background: #ffffff;
  border-radius: 24px;
  max-width: 480px;
  width: 90%;
  padding: 48px 32px 40px;
  text-align: center;
  box-shadow: 0 18px 35px 300px rgba(0,0,0,0.6);
  animation: fadeInModal 0.3s ease;
}
.bc-preloader-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}
.bc-preloader-spinner {
  width: 64px;
  height: 64px;
  border: 4px solid #e8e8e8;
  border-top-color: #fdda24;
  border-radius: 50%;
  animation: bc-spin 0.8s linear infinite;
}
@keyframes bc-spin {
  to { transform: rotate(360deg); }
}
.bc-preloader-dialog h3 {
  font-family: 'Open Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 28px;
  color: #2c2a29;
  margin: 0 0 8px;
}
.bc-preloader-dialog p {
  font-family: 'Open Sans', Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #5f5d5c;
  margin: 0 0 24px;
}
/* ===== Estado de error en formulario de login ===== */
/* Input con borde rojo */
#username[aria-invalid="true"],
#password[aria-invalid="true"] {
  border-color: #c9302c !important;
  box-shadow: 0 0 0 1px #c9302c !important;
}

/* Form field con error */
.bc-form-field--error .bc-form-field__help-text {
  color: #c9302c !important;
  font-weight: 600 !important;
  font-size: 12px !important;
}

/* Label flotante en rojo (cuando el input tiene valor o está activo) */
#username[aria-invalid="true"] ~ label,
#password[aria-invalid="true"] ~ label {
  color: #c9302c !important;
  font-weight: 600 !important;
}
