/* Business Manager — Gestor Comercial
   Interface no estilo AdminLTE 3 (template MIT, vendorizado em
   /static/vendor/adminlte/). Este arquivo é a camada de compatibilidade:
   mantém as classes históricas dos templates (painel, tabela, botao,
   selo, formulario...) com a linguagem visual do AdminLTE/Bootstrap 4.
   Carregado DEPOIS do adminlte.min.css. */

/* ---------- Login ---------- */
.login-sub {
  font-size: 1rem;
  font-weight: 400;
  color: #6c757d;
  margin-top: 0.15rem;
}

/* ---------- Painéis (cards) ---------- */
.painel {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.25rem;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.125), 0 1px 3px rgba(0, 0, 0, 0.2);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.painel h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #212529;
  margin: 0 0 0.75rem;
}
.painel .painel {
  background: #f4f6f9;
  box-shadow: none;
  margin-bottom: 0;
}

/* ---------- Grades auxiliares ---------- */
.grade-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 768px) {
  .grade-2 { grid-template-columns: 1fr; }
}

/* ---------- Gráficos SVG (gerados no servidor) ---------- */
.grafico { width: 100%; height: auto; display: block; }
.grafico text { fill: #495057; }

/* ---------- Tabelas ---------- */
.tabela {
  width: 100%;
  border-collapse: collapse;
  color: #212529;
  margin-bottom: 0;
}
.tabela th,
.tabela td {
  text-align: left;
  padding: 0.75rem;
  vertical-align: middle;
  border-top: 1px solid #dee2e6;
}
.tabela thead th {
  border-top: 0;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
}
.tabela tbody tr:hover { background: #f8f9fa; }
.tabela.detalhe th { width: 190px; color: #6c757d; }
.tabela-rolavel { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Selos (badges) ---------- */
.selo {
  display: inline-block;
  padding: 0.3em 0.6em;
  font-size: 80%;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: #6c757d;
  border-radius: 0.25rem;
  text-align: center;
  white-space: nowrap;
}
.selo.ok { background: #28a745; }
.selo.alerta { background: #ffc107; color: #212529; }
.selo.vencido { background: #dc3545; }

/* ---------- Botões ---------- */
.botao {
  display: inline-block;
  font-family: inherit;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  color: #212529;
  background: #f8f9fa;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  text-align: center;
  vertical-align: middle;
}
.botao:hover { background: #e2e6ea; color: #212529; text-decoration: none; }
.botao.primario { background: #007bff; border-color: #007bff; color: #fff; }
.botao.primario:hover { background: #0069d9; border-color: #0062cc; color: #fff; }
.botao.perigo { background: #dc3545; border-color: #dc3545; color: #fff; }
.botao.perigo:hover { background: #c82333; border-color: #bd2130; color: #fff; }
.botao.pequeno { padding: 0.25rem 0.5rem; font-size: 0.875rem; line-height: 1.5; }
.largura-total { width: 100%; }

/* ---------- Barras de ações e filtros ---------- */
.barra-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.barra-acoes form { margin: 0; }
.formulario .barra-acoes { justify-content: flex-start; margin-bottom: 0; }
.filtros { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.filtros input,
.filtros select {
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  width: auto;
}
.filtros input:focus,
.filtros select:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.abas { display: flex; gap: 0.5rem; }
.acoes { white-space: nowrap; }
.acoes form { display: inline-block; margin-left: 0.25rem; }

/* ---------- Formulários ---------- */
.formulario {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.25rem;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.125), 0 1px 3px rgba(0, 0, 0, 0.2);
  padding: 1.25rem;
  margin-bottom: 1rem;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.formulario.largo { max-width: 900px; }
.painel .formulario {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  max-width: none;
}
.formulario label {
  display: block;
  font-weight: 600;
  color: #212529;
  margin-bottom: 1rem;
}
.formulario input[type="text"],
.formulario input[type="password"],
.formulario input[type="search"],
.formulario input[type="number"],
.formulario input[type="date"],
.formulario select,
.formulario textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  font-family: inherit;
}
.formulario input:focus,
.formulario select:focus,
.formulario textarea:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.formulario label.checkbox { font-weight: 400; }
.formulario label.checkbox input {
  display: inline-block;
  width: auto;
  margin: 0 0.4rem 0 0;
}
.linha-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 576px) {
  .linha-2 { grid-template-columns: 1fr; }
}

/* ---------- Textos auxiliares e alertas ---------- */
.ajuda { color: #6c757d; font-size: 0.875rem; }
.vazio { color: #6c757d; margin: 0; }
.indicador-rotulo {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6c757d;
  margin-bottom: 0.25rem;
}
.alerta-erro {
  background: #f8d7da; color: #721c24;
  border: 1px solid #f5c6cb; border-radius: 0.25rem;
  padding: 0.75rem 1.25rem; margin-bottom: 1rem;
}
.alerta-ok {
  background: #d4edda; color: #155724;
  border: 1px solid #c3e6cb; border-radius: 0.25rem;
  padding: 0.75rem 1.25rem; margin-bottom: 1rem;
}
.alerta-info {
  background: #d1ecf1; color: #0c5460;
  border: 1px solid #bee5eb; border-radius: 0.25rem;
  padding: 0.75rem 1.25rem; margin-bottom: 1rem;
}
