.nes-monitoramento {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.nes-monitoramento-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.nes-monitoramento-header h2 {
  color: #073b4c;
  margin: 0 0 6px;
}

.nes-monitoramento-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.nes-tab {
  border: 1px solid #b8d8d8;
  background: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.nes-tab.ativa {
  background: #064e5f;
  color: #fff;
}

.nes-monitoramento-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.nes-card {
  background: #fff;
  border: 1px solid #d8ecec;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 22px rgba(6, 78, 95, 0.06);
}

.nes-card h3 {
  margin: 0 0 10px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #64748b;
  font-weight: 600;
}

.nes-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.btn-primario {
  background: #06263f;
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}

.btn-primario:hover { background: #073b4c; }

.btn-secundario {
  background: #fff;
  color: #073b4c;
  border: 1px solid #b8d8d8;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}

.btn-secundario:hover { background: #f0f9f9; }

.nes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.nes-table th,
.nes-table td {
  border: 1px solid #d8ecec;
  padding: 10px;
  text-align: left;
}

.nes-table th {
  background: #edf7f7;
  color: #073b4c;
}

.nes-table tr:hover td { background: #f8fdfd; }

/* ── Modal ── */
.nes-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 25, 35, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nes-modal-grande {
  width: min(1100px, 96vw);
  max-height: 92vh;
  background: #fff;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nes-modal-header,
.nes-modal-footer {
  padding: 16px 20px;
  border-bottom: 1px solid #d8ecec;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nes-modal-header h3 { margin: 0; font-size: 1rem; color: #073b4c; }

.nes-modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #94a3b8;
  line-height: 1;
}

.nes-modal-close:hover { color: #073b4c; }

.nes-modal-footer {
  border-top: 1px solid #d8ecec;
  border-bottom: 0;
  gap: 8px;
}

.nes-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* ── Formulário ── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.grid-full { grid-column: 1 / -1; }

.grid-2 label,
.grid-3 label,
.nes-modal-body > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: #073b4c;
  font-size: 0.875rem;
}

.nes-modal-body input,
.nes-modal-body select,
.nes-modal-body textarea {
  border: 1px solid #c9dddd;
  border-radius: 8px;
  padding: 10px;
  font-size: 0.875rem;
  width: 100%;
  box-sizing: border-box;
}

.nes-modal-body input:focus,
.nes-modal-body select:focus,
.nes-modal-body textarea:focus {
  outline: none;
  border-color: #064e5f;
  box-shadow: 0 0 0 2px rgba(6,78,95,.12);
}

/* ── Seção de formulário ── */
.nes-form-secao {
  background: #f8fdfd;
  border: 1px solid #d8ecec;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.nes-form-secao-titulo {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #64748b;
  margin-bottom: 12px;
}

.nes-check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
}

.nes-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  color: #073b4c;
  cursor: pointer;
}

/* ── Tags e badges ── */
.tag-alerta {
  display: inline-block;
  background: #ffe5e5;
  color: #9b1c1c;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
}

.tag-ok {
  display: inline-block;
  background: #e7f8ef;
  color: #0b7a46;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
}

.tag-pendente {
  display: inline-block;
  background: #fff7df;
  color: #7c5200;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
}

/* ── Alerta clínico ── */
.alerta-amarelo {
  background: #fff7df;
  border-left: 4px solid #e0a100;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.875rem;
}

.alerta-amarelo ul { margin: 6px 0 0; padding-left: 18px; }

/* ── Histórico ── */
.nes-historico-box {
  background: #fff;
  border: 1px solid #d8ecec;
  border-radius: 16px;
  overflow: hidden;
}

.nes-historico-titulo {
  padding: 14px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #073b4c;
  border-bottom: 1px solid #d8ecec;
  background: #edf7f7;
}

/* ── Aba placeholder ── */
.nes-aba-vazia {
  text-align: center;
  padding: 60px 24px;
  color: #94a3b8;
}

.nes-aba-vazia-icon { font-size: 3rem; margin-bottom: 14px; }
.nes-aba-vazia h3   { color: #64748b; font-size: 1.1rem; margin: 0 0 8px; }
.nes-aba-vazia p    { margin: 0; font-size: 0.9rem; }

/* ── Responsivo ── */
@media (max-width: 900px) {
  .nes-monitoramento-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .nes-monitoramento { padding: 16px; }
  .nes-monitoramento-grid { grid-template-columns: 1fr; }
}
