/* =========================================================
   Gestão Hoteleira — Exímius Event Tech
   Mobile-first, alto contraste, fontes grandes (acessível para idosos)
   ========================================================= */
:root {
  --fundo: #f2f5f9;
  --superficie: #ffffff;
  --texto: #111827;
  --texto-2: #2f3a4a;          /* secundário ainda com contraste AA+ */
  --borda: #9aa7b8;
  --borda-forte: #4b5a6e;
  --primaria: #0b4f8a;         /* azul (contraste 8:1 com branco) */
  --primaria-escura: #083a66;
  --verde: #12703a;            /* Livre */
  --verde-escuro: #0b5229;
  --vermelho: #b0201a;         /* Ocupado */
  --vermelho-escuro: #851610;
  --amarelo: #ffd23f;          /* Limpeza / manutenção (texto escuro) */
  --amarelo-escuro: #c99700;
  --whatsapp: #0f7a43;
  --foco: #ff9f1c;
  --raio: 14px;
  --sombra: 0 2px 6px rgba(15, 23, 42, .12);
  --fonte: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --alt-menu: 76px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; font-size: calc(16px * var(--escala, 1)); }
body {
  margin: 0;
  font-family: var(--fonte);
  font-size: calc(18px * var(--escala, 1));
  line-height: 1.45;
  color: var(--texto);
  background: var(--fundo);
  padding-bottom: calc(var(--alt-menu) + env(safe-area-inset-bottom, 0px) + 16px);
  -webkit-tap-highlight-color: transparent;
}
body.sem-menu { padding-bottom: 24px; }
body.com-modal { overflow: hidden; }
img { max-width: 100%; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.3rem; margin: 0 0 .75rem; }
h3 { font-size: 1.15rem; margin: 1rem 0 .5rem; }
p { margin: 0 0 .75rem; }
a { color: var(--primaria); }
code { font-size: .95em; background: #e6ebf2; padding: 1px 5px; border-radius: 4px; }
:focus-visible { outline: 4px solid var(--foco); outline-offset: 2px; }

.pular { position: absolute; left: -9999px; }
.pular:focus { left: 8px; top: 8px; z-index: 100; background: #fff; padding: 12px; }
.oculto-acessivel { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Topo e menu inferior ---------- */
.topo {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: var(--primaria); color: #fff; box-shadow: var(--sombra);
}
.topo-marca { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topo-usuario { font-size: .95rem; font-weight: 600; background: rgba(255,255,255,.18); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }

.menu-inferior {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-top: 2px solid var(--borda);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 8px rgba(0,0,0,.08);
}
.menu-inferior a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--alt-menu); text-decoration: none; color: var(--texto-2); font-weight: 700; font-size: 1rem;
}
.menu-inferior a span { font-size: 1.6rem; line-height: 1; }
.menu-inferior a.ativo { color: var(--primaria); background: #e3eefa; box-shadow: inset 0 4px 0 var(--primaria); }

.faixa-atualizacao { display: block; width: 100%; border: 0; padding: 14px; font: inherit; font-weight: 700; background: var(--amarelo); color: #111; cursor: pointer; }

.conteudo { max-width: 1100px; margin: 0 auto; padding: 16px; outline: none; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: calc(52px * var(--escala-botao, 1)); padding: calc(10px * var(--escala-botao, 1)) calc(18px * var(--escala-botao, 1));
  border: 2px solid transparent; border-radius: var(--raio);
  font: inherit; font-weight: 700; font-size: 1.05rem; line-height: 1.2; text-align: center; text-decoration: none;
  cursor: pointer; user-select: none; transition: transform .08s, filter .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .65; cursor: wait; }
.btn-grande { min-height: calc(62px * var(--escala-botao, 1)); font-size: calc(1.15rem * var(--escala-botao, 1)); padding: 12px 20px; }
.btn-gigante { min-height: calc(74px * var(--escala-botao, 1)); font-size: calc(1.35rem * var(--escala-botao, 1)); padding: 14px 22px; }
.btn-pequeno { min-height: 44px; font-size: 1rem; padding: 6px 12px; }
.btn-largo { width: 100%; }
.btn-primario { background: var(--verde); color: #fff; }
.btn-primario:hover { background: var(--verde-escuro); }
.btn-perigo { background: var(--vermelho); color: #fff; }
.btn-perigo:hover { background: var(--vermelho-escuro); }
.btn-secundario { background: #fff; color: var(--primaria); border-color: var(--primaria); }
.btn-secundario:hover { background: #e9f1fb; }
.btn-amarelo { background: var(--amarelo); color: #111; border-color: var(--amarelo-escuro); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-camera { width: 100%; background: var(--primaria); color: #fff; font-size: 1.25rem; min-height: 80px; }
.btn-camera span { font-size: 2rem; }
.btn-inativo { filter: grayscale(.6); opacity: .8; }
.btn-texto-perigo { background: none; border: 0; color: var(--vermelho); text-decoration: underline; font: inherit; font-weight: 700; padding: 14px; min-height: 48px; cursor: pointer; }
.botoes-coluna { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.botoes-linha { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.botoes-linha > * { flex: 1 1 160px; }
.barra-acao { position: sticky; bottom: calc(var(--alt-menu) + env(safe-area-inset-bottom, 0px)); z-index: 5; padding: 12px 0; background: linear-gradient(transparent, var(--fundo) 25%); }

/* ---------- Estrutura ---------- */
.cabecalho-pagina { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cabecalho-pagina h1 { margin: 0; }
.painel { background: var(--superficie); border: 1px solid #d5dce6; border-radius: var(--raio); padding: 16px; margin: 0 0 16px; box-shadow: var(--sombra); }
.centro { text-align: center; }
.voltar { display: inline-flex; align-items: center; gap: 8px; min-height: calc(60px * var(--escala-botao, 1)); padding: 10px 22px; margin: 0 0 12px;
  font-weight: 800; font-size: calc(1.25rem * var(--escala-botao, 1)); text-decoration: none; color: var(--primaria);
  background: #fff; border: 3px solid var(--primaria); border-radius: var(--raio); box-shadow: var(--sombra); }
.voltar:hover, .voltar:focus-visible { background: #e9f1fb; }
.texto-grande { font-size: 1.15rem; }
.dica { color: var(--texto-2); font-size: 1rem; }
.vazio { color: var(--texto-2); font-size: 1.1rem; padding: 12px 0; }
.rotulo { font-weight: 700; margin: 16px 0 8px; }
.texto-alerta { color: var(--vermelho); font-weight: 700; }
.texto-perigo { color: var(--vermelho); }
.info-destaque { background: #e3eefa; border-left: 6px solid var(--primaria); padding: 12px 14px; border-radius: 8px; font-size: 1.1rem; }
.faixa-aviso { background: #fff4c2; border: 2px solid var(--amarelo-escuro); color: #3a2c00; padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.faixa-sucesso { background: #dcf5e5; border: 2px solid var(--verde); color: #0b3d1f; padding: 14px; border-radius: 10px; font-weight: 700; font-size: 1.15rem; }
.rodape-marca { text-align: center; color: var(--texto-2); font-size: 1rem; margin-top: 24px; }
.carregando { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 48px 0; font-size: 1.2rem; font-weight: 600; }
.spinner { width: 28px; height: 28px; border: 4px solid #c9d3df; border-top-color: var(--primaria); border-radius: 50%; animation: girar .8s linear infinite; display: inline-block; }
.spinner.grande { width: 56px; height: 56px; border-width: 6px; margin: 8px auto 16px; display: block; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- Formulários ---------- */
.formulario { display: flex; flex-direction: column; gap: 4px; }
.campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-weight: 700; }
.campo > span { font-size: 1.05rem; }
input, select, textarea {
  font: inherit; font-size: 1.15rem; color: var(--texto);
  width: 100%; min-height: 56px; padding: 10px 14px;
  border: 2px solid var(--borda-forte); border-radius: 10px; background: #fff;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primaria); outline: 3px solid rgba(11,79,138,.3); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; }
.campo-destaque input { border-color: var(--primaria); border-width: 3px; background: #f3f8ff; }
.preenchido-ocr { background: #eefbf2 !important; border-color: var(--verde) !important; }
.erro-campo { color: var(--vermelho); font-weight: 700; }
.linha-2 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 520px) { .linha-2 { grid-template-columns: 1fr 1fr; } .campo-uf { max-width: 140px; } }
.mais-campos { border: 2px dashed var(--borda); border-radius: 10px; padding: 8px 12px; margin: 8px 0 14px; }
.mais-campos summary { cursor: pointer; font-weight: 700; color: var(--primaria); min-height: 44px; display: flex; align-items: center; }
.interruptor { display: flex; align-items: center; gap: 12px; padding: 12px 0; font-weight: 600; cursor: pointer; }
.interruptor input { width: 30px; height: 30px; accent-color: var(--verde); flex-shrink: 0; }
.campo-senha { display: flex; gap: 8px; }
.campo > .rotulo { font-size: 1.05rem; }
/* Etapas do check-in */
.etapas .progresso-passos { margin-bottom: 8px; }
.etapa-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; min-height: 44px; padding: 4px; }
.etapa-btn:disabled { opacity: .5; cursor: not-allowed; }
.barra-etapas { display: flex; gap: 10px; flex-wrap: wrap; }
.barra-etapas .btn-largo { flex: 1 1 220px; }
/* Acompanhantes e documentos */
fieldset.acompanhante { border: 3px solid var(--borda); border-radius: var(--raio); padding: 12px; margin: 0 0 14px; min-width: 0; }
fieldset.acompanhante.sem-foto { border-color: var(--vermelho); background: #fff7f7; }
fieldset.acompanhante.com-foto { border-color: var(--verde); }
fieldset.acompanhante legend { font-weight: 800; padding: 0 6px; }
.foto-acomp, .foto-pendente img { max-width: 100%; max-height: 180px; border-radius: 8px; border: 2px solid var(--borda); display: block; margin: 8px 0; }
.foto-pendente { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #eefbf2; border: 2px solid var(--verde); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; font-weight: 700; }
.foto-pendente img { max-height: 90px; margin: 0; }
.docs-miniaturas { display: flex; gap: 10px; flex-wrap: wrap; }
.doc-miniatura { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--texto-2); }
.doc-miniatura img { width: 96px; height: 68px; object-fit: cover; border-radius: 6px; border: 2px solid var(--borda); }
.acomp-item { align-items: center; }
.btn-pequeno { min-height: calc(44px * var(--escala-botao, 1)); padding: 6px 12px; font-size: 1rem; }
/* Ditado por voz */
.ditado { border: 2px dashed var(--primaria); border-radius: var(--raio); padding: 10px 12px; margin: 10px 0 14px; }
.ditado h3 { margin: 0 0 4px; }
.gravando { background: var(--vermelho) !important; color: #fff !important; border-color: var(--vermelho) !important; animation: pulsar 1.2s infinite; }
@keyframes pulsar { 50% { opacity: .75; } }
/* Aniversariantes do dia */
.faixa-aniversario { background: #fff4d6; border: 3px solid var(--amarelo-escuro); border-radius: var(--raio); padding: 10px 14px; margin: 0 0 12px; }
.faixa-aniversario summary { font-weight: 800; font-size: 1.1rem; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.item-destaque { border-color: var(--primaria) !important; }
/* Página pública de reservas */
.tela-reserva { max-width: 900px; }
.grade-reserva { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.grade-reserva .escolha { align-items: flex-start; text-align: left; gap: 4px; padding: 12px; }
.valor-reserva { font-weight: 900; font-size: 1.15rem; }
.previa-interface { border: 2px dashed var(--borda); border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
input[type=range] { min-height: 44px; padding: 0; accent-color: var(--primaria); }
fieldset.sem-borda { border: 0; padding: 0; margin: 0; min-width: 0; }
.barra-qtd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 12px; }
.barra-qtd .rotulo { width: 100%; margin: 0; }
.barra-qtd .qtd-livre { width: 76px; min-height: 52px; text-align: center; }
.campo > .dica { font-weight: 400; margin: 0; }
.campo-cnpj { display: flex; gap: 8px; }
.campo-cnpj input { flex: 1; min-width: 0; }
.campo-cnpj .btn { flex-shrink: 0; min-height: 56px; }
@media (max-width: 380px) { .campo-cnpj { flex-direction: column; } }
.status-cnpj { border: 2px solid var(--borda); border-left-width: 8px; border-radius: 10px; padding: 10px 12px; font-weight: 600; line-height: 1.35; }
.status-buscando { border-color: var(--primaria); background: #eef5fc; }
.status-ok { border-color: var(--verde); background: #eefbf2; color: var(--verde-escuro); }
.status-alerta { border-color: var(--amarelo-escuro); background: #fff8dc; color: #5c4500; }
.status-erro { border-color: var(--vermelho); background: #fdeeee; color: var(--vermelho-escuro); }
.btn-ver-senha { min-width: 56px; border: 2px solid var(--borda-forte); border-radius: 10px; background: #fff; font-size: 1.4rem; cursor: pointer; }
.ou { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--texto-2); font-weight: 600; }
.ou::before, .ou::after { content: ""; flex: 1; border-top: 2px solid #ccd5e0; }

/* Opções (radio em botões grandes) */
.opcoes { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); margin-bottom: 12px; }
@media (min-width: 560px) { .opcoes-4 { grid-template-columns: repeat(4, 1fr); } .opcoes-3 { grid-template-columns: repeat(3, 1fr); } }
.opcoes-3 { grid-template-columns: repeat(3, 1fr); }
.opcao { position: relative; cursor: pointer; }
.opcao input { position: absolute; opacity: 0; inset: 0; }
.opcao span {
  display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 60px; padding: 8px; border: 2px solid var(--borda-forte); border-radius: 12px; background: #fff; font-weight: 700;
}
.opcao input:checked + span { background: var(--primaria); color: #fff; border-color: var(--primaria-escura); box-shadow: 0 0 0 3px rgba(11,79,138,.25); }
.opcao input:focus-visible + span { outline: 4px solid var(--foco); }

/* Stepper +/- */
.stepper { display: grid; grid-template-columns: 72px 1fr 72px; gap: 10px; align-items: stretch; max-width: 360px; margin-bottom: 12px; }
.stepper input { text-align: center; font-size: 1.8rem; font-weight: 800; min-height: 68px; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.btn-step { font-size: 2.2rem; font-weight: 800; border-radius: 12px; border: 2px solid var(--primaria); background: #fff; color: var(--primaria); cursor: pointer; min-height: 68px; }
.btn-step:active { background: var(--primaria); color: #fff; }
.dias-rapidos { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.btn-dia { flex: 1 1 56px; min-height: calc(56px * var(--escala-botao, 1)); font: inherit; font-size: 1.3rem; font-weight: 800; border: 2px solid var(--borda-forte); background: #fff; border-radius: 12px; cursor: pointer; }
.btn-dia.ativo { background: var(--primaria); color: #fff; border-color: var(--primaria); }

/* ---------- Mapa de quartos ---------- */
.resumo-mapa { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
@media (min-width: 640px) { .resumo-mapa { grid-template-columns: repeat(4, 1fr); } }
.filtro { min-height: 56px; border-radius: 12px; border: 2px solid var(--borda-forte); background: #fff; font: inherit; font-weight: 700; cursor: pointer; color: var(--texto); }
.filtro b { font-size: 1.3rem; margin-right: 4px; }
.filtro-livre b { color: var(--verde); } .filtro-ocupado b { color: var(--vermelho); } .filtro-limpeza b { color: #7a5c00; }
.filtro.ativo { background: var(--texto); color: #fff; border-color: var(--texto); }
.filtro.ativo b { color: #fff; }
.grade-quartos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .grade-quartos { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; } }
.quarto { position: relative; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; box-shadow: 0 3px 8px rgba(0,0,0,.18); min-height: 170px; }
.quarto-acao { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 12px; text-decoration: none; color: inherit; }
.quarto-num { font-size: 2.1rem; font-weight: 900; line-height: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.quarto-tipo { font-size: 1.1rem; font-weight: 700; }
.quarto-hospede { font-size: 1.1rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.quarto-info { font-size: 1rem; font-weight: 600; }
.quarto-valor { font-size: 1.2rem; font-weight: 800; margin-top: auto; }
.quarto-valor small { font-size: .9rem; font-weight: 600; }
.quarto-cta { display: block; margin-top: 6px; padding: 8px; border-radius: 10px; text-align: center; font-weight: 800; background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.75); font-size: 1rem; }
.quarto-livre { background: var(--verde); color: #fff; }
.quarto-ocupado { background: var(--vermelho); color: #fff; }
.quarto-limpeza { background: var(--amarelo); color: #111; border: 3px solid var(--amarelo-escuro); }
.quarto-estatico { cursor: default; }
.quarto-mais { position: absolute; top: 6px; right: 6px; width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255,255,255,.8); background: rgba(0,0,0,.15); color: #fff; font-size: 1.6rem; font-weight: 900; cursor: pointer; line-height: 1; }
.btn-liberar { margin: 0 10px 10px; background: #111; color: #fff; min-height: 56px; }
.selo { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .02em; padding: 3px 8px; border-radius: 999px; background: #fff; color: #111; vertical-align: middle; border: 1px solid #111; }
.selo-alerta { background: #111; color: var(--amarelo); border-color: #111; }
.selo-grande { font-size: 1rem; padding: 6px 12px; margin-top: 8px; }
.selo-livre { background: var(--verde); color: #fff; border-color: var(--verde); }
.selo-ocupado { background: var(--vermelho); color: #fff; border-color: var(--vermelho); }
.selo-limpeza, .selo-manutencao { background: var(--amarelo); color: #111; border-color: var(--amarelo-escuro); }

/* ---------- Check-in ---------- */
.passo { background: var(--superficie); border-radius: var(--raio); padding: 16px; margin-bottom: 16px; border: 1px solid #d5dce6; box-shadow: var(--sombra); }
.passo h2 { display: flex; align-items: center; gap: 10px; }
.num-passo { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--primaria); color: #fff; font-weight: 900; }
.cartao-selecionado { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; background: #eefbf2; border: 3px solid var(--verde); border-radius: 12px; padding: 14px; }
.grade-escolha { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.escolha { display: flex; flex-direction: column; gap: 2px; align-items: center; padding: 10px; min-height: 92px; border: 2px solid var(--verde); background: #fff; color: var(--texto); border-radius: 12px; font: inherit; cursor: pointer; }
.escolha b { font-size: 1.6rem; color: var(--verde); }
.escolha.ativo { background: var(--verde); color: #fff; box-shadow: 0 0 0 4px rgba(18,112,58,.3); }
.escolha.ativo b { color: #fff; }

/* ---------- Listas ---------- */
.lista { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.item-lista { display: flex; flex-direction: column; gap: 2px; text-align: left; width: 100%; padding: 14px 16px; min-height: 64px; background: #fff; color: var(--texto); border: 2px solid #c9d3df; border-radius: 12px; font: inherit; text-decoration: none; cursor: pointer; }
.item-lista:hover { border-color: var(--primaria); }
.item-lista b { font-size: 1.1rem; }
.item-lista.inativo { opacity: .7; background: #eef1f5; }
.item-lista:disabled { cursor: default; }
.item-lista.destaque { border-color: var(--amarelo-escuro); background: #fff8d9; }
.item-com-acao { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; cursor: default; flex-wrap: wrap; }
.item-com-acao > div { display: flex; flex-direction: column; flex: 1 1 200px; }
.lista-itens { list-style: none; padding: 0; margin: 0; }
.lista-itens li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid #dde3eb; }
.lista-itens li > span:first-child { flex: 1; }
.lista-itens small { display: block; color: var(--texto-2); font-size: .95rem; }
.lista-itens .valor { font-weight: 800; white-space: nowrap; }
.lista-log li { font-size: 1rem; }
.btn-remover { width: 48px; height: 48px; border-radius: 10px; border: 2px solid var(--vermelho); background: #fff; color: var(--vermelho); font-size: 1.3rem; font-weight: 900; cursor: pointer; flex-shrink: 0; }

/* ---------- Hospedagem ---------- */
.topo-hospedagem { border-radius: var(--raio); padding: 16px; margin-bottom: 16px; color: #fff; box-shadow: var(--sombra); }
.topo-hospedagem.ocupado { background: var(--vermelho); }
.topo-hospedagem.encerrado { background: #334155; }
.topo-hospedagem h1 { font-size: 1.5rem; margin: 4px 0; overflow-wrap: anywhere; }
.th-quarto { font-size: 1.15rem; } .th-quarto b { font-size: 1.9rem; } .th-quarto span { font-weight: 600; }
.th-info { display: flex; flex-wrap: wrap; gap: 4px 16px; font-weight: 600; }
.th-datas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.th-datas div { background: rgba(255,255,255,.15); border-radius: 10px; padding: 8px 10px; }
.th-datas small { display: block; font-size: .95rem; } .th-datas b { font-size: 1.05rem; }
.topo-hospedagem .btn-whatsapp { border: 2px solid #fff; margin-top: 8px; }
.grade-produtos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 640px) { .grade-produtos { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } }
.produto { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 108px; padding: 8px 4px; border: 2px solid var(--borda-forte); background: #fff; border-radius: 14px; font: inherit; color: var(--texto); cursor: pointer; text-align: center; transition: transform .1s, background .2s; }
.produto b { font-size: 1rem; line-height: 1.15; }
.produto span:last-child { font-size: .95rem; font-weight: 700; color: var(--verde-escuro); }
.produto-icone { font-size: 2.1rem; line-height: 1; }
.produto.tocado { background: #dcf5e5; transform: scale(.95); border-color: var(--verde); }
.produto-outro { border-style: dashed; }

/* Conta */
.conta { background: #f7f9fc; border: 2px solid #d5dce6; border-radius: 12px; padding: 6px 14px; margin-bottom: 12px; }
.conta-linha { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #dde3eb; font-size: 1.08rem; }
.conta-linha:last-child { border-bottom: 0; }
.conta-linha b { white-space: nowrap; }
.conta-sub { font-weight: 700; }
.conta-total { font-size: 1.35rem; font-weight: 900; }
.conta-gigante { font-size: 1.5rem; background: #fff4c2; margin: 6px -14px -6px; padding: 16px 14px; border-radius: 0 0 10px 10px; }
.conta-gigante b { font-size: 1.8rem; }

/* ---------- Menu / números ---------- */
.grade-menu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
@media (min-width: 720px) { .grade-menu { grid-template-columns: repeat(3, 1fr); } }
.item-menu { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 120px; padding: 14px; background: #fff; border: 2px solid #c9d3df; border-radius: 14px; text-decoration: none; color: var(--texto); font: inherit; text-align: left; cursor: pointer; }
.item-menu span { font-size: 2rem; }
.item-menu b { font-size: 1.1rem; }
.item-menu small { font-size: .95rem; color: var(--texto-2); }
.item-menu:hover { border-color: var(--primaria); }
.item-instalar { display: none; }
body.pode-instalar .item-instalar { display: flex; border-color: var(--verde); }
.abas { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.abas-rolagem { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.aba { flex: 1 0 auto; min-height: 52px; padding: 8px 14px; border-radius: 12px; border: 2px solid var(--borda-forte); background: #fff; font: inherit; font-weight: 700; cursor: pointer; color: var(--texto); white-space: nowrap; }
.aba.ativo { background: var(--primaria); color: #fff; border-color: var(--primaria); }
.grade-numeros { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 720px) { .grade-numeros { grid-template-columns: repeat(4, 1fr); } }
.numero { background: #fff; border: 2px solid #c9d3df; border-left-width: 8px; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; }
.numero small { font-size: 1rem; font-weight: 700; color: var(--texto-2); }
.numero b { font-size: 1.35rem; overflow-wrap: anywhere; }
.numero span { font-size: .95rem; color: var(--texto-2); }
.numero-verde { border-left-color: var(--verde); } .numero-vermelho { border-left-color: var(--vermelho); } .numero-azul { border-left-color: var(--primaria); }
.tabela-rolagem { overflow-x: auto; }
.tabela { width: 100%; border-collapse: collapse; font-size: 1.02rem; }
.tabela th, .tabela td { padding: 10px 8px; border-bottom: 1px solid #dde3eb; text-align: right; white-space: nowrap; }
.tabela th:first-child, .tabela td:first-child { text-align: left; }
.tabela tfoot td { font-weight: 800; border-top: 2px solid var(--borda-forte); }
.grade-icones { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; margin-bottom: 12px; }
.opcao-icone { position: relative; cursor: pointer; }
.opcao-icone input { position: absolute; opacity: 0; }
.opcao-icone span { display: flex; align-items: center; justify-content: center; height: 52px; font-size: 1.7rem; border: 2px solid #c9d3df; border-radius: 10px; background: #fff; }
.opcao-icone input:checked + span { border-color: var(--primaria); background: #e3eefa; box-shadow: 0 0 0 3px rgba(11,79,138,.3); }

/* ---------- Login / Setup ---------- */
.tela-login, .tela-setup { max-width: 520px; margin: 0 auto; text-align: center; padding-top: 12px; }
.tela-login .formulario, .tela-setup .formulario { text-align: left; }
.logo-login { font-size: 4rem; line-height: 1; margin: 8px 0; }
.progresso-passos { list-style: none; display: flex; gap: 6px; padding: 0; margin: 16px 0; }
.progresso-passos li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 700; color: var(--texto-2); font-size: 1rem; }
.progresso-passos li span { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 3px solid var(--borda-forte); background: #fff; font-weight: 900; }
.progresso-passos li.atual { color: var(--primaria); } .progresso-passos li.atual span { background: var(--primaria); color: #fff; border-color: var(--primaria); }
.progresso-passos li.feito span { background: var(--verde); color: #fff; border-color: var(--verde); }

/* ---------- Modal ---------- */
.modal-fundo { position: fixed; inset: 0; z-index: 50; background: rgba(15,23,42,.6); display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; width: 100%; max-width: 560px; max-height: 94vh; max-height: 94dvh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px)); animation: subir .2s ease-out; }
.modal-largo { max-width: 720px; }
@media (min-width: 640px) { .modal-fundo { align-items: center; } .modal { border-radius: 20px; } }
@keyframes subir { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.modal-topo { position: sticky; top: 0; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 10px; border-bottom: 2px solid #e1e7ef; margin-bottom: 14px; z-index: 1; }
.modal-topo h2 { margin: 0; font-size: 1.35rem; }
.btn-fechar { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--borda-forte); background: #fff; font-size: 1.4rem; font-weight: 900; cursor: pointer; flex-shrink: 0; color: var(--texto); }
.ocr-progresso { text-align: center; padding: 12px 0 20px; }
.barra { height: 18px; background: #e1e7ef; border-radius: 999px; overflow: hidden; margin: 12px 0; }
.barra-preenchida { height: 100%; background: var(--verde); transition: width .3s; }

/* ---------- Avisos ---------- */
.avisos { position: fixed; left: 12px; right: 12px; bottom: calc(var(--alt-menu) + env(safe-area-inset-bottom, 0px) + 12px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.aviso { pointer-events: auto; max-width: 560px; width: 100%; padding: 16px 18px; border-radius: 12px; font-weight: 700; font-size: 1.1rem; color: #fff; background: #14532d; box-shadow: 0 6px 18px rgba(0,0,0,.25); animation: subir .2s ease-out; transition: opacity .3s; }
.aviso-erro { background: var(--vermelho-escuro); }
.aviso.saindo { opacity: 0; }
body.sem-menu .avisos { bottom: 16px; }

/* ---------- Comprovante ---------- */
.recibo { background: #fff; color: #000; max-width: 480px; margin: 12px auto; padding: 20px 18px; border: 1px dashed #555; border-radius: 6px; font-size: 1.02rem; }
.recibo-topo { text-align: center; border-bottom: 2px dashed #000; padding-bottom: 10px; margin-bottom: 10px; }
.recibo-topo h1 { font-size: 1.4rem; margin-bottom: 4px; }
.recibo-topo p { margin: 0; }
.recibo-titulo { display: flex; flex-direction: column; align-items: center; margin-bottom: 10px; }
.recibo-titulo b { font-size: 1.1rem; }
.recibo-titulo small { font-weight: 700; letter-spacing: .04em; }
.recibo-dados { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 12px; }
.recibo-dados dt { font-weight: 700; } .recibo-dados dd { margin: 0; }
.recibo-itens { width: 100%; border-collapse: collapse; }
.recibo-itens th, .recibo-itens td { padding: 6px 0; border-bottom: 1px dotted #777; text-align: left; vertical-align: top; }
.recibo-itens th:last-child, .recibo-itens td:last-child { text-align: right; white-space: nowrap; padding-left: 8px; }
.recibo-total td { font-weight: 900; font-size: 1.15rem; border-top: 2px solid #000; }
.recibo-rodape { text-align: center; margin-top: 14px; border-top: 2px dashed #000; padding-top: 10px; }
.recibo-rodape p { margin: 0 0 4px; }
.recibo-marca { font-size: .85rem; }
.so-imprimir { display: none; }

/* ---------- Impressão ---------- */
@media print {
  body { background: #fff; padding: 0; font-size: 12pt; }
  .nao-imprimir, .topo, .menu-inferior, .avisos, .faixa-atualizacao, .modal-fundo, .voltar { display: none !important; }
  .so-imprimir { display: block; }
  .conteudo { padding: 0; max-width: none; }
  .painel, .numero { box-shadow: none; break-inside: avoid; }
  .recibo { border: 0; margin: 0 auto; max-width: none; }
  body.imprimir-a4 .recibo { max-width: 170mm; font-size: 12pt; }
  body.imprimir-termica { font-family: "Courier New", ui-monospace, monospace; }
  body.imprimir-termica .recibo { width: 72mm; max-width: 72mm; padding: 0; font-size: 9.5pt; margin: 0; line-height: 1.25; }
  body.imprimir-t58 .recibo { width: 48mm; max-width: 48mm; font-size: 8pt; }
  body.imprimir-t58 .recibo-topo h1 { font-size: 10pt; }
  body.imprimir-t58 .recibo-dados { grid-template-columns: 1fr; gap: 0; }
  body.imprimir-t58 .recibo-dados dd { margin-bottom: 2px; }
  body.imprimir-termica .recibo-itens th, body.imprimir-termica .recibo-itens td { padding: 2px 0; }
  body.imprimir-termica .recibo-topo h1 { font-size: 12pt; }
  body.imprimir-termica .recibo-total td { font-size: 10.5pt; }
  body.imprimir-termica .conteudo > :not(.recibo) { display: none !important; }
}
@page { margin: 8mm; }
