/* ===================================
   ESTILOS GLOBAIS - QORPO BRANDING
   =================================== */

:root {
  --cor-primaria: #FF0000;
  --cor-primaria-escura: #CC0000;
  --cor-primaria-clara: #FF3333;
  --cor-secundaria: #000000;
  --cor-sucesso: #27ae60;
  --cor-aviso: #f39c12;
  --cor-perigo: #e74c3c;
  --cor-info: #16a085;
  --cor-fundo: #f8f8f8;
  --cor-texto: #333333;
  --cor-texto-claro: #666666;
  --cor-borda: #e0e0e0;
  --cor-sombreado: rgba(0, 0, 0, 0.1);
  --espacamento: 1rem;
  --transicao: all 0.3s ease;
  --sombra: 0 2px 8px rgba(255, 0, 0, 0.1);
  --sombra-forte: 0 8px 16px rgba(255, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--cor-fundo);
  color: var(--cor-texto);
  line-height: 1.6;
}

/* ===================================
   LAYOUT PRINCIPAL
   =================================== */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

.header {
  background: linear-gradient(135deg, #D32F2F 0%, #B71C1C 100%);
  color: white;
  padding: 1.5rem 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  border-bottom: 3px solid #000;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.logo-icone-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: white;
  padding: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  object-fit: contain;
}

.logo-texto {
  font-size: 2.5rem;
  font-weight: 600;
  color: white;
  margin: 0;
  letter-spacing: 4px;
  font-family: 'Poppins', sans-serif;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.logo-img {
  height: 35px;
  max-width: 280px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.98;
}

/* Estilos antigos mantidos para compatibilidade */
.logo-icon {
  width: 70px;
  height: 70px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: bold;
  color: #FF0000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo-text {
  flex: 1;
}

.logo h1 {
  font-size: 2.5rem;
  margin-bottom: 0.3rem;
  letter-spacing: 1px;
  font-weight: 700;
}

.subtitulo {
  font-size: 0.95rem;
  opacity: 0.95;
  font-weight: 500;
}

/* ===================================
   NAVEGAÇÃO
   =================================== */

.nav-principal {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-nav {
  padding: 0.75rem 1.5rem;
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  border: 2px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transicao);
  font-weight: 500;
}

.btn-nav:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-nav.ativo {
  background-color: white;
  color: #FF0000;
  border-color: white;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
}

/* ===================================
   CONTEÚDO PRINCIPAL
   =================================== */

.conteudo-principal {
  padding: 0 2rem 2rem;
}

.secao {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.secao.ativa {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.secao h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--cor-primaria);
  border-bottom: 3px solid var(--cor-secundaria);
  padding-bottom: 0.5rem;
}

.secao h3 {
  font-size: 1.3rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: #333333;
}

/* ===================================
   FORMULÁRIO
   =================================== */

.formulario {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--sombra);
}

.grupo-campos {
  margin-bottom: 2rem;
}

.linha-campos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.campo {
  display: flex;
  flex-direction: column;
}

.campo label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333333;
}

.campo input,
.campo select,
.campo textarea {
  padding: 0.75rem;
  border: 2px solid var(--cor-borda);
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transicao);
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  outline: none;
  border-color: #FF0000;
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
  background-color: rgba(255, 0, 0, 0.02);
}

.campo input:disabled {
  background-color: var(--cor-fundo);
  cursor: not-allowed;
}

.campo textarea {
  resize: vertical;
  min-height: 100px;
}

/* ===================================
   IMAGENS
   =================================== */

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.imagem-campo {
  margin: 1rem 0;
  text-align: center;
}

.imagem-campo img {
  max-height: 400px;
  box-shadow: var(--sombra);
  border: 2px solid var(--cor-borda);
}

.imagem-preview {
  margin: 1rem 0;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  text-align: center;
}

