:root {
  --fundo: #0b0b0a;
  --dourado: #c9a24b;
  --dourado-claro: #e0c07d;
  --creme: #f3ead9;
  --pagina: #faf7f1;
  --texto: #201d18;
  --texto-suave: #6b6154;
  --borda: #e4dbc9;
  --branco: #ffffff;
  --erro-fundo: #fbeaea;
  --erro-texto: #a1263b;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--pagina);
  color: var(--texto);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, .marca {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0.2px;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--dourado);
  outline-offset: 2px;
}

/* ---------- Cabecalho ---------- */

header.topo {
  background: var(--fundo);
  color: var(--creme);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 3px solid var(--dourado);
}

header.topo .marca {
  font-size: 1.3rem;
  line-height: 1;
}

header.topo .marca span { color: var(--dourado); }

header.topo nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

header.topo nav a {
  color: var(--creme);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
  padding: 4px 2px;
}

header.topo nav a:hover,
header.topo nav a.ativo {
  border-bottom-color: var(--dourado);
}

/* ---------- Layout geral ---------- */

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

h1 {
  font-size: 1.6rem;
  margin: 0 0 20px;
  color: var(--texto);
}

.card {
  background: var(--branco);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--borda);
  box-shadow: 0 1px 3px rgba(11, 11, 10, 0.06);
  margin-bottom: 24px;
}

/* ---------- Formularios ---------- */

label {
  display: block;
  font-weight: 600;
  margin: 16px 0 6px;
  font-size: 0.92rem;
  color: var(--texto);
}

.dica {
  font-size: 0.82rem;
  color: var(--texto-suave);
  margin-top: -2px;
  margin-bottom: 4px;
}

input[type=text], input[type=tel], input[type=email], input[type=number],
input[type=date], input[type=time], input[type=password],
select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--borda);
  border-radius: 8px;
  font-size: 16px; /* evita zoom automatico no iOS ao focar o campo */
  font-family: inherit;
  background: var(--branco);
  color: var(--texto);
}

textarea { min-height: 90px; resize: vertical; }

.linha { display: flex; gap: 16px; flex-wrap: wrap; }
.linha > div { flex: 1; min-width: 190px; }

button, .botao {
  display: inline-block;
  background: var(--fundo);
  color: var(--dourado-claro);
  border: none;
  padding: 13px 22px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-top: 20px;
  min-height: 44px;
}

button:hover, .botao:hover { opacity: 0.88; }

.botao.secundario {
  background: var(--branco);
  color: var(--fundo);
  border: 1px solid var(--fundo);
}

.erro {
  background: var(--erro-fundo);
  color: var(--erro-texto);
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* ---------- Tabelas ---------- */

.tabela-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--borda);
  white-space: nowrap;
}

th { background: var(--creme); color: var(--texto); }

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.tag.site { background: #e4f0e9; color: #2a6b47; }
.tag.direto { background: #f0e6d2; color: #8a6217; }
.tag.cancelado { background: #f6dede; color: #a1263b; }
.tag.ativo { background: #e4f0e9; color: #2a6b47; }

.aviso-cancelado {
  display: inline-block;
  background: var(--erro-texto);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 6px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
}

tr.linha-cancelada td { color: var(--texto-suave); text-decoration: line-through; }
tr.linha-cancelada .tag { text-decoration: none; }

.valor-indefinido { color: var(--texto-suave); font-style: italic; }

/* ---------- Filtros / listas ---------- */

.filtros form {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filtros > div,
.filtros form > div { min-width: 160px; }

.total-dia {
  font-weight: 700;
  font-size: 1.05rem;
  margin-top: 14px;
}

.lista-simples { list-style: none; padding: 0; margin: 0; }
.lista-simples li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--borda);
  gap: 10px;
}
.lista-simples li:last-child { border-bottom: none; }
.lista-simples .remover { color: var(--erro-texto); font-size: 0.88rem; white-space: nowrap; }

/* ---------- Login ---------- */

.login-box {
  max-width: 380px;
  margin: 60px auto;
}

/* ---------- Comprovante ---------- */

.comprovante {
  border: 2px solid var(--fundo);
  padding: 26px;
  border-radius: 10px;
  background: var(--branco);
}

.comprovante h2 {
  color: var(--fundo);
  border-bottom: 2px solid var(--dourado);
  padding-bottom: 10px;
  margin-top: 0;
}

.comprovante .codigo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dourado-claro);
  background: var(--fundo);
  display: inline-block;
  padding: 6px 16px;
  border-radius: 6px;
  margin-bottom: 18px;
  font-family: "Playfair Display", Georgia, serif;
}

.comprovante .campo { margin-bottom: 8px; }
.comprovante .campo b { display: inline-block; min-width: 170px; }

/* ---------- Telas pequenas (celular) ---------- */

@media (max-width: 640px) {
  header.topo { padding: 12px 16px; }
  main { padding: 20px 14px 40px; }
  .card { padding: 18px; border-radius: 10px; }
  h1 { font-size: 1.35rem; }
  .comprovante .campo b { display: block; min-width: 0; margin-bottom: 2px; }
  button, .botao { width: 100%; text-align: center; margin-top: 12px; }
  .acoes-comprovante { display: flex; flex-direction: column; }
}

@media print {
  header.topo, .botao, button, .no-print { display: none !important; }
  main { max-width: 100%; margin: 0; padding: 0; }
  .card, .comprovante { box-shadow: none; border: none; }
}
