/* TEO — app do funcionário (mobile first). Usa tokens.css + base.css; aqui só o layout desta superfície. */

.app-body { background: var(--creme-200); }
.phone { max-width: var(--app-max); min-height: 100dvh; margin: 0 auto; background: var(--bg); box-shadow: 0 0 0 1px var(--line), var(--sh-2); }
@media (max-width: 480px) { .phone { box-shadow: none; } }

.app { display: flex; flex-direction: column; min-height: 100dvh; }
.app__main { flex: 1 1 auto; display: flex; flex-direction: column; gap: var(--s-5); min-width: 0; padding: var(--s-4) var(--s-4) var(--s-8); }
.app__main--flush { padding: 0 0 var(--s-8); }
.app__main:focus { outline: 0; }
.app__dock { position: sticky; bottom: 0; z-index: 30; display: flex; flex-direction: column; gap: var(--s-2); margin-top: auto; }
.pad { padding-inline: var(--s-4); }

/* ── Barras ─────────────────────────────────────────────── */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s-1); min-height: 56px; padding: 0 var(--s-2); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); }
.bar--plain { padding-left: var(--s-4); }
.bar__back, .iconbtn { display: grid; place-items: center; flex: none; width: var(--tap); height: var(--tap); border: 0; border-radius: 50%; background: none; color: var(--ink); text-decoration: none; position: relative; }
.bar__title { font-family: var(--font-ui); font-stretch: 100%; font-size: var(--fs-18); font-weight: 700; letter-spacing: 0; line-height: 1.2; }
.iconbtn--solid { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.iconbtn__dot { position: absolute; top: 9px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--ouro-500); box-shadow: 0 0 0 2px var(--surface); }

.tabbar { display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px var(--s-2) calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.tabbar__item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; border-radius: var(--r-md); color: var(--ink-2); font-size: var(--fs-12); font-weight: 650; text-decoration: none; }
.tabbar__ico { display: grid; place-items: center; width: 58px; height: 30px; border-radius: var(--r-pill); }
.tabbar__ico .icon { width: 23px; height: 23px; }
.tabbar__item[aria-current="page"] { color: var(--cafe-900); }
.tabbar__item[aria-current="page"] .tabbar__ico { background: var(--areia-200); }
.tabbar__n { position: absolute; top: 3px; left: calc(50% + 6px); display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: var(--r-pill); background: var(--ouro-500); color: var(--cafe-950); font-size: 11px; font-weight: 800; box-shadow: 0 0 0 2px var(--surface); }

.cartbar { display: flex; align-items: center; gap: var(--s-3); min-height: 58px; margin: 0 var(--s-4); padding: 0 var(--s-4) 0 var(--s-3); border-radius: var(--r-md); background: var(--cafe-800); color: var(--creme-100); font-weight: 700; text-decoration: none; box-shadow: var(--sh-2); }
.cartbar__n { display: grid; place-items: center; min-width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--ouro-500); color: var(--cafe-950); font-variant-numeric: tabular-nums; }
.dock__cta { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: var(--sh-up); }
.dock__note { font-size: var(--fs-13); color: var(--ink-2); text-align: center; }

