/*
 * Evolução de Pacientes — style.css
 * Organizado em seções numeradas. Renomeações:
 *   .grid          → .card-grid
 *   .dispneia-*    → .chip-modal-* (padrão reutilizável para dor/dispneia)
 *   .dispneia-chip → .chip
 *   .epi-*         → .counter-*
 */

/* ═══════════════════════════════════════════
   0. ABAS DE NAVEGAÇÃO
   ═══════════════════════════════════════════ */
.tab-bar {
  display: flex;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  position: relative;
  align-items: center;
}

.tab-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -60%);
  max-height: 40px;
  pointer-events: none;
}

.tab {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
  color: #b0b0b5;
  transition: color 0.2s;
}

.tab.active {
  color: #1d1d1f;
  border-bottom-color: #1d1d1f;
}

.tab:hover:not(.active) {
  color: #666;
}

.tab-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  padding-right: 2px;
}

.tab-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  color: #b0b0b5;
  transition: color 0.2s, background 0.2s;
  padding: 0;
}

.tab-icon-btn svg {
  width: 17px;
  height: 17px;
}

.tab-icon-btn:hover {
  color: #1d1d1f;
  background: rgba(0, 0, 0, 0.05);
}

.page.hidden {
  display: none;
}

/* ═══════════════════════════════════════════
   1. BASE
   ═══════════════════════════════════════════ */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
  background-attachment: fixed;
  color: #1d1d1f;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}


/* ═══════════════════════════════════════════
   2. GRADE E CARTÕES
   ═══════════════════════════════════════════ */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  padding: 14px;
  flex: 1 1 calc(25% - 10px);
  box-sizing: border-box;
  cursor: pointer;
  min-width: 220px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  display: flex;
  flex-direction: column;
}

.card-status-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid white;
  pointer-events: none;
  z-index: 10;
}

.card:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.card-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1d1d1f;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  /* fina linha divisória */
}

.card-value {
  font-size: 0.85rem;
  color: #86868b;
  margin-top: auto;
}

