:root { --coral: #d85f58; --coral-dark: #b4433d; --cream: #fbf5ec; --sand: #eed8a6; --ink: #3a211e; --muted: #7d6460; --line: #eadccf; --ok: #2f7d4f; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--cream); color: var(--ink); }
h1 { font-size: 1.5rem; margin: .4rem 0 1rem; } h2 { font-size: 1.15rem; margin: .8rem 0 .6rem; } h3 { font-size: 1rem; margin: .3rem 0; }
a { color: var(--coral-dark); }
.boot { padding: 3rem; text-align: center; }
.muted, small { color: var(--muted); } small { font-size: .8rem; }
.error { color: #a1231c; font-weight: 600; }

button, .button { font: inherit; font-weight: 700; border: 1.5px solid var(--coral); background: var(--coral); color: #fff; border-radius: 999px; padding: .6rem 1.1rem; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { background: var(--coral-dark); border-color: var(--coral-dark); }
button.ghost, .button.ghost { background: transparent; color: var(--coral-dark); }
button.ghost:hover, .button.ghost:hover { background: #d85f5818; }
button.small, .button.small { padding: .3rem .7rem; font-size: .82rem; }
button.wide { width: 100%; margin-top: .8rem; padding: .85rem; }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { font: inherit; width: 100%; padding: .6rem .75rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: inherit; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid #d85f5855; outline-offset: 1px; }
label { display: block; font-weight: 600; margin: .65rem 0; } label input, label select, label textarea { margin-top: .25rem; font-weight: 400; }
label.check { display: flex; gap: .55rem; align-items: center; } label.check input { width: auto; margin: 0; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: var(--sand); }
.login form { width: min(400px, 100%); padding: 1.5rem; text-align: center; } .login label { text-align: left; }
.login img { width: 100%; border-radius: 14px; max-height: 150px; object-fit: cover; }

.top { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .6rem 1rem; background: var(--sand); }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.1rem; color: var(--coral-dark); text-decoration: none; white-space: nowrap; }
.brand img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; } .brand span { color: var(--ink); font-weight: 600; }
.who { display: flex; align-items: center; gap: .4rem; } .who span { font-size: .85rem; }
@media (max-width: 560px) { .who span, .brand span { display: none; } }
.menu { display: flex; gap: .2rem; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--line); padding: 0 .6rem; }
.menu a { padding: .75rem .8rem; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; white-space: nowrap; }
.menu a.on { color: var(--coral-dark); border-color: var(--coral); }
.testbar { background: #fff3c4; font-size: .78rem; text-align: center; padding: .3rem; }
main#page { max-width: 1040px; margin: 0 auto; padding: 1rem 1rem 7rem; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1rem; margin-bottom: .9rem; }
.card.warn { background: #fff3c4; } .card.done { border: 2px solid var(--ok); }
.card.line { display: flex; justify-content: space-between; align-items: center; gap: 1rem; } .card.line p { margin: .2rem 0; }
.scroll { overflow-x: auto; }
.cycle { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.cycle small { display: block; text-transform: uppercase; letter-spacing: .04em; font-size: .68rem; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .6rem 0; }
.row input[type=search] { max-width: 280px; } .filters select { width: auto; max-width: 100%; }
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.2rem; } @media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.pair { display: grid; grid-template-columns: 1.4fr 1fr; gap: .6rem; }

table { width: 100%; border-collapse: collapse; }
td, th { padding: .5rem .4rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
th { font-size: .72rem; text-transform: uppercase; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.r { text-align: right; } .nowrap { white-space: nowrap; }
tr[data-act=open], tr[data-order] { cursor: pointer; } tr[data-act=open]:hover, tr[data-order]:hover { background: var(--cream); }
.lines .total td { font-weight: 800; border-top: 2px solid var(--ink); }
.prices input { width: 100px; text-align: right; }
.thumb { width: 54px; } .thumb img { width: 46px; height: 46px; object-fit: cover; border-radius: 10px; display: block; }
tr.off td { opacity: .6; }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .12rem .55rem; border-radius: 999px; background: #efe7e0; color: var(--ink); vertical-align: middle; }
.s-confirmado { background: #dcebfa; } .s-fechado { background: #ffe6b3; } .s-saiu { background: #eadcf8; } .s-entregue { background: #d5efdc; } .s-cancelado { background: #f8d7d4; }
.badge.special { background: var(--sand); } .badge.warnb { background: #fff3c4; }

.toolbar { position: sticky; top: 0; background: var(--cream); padding: .5rem 0; z-index: 2; }
.toolbar > button { margin-bottom: .5rem; }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding: .6rem 0 .2rem; }
.chip { white-space: nowrap; background: #fff; color: var(--ink); border-color: var(--line); font-size: .85rem; padding: .45rem .85rem; }
.chip:hover { color: #fff; } .chip.on { background: var(--coral); border-color: var(--coral); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .7rem; margin-top: .5rem; }
.product { display: grid; grid-template-columns: 72px 1fr; gap: .3rem .75rem; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: .7rem; align-items: center; }
.product.picked { border-color: var(--coral); box-shadow: 0 0 0 2px #d85f5833; }
.product.off { opacity: .55; }
.product img, .noimg { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; grid-row: span 2; }
.noimg { display: grid; place-items: center; background: var(--sand); color: var(--coral-dark); font-weight: 800; }
.product h3 { font-size: .92rem; margin: 0; } .product p { margin: .15rem 0 0; }
.qty { display: flex; gap: .3rem; align-items: center; }
.qty button { width: 38px; height: 38px; padding: 0; } .qty button.ten { width: auto; padding: 0 .65rem; background: transparent; color: var(--coral-dark); }
.qty input { width: 62px; text-align: center; padding: .45rem .2rem; }
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .75rem max(1rem, calc((100vw - 1010px) / 2)) calc(.75rem + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; z-index: 3; }
.cartbar strong { font-size: 1.25rem; display: block; } .cartbar small { color: var(--sand); }

dialog { border: 0; border-radius: 20px; padding: 0; width: min(560px, calc(100vw - 1.2rem)); max-height: 90vh; color: inherit; }
dialog::backdrop { background: #3a211e99; }
dialog header { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
dialog header h2 { margin: 0; } dialog .body { padding: .8rem 1rem 1.2rem; }
dialog button.x { padding: .3rem .65rem; }

pre { white-space: pre-wrap; word-break: break-word; font: inherit; background: var(--cream); padding: .8rem; border-radius: 12px; }
.msg summary { cursor: pointer; }
.qr { width: 264px; max-width: 100%; display: block; background: #fff; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }

#toast { position: fixed; left: 50%; top: 14px; transform: translate(-50%, -160%); visibility: hidden; background: var(--ok); color: #fff; padding: .75rem 1.1rem; border-radius: 14px; max-width: calc(100vw - 2rem); z-index: 50; transition: transform .25s; font-weight: 600; }
#toast.show { transform: translate(-50%, 0); visibility: visible; } #toast.bad { background: #a1231c; }

@media print { .top, .menu, .testbar, .noprint { display: none !important; } body { background: #fff; } .card { break-inside: avoid; } }
