/* PDV Web — estilos próprios (Bootstrap 5.3 por baixo) */
:root {
  --cor-marca: #15803d;
  --cor-marca-escura: #14532d;
}
body { background: #f3f4f6; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.topo { background: var(--cor-marca-escura); }
.topo .nav-link.active { background: rgba(255,255,255,.15); border-radius: 8px; }
.conteudo { padding: 20px; max-width: 1400px; }
.btn-primary { --bs-btn-bg: var(--cor-marca); --bs-btn-border-color: var(--cor-marca); --bs-btn-hover-bg: var(--cor-marca-escura); --bs-btn-hover-border-color: var(--cor-marca-escura); }

/* Login */
.layout-publico { background: linear-gradient(160deg, #14532d, #052e16); min-height: 100vh; }
.publico-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.cartao-publico { width: 100%; max-width: 440px; border: 0; border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.cartao-publico.cartao-largo { max-width: 980px; }
.plano-card { border: 1px solid #e5e7eb; }
.plano-card.destaque { border: 2px solid var(--cor-marca); }
.plano-card .preco { font-size: 2rem; font-weight: 800; color: var(--cor-marca-escura); white-space: nowrap; }
.plano-card .preco small { font-size: .9rem; font-weight: 400; color: #6b7280; }
.texto-legal h2 { font-size: 1.1rem; font-weight: 700; margin-top: 1.2rem; }
.texto-legal p, .texto-legal li { font-size: .95rem; }
.cartao-publico .marca { font-size: 1.6rem; font-weight: 800; text-align: center; color: var(--cor-marca-escura); }

/* Indicadores */
.kpi { border: 0; border-radius: 14px; }
.kpi .valor { font-size: 1.7rem; font-weight: 800; white-space: nowrap; }
.kpi.destaque { background: var(--cor-marca); color: #fff; }
.card { border-radius: 14px; }
.text-nowrap-valor { white-space: nowrap; }

/* Tabelas viram cartões no celular */
@media (max-width: 767.98px) {
  .conteudo { padding: 12px; }
  table.tabela-cartoes thead { display: none; }
  table.tabela-cartoes, table.tabela-cartoes tbody, table.tabela-cartoes tr, table.tabela-cartoes td { display: block; width: 100%; }
  table.tabela-cartoes tr { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; margin-bottom: 10px; padding: 8px 12px; }
  table.tabela-cartoes td { border: 0; padding: 3px 0; }
  table.tabela-cartoes td[data-rotulo]::before { content: attr(data-rotulo) ": "; color: #6b7280; font-size: .85em; }
  table.tabela-cartoes td:first-child { font-weight: 700; font-size: 1.05em; }
}

/* ---------- Comandas pelo navegador (toque no computador/celular) ---------- */
.comanda-card.editavel { border: 2px solid var(--cor-marca); }
.comanda-card.consulta { border: 1px dashed #9ca3af; }
.item-com-aviso { background: #fff5f5; }
.grade-produtos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.produto-bloco { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 110px; padding: 12px; border: 0;
  border-radius: 14px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12); text-align: left; transition: transform .1s; }
.produto-bloco:active, .produto-bloco.tocado { transform: scale(.96); background: #dcfce7; }
.produto-bloco:disabled { opacity: .5; }
.produto-bloco .nome { font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.produto-bloco .preco { font-weight: 800; font-size: 1.25rem; color: var(--cor-marca-escura); }
.produto-bloco .setor { font-size: .8rem; color: #6b7280; }
.resumo-comanda { position: sticky; top: 12px; }
@media (max-width: 991.98px) { .resumo-comanda { position: static; } }

/* ---------- Painel BAR / COZINHA em colunas (TV ou tablet, tema escuro, letras grandes) ---------- */
.layout-painel { background: #0b0f14; color: #e5e7eb; }
.painel-wrap { padding: 10px; }
.painel-topo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.painel-topo h1 { font-size: 1.9rem; font-weight: 800; margin: 0; }
.status-conexao { font-size: .9rem; }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; height: calc(100vh - 80px); }
.kanban-coluna { display: flex; flex-direction: column; min-height: 0; background: #0f172a; border-radius: 16px; border-top: 6px solid #64748b; }
.kanban-coluna > header { padding: 10px 14px; font-size: 1.4rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.kanban-coluna > header small { font-size: .8rem; font-weight: 400; opacity: .7; }
.kanban-coluna > header .badge { margin-left: auto; font-size: 1.1rem; background: #334155; }
.coluna-recebido { border-top-color: #3b82f6; }
.coluna-preparando { border-top-color: #f59e0b; }
.coluna-pronto { border-top-color: #22c55e; }
.coluna-pronto .kanban-card { border-color: #16a34a; }
.coluna-entregue { border-top-color: #64748b; }
.coluna-entregue .kanban-card { opacity: .7; }
.kanban-lista { overflow-y: auto; padding: 0 10px 10px; display: flex; flex-direction: column; gap: 10px; }
.kanban-vazio { text-align: center; opacity: .4; font-size: 1.5rem; padding: 30px 0; }
.kanban-card { background: #111827; border: 2px solid #1f2937; border-radius: 14px; padding: 10px 12px; }
.kanban-card.atencao { border-color: #f59e0b; }
.kanban-card.atrasado { border-color: #ef4444; background: #1f1215; }
.kanban-card.novo { animation: piscar 1.2s ease-in-out 3; }
@keyframes piscar { 50% { box-shadow: 0 0 0 6px rgba(59,130,246,.45); } }
.kanban-card .cabecalho { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.kanban-card .rotulo { font-size: 1.45rem; font-weight: 800; line-height: 1.1; }
.kanban-card .hora { font-size: .95rem; opacity: .75; white-space: nowrap; }
.kanban-card.atrasado .hora { color: #fca5a5; opacity: 1; font-weight: 700; }
.kanban-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid #1f2937; }
.kanban-item .qtd { font-size: 1.5rem; font-weight: 800; min-width: 2.6em; text-align: center; white-space: nowrap; }
.kanban-item .nome { flex: 1; font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.kanban-item .nome small { display: block; font-size: .8rem; font-weight: 400; opacity: .7; }
.kanban-item .nome small.aviso-errado { opacity: 1; color: #fca5a5; font-weight: 700; font-size: .9rem; }
.kanban-card .acoes { display: flex; gap: 8px; margin-top: 8px; }
.kanban-card .acoes .btn { flex: 1; min-height: 54px; font-size: 1.1rem; font-weight: 800; border-radius: 12px; }
.kanban-card .acoes .btn-outline-light { flex: 0 0 auto; min-width: 60px; }
.btn-sm-painel { min-height: 46px; min-width: 56px; font-weight: 800; border-radius: 10px; }
.selo-combo { background: #f59e0b; color: #111; font-size: .7rem; font-weight: 800; padding: 2px 6px; border-radius: 6px; vertical-align: middle; }
.kanban-card .terminal { font-size: .8rem; opacity: .55; margin-top: -2px; margin-bottom: 4px; }
.bipar { display: flex; gap: 6px; }
.bipar input { width: 300px; max-width: 60vw; font-size: 1.15rem; padding: 6px 10px; border-radius: 10px; border: 2px solid #3b82f6; background: #0f172a; color: #fff; }
.bipar-msg { font-size: 1.05rem; font-weight: 700; }
.bipar-msg.ok-preparando { color: #fbbf24; }
.bipar-msg.ok-entregue { color: #4ade80; }
.bipar-msg.ok-aviso { color: #93c5fd; }
.bipar-msg.erro { color: #f87171; }
@media (max-width: 991.98px) {
  .kanban { grid-template-columns: 1fr; height: auto; }
  .kanban-lista { overflow: visible; }
}

/* ---------- Telão "Pronto para retirar" (TV para o público) ---------- */
.telao-topo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.telao-topo h1 { font-size: 2.6rem; font-weight: 900; margin: 0; color: #4ade80; }
.telao-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.telao-card { background: #052e16; border: 3px solid #22c55e; border-radius: 20px; padding: 16px; text-align: center; }
.telao-card.novo { animation: piscarVerde 1s ease-in-out 6; }
@keyframes piscarVerde { 50% { background: #15803d; } }
.telao-card .numero { font-size: 4rem; font-weight: 900; line-height: 1; color: #fff; }
.telao-card .rotulo { font-size: 1.4rem; font-weight: 800; color: #bbf7d0; }
.telao-card .onde { font-size: 1.3rem; font-weight: 800; color: #fde047; margin-top: 6px; }
.telao-card .itens { font-size: 1rem; opacity: .8; margin-top: 4px; }
.telao-card .terminal { font-size: .8rem; opacity: .5; }
.telao-preparo { margin-top: 22px; font-size: 1.3rem; opacity: .75; }
.telao-preparo span { display: inline-block; background: #1f2937; border-radius: 10px; padding: 4px 12px; margin: 4px; font-weight: 800; }
.telao-vazio { text-align: center; font-size: 2rem; opacity: .5; padding: 60px 0; }

/* Impressão do fechamento */
@media print {
  body { background: #fff; }
  .conteudo { padding: 0; max-width: none; }
  .card { border: 1px solid #ccc !important; box-shadow: none !important; break-inside: avoid; }
  .kpi.destaque { background: #fff; color: #000; }
}

/* Assinatura Joint System */
.assinatura-js { display:inline-flex; align-items:center; gap:6px; font-size:12px; text-decoration:none !important; line-height:1; }
.assinatura-js span { opacity:.75; font-weight:400; } .assinatura-js b { font-weight:800; margin-right:-3px; }
.assinatura-js-escuro { color:#C9D4E8; } .assinatura-js-escuro:hover { color:#fff; }
.assinatura-js-claro { color:#5B6678; } .assinatura-js-claro:hover { color:#0F1B33; }
.assinatura-rodape { text-align:center; margin:1.5rem 0 .75rem; }
