/* Partigiana HUB: estrutura original e tema v12. */
:root { 
    --bg: #1e1e2e; 
    --surface: #2a2a3b; 
    --primary: #00d289; 
    --text: #ffffff; 
    --border: #3f3f5a; 
    --danger: #ff4a4a;
    --radius: 10px;
}
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: var(--bg); color: var(--text); margin: 0; padding: 0; overflow-x: hidden; }
* { box-sizing: border-box; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

header { display: flex; justify-content: center; align-items: center; padding: 15px 20px; background: var(--surface); border-bottom: 1px solid var(--border); position: relative; height: 70px; }
.header-left { position: absolute; left: 20px; display: flex; align-items: center; gap: 15px; }
.hamburger-btn { background: transparent; color: var(--text); border: none; font-size: 28px; cursor: pointer; padding: 5px; }
.hamburger-btn:hover { color: var(--primary); }
.btn-home { background: transparent; color: var(--primary); border: 1px solid var(--primary); border-radius: var(--radius); padding: 8px 15px; font-weight: bold; cursor: pointer; font-size: 14px; transition: 0.2s; }
.btn-home:hover { background: var(--primary); color: #000; }

.btn-success { background: var(--primary) !important; color: #000 !important; font-weight: bold; border: none !important; border-radius: var(--radius); cursor: pointer; padding: 10px 20px; font-size: 16px; }
.btn-success:disabled { background: #555 !important; color: #888 !important; cursor: not-allowed; }

.sidebar { position: fixed; top: 0; left: -280px; width: 280px; height: 100vh; background: var(--surface); border-right: 1px solid var(--border); z-index: 2000; transition: left 0.3s ease; display: flex; flex-direction: column; padding: 70px 0 20px 0; box-shadow: 5px 0 15px rgba(0,0,0,0.5); overflow-y: auto; }
.sidebar.open { left: 0; }
.sidebar button { background: transparent; color: var(--text); border: none; padding: 20px; text-align: left; font-size: 1.1em; border-bottom: 1px solid var(--border); cursor: pointer; width: 100%; border-radius: 0; }
.sidebar button:hover { background: var(--border); color: var(--primary); padding-left: 25px; }
.close-sidebar { position: absolute; top: 15px; right: 20px; font-size: 28px; cursor: pointer; color: var(--text); }
.close-sidebar:hover { color: var(--danger); }
.sidebar-bottom { margin-top: auto; border-top: 2px solid var(--border); background: rgba(0,0,0,0.2); }

.sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.6); z-index: 1999; backdrop-filter: blur(2px); }
.sidebar-overlay.open { display: block; }

.view { display: none; padding: 20px; }
.view.active { display: block; }

/* LOGIN VIEW */
#login-view { height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); position: fixed; top: 0; left: 0; width: 100vw; z-index: 9999; }
.login-box { background: var(--surface); padding: 40px; border-radius: var(--radius); border: 1px solid var(--border); width: 350px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.login-box input { width: 100%; padding: 12px; margin-bottom: 20px; background: var(--bg); color: white; border: 1px solid var(--border); border-radius: 5px; outline: none; text-align: center; }
.login-box input:focus { border-color: var(--primary); }

/* KANBAN E OP */
.op-banner { background: var(--surface); border: 1px solid var(--border); padding: 15px 20px; border-radius: var(--radius); margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.status-badge.open { color: var(--primary); font-weight: bold; }
.status-badge.closed { color: var(--danger); font-weight: bold; }

.kanban { display: flex; gap: 20px; height: calc(100vh - 190px); }
.column { flex: 1; background: var(--surface); border-radius: var(--radius); padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.column h3 { margin-top: 0; text-align: center; border-bottom: 1px solid var(--border); padding-bottom: 10px; }

.order-card { background: var(--bg); border: 1px solid var(--border); padding: 10px; border-radius: var(--radius); display: flex; flex-direction: column; }
.order-card-body { flex-grow: 1; cursor: pointer; padding-bottom: 5px; }
.order-card-body:hover { opacity: 0.8; }
.card-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 8px; }
.icon-btn { width: 26px; height: 26px; padding: 0; cursor: pointer; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 12px; transition: 0.2s; }
.icon-btn:hover { background: var(--border); transform: scale(1.1); }

.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.8); z-index: 5000; }
.modal-content { background: var(--bg); width: 95vw; height: 95vh; margin: 2.5vh auto; display: flex; border-radius: var(--radius); overflow: hidden; position: relative; }
.close-btn { position: absolute; top: 10px; right: 20px; font-size: 24px; cursor: pointer; z-index: 1001; }

.pdv-left { width: 30%; background: var(--surface); padding: 20px; display: flex; flex-direction: column; border-right: 1px solid var(--border); overflow-y: auto; }
.pdv-right { width: 70%; padding: 20px; display: flex; flex-direction: column; overflow: hidden; }

/* Formulários */
.form-group { margin-bottom: 15px; width: 100%; }
.form-group label { display: block; margin-bottom: 5px; font-size: 0.9em; color: #aaa; text-align: left; }
.form-group input:not([type="checkbox"]), .form-group select, textarea { width: 100%; padding: 10px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); outline: none; font-family: inherit; resize: vertical; }
.form-group input:focus, textarea:focus { border-color: var(--primary); }

.checkbox-group { max-height: 150px; overflow-y: auto; border: 1px solid var(--border); padding: 12px; border-radius: var(--radius); background: var(--bg); margin-top: 5px; }
.checkbox-item { display: flex; align-items: center; justify-content: flex-start; gap: 10px; margin-bottom: 8px; text-align: left; }
.checkbox-item input[type="checkbox"] { width: 18px !important; height: 18px !important; margin: 0; cursor: pointer; flex-shrink: 0; }
.checkbox-item label { margin: 0 !important; color: var(--text) !important; font-size: 0.95em !important; cursor: pointer; text-align: left; display: block; flex-grow: 1; }

.selection-btn { width: 100%; padding: 12px 15px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 1em; }
.selection-btn:hover { border-color: var(--primary); }

.grid-selection { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; max-height: 50vh; overflow-y: auto; padding-right: 5px; }
.grid-selection-btn { background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 15px; border-radius: var(--radius); cursor: pointer; text-align: center; font-weight: bold; font-size: 1em; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; transition: 0.2s; line-height: 1.2; }
.grid-selection-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

.modifier-grid-btn.selected { background: var(--surface); border-color: var(--primary); color: var(--primary); box-shadow: 0 0 10px rgba(0, 210, 137, 0.2); }

#cart-items { flex-grow: 1; overflow-y: auto; border: 1px solid var(--border); padding: 10px; margin-bottom: 15px; border-radius: var(--radius); background: var(--bg); }
.cart-item { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.9em; border-bottom: 1px dashed var(--border); padding-bottom: 10px; flex-direction: column; }

.category-tabs { display: flex; gap: 10px; margin-bottom: 15px; overflow-x: auto; flex-shrink: 0; }
.category-tabs button { padding: 10px; background: var(--surface); border: 1px solid var(--border); color: white; cursor: pointer; white-space: nowrap; border-radius: var(--radius); }

.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; overflow-y: auto; flex-grow: 1; padding-bottom: 20px; align-content: start; }

/* CARD DE PRODUTO PDV */
.product-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; height: 190px; overflow: hidden; position: relative; transition: 0.2s; }
.product-card:hover { border-color: var(--primary); }
.product-main-click { padding: 10px; flex-grow: 1; display: flex; flex-direction: column; cursor: pointer; }
.product-main-click img { width: 100%; height: 100px; object-fit: cover; border-radius: 5px; margin-bottom: 8px; background: var(--bg); flex-shrink: 0; }
.product-main-click .no-image { width: 100%; height: 100px; border-radius: 5px; margin-bottom: 8px; background: var(--bg); display: flex; align-items: center; justify-content: center; color: #555; font-size: 0.8em; flex-shrink: 0; border: 1px dashed var(--border); }
.product-card-title { font-weight: bold; font-size: 0.9em; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; text-align: center; }
.product-card-price { color: var(--primary); font-size: 0.9em; text-align: center; }

/* BOTÃO DE MODIFICADORES ⚙️ */
.modifier-btn { position: absolute; bottom: 8px; right: 8px; background: var(--bg); color: var(--text); border: 1px solid var(--border); width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer; z-index: 10; transition: 0.2s; box-shadow: 0 4px 6px rgba(0,0,0,0.3); }
.modifier-btn:hover { background: var(--primary); color: #000; border-color: var(--primary); transform: scale(1.1); }

/* PAINEL DIVIDIDO (MODIFICADORES) */
.mod-split-container { display: flex; gap: 20px; width: 100%; flex-grow: 1; min-height: 0; }
.mod-half { flex: 1; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; }
.mod-half h4 { margin: 0 0 10px 0; font-size: 1em; border-bottom: 1px solid var(--border); padding-bottom: 10px; text-align: center; }
.mod-half.exclusion h4 { color: var(--danger); }
.mod-half.addon h4 { color: var(--primary); }

table { width: 100%; border-collapse: collapse; margin-top: 20px; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }

.menu-dashboard { display: flex; flex-direction: column; gap: 20px; }
.menu-top-bar { display: flex; justify-content: space-between; align-items: center; background: var(--surface); padding: 15px; border-radius: var(--radius); border: 1px solid var(--border); }
.toggle-container { display: flex; background: var(--bg); padding: 5px; border-radius: var(--radius); border: 1px solid var(--border); }
.toggle-container button { background: transparent; color: var(--text); border: none; padding: 8px 15px; cursor: pointer; border-radius: calc(var(--radius) - 3px); font-weight: bold; }
.toggle-container button.active { background: var(--primary); color: #000; }
.menu-list { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; }
.menu-item-card { display: flex; justify-content: space-between; align-items: center; background: var(--surface); padding: 15px 20px; border-radius: var(--radius); border: 1px solid var(--border); cursor: pointer; }
.menu-item-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.item-info { display: flex; flex-direction: column; gap: 4px; }
.item-title { font-size: 1.1em; font-weight: bold; }
.item-subtitle { font-size: 0.85em; color: #aaa; }
.item-actions { display: flex; gap: 8px; }
.item-actions button { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; font-size: 0.85em; }
.item-actions button:hover { background: var(--border); border-color: var(--text); }
.item-actions button.btn-delete:hover { background: var(--danger); border-color: var(--danger); color: white; }

.mini-modal { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.8); z-index: 6000; }
.mini-modal-content { background: var(--surface); width: 500px; max-width: 90vw; margin: 10vh auto; padding: 25px; border-radius: var(--radius); border: 1px solid var(--border); position: relative; max-height: 80vh; overflow-y: auto; }

.profile-pic-container { text-align: center; margin-bottom: 20px; }
.profile-pic { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary); background: var(--bg); margin-bottom: 10px; display: inline-block; }

@media print {
    body * { visibility: hidden; }
    .no-print { display: none !important; }
}

/* Ajustes do app Rails (estrutura que no original era montada por JavaScript) */
.mini-modal.open, .modal-overlay.open { display: block; }
.system-dialog-content { width: 350px; max-width: 90vw; height: auto; margin: 30vh auto; display: flex; flex-direction: column; padding: 25px; text-align: center; border: 1px solid var(--border); }
.system-dialog-content h3 { margin-top: 0; color: var(--primary); }
.system-dialog-content p { color: #aaa; margin-bottom: 20px; font-size: 0.95em; line-height: 1.4; text-align: center; }
.system-dialog-content input[type="text"] { padding: 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); color: var(--text); margin-bottom: 20px; outline: none; width: 100%; text-align: center; }
.dialog-buttons { display: flex; gap: 10px; justify-content: center; }
.btn-secondary { padding: 10px 15px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; flex: 1; font-size: 13.33px; font-family: inherit; }
.btn-danger { background: var(--danger); color: white; border: none; padding: 10px; border-radius: var(--radius); font-weight: bold; cursor: pointer; flex: 1; }
.mini-modal-footer { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; }
.mini-modal-footer .btn-cancel { padding: 10px 20px; background: var(--surface); color: white; border: 1px solid var(--border); }
.mini-modal-footer .btn-close { padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); cursor: pointer; color: var(--text); }
.inline-form { display: contents; }
.btn-success.btn-danger-state { background: var(--danger) !important; }
.time-tracker { font-family: monospace; background: var(--bg); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; border: 1px solid var(--border); color: #aaa; }
.empty-hint { color: #888; font-style: italic; grid-column: 1 / -1; font-size: 0.9em; }
.form-errors { color: var(--danger); font-size: 0.9em; margin-bottom: 10px; }
a.menu-item-card, a.order-card-body { color: inherit; text-decoration: none; }
/* Cartões do cardápio: o link ocupa o cartão inteiro (clique abre o detalhe) e os botões ficam por cima. */
.menu-item-card { position: relative; }
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.menu-item-card .item-actions { position: relative; z-index: 1; }

a.icon-btn { text-decoration: none; }
a.btn-success { text-decoration: none; display: inline-block; }
/* No celular o botão "REALIZAR PEDIDO" ficava por cima do "🏠 KANBAN" (bug do antigo). */
@media (max-width: 600px) {
    header { justify-content: flex-end; padding: 15px 10px; }
    .header-left { left: 10px; gap: 8px; }
    #btn-master-pedido { padding: 10px 12px; font-size: 14px; }
}
/* No celular as barras do topo das telas de gestão estouravam a largura da tela e deixavam botões
   inalcançáveis (bug do antigo): abas, títulos e botões passam a ocupar linhas próprias. */
@media (max-width: 600px) {
    .menu-top-bar { flex-wrap: wrap; gap: 10px; }
    .menu-top-bar > * { flex: 1 1 100%; }
    .menu-top-bar > div:not(.toggle-container) { flex-wrap: wrap; }
    .toggle-container button { flex: 1 1 auto; padding: 8px 10px; }

    /* Cartões das listas: os botões (Editar/Duplicar/Excluir) descem para outra linha em vez de sair do cartão. */
    .menu-item-card { flex-wrap: wrap; gap: 10px; }
    .item-actions { flex-wrap: wrap; margin-left: auto; }

    /* Relatório: a tabela rola dentro dela mesma em vez de alargar a página. */
    #reports-table { display: block; overflow-x: auto; }
    #reports-table th, #reports-table td { padding: 8px; }

    /* Kanban: os botões do cartão quebram linha em vez de sair do cartão (o ✏️ ficava cortado). */
    .card-actions { flex-wrap: wrap; }
    .order-card-body > div:first-child { flex-wrap: wrap; gap: 4px; }
}

/* PARTIGIANA HUB — TEMA CLARO v0.5
   APRESENTAÇÃO APENAS. Não altera IDs, eventos, funções ou persistência.
   Para voltar ao layout anterior, retire o <link> deste arquivo no index.html.
*/
:root {
  color-scheme: light;
  --bg:#f7f5f0;
  --surface:#fffefb;
  --primary:#078963;
  --text:#1c3038;
  --border:#dce4dd;
  --danger:#d5444e;
  --radius:14px;
  --muted:#6c7b84;
  --tint:#f0f4f0;
  --soft-green:#e3f5ed;
  --accent:#e6744a;
  --amber:#b36c07;
  --soft-amber:#fff3df;
  --shadow:0 2px 12px rgba(37,65,54,.045);
}
html {background:var(--bg)}
body{background:var(--bg);color:var(--text);font-family:Inter, 'Segoe UI', system-ui,-apple-system,sans-serif;font-size:14px;line-height:1.48}
*{box-sizing:border-box}
*:focus-visible{outline:3px solid rgba(7,137,99,.38);outline-offset:3px}
::selection{background:#b7e6d1;color:#123e32}
::-webkit-scrollbar-track{background:#f1eee8}
::-webkit-scrollbar-thumb{background:#cedbd4}
::-webkit-scrollbar-thumb:hover{background:#88b6a3}
button,input,textarea,select{font:inherit}
button{transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .15s ease}
button:active:not(:disabled){transform:translateY(1px)}
button:disabled{opacity:.6;cursor:not-allowed}
h1,h2,h3,h4{letter-spacing:-.025em;color:var(--text)}
h2{font-size:clamp(20px,2.1vw,26px)}
h3{font-size:19px}
small,.item-subtitle{color:var(--muted)}
#app-container{min-height:100vh}
#app-container>header{position:relative;background:rgba(255,254,251,.97);border-bottom:1px solid #eaece7;box-shadow:0 2px 12px rgba(40,65,55,.035);height:76px;z-index:20;padding:12px 27px}
.header-left{left:26px;gap:17px}
.hamburger-btn{color:#1e443d;padding:5px;font-size:25px}
.hamburger-btn:hover{color:var(--primary)}
.hub-brand{display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:22px;line-height:1;font-weight:800;letter-spacing:-.7px;color:#173e33;pointer-events:none}
.hub-brand .hub-logo{font-size:24px;filter:saturate(.8)}
.hub-brand .hub-label{color:var(--accent);font-size:.67em;margin-left:3px;letter-spacing:-.2px}
.btn-success{background:var(--primary)!important;color:#fff!important;box-shadow:0 4px 12px rgba(7,137,99,.16);font-weight:750;border:1px solid transparent!important;border-radius:11px;padding:11px 19px}
.btn-success:hover:not(:disabled){background:#057653!important;box-shadow:0 6px 17px rgba(7,137,99,.18)}
.btn-success:disabled{background:#d4ddd7!important;color:#6b7a70!important;box-shadow:none}
.btn-home{background:#fffefa;color:#087853;border:1px solid #b9d9c9;border-radius:11px;padding:10px 15px;font-weight:700;box-shadow:none}
.btn-home:hover{background:#e5f5ed;color:#075940;border-color:#65b59a}
#btn-header-kanban{background:#e4f5ed;border:1px solid #e4f5ed;color:#0c684e;padding:12px 14px;box-shadow:none;font-weight:800}
#btn-header-kanban:hover{background:#d7efe3}
#btn-master-pedido{font-size:15px;min-width:208px;letter-spacing:.015em}
.test-environment-badge{background:#fff0d8!important;color:#82500a!important;border:1px solid #ffe3b4!important;border-radius:11px!important;box-shadow:none!important;pointer-events:none!important;right:24px!important;bottom:17px!important;padding:8px 13px!important;font-size:11px!important;font-weight:750!important;letter-spacing:.015em!important}
/* Navigation / sidebar */
.sidebar{background:#fffefb;border-right:1px solid var(--border);box-shadow:6px 0 25px rgba(25,52,43,.13);padding-top:72px}
.sidebar button{color:#315249;border-color:#edf0ed;font-weight:620;font-size:14px;padding:16px 20px}
.sidebar button:hover{background:#eaf7ef;color:#076f53;padding-left:23px}
.sidebar .close-sidebar{color:#38594e}
.sidebar .close-sidebar:hover{color:var(--danger)}
.sidebar-bottom{background:#f6f7f3;border-color:#e4e9e3}
.sidebar-overlay{background:rgba(15,33,29,.28)}
/* Screen spacing and sections */
.view{padding:24px 27px 56px}
.menu-dashboard{gap:18px}
.menu-top-bar,.op-banner{background:var(--surface);border:1px solid #eaece8;border-radius:16px;padding:20px 23px;box-shadow:var(--shadow)}
.menu-top-bar{gap:16px}
.menu-top-bar h2{margin:0}
.op-banner{min-height:91px;margin-bottom:21px;position:relative;overflow:hidden}
.op-banner::before{content:'▣';display:grid;place-items:center;width:52px;height:52px;flex:none;background:#e3f4ec;border-radius:50%;color:#0a7655;font-size:26px;margin-right:9px}
.op-banner>div{flex:1;color:var(--muted);font-size:15px;position:relative;z-index:1}
.op-banner .status-badge.open{color:#07845e}
.op-banner .status-badge.closed{color:#cb4550}
#btn-shift-toggle{background:#fff6f5!important;color:#bd303b!important;border:1px solid #f0a2a8!important;box-shadow:none!important;padding:13px 19px}
#btn-shift-toggle:hover{background:#fff0ee!important}
#btn-shift-toggle[style*="var(--primary)"]{background:var(--primary)!important;color:white!important;border-color:transparent!important}
/* KANBAN: equal-width columns, tinted backgrounds and airy cards */
.kanban{height:auto;min-height:calc(100vh - 232px);align-items:stretch;gap:17px}
.kanban .column{min-width:0;overflow:visible;flex:1;background:#fff7ed;border:1px solid #f4e8d9;border-radius:17px;padding:16px;gap:12px;box-shadow:0 3px 16px rgba(66,54,33,.027)}
.kanban .column#col-delivered{background:#f1f9f5;border-color:#e1f0e7}
.kanban .column#col-canceled{background:#fff4f4;border-color:#f7e5e4}
.column h3{display:flex;align-items:center;justify-content:flex-start;gap:12px;font-size:20px;margin:0 0 2px;padding:6px 3px 16px;text-align:left;border-bottom:2px solid #eea362;color:#242e37;letter-spacing:-.02em}
.column h3::before{content:'♨';width:40px;height:40px;border-radius:50%;display:grid;place-items:center;color:#fff;background:#eb8734;font-size:23px;font-weight:700}
#col-delivered h3{border-bottom-color:#18a074}
#col-delivered h3::before{content:'✓';background:#149b72}
#col-canceled h3{border-bottom-color:#e45a5a}
#col-canceled h3::before{content:'×';background:#dd5259}
.order-card{position:relative;background:#fffefd;border:1px solid #ecebe7;border-left:5px solid #ec8433;border-radius:12px;padding:16px 15px;box-shadow:0 6px 18px rgba(35,49,48,.045);gap:8px}
#col-delivered .order-card{border-left-color:#169b75}
#col-canceled .order-card{border-left-color:#e2515a}
.order-card-body{padding-bottom:7px}
.order-card-body:hover{opacity:1}
.order-card:hover{box-shadow:0 9px 22px rgba(35,49,48,.1);border-top-color:#deded9}
.time-tracker{background:#f8f9f6!important;color:#6b7880!important;border-color:#e0e4e1!important;font-family:inherit!important;font-weight:700!important;padding:4px 7px!important;border-radius:7px!important}
.order-card-body [style*="color:#aaa"],.order-card-body [style*="color:#888"]{color:var(--muted)!important}
.card-actions{border-top:1px solid #ecefea;padding-top:11px;gap:8px}
.icon-btn{background:#f8f9f6;color:#53665c;border-color:#e1e7e2;width:34px;height:34px;border-radius:8px;font-size:15px}
.icon-btn:hover{background:#e9f4ee;transform:none}
.kds-kanban-ready{background:#e1f5ea!important;color:#087a55!important;border:1px solid #bfebd5}
.kds-kanban-progress{background:#fff0dc!important;color:#975800!important;border:1px solid #f9dfac}
/* Product catalog and selection */
.category-tabs{padding-bottom:3px;gap:8px}
.category-tabs button{border-radius:10px;color:#49615b;background:#fffefb;border:1px solid var(--border);padding:10px 15px;font-weight:680}
.category-tabs button:hover{background:#eaf6ef;color:#0c7959}
.products-grid{gap:15px}
.product-card{height:200px;background:#fffefa;border-color:#e6e9e4;border-radius:13px;box-shadow:0 3px 13px rgba(22,40,30,.035)}
.product-card:hover{border-color:#91cbb2;box-shadow:0 7px 19px rgba(12,92,65,.09)}
.product-main-click{padding:11px}
.product-main-click img,.product-main-click .no-image{border-radius:8px;background:#f5f4ef}
.product-main-click .no-image{color:#7e9288;border-color:#e2e7df}
.product-card-title{color:var(--text);font-size:13.5px}
.product-card-price{color:#067e5c;font-weight:760}
.modifier-btn{background:#fffefa;color:#20694c;border-color:#d9e5db;box-shadow:0 2px 6px rgba(25,61,35,.08)}
.modifier-btn:hover{background:#e3f5eb;color:#075b45;transform:none}
.mod-half{background:#fffdfb;border-color:var(--border);border-radius:13px}
.mod-half h4{border-color:#e6eae4}
.mod-half.addon h4{color:#087f60}
.mod-half.exclusion h4{color:#c23e49}
.grid-selection-btn{background:#fffefa;color:#283f37;border:1px solid #e1e9e2;border-radius:11px}
.grid-selection-btn:hover{color:#057653;border-color:#69b999;transform:translateY(-1px)}
.modifier-grid-btn.selected{background:#e2f5e9;color:#075f47;border-color:#56b48f;box-shadow:0 0 0 2px #d6f0e0}
#cart-items{background:#fffefa;border-color:#e5e9e5;border-radius:12px}
.cart-item{border-color:#e8ece7}
/* Tabs, information cards, and table-heavy pages */
.toggle-container{background:#f8f9f6;border:1px solid #e7ebe7;border-radius:12px;padding:5px;gap:4px;align-items:center}
.toggle-container button{color:#425c55;border:1px solid transparent;border-radius:9px;padding:11px 14px;font-size:13px;font-weight:680;white-space:nowrap}
.toggle-container button:hover{background:#ecf5ee;color:#087553}
.toggle-container button.active{background:#dff4e9;color:#086f51;border-color:#b6e6d0;box-shadow:0 1px 2px rgba(0,0,0,.02)}
.menu-item-card{background:#fffefb;border:1px solid #e7ebe6;border-radius:13px;padding:16px 18px;box-shadow:0 3px 12px rgba(20,55,35,.026);gap:12px}
.menu-item-card:hover{border-color:#a7d9be;transform:none;box-shadow:0 5px 15px rgba(20,55,35,.045)}
.item-title{color:#20353d;font-size:15px}
.item-subtitle{font-size:12px;line-height:1.55}
.item-actions button{background:#fffefa;color:#3b5c50;border-color:#dce5dd;border-radius:9px;padding:9px 13px;font-weight:650}
.item-actions button:hover{background:#e5f3eb;border-color:#9dcfb7;color:#135a46}
.item-actions button.btn-delete:hover{background:#fee9e9;border-color:#e5999e;color:#b72f3e}
table{margin-top:15px;width:100%;border-collapse:separate;border-spacing:0;background:#fffefb;border:1px solid #e9ece8;border-radius:12px;overflow:hidden}
th{background:#f6f8f5;color:#556b63;font-size:12px;letter-spacing:.025em;font-weight:730}
th,td{padding:13px 15px;border-bottom:1px solid #edf0eb;vertical-align:middle}
tr:last-child td{border-bottom:none}
tbody tr:hover{background:#f9fbf8}
#reports-view,#print-settings-view{color:var(--text)}
#reports-view>h2,#reports-view>h3{margin-top:8px}
#report-total{color:#087c59;font-weight:800}
#stock-content-area{min-width:0}
#stock-content-area>.menu-top-bar{margin-bottom:15px}
#stock-content-area>.menu-top-bar h3{font-size:19px}
#stock-content-area>.menu-list{margin-top:11px}
#stock-content-area>h4{font-size:17px;padding-top:8px}
#stock-content-area>p{color:var(--muted)!important;line-height:1.65}
.stock-indicators .stock-metric{box-shadow:var(--shadow);border-radius:13px!important}
.stock-alert-pill{background:#fbfbf6!important;font-weight:800;letter-spacing:.012em}
#stock-content-area [style*="color:#ffbf47"]{color:#ac6807!important}
/* Form fields, labels, modal dialogs and client order entry */
.form-group label{color:#546c63;font-size:12px;font-weight:720;margin-bottom:6px}
.form-group input:not([type="checkbox"]),.form-group select,textarea,
#stock-view input:not([type="checkbox"]),#reports-view input:not([type="checkbox"]),
#mini-modal input:not([type="checkbox"]),#mini-modal select,
#stock-view select,#stock-view textarea,#dialog-input{
 background:#fffefa!important;color:#1a3334!important;border:1px solid #d9e3db!important;border-radius:10px!important;
 min-height:39px;box-shadow:0 1px 3px rgba(10,49,28,.025);
}
input::placeholder,textarea::placeholder{color:#95a49d;opacity:1}
input:focus,textarea:focus,select:focus{border-color:#6ab998!important;outline:3px solid rgba(7,137,99,.11)}
input[type="checkbox"]{accent-color:#088962}
input[type="number"]{font-variant-numeric:tabular-nums}
.selection-btn{background:#fffefb;color:var(--text);border-color:#dfe7de;border-radius:11px;min-height:48px}
.selection-btn:hover{border-color:#61b28d;background:#f8fcf9}
.checkbox-group{background:#f9faf7;border-color:#dfe6dd;border-radius:10px}
.checkbox-item label{color:#304c42!important}
.modal-overlay,.mini-modal{background:rgba(28,44,40,.46);backdrop-filter:blur(4px)}
.modal-content,.mini-modal-content{background:#fffefa;border:1px solid #e2e8df;box-shadow:0 20px 60px rgba(10,36,26,.19);border-radius:17px}
.modal-content{max-height:96vh}
.mini-modal-content{padding:27px;max-height:84vh}
.close-btn{color:#637b6e;font-weight:500;cursor:pointer}
.close-btn:hover{color:#bb3943}
.pdv-left{background:#f6f8f4;border-color:#e1e9e0;min-width:290px}
.pdv-right{background:#fffefb;min-width:0}
#order-modal-title{color:#173d31;font-size:24px;margin:8px 0 17px}
#mini-modal-title{font-size:22px;margin:4px 0 20px}
#dialog-title{color:#087b59!important}
#dialog-message{color:var(--muted)!important}
#system-dialog .modal-content{background:#fffefa}
#dialog-buttons button:not(.btn-success){background:#f4f8f3!important;color:#355446!important;border:1px solid #dbe6dc!important;border-radius:9px}
#mini-modal-footer{flex-wrap:wrap}
#profile-view>.menu-dashboard{box-shadow:var(--shadow)}
#profile-view .profile-pic{border-color:#8ad0b3;background:#e9f6eb}
/* KDS is dense by nature, but readable from the kitchen */
#kds-view{background:var(--bg)}
#kds-view:fullscreen{background:var(--bg)!important}
.kds-heading{color:#1b3534;font-size:clamp(24px,2.6vw,31px)}
.kds-sub{color:var(--muted);max-width:690px}
.kds-station{color:#3d5a50;background:#fffefb;border:1px solid #e2e9e2;border-radius:11px}
.kds-station:hover{background:#eff8f2}
.kds-station.active{color:#076f50;background:#e1f4e8;border-color:#8ccdaf}
.kds-stat{background:#fffefa;border:1px solid #e4eae3;border-radius:13px;box-shadow:var(--shadow);padding:17px 19px}
.kds-stat b{color:#145f4a;font-size:30px}
.kds-stat label{color:#657a72;font-size:13px}
.kds-tab{background:#fffefa;color:#415f52;border-color:#dde7de;border-radius:11px}
.kds-tab:hover{background:#eaf7ef}
.kds-tab.active{background:#078963;color:white;border-color:#078963}
.kds-card{background:#fffefa;border:1px solid #e3e9e1;border-top:5px solid #ed8b46;border-radius:15px;box-shadow:0 5px 20px rgba(25,52,41,.07)}
.kds-card-ready{border-top-color:#1ba97c;background:#f8fdf9}
.kds-ticket{color:#8b9b92}
.kds-table{color:#263e3b}
.kds-clock{background:#e5f5eb;color:#087752}
.kds-clock-atencao{background:#fff0da;color:#9b5a04}
.kds-clock-critico{background:#fce3e4;color:#bb3544}
.kds-client{color:#687c71}
.kds-card-meta{background:#f5f8f4;color:#5b6d65;border-color:#e8ede6}
.kds-item{border-bottom-color:#edf1ec}
.kds-item-name{color:#203a35}
.kds-item-ready .kds-item-name{color:#588573;text-decoration-color:#7bbf9a}
.kds-ready-btn{background:#078963;color:#fff;border-radius:10px}
.kds-ready-btn:hover{background:#057452}
.kds-ready-btn.kds-undo{background:#f3f5f1;border:1px solid #cedbd2;color:#3c5c4f}
.kds-mod{background:#f0f4ef;color:#567065}
.kds-mod-minus{color:#b73341;background:#ffedef}
.kds-mod-plus{color:#08794d;background:#e2f6e8}
.kds-obs{background:#fff5e4;color:#935707;border-left-color:#eeaf50}
.kds-all-btn{background:#078963;color:white;border-radius:11px}
.kds-all-undo{background:#e8f2e9;color:#286047}
.kds-empty{background:#fffefb;border-color:#d5e5d7}
.kds-empty p,.kds-info{color:#6a7c72}
/* Fix original inline colors that assume a dark background. Scope to app; leave ticket preview on white untouched */
#app-container [style*="color:#aaa"],#app-container [style*="color: #aaa"],
#mini-modal [style*="color:#aaa"],#mini-modal [style*="color: #aaa"],
#order-modal [style*="color:#aaa"],#order-modal [style*="color: #aaa"] {color:var(--muted)!important}
#app-container [style*="color:#888"],#mini-modal [style*="color:#888"],#order-modal [style*="color:#888"]{color:#788980!important}
#app-container button[style*="color:white"],#app-container button[style*="color: white"]:not(.btn-success),
#order-modal button[style*="color:white"],#mini-modal button[style*="color:white"]{
 color:#28463b!important;
}
/* Selection state and dynamic buttons should remain legible */
#app-container .btn-success[style*="color:white"],#order-modal .btn-success[style*="color:white"],#mini-modal .btn-success[style*="color:white"]{color:white!important}
#app-container button[style*="background:var(--danger)"]{background:#fbe7e6!important;color:#b93341!important;border:1px solid #e89ba0!important}
/* Environment, login, loading, and touch targets */
#login-view{background:radial-gradient(circle at 20% 0%,#e9f6ed 0,transparent 48%),radial-gradient(circle at 100% 90%,#fff1dc 0,transparent 35%),#f7f5f0}
.login-box{background:#fffefb;border-color:#e7ece4;border-radius:19px;box-shadow:0 18px 60px rgba(19,66,44,.085);width:min(410px,calc(100vw - 30px));padding:42px}
.login-box input{background:#f9faf7;color:#1c3831;border-color:#dee9df;border-radius:10px;text-align:left;min-height:48px}
.login-box input:focus{border-color:#80c4a3}
.login-box .btn-success{min-height:49px}
#loader-overlay{background:#f7f5f0!important}
#loader-overlay p{color:#6e8279!important}
#loader-overlay>button{color:#28614a!important;border-color:#c5ddd0!important;border-radius:10px!important}
/* Responsive: preserve all original controls and click handlers */
@media(min-width:1250px){.kanban .column{min-height:500px}.header-left{gap:18px}}
@media(max-width:1140px){
  .hub-brand{font-size:18px}.header-left{left:15px;gap:11px}
  .view{padding:19px 17px 52px}.kanban{gap:11px}
  .kanban .column{padding:11px}
  #app-container>header{padding:12px 17px}
  .order-card{padding:13px 11px}
}
@media(max-width:850px){
  .hub-brand{display:none}
  .kanban{height:auto;min-height:auto;flex-wrap:wrap}
  .kanban .column{flex:1 1 280px;min-height:240px}
  .menu-top-bar{flex-wrap:wrap}
  #stock-view .toggle-container{max-width:100%;overflow-x:auto;flex-wrap:nowrap}
  .modal-content{width:97vw;margin:1.5vh auto;height:97vh}
  .pdv-left{width:38%;min-width:240px;padding:14px}
  .pdv-right{width:62%;padding:14px}
  .kds-board{grid-template-columns:repeat(auto-fit,minmax(290px,1fr))}
}
@media(max-width:600px){
  #app-container>header{height:70px}
  .view{padding:15px 12px 55px}
  .header-left{left:9px;gap:5px}
  .hamburger-btn{font-size:22px}
  #btn-header-kanban{padding:8px 9px;font-size:11px}
  #btn-master-pedido{margin-left:auto;min-width:auto;font-size:11px;padding:10px 11px}
  .test-environment-badge{bottom:7px!important;right:7px!important;font-size:9px!important;max-width:190px;white-space:normal}
  .op-banner{flex-wrap:wrap;padding:15px;gap:10px}
  .op-banner::before{width:38px;height:38px;font-size:19px}
  .op-banner>div{min-width:145px;font-size:13px}
  .kanban{display:flex;flex-direction:column}
  .kanban .column{width:100%;min-height:160px}
  .menu-top-bar{padding:15px}
  .menu-top-bar .toggle-container{width:100%;overflow:auto;flex-wrap:nowrap}
  .modal-content{display:flex;flex-direction:column;overflow:auto}
  .pdv-left,.pdv-right{width:100%;min-width:0;overflow:visible;flex:none}
  .pdv-left{min-height:330px;max-height:none}
  .pdv-right{min-height:340px}
  .products-grid{max-height:450px}
  .mod-split-container{flex-direction:column}
  .mod-half{min-height:150px}
  .kds-dashboard{gap:7px}
  .kds-stat{padding:10px}
  .kds-stat b{font-size:24px}
  .kds-stat label{font-size:11px}
}
/* Printing is a functional output; theme never colors or changes ticket printing. */
@media print{.hub-brand,.test-environment-badge{display:none!important}}

/* Shopping list presentation: use existing sections and click handlers, no new data. */
#stock-view:has([data-stock-tab="compras"].active) #stock-content-area{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:17px;row-gap:0;
 grid-template-areas:
  'shopping-title shopping-title'
  'shopping-note shopping-note'
  'shopping-critical shopping-extras'
  'shopping-list shopping-extras-list'
  'shopping-production shopping-production'
  'shopping-production-note shopping-production-note'
  'shopping-production-list shopping-production-list';
 align-items:stretch;
}
#stock-view:has([data-stock-tab="compras"].active) #stock-content-area> *{min-width:0}
#stock-view:has([data-stock-tab="compras"].active) #stock-content-area>.menu-top-bar{grid-area:shopping-title;margin-bottom:14px}
#stock-view:has([data-stock-tab="compras"].active) #stock-content-area>p:first-of-type{
 grid-area:shopping-note;background:#edf8f2;color:#4e7164!important;border:1px solid #d8eee0;
 padding:15px 19px;border-radius:13px;margin:0 0 17px!important;
}
#stock-view:has([data-stock-tab="compras"].active) #stock-content-area>h4:nth-of-type(1){grid-area:shopping-critical;background:#fff0f0;color:#b93d48!important;border:1px solid #f5d8da;border-bottom:0;border-radius:14px 14px 0 0;margin:0!important;padding:19px 19px 12px!important}
#stock-view:has([data-stock-tab="compras"].active) #stock-content-area>h4:nth-of-type(1)+.menu-list{grid-area:shopping-list;background:#fff9f9;border:1px solid #f5d8da;border-top:0;border-radius:0 0 14px 14px;padding:2px 13px 18px;margin:0;min-height:150px;align-content:start}
#stock-view:has([data-stock-tab="compras"].active) #stock-content-area>h4:nth-of-type(2){grid-area:shopping-extras;background:#fff6e9;color:#9d600f!important;border:1px solid #f2e1ca;border-bottom:0;border-radius:14px 14px 0 0;margin:0!important;padding:19px 19px 12px!important}
#stock-view:has([data-stock-tab="compras"].active) #stock-content-area>h4:nth-of-type(2)+.menu-list{grid-area:shopping-extras-list;background:#fffbf4;border:1px solid #f2e1ca;border-top:0;border-radius:0 0 14px 14px;padding:2px 13px 18px;margin:0;min-height:150px;align-content:start}
#stock-view:has([data-stock-tab="compras"].active) #stock-content-area>h4:nth-of-type(3){grid-area:shopping-production;background:#eaf8f0;color:#0a7959!important;border:1px solid #cde7d9;border-bottom:0;border-radius:14px 14px 0 0;margin:17px 0 0!important;padding:20px 19px 9px!important}
#stock-view:has([data-stock-tab="compras"].active) #stock-content-area>h4:nth-of-type(3)+p{grid-area:shopping-production-note;background:#eaf8f0;color:#517b67!important;border-left:1px solid #cde7d9;border-right:1px solid #cde7d9;margin:0!important;padding:0 19px 13px}
#stock-view:has([data-stock-tab="compras"].active) #stock-content-area>h4:nth-of-type(3)+p+.menu-list{grid-area:shopping-production-list;background:#f7fcf8;border:1px solid #cde7d9;border-top:0;border-radius:0 0 14px 14px;padding:10px 14px 18px;margin:0;min-height:90px}
#stock-view:has([data-stock-tab="compras"].active) #stock-content-area>.menu-list>.menu-item-card{background:#fffefb}
#stock-view:has([data-stock-tab="compras"].active) #stock-content-area>.menu-list>p{padding:14px 7px;color:var(--muted)!important}
#stock-view:has([data-stock-tab="compras"].active) #stock-content-area>.menu-list input{background:#fffefa!important;color:var(--text)!important;border:1px solid #d9e3db!important}
@media(max-width:810px){
 #stock-view:has([data-stock-tab="compras"].active) #stock-content-area{
  display:block;
 }
 #stock-view:has([data-stock-tab="compras"].active) #stock-content-area>h4:nth-of-type(2){margin-top:15px!important}
}

/* Partigiana HUB v0.6 — layout PDV, cartões KDS e margens da comanda.
   Arquivo separado para permitir revisão/reversão sem afetar tema anterior. */

/* KDS: todos os cartões da grade têm a mesma altura, sem cortar os pedidos.
   O painel de itens é rolável e um aviso fica visível quando há itens ocultos. */
#kds-view .kds-board { align-items: start; }
#kds-view .kds-card {
  display:flex;
  flex-direction:column;
  height:var(--kds-card-height, 490px);
  min-height:0;
  overflow:hidden;
}
#kds-view .kds-card-top,
#kds-view .kds-client,
#kds-view .kds-card-meta,
#kds-view .kds-all-btn,
#kds-view .kds-overflow-cue {flex-shrink:0}
#kds-view .kds-items {
  flex:1 1 0;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#a9cbb8 #edf5ee;
  padding:2px 12px 0;
  position:relative;
}
#kds-view .kds-items::-webkit-scrollbar{width:10px}
#kds-view .kds-items::-webkit-scrollbar-thumb{background:#a9cbb8;border-radius:12px;border:2px solid #fffefa}
#kds-view .kds-item{padding:13px 3px}
#kds-view .kds-item-name{font-size:var(--kds-item-font-size,20px);line-height:1.3;overflow-wrap:anywhere}
#kds-view .kds-item-head{align-items:center}
#kds-view .kds-ready-btn{min-width:96px;padding:10px 8px;font-size:14px}
#kds-view .kds-mod{font-size:max(12px,calc(var(--kds-item-font-size,20px) * .7))}
#kds-view .kds-obs{font-size:max(13px,calc(var(--kds-item-font-size,20px) * .75))}
#kds-view .kds-overflow-cue {
  display:flex;
  align-items:center;
  justify-content:center;
  margin:3px 13px 0;
  min-height:38px;
  padding:7px 8px;
  border:1px solid #f2d8a8;
  border-radius:9px;
  background:linear-gradient(180deg,#fffaf0,#ffefcf);
  color:#815009;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
  text-align:center;
}
#kds-view .kds-overflow-cue:hover{background:#ffe8b8}
#kds-view .kds-overflow-cue[hidden]{visibility:hidden;pointer-events:none}
#kds-view .kds-all-btn{margin:9px 13px 12px;width:calc(100% - 26px);padding:12px 7px;font-size:15px}

/* Formulário de ajustes da cozinha na área administrativa. */
.kds-config-card {
  background:#fffefa;
  border:1px solid #e0e8df;
  box-shadow:var(--shadow);
  border-radius:15px;
  padding:22px;
  max-width:820px;
}
.kds-config-card h3{margin:0 0 6px}
.kds-config-card p{color:var(--muted);margin:4px 0 17px;line-height:1.55}
.kds-config-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.kds-config-grid select{background:white;color:var(--text);border:1px solid #d9e3db;border-radius:10px;width:100%;padding:11px;min-height:45px}
.kds-config-grid small{display:block;margin-top:8px;line-height:1.4}
.kds-config-tip{font-size:12px;margin:14px 0 0!important}

/* PDV: destinar a maior parte da altura útil ao carrinho.
   Campos de cadastro no topo; forma de pagamento/CPF e finalizar embaixo. */
@media(min-width:601px){
  #order-modal .pdv-left{
    padding:11px 17px 12px;
    overflow:hidden;
    min-height:0;
    gap:0;
  }
  #order-modal-title{margin:0 26px 8px 0;font-size:23px;line-height:1.22}
  #order-modal .pdv-left>.form-group{margin-bottom:9px;flex:0 0 auto}
  #order-modal .pdv-left .form-group input:not([type=checkbox]){min-height:39px;padding:9px 12px}
  #order-modal .pdv-left .selection-btn{min-height:42px;padding:9px 12px}
  #order-modal #cart-items{
    flex:1 1 0;
    min-height:140px;
    overflow-y:auto;
    margin:2px 0 6px;
    padding:10px;
    scrollbar-width:thin;
  }
  #order-modal #cart-total{margin:3px 0 9px;font-size:18px;flex:0 0 auto}
  #order-modal .pdv-left>.checkbox-item{margin-top:5px!important;margin-bottom:6px;flex:0 0 auto}
  #order-modal #btn-finalize-order{
    flex:0 0 auto;
    padding:10px 14px!important;
    font-size:14px!important;
    min-height:42px;
    margin-top:5px!important;
  }
}
@media(max-height:680px) and (min-width:601px){
  #order-modal .pdv-left{padding:8px 14px}
  #order-modal-title{font-size:20px;margin-bottom:5px}
  #order-modal #cart-items{min-height:95px}
  #order-modal .pdv-left>.form-group{margin-bottom:5px}
  #order-modal #cart-total{margin:2px 0 5px}
  #order-modal #btn-finalize-order{min-height:38px;padding:7px 10px!important}
}

/* Margens reais na representação visual da comanda (todos os lados).
   A rotina ESC/POS também define área útil com margens laterais. */
#print-preview-container {
  padding:6mm 4mm 8mm!important;
  overflow:hidden;
  box-sizing:border-box;
  min-height:58mm;
  overflow-wrap:anywhere;
}
#print-preview-container>div {max-width:100%}

@media(max-width:600px){
  .kds-config-grid{grid-template-columns:1fr}
  #kds-view .kds-card{height:var(--kds-card-height,490px)}
  #order-modal #cart-items{min-height:180px}
}

/* Partigiana HUB v1.2 — módulos adicionais; herda tema claro */
#waitlist-view,#availability-view,#floor-view,#production-view{height:calc(100vh - 70px);overflow:auto;padding:18px 24px 36px;background:#f5f5f0}
.hub-panel,.hub-form-card{background:#fffdfa;border:1px solid #dfe8e1;border-radius:15px;padding:18px;margin-bottom:14px;box-shadow:0 3px 15px rgba(26,64,47,.035)}
.hub-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap;margin-bottom:12px}.hub-heading h3,.hub-section-title h3,.hub-panel h3,.hub-form-card h3{margin:0 0 6px;color:#234c3c;font-size:19px}.hub-heading p,.hub-muted,.hub-section-title small{font-size:13px;color:#61746b;margin:4px 0 12px}
.hub-two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start}.hub-two-col>section{min-width:0}.hub-two-col>section:not(.hub-panel){background:#f6f8f4;border:1px solid #e4eae4;border-radius:15px;padding:12px}
.hub-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;align-items:end}.hub-form-grid .form-group{margin:0}.hub-form-grid input,.hub-form-grid select,.hub-panel input,.hub-panel select,.hub-panel textarea,.hub-ticket input{color:#254d3d;background:white;border:1px solid #d1dfd5;border-radius:9px;padding:11px;width:100%}.hub-form-grid button{min-height:42px}
.hub-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px}.hub-stats>div{background:#f1f8f3;border:1px solid #daeade;border-radius:12px;padding:11px;display:flex;gap:5px;flex-direction:column}.hub-stats small{color:#597369;font-size:11px}.hub-stats strong{color:#117750;font-size:23px;font-weight:800}.hub-stats .hub-stat-small{font-size:15px}
.hub-ticket{background:#fff;border:1px solid #dce5df;border-radius:12px;padding:13px;margin:9px 0;box-shadow:0 2px 7px #234e3c08}.hub-ticket>strong,.hub-ticket>small{display:block}.hub-ticket>small,.hub-ticket-main small{font-size:12px;color:#69766e;margin-top:5px}.hub-ticket-main{display:flex;justify-content:space-between;gap:10px}.hub-ticket-main>div:first-child{display:flex;flex-direction:column;min-width:0}.hub-ticket-main strong{font-size:16px;color:#254c3d}.hub-ticket-clock{display:flex;gap:5px;flex-direction:column;align-items:flex-end;color:#4d6359;font-size:12px;white-space:nowrap}.hub-ticket-clock b{font-size:13px}
.hub-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.hub-ticket .hub-actions{margin-top:12px;justify-content:flex-end}.hub-actions button,.hub-ticket button,.hub-panel button{font-size:12px;padding:9px 12px;border-radius:9px}.hub-danger-outline{color:#c44a4b!important;border:1px solid #efc6c6!important}
.hub-empty{padding:22px;color:#728178;text-align:center;font-size:13px}.hub-section-title{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.hub-chip{display:inline-flex;align-items:center;border:1px solid #d8e1d9;background:#f6f7f3;padding:4px 8px;border-radius:7px;font-size:11px;font-weight:700;color:#63756a;margin:4px 3px 0 0}.hub-success{background:#e1f4e9;border-color:#c7ebd5;color:#0d8357}.hub-warning{background:#fff2dc;border-color:#f2dcaf;color:#aa6a1a}.hub-danger{background:#fff0f0;border-color:#f2cdce;color:#bd3d3f}.hub-alert{background:#eef8f1;border-left:3px solid #0f9b6b;border-radius:7px;padding:12px;font-size:13px;line-height:1.5;color:#326354;margin:12px 0}.hub-categories{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.hub-category-pill{display:flex;align-items:center;gap:7px;font-size:13px;border-radius:10px;padding:8px 12px;background:#eef7f0;color:#234f3a;cursor:pointer}.hub-category-pill input{width:auto!important}
.hub-availability-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #e8ede9;padding:11px 0}.hub-availability-row>div:first-child{flex:1;min-width:0}.hub-availability-row strong{display:block;font-size:14px;color:#244d3b}.hub-availability-row small{display:block;font-size:12px;margin-top:5px;color:#6a7a71}.hub-availability-row button{flex-shrink:0}
.hub-floor-scroll{border-radius:12px;overflow:hidden;border:1px solid #d6e1d9;background:#fff}.hub-floor-scroll svg{width:100%;max-height:calc(100vh - 315px);min-height:300px;touch-action:none;display:block}.hub-floor-tools{padding:7px 0}.hub-history{padding:12px;font-size:13px;color:#60746c}.hub-history>div{padding:7px 0;border-bottom:1px solid #eff2ef}.hub-batch-line{display:grid;grid-template-columns:1fr 110px 40px;gap:7px;margin:7px 0;align-items:center}.hub-batch-line select,.hub-batch-line input{border:1px solid #d9e5dc;border-radius:8px;padding:10px;color:#234638;background:white;min-width:0}.hub-batch-line button{padding:9px}
.hub-kds-preset{display:flex;align-items:center;gap:7px;background:#e6f5ed;border:1px solid #d6e9da;border-radius:10px;padding:5px 9px;color:#27604a;font-size:12px;white-space:nowrap}.hub-kds-preset select{max-width:220px;background:white;border:1px solid #c3dece;color:#285645;border-radius:7px;padding:7px;font-size:12px;font-weight:700}.hub-kds-preset label{font-weight:600}.hub-kds-small p{margin:3px 0}
#hub-preset-toolbar .hub-kds-preset{margin-right:4px}
@media(max-width:850px){.hub-two-col{grid-template-columns:1fr}.hub-stats{grid-template-columns:repeat(2,minmax(0,1fr))}#waitlist-view,#availability-view,#floor-view,#production-view{padding:12px}.hub-ticket-main{flex-wrap:wrap}.hub-floor-scroll svg{min-height:240px}.hub-kds-preset label{display:none}}

.hub-category-pill.hub-selected,.hub-category-pill:has(input:checked){background:#d8f4e4;border:1px solid #7dccab;color:#126a4a;font-weight:700}.hub-disabled-product{position:relative;filter:saturate(.45);}.hub-disabled-product .product-main-click{pointer-events:none;opacity:.42}.hub-product-overlay{position:absolute;inset:auto 4px 4px 4px;border-radius:7px;padding:6px 4px;background:#ffe4e5;color:#a5212b;z-index:12;text-align:center;font-size:11px;font-weight:700;max-height:68px;overflow:auto}.hub-pdv-warning{position:absolute;top:5px;right:5px;background:#fff1cc;color:#a76b1b;border-radius:7px;padding:2px 6px;font-size:13px}

.hub-late{color:#c84648;font-weight:800}.hub-warn{color:#be841c;font-weight:800}

/* v1.2.3 — liberação de pré-preparos a partir da aba Estoque */
.preparo-liberacao-painel{margin:18px 0 22px;padding:16px 18px;border:1px solid #cce2d5;border-radius:14px;background:linear-gradient(135deg,#f4fbf7 0%,#fffdf8 100%)}
.preparo-liberacao-cabecalho{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.preparo-liberacao-cabecalho h3{margin:0;font-size:1.12em;color:#194a3e}
.preparo-liberacao-cabecalho span{font-size:.83em;color:#547568}
.preparo-pendente-lote{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px;background:#fff;border:1px solid #deebe3;border-radius:11px;margin-top:9px;flex-wrap:wrap}
.preparo-pendente-info{display:flex;flex:1;min-width:200px;flex-direction:column;gap:4px;color:#23483f}
.preparo-pendente-info>span{font-size:.87em}
.preparo-pendente-info>small{color:#64766f;font-size:.78em}
.preparo-pendente-texto{font-size:.84em;color:#93600d;font-weight:600}
.preparo-status{display:inline-block;max-width:max-content;padding:4px 9px;border-radius:7px;font-size:.79em!important}
.preparo-status-espera{background:#fff3db;color:#93600d}
.preparo-status-conferencia{background:#e1f5ea;color:#186d4e}
.preparo-sem-pendencias{margin:0;color:#64766f;font-size:.9em}
.preparo-liberacao-resumo{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin:14px 0}
.preparo-liberacao-resumo>div{display:flex;flex-direction:column;gap:5px;background:#f4f9f5;padding:13px;border-radius:10px}
.preparo-liberacao-resumo small{color:#61766b}
.preparo-liberacao-alerta{background:#fff4dd;color:#85550d;border-radius:8px;padding:11px;font-size:.91em}

/* Layout Rails para as telas operacionais da v12. */
.menu-context-bar { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:18px; }
.menu-context-bar h2 { margin:8px 0 0; }
.menu-context-bar a { color:var(--primary); }
.pdv-current-menu { margin:0 0 14px; color:var(--text-muted); font-size:.9rem; }
.pdv-menu-picker { position:absolute; top:10px; right:56px; z-index:20; }
.pdv-menu-picker > summary { list-style:none; cursor:pointer; width:36px; height:36px; display:grid; place-items:center; border:1px solid var(--border); border-radius:50%; background:var(--surface); color:var(--primary); font-size:26px; font-weight:bold; }
.pdv-menu-picker > summary::-webkit-details-marker { display:none; }
.pdv-menu-picker-panel { position:absolute; right:0; top:44px; width:min(270px,calc(100vw - 90px)); padding:16px; border:1px solid var(--border); border-radius:12px; background:var(--surface); box-shadow:0 10px 30px rgba(0,0,0,.15); }
.pdv-menu-picker-panel label { display:block; font-weight:bold; margin-bottom:8px; }
.pdv-menu-picker-panel select { width:100%; padding:10px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--text); }
.pdv-menu-picker-panel small { display:block; margin-top:10px; }
#order-modal-title { padding-right:80px; }
[hidden] { display: none !important; }
.operation-tabs { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:20px; }
.operation-tabs a, .item-actions a { padding:9px 13px; border:1px solid var(--border); border-radius:9px; background:var(--surface); color:var(--primary); text-decoration:none; }
.operation-form { max-width:720px; background:var(--surface); padding:24px; border:1px solid var(--border); border-radius:16px; }
.recipe-row, .inline-operation { display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin:12px 0; }
.recipe-row select { flex:1; min-width:180px; }
.recipe-row input[type="number"] { width:160px; }
.inline-operation input:not([type="checkbox"]), .inline-operation select, .recipe-row input, .recipe-row select { min-height:40px; padding:9px; border:1px solid var(--border); border-radius:9px; background:var(--surface); color:var(--text); max-width:100%; }
.inline-operation input[type="number"] { width:140px; }
.inline-operation input[type="submit"], .operation-form input[type="submit"] { cursor:pointer; }
.error-message { color:var(--danger); }
.addon-label { color:var(--primary); }
.product-unavailable { opacity:.6; cursor:not-allowed; }
.table-scroll { overflow:auto; }
.hub-panel { padding:20px; margin-bottom:16px; border:1px solid var(--border); background:var(--surface); border-radius:14px; }
.hub-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.hub-categories { display:flex; gap:12px; flex-wrap:wrap; }
.hub-category-pill { padding:10px; border:1px solid var(--border); border-radius:10px; }
.hub-category-pill:has(input:checked) { background:var(--soft-green); border-color:var(--primary); }
#app-container > header { justify-content:space-between; height:auto; min-height:76px; gap:16px; flex-wrap:wrap; }
header .header-left { position:static; flex-wrap:wrap; gap:10px; }
header .header-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.shift-toggle { border-radius:10px; padding:11px 15px; background:var(--soft-green); border:1px solid #b9d9c9; color:var(--primary); font-weight:800; cursor:pointer; }
.shift-toggle.closed { background:#fff0ee; color:var(--danger); border-color:#f0a2a8; }
.kanban-page { height:calc(100dvh - 96px); min-height:360px; overflow:hidden; padding-bottom:20px; }
.kanban-page .kanban { height:100%; min-height:0; overflow-x:auto; }
.kanban-page .column { overflow-y:auto; min-width:260px; padding:14px; gap:14px; }
.kanban-page .column h3 { position:sticky; top:-14px; background:inherit; z-index:1; flex-shrink:0; }
.kanban-page .order-card { flex:none; height:calc((100dvh - 210px) / 2); min-height:190px; overflow:hidden; }
.kanban-page .order-card-body { min-height:0; overflow-y:auto; }
.kanban-page .card-actions { flex-shrink:0; }
/* O cabeçalho ocupa sua altura real; o quadro usa somente o espaço restante. */
@media screen {
  html:has(.kanban-page,.kds-screen),body:has(.kanban-page,.kds-screen) { height:100%; overflow:hidden; }
  body:has(.kanban-page,.kds-screen) #app-container { display:flex; flex-direction:column; height:100dvh; min-height:0; }
  body:has(.kanban-page,.kds-screen) #app-container > header { flex-shrink:0; }
  #app-container > .kanban-page { flex:1 1 0; height:auto; min-height:0; }
  .kanban-page #kanban-board { height:100%; min-height:0; flex-direction:row; flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; }
  .kanban-page #kanban-board > .column { min-height:0; overflow-y:auto; overscroll-behavior-y:contain; }
  .kanban-page .order-card-body { overscroll-behavior-y:contain; }
}
@media screen and (max-height:400px) {
  #app-container > .kanban-page { padding:8px; }
  .kanban-page .column h3 { position:static; }
}
.timer-stack { display:flex; flex-direction:column; gap:4px; }
.kds-screen { height:calc(100dvh - 80px); min-height:400px; display:flex; flex-direction:column; padding:14px 20px; }
.kds-screen:fullscreen { height:100dvh; background:var(--bg); }
.kds-toolbar { display:flex; gap:12px; flex-wrap:wrap; align-items:center; flex-shrink:0; margin-bottom:10px; }
.kds-toolbar h2 { font-size:20px; margin:0; }
.kds-toolbar button, .kds-toolbar select { padding:8px 12px; background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:9px; cursor:pointer; }
.kds-toolbar strong { color:#bd6a08; }
.kds-grid { display:grid; gap:12px; flex:1; min-height:0; }
.kds-card { display:flex; flex-direction:column; min-height:0; border:1px solid var(--border); border-left:5px solid #ec8433; background:var(--surface); border-radius:14px; padding:12px; overflow:hidden; }
.kds-card-heading { display:flex; justify-content:space-between; gap:8px; }
.kds-card-items { overflow-y:auto; min-height:0; margin-top:10px; flex:1; }
.kds-item { padding:8px 0; border-bottom:1px dashed var(--border); font-size:var(--kds-font); }
.kds-item p { margin:4px 0; font-size:.8em; }
.kds-item input[type="checkbox"] { width:22px; height:22px; }
.kds-pagination { justify-content:center; margin:12px 0 0; }
@media screen {
  #app-container > .kds-screen { display:flex; flex:1 1 0; height:auto; min-height:0; overflow:hidden; }
  #app-container > .kds-screen:fullscreen { flex:none; height:100dvh; }
  .kds-controls { flex-shrink:0; min-width:0; }
  .kds-screen .kds-grid { overflow:hidden; }
  .kds-screen .kds-card-heading,.kds-screen .kds-card > small,.kds-screen .kds-card > form { flex-shrink:0; }
  .kds-screen .kds-card-items { overscroll-behavior-y:contain; }
}
@media screen and (max-width:700px), screen and (max-height:500px) {
  .kds-controls { display:flex; gap:12px; overflow-x:auto; margin-bottom:8px; }
  .kds-controls > .kds-toolbar { flex:none; flex-wrap:nowrap; white-space:nowrap; margin:0; }
  .kds-controls select { max-width:220px; }
  #app-container > .kds-screen { padding:8px; }
  .kds-screen .kds-card { padding:8px; }
  .kds-screen .kds-card > .button_to > button { font-size:12px; margin-top:6px; padding:8px; }
}
@media screen and (max-height:500px) and (min-width:600px) {
  body:has(.kds-screen) #app-container > header { flex-wrap:nowrap; min-height:60px; padding:6px 12px; }
  body:has(.kds-screen) header .header-left { width:auto; flex-wrap:nowrap; }
  body:has(.kds-screen) header .header-actions { display:flex; flex-wrap:nowrap; }
}
.category-dialog { max-width:90vw; width:600px; border:1px solid var(--border); border-radius:16px; background:var(--surface); color:var(--text); }
.category-dialog::backdrop { background:rgba(28,44,40,.46); }
.floor-canvas { width:100%; min-height:260px; background:var(--surface); border:1px solid var(--border); border-radius:16px; touch-action:none; }
.floor-table { cursor:grab; }
.floor-table rect,.floor-table circle { fill:#e3f5ed; stroke:#078963; stroke-width:2; }
.floor-table.occupied rect,.floor-table.occupied circle { fill:#fff0dc; stroke:#bd6a08; }
.floor-table.reserved rect,.floor-table.reserved circle { fill:#e4edff; stroke:#4778bd; }
.floor-table.unavailable rect,.floor-table.unavailable circle { fill:#fee9e9; stroke:var(--danger); }
.floor-table text { font-size:14px; fill:var(--text); pointer-events:none; }
#order-modal .close-btn { background:var(--surface); border:1px solid var(--border); border-radius:50%; width:36px; height:36px; display:grid; place-items:center; right:10px; top:10px; }
.sidebar { padding-top:60px; }
.sidebar > div:not(.sidebar-bottom) { flex-shrink:0; }
.sidebar-bottom { flex-shrink:0; }
.sidebar form button { color:#315249; font-weight:620; font-size:14px; padding:16px 20px; }
.toggle-container a { color:#425c55; }
.toggle-container a.active { background:var(--soft-green); color:var(--primary); }
@media (max-width:700px) {
  #app-container > header { padding:10px; }
  header .hub-brand { display:none; }
  header .header-left { gap:5px; }
  header .header-actions { width:100%; justify-content:center; }
  .view { padding:16px; }
  .kanban-page { height:calc(100dvh - 140px); padding:12px; }
  .kanban-page .order-card { height:calc((100dvh - 250px) / 2); }
  .kds-screen { height:calc(100dvh - 140px); min-height:450px; }
  .kds-toolbar { gap:6px; }
  .item-actions { flex-wrap:wrap; }
  .menu-item-card { flex-wrap:wrap; }
  .operation-form { padding:16px; }
  .recipe-row { flex-wrap:wrap; }
}
.invoice-item { margin-bottom: 16px; }
.invoice-item > label { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.invoice-item > label input[type="checkbox"] { width: auto; margin: 0; }
.invoice-item [data-field="match"]:empty { display: none; }
.fiscal-access-key { overflow-wrap: anywhere; }

.qz-setup { padding:18px; margin-bottom:24px; background:var(--tint); border:1px solid var(--border); border-radius:12px; }
.qz-setup p { line-height:1.5; }.qz-setup [role=status] { font-weight:600; }
.qz-setup-controls { display:flex; flex-wrap:wrap; gap:12px; align-items:end; }
.qz-setup-controls .form-group { flex:1 1 240px; margin:0; }
@media(max-width:600px) { .qz-setup-controls > button { width:100%; } }

/* Configurações em uma página, com atalhos para as seções. */
.settings-shortcuts { display:flex; flex-wrap:wrap; gap:10px; margin:0 0 24px; }
.settings-shortcuts a { display:inline-flex; padding:10px 14px; color:var(--primary); background:var(--surface); border:1px solid var(--border); border-radius:10px; font-weight:600; text-decoration:none; }
.settings-shortcuts a:hover { background:var(--soft-green); }
.settings-section { scroll-margin-top:24px; }
.settings-section-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-bottom:20px; }
.settings-section-heading h2 { margin:0 0 6px; font-size:22px; }
.settings-section-heading p,.settings-page > .menu-top-bar p { margin:0; color:var(--muted); line-height:1.5; }
.settings-section-heading > div { flex:1 1 260px; min-width:0; }
.settings-section .menu-item-card { min-width:0; }.settings-section .item-info { overflow-wrap:anywhere; }
.settings-section .print-settings-layout { padding:0; }
@media(max-width:600px) { .settings-shortcuts { gap:8px; }.settings-shortcuts a { padding:10px 12px; font-size:13px; }.settings-section-heading { align-items:stretch; gap:12px; }.settings-section-heading > .btn-success { width:100%; text-align:center; }.settings-section-heading h2 { font-size:20px; } }

/* Fila integrada ao mapa, com rolagem própria e foco contido no diálogo. */
.waitlist-dialog { width:min(980px,calc(100vw - 32px)); max-height:90dvh; overflow:auto; margin:5dvh auto; padding:24px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); color:var(--text); box-shadow:0 20px 60px rgba(10,36,26,.19); }
.waitlist-dialog-heading { display:flex; justify-content:space-between; align-items:start; gap:16px; margin-bottom:20px; }
.waitlist-dialog-heading h2 { margin:0 0 6px; }.waitlist-dialog-heading p { margin:0; color:var(--muted); }
.waitlist-form { display:grid; grid-template-columns:2fr 1.5fr 1fr; gap:12px; padding:18px; border:1px solid var(--border); border-radius:12px; background:var(--tint); }
.waitlist-form > input[type=submit] { grid-column:1/-1; }
.waitlist-section { margin-top:24px; }.waitlist-section h3 { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.waitlist-card { display:flex; flex-direction:column; gap:14px; padding:18px; margin-bottom:12px; border:1px solid var(--border); border-radius:12px; }
.waitlist-card p { margin:6px 0; overflow-wrap:anywhere; }.waitlist-card small,.waitlist-empty { color:var(--muted); }
.waitlist-seat-form { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }.waitlist-seat-form select { width:auto; min-width:160px; min-height:44px; padding:10px 12px; border:1px solid var(--border); border-radius:10px; background:var(--surface); color:var(--text); font:inherit; }
.waitlist-closed { padding:20px; background:var(--tint); border-radius:12px; }
@media(max-width:600px) { .waitlist-dialog { padding:18px; }.waitlist-form { grid-template-columns:1fr; padding:14px; }.waitlist-dialog-heading h2 { font-size:21px; }.waitlist-card .item-actions { align-items:stretch; }.waitlist-seat-form { width:100%; }.waitlist-seat-form select { width:100%; } }

/* Editor da planta e cadastro unificado de mesas. */
.floor-editor { padding:20px; }
.floor-toolbar { display:flex; flex-direction:column; gap:12px; }
.floor-tool-group { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.floor-tool-group button { min-height:40px; }
.floor-tool-group button[aria-pressed=true] { background:var(--soft-green); border-color:var(--primary); }
.floor-snap { display:inline-flex; align-items:center; gap:8px; margin-left:8px; font-size:13px; }
.floor-editor .floor-snap input { width:18px; height:18px; padding:0; margin:0; }
.floor-hint { min-height:42px; margin:14px 0; padding:10px 14px; border-radius:10px; background:var(--tint); color:#425e53; }
.floor-workspace { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:20px; align-items:start; }
.floor-canvas-wrap { min-width:0; }
.floor-canvas { display:block; min-height:320px; max-height:680px; aspect-ratio:1000 / 560; user-select:none; -webkit-user-select:none; }
.floor-canvas[data-mode=pan] { cursor:grab; }
.floor-canvas:focus { outline:2px solid #95cdb1; outline-offset:2px; }
.floor-canvas[data-mode=wall],.floor-canvas[data-mode=door] { cursor:crosshair; }
.floor-segment-hit { stroke:transparent; stroke-width:24px; vector-effect:non-scaling-stroke; pointer-events:stroke; }
.floor-segment-line { stroke:#466157; stroke-width:7px; vector-effect:non-scaling-stroke; stroke-linecap:round; pointer-events:none; }
.floor-segment.door .floor-segment-line { stroke:var(--accent); stroke-dasharray:8 5; stroke-width:5px; }
.floor-segment.selected .floor-segment-line { stroke:var(--primary); }
.floor-shape { fill:#e9f2ec; stroke:none; cursor:move; }
.floor-shape.selected { fill:#c9e9d9; stroke:var(--primary); stroke-width:2px; vector-effect:non-scaling-stroke; }
.floor-segment { cursor:move; }
.floor-table.selected :is(rect,circle) { stroke-width:4; }
.floor-grip-hit { fill:transparent; cursor:crosshair; }
.floor-grip-dot { fill:white; stroke:var(--primary); stroke-width:2px; vector-effect:non-scaling-stroke; pointer-events:none; }
.floor-preview-line { stroke:var(--primary); stroke-width:3px; stroke-dasharray:6 5; vector-effect:non-scaling-stroke; }
.floor-preview-point { fill:var(--primary); }
.floor-inspector { min-width:0; padding:18px; background:var(--tint); border:1px solid var(--border); border-radius:12px; }
.floor-inspector h3 { font-size:18px; }
.floor-inspector p,.floor-inspector small { font-size:13px; line-height:1.5; }
.floor-inspector .hub-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.floor-inspector form > .btn-success { width:100%; margin:16px 0 10px; }
.floor-inspector > button { width:100%; }
.floor-coordinates { font-variant-numeric:tabular-nums; color:var(--muted); padding-top:12px; border-top:1px solid var(--border); }
.floor-legend { display:flex; gap:14px; flex-wrap:wrap; margin-top:12px; color:var(--muted); font-size:12px; }
.floor-legend span { display:flex; gap:6px; align-items:center; }
.floor-legend i { width:10px; height:10px; border-radius:50%; background:#078963; }
.floor-legend i.occupied { background:#bd6a08; }.floor-legend i.reserved { background:#4778bd; }.floor-legend i.unavailable { background:var(--danger); }
.floor-table-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.floor-table-list > .hub-panel { min-width:0; margin:0; scroll-margin-top:20px; }
.floor-editor .floor-table text { font-size:12px; }
.floor-table-form > .btn-success { margin:18px 0 10px; }
.floor-layouts summary { font-weight:700; cursor:pointer; }
#new-table { scroll-margin-top:20px; }
@media (max-width:1050px) { .floor-workspace { grid-template-columns:1fr; }.floor-inspector { max-width:none; } }
@media (max-width:700px) { .floor-table-list { grid-template-columns:1fr; }.floor-editor { padding:14px; }.floor-canvas { min-height:260px; }.floor-snap { margin-left:0; }.floor-tool-group { gap:6px; } }
@media (max-width:600px) {
  .floor-tool-group:first-child { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .floor-tool-group:first-child button { width:100%; padding:8px 6px; font-size:12px; }
  .floor-page > .menu-top-bar { gap:12px; }
  .floor-page > .menu-top-bar p { font-size:13px; line-height:1.4; }
}

/* Padrões de apresentação compartilhados pelas telas de operação e gestão. */
.view { padding:24px; }
.view > h2 { margin:0 0 16px; }
.view > h3 { margin:28px 0 12px; }
.view > p { max-width:90ch; line-height:1.6; }
.view a { color:var(--primary); text-underline-offset:3px; }
.menu-top-bar,.hub-panel,.operation-form,.menu-item-card {
  border-color:var(--border);
  box-shadow:var(--shadow);
}
.menu-top-bar,.hub-panel,.operation-form { border-radius:16px; }
.menu-top-bar { padding:20px; margin-bottom:20px; }
.menu-top-bar p { margin:8px 0 0; color:var(--muted); }
.menu-top-bar > * { min-width:0; }
.menu-list { gap:12px; margin-top:0; }
.menu-list > .hub-panel { margin-bottom:0; }
.menu-item-card { border-radius:12px; padding:18px; }
.menu-item-card > :first-child,.item-info { min-width:0; overflow-wrap:anywhere; }
.item-info { flex:1; }
.item-actions { align-items:center; flex-shrink:0; }
.item-actions :is(a,button),.operation-tabs a,.kds-toolbar :is(a,button) {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  min-height:40px; padding:9px 13px; border-radius:10px; font-size:13px;
  line-height:1.35; text-align:center; text-decoration:none;
}
.item-actions :is(a,button) { font-weight:650; }
.item-actions .btn-success { font-size:13px; box-shadow:none; }
.btn-home,.btn-success,.btn-secondary,.btn-danger,.btn-cancel,.shift-toggle { min-height:42px; border-radius:10px; line-height:1.35; }
a.btn-home,a.btn-success { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
.mini-modal-footer .btn-cancel { color:var(--text); border-radius:10px; cursor:pointer; }
.mini-modal-footer { align-items:center; flex-wrap:wrap; padding-top:16px; border-top:1px solid var(--border); }
.mini-modal-content { padding:24px; }
.mini-modal-content > h3 { margin:0 36px 20px 0; }
.mini-modal-content > .close-btn {
  display:grid; place-items:center; width:32px; height:32px; top:16px; right:16px;
  padding:0; border:1px solid var(--border); border-radius:10px; background:var(--surface);
}
.operation-form { width:100%; padding:24px; }
.operation-form > h3:first-child { margin-top:0; }
.operation-form > h3:not(:first-child) { margin-top:28px; }
.form-group { min-width:0; }
.form-group :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { min-width:0; max-width:100%; }
.form-group :is(input:not([type=checkbox]):not([type=radio]),select) { min-height:44px; }
.form-group label { line-height:1.4; }
.hub-form-grid { align-items:end; }
.hub-form-grid + .hub-form-grid { margin-top:20px; }
.hub-form-grid + .form-group { margin-top:20px; }
.invoice-form [data-purchase-invoice-target=newSupplier] { margin-bottom:20px; }
.invoice-item { padding:18px; }
.hub-panel input:is([type=checkbox],[type=radio]),.form-group input:is([type=checkbox],[type=radio]) {
  width:18px; height:18px; padding:0; margin:0; vertical-align:middle; flex-shrink:0;
}
.checkbox-item { gap:10px; align-items:flex-start; }
.checkbox-item input[type=checkbox] { margin-top:2px; }
.checkbox-group { max-height:220px; }
.inline-operation { gap:10px; align-items:center; }
.inline-operation > :is(input,select) { min-width:0; }
.inline-operation > input:not([type=hidden]):not([type=checkbox]):not([type=submit]):not([type=number]) { flex:1 1 200px; width:auto; }
.inline-operation > input[type=submit] { width:auto; flex:0 0 auto; }
.inline-operation > label { display:flex; align-items:center; gap:8px; }
.inline-operation > input[type=search] { flex:1; min-width:180px; max-width:520px; }
.inline-operation input[type=submit],.operation-form > a,.view > .button_to > button,
.hub-panel > .button_to > button,.category-dialog > button:not(.btn-success) {
  min-height:42px; padding:10px 14px; border:1px solid var(--border); border-radius:10px;
  background:var(--surface); color:var(--primary); font:inherit; cursor:pointer;
}
.operation-form > a { display:inline-flex; align-items:center; text-decoration:none; margin-left:8px; }
.operation-tabs { gap:8px; }
.operation-tabs a:hover,.item-actions a:hover { background:var(--soft-green); border-color:#a7d2bd; }
.operation-tabs a[aria-current=page] { background:var(--soft-green); border-color:#a7d2bd; font-weight:700; }
.toggle-container { min-width:0; }
.toggle-container button { min-height:40px; }
.catalog-actions { display:flex; flex-wrap:wrap; gap:10px; }
.pdv-current-menu { color:var(--muted); }
#order-modal .pdv-menu-picker,#order-modal .close-btn { top:24px; }
#pdv-products { grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); }
#pdv-products .product-card { height:auto; min-height:250px; }
#pdv-products .product-main-click { padding:12px 12px 50px; }
#pdv-products .product-card-title { min-height:32px; }
#pdv-products .stock-warning { display:block; margin-top:4px; font-size:12px; line-height:1.4; }
@media (min-width:601px) {
  #pdv-catalog-panel > .form-group:first-child { width:calc(100% - 88px); margin-right:88px; }
  .modifier-panel-heading { padding-right:88px; }
}
#app-container > header { display:grid; grid-template-columns:1fr auto 1fr; gap:16px; padding:16px 24px; }
header .header-left { gap:8px; }
header .header-actions { justify-content:flex-end; gap:8px; }
.hamburger-btn { display:grid; place-items:center; width:40px; height:40px; border-radius:10px; }
.hamburger-btn:hover { background:var(--soft-green); }
.ui-icon { width:18px; height:18px; flex-shrink:0; vertical-align:middle; }
.hub-logo.ui-icon { width:28px; height:28px; color:var(--accent); }
.header-left .btn-home { display:inline-flex; align-items:center; gap:8px; }
.print-settings-layout { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; align-items:start; }
.print-preview-panel { min-width:0; display:flex; justify-content:center; padding:24px; background:#fff; border:1px solid var(--border); border-radius:16px; overflow-x:auto; }
.print-settings-layout .operation-form { max-width:none; }
.print-settings-layout h4 { color:var(--primary); }
.print-settings-layout h4.print-modifier-heading { color:var(--amber); }
.kds-toolbar { gap:8px; }
.kds-toolbar a { border:1px solid var(--border); background:var(--surface); }
.kds-card > .button_to > button {
  width:100%; min-height:42px; margin-top:12px; padding:10px; border:1px solid #b9d9c9;
  border-radius:10px; background:var(--soft-green); color:var(--primary); font:inherit; font-weight:700; cursor:pointer;
}
.category-dialog { padding:24px; max-height:85dvh; }
.category-dialog h3 { margin-top:0; }
.category-dialog > button { margin-top:16px; }
@media (max-width:1100px) {
  #app-container > header { grid-template-columns:1fr auto; }
  header .hub-brand { display:none; }
}
@media (max-width:850px) {
  .print-settings-layout { grid-template-columns:1fr; }
  .menu-item-card { flex-wrap:wrap; }
  .menu-item-card .item-actions { flex-wrap:wrap; }
}
@media (max-width:700px) {
  #app-container > header { display:flex; gap:8px; padding:12px 16px; }
  header .header-left { width:100%; gap:8px; }
  header .header-actions { display:grid; grid-template-columns:1fr auto; gap:8px; }
  #btn-master-pedido { width:100%; margin:0; font-size:13px; padding:10px 14px; }
  .view { padding:16px; }
  .menu-top-bar { padding:16px; }
  .menu-item-card { padding:16px; }
  .item-info { flex-basis:100%; }
  .menu-item-card .item-actions { width:100%; justify-content:flex-end; margin:0; }
  .operation-form { padding:20px; }
  .operation-tabs { flex-wrap:nowrap; overflow-x:auto; padding:2px 1px 8px; }
  .operation-tabs a { flex-shrink:0; white-space:nowrap; }
  .kanban-page .kanban { flex-direction:row; flex-wrap:nowrap; scroll-snap-type:x proximity; }
  .kanban-page .column { flex:0 0 calc(100vw - 48px); min-width:0; width:auto; scroll-snap-align:start; }
  .kanban-page { height:calc(100dvh - 116px); }
  .kds-screen { height:calc(100dvh - 116px); }
  .mini-modal-content { padding:20px; max-width:calc(100vw - 32px); }
  .mini-modal-content > .close-btn { top:12px; right:12px; }
}
@media (max-width:600px) {
  .hub-form-grid { grid-template-columns:1fr; }
  .menu-top-bar > .toggle-container { overflow:visible; }
  .toggle-container button { padding:9px 8px; font-size:12px; }
  .catalog-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; gap:6px; }
  .catalog-actions .btn-success { width:100%; min-height:44px; padding:8px 5px; font-size:12px; }
  .menu-context-bar { gap:12px; }
  .menu-context-bar > .btn-home { font-size:12px; padding:9px 12px; }
  .invoice-item { padding:14px; }
  .recipe-row select,.recipe-row input[type=number] { width:100%; flex-basis:100%; min-width:0; }
  .inline-operation > input[type=search] { max-width:none; }
}

/* Navegação da área de estoque: áreas no topo, seções no painel. */
.stock-area-navigation a { padding:14px 20px; font-weight:700; }
.stock-section-tabs { flex-wrap:wrap; }
.stock-section-tabs a { display:block; padding:11px 14px; border:1px solid transparent; border-radius:9px; font-size:13px; font-weight:680; text-decoration:none; white-space:nowrap; }
.stock-section-tabs a:hover { background:#ecf5ee; color:#087553; }
.stock-section-tabs a.active { border-color:#b6e6d0; }
@media (max-width:600px) {
  .menu-top-bar > .stock-section-tabs { display:grid; grid-template-columns:.8fr 1fr 1.3fr; width:100%; }
  .stock-section-tabs a { padding:10px 2px; text-align:center; font-size:12px; }
}

.product-tax-fields { min-width:0; margin:18px 0; padding:16px; border:1px solid var(--border); border-radius:12px; }
.product-tax-fields legend { padding:0 6px; font-weight:700; }
.product-tax-fields .form-hint,.product-tax-fields small { display:block; margin:6px 0; font-size:12px; color:var(--muted); line-height:1.5; overflow-wrap:anywhere; }
.product-tax-fields select { min-width:0; }
.ncm-options { max-height:220px; overflow-y:auto; margin-top:5px; border:1px solid var(--border); border-radius:9px; background:var(--surface); }
.ncm-options [role=option] { padding:10px; font-size:13px; line-height:1.5; cursor:pointer; border-bottom:1px solid var(--border); overflow-wrap:anywhere; }
.ncm-options [role=option]:last-child { border-bottom:0; }
.ncm-options [role=option]:hover,.ncm-options [aria-selected=true] { background:var(--soft-green); color:var(--primary); }
.ncm-picker [data-ncm-picker-target=description] { max-height:6em; overflow-y:auto; }

.receipt-preview-notice { padding:16px 20px; background:#fff4dc; border:1px solid #e5c789; border-radius:12px; color:#5e4317; line-height:1.6; }
.receipt-workspace { display:grid; grid-template-columns:minmax(300px,1fr) minmax(340px,1fr); align-items:start; gap:24px; }
.receipt-editor,.receipt-stage { min-width:0; }
.receipt-editor .hub-panel { margin-bottom:20px; }
.receipt-editor h3 { margin-top:0; }
.receipt-editor p,.receipt-requirements li { line-height:1.6; }
.receipt-editor .form-hint { font-size:12px; color:var(--muted); }
.receipt-reform-option { display:flex; gap:10px; align-items:center; }
.receipt-print-button { margin-top:18px; }
.receipt-stage { padding:24px 16px; overflow-x:auto; background:#e7ebe6; border:1px solid var(--border); border-radius:16px; }
.receipt-stage-label { margin:0 0 18px; text-align:center; color:var(--muted); font-size:12px; }
.fiscal-receipt { box-sizing:border-box; padding:2mm; margin:0 auto; background:#fff; color:#000; font:11px/1.45 "Courier New",monospace; box-shadow:0 5px 20px #20382b1a; overflow-wrap:anywhere; }
.fiscal-receipt-80 { width:80mm; }
.fiscal-receipt-58 { width:58mm; }
.fiscal-receipt h3 { margin:5px 0; color:#000; font-size:15px; }
.fiscal-receipt p { margin:4px 0; }
.receipt-center { text-align:center; }
.receipt-invalid { display:block; border:2px solid #000; padding:5px; font-size:12px; }
.receipt-block { padding:8px 0; border-bottom:1px dashed #000; }
.receipt-address { white-space:pre-line; }
.receipt-item { padding:5px 0; }
.receipt-item-heading,.receipt-line { display:flex; justify-content:space-between; gap:8px; align-items:baseline; }
.receipt-item-heading { font-weight:700; }
.receipt-line > :last-child { flex-shrink:0; text-align:right; }
.receipt-grand-total { margin:6px 0; font-size:13px; }
.receipt-qr-placeholder { display:flex; flex-direction:column; justify-content:center; width:25mm; height:25mm; box-sizing:border-box; border:1px dashed #000; padding:3mm; margin:10px auto; font-size:10px; }
.receipt-qr-placeholder small { font-size:9px; }
.receipt-contingency { border-top:1px dashed #000; }
.receipt-reform-reserve { margin:8px 0; padding:8px 0; border-top:1px dashed #000; }
@media (max-width:1000px) {
  .receipt-workspace { grid-template-columns:minmax(0,1fr); }
  .receipt-stage { order:-1; }
}
@media print {
  @page fiscal-receipt { margin:0; }
  body:has(.fiscal-receipt-page) { page:fiscal-receipt; }
  body:has(.fiscal-receipt-page),body:has(.fiscal-receipt-page) #app-container { margin:0; padding:0; min-height:0; background:#fff; }
  body:has(.fiscal-receipt-page) #app-container > :not(.fiscal-receipt-page),body:has(.fiscal-receipt-page) #system-dialog { display:none !important; }
  .fiscal-receipt-page { page:fiscal-receipt; display:block !important; padding:0 !important; margin:0 !important; }
  .fiscal-receipt-page > :not(.receipt-workspace),.receipt-editor,.receipt-stage-label { display:none !important; }
  .receipt-workspace { display:block; }
  .receipt-stage { padding:0; margin:0; border:0; border-radius:0; overflow:visible; background:#fff; }
  .fiscal-receipt { margin:0; box-shadow:none; print-color-adjust:exact; }
  .fiscal-receipt,.fiscal-receipt * { visibility:visible; }
  .receipt-item,.receipt-line,.receipt-qr-placeholder { break-inside:avoid; }
}