/* Cards Organizacionais (Suavemente mais escuros) */
.card[data-modal="modal-status"],
.card[data-modal="modal-problemas"],
.card[data-modal="modal-pendencias"],
.card[data-modal="modal-conduta"] {
  background: rgba(220, 222, 225, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(0, 0, 0, 0.08);
}

.card[data-modal="modal-status"]:hover,
.card[data-modal="modal-problemas"]:hover,
.card[data-modal="modal-pendencias"]:hover,
.card[data-modal="modal-conduta"]:hover {
  background: rgba(210, 212, 218, 0.85);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.card[data-modal="modal-status"] .card-title,
.card[data-modal="modal-problemas"] .card-title,
.card[data-modal="modal-pendencias"] .card-title,
.card[data-modal="modal-conduta"] .card-title {
  color: #1d1d1f;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.card[data-modal="modal-status"] .card-value,
.card[data-modal="modal-problemas"] .card-value,
.card[data-modal="modal-pendencias"] .card-value,
.card[data-modal="modal-conduta"] .card-value {
  color: #86868b;
}

/* ═══════════════════════════════════════════
   3. QUICK-SELECT
   ═══════════════════════════════════════════ */
.quick-select {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 50;
  padding: 6px;
  width: 100%;
  box-sizing: border-box;
}

.quick-select.hidden {
  display: none;
}

.card:has(.quick-select:not(.hidden)) {
  z-index: 100;
}

.qs-btn {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #1d1d1f;
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
  border-radius: 8px;
  -webkit-appearance: none;
  appearance: none;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.qs-btn:first-child {
  margin-bottom: 6px;
}

.qs-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════
   4. RELATO EXTRA E TEXTAREA GERAL
   ═══════════════════════════════════════════ */
.relato-extra-wrapper {
  margin: 10px 0;
}

#relato-extra-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  font-family: inherit;
  font-size: 0.95rem;
  color: #1d1d1f;
  resize: vertical;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#relato-extra-input:hover {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

#relato-extra-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 113, 227, 0.3);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

/* ═══════════════════════════════════════════
   5. ÁREA DE SAÍDA (TEXTO FINAL)
   ═══════════════════════════════════════════ */
.output-area {
  margin-top: 20px;
}

#evolution-text {
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  font-family: inherit;
  font-size: 0.95rem;
  color: #1d1d1f;
  resize: vertical;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#evolution-text:hover {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

#evolution-text:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 113, 227, 0.3);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.btn-copy {
  margin-top: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  background-color: #0071e3;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.3);
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-copy:hover {
  background-color: #005bb5;
  box-shadow: 0 6px 20px rgba(0, 113, 227, 0.4);
  transform: translateY(-1px);
}

.btn-reset-all {
  margin-top: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  background-color: #6c757d;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-reset-all:hover {
  background-color: #5a6268;
}

/* ═══════════════════════════════════════════
   5b. BARRA DE AÇÕES (output-area)
   ═══════════════════════════════════════════ */
.output-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.output-actions-left {
  display: flex;
  gap: 10px;
}

.output-actions .btn-copy,
.output-actions .btn-reset-all {
  margin-top: 0;
}

.output-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leito-select {
  padding: 10px 32px 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.95rem;
  font-family: inherit;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg"><polygon points="0,0 10,0 5,5"/></svg>');
  background-repeat: no-repeat;
  background-position: right 14px center;
  color: #1d1d1f;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-sizing: border-box;
}

.leito-select:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 113, 227, 0.3);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.btn-ver-evolucoes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  background-color: #0071e3;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.3);
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-ver-evolucoes:hover:not(:disabled) {
  background-color: #005bb5;
  box-shadow: 0 6px 20px rgba(0, 113, 227, 0.4);
  transform: translateY(-1px);
}

.btn-ver-evolucoes:disabled {
  background-color: #b0b0b5;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Botão UTI */
.btn-uti {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #bdbdbd;
  background: #f5f5f5;
  color: #9e9e9e;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  flex-shrink: 0;
  padding: 0;
  letter-spacing: 0;
}
.btn-uti:hover {
  transform: scale(1.1);
}
.btn-uti.active {
  border-color: #e53935;
  background: #ffebee;
  color: #b71c1c;
}

/* Botão Salvar (página principal) */
.btn-salvar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  background-color: #0071e3;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.3);
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.btn-salvar:hover:not(:disabled) {
  background-color: #005bb5;
  box-shadow: 0 6px 20px rgba(0, 113, 227, 0.4);
  transform: translateY(-1px);
}
.btn-salvar:disabled {
  background-color: #b0b0b5;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Temperatura desabilitada (antes de marcar Aferido = Sim) */
#febre-temp-block.temp-block-disabled {
  cursor: not-allowed;
}
#febre-temp-block.temp-block-disabled .counter-btn,
#febre-temp-block.temp-block-disabled .counter-input {
  pointer-events: none;
}

/* Módulo em construção */
.wip-content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: #86868b;
  font-size: 1rem;
  font-weight: 500;
}

/* ═══════════════════════════════════════════
   6. MODAL BASE
   ═══════════════════════════════════════════ */

/* Animações de entrada */
@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes boxPopIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}
@keyframes contentFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 10px;
  box-sizing: border-box;
  /* Animação backdrop — só background-color e visibility */
  visibility: visible;
  transition: background-color 0.22s ease, visibility 0.22s ease;
}

.modal.hidden {
  background-color: rgba(0, 0, 0, 0);
  visibility: hidden;
  pointer-events: none;
}

.modal-content {
  position: relative;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 550px;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
  /* Animação conteúdo — opacity + transform independentes */
  opacity: 1;
  transform: scale(1) translateY(0);
  transition: transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.22s ease;
}

.modal.hidden .modal-content {
  opacity: 0;
  transform: scale(0.95) translateY(10px);
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.3rem;
  font-weight: 600;
  color: #1d1d1f;
  padding-right: 36px;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  color: #1d1d1f;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: rgba(0, 0, 0, 0.14);
}

/* ═══════════════════════════════════════════
   CONFIRM DIALOG CUSTOMIZADO
   ═══════════════════════════════════════════ */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: overlayFadeIn 0.2s ease both;
}

