/* 🌐 Variáveis globais */
:root {
  --cor-primaria: #0078d4;
  --cor-secundaria: #555;
  --cor-hover: #005ea2;
  --cor-fundo-claro: #f3f6f9;
  --cor-fundo-escuro: #2c2c2c;
  --texto-primario: #333;
}

/* 🌐 Estilo base */
body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background-color: var(--cor-fundo-claro);
  color: white;
  padding: 0px 3px 3px 3px;
}

body.dark-mode {
  --texto-primario: #f0f0f0;
  background-color: var(--cor-fundo-escuro);
  color: #eee;
}

/* 🌙 Modo escuro específico */
body.dark-mode .empresa-linha {
  background-color: #3a3a3a;
  border-color: #555;
}

body {
  transition: background-color 0.5s ease, color 0.3s ease;
}

.titulo-barra {
  animation: fadeInUp 1.0s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateY(0); }
}

.usuario-logado {
  position: absolute;
  bottom: 6px;
  right: 20px;
  font-size: 14px;
  color: white;
  font-weight: bold;
  opacity: 0.9;
}

/* Estilo para telas grandes (PC) */
@media (min-width: 768px) {
  .dashboard-box {
	  margin: 0px auto; /* reduzido de 10px para 3px */
	  padding: 2px;
	  max-width: 1000px;
	  box-shadow: 0 0 10px rgba(0,0,0,0.1);
	  border-radius: 8px;
	}
  .dashboard-box,
  .content,
  .main {
    font-size: 1rem; /* 100% do tamanho base */
  }

  h1 {
    font-size: 2rem;
  }

  p, li, label {
    font-size: 1rem;
  }
}

/* Estilo para telas pequenas (celular) */
@media (max-width: 767px) {
  /* 🔵 Barra de título */
  .dashboard-box {
    margin: 0;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
  }

  .barra-titulo {
    min-height: 120px !important;
    padding-bottom: 35px !important;
  }

  .usuario-logado {
	position: absolute;
    bottom: 8px;
    right: 20px;
    font-size: 13px;
    z-index: 1001;
  }

  h1 {
    font-size: 2.4rem;
  }

  p, li, label {
    font-size: 1.2rem;
  }
  .texto-btn-paginacao {
    display: none;
  }

}

