/* ==========================================================================
   RUKIA F10 — header-footer.css
   --------------------------------------------------------------------------
   F10.4.3-C — camada de cabeçalho, rodapé e status da API.

   Responsabilidade:
   - Header
   - Footer
   - Profile chip
   - API status/dot

   NÃO contém:
   - Layout estrutural do app
   - Toolbar/filtros
   - Cliente Público/cards
   - Grid/KPIs/modal/importação
   ========================================================================== */

/* Footer */

.app-footer {
  display: flex;
  flex: 0 0 var(--footer-height);
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-height: var(--footer-height);
  padding: 7px 14px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.58);
  border-top: 1px solid var(--border-subtle);
}

.footer-meta,
.footer-status {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.footer-meta {
  flex: 1 1 auto;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.footer-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-status {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.api-status-footer {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: 0.04em;
  box-shadow: none;
}

html[data-theme="dark"] .app-footer {
  background: rgba(3, 7, 18, 0.72);
}

/* Header */

.app-header {
  position: relative;
  z-index: 40;
  display: flex;
  min-height: var(--header-height);
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.80);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(18px);
}

html[data-theme="dark"] .app-header {
  background: rgba(3, 7, 18, 0.82);
}

.header-main {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: center;
}

.header-copy {
  min-width: 0;
}

.page-title {
  margin: 0;
  overflow: hidden;
  color: var(--text-strong);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.18;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-subtitle {
  margin: 1px 0 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.header-actions .select {
  width: min(320px, 28vw);
  min-width: 220px;
}

.header-actions .btn {
  flex: 0 0 auto;
}

.api-status {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  box-shadow: var(--shadow-xs);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--neutral);
  border-radius: 999px;
  box-shadow: 0 0 0 4px var(--neutral-soft);
}

.api-status.is-online .status-dot {
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-soft);
}

.api-status.is-offline .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px var(--danger-soft);
}

.api-status.is-checking .status-dot {
  background: var(--warning);
  box-shadow: 0 0 0 4px var(--warning-soft);
}
