/* Layout: barra escura da fábrica no topo; admin em abas com listas densas; gerente em catálogo de delivery com carrinho fixo embaixo */
:root {
  --bg: #F4F5F2;
  --surface: #FFFFFF;
  --sunken: #ECEEEA;
  --fg: #1B2220;
  --muted: #5B6662;
  --line: #DCE1DD;
  --bar: #1F3A34;
  --bar-fg: #EEF3F1;
  --bar-muted: #A9C2BA;
  --accent: #D9481F;
  --accent-fg: #FFFFFF;
  --accent-soft: #FBE7DF;
  --ok: #1D7F52;
  --ok-soft: #DDF1E6;
  --warn: #9A6200;
  --warn-soft: #FBEFD6;
  --info: #2B63A3;
  --info-soft: #E0EBF7;
  --danger: #B4302A;
  --danger-soft: #F8E1DF;
  --shadow: 0 10px 30px rgba(20, 30, 27, .16);
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111614; --surface: #192120; --sunken: #141B19; --fg: #E6ECE9; --muted: #9AA7A2; --line: #2A3431;
    --bar: #0B100F; --bar-fg: #E6ECE9; --bar-muted: #8FA9A0;
    --accent: #FF7A4D; --accent-fg: #1B0D07; --accent-soft: #3A1F15;
    --ok: #4CC58A; --ok-soft: #15301F; --warn: #E6B150; --warn-soft: #33270F; --info: #7FB0EB; --info-soft: #172739;
    --danger: #F07A72; --danger-soft: #3A1816; --shadow: 0 10px 30px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111614; --surface: #192120; --sunken: #141B19; --fg: #E6ECE9; --muted: #9AA7A2; --line: #2A3431;
  --bar: #0B100F; --bar-fg: #E6ECE9; --bar-muted: #8FA9A0;
  --accent: #FF7A4D; --accent-fg: #1B0D07; --accent-soft: #3A1F15;
  --ok: #4CC58A; --ok-soft: #15301F; --warn: #E6B150; --warn-soft: #33270F; --info: #7FB0EB; --info-soft: #172739;
  --danger: #F07A72; --danger-soft: #3A1816; --shadow: 0 10px 30px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bar); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.15; text-wrap: balance; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1100px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Barra superior */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bar); color: var(--bar-fg); }
.topbar .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; margin-right: auto; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; background: var(--accent); color: var(--accent-fg); font-size: .95rem; border-radius: 6px; }
.brand small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .72rem; color: var(--bar-muted); letter-spacing: .06em; text-transform: uppercase; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tab { border: 0; background: transparent; color: var(--bar-muted); padding: 10px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--bar-fg); }
.tab[aria-selected="true"] { background: rgba(255,255,255,.1); color: var(--bar-fg); }
.tab .count { background: var(--accent); color: var(--accent-fg); font-size: .72rem; padding: 1px 7px; border-radius: 99px; font-family: var(--font-mono); }
.bar-btn { border: 1px solid rgba(255,255,255,.22); background: transparent; color: var(--bar-fg); padding: 8px 12px; border-radius: 6px; cursor: pointer; font-weight: 500; min-height: 40px; }
.bar-btn:hover { background: rgba(255,255,255,.08); }
.company-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 99px; background: rgba(255,255,255,.1); font-size: .85rem; font-weight: 500; }