.modal-box {
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode .empresa-nome {
  color: #fff;
}

body.dark-mode .indicador {
  color: #ccc;
}

/* ⬛ Caixa principal */



/* 🔵 Barra de título */
.barra-titulo {
  height: 85px;
  background-color: var(--cor-primaria);
  color: white;
  font-weight: bold;
  padding: 14px 20px;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 25px;
  position: sticky;
  top: 0;
  z-index: 999;
}

/* Título e botão dark */
.topo-barra {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.titulo-barra {
  font-size: 24px;
  font-weight: bold;
}

/* 🔍 Filtros agrupados */
.painel-filtros {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.form-busca input,
.form-ordenar select {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.form-busca input {
  padding-left: 12px;
  padding-right: 32px;
  width: 220px;
}

.campo-busca {
  position: relative;
  width: 170px; /* ou o valor que você quiser */
}

.campo-busca input {
  width: 100%;
  padding-right: 60px; /* espaço reservado para o botão */
  box-sizing: border-box; /* garante que padding não ultrapasse o contêiner */
}

/* 🎨 Borda nos campos onde estiver o foco */
.form-editar input:focus,
.form-editar select:focus,
.form-editar textarea:focus {
  border: 3px solid var(--cor-primaria);
  box-shadow: 0 0 4px rgba(0, 120, 212, 0.4);
  outline: none;
}
.form-editar input[readonly] {
  border: 3px solid var(--cor-primaria);
  background-color: #e9f5ff;
  cursor: not-allowed;
}
.form-editar input[readonly]:focus {
  box-shadow: 0 0 4px rgba(0, 120, 212, 0.4);
}

/* 🧩 Padronização visual de todos os campos */
input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  height: 42px;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  box-sizing: border-box;
  width: 100%;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea {
  min-height: 80px;
  resize: vertical;
  height: auto;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cor-primaria);
  box-shadow: 0 0 4px rgba(0, 120, 212, 0.3);
  outline: none;
}


/* ➕ Botões de ação */
.acoes-gerais {
  text-align: left;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* 🔘 Estilo de botões */
.btn {
  cursor: pointer;
  display: inline-block;
  margin-left: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 14px;
  border: none;
  text-decoration: none;
  color: white;
  background-color: var(--cor-primaria);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  transform: scale(1.05);
}

.btn:focus {
  outline: 2px solid var(--cor-hover);
  outline-offset: 2px;
}

.btn-painel {
  width: 65px;
}

.btn-desativado {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
  pointer-events: auto;
}

/* 🎨 Cores dos botões */
.btn-sec {
  background-color: var(--cor-secundaria);
}
.btn-sec:hover,
.btn-acao:hover {
  background-color: #333;
}

.btn-confirmar-excluir,
.btn-confirmar-excluir-cliente {
  background-color: #d9534f;
}
.btn-confirmar-excluir:hover,
.btn-confirmar-excluir-cliente:hover {
  background-color: #c9302c;
}

.btn-nova,
.btn-painel,
.btn-exportar {
  background-color: #0055a5;
}
.btn-nova:hover,
.btn-painel:hover,
.btn-exportar:hover {
  background-color: #003f7f;
}

.btn-lupa,
.btn-limpar {
  right: 2px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
}

.grupo-botoes-topo {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-sair {
  background-color: #d9534f;
  color: white;
}

.btn-sair:hover {
  background-color: #c9302c;
}

body.dark-mode .btn-sair {
  background-color: #d9534f !important;
  color: white !important;
}

.btn-sair svg {
  transition: stroke 0.3s ease;
}

.btn-sair:hover svg {
  stroke: #fff;
}

.btn-dark,
.btn-sair {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  height: 24px;
  width: 24px;
  border-radius: 6px;
}

.btn-dark,
.btn-sair {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  padding: 0;
  font-size: 20px;
}

/* 🎨 Cores dos formulários e edição */
body:not(.dark-mode) .form-editar label {
  color: #333;
}

body.dark-mode .form-editar label {
  color: #f0f0f0;
}

/* 🧾 Estilo refinado para formulário de edição */
.form-editar {
  display: flex;
  flex-direction: column;
  max-width: 400px;
  margin: auto;
  margin-top: 30px;
}

/* Agrupamento de campos */
.form-editar .campo {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.form-editar label {
  font-weight: 500;
  font-size: 15px;
  margin-bottom: 4px;
}

.form-editar input[type="text"] {
  padding: 10px;
  border-radius: 6px;
  font-size: 16px;
}

/* 🧱 Linhas de empresa */
.empresa-linha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  margin-bottom: 8px;
  border-radius: 6px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  transition: all 0.2s ease-in-out;
}

.empresa-linha:hover {
  background-color: #e6f0fb;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transform: scale(1.01);
}

.empresa-nome {
  font-size: 17px;
  font-weight: bold;
  color: var(--texto-primario);
  flex-grow: 1;
}

.acordo-cliente-linha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  margin-bottom: 8px;
  border-radius: 6px;
  background-color: var(--cor-primaria);
  border: 1px solid #ddd;
  transition: all 0.2s ease-in-out;
}

.acordo-cliente-linha:hover {
  background-color: var(--cor-primaria);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transform: scale(1.01);
}

.indicador {
  font-size: 13px;
  color: #555;
  margin-top: 4px;
}

.acoes {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* 📃 Paginação */
.paginacao {
  text-align: center;
  margin-top: 30px;
}

.paginacao a {
  display: inline-block;
  margin: 0 5px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  background-color: var(--cor-primaria);
  color: white;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.paginacao a:hover {
  background-color: var(--cor-hover);
}

/* 🪟 Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-box {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  max-width: 400px;
  width: 90%;
  color: #333;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: fadeIn 0.3s ease-out;
}

/* 🌙 Modal no modo escuro */
body.dark-mode .modal-box {
  background-color: #1e1e1e;
  color: #f0f0f0;
  box-shadow: 0 4px 12px rgba(255,255,255,0.1);
}

body.dark-mode .modal-overlay {
  background-color: rgba(0, 0, 0, 0.7);
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* 📱 Responsividade */
/* 📱 Botões com ícone somente */
@media (max-width: 700px) {
  body {
    padding: 2px; /* Reduz o espaçamento geral */
  }
  /* 1️⃣ Título menor */
  .titulo-barra,
  .dashboard-box  {
    font-size: 1.2rem;
  }
  
  .campo-busca {
	  width: 150px;
  }

  .topo-barra span {
    font-size: 1.2rem;
  }

  .btn-nova span,
  .btn-exportar span,
  .btn-sec span,
  .btn-acao span,
  .btn-confirmar-excluir span,
  .btn-confirmar-excluir-cliente span,
  .btn-desativado span,
  .btn-painel span {
    display: none;
  }

  .btn-nova,
  .btn-exportar,
  .btn-confirmar-excluir,
  .btn-confirmar-excluir-cliente,
  .btn-desativado,
  .btn-acao,
  .btn-painel {
    padding: 6px;
    font-size: 16px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    justify-content: center;
  }

  /* 2️⃣ Botões lado a lado */
  .acoes-gerais {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }


  /* 3️⃣ Botão excluir estilo redondo */
  .btn-confirmar-excluir span,
  .btn-confirmar-excluir-cliente span,
  .btn-desativado span {
    display: none;
  }

  .btn-confirmar-excluir,
  .btn-confirmar-excluir-cliente,
  .btn-desativado  {
    padding: 6px;
    font-size: 16px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    justify-content: center;
  }

}

/* 🌙 Modo escuro para mensagem.php */
body.dark-mode .message-box {
  background-color: #1e1e1e;
  box-shadow: 0 4px 12px rgba(255,255,255,0.1);
}

body.dark-mode .success {
  color: #f0f0f0;
}

body.dark-mode .btn {
  background-color: #0078d4;
  color: white;
}

body.dark-mode .btn-confirmar-excluir {
  background-color: #d9534f;
}

body.dark-mode .btn-confirmar-excluir-cliente {
  background-color: #d9534f;
}

body.dark-mode .btn-nova {
  background-color: #0055a5;
}

body.dark-mode .btn-painel {
  background-color: #0055a5;
}
body.dark-mode .btn-exportar {
  background-color: #0055a5;
}

.linha-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.linha-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
}

.form-ordenar select.ordenar-tooltip {
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  background-color: white;
  transition: box-shadow 0.3s ease;
}

.form-ordenar select.ordenar-tooltip:hover {
  box-shadow: 0 0 6px rgba(0, 120, 212, 0.3);
}

.paginacao {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.btn-paginacao {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  background-color: var(--cor-primaria);
  color: white;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn-paginacao:hover {
  background-color: var(--cor-hover);
}

.btn-desativado,
.btn-desativado-excluir {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
  display: inline-block; /* garante que o cursor funcione */
  /* pointer-events: none; REMOVIDO para permitir o cursor */
  opacity: 0.7;
}