/* ── Início ─────────────────────────────────────────────── */
.hello { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-2); }
.hello h1 { font-size: var(--fs-38); font-stretch: 80%; }
.hello__where { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--ink-2); font-size: var(--fs-14); }
.vale__label { font-size: var(--fs-14); font-weight: 600; color: var(--ink-on-brand-2); }
.vale__value { margin: 2px 0 6px; font-family: var(--font-display); font-stretch: 76%; font-weight: 800; font-size: var(--fs-48); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.vale__note { max-width: 24ch; font-size: var(--fs-13); line-height: 1.4; color: var(--ink-on-brand-2); }
.vale__stub { min-width: 116px; gap: 2px; }
.vale__time { font-family: var(--font-display); font-stretch: 76%; font-weight: 700; font-size: var(--fs-30); line-height: 1.05; font-variant-numeric: tabular-nums; }
.ticket--off { background: var(--creme-300); color: var(--ink); }
.ticket--off .vale__label, .ticket--off .vale__note { color: var(--ink-2); }

.rail { display: flex; gap: var(--s-2); margin: 0 calc(-1 * var(--s-4)); padding: 2px var(--s-4); overflow-x: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail .chip { min-height: var(--tap); }
.sec { display: flex; flex-direction: column; gap: var(--s-2); }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.sec__head h2 { font-size: var(--fs-24); }

.feature { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); text-decoration: none; }
.feature img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.feature__body { display: flex; flex-direction: column; gap: 6px; padding: var(--s-4); }
.feature h3 { font-size: var(--fs-24); }

.dish { display: grid; grid-template-columns: minmax(0, 1fr) 104px; align-items: center; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.dish:last-child { border-bottom: 0; }
.dish h3 { font-size: var(--fs-18); }
.dish__desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 4px 0 var(--s-2); color: var(--ink-2); font-size: var(--fs-14); line-height: 1.4; }
.dish__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.dish__price { font-weight: 750; }
.dish__hint { display: inline-flex; align-items: center; gap: 4px; color: var(--cafe-700); font-size: var(--fs-13); font-weight: 650; }
.dish__hint .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.dish__hint--voce { padding: 1px 9px; border-radius: var(--r-pill); background: var(--ouro-100); color: var(--ouro-900); }
.dish__media { position: relative; }
.dish__media img { width: 104px; height: 104px; border-radius: 18px; object-fit: cover; background: var(--surface-2); }
.dish__tag { position: absolute; left: 6px; bottom: 6px; }
.dish--mini { grid-template-columns: minmax(0, 1fr) 72px; padding: var(--s-3) 0; }
.dish--mini .dish__media img { width: 72px; height: 72px; border-radius: var(--r-md); }
.dish.is-out img { filter: grayscale(1); opacity: 0.55; }
.dish.is-out h3, .dish.is-out .dish__price { color: var(--ink-2); }
.is-closed .dish__hint, .is-closed .feature .dish__hint { display: none; }

/* ── Produto ────────────────────────────────────────────── */
.hero { position: relative; }
.hero img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.hero .bar__back { position: absolute; top: var(--s-3); left: var(--s-3); background: var(--surface); box-shadow: var(--sh-1); }
.hero.is-out img { filter: grayscale(1); opacity: 0.6; }
.pd { position: relative; display: flex; flex-direction: column; gap: var(--s-6); margin-top: -22px; padding: var(--s-5) var(--s-4) var(--s-8); border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--bg); }
.pd h1 { font-size: var(--fs-30); }
.pd__price { font-family: var(--font-display); font-stretch: 80%; font-weight: 700; font-size: var(--fs-24); font-variant-numeric: tabular-nums; }
.group__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-1); }
.group__head h2 { font-size: var(--fs-20); }
.group__rule { font-size: var(--fs-14); color: var(--ink-2); }
.opt { display: flex; align-items: center; gap: var(--s-3); min-height: 54px; padding: 6px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.opt:last-child { border-bottom: 0; }
.opt input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--brand); }
.opt__price { margin-left: auto; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.opt:has(input:disabled) { color: var(--ink-3); cursor: default; }
.stepper { display: inline-flex; align-items: center; flex: none; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); }
.stepper button { display: grid; place-items: center; width: var(--tap); height: var(--tap); border: 0; border-radius: var(--r-sm); background: none; }
.stepper button[disabled] { color: var(--ink-3); }
.stepper output { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.addbar { display: flex; align-items: center; gap: var(--s-3); }
.addbar .btn { flex: 1 1 0; justify-content: space-between; padding-inline: var(--s-4); }

/* ── Carrinho, revisão e comprovantes ───────────────────── */
.line { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--s-3); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line img { width: 64px; height: 64px; border-radius: var(--r-md); object-fit: cover; background: var(--surface-2); }
.line__name { font-weight: 700; }
.line__opts { color: var(--ink-2); font-size: var(--fs-14); line-height: 1.4; }
.line__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-2); }
.line--plain { grid-template-columns: minmax(0, 1fr) auto; padding: var(--s-3) 0; }
.where { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-md); background: var(--areia-100); }
.where .icon { margin-top: 2px; color: var(--cafe-700); }
.bill .ticket__main, .bill .ticket__stub { padding: var(--s-5); }
.bill__total { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.bill__total strong { font-family: var(--font-display); font-stretch: 80%; font-size: var(--fs-30); line-height: 1; font-variant-numeric: tabular-nums; }
.change { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.change:last-child { border-bottom: 0; }
.change s { color: var(--ink-2); }

/* ── Estados de página (confirmação, erro, expiração) ───── */
.state { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); padding-top: var(--s-4); }
.state__icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--areia-200); color: var(--cafe-800); }
.state__icon .icon { width: 28px; height: 28px; }
.state__icon--warn { background: var(--ouro-100); color: var(--ouro-900); }
.state__icon--danger { background: var(--perigo-100); color: var(--perigo-700); }
.state__icon--muted { background: var(--creme-300); color: var(--pedra-700); }
.state h1 { font-size: var(--fs-30); max-width: 16ch; }
.state p { color: var(--ink-2); max-width: 36ch; }
.countdown { font-family: var(--font-display); font-stretch: 78%; font-weight: 800; font-size: var(--fs-64); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.orderhead { display: flex; flex-direction: column; gap: var(--s-2); }
.orderhead__code { font-family: var(--font-mono); font-size: var(--fs-14); color: var(--ink-2); }
.orderhead h1 { font-size: var(--fs-30); }

/* Checkout externo: representação neutra, deliberadamente sem imitar a página real */
.sim { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5); border: 2px dashed var(--line-strong); border-radius: var(--r-md); background: var(--surface); }
.sim__tag { align-self: flex-start; padding: 3px 10px; border-radius: var(--r-xs); background: var(--pedra-700); color: var(--creme-50); font-size: var(--fs-13); font-weight: 700; }
.sim__box { display: grid; place-items: center; gap: var(--s-2); min-height: 150px; padding: var(--s-5); border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); text-align: center; }
.sim__box strong { font-size: var(--fs-24); color: var(--ink); font-variant-numeric: tabular-nums; }