.confirm-box {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  padding: 24px;
  max-width: 340px;
  width: 90%;
  animation: boxPopIn 0.28s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

.confirm-message {
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: #1d1d1f;
  line-height: 1.5;
}

.confirm-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Checkmark — Sim */
.confirm-buttons .btn-save::before {
  display: inline-block;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* X — Não */
.confirm-buttons .btn-cancel::before {
  display: inline-block;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
}

.confirm-buttons button {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ═══════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 12px 22px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #1d1d1f;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 4000;
  white-space: nowrap;
  pointer-events: none;
}

.toast.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════
   7. BOTÕES DE MODAL
   ═══════════════════════════════════════════ */
.modal-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.modal-btn-left {
  display: flex;
  gap: 8px;
  align-items: center;
}

.modal-btn-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Indicador de volume urinário (Anúria / Oligúria / Poliúria / normal) */
.diurese-vol-indicator {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid currentColor;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.diurese-vol-indicator:empty { display: none; }
.diurese-vol-anuria   { color: #c62828; background: #ffebee; }
.diurese-vol-oliguria { color: #e65100; background: #fff3e0; }
.diurese-vol-poliuria { color: #1565c0; background: #e3f2fd; }
.diurese-vol-normal   { color: #2e7d32; background: #e8f5e9; }

.febre-temp-indicator {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid currentColor;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  margin-bottom: 4px;
}
.febre-temp-indicator:empty          { display: none; }
.febre-temp-sensacao-febril { color: #f57f17; background: #fffde7; }
.febre-temp-subfebril       { color: #e65100; background: #fff3e0; }
.febre-temp-febre           { color: #bf360c; background: #fbe9e7; }
.febre-temp-febre-alta      { color: #b71c1c; background: #ffebee; }

/* Botão de prioridade */
.btn-priority {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #bdbdbd;
  background: #f5f5f5;
  color: #9e9e9e;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  flex-shrink: 0;
  letter-spacing: -1px;
  padding: 0;
}

.btn-priority:hover {
  transform: scale(1.1);
}

.btn-priority[data-level="2"] {
  border-color: #ff9800;
  background: #fff3e0;
  color: #e65100;
}

.btn-priority[data-level="3"] {
  border-color: #e53935;
  background: #ffebee;
  color: #b71c1c;
}

/* Botão de perspectiva (estetoscópio) */
.btn-perspectiva {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #bdbdbd;
  background: #f5f5f5;
  color: #9e9e9e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  flex-shrink: 0;
  padding: 0;
  position: relative;
  overflow: visible;
}

.btn-perspectiva:hover {
  transform: scale(1.1);
}

.btn-perspectiva[data-phase="1"] {
  border-color: #1976d2;
  background: #e3f2fd;
  color: #0d47a1;
}

.btn-perspectiva[data-phase="2"] {
  border-color: #7b1fa2;
  background: #f3e5f5;
  color: #4a148c;
}

.clock-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 15px;
  height: 15px;
  pointer-events: none;
  filter: drop-shadow(0 0 1px white);
}

.modal-buttons button:not(.btn-priority):not(.btn-perspectiva) {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-cancel {
  background: rgba(0, 0, 0, 0.05);
  color: #1d1d1f;
  font-weight: 500;
}

.btn-cancel:hover {
  background: rgba(0, 0, 0, 0.1);
}

.btn-save {
  background-color: #0071e3;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.3);
}

.btn-save:hover {
  background-color: #005bb5;
  box-shadow: 0 6px 20px rgba(0, 113, 227, 0.4);
  transform: translateY(-1px);
}

.btn-reset-topic {
  background-color: #6c757d;
  color: #fff;
}

.btn-reset-topic:hover {
  background-color: #5a6268;
}

/* ═══════════════════════════════════════════
   ÍCONES NOS BOTÕES
   ═══════════════════════════════════════════ */
.btn-save,
.btn-salvar,
.btn-cancel,
.btn-copy,
.btn-reset-all,
.btn-reset-topic {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-save::before,
.btn-salvar::before,
.btn-cancel::before,
.btn-copy::before,
.btn-reset-all::before,
.btn-reset-topic::before,
#btn-add-problema::before,
#btn-add-pendencia::before,
#btn-add-conduta::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* Disquete — Salvar */
.btn-save::before,
.btn-salvar::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z'/%3E%3Cpolyline points='17 21 17 13 7 13 7 21'/%3E%3Cpolyline points='7 3 7 8 15 8'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z'/%3E%3Cpolyline points='17 21 17 13 7 13 7 21'/%3E%3Cpolyline points='7 3 7 8 15 8'/%3E%3C/svg%3E");
}

/* Plus — Adicionar (sobrescreve o checkmark pelo ID) */
#btn-add-problema::before,
#btn-add-pendencia::before,
#btn-add-conduta::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E");
}

/* Proibido — Cancelar */
.btn-cancel::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='4.93' y1='4.93' x2='19.07' y2='19.07'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='4.93' y1='4.93' x2='19.07' y2='19.07'/%3E%3C/svg%3E");
}

/* Clipboard — Copiar texto */
.btn-copy::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E");
}

/* Refresh — Reiniciar (página principal e modais) */
.btn-reset-all::before,
.btn-reset-topic::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 4 1 10 7 10'/%3E%3Cpath d='M3.51 15a9 9 0 1 0 .49-4.95'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 4 1 10 7 10'/%3E%3Cpath d='M3.51 15a9 9 0 1 0 .49-4.95'/%3E%3C/svg%3E");
}

/* ═══════════════════════════════════════════
   8. CAMPOS DENTRO DOS MODAIS (options)
   ═══════════════════════════════════════════ */
.options {
  margin-bottom: 15px;
}

.options label {
  margin-right: 10px;
  font-weight: 500;
  color: #1d1d1f;
}

.options input[type="text"],
.options select,
.options textarea {
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  font-size: 0.95rem;
  color: #1d1d1f;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-sizing: border-box;
}

.options input[type="text"]:focus,
.options select:focus,
.options textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 113, 227, 0.3);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.options select {
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg"><path d="M0,0 L10,0 L5,5 Z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 32px;
}

.inline-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.inline-options .label {
  font-weight: bold;
  margin-right: 5px;
  color: #1d1d1f;
}

.inline-options label:not(.label) {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1d1d1f;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.inline-options label:not(.label):hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.inline-options label:not(.label):has(input:checked) {
  background: rgba(0, 113, 227, 0.1);
  color: #0071e3;
  border-color: rgba(0, 113, 227, 0.3);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.15);
}

.inline-options input[type="checkbox"],
.inline-options input[type="radio"] {
  display: none;
}

/* ═══════════════════════════════════════════
   9. LAYOUT CHIP-MODAL (reutilizável: Dor e Dispneia)
   ═══════════════════════════════════════════ */

/* Modal mais largo para acomodar duas colunas */
.chip-modal {
  max-width: 750px;
}

/* Container flexível das duas colunas */
.chip-modal-container {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* Coluna esquerda: select + chip list */
.chip-modal-left {
  flex: 1 1 40%;
  display: flex;
  flex-direction: column;
}

/* Select customizado */
.chip-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.95rem;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg"><polygon points="0,0 10,0 5,5"/></svg>');
  background-repeat: no-repeat;
  background-position: right 14px center;
  color: #1d1d1f;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-sizing: border-box;
}

.chip-select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 113, 227, 0.3);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

/* Divisória vertical */
.chip-modal-divider {
  width: 1px;
  background-color: rgba(0, 0, 0, 0.08);
  margin: 0 5px;
}

/* Coluna direita: painel de caracterização */
.chip-modal-right {
  flex: 1 1 60%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
  min-width: 0;
}

/* Animação em cascata dos elementos do painel de detalhes */
.chip-modal-right > * {
  animation: contentFadeIn 0.2s ease both;
}
/* Animação para filhos de divs wrapper (ex: Aceitação da dieta) */
.chip-modal-right > div.section-wrapper > * {
  animation: contentFadeIn 0.2s ease both;
}
.chip-modal-right > div.section-wrapper > *:nth-child(2)  { animation-delay: 0.03s; }
.chip-modal-right > div.section-wrapper > *:nth-child(3)  { animation-delay: 0.06s; }
.chip-modal-right > div.section-wrapper > *:nth-child(4)  { animation-delay: 0.09s; }
.chip-modal-right > div.section-wrapper > *:nth-child(5)  { animation-delay: 0.12s; }
.chip-modal-right > div.section-wrapper > *:nth-child(6)  { animation-delay: 0.15s; }
.chip-modal-right > div.section-wrapper > *:nth-child(7)  { animation-delay: 0.18s; }
.chip-modal-right > div.section-wrapper > *:nth-child(8)  { animation-delay: 0.21s; }
.chip-modal-right > div.section-wrapper > *:nth-child(9)  { animation-delay: 0.24s; }
.chip-modal-right > div.section-wrapper > *:nth-child(10) { animation-delay: 0.27s; }
.chip-modal-right > div.section-wrapper > *:nth-child(11) { animation-delay: 0.30s; }
.chip-modal-right > div.section-wrapper > *:nth-child(12) { animation-delay: 0.33s; }
.chip-modal-right > div.section-wrapper > *:nth-child(13) { animation-delay: 0.36s; }
.chip-modal-right > div.section-wrapper { animation: none; }
.chip-modal-right > *:nth-child(2)  { animation-delay: 0.03s; }
.chip-modal-right > *:nth-child(3)  { animation-delay: 0.06s; }
.chip-modal-right > *:nth-child(4)  { animation-delay: 0.09s; }
.chip-modal-right > *:nth-child(5)  { animation-delay: 0.12s; }
.chip-modal-right > *:nth-child(6)  { animation-delay: 0.15s; }
.chip-modal-right > *:nth-child(7)  { animation-delay: 0.18s; }
.chip-modal-right > *:nth-child(8)  { animation-delay: 0.21s; }
.chip-modal-right > *:nth-child(9)  { animation-delay: 0.24s; }
.chip-modal-right > *:nth-child(10) { animation-delay: 0.27s; }
.chip-modal-right > *:nth-child(11) { animation-delay: 0.30s; }
.chip-modal-right > *:nth-child(12) { animation-delay: 0.33s; }
.chip-modal-right > *:nth-child(13) { animation-delay: 0.36s; }
.chip-modal-right > *:nth-child(14) { animation-delay: 0.39s; }
.chip-modal-right > *:nth-child(15) { animation-delay: 0.42s; }
.chip-modal-right > *:nth-child(16) { animation-delay: 0.45s; }
.chip-modal-right > *:nth-child(17) { animation-delay: 0.48s; }
.chip-modal-right > *:nth-child(18) { animation-delay: 0.51s; }
.chip-modal-right > *:nth-child(19) { animation-delay: 0.54s; }
.chip-modal-right > *:nth-child(20) { animation-delay: 0.57s; }
.chip-modal-right > *:nth-child(21) { animation-delay: 0.60s; }
.chip-modal-right > *:nth-child(22) { animation-delay: 0.63s; }
.chip-modal-right > *:nth-child(23) { animation-delay: 0.66s; }
.chip-modal-right > *:nth-child(24) { animation-delay: 0.69s; }
.chip-modal-right > *:nth-child(25) { animation-delay: 0.72s; }

/* ═══════════════════════════════════════════
   10. CHIP LIST
   ═══════════════════════════════════════════ */
.chip-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ─── Drag handle ─── */
.chip-drag-handle {
  display: inline-flex;
  align-items: center;
  margin-right: 5px;
  color: rgba(0, 0, 0, 0.25);
  font-size: 1.05em;
  line-height: 1;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: color 0.15s;
}
.chip-drag-handle:active { cursor: grabbing; }
.chip:hover .chip-drag-handle { color: rgba(0, 0, 0, 0.45); }
.chip.active .chip-drag-handle { color: rgba(0, 113, 227, 0.45); }

/* Dragging source */
.chip.dragging {
  opacity: 0.38;
  transform: none !important;
}

/* Drop position indicators */
.chip.drag-over-top::before,
.chip.drag-over-bottom::after {
  content: '';
  position: absolute;
  left: 4px; right: 4px;
  height: 2px;
  background: #0071e3;
  border-radius: 2px;
}
.chip.drag-over-top::before  { top: -4px; }
.chip.drag-over-bottom::after { bottom: -4px; }

.chip {
  padding: 8px 32px 8px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  color: #1d1d1f;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  user-select: none;
  transition: all 0.2s;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

.chip.active {
  background: rgba(0, 113, 227, 0.1);
  border-color: rgba(0, 113, 227, 0.3);
  color: #0071e3;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.15);
}

.chip-remove {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 12px;
  font-size: 1rem;
  color: inherit;
  cursor: pointer;
  opacity: 0.6;
}

.chip-remove:hover {
  opacity: 1;
}

/* ═══════════════════════════════════════════
   11. TOGGLE GROUPS
   ═══════════════════════════════════════════ */
.toggle-group {
  display: flex;
  gap: 6px;
  margin-bottom: 1px;
  background: rgba(0, 0, 0, 0.05);
  padding: 4px;
  border-radius: 12px;
  box-sizing: border-box;
}

.toggle-option {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #1d1d1f;
  text-align: center;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  user-select: none;
  transition: all 0.2s;
}

.toggle-option:hover:not(.active) {
  background: rgba(255, 255, 255, 0.5);
}

.toggle-option.active {
  background-color: #fff;
  color: #1d1d1f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Grid 4×2 para tipo/caráter de dor */
.toggle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 1px;
}

.toggle-grid .toggle-option {
  flex: none;
}

/* ═══════════════════════════════════════════
   12. FATORES (MELHORA / PIORA)
   ═══════════════════════════════════════════ */
.factor-container {
  display: flex;
  gap: 6px;
  margin-bottom: 1px;
}

.factor-input {
  position: relative;
  flex: 1;
}

.factor-input input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px 10px 30px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  font-size: 0.95rem;
  color: #1d1d1f;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.factor-input input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 113, 227, 0.3);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.factor-input .icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: #1d1d1f;
  z-index: 1;
}

/* ═══════════════════════════════════════════
   13. CONTADOR (−/input/+/unidade)
   ═══════════════════════════════════════════ */
.counter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1px;
}

.counter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  user-select: none;
  font-size: 1.1rem;
  color: #1d1d1f;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.counter-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

.counter-input {
  width: 44px;
  height: 40px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 1rem;
  color: #1d1d1f;
  box-sizing: border-box;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.counter-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 113, 227, 0.3);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

/* Remove spinner do WebKit */
.counter-input::-webkit-inner-spin-button,
.counter-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.counter-group select {
  flex: 1;
  height: auto;
  /* Allow padding to govern height */
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.95rem;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg"><polygon points="0,0 10,0 5,5"/></svg>');
  background-repeat: no-repeat;
  background-position: right 14px center;
  color: #1d1d1f;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-sizing: border-box;
}

.counter-group select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 113, 227, 0.3);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

/* ═══════════════════════════════════════════
   14. ESCALA DE INTENSIDADE (1–10)
   ═══════════════════════════════════════════ */
.intensity-group {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.05);
  padding: 6px;
  border-radius: 12px;
}

.intensity-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  width: 100%;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #1d1d1f;
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
  font-weight: 500;
  box-sizing: border-box;
  transition: all 0.2s;
}

.intensity-circle:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.intensity-circle.active {
  background-color: #fff;
  color: #1d1d1f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transform: scale(1.1);
}

/* ═══════════════════════════════════════════
   15. LABELS DE SEÇÃO
   ═══════════════════════════════════════════ */
.field-label {
  display: block;
  font-size: 0.75rem;
  color: #555;
  margin: 2px 0 0;
}

.sinais-label {
  display: block;
  font-size: 0.75rem;
  color: #555;
  margin: 2px 0 4px;
}

/* ═══════════════════════════════════════════
   16. CAMPO DE OBSERVAÇÃO
   ═══════════════════════════════════════════ */
.obs-input {
  width: 100%;
}

.obs-input input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  font-family: inherit;
  font-size: 0.95rem;
  color: #1d1d1f;
  margin: 10px 0 0;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.obs-input input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 113, 227, 0.3);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

