#sheet[data-order] {
  --receipt-ink: #293b2e;
  --receipt-rule: #c6c5b2;
  --receipt-dots: 1px dotted #a4ab96;
  --receipt-type: var(--fonte-recibo);
  color: var(--receipt-ink);
  background-color: #fffdf6;
  background-image: linear-gradient(102deg, #f4eedf77, transparent 43%, #f5f0e544);
  font-family: var(--fonte-painel);
  width: min(416px, calc(100% - 28px));
  max-height: 90dvh;
  border: 1px solid #d8d4c6;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  padding: 18px clamp(16px, 4.6vw, 24px) 22px;
  overscroll-behavior: contain;
  box-shadow: 0 9px 36px #10201738;
  --paper-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 3px) no-repeat,
    conic-gradient(from -45deg at 50% 100%, #000 90deg, transparent 0) bottom / 8px 4px repeat-x;
  -webkit-mask: var(--paper-mask);
  mask: var(--paper-mask);
}
#sheet[data-order] .sheet-head {
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: var(--receipt-dots);
  margin-bottom: 6px;
}
#sheet[data-order] .sheet-head h2 {
  min-width: 0;
  margin: 0;
  font: 500 clamp(28px, 8vw, 35px)/1.06 Georgia, "Times New Roman", serif;
  letter-spacing: -.048em;
  overflow-wrap: anywhere;
  text-align: start;
}
#sheet[data-order]:has(.added-line) .sheet-head {
  padding-bottom: 13px;
  margin-bottom: 8px;
}
.receipt-mast {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  margin: 1px 0 7px;
  color: #4a5c4d;
  font: 600 10px/1.3 var(--receipt-type);
  letter-spacing: .13em;
  text-transform: uppercase;
}
.receipt-table {
  border-inline-start: 1px solid var(--receipt-rule);
  padding-inline-start: 11px;
  letter-spacing: .03em;
  text-transform: none;
}
#sheet[data-order] .close {
  flex: none;
  width: 44px; height: 44px;
  border: 1px solid #d4d1c5;
  background: #fffcf4;
}
#sheet[data-order] .close svg {width: 17px; height: 17px;}
#sheet[data-order] button:focus-visible {outline: 2px solid var(--slip-folha); outline-offset: 2px;}
.added-line, .cart-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0 13px;
}
.added-line img, .cart-item img, .prep-product img {
  display: block;
  width: 49px; height: 54px;
  object-fit: cover;
  border-radius: 5px;
}
.added-line strong, .item-detail strong {
  display: block;
  font: 650 16px/1.24 var(--fonte-painel);
  letter-spacing: -.025em;
}
.add-status {
  display: block;
  font: 550 10px/1.3 var(--receipt-type);
  color: #47624d;
  margin-bottom: 4px;
}
.unit-price {white-space: nowrap; font-size: 14px; font-weight: 600;}
.added-line > div, .item-detail, .prep-product strong {min-width: 0; overflow-wrap: anywhere;}
.prep-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; margin: 10px 0 4px; padding: 10px 12px;
  border: 1px dashed #b5c2b3; border-radius: 12px; background: transparent; color: var(--receipt-ink, #293b2e);
  font: 600 14px/1.2 system-ui, sans-serif; text-align: left;
}
.prep-toggle svg { width: 16px; height: 16px; flex: none; }
.prep-toggle small { margin-inline-start: auto; color: #5a6859; font: 400 11px/1.3 var(--fonte-recibo, ui-monospace, monospace); }
.prep-field {
  margin: 1px 0 15px;
  border: 1px solid #c8cdbf;
  border-radius: 13px;
  background: #fffef9;
  box-shadow: inset 3px 0 #879d72;
}
.prep-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px 0;
  color: #314a39;
  font: 650 14px system-ui, sans-serif;
}
.prep-field label svg, .edit-prep svg {width: 16px; height: 16px; flex: none;}
.prep-field label small {margin-inline-start: auto; color: #5a6859; font: 400 11px/1.3 var(--receipt-type);}
.prep-field textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  resize: vertical;
  padding: 6px 13px 10px;
  border: 0;
  border-radius: 0 0 13px 13px;
  background: transparent;
  color: var(--grub-tinta);
  font: 400 16px/1.35 system-ui, sans-serif;
}
.prep-field:focus-within {outline: 2px solid var(--slip-folha); outline-offset: 1px;}
.prep-field textarea:focus {outline: none;}
.prep-field textarea::placeholder {color: #697567;}
.line-controls {grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px;}
.edit-prep {
  display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 44px; padding: 7px 11px;
  background: #edf1e6; border: 1px solid #c3cdbd; border-radius: 11px; color: #355a44;
  font: 650 13px system-ui, sans-serif; text-align: start; overflow-wrap: anywhere;
}
.edit-prep .line-preparation {padding: 0; margin: 3px 0 0; border: 0; color: var(--receipt-ink); font-weight: 450;}
.prep-product {display: flex; gap: 12px; align-items: center; margin: 14px 0;}
.prep-product strong {font-size: 17px;}
.prep-hint {margin: 7px 0; color: #526454; font-size: 13px; line-height: 1.4;}
.line-preparation {display: block; margin: 6px 0 2px; border-inline-start: 2px solid #a6bd94; padding-inline-start: 7px; line-height: 1.4; white-space: pre-line; font-size: 14px; overflow-wrap: anywhere;}
.order-primary, .bag-link {
  width: 100%; display: flex; align-items: center; gap: 9px;
  min-height: 47px; border-radius: 8px; font-size: 15px; font-weight: 650; padding: 11px 14px;
}
.order-primary {justify-content: space-between; margin-top: var(--espaco-3); background: var(--grub-adicionar); color: white;}
.bag-link {border: 1px solid #babfae; margin-top: 10px; background: #fffdf7;}
.bag-link span {margin-inline-start: auto;}
.browse {display: block; min-height: 44px; margin: 2px auto 0; color: #36533d; font-size: 14px; font-weight: 600;}
.cart-item {gap: 8px 10px; border-bottom: 1px dashed var(--receipt-rule); padding: 12px 0;}
.item-detail small, .order-total small {display: block; color: #58695b; font-size: 12px; margin-top: 4px;}
.quantity-step {display: inline-flex; align-items: center; gap: 1px; flex: none; border: 1px solid #cdd0be; border-radius: 24px; background: #fffdf7; font-size: 13px;}
.quantity-step button {min-height: 44px; min-width: 36px; font-size: 18px;}
.order-total {display: flex; align-items: baseline; gap: 8px; margin: 12px 0 5px; padding: 8px 0 4px;}
.order-total::before {content: ''; flex: 1; order: 1; border-bottom: var(--receipt-dots);}
.order-total strong {order: 2; font-size: clamp(18px, 5.8vw, 24px); letter-spacing: -.06em; white-space: nowrap;}
.order-note, .empty-bag p {font-size: 14px; line-height: 1.5; color: #516654;}
.promo-note {margin-top: var(--espaco-3); font-size: 13px; font-weight: 650; color: #365f37;}
.empty-bag {text-align: center; padding: 15px 10px;}
.empty-bag img {height: 70px; width: auto; margin-bottom: 9px;}
#sheet[data-order] :is(.unit-price,.order-total,.item-detail small,.bag-link span,.quantity-step span) {
  font-family: var(--receipt-type);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 350px) {
  .added-line, .cart-item {column-gap: 7px;}
  .added-line img, .cart-item img {width: 41px; height: 46px;}
  .quantity-step button {min-width: 33px;}
  .line-controls {flex-wrap: wrap;}
}
@media (max-width:740px) {
  html:has(#feed:not([hidden])):has(#sheet[data-order][open]) {
    background-color:#111910;
    overscroll-behavior-y:none;
  }
  #sheet[data-order] {
    margin: auto auto max(12px,env(safe-area-inset-bottom));
    max-height: calc(100dvh - max(18px,env(safe-area-inset-top)) - max(16px,env(safe-area-inset-bottom)));
  }
}
#sheet[data-order][data-note-viewport] {
  position: fixed;
  top: auto;
  bottom: max(12px,env(safe-area-inset-bottom),calc(var(--note-bottom,0px) + 10px));
  margin: 0 auto;
  max-height: calc(var(--note-height,100dvh) - max(12px,env(safe-area-inset-bottom)) - max(10px,env(safe-area-inset-top)));
}
#sheet[data-note-viewport] .prep-field textarea {resize:none}
@media (min-width:741px) {
  #sheet[data-order][data-note-viewport] {
    top:var(--note-top,0px);
    bottom:var(--note-bottom,0px);
    margin:auto;
    max-height:min(90dvh,calc(var(--note-height,100dvh) - 24px));
  }
}
@media (prefers-reduced-motion:no-preference) {
  #sheet[data-order][data-note-viewport][data-note-returning] {
    transition-property:top,bottom,max-height;
    transition-duration:.23s;
    transition-timing-function:cubic-bezier(.22,.65,.3,1);
  }
  #sheet[data-order][open] {animation:receipt-rise .32s cubic-bezier(.2,.75,.25,1)}
  .order-primary:active,.bag-link:active {transform:scale(.985)}
  @keyframes receipt-rise {
    from {opacity:.3; transform:translateY(64px)}
    to {opacity:1; transform:translateY(0)}
  }
}
.bag-parcel, #cart[data-receiving] {--bag-delivery-time:940ms}
.bag-parcel {
  position:fixed;z-index:10;width:64px;height:64px;pointer-events:none;
  filter:drop-shadow(0 5px 5px #12271540);transform-origin:center;
  animation:bag-delivery var(--bag-delivery-time) linear both
}
@keyframes bag-delivery {
  0% {transform:translate(0,4px) rotate(-5deg) scale(.88);opacity:0;animation-timing-function:ease-out}
  16% {opacity:1}
  49% {transform:translate(0,-16px) rotate(-4deg) scale(1.06);animation-timing-function:cubic-bezier(.52,.02,.79,.55)}
  69% {transform:translate(calc(var(--bag-x) * .48),calc(var(--bag-approach-y) * .61)) rotate(7deg) scale(.62);animation-timing-function:cubic-bezier(.2,.54,.35,1)}
  81% {transform:translate(var(--bag-x),var(--bag-approach-y)) rotate(-3deg) scale(.23);clip-path:inset(-25%);opacity:1;animation-timing-function:ease-in}
  91%,100% {transform:translate(var(--bag-x),var(--bag-y)) rotate(0) scale(.16);clip-path:inset(0 0 100%);opacity:0}
}
#cart[data-receiving] svg {overflow:visible}
#cart[data-receiving] :is(.bag-body,.bag-handle,.bag-mouth) {
  transform-box:view-box;
  animation-duration:var(--bag-delivery-time);
  animation-timing-function:ease-in-out;
  animation-fill-mode:both
}
#cart[data-receiving] .bag-body {transform-origin:12px 21px;animation-name:bag-body-receive}
#cart[data-receiving] .bag-handle {transform-origin:12px 8px;animation-name:bag-handle-lift}
#cart[data-receiving] .bag-mouth {transform-origin:12px 7px;fill:currentColor;fill-opacity:.22;animation-name:bag-mouth-open}
@keyframes bag-body-receive {
  0%,60%,100% {transform:none}
  78%,85% {transform:scale(1.24,.91)}
  93% {transform:translateY(1px) scale(1.08,.95)}
}
@keyframes bag-handle-lift {
  0%,60%,100% {transform:none}
  78%,85% {transform:translateY(1px) rotate(-9deg) scale(1.18,1.4)}
  93% {transform:translateY(2px) scale(1.03,.86)}
}
@keyframes bag-mouth-open {
  0%,60%,100% {transform:scale(1,0);opacity:0}
  78%,86% {transform:translateY(1.2px) scale(1.23,1);opacity:1}
  93% {transform:translateY(1.6px) scale(1.08,.45);opacity:.8}
}
.bag-parcel > img {
  position:absolute;left:6px;top:0;width:52px;height:54px;object-fit:cover;
  border:2px solid #fcf7e8;border-radius:12px;transform:rotate(-5deg);object-position:50% 65%
}
.bag-parcel > img:nth-child(2) {left:32px;top:10px;width:30px;height:33px;transform:rotate(9deg)}
.parcel-pocket,.parcel-flap {position:absolute;left:2px;right:2px;transform-origin:bottom}
.parcel-pocket {
  bottom:1px;height:36px;display:grid;place-items:center;
  clip-path:polygon(0 0,51% 15%,100% 0,94% 100%,6% 100%);
  background:linear-gradient(103deg,#af7943 0 10%,#dec093 12% 84%,#c7a172 86%);
  animation:parcel-wrap .32s ease-out both
}
.parcel-pocket svg {width:20px;height:20px;margin-top:4px;fill:none;stroke:#5b432b;stroke-width:1.5}
.parcel-flap {
  top:23px;height:17px;clip-path:polygon(0 0,100% 0,94% 60%,50% 100%,6% 60%);
  background:linear-gradient(#edd5aa,#cfa875);animation:parcel-wrap .2s .23s ease-out both
}
@keyframes parcel-wrap {from {transform:scaleY(0);opacity:0} to {transform:scaleY(1);opacity:1}}
.table-fixed {
  display: flex; align-items: center; gap: 10px; margin: 12px 0; padding: 11px 14px; border-radius: 12px;
  background: #edf0e6; color: var(--receipt-ink, #293b2e); font-size: 15px;
}
.table-fixed span { font-weight: 600; }
.table-fixed strong { margin-inline-start: auto; font: 700 16px/1.2 var(--fonte-recibo, ui-monospace, monospace); }
.table-field {display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:14px;margin:11px 0;color:var(--receipt-ink);font-size:15px;font-weight:650}
.table-field input {min-width:0;padding:10px 12px;min-height:44px;border:1px solid #b5c2b3;border-radius:10px;background:#fffefb;color:var(--receipt-ink);font:500 16px/1.3 system-ui,sans-serif}
.table-field input:read-only {background:#edf0e6}
.table-field input:focus-visible {outline:2px solid var(--slip-folha);outline-offset:1px}
.sent-heading {display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;margin:17px 0 10px;font:600 15px/1.4 var(--receipt-type);overflow-wrap:anywhere}
.sent-heading strong {font-size:18px;letter-spacing:-.045em}
.sent-heading span {font-size:13px;color:#425747}
.sent-line {display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px dashed var(--receipt-rule);font-size:14px}
.sent-line>div {min-width:0;overflow-wrap:anywhere}
.sent-line>span {white-space:nowrap;font-family:var(--receipt-type)}
.order-warning {margin:10px 0;padding:9px 12px;border-left:3px solid #a68039;color:#674914;font-size:14px;line-height:1.45}
#retry-order:disabled {opacity:.72}

/* Adicionais */
.choice-dish {display: flex; gap: 12px; align-items: center; margin: 12px 0 0;}
.choice-dish img {flex: none; width: 56px; height: 60px; object-fit: cover; border-radius: 6px;}
.choice-dish p {margin: 0; color: #4d5b4f; font-size: 14px; line-height: 1.45;}
.choice-group {min-inline-size: 0; margin: 22px 0 0; padding: 0; border: 0;}
.choice-group legend {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  gap: 12px; padding: 0 0 8px;
}
.choice-group legend span {
  min-width: 0; font: 700 16px/1.2 var(--fonte-painel);
  letter-spacing: -.025em; overflow-wrap: anywhere;
}
.choice-group legend small {
  flex-shrink: 0; padding: 4px 8px; border: 1px solid #cbd0c1; border-radius: 5px;
  background: #f1f2e8; color: #495b4c; font: 600 11px/1.2 var(--receipt-type);
}
.choice-group legend .required {background: #e2edcf; border-color: #bfcea7; color: #2a4c35;}
.choice-group[data-chosen] legend small::before {
  content: ""; display: inline-block; vertical-align: .18em; width: 8px; height: 4px; margin-inline-end: 5px;
  border-left: 1.6px solid; border-bottom: 1.6px solid; transform: rotate(-45deg);
}
.choice-row {
  position: relative; display: flex; align-items: center; min-height: 46px; padding: 9px 8px; gap: 11px;
  border: 1px solid transparent; border-bottom-color: #dedfd2; cursor: pointer;
}
.choice-copy {flex: 1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 7px; min-width: 0;}
.choice-copy strong {min-width: 0; flex: 1 1 5em; overflow-wrap: anywhere; font-weight: 600; font-size: 15px; line-height: 1.3;}
.choice-copy small {margin-inline-start: auto; white-space: nowrap; color: #5a6859; font: 500 12px/1.2 var(--receipt-type); font-variant-numeric: tabular-nums;}
.choice-mark {
  display: grid; place-items: center; order: -1; flex: none; width: 20px; height: 20px;
  border: 1.5px solid #788574; border-radius: 50%; background: #fffef9;
}
.choice-row input {
  position: absolute; opacity: 0; inset-inline-start: 8px; top: 50%; width: 20px; height: 20px; margin: 0;
  transform: translateY(-50%); cursor: inherit;
}
.choice-row input[type=checkbox] + .choice-mark {border-radius: 5px;}
.choice-row:has(input:checked) {background: #edf3e2; border-color: #bdcdaa; border-radius: 6px; color: #214632;}
.choice-row input:checked + .choice-mark {background: var(--grub-verde); border-color: var(--grub-verde);}
.choice-row input[type=radio]:checked + .choice-mark::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff;
}
.choice-row input[type=checkbox]:checked + .choice-mark::after {
  content: ""; width: 10px; height: 6px; border-left: 2px solid #fff;
  border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(-45deg);
}
.choice-row:has(input:focus-visible) {outline: 2px solid var(--slip-folha); outline-offset: -2px;}
.choice-row:has(input:disabled) {color: #5b655a; background: #f5f4ec; cursor: default;}
.choice-row input:disabled + .choice-mark {opacity: .65;}
.choice-footer {
  position: sticky; z-index: 1; bottom: -22px; padding: 10px 0 14px;
  background: linear-gradient(to bottom, transparent, var(--grub-papel) 9px);
}
#choice-add {margin: 0; text-align: start;}
#choice-add span {min-width: 0; overflow-wrap: anywhere;}
#choice-add svg {flex-shrink: 0;}
#sheet #choice-add[data-needs-choice] {background: #eef1e7; border: 1px solid #a2b099; color: #304e38;}
#choice-add[data-needs-choice] svg {transform: rotate(-90deg);}
.line-choices {display: block; margin-top: 2px; color: #4d5b4f; font-size: 12px; line-height: 1.35;}

/* Recibo e chamados da mesa */
.receipt-progress {
  margin: 0 0 10px; padding: 15px 10px 11px; border: 1px solid #ced8c0;
  border-radius: 8px; background: #f0f4e7;
}
.order-steps {display: grid; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(4, minmax(0,1fr));}
.order-steps li {
  position: relative; display: grid; justify-items: center; gap: 7px;
  text-align: center; color: #536256; font: 600 11px/1.3 system-ui,sans-serif;
}
.order-steps li:not(:first-child)::before {
  content: ""; position: absolute; inset-inline-end: 50%; width: 100%; height: 1px; top: 9px; background: #8c9b86;
}
.order-steps li:is(.done,.current)::before {height: 2px; background: #426847;}
.step-dot {
  position: relative; z-index: 1; display: grid; place-items: center; width: 19px; height: 19px;
  background: #fffdf6; border: 1.5px solid #7b8a76; border-radius: 50%;
}
.done .step-dot {background: var(--grub-verde); border-color: var(--grub-verde);}
.done .step-dot::after {
  content: ""; width: 8px; height: 4px; border-left: 1.7px solid white;
  border-bottom: 1.7px solid white; transform: translateY(-1px) rotate(-45deg);
}
.order-steps .current {font-weight: 750; color: var(--grub-verde);}
.current .step-dot {border: 2px solid var(--grub-verde); background: #d6eeaf; box-shadow: 0 0 0 3px #cbdcb9;}
.current .step-dot::after {content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--grub-verde);}
#receipt-status {
  margin: 12px 0 0; padding-top: 9px; border-top: 1px solid #cfdac3;
  color: #34523d; text-align: center; font: 550 13px/1.4 var(--fonte-painel);
}
.table-calls {display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin-top: 12px;}
.call-button {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 8px; border: 1px solid #aab9a1; border-radius: 8px;
  color: #2e4d37; background: #f5f7ee; font: 650 14px/1.24 var(--fonte-painel);
}
.call-button span {min-width: 0; overflow-wrap: anywhere;}
.call-button svg {flex: none; width: 18px; height: 18px; stroke-width: 1.65;}
.call-button[data-sent] {border-color: #bdcda9; background: #e8f0db; color: #315039; cursor: default;}
.call-button .call-check, .call-button[data-sent] .call-symbol {display: none;}
.call-button[data-sent] .call-check {display: block;}
.call-feedback {margin: 9px 0 3px; color: #3b553f; font: 550 13px/1.4 var(--fonte-painel);}
.call-feedback:empty {margin: 0;}
.order-follow {justify-content: center; font-weight: 700;}

@media (prefers-reduced-motion: no-preference) {
  .choice-row, #choice-add, .call-button {transition: background-color .16s, border-color .16s;}
  #choice-add svg {transition: transform .2s;}
  .choice-missing legend small {animation: choice-nudge .35s ease;}
  @keyframes choice-nudge {50% {transform: translateX(-3px);}}
  .current .step-dot {animation: receipt-step .65s ease-out;}
  @keyframes receipt-step {from {box-shadow: 0 0 0 0 #8ba473;} to {box-shadow: 0 0 0 3px #cbdcb9;}}
}