/* ── Pedidos, avisos, perfil ────────────────────────────── */
.ocard { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-decoration: none; }
.ocard__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.ocard__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-3); border-top: 1px dashed var(--line-strong); }
.ocard--now { border-color: var(--cafe-700); box-shadow: inset 0 0 0 1px var(--cafe-700); }
.notice { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-3); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.notice:last-child { border-bottom: 0; }
.notice__ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--areia-100); color: var(--cafe-700); }
.notice.is-new .notice__ico { background: var(--ouro-100); color: var(--ouro-900); }
.notice__when { color: var(--ink-2); font-size: var(--fs-13); font-variant-numeric: tabular-nums; }
.menu { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.menu__item { display: flex; align-items: center; gap: var(--s-3); min-height: 56px; padding: var(--s-2) var(--s-4); border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; text-decoration: none; width: 100%; }
.menu__item:last-child { border-bottom: 0; }
.menu__item > .icon:first-child { color: var(--cafe-700); }
.menu__item .chev { margin-left: auto; color: var(--ink-3); }
.menu__item--danger, .menu__item--danger > .icon:first-child { color: var(--perigo-700); }
.who { display: flex; align-items: center; gap: var(--s-4); }
.who .avatar { width: 60px; height: 60px; font-size: var(--fs-20); }
.howto { display: flex; flex-direction: column; gap: var(--s-4); counter-reset: passo; }
.howto > li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: var(--s-3); align-items: start; counter-increment: passo; }
.howto > li::before { content: counter(passo); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--cafe-800); color: var(--creme-100); font-family: var(--font-display); font-weight: 700; }
.rules { display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--fs-14); }
.rules li { display: flex; gap: var(--s-2); align-items: center; color: var(--ink-2); }
.rules li.is-ok { color: var(--ok-700); font-weight: 650; }

/* ── Entrada ────────────────────────────────────────────── */
.login__brand { display: flex; flex-direction: column; gap: var(--s-8); padding: var(--s-8) var(--s-5) var(--s-10); background: var(--surface-brand); color: var(--ink-on-brand); }
.login__brand .wordmark { font-size: var(--fs-64); }
.login__brand p { max-width: 14ch; font-family: var(--font-display); font-stretch: 82%; font-weight: 600; font-size: var(--fs-30); line-height: var(--lh-snug); }
.login__form { display: flex; flex-direction: column; gap: var(--s-4); margin-top: -22px; padding: var(--s-6) var(--s-5) var(--s-8); border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--bg); flex: 1 1 auto; }
.login__links { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-1); }
.login__links .link { min-height: var(--tap); display: inline-flex; align-items: center; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
