/* === TELA DE LOGIN: fundo cinza + gif de loading centralizado === */
html.is-login, html.is-login body {
  margin: 0;
  min-height: 100vh;
  background: #e4e4e4 !important;
  background-image: none !important;
}
/* Esconde tudo do React */
html.is-login #root,
html.is-login #root * {
  display: none !important;
}
/* Esconde spinner CSS antigo */
html.is-login #custom-spinner { display: none !important; }
/* Mostra o gif via pseudo-elemento no wrap */
html.is-login #custom-spinner-wrap {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  width: 30px !important;
  height: 30px !important;
  transform: translate(-50%, -50%) !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  display: block !important;
  background: url('/loading.gif') center/contain no-repeat !important;
}

/* === ADMIN: intocado === */
html.is-admin body { padding-top: 52px !important; }
html.is-admin #config-link-card {
  position: fixed; top: 0; left: 0; right: 0;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 9px 16px; z-index: 999999;
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-family: system-ui, sans-serif; font-size: 13px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
html.is-admin #config-link-card .cfg-label { white-space: nowrap; font-weight: 500; color: #d4d4d4; }
html.is-admin #config-link-card input {
  flex: 1; max-width: 560px; padding: 7px 12px;
  background: #161616; border: 1px solid #2a2a2a; border-radius: 6px;
  color: #fff; font-size: 13px; outline: none;
}
html.is-admin #config-link-card input:focus { border-color: #22c55e; }
html.is-admin #config-link-card button {
  padding: 7px 14px; border: none; border-radius: 6px;
  cursor: pointer; font-size: 13px; font-weight: 600;
}
html.is-admin #config-link-card #config-link-save { background: #22c55e; color: #000; }
html.is-admin #config-link-card #config-link-clear { background: #1a1a1a; color: #fff; border: 1px solid #333; }
html.is-admin #config-link-card #config-link-status { color: #22c55e; font-size: 12px; font-weight: 500; }
html.is-admin #custom-spinner-wrap, html.is-admin #custom-spinner { display: none !important; }
html:not(.is-admin) #config-link-card { display: none !important; }

/* === ERRO 500: preto === */
html.is-error, html.is-error body {
  background: #000 !important;
  background-image: none !important;
}
html.is-error #root { background: #000 !important; }
html.is-error #root, html.is-error #root * {
  background-color: transparent !important;
  text-shadow: none !important;
}
html.is-error #root *:not(img) { color: #fff !important; }
html.is-error #custom-spinner-wrap, html.is-error #custom-spinner { display: none !important; }