main { padding-block: 24px 120px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { color: var(--muted); }

/* Controles */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { border-color: var(--muted); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .88rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.field { display: grid; gap: 5px; font-weight: 600; font-size: .88rem; }
.field input, .field select, .field textarea, .input { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); width: 100%; font-weight: 400; }
.field textarea { padding: 10px 12px; min-height: 80px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { flex: 1 1 220px; width: auto; }
.toolbar select.input { flex: 0 1 200px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 99px; cursor: pointer; font-weight: 500; font-size: .9rem; white-space: nowrap; min-height: 40px; }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.panel-pad { padding: 18px; }
.form-grid { display: grid; grid-template-columns: 2fr 1.3fr 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span-all { grid-column: 1 / -1; } }
@media (max-width: 440px) { .form-grid { grid-template-columns: 1fr; } }

/* Status */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-novo { background: var(--accent-soft); color: var(--accent); }
.st-separando { background: var(--warn-soft); color: var(--warn); }
.st-enviado { background: var(--ok-soft); color: var(--ok); }
.st-cancelado { background: var(--sunken); color: var(--muted); }
.unit { font-family: var(--font-mono); font-size: .75rem; padding: 2px 7px; border-radius: 4px; background: var(--sunken); color: var(--muted); text-transform: uppercase; }

/* Resumo */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 2px; text-align: left; cursor: pointer; }
.stat[aria-pressed="true"] { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.stat b { font-family: var(--font-display); font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr 1fr; } }

/* Pedidos */
.orders { display: grid; gap: 12px; }
.order { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.order.is-novo { border-left: 4px solid var(--accent); }
.order.is-separando { border-left: 4px solid var(--warn); }
.order-head { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 14px 16px; cursor: pointer; align-items: center; width: 100%; border: 0; background: transparent; text-align: left; }
.order-head .who { display: grid; gap: 2px; min-width: 0; }
.order-head .who strong { font-size: 1rem; }
.order-head .meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.order-body { border-top: 1px solid var(--line); padding: 14px 16px; display: grid; gap: 14px; }
.items-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.items-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.items-table td { padding: 8px; border-bottom: 1px solid var(--line); }
.items-table td.qty { text-align: right; white-space: nowrap; }
.items-table tr.cat-row td { background: var(--sunken); font-weight: 600; font-size: .8rem; color: var(--muted); padding: 5px 8px; }
.note { background: var(--warn-soft); color: var(--fg); padding: 10px 12px; border-radius: 8px; font-size: .92rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.steps { display: flex; gap: 6px; align-items: center; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.steps span.on { color: var(--fg); font-weight: 600; }
.steps .sep { width: 18px; height: 2px; background: var(--line); }

/* Tabela de produtos (admin) */
.table-scroll { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; min-width: 640px; }
.ptable th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--sunken); }
.ptable td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ptable tr.off td:not(:last-child):not(:nth-last-child(2)) { opacity: .55; }
.ptable tr:last-child td { border-bottom: 0; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 0; background: transparent; padding: 6px 0; font-weight: 600; font-size: .85rem; min-height: 40px; }
.switch .track { width: 40px; height: 24px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.switch[aria-checked="true"] .track { background: var(--ok); }
.switch[aria-checked="true"] .track::after { transform: translateX(16px); }
.switch[aria-checked="true"] .lbl { color: var(--ok); }
.switch[aria-checked="false"] .lbl { color: var(--danger); }

/* Ícones de categoria */
.cat-ico { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.cat-ico svg { width: 24px; height: 24px; }
.ico-secos { background: #F5E7C8; color: #7A5410; }
.ico-bebidas { background: #D7E8F7; color: #1F5A93; }
.ico-suinos { background: #F8DCE0; color: #9B3043; }
.ico-bovinos { background: #F3D6CC; color: #8A2E17; }
.ico-limpeza { background: #D5EFEA; color: #1B6B5C; }
.ico-pescados { background: #DCE3F6; color: #34488F; }
.ico-hortifruti { background: #E1F0D2; color: #3D6E1C; }
.ico-outros { background: var(--sunken); color: var(--muted); }

/* Lista simples (categorias / empresas) */
.list { display: grid; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1 1 160px; min-width: 0; display: grid; gap: 2px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }

/* Catálogo do gerente */
.shop-head { display: grid; gap: 12px; margin-bottom: 8px; }
.sticky-filters { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 60px); z-index: 10; background: var(--bg); padding-block: 10px; display: grid; gap: 10px; }
.cat-section { margin-top: 22px; display: grid; gap: 10px; }
.cat-section > header { display: flex; align-items: center; gap: 10px; }
.cat-section > header .cat-ico { width: 34px; height: 34px; border-radius: 8px; }
.cat-section > header .cat-ico svg { width: 19px; height: 19px; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.product.in-cart { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.product .info { flex: 1; min-width: 0; display: grid; gap: 3px; }
.product .info strong { font-weight: 600; overflow-wrap: anywhere; }
.product.out { opacity: .6; }
.product.out .cat-ico { filter: grayscale(1); }
.out-tag { font-size: .78rem; font-weight: 600; color: var(--danger); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: none; }
.stepper button { width: 40px; height: 40px; border: 0; background: var(--sunken); cursor: pointer; font-size: 1.2rem; font-weight: 600; display: grid; place-items: center; }
.stepper button:hover { background: var(--line); }
.stepper input { width: 62px; height: 40px; border: 0; text-align: center; background: var(--surface); font-family: var(--font-mono); font-size: .95rem; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.add-btn { min-width: 104px; }

.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding-bottom: env(safe-area-inset-bottom, 0px); pointer-events: none; }
.cartbar .wrap { padding-block: 12px; }
.cartbar button { pointer-events: auto; width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 0 20px; border-radius: 12px; border: 0; background: var(--accent); color: var(--accent-fg); font-weight: 700; font-size: 1rem; cursor: pointer; box-shadow: var(--shadow); }

.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(10,15,13,.45); display: flex; justify-content: flex-end; }
.drawer { width: min(460px, 100%); height: 100%; background: var(--surface); display: flex; flex-direction: column; box-shadow: var(--shadow); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px); animation: slidein .2s ease-out; }
@keyframes slidein { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer header, .drawer footer { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.drawer header { border-bottom: 1px solid var(--line); }
.drawer footer { border-top: 1px solid var(--line); display: grid; gap: 10px; }
.drawer .body { flex: 1; overflow-y: auto; padding: 8px 18px; display: grid; gap: 4px; align-content: start; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-line .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cart-line.bad { color: var(--danger); }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.empty strong { color: var(--fg); font-size: 1.05rem; }
.center-card { max-width: 460px; margin: 40px auto; display: grid; gap: 16px; }
.banner { padding: 10px 14px; border-radius: 8px; background: var(--info-soft); color: var(--fg); font-size: .9rem; margin-bottom: 14px; }
.banner.warn { background: var(--warn-soft); }
.example-tag { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; background: var(--info-soft); color: var(--info); padding: 2px 7px; border-radius: 4px; }

.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; background: var(--fg); color: var(--bg); padding: 12px 18px; border-radius: 10px; font-weight: 500; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.confirm-inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .85rem; }

/* Produção */
.progress { height: 4px; background: var(--sunken); }
.progress span { display: block; height: 100%; background: var(--ok); transition: width .25s ease; }
.prod-items { display: grid; }
.prod-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.prod-item:last-child { border-bottom: 0; }
.prod-item .grow { flex: 1 1 180px; min-width: 0; display: grid; gap: 2px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; border-right: 1px solid var(--line); background: var(--surface); padding: 0 12px; min-height: 44px; cursor: pointer; font-weight: 600; font-size: .85rem; color: var(--muted); }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--sunken); }
.seg .seg-pendente[aria-pressed="true"] { background: var(--sunken); color: var(--fg); }
.seg .seg-preparo[aria-pressed="true"] { background: var(--warn-soft); color: var(--warn); }
.seg .seg-pronto[aria-pressed="true"] { background: var(--ok-soft); color: var(--ok); }
.seg .seg-falta[aria-pressed="true"] { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 520px) { .seg { width: 100%; } .seg button { flex: 1; padding: 0 6px; } }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--sunken); flex: none; object-fit: cover; }
.person .row-actions { flex-wrap: wrap; }
.invite-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; max-width: 70ch; }
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: var(--accent-fg); }

/* Ajustes do site próprio */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.ptable .cat-ico { width: 28px; height: 28px; border-radius: 6px; }
.ptable .cat-ico svg { width: 16px; height: 16px; }
.auth { max-width: 420px; margin: 32px auto; display: grid; gap: 16px; }
.auth h2 { font-size: 1.6rem; }
.auth .switch-link { background: none; border: 0; color: var(--accent); font-weight: 600; cursor: pointer; padding: 8px 0; text-decoration: underline; }
.auth .links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.user-chip { color: var(--bar-muted); font-size: .85rem; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.err { color: var(--danger); font-size: .88rem; font-weight: 500; }

/* Atualização 2: destinos, terceirizados, remoção de itens, impressão */
.form-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.st-info { background: var(--info-soft); color: var(--info); }
.items-table tr.removed td { color: var(--muted); }
.items-table tr.removed td:first-child { text-decoration: line-through; }
.items-table td.row-actions { justify-content: flex-end; }
.kind-field { font-size: .78rem; min-width: 190px; }
.kind-field select { min-height: 38px; }
.kind-help { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .82rem; color: var(--muted); }
.ticket .ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 16px; flex-wrap: wrap; }
.ticket .ticket-head > div:first-child { display: grid; gap: 2px; min-width: 0; }
.ticket-no { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; letter-spacing: .02em; }
.ticket-co { font-weight: 600; }
.ticket-meta { display: grid; justify-items: end; gap: 2px; text-align: right; }
.ticket-meta b { font-family: var(--font-display); font-size: 1.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
ol.prod-items { list-style: none; margin: 0; padding: 0; }
.item-no { width: 28px; height: 28px; border-radius: 50%; background: var(--sunken); display: grid; place-items: center; font-size: .82rem; flex: none; }
.seg .seg-t-pendente[aria-pressed="true"] { background: var(--sunken); color: var(--fg); }
.seg .seg-t-solicitado[aria-pressed="true"] { background: var(--warn-soft); color: var(--warn); }
.seg .seg-t-entregue[aria-pressed="true"] { background: var(--ok-soft); color: var(--ok); }
.seg .seg-t-falta[aria-pressed="true"] { background: var(--danger-soft); color: var(--danger); }

/* Impressão (nota de conferência / ficha de produção) em A4 */
#print-area { display: none; }
@media print {
  @page { size: A4 portrait; margin: 12mm 12mm 14mm; }
  html, body { background: #fff !important; color: #000 !important; padding: 0 !important; }
  body::before { display: none !important; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; }
}
.p-doc { font-family: Arial, "Helvetica Neue", sans-serif; font-size: 10.5pt; color: #000; line-height: 1.35; }
.p-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 8px; }
.p-brand { font-size: 16pt; font-weight: 700; }
.p-sub { font-size: 9pt; color: #444; }
.p-title { text-align: right; font-size: 13pt; font-weight: 700; letter-spacing: .04em; }
.p-nf { font-size: 8.5pt; font-weight: 400; color: #444; letter-spacing: 0; }
.p-info { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #000; margin-bottom: 8px; }
.p-info > div { padding: 4px 8px; border-right: 1px solid #999; border-bottom: 1px solid #999; display: grid; }
.p-info > div:nth-child(3n) { border-right: 0; }
.p-info > div:nth-last-child(-n+3) { border-bottom: 0; }
.p-info span { font-size: 7.5pt; text-transform: uppercase; color: #555; letter-spacing: .05em; }
.p-info b { font-size: 10.5pt; }
.p-note { border: 1px dashed #000; padding: 5px 8px; margin-bottom: 8px; }
.p-h { font-size: 11pt; margin: 10px 0 4px; border-bottom: 1px solid #000; padding-bottom: 2px; }
.p-hint { font-size: 8.5pt; color: #444; margin: 0 0 4px; }
.p-table { width: 100%; border-collapse: collapse; }
.p-table th { text-align: left; font-size: 8pt; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid #000; padding: 3px 5px; }
.p-table td { padding: 4px 5px; border-bottom: 1px solid #ccc; vertical-align: middle; }
.p-table .r { text-align: right; white-space: nowrap; }
.p-table tr { page-break-inside: avoid; }
.p-cat td { background: #eee; font-weight: 700; font-size: 9.5pt; border-bottom: 1px solid #999; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.p-cat span { font-weight: 400; color: #444; }
.p-box { display: inline-block; width: 12px; height: 12px; border: 1.2px solid #000; }
.p-removed { margin: 0; padding-left: 18px; }
.p-empty { color: #555; font-style: italic; }
.p-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14mm; margin-top: 16mm; page-break-inside: avoid; }
.p-sign div { display: grid; gap: 3px; font-size: 8.5pt; text-align: center; }
.p-sign span { border-bottom: 1px solid #000; height: 10mm; }
.p-chg { font-size: 7.5pt; color: #444; }
.company-group { margin-bottom: 22px; }
.company-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 6px 2px 10px; border-bottom: 2px solid var(--fg); margin-bottom: 12px; }
.company-head h3 { font-size: 1.25rem; text-transform: uppercase; letter-spacing: .03em; }
.qty-form { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.qty-form input { width: 90px; min-height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-family: var(--font-mono); text-align: right; }
.ptable.totals .total-cell { font-weight: 700; font-size: 1.05rem; color: var(--fg); }
.p-foot { margin-top: 8mm; font-size: 7.5pt; color: #555; text-align: center; border-top: 1px solid #999; padding-top: 3px; }

/* aviso de pedido novo */
.alerts-on { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 520px; }


/* fotos dos produtos */
.prod-img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; background: #fff; border: 1px solid var(--line); display: block; }
.product .prod-img { width: 64px; height: 64px; }
.product.out .prod-img { filter: grayscale(1); }
.photo-cell { display: flex; align-items: center; gap: 8px; }
.ptable .photo-tools { flex-direction: column; align-items: flex-start; }
.ptable .photo-tools .btn { min-height: 28px; padding-top: 2px; padding-bottom: 2px; }
.photo-cell.is-target .photo-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.photo-box { width: 64px; height: 64px; border-radius: 10px; border: 1px dashed var(--line); background: var(--sunken); display: grid; place-items: center; padding: 0; cursor: pointer; overflow: hidden; flex: none; color: inherit; }
.photo-box .prod-img { width: 100%; height: 100%; border: 0; border-radius: 0; }
.photo-plus { font-size: .78rem; font-weight: 600; color: var(--muted); }
.photo-tools { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.photo-tools .btn { text-decoration: none; white-space: nowrap; }
/* entregas do açougue */
.deliv { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.deliver-btn { white-space: nowrap; }
