:root {
  --marca: #2b4c7e;
  --marca-escura: #1f3a63;
  --destaque: #ccf5ac;
  --fundo: #f4f7fb;
  --lateral: 240px;
}

body { background: var(--fundo); font-family: "PT Sans", system-ui, -apple-system, "Segoe UI", sans-serif; color: #1f2a44; }

.btn-marca { background: var(--marca); color: var(--destaque); font-weight: 700; border: 0; }
.btn-marca:hover, .btn-marca:focus { background: var(--marca-escura); color: var(--destaque); }

/* Telas de acesso */
.acesso { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.acesso .card { width: 100%; max-width: 400px; border: 0; border-radius: 14px; box-shadow: 0 10px 30px rgb(43 76 126 / 12%); }
.acesso .marca { color: var(--marca); font-weight: 700; font-size: 26px; text-decoration: none; }

/* Estrutura do painel */
.lateral { position: fixed; inset: 0 auto 0 0; width: var(--lateral); background: var(--marca); color: #fff; display: flex;
           flex-direction: column; padding: 20px 14px; z-index: 1030; transition: transform .2s; }
.lateral .marca { color: var(--destaque); font-weight: 700; font-size: 20px; text-decoration: none; padding: 0 8px 18px; }
.lateral .nav-link { color: #dfe7f3; border-radius: 8px; padding: 9px 12px; }
.lateral .nav-link:hover { background: rgb(255 255 255 / 8%); color: #fff; }
.lateral .nav-link.ativo { background: rgb(255 255 255 / 14%); color: #fff; font-weight: 700; }
.lateral .usuario { margin-top: auto; font-size: 13px; color: #c8d4e6; padding: 0 8px; }
.conteudo { margin-left: var(--lateral); padding: 28px; min-height: 100vh; }
.barra-movel { display: none; }

@media (max-width: 991px) {
  .lateral { transform: translateX(-100%); }
  .lateral.aberta { transform: none; box-shadow: 0 0 40px rgb(0 0 0 / 30%); }
  .conteudo { margin-left: 0; padding: 16px; }
  .barra-movel { display: flex; align-items: center; justify-content: space-between; background: var(--marca);
                 color: var(--destaque); padding: 10px 16px; font-weight: 700; position: sticky; top: 0; z-index: 1020; }
}

.cartao { background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgb(43 76 126 / 7%); padding: 20px; }
.metrica .valor { font-size: 30px; font-weight: 700; color: var(--marca); line-height: 1.1; }
.metrica .rotulo { color: #5b6b85; font-size: 14px; }
.metrica-link { display: block; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.metrica-link:hover, .metrica-link:focus-visible { box-shadow: 0 4px 16px rgb(43 76 126 / 16%); transform: translateY(-2px); }
.metrica-link .rotulo::after { content: " →"; }

.table > :not(caption) > * > * { vertical-align: middle; }
.table-responsive { border-radius: 12px; }
.codigo { font-family: ui-monospace, monospace; font-size: 12.5px; }

.badge-situacao { font-weight: 600; }
.badge-pago { background: #d7f5dd; color: #146c2e; }
.badge-pendente { background: #fff1c2; color: #7a5b00; }
.badge-vencido { background: #ffe0dc; color: #9b1c1c; }
.badge-cancelado, .badge-desativado { background: #e5e7eb; color: #374151; }

#qr-cardapio svg { width: 180px; height: 180px; }

/* Editor visual (tela cheia, por cima da lateral) */
.editor-tela { position: fixed; inset: 0; z-index: 1035; display: flex; flex-direction: column; background: #dfe5ee; }
.editor-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 14px; background: var(--marca); color: #fff; }
.editor-nome { display: flex; flex-direction: column; line-height: 1.2; margin-right: auto; min-width: 0; }
.editor-nome strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.editor-status { font-size: 12px; color: #c8d4e6; }
.editor-status.pendente { color: var(--destaque); font-weight: 700; }
.editor-acoes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.editor-corpo { flex: 1; display: flex; min-height: 0; }
.editor-palco { flex: 1; display: flex; justify-content: center; padding: 12px; min-width: 0; overflow: auto; }
.editor-palco iframe { width: 100%; height: 100%; border: 0; background: #fff; border-radius: 6px; box-shadow: 0 4px 20px rgb(0 0 0 / 12%); }
.editor-palco.celular iframe { width: 390px; max-width: 100%; }
.editor-lado { width: 300px; flex-shrink: 0; background: #fff; padding: 16px; overflow: auto; box-shadow: -4px 0 16px rgb(0 0 0 / 8%); }
.editor-dica { font-size: 12.5px; color: #4a5872; padding: 6px 14px; background: #eef2f8; border-top: 1px solid #d5dce8; }
@media (max-width: 767px) {
  .editor-palco { padding: 0; }
  .editor-palco iframe { border-radius: 0; }
  .editor-lado { position: absolute; inset: auto 0 0 0; width: auto; max-height: 60vh; z-index: 2; }
  .editor-dica { display: none; }
  .editor-barra [data-tela] { display: none; }
}
.vazio { color: #6b7a93; text-align: center; padding: 40px 10px; }
