/* ============================================================================
 * Central de Comunicações Operacionais — LAYOUT GERAL
 * Estrutura: banner fixo, cabeçalho, faixa de indicadores, menu lateral,
 * área principal (views), painel de detalhes e rodapé.
 * ========================================================================== */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--text-main);
  background: var(--background-main);
  overflow: hidden;
}

button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.app {
  display: grid;
  grid-template-rows: var(--banner-h) var(--header-h) var(--kpi-h) 1fr var(--footer-h);
  height: 100vh;
}

/* Aviso permanente de dados fictícios */
.demo-banner {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary-dark);
  color: #cfe3f2;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap; overflow: hidden;
}
.demo-banner svg { width: 12px; height: 12px; flex: none; }

/* Corpo: menu lateral + conteúdo + painel de detalhes */
.body {
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  min-height: 0;
}

.content {
  position: relative;
  min-width: 0; min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Views (módulos) — apenas uma visível por vez */
.view { display: none; flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px; }
.view.active { display: block; }
.view.view-flush { padding: 0; overflow: hidden; }
.view.active.view-flush { display: flex; }

/* Grades utilitárias das telas internas */
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.page-title {
  display: flex; align-items: center; gap: 9px;
  margin: 2px 0 12px;
  font-size: 16px; font-weight: 700; color: var(--primary-dark);
}
.page-title svg { width: 18px; height: 18px; }
.page-title .sub { font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-left: 4px; }

/* Rodapé de status */
.footer {
  display: flex; align-items: center; gap: 14px;
  padding: 0 14px;
  background: var(--background-panel);
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden;
}
.footer b { color: var(--text-main); font-weight: 600; }
.footer .spacer { flex: 1; }
.footer .f-item { display: flex; align-items: center; gap: 6px; }
.footer .swatch { width: 8px; height: 8px; border-radius: 50%; }

/* Marca d'água da visão de demonstração */
body.view-demo .content::after {
  content: "DEMONSTRAÇÃO — DADOS FICTÍCIOS";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 46px; font-weight: 700; letter-spacing: 0.2em;
  color: rgba(23, 50, 77, 0.05);
  transform: rotate(-18deg);
  pointer-events: none;
  z-index: 500;
  white-space: nowrap;
}