/* ═══════════════════════════════════════════
   17. LISTAS DE ITENS (problemas, pendências, conduta)
   ═══════════════════════════════════════════ */
.item-list ul {
  list-style: none;
  padding: 0;
  margin: 4px 0;
}

.item-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}

.remove-btn {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 4px;
}

.remove-btn:hover {
  color: #a71d2a;
}

/* ═══════════════════════════════════════════
   18. RESPONSIVIDADE
   ═══════════════════════════════════════════ */
@media (max-width: 600px) {
  .card {
    flex: 1 1 calc(50% - 10px);
  }

  .modal-content {
    max-width: 90vw;
  }

  .chip-modal-container {
    flex-direction: column;
  }

  .chip-modal-divider {
    width: 100%;
    height: 1px;
    margin: 5px 0;
  }

  .tab-logo {
    position: static;
    transform: none;
    margin-left: auto;
    max-height: 28px;
  }
}

@media (max-width: 400px) {
  .card {
    flex: 1 1 100%;
  }
}
/* ─── Outros Sintomas — lista categorizada ─── */
.outros-search {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 14px;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 10px;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.9rem;
  color: #1d1d1f;
  margin-bottom: 6px;
  outline: none;
  transition: all 0.2s;
}
.outros-search:focus {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,113,227,0.3);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.1);
}
.outros-list {
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 8px;
}
.outros-cat-header {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1d1d1f;
  padding: 8px 4px 2px;
  letter-spacing: 0.01em;
}
.outros-cat-divider {
  height: 1px;
  background: rgba(0,0,0,0.08);
  margin: 4px 0;
}
.outros-subcat-header {
  font-size: 0.75rem;
  color: #666;
  font-style: italic;
  padding: 4px 10px 1px;
}
.outros-symptom-item {
  font-size: 0.85rem;
  color: #1d1d1f;
  padding: 5px 14px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}
.outros-symptom-item:hover {
  background: rgba(0,113,227,0.07);
}
.outros-symptom-item.added {
  color: #0071e3;
  font-weight: 500;
}
