:root {
  --tinta: #17212b;
  --tinta-suave: #52606d;
  --fundo: #f1f4f5;
  --papel: #ffffff;
  --linha: #d5dce0;
  --acento: #0b5563;
  --acento-escuro: #073b45;
  --topo: #151615;
  --ok: #1d6b3a;
  --aguarda: #8a5200;
  --falha: #a3261f;
  --raio: 6px;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; background: var(--fundo); color: var(--tinta); font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; line-height: 1.5; }
a { color: var(--acento); }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }

.topo { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding: .5rem 1.5rem; background: var(--topo); color: #fff; border-bottom: 3px solid var(--acento); }
.topo .marca { display: flex; align-items: center; gap: .85rem; font-weight: 600; font-size: 1.05rem; color: #fff; text-decoration: none; margin-right: auto; }
.topo .logo { height: 44px; width: auto; display: block; }
.topo nav { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.topo nav a { color: #d7eaee; text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.topo nav a:hover { border-bottom-color: #f2b705; color: #fff; }
.topo form { display: inline; }
.topo .sair { background: none; border: 1px solid #4f8793; color: #d7eaee; border-radius: var(--raio); padding: .3rem .8rem; cursor: pointer; font: inherit; }
.topo .sair:hover { background: #0b5563; }

.conteudo { max-width: 1100px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }
h1 { font-size: 1.6rem; margin: 0; font-weight: 600; }
h2 { font-size: 1.15rem; margin: 1.75rem 0 .5rem; font-weight: 600; }
.cabecalho { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.ajuda { color: var(--tinta-suave); margin: .25rem 0 1rem; max-width: 62ch; }
.vazio { background: var(--papel); border: 1px dashed var(--linha); border-radius: var(--raio); padding: 2rem; text-align: center; color: var(--tinta-suave); }

.aviso { border-radius: var(--raio); padding: .7rem 1rem; margin-bottom: 1rem; border: 1px solid; }
.aviso.ok { background: #e6f3ea; border-color: #a9d3b7; color: #14532d; }
.aviso.erro { background: #fbe9e7; border-color: #e5aaa5; color: #7f1d17; }

.btn { display: inline-block; font: inherit; cursor: pointer; text-decoration: none; background: var(--papel); color: var(--tinta); border: 1px solid #aab6bd; border-radius: var(--raio); padding: .45rem .9rem; }
.btn:hover { border-color: var(--acento); color: var(--acento-escuro); }
.btn.primario { background: var(--acento); border-color: var(--acento); color: #fff; }
.btn.primario:hover { background: var(--acento-escuro); color: #fff; }
.btn.perigo { color: var(--falha); border-color: #d9a3a0; }
.btn.perigo:hover { background: #fbe9e7; border-color: var(--falha); }
form.inline { display: inline; }

.cartao { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 1.25rem 1.5rem; }
.tabela-wrap { overflow-x: auto; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .65rem .85rem; border-bottom: 1px solid var(--linha); vertical-align: top; }
th { font-weight: 600; color: var(--tinta-suave); background: #f7f9fa; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.acoes { white-space: nowrap; }
td.acoes > * { margin-right: .35rem; }
.sub { color: var(--tinta-suave); font-size: .85rem; }

.chip { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .85rem; border: 1px solid; white-space: nowrap; }
.chip.agendada { color: #1f4f8a; border-color: #aac4e6; background: #eaf2fc; }
.chip.em-andamento { color: var(--ok); border-color: #a9d3b7; background: #e6f3ea; }
.chip.encerrada, .chip.cancelada { color: var(--tinta-suave); border-color: var(--linha); background: #f2f4f5; }
.liberacao.ok { color: var(--ok); }
.liberacao.aguarda { color: var(--aguarda); }
.liberacao.falha { color: var(--falha); font-weight: 600; }

.form { max-width: 560px; }
.campo { margin-bottom: 1rem; }
.campo label { display: block; font-weight: 600; margin-bottom: .25rem; }
.campo input[type=text], .campo input[type=password], .campo input[type=email], .campo input[type=tel],
.campo input[type=datetime-local], .campo input[type=file], .campo select, .campo textarea {
  width: 100%; font: inherit; padding: .5rem .65rem; border: 1px solid #aab6bd; border-radius: var(--raio); background: #fff; color: var(--tinta); }
.campo textarea { min-height: 5rem; }
.campo .dica { color: var(--tinta-suave); font-size: .85rem; margin-top: .2rem; }
.linha2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.marca-check { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; font-weight: 400; }
.marca-check input { width: 1.1rem; height: 1.1rem; }
.previa { max-width: 160px; max-height: 160px; margin-top: .5rem; border-radius: var(--raio); border: 1px solid var(--linha); display: none; }
.barra-form { display: flex; gap: .6rem; margin-top: 1.25rem; }

.login { max-width: 420px; margin: 2.5rem auto; padding: 0; overflow: hidden; }
.login-banner { display: block; width: 100%; height: auto; }
.login-corpo { padding: 1.25rem 1.5rem 1.5rem; }
.matriz th.col { text-align: center; }
.matriz td.cel { text-align: center; }
.matriz input { width: 1.1rem; height: 1.1rem; }
.lista-check { columns: 2 260px; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 1rem 1.25rem; }
@media (max-width: 640px) { .linha2 { grid-template-columns: 1fr; } .topo { padding: .75rem 1rem; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Filtros e paginação */
.filtros { display: grid; grid-template-columns: 2fr 2fr 1.4fr 1fr 1fr auto; gap: .75rem; align-items: end; margin-bottom: 1rem; padding: 1rem; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); }
.filtros .campo { margin: 0; }
.filtros .campo label { font-size: .85rem; color: var(--tinta-suave); }
.filtros input, .filtros select { width: 100%; font: inherit; padding: .45rem .6rem; border: 1px solid #aab6bd; border-radius: var(--raio); background: #fff; color: var(--tinta); }
.filtros .botoes { display: flex; gap: .5rem; }
.resumo-lista { color: var(--tinta-suave); font-size: .9rem; margin: 0 0 .5rem; }
.paginacao { display: flex; gap: .35rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.paginacao a, .paginacao span { min-width: 2.2rem; text-align: center; padding: .35rem .65rem; border: 1px solid var(--linha); border-radius: var(--raio); background: var(--papel); text-decoration: none; color: var(--tinta); }
.paginacao a:hover { border-color: var(--acento); color: var(--acento-escuro); }
.paginacao .atual { background: var(--acento); border-color: var(--acento); color: #fff; font-weight: 600; }
.paginacao .desativado { color: #9aa7ae; background: #f2f4f5; }

/* Busca de hóspedes na nova reserva */
.busca-hospede { max-width: 560px; margin-bottom: 1.5rem; padding: 1rem 1.25rem; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); }
.busca-hospede h2 { margin: 0 0 .25rem; font-size: 1rem; }
.busca-hospede input[type=search] { width: 100%; font: inherit; padding: .5rem .65rem; border: 1px solid #aab6bd; border-radius: var(--raio); }
.resultados { list-style: none; margin: .5rem 0 0; padding: 0; border: 1px solid var(--linha); border-radius: var(--raio); max-height: 16rem; overflow-y: auto; }
.resultados:empty { display: none; }
.resultados li + li { border-top: 1px solid var(--linha); }
.resultados button { display: block; width: 100%; text-align: left; font: inherit; background: #fff; border: 0; padding: .55rem .75rem; cursor: pointer; color: var(--tinta); }
.resultados button:hover, .resultados button:focus-visible { background: #eaf3f5; }
.resultados .sub, .selecionado .sub { display: block; }
.resultados .sem-resultado { padding: .6rem .75rem; color: var(--tinta-suave); }
.selecionado { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem .8rem; background: #e6f3ea; border: 1px solid #a9d3b7; border-radius: var(--raio); color: #14532d; }
.selecionado[hidden], .resultados[hidden] { display: none; }
input[readonly] { background: #eef1f3 !important; color: var(--tinta-suave) !important; }
@media (max-width: 900px) { .filtros { grid-template-columns: 1fr 1fr; } .filtros .botoes { grid-column: 1 / -1; } }
