/* NES Exames por Medicamento — v1.0 — 2026-06-27 */

/* ── Layout ───────────────────────────────────────────────── */
.ex-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0 48px;
}

/* ── Filtros ──────────────────────────────────────────────── */
.ex-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
}

.ex-filtro-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.ex-filtro-btn:hover,
.ex-filtro-btn.active {
  background: #0f4c66;
  color: #fff;
  border-color: #0f4c66;
}

.ex-filtro-btn.verde.active  { background: #16a34a; border-color: #16a34a; }
.ex-filtro-btn.amarelo.active{ background: #d97706; border-color: #d97706; }
.ex-filtro-btn.vermelho.active{ background: #dc2626; border-color: #dc2626; }

/* ── Grupo por medicamento ────────────────────────────────── */
.ex-med-grupo {
  margin-bottom: 20px;
}

.ex-med-header {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px 10px 0 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.ex-med-header:hover { background: #e2e8f0; }

.ex-med-nome {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f4c66;
  flex: 1;
}

.ex-med-contagem {
  font-size: 0.75rem;
  color: #64748b;
  background: #fff;
  border-radius: 999px;
  padding: 2px 10px;
  border: 1px solid #e2e8f0;
}

.ex-med-toggle { font-size: 0.8rem; color: #94a3b8; }

.ex-med-body {
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}

/* ── Card de parâmetro ────────────────────────────────────── */
.ex-param-card {
  border-bottom: 1px solid #f1f5f9;
  padding: 12px 14px;
  transition: background 0.1s;
}

.ex-param-card:last-child { border-bottom: none; }
.ex-param-card:hover { background: #fafafa; }

.ex-param-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.ex-risco-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.ex-risco-dot.verde    { background: #22c55e; }
.ex-risco-dot.amarelo  { background: #f59e0b; }
.ex-risco-dot.vermelho { background: #ef4444; }

.ex-param-nome {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  flex: 1;
}

.ex-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.70rem;
  font-weight: 700;
  white-space: nowrap;
}

.ex-badge-tipo-clinico     { background: #dbeafe; color: #1e40af; }
.ex-badge-tipo-laboratorial{ background: #f3e8ff; color: #6b21a8; }
.ex-badge-tipo-exame       { background: #fce7f3; color: #9d174d; }
.ex-badge-tipo-imagem      { background: #fef3c7; color: #92400e; }

.ex-badge-status-pendente  { background: #fef9c3; color: #854d0e; }
.ex-badge-status-realizado { background: #dcfce7; color: #166534; }

.ex-param-meta {
  font-size: 0.78rem;
  color: #475569;
  margin-bottom: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ex-param-meta span strong { color: #0f4c66; }

.ex-justificativa {
  font-size: 0.76rem;
  color: #64748b;
  font-style: italic;
  margin-bottom: 8px;
  line-height: 1.4;
}

/* ── Resultado ────────────────────────────────────────────── */
.ex-resultado-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

.ex-resultado-row input[type="text"],
.ex-resultado-row input[type="date"] {
  flex: 1;
  min-width: 120px;
  padding: 5px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.80rem;
  font-family: inherit;
  background: #f9fafb;
  color: #111;
}

.ex-resultado-row input:focus {
  outline: none;
  border-color: #0f4c66;
  background: #fff;
}

/* ── Risco labels ─────────────────────────────────────────── */
.ex-risco-label {
  display: inline-block;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.70rem;
  font-weight: 700;
}

.ex-risco-verde    { background: #dcfce7; color: #166534; }
.ex-risco-amarelo  { background: #fef9c3; color: #854d0e; }
.ex-risco-vermelho { background: #fee2e2; color: #991b1b; }

/* ── Seção title ──────────────────────────────────────────── */
.ex-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f4c66;
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Stats bar ────────────────────────────────────────────── */
.ex-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.ex-stat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 16px;
  text-align: center;
  min-width: 90px;
}

.ex-stat-val { font-size: 1.4rem; font-weight: 800; color: #0f4c66; display: block; }
.ex-stat-lbl { font-size: 0.70rem; color: #64748b; }

/* ── Aviso ────────────────────────────────────────────────── */
.ex-aviso {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.82rem;
  color: #1e40af;
  margin-bottom: 14px;
  line-height: 1.5;
}

.ex-aviso-amarelo {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #78350f;
}

/* ── Empty ────────────────────────────────────────────────── */
.ex-empty {
  text-align: center;
  padding: 32px 16px;
  color: #64748b;
  font-size: 0.88rem;
}

.ex-empty-icon { font-size: 2.5rem; display: block; margin-bottom: 8px; }

/* ── Disclaimer ───────────────────────────────────────────── */
.ex-disclaimer {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 20px;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
  line-height: 1.5;
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .ex-stats-row { flex-direction: column; }
  .ex-resultado-row { flex-direction: column; }
  .ex-resultado-row input { min-width: 0; width: 100%; }
  .ex-param-meta { flex-direction: column; gap: 4px; }
}