.imagem-preview img {
  max-width: 100%;
  max-height: 500px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ajuda {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

/* ===================================
   ESCALA DE DOR
   =================================== */

.escala-dor {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.range-dor {
  flex: 1;
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(to right, #27ae60 0%, #f39c12 50%, #e74c3c 100%);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.range-dor::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cor-primaria);
  cursor: pointer;
  box-shadow: var(--sombra);
}

.range-dor::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cor-primaria);
  cursor: pointer;
  border: none;
  box-shadow: var(--sombra);
}

.valor-dor {
  font-weight: bold;
  font-size: 1.5rem;
  min-width: 40px;
  text-align: center;
  color: #FF0000;
}

/* ===================================
   BOTÕES
   =================================== */

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transicao);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primario {
  background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
  color: white;
}

.btn-primario:hover {
  background: linear-gradient(135deg, #CC0000 0%, #990000 100%);
  transform: translateY(-2px);
  box-shadow: var(--sombra-forte);
}

.btn-sucesso {
  background-color: var(--cor-sucesso);
  color: white;
}

.btn-sucesso:hover {
  background-color: #229954;
  transform: translateY(-2px);
  box-shadow: var(--sombra-forte);
}

.btn-secundario {
  background-color: #000000;
  color: white;
  border: 2px solid #000000;
}

.btn-secundario:hover {
  background-color: #333333;
  border-color: #333333;
  transform: translateY(-2px);
  box-shadow: var(--sombra-forte);
}

.btn-perigo {
  background-color: var(--cor-perigo);
  color: white;
}

.btn-perigo:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: var(--sombra-forte);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.botoes-formulario {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* ===================================
   BUSCA E FILTROS
   =================================== */

.busca-filtros {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.input-busca {
  flex: 1;
  min-width: 250px;
  padding: 0.75rem;
  border: 2px solid var(--cor-borda);
  border-radius: 5px;
  font-size: 1rem;
}

.input-busca:focus {
  outline: none;
  border-color: #FF0000;
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

/* Dropdown de Pacientes */
.dropdown-pacientes {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid var(--cor-primaria);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  margin-top: -2px;
}

.dropdown-pacientes-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--cor-borda);
  transition: all 0.2s ease;
}

.dropdown-pacientes-item:last-child {
  border-bottom: none;
}

.dropdown-pacientes-item:hover {
  background: rgba(255, 0, 0, 0.05);
}

.dropdown-pacientes-item-nome {
  font-weight: 600;
  color: var(--cor-texto);
  margin-bottom: 4px;
}

.dropdown-pacientes-item-info {
  font-size: 0.85rem;
  color: var(--cor-texto-claro);
}

.dropdown-pacientes-vazio {
  padding: 16px;
  text-align: center;
  color: var(--cor-texto-claro);
  font-style: italic;
}

.paciente-selecionado-badge {
  display: inline-block;
  background: #e8f5e9;
  color: #2e7d32;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  margin-top: 8px;
  font-weight: 500;
}

.paciente-selecionado-badge::before {
  content: "✓ ";
}

/* ===================================
   LISTA DE PACIENTES
   =================================== */

.lista-pacientes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.cartao-paciente {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--sombra);
  transition: var(--transicao);
  border-left: 5px solid var(--cor-secundaria);
}

.cartao-paciente:hover {
  transform: translateY(-5px);
  box-shadow: var(--sombra-forte);
}

.cartao-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.nome-paciente {
  font-size: 1.3rem;
  font-weight: bold;
  color: #333333;
}

.info-paciente {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin: 0.5rem 0;
}

.cartao-botoes {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.cartao-botoes .btn {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

/* ===================================
   RELATÓRIOS
   =================================== */

.relatorio-conteudo {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--sombra);
}

.grafico-container {
  margin: 2rem 0;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 5px solid var(--cor-secundaria);
}

.grafico-container h3 {
  margin-top: 0;
}

.grafico-wrapper {
  position: relative;
  height: 400px;
  margin: 1rem 0;
}

canvas {
  max-height: 400px;
}

.tabela-evolucao {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.tabela-evolucao th {
  background-color: var(--cor-primaria);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.tabela-evolucao td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--cor-borda);
}

.tabela-evolucao tr:nth-child(even) {
  background-color: #f8f9fa;
}

.tabela-evolucao tr:hover {
  background-color: rgba(255, 0, 0, 0.08);
}

/* ===================================
   CONFIGURAÇÕES
   =================================== */

.configuracoes-grupo {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: var(--sombra);
}

.configuracoes-grupo h3 {
  margin-top: 0;
}

/* ===================================
   MENU DE CONFIGURAÇÕES
   =================================== */

.config-menu {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 3px solid var(--cor-borda);
  flex-wrap: wrap;
}

.config-menu-btn {
  padding: 0.75rem 1.5rem;
  background-color: transparent;
  color: #333333;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transicao);
  position: relative;
  bottom: -3px;
}

.config-menu-btn:hover {
  background-color: rgba(255, 0, 0, 0.05);
  color: #FF0000;
}

.config-menu-btn.ativo {
  color: #FF0000;
  border-bottom-color: #FF0000;
  background-color: rgba(255, 0, 0, 0.08);
}

.config-conteudo {
  display: none !important;
  opacity: 0;
  transition: opacity 0.3s ease-in;
  animation: none;
  visibility: hidden;
}

.config-conteudo.ativo {
  display: block !important;
  opacity: 1;
  visibility: visible;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================
   PROFISSIONAIS
   =================================== */

.lista-profissionais {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--sombra);
}

.lista-profissionais h4 {
  color: #FF0000;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* ===================================
   INTEGRAÇÃO COM ERP
   =================================== */

.secao-erp {
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  padding: 1.5rem;
  border-radius: 8px;
  border: 2px solid #FF0000;
  margin-bottom: 2rem;
}

.secao-erp h4 {
  color: #FF0000;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-erp {
  padding: 1rem;
  background: white;
  border-radius: 6px;
  border-left: 4px solid #FF0000;
  margin-bottom: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-erp.conectado {
  border-left-color: #27ae60;
  background: #f0fdf4;
}

.status-erp.desconectado {
  border-left-color: #e74c3c;
  background: #fef2f2;
}

.status-erp.aviso {
  border-left-color: #f39c12;
  background: #fffbf0;
}

.botoes-erp {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.botoes-erp .btn {
  flex: 1;
  min-width: 180px;
}

.lista-erp {
  background: white;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid var(--cor-borda);
  max-height: 500px;
  overflow-y: auto;
  position: relative;
}

.lista-erp h5 {
  color: #FF0000;
  margin-bottom: 1rem;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  background: white;
  border-bottom: 2px solid #FF0000;
  position: sticky;
  top: -1rem;
  z-index: 10;
  margin-top: -1rem;
  margin-left: -1rem;
  margin-right: -1rem;
  padding-bottom: 1rem;
}

.profissionais-erp,
.pacientes-erp {
  display: grid;
  gap: 0.8rem;
}

.cartao-erp {
  background: #f8f8f8;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid var(--cor-borda);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transicao);
}

.cartao-erp:hover {
  box-shadow: var(--sombra);
  border-color: #FF0000;
}

.cartao-erp-info {
  flex: 1;
}

.cartao-erp-nome {
  font-weight: 600;
  color: var(--cor-texto);
  margin-bottom: 0.3rem;
}

.cartao-erp-email {
  font-size: 0.9rem;
  color: var(--cor-texto-claro);
  margin-bottom: 0.3rem;
}

.cartao-erp-dados {
  font-size: 0.85rem;
  color: #666;
}

.cartao-erp-dados span {
  margin-right: 1rem;
}

.cartao-erp-botao {
  margin-left: 1rem;
}

.cartao-erp-botao .btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Divisor visual */
.secao-cadastro-manual {
  animation: fadeIn 0.3s ease-in;
}

.secao-cadastro-manual h4 {
  color: #FF0000;
  margin-bottom: 0.5rem;
}

.secao-cadastro-manual p {
  margin-bottom: 1.5rem;
}

.msg-vazio {
  color: #666666;
  text-align: center;
  padding: 2rem;
  font-style: italic;
}

/* ===================================
   ESTILOS DE PROFISSIONAIS - COMPACTO
   =================================== */

/* Busca de profissionais */
.busca-profissionais {
  margin-bottom: 1.5rem;
}

.input-busca {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--cor-borda);
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transicao);
  font-family: 'Poppins', sans-serif;
}

.input-busca:focus {
  outline: none;
  border-color: #FF0000;
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

/* Lista compacta */
.lista-compacta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Item de profissional */
.item-profissional {
  background: white;
  border: 2px solid var(--cor-borda);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transicao);
}

.item-profissional:hover {
  border-color: #FF0000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Header do item (sempre visível) */
.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0.875rem; /* Reduzido de 0.875rem 1rem */
  cursor: pointer;
  user-select: none;
}

.item-header:hover {
  background-color: #f8f9fa;
}

.item-nome {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* Reduzido de 0.75rem */
  flex: 1;
  flex-wrap: wrap;
}

.item-nome strong {
  color: #333;
  font-size: 0.9rem; /* Reduzido de 1rem */
  font-weight: 600;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem; /* Reduzido de 0.25rem 0.75rem */
  border-radius: 20px;
  font-size: 0.7rem; /* Reduzido de 0.75rem */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-admin {
  background-color: #FF0000;
  color: white;
}

.badge-prof {
  background-color: #2ecc71;
  color: white;
}

.badge-ativo {
  background-color: #27ae60;
  color: white;
}

.badge-inativo {
  background-color: #95a5a6;
  color: white;
}

/* Profissional inativo - visual esmaecido */
.profissional-inativo {
  opacity: 0.6;
}

.profissional-inativo .item-header {
  background-color: #f8f9fa;
}

/* Botão expandir */
.btn-expandir {
  width: 28px; /* Reduzido de 32px */
  height: 28px;
  border: 2px solid var(--cor-borda);
  border-radius: 50%;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transicao);
  flex-shrink: 0;
}

.btn-expandir:hover {
  border-color: #FF0000;
  background-color: #fff5f5;
}

.btn-expandir.expandido {
  background-color: #FF0000;
  border-color: #FF0000;
}

.btn-expandir.expandido .icone-expand {
  color: white;
}

.icone-expand {
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  color: #333;
  transition: var(--transicao);
}

/* Detalhes do item (expansível) */
.item-detalhes {
  padding: 0 1rem 1rem 1rem;
  border-top: 1px solid var(--cor-borda);
  background-color: #f8f9fa;
}

.detalhes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
}

.detalhe-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detalhe-label {
  font-size: 0.75rem;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detalhe-valor {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
}

/* Ações do item */
.item-acoes {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #dee2e6;
}

.btn-deletar,
.btn-toggle-status {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-aviso {
  background-color: #f39c12;
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transicao);
}

.btn-aviso:hover {
  background-color: #e67e22;
}

.btn-sucesso {
  background-color: #27ae60;
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transicao);
}

.btn-sucesso:hover {
  background-color: #229954;
}

.btn-info {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transicao);
}

.btn-info:hover {
  background-color: #2980b9;
}

/* ===================================
   MODAL DE SENHA
   =================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 2px solid var(--cor-borda);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.25rem;
}

.btn-fechar-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transicao);
}

.btn-fechar-modal:hover {
  background-color: #f8f9fa;
  color: #333;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 2px solid var(--cor-borda);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.input-campo {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--cor-borda);
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transicao);
  font-family: 'Poppins', sans-serif;
}

.input-campo:focus {
  outline: none;
  border-color: #FF0000;
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: 600;
  font-size: 0.9rem;
}

.msg-erro {
  background-color: #ffe5e5;
  color: #c00;
  padding: 0.75rem;
  border-radius: 5px;
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* Estilos antigos mantidos para compatibilidade */
.cartao-profissional {
  background: white;
  border: 2px solid var(--cor-borda);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transicao);
}

.cartao-profissional:hover {
  border-color: #FF0000;
  box-shadow: var(--sombra);
}

.info-profissional {
  flex: 1;
}

.info-profissional h5 {
  color: #FF0000;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.info-profissional p {
  margin: 0.25rem 0;
  color: #333333;
  font-size: 0.9rem;
}

.info-sistema {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 5px;
  border-left: 4px solid var(--cor-info);
}

.info-sistema p {
  margin: 0.5rem 0;
  color: #333333;
}

.info-api {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 5px;
  border-left: 4px solid #FF0000;
}

.info-api p {
  margin: 0.5rem 0;
  color: #333333;
}

.info-api h4 {
  color: #333333;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.endpoints-list {
  list-style: none;
  padding-left: 1rem;
}

.endpoints-list li {
  margin: 0.75rem 0;
  color: #333333;
  line-height: 1.6;
}

.endpoints-list code {
  background-color: #e8e8e8;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  color: #333333;
  font-size: 0.9rem;
}

/* ===================================
   NOTIFICAÇÕES
   =================================== */

.notificacao {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 5px;
  box-shadow: var(--sombra-forte);
  animation: slideIn 0.3s ease-out;
  z-index: 1000;
  max-width: 400px;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.notificacao.sair {
  animation: slideOut 0.3s ease-out;
}

.notificacao-sucesso {
  background-color: var(--cor-sucesso);
  color: white;
}

.notificacao-erro {
  background-color: var(--cor-perigo);
  color: white;
}

.notificacao-info {
  background-color: var(--cor-info);
  color: white;
}

.notificacao-aviso {
  background-color: var(--cor-aviso);
  color: white;
}

/* ===================================
   RESPONSIVO
   =================================== */

@media (max-width: 768px) {
  .header {
    padding: 1rem;
  }

  .logo h1 {
    font-size: 1.8rem;
  }

  .nav-principal {
    flex-direction: column;
  }

  .btn-nav {
    width: 100%;
    text-align: center;
  }

  .conteudo-principal {
    padding: 0 1rem 1rem;
  }

  .linha-campos {
    grid-template-columns: 1fr;
  }

  .lista-pacientes {
    grid-template-columns: 1fr;
  }

  .busca-filtros {
    flex-direction: column;
  }

  .input-busca {
    width: 100%;
  }

  .botoes-formulario {
    flex-direction: column;
  }

  .botoes-formulario .btn {
    width: 100%;
    justify-content: center;
  }

  .notificacao {
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .secao h2 {
    font-size: 1.5rem;
  }

  .formulario {
    padding: 1rem;
  }

  .cartao-header {
    flex-direction: column;
  }
}

/* ===================================
   IMAGENS
   =================================== */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.imagem-campo {
  width: 100%;
  height: auto;
  margin: 1rem 0;
  border-radius: 8px;
  box-shadow: var(--sombra);
  border: 2px solid var(--cor-borda);
  transition: var(--transicao);
}

.imagem-campo:hover {
  box-shadow: var(--sombra-forte);
  border-color: var(--cor-primaria);
}

.imagem-preview {
  max-width: 300px;
  max-height: 300px;
  margin: 1rem 0;
  border-radius: 8px;
  box-shadow: var(--sombra);
  border: 2px solid var(--cor-borda);
}

.container-imagem {
  text-align: center;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  margin: 1rem 0;
}

.container-imagem img {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

/* ===================================
   SCROLLBAR PERSONALIZADA
   =================================== */

.lista-erp::-webkit-scrollbar {
  width: 8px;
}

.lista-erp::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.lista-erp::-webkit-scrollbar-thumb {
  background: #FF0000;
  border-radius: 10px;
}

.lista-erp::-webkit-scrollbar-thumb:hover {
  background: #CC0000;
}

@media print {
  body {
    background-color: white;
  }

  .header,
  .nav-principal,
  .btn-nav,
  .botoes-formulario {
    display: none;
  }

  .secao {
    page-break-after: always;
  }

  .grafico-container {
    break-inside: avoid;
  }
}

/* ===================================
   MAPA INTERATIVO DO CORPO
   =================================== */

.body-map-container {
  display: flex;
  gap: 2rem;
  margin: 1rem 0;
}

.body-region {
  cursor: pointer;
  transition: all 0.3s ease;
  fill: #e3f2fd;
  stroke: #1976d2;
  stroke-width: 2;
}

.body-region:hover {
  fill: #bbdefb !important;
  stroke: #1976d2 !important;
  stroke-width: 3 !important;
  filter: drop-shadow(0 0 4px rgba(25, 118, 210, 0.5));
  transform: scale(1.02);
}

.body-region.selected {
  fill: #FF0000 !important;
  stroke: #CC0000 !important;
  stroke-width: 3 !important;
  filter: drop-shadow(0 0 8px rgba(255, 0, 0, 0.8));
  animation: pulse-selected 0.3s ease;
}

.body-region.selected:hover {
  fill: #FF3333 !important;
  stroke: #CC0000 !important;
}

@keyframes pulse-selected {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.region-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: #FF0000;
  color: white;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.region-badge .remove-region {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.region-badge .remove-region:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   AVALIAÇÃO DIÁRIA DE BORG
   ======================================== */

.borg-escala-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #e3f2fd 100%);
  border-radius: 12px;
  border: 2px solid #2196F3;
}

#borg-valor {
  width: 100%;
  height: 12px;
  border-radius: 6px;
  outline: none;
  background: linear-gradient(
    to right,
    #4CAF50 0%,
    #8BC34A 20%,
    #FFEB3B 40%,
    #FF9800 60%,
    #FF5722 80%,
    #F44336 100%
  );
  cursor: pointer;
  -webkit-appearance: none;
}

#borg-valor::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: 3px solid #2196F3;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}

#borg-valor::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

#borg-valor::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: 3px solid #2196F3;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}

#borg-valor::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.borg-valor-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.borg-numero {
  font-size: 4rem;
  font-weight: 800;
  color: #2196F3;
  line-height: 1;
  min-width: 80px;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.borg-descricao {
  font-size: 1.5rem;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.borg-legenda {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid #e0e0e0;
}

.borg-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #666;
  padding: 0.5rem;
  background: white;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.borg-item:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.borg-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  background: #2196F3;
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.75rem;
}

.campo-com-busca {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-busca-inline {
  padding: 0.75rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.input-busca-inline:focus {
  outline: none;
  border-color: #2196F3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* Tabela de Borg nos Relatórios */
.tabela-borg {
  font-size: 0.95rem;
}

.tabela-borg th:nth-child(4),
.tabela-borg td:nth-child(4) {
  text-align: center;
  font-weight: 700;
}

.borg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.borg-verde {
  background: linear-gradient(135deg, #4CAF50, #66BB6A);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.borg-verde-claro {
  background: linear-gradient(135deg, #8BC34A, #9CCC65);
  box-shadow: 0 2px 8px rgba(139, 195, 74, 0.4);
}

.borg-laranja {
  background: linear-gradient(135deg, #FF9800, #FFA726);
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4);
}

.borg-laranja-escuro {
  background: linear-gradient(135deg, #FF5722, #FF7043);
  box-shadow: 0 2px 8px rgba(255, 87, 34, 0.4);
}

.borg-vermelho {
  background: linear-gradient(135deg, #F44336, #E53935);
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4);
}

.tabela-borg tbody tr:hover {
  background: #f5f9ff;
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ===================================
   TESTES DE FORÇA - PADRÃO QORPO
   =================================== */

.teste-forca-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 2px solid #e0e0e0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.teste-forca-card:hover {
  border-color: #FF0000;
  box-shadow: 0 4px 16px rgba(255, 0, 0, 0.15);
  transform: translateY(-2px);
}

.btn-group-lado {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-opcao {
  padding: 0.85rem 1.2rem;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  background: white;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-opcao:hover {
  background: #fff5f5;
  border-color: #FF0000;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.1);
}

.btn-opcao.selected {
  background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
  border-color: #FF0000;
  color: white;
  box-shadow: 0 3px 10px rgba(255, 0, 0, 0.3);
  transform: translateY(-1px);
}

.badge-articulacao {
  background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.2);
}

.btn-remover-articulacao {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: transform 0.2s ease;
  opacity: 0.8;
}

.btn-remover-articulacao:hover {
  transform: scale(1.3);
  opacity: 1;
}

.btn-opcao-articulacao {
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  border: 2px solid #e0e0e0;
  background: white;
  color: #333;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  font-weight: 600;
}

.btn-opcao-articulacao:hover {
  background: #fff5f5;
  border-color: #FF0000;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.2);
}

.btn-opcao-articulacao.selected {
  background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
  border-color: #FF0000;
  color: white;
  box-shadow: 0 3px 10px rgba(255, 0, 0, 0.3);
  transform: translateY(-1px);
}

.btn-remover-teste {
  background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-remover-teste:hover {
  background: linear-gradient(135deg, #CC0000 0%, #990000 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}
  transform: scale(1.05);
}
