* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f5f7;
  color: #222;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* TOPO / NAVBAR */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: #111827;
  color: #f9fafb;
}

.brand-title {
  font-weight: 600;
  font-size: 1.25rem;
}

.brand-subtitle {
  font-size: 0.8rem;
  opacity: 0.8;
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
}

.nav-links button {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #4b5563;
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
  font-size: 0.8rem;
}

.nav-links button:hover {
  background: #374151;
}

.inline-form {
  display: inline;
}

/* CONTEÚDO / PAINÉIS */

.content {
  padding: 2rem 1rem 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.panel {
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  overflow-x: auto; /* evita que a tabela rebente o painel */
}

.panel-narrow {
  max-width: 420px;
  margin: 3rem auto;
}

.panel h1 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
}

/* FORMULÁRIOS */

.form-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

label {
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select {
  padding: 0.45rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
}

button {
  margin-top: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: none;
  background: #2563eb;
  color: #f9fafb;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

/* TABELAS */

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* primeira coluna: checkbox estreito e centrado */
.data-table th:first-child,
.data-table td:first-child {
  width: 32px;
  text-align: center;
}

.data-table th,
.data-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  white-space: nowrap; /* em geral não quebra */
}

/* Nome e Email podem quebrar linha para não alargar a tabela */
.data-table td:nth-child(2),
.data-table td:nth-child(6) {
  white-space: normal;
}

.data-table th {
  color: #4b5563;
  background: #f9fafb;
}

/* BADGES / ESTADOS */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-ok {
  background: #dcfce7;
  color: #166534;
}

.badge-bad {
  background: #fee2e2;
  color: #b91c1c;
}

/* BOLINHA ESTADO TOC */

.status-dot {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  margin-right: 0.35rem;
}

.status-dot-ok {
  background: #22c55e;
}

.status-dot-missing {
  background: #ef4444;
}

.status-dot-unknown {
  background: #9ca3af;
}

/* AÇÕES EM PAINEL */

.panel-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.panel-actions form {
  margin: 0;
}

/* FILTROS (clientes) */

.filters-form {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.filters-form label {
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filters-form select {
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font-size: 0.85rem;
}

/* FLASH MESSAGES */

.flash-container {
  margin-bottom: 1rem;
}

.flash {
  padding: 0.7rem 0.9rem;
  border-radius: 0.6rem;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.flash-success {
  background: #dcfce7;
  color: #166534;
}

.flash-error {
  background: #fee2e2;
  color: #b91c1c;
}

/* RODAPÉ */

.footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.75rem;
  color: #6b7280;
}

/* Imagens dentro dos painéis (ex: logotipo do ACC) */
.panel img {
  max-width: 320px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Forçar tamanho razoável do logotipo do ACC, sem mexer no resto */
img[src$="logo_acc.png"],
img[src$="Logo%20ACC.png"] {
  max-width: 200px;   /* ajusta aqui se quiseres maior/menor (ex: 220 / 300) */
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}