/* ==========================================================================
   Lança Pedido — Design System v2 · lp-ui.css
   Fonte única de verdade visual de TODOS os apps do ecossistema:
   Lança Pedido (cliente) · LP Atendimento · LP Cozinha · LP Gestão · 123Vai.
   Referência: https://design-system.lancapedido.com.br
   Mobile first. Tema claro é o padrão; escuro só com data-theme="dark".
   NÃO edite as cópias em <app>/assets/ui/: edite design-system/ e rode sync.py.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
	--red: #E5161D; --red-d: #B5121B; --wine: #8E1019; --org: #FF7417; --amb: #FFB020; --ink: #1A1214;
	--ok: #168653; --info: #2368B5; --warn: #B96B08;

	--bg: #FBF7F5; --sf: #FFFFFF; --sf2: #F5EEEB; --tx: #1A1214; --mut: #6F6366;
	--ln: #EADFDC; --ln2: #D8C9C5; --tint: #FFF0EE;
	--acc: #E5161D;            /* texto/link de destaque (clareia no escuro) */
	--scrim: rgba(26, 18, 20, .55);

	--fd: "Archivo", "Arial Black", sans-serif;
	--fb: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--r1: 8px; --r2: 14px; --r3: 22px;
	--sh: 0 10px 30px rgba(90, 10, 14, .12);
	--sh-sm: 0 2px 10px rgba(90, 10, 14, .06);
	--sh-btn: 0 8px 20px rgba(229, 22, 29, .30);

	--top-h: 60px; --tab-h: 64px; --side-w: 252px; --wrap: 1180px;
	--lp-bottom: 0px;          /* espaço ocupado pela tab bar (definido por body.has-tabbar) */

	/* cor do app (sobrescrita por [data-app]) */
	--app: var(--red); --app-on: #fff; --app-acc: var(--red);

	/* status de pedido (DS: badges) */
	--st-novo: var(--info); --st-preparo: var(--org); --st-pronto: var(--ok);
	--st-rota: var(--wine); --st-entregue: var(--mut); --st-cancelado: var(--red);

	color-scheme: light;
}

:root[data-theme="dark"] {
	--bg: #150E10; --sf: #21171A; --sf2: #2A1E21; --tx: #F7EFEC; --mut: #B3A4A8;
	--ln: #3A2A2E; --ln2: #4D3A3E; --tint: #32191C;
	--acc: #FF5459;
	--scrim: rgba(0, 0, 0, .66);
	--sh: 0 10px 30px rgba(0, 0, 0, .45);
	--sh-sm: 0 2px 10px rgba(0, 0, 0, .3);
	--st-rota: #E0525B; --st-entregue: #B3A4A8;
	color-scheme: dark;
}

[data-app="cliente"]     { --app: var(--red);  --app-on: #fff;       --app-acc: var(--red); }
[data-app="atendimento"] { --app: var(--wine); --app-on: #fff;       --app-acc: var(--wine); }
[data-app="cozinha"]     { --app: var(--org);  --app-on: #fff;       --app-acc: #C2530A; }
[data-app="gestao"]      { --app: var(--ink);  --app-on: #fff;       --app-acc: var(--red); }
[data-app="entrega"]     { --app: var(--amb);  --app-on: var(--ink); --app-acc: var(--warn); }
:root[data-theme="dark"][data-app="cliente"],     [data-theme="dark"] [data-app="cliente"]     { --app-acc: var(--acc); }
:root[data-theme="dark"][data-app="atendimento"], [data-theme="dark"] [data-app="atendimento"] { --app-acc: #E0525B; }
:root[data-theme="dark"][data-app="cozinha"],     [data-theme="dark"] [data-app="cozinha"]     { --app-acc: #FF8C3A; }
:root[data-theme="dark"][data-app="gestao"],      [data-theme="dark"] [data-app="gestao"]      { --app: #2A1E21; --app-acc: var(--acc); }
:root[data-theme="dark"][data-app="entrega"],     [data-theme="dark"] [data-app="entrega"]     { --app-acc: var(--amb); }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 16px); }
body {
	margin: 0; min-height: 100vh; min-height: 100dvh;
	background: var(--bg); color: var(--tx);
	font: 16px/1.55 var(--fb);
	-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
	-webkit-tap-highlight-color: transparent;
}
body.has-tabbar { --lp-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); }
h1, h2, h3, .h1, .h2, .h3, .display {
	font-family: var(--fd); font-style: italic; font-weight: 900;
	letter-spacing: -.03em; line-height: 1.08; margin: 0; color: inherit;
}
h1, .h1 { font-size: clamp(28px, 5vw, 40px); }
h2, .h2 { font-size: clamp(22px, 3.4vw, 28px); }
h3, .h3 { font-size: 20px; }
h4, h5, h6 { font-family: var(--fb); font-weight: 700; margin: 0; font-size: 16px; }
p { margin: 0; }
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, video, canvas { max-width: 100%; }
img { display: block; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--ln); margin: 16px 0; }
small { font-size: 13px; }
code, kbd { font: 600 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--sf2); padding: 2px 6px; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--org); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--red) 22%, transparent); }
[x-cloak] { display: none !important; }
[hidden] { display: none !important; }
@view-transition { navigation: auto; }

/* ---------- 3. Ícones (grade 24px, traço 2px, pontas arredondadas) ---------- */
svg.i {
	width: 22px; height: 22px; flex: none; display: inline-block; vertical-align: middle;
	fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
svg.i.sm { width: 18px; height: 18px; }
svg.i.xs { width: 14px; height: 14px; }
svg.i.lg { width: 28px; height: 28px; }
svg.i.xl { width: 40px; height: 40px; }

/* ---------- 4. Tipografia utilitária ---------- */
.t-xs { font-size: 12px; } .t-sm { font-size: 14px; } .t-md { font-size: 16px; }
.t-lg { font-size: 20px; } .t-xl { font-size: 28px; } .t-2xl { font-size: 40px; } .t-3xl { font-size: 56px; }
.fw-5 { font-weight: 500; } .fw-6 { font-weight: 600; } .fw-7 { font-weight: 700; } .fw-8 { font-weight: 800; }
.muted { color: var(--mut); } .acc { color: var(--acc); } .ok-tx { color: var(--ok); } .warn-tx { color: var(--warn); } .info-tx { color: var(--info); }
.center { text-align: center; } .right { text-align: right; }
.nowrap { white-space: nowrap; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.upper { text-transform: uppercase; letter-spacing: .06em; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); }
.price { font: italic 900 18px/1.1 var(--fd); color: var(--acc); letter-spacing: -.02em; white-space: nowrap; }
.price.lg { font-size: 28px; } .price.sm { font-size: 15px; }
.price-old { text-decoration: line-through; color: var(--mut); font-size: 13px; }
.num { font-family: var(--fd); font-style: italic; font-weight: 900; letter-spacing: -.02em; }

/* ---------- 5. Layout utilitário ---------- */
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.wrap-md { width: min(860px, 100% - 32px); margin-inline: auto; }
.wrap-sm { width: min(560px, 100% - 32px); margin-inline: auto; }
.flex { display: flex; } .iflex { display: inline-flex; } .grid { display: grid; } .block { display: block; }
.col { flex-direction: column; } .wrap-x { flex-wrap: wrap; }
.items-center { align-items: center; } .items-start { align-items: flex-start; } .items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; } .justify-center { justify-content: center; } .justify-end { justify-content: flex-end; }
.grow { flex: 1 1 auto; min-width: 0; } .none { flex: none; } .ml-auto { margin-left: auto; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; }
.stack { display: flex; flex-direction: column; gap: 12px; } .stack-sm { display: flex; flex-direction: column; gap: 8px; } .stack-lg { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cols-2, .cols-3, .cols-4 { display: grid; gap: 12px; grid-template-columns: 1fr; }
.cols-2.keep { grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) { .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.span-2 { grid-column: span 2; } .span-all { grid-column: 1 / -1; }
.w-full { width: 100%; } .min-0 { min-width: 0; } .rel { position: relative; }
.m-0 { margin: 0; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.p-0 { padding: 0; } .p-2 { padding: 8px; } .p-3 { padding: 12px; } .p-4 { padding: 16px; } .p-5 { padding: 20px; } .p-6 { padding: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hide { display: none !important; }
@media (max-width: 767px) { .m-hide { display: none !important; } }
@media (min-width: 768px) { .d-hide { display: none !important; } }
@media (max-width: 1023px) { .lt-lg-hide { display: none !important; } }
@media (min-width: 1024px) { .lg-hide { display: none !important; } }
.scroll-x { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; } .scroll-x::-webkit-scrollbar { display: none; }
.divider { height: 1px; background: var(--ln); border: 0; margin: 12px 0; }

/* ---------- 6. App shell ---------- */
.lp-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.lp-top {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--sf) 90%, transparent);
	-webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid var(--ln);
	padding-top: env(safe-area-inset-top, 0px);
}
.lp-top__in { min-height: var(--top-h); display: flex; align-items: center; gap: 10px; width: min(var(--wrap), 100% - 24px); margin-inline: auto; }
.lp-top--full .lp-top__in { width: auto; margin: 0; padding-inline: 12px; }
@media (min-width: 768px) { .lp-top__in { width: min(var(--wrap), 100% - 32px); gap: 12px; } .lp-top--full .lp-top__in { padding-inline: 20px; } }
.lp-top--app { background: var(--app); color: var(--app-on); border-bottom: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.lp-top--app .btn.g { background: color-mix(in srgb, var(--app-on) 14%, transparent); color: var(--app-on); }
.lp-top__title { font: italic 900 18px/1.1 var(--fd); letter-spacing: -.02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-top__sub { display: block; font: 600 12px/1.2 var(--fb); color: var(--mut); font-style: normal; letter-spacing: 0; }
.lp-top--app .lp-top__sub { color: inherit; opacity: .8; }
.lp-top__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* Logo sempre sobre branco (regra do DS); em fundo escuro/colorido ganha o cartão branco */
.lp-logo { display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: var(--r1); padding: 2px 6px; flex: none; line-height: 0; }
.lp-logo img { height: 34px; width: auto; display: block; }
.lp-logo.lg img { height: 48px; } .lp-logo.xl img { height: 72px; } .lp-logo.sm img { height: 28px; }
.lp-logo.bordered { border: 1px solid var(--ln); }
.lp-logo-card { background: #fff; border-radius: var(--r2); padding: 10px 16px; display: inline-flex; justify-content: center; box-shadow: var(--sh-sm); }
.lp-logo-card img { width: 100%; max-width: 240px; height: auto; display: block; }
.lp-mascot { width: 120px; height: auto; display: block; }

.lp-main { flex: 1; width: min(var(--wrap), 100% - 32px); margin-inline: auto; padding: 16px 0 calc(32px + var(--lp-bottom)); min-width: 0; }
.lp-main.narrow { width: min(860px, 100% - 32px); }
.lp-main.tight { width: min(560px, 100% - 32px); }
.lp-main.full { width: auto; padding-inline: 12px; }
@media (min-width: 768px) { .lp-main { padding-top: 24px; } .lp-main.full { padding-inline: 24px; } }

/* Cabeçalho de página */
.lp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 4px 0 16px; }
.lp-head > div:first-child, .lp-head .lp-head__t { flex: 1 1 240px; min-width: 0; }
.lp-head h1 { font-size: clamp(24px, 4.4vw, 34px); }
.lp-head p { color: var(--mut); margin-top: 4px; font-size: 14px; }
.lp-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--mut); text-decoration: none; }
.back-link:hover { color: var(--tx); text-decoration: none; }

/* Tab bar inferior (mobile) — DS: ".tabs" do celular */
.lp-tabbar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
	display: flex; justify-content: space-around; align-items: stretch;
	background: var(--sf); border-top: 1px solid var(--ln);
	padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
	min-height: var(--tab-h);
}
.lp-tabbar > a, .lp-tabbar > button {
	all: unset; box-sizing: border-box; cursor: pointer; position: relative;
	flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	padding: 6px 2px; border-radius: 12px; min-height: 52px;
	font: 700 11px/1.15 var(--fb); color: var(--mut); text-align: center; text-decoration: none;
}
.lp-tabbar > a:hover, .lp-tabbar > button:hover { color: var(--tx); text-decoration: none; }
.lp-tabbar .on, .lp-tabbar [aria-current="page"] { color: var(--app-acc); }
.lp-tabbar .on::before, .lp-tabbar [aria-current="page"]::before { content: ""; position: absolute; top: -4px; left: 50%; transform: translateX(-50%); width: 28px; height: 3px; border-radius: 3px; background: var(--app-acc); }
.lp-tabbar .dot { position: absolute; top: 4px; right: calc(50% - 20px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font: 800 11px/18px var(--fb); }
.lp-tabbar span.lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 1024px) {
	.lp-tabbar.m-only { display: none; }
	body.has-tabbar.tabbar-m-only { --lp-bottom: 0px; }
}

/* Layout com menu lateral (Gestão / Painel) */
.lp-layout { min-height: 100vh; min-height: 100dvh; }
.lp-layout > .lp-body { min-width: 0; display: flex; flex-direction: column; min-height: 100dvh; }
.lp-side {
	position: fixed; inset: 0 auto 0 0; z-index: 90; width: min(300px, 86vw);
	display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overscroll-behavior: contain;
	background: var(--sf); border-right: 1px solid var(--ln);
	padding: calc(14px + env(safe-area-inset-top, 0px)) 12px calc(14px + env(safe-area-inset-bottom, 0px));
	transform: translateX(-102%); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.lp-side.open { transform: none; box-shadow: var(--sh); }
.lp-side-scrim { position: fixed; inset: 0; z-index: 89; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .2s; }
.lp-side.open + .lp-side-scrim, .lp-side-scrim.open { opacity: 1; pointer-events: auto; }
.lp-side__brand { padding: 4px 4px 12px; display: flex; flex-direction: column; gap: 8px; }
.lp-side__brand .lp-logo-card { width: 100%; box-shadow: none; border: 1px solid var(--ln); }
.lp-side__group { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); padding: 14px 12px 4px; }
.lp-side a, .lp-side button.nav {
	all: unset; box-sizing: border-box; cursor: pointer;
	display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; min-height: 44px;
	font: 600 14px/1.2 var(--fb); color: var(--mut); text-decoration: none;
}
.lp-side a:hover, .lp-side button.nav:hover { background: var(--tint); color: var(--tx); text-decoration: none; }
.lp-side a.on, .lp-side button.nav.on, .lp-side [aria-current="page"] { background: var(--red); color: #fff; }
.lp-side .badge-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font: 800 12px/22px var(--fb); text-align: center; }
.lp-side a.on .badge-count { background: #fff; color: var(--red); }
.lp-side__foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--ln); display: flex; flex-direction: column; gap: 2px; }
@media (min-width: 1024px) {
	.lp-layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
	.lp-side { position: sticky; top: 0; height: 100vh; height: 100dvh; width: auto; transform: none; z-index: 30; box-shadow: none !important; }
	.lp-side-scrim { display: none; }
	.lp-menu-btn { display: none !important; }
	.lp-layout .lp-top__in { width: auto; margin: 0; padding-inline: 24px; }
	.lp-layout .lp-main { width: auto; margin: 0; padding-inline: 24px; }
}

/* ---------- 7. Botões (DS: alvo ≥ 48px, cantos 14px, um principal por tela) ---------- */
.btn {
	display: inline-flex; gap: 8px; align-items: center; justify-content: center;
	border: 0; border-radius: var(--r2); padding: 12px 20px; min-height: 48px;
	font: 700 15px/1.15 var(--fb); text-decoration: none; white-space: nowrap; cursor: pointer;
	background: var(--sf2); color: var(--tx);
	transition: transform .15s, box-shadow .15s, background-color .15s, color .15s, border-color .15s;
	-webkit-user-select: none; user-select: none; position: relative;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn.p { background: var(--red); color: #fff; box-shadow: var(--sh-btn); }
.btn.p:hover { background: var(--red-d); color: #fff; }
.btn.s { background: var(--org); color: #2A1204; }
.btn.s:hover { background: #F0660C; }
.btn.o { background: transparent; border: 2px solid var(--red); color: var(--red); padding-block: 10px; }
.btn.o:hover { background: var(--tint); }
.btn.d { background: var(--ink); color: #fff; }
.btn.d:hover { background: #2E2124; }
.btn.g { background: var(--sf2); color: var(--tx); }
.btn.g:hover { background: color-mix(in srgb, var(--sf2) 70%, var(--ln2)); }
.btn.l { background: transparent; color: var(--tx); }
.btn.l:hover { background: var(--sf2); }
.btn.w { background: #fff; color: var(--red); }
.btn.ok { background: var(--ok); color: #fff; }
.btn.ok:hover { background: #127047; }
.btn.amb { background: var(--amb); color: var(--ink); }
.btn.wine { background: var(--wine); color: #fff; }
.btn.danger { background: transparent; border: 2px solid color-mix(in srgb, var(--red) 40%, transparent); color: var(--red); padding-block: 10px; }
.btn.danger:hover { background: var(--tint); border-color: var(--red); }
.btn.app { background: var(--app); color: var(--app-on); }
.btn.sm { min-height: 40px; padding: 8px 14px; font-size: 14px; border-radius: 12px; }
.btn.o.sm, .btn.danger.sm { padding-block: 6px; }
.btn.xs { min-height: 32px; padding: 5px 10px; font-size: 13px; border-radius: 10px; gap: 6px; }
.btn.lg { min-height: 56px; padding: 16px 24px; font-size: 16px; }
.btn.block { display: flex; width: 100%; }
.btn.icon { padding: 0; width: 48px; flex: none; }
.btn.icon.sm { width: 40px; } .btn.icon.xs { width: 32px; }
.btn.round { border-radius: 99px; }
.btn[disabled], .btn.is-disabled, .btn:disabled { opacity: .45; pointer-events: none; box-shadow: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: lp-rot .7s linear infinite; }
.btn.g.is-loading::after, .btn.o.is-loading::after, .btn.l.is-loading::after { border-color: color-mix(in srgb, var(--tx) 25%, transparent); border-top-color: var(--tx); }
:root[data-theme="dark"] .btn.o, :root[data-theme="dark"] .btn.danger { color: var(--acc); border-color: color-mix(in srgb, var(--acc) 70%, transparent); }
:root[data-theme="dark"] .btn.d { background: #F7EFEC; color: var(--ink); }
:root[data-theme="dark"] .btn.w { background: #fff; color: var(--red); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row.end { justify-content: flex-end; }
.btn-row.stretch > .btn { flex: 1 1 0; }
.link { color: var(--acc); font-weight: 700; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.link:hover { text-decoration: underline; }

/* Botão de tema claro/escuro */
[data-lp-theme] .when-dark { display: none; }
:root[data-theme="dark"] [data-lp-theme] .when-dark { display: inline-block; }
:root[data-theme="dark"] [data-lp-theme] .when-light { display: none; }

/* ---------- 8. Formulários ---------- */
.fld { display: grid; gap: 6px; font-weight: 600; font-size: 14px; min-width: 0; color: var(--tx); }
.fld > .lbl, .fld > span:first-child { font-weight: 600; font-size: 14px; }
.fld .hint, .hint { font-weight: 500; font-size: 13px; color: var(--mut); }
.fld .err-msg, .err-msg { font-weight: 600; font-size: 13px; color: var(--red); }
.inp,
.fld input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]),
.fld select, .fld textarea,
body.lp input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="submit"]):not([type="button"]):not([type="hidden"]):not(.unstyled),
body.lp select:not(.unstyled), body.lp textarea:not(.unstyled) {
	width: 100%; min-height: 48px; padding: 12px 14px;
	font: 16px/1.3 var(--fb); color: var(--tx);
	background: var(--sf); border: 1.5px solid var(--ln); border-radius: var(--r1);
	transition: border-color .15s, box-shadow .15s, background-color .15s;
	-webkit-appearance: none; appearance: none;
}
body.lp textarea:not(.unstyled), .fld textarea, textarea.inp { min-height: 96px; resize: vertical; line-height: 1.45; }
.inp:focus, .fld input:focus, .fld select:focus, .fld textarea:focus,
body.lp input:focus:not(.unstyled), body.lp select:focus:not(.unstyled), body.lp textarea:focus:not(.unstyled) {
	border-color: var(--red); outline: 3px solid color-mix(in srgb, var(--red) 20%, transparent); outline-offset: 0;
}
.inp::placeholder, body.lp input::placeholder, body.lp textarea::placeholder { color: var(--mut); opacity: .8; }
.inp[readonly], body.lp input[readonly]:not(.unstyled) { background: var(--sf2); }
.inp:disabled, body.lp input:disabled:not(.unstyled), body.lp select:disabled:not(.unstyled) { opacity: .6; cursor: not-allowed; }
select.inp, .fld select, body.lp select:not(.unstyled) {
	padding-right: 40px; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236F6366' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
:root[data-theme="dark"] select.inp, :root[data-theme="dark"] .fld select, :root[data-theme="dark"] body.lp select:not(.unstyled) {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B3A4A8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
.fld.err input, .fld.err select, .fld.err textarea, .inp.err { border-color: var(--red); }
input:-webkit-autofill, input:-webkit-autofill:focus { -webkit-text-fill-color: var(--tx); -webkit-box-shadow: 0 0 0 1000px var(--sf) inset; transition: background-color 9999s; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--red); width: 20px; height: 20px; flex: none; cursor: pointer; margin: 0; }
input[type="range"] { accent-color: var(--red); width: 100%; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; font-weight: 500; cursor: pointer; min-height: 32px; }
.check input { margin-top: 2px; }
.inp-group { display: flex; align-items: stretch; }
.inp-group > .inp, .inp-group > input, .inp-group > select { flex: 1; min-width: 0; border-radius: var(--r1) 0 0 var(--r1) !important; } /* !important: vence a regra base body.lp input */
.inp-group > .btn { border-radius: 0 var(--r1) var(--r1) 0; min-height: 48px; }
.inp-icon { position: relative; }
.inp-icon > svg.i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--mut); pointer-events: none; }
.inp-icon > .inp, .inp-icon > input { padding-left: 44px !important; }
.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid .span-all { grid-column: 1 / -1; } }

/* Switch */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 46px; height: 28px; border-radius: 99px; background: var(--ln2); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid var(--org); outline-offset: 2px; }

/* Opções em cartão (DS: seleção Entrega/Retirada, Dinheiro/Cartão/PIX) */
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.opt {
	display: flex; flex-direction: column; gap: 2px; justify-content: center;
	border: 1.5px solid var(--ln); border-radius: 12px; padding: 12px; min-height: 56px;
	background: var(--sf); color: var(--tx); font-size: 14px; font-weight: 600; cursor: pointer; text-align: left;
	transition: border-color .15s, background .15s;
}
.opt small { font-weight: 500; color: var(--mut); }
.opt:hover { border-color: var(--ln2); }
.opt.on, .opt:has(input:checked) { border-color: var(--red); background: var(--tint); font-weight: 700; }
.opt input[type="radio"], .opt input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.opt { position: relative; }
.rd { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ln2); flex: none; display: inline-block; }
.rd.on { border: 6px solid var(--red); }

/* Stepper de quantidade */
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--ln); border-radius: var(--r2); background: var(--sf); height: 48px; }
.qty button { all: unset; cursor: pointer; width: 44px; height: 100%; display: grid; place-items: center; color: var(--acc); }
.qty button:disabled { color: var(--ln2); cursor: default; }
.qty output, .qty span, .qty input { min-width: 28px; text-align: center; font-weight: 800; border: 0 !important; background: transparent !important; padding: 0 !important; min-height: 0 !important; width: 36px !important; }
.qty.sm { height: 36px; } .qty.sm button { width: 34px; }

/* ---------- 9. Badges e chips ---------- */
.bd {
	--c: var(--mut);
	display: inline-flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%;
	padding: 4px 10px; border-radius: 99px; white-space: nowrap;
	font: 700 12px/1.3 var(--fb); letter-spacing: .01em;
	background: color-mix(in srgb, var(--c) 14%, transparent);
	color: color-mix(in srgb, var(--c) 78%, var(--tx));
}
.bd::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.bd.no-dot::before { display: none; }
.bd.lg { font-size: 13px; padding: 5px 12px; }
.bd.solid { background: var(--c); color: #fff; } .bd.solid::before { background: currentColor; }
.bd.novo, .bd.info { --c: var(--st-novo); }
.bd.preparo, .bd.org { --c: var(--st-preparo); }
.bd.pronto, .bd.ok { --c: var(--st-pronto); }
.bd.rota, .bd.wine { --c: var(--st-rota); }
.bd.entregue, .bd.mut { --c: var(--st-entregue); }
.bd.cancelado, .bd.err, .bd.red { --c: var(--st-cancelado); }
.bd.warn { --c: var(--warn); }
.bd.amb { --c: var(--amb); color: color-mix(in srgb, var(--warn) 85%, var(--tx)); }
:root[data-theme="dark"] .bd.amb { color: var(--amb); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font: 800 12px/1 var(--fb); }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip, .chips > span, .chips > a, .chips > button {
	all: unset; box-sizing: border-box; cursor: pointer; flex: none;
	display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 14px;
	border-radius: 99px; border: 1px solid var(--ln); background: var(--sf);
	font: 600 14px/1.2 var(--fb); color: var(--tx); white-space: nowrap; text-decoration: none;
	transition: background .15s, border-color .15s, color .15s;
}
.chip:hover, .chips > a:hover, .chips > button:hover, .chips > span:hover { border-color: var(--red); color: var(--acc); text-decoration: none; }
.chip.on, .chips > .on, .chips > [aria-pressed="true"], .chips > [aria-selected="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.chip .count { background: color-mix(in srgb, currentColor 18%, transparent); color: inherit; height: 20px; min-width: 20px; font-size: 11px; }

/* Segmentado (DS: .seg) e abas sublinhadas */
.seg { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.seg::-webkit-scrollbar { display: none; }
.seg > button, .seg > a {
	all: unset; box-sizing: border-box; cursor: pointer; white-space: nowrap; flex: none;
	padding: 9px 16px; min-height: 40px; display: inline-flex; align-items: center; gap: 6px;
	border-radius: 99px; border: 1px solid var(--ln); background: var(--sf); font: 700 14px/1.2 var(--fb); color: var(--tx);
}
.seg > .on { background: var(--red); border-color: var(--red); color: #fff; }
.seg.box { background: var(--sf2); border-radius: var(--r2); padding: 4px; gap: 4px; }
.seg.box > button, .seg.box > a { border: 0; background: transparent; border-radius: 10px; flex: 1 1 0; justify-content: center; color: var(--mut); }
.seg.box > .on { background: var(--sf); color: var(--tx); box-shadow: var(--sh-sm); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ln); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs > a, .tabs > button {
	all: unset; box-sizing: border-box; cursor: pointer; white-space: nowrap; flex: none;
	padding: 12px 14px; display: inline-flex; align-items: center; gap: 8px;
	font: 700 14px/1.2 var(--fb); color: var(--mut); border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs > a:hover, .tabs > button:hover { color: var(--tx); text-decoration: none; }
.tabs > .on, .tabs > [aria-selected="true"] { color: var(--tx); border-bottom-color: var(--red); }

/* ---------- 10. Cartões e superfícies ---------- */
.card { background: var(--sf); border: 1px solid var(--ln); border-radius: var(--r2); padding: 16px; min-width: 0; }
.card.lg { padding: 20px; } @media (min-width: 768px) { .card.lg { padding: 24px; } }
.card.flush { padding: 0; overflow: hidden; }
.card.soft { background: var(--sf2); border-color: transparent; }
.card.tint { background: var(--tint); border-color: transparent; }
.card.shadow { box-shadow: var(--sh); }
.card.link, a.card { display: block; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.card.link:hover, a.card:hover { border-color: var(--ln2); box-shadow: var(--sh-sm); text-decoration: none; }
.card.sel { border: 2px solid var(--red); }
.card-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-h h2, .card-h h3 { font-size: 18px; flex: 1; min-width: 0; }
.card-h .eyebrow { width: 100%; }
.card-f { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--ln); }
.cd { background: var(--sf); border: 1px solid var(--ln); border-radius: var(--r2); }
.hero, .card.hero {
	background: linear-gradient(120deg, var(--wine), var(--red) 55%, var(--org)); color: #fff;
	border: 0; border-radius: var(--r3); padding: 24px;
}
.hero h1, .hero h2, .hero h3 { color: #fff; }
.hero p { opacity: .92; }
.hero.dark { background: linear-gradient(120deg, var(--ink), var(--wine)); }
.section { margin-top: 28px; }
.section-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.section-h h2 { font-size: 22px; flex: 1; min-width: 0; }
.section-h a { font-weight: 700; font-size: 14px; }

/* Lista (DS: .it) */
.list { display: grid; gap: 8px; }
.it {
	display: flex; gap: 12px; align-items: center; min-width: 0;
	background: var(--sf); border: 1px solid var(--ln); border-radius: var(--r2);
	padding: 12px; min-height: 64px; color: inherit; text-decoration: none; font-size: 14px;
}
a.it:hover, button.it:hover { border-color: var(--ln2); text-decoration: none; }
button.it { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.it .th { width: 48px; height: 48px; border-radius: 10px; background: var(--tint); color: var(--acc); display: grid; place-items: center; flex: none; overflow: hidden; }
.it .th img { width: 100%; height: 100%; object-fit: cover; }
.it .th.lg { width: 64px; height: 64px; border-radius: 12px; }
.it .bdy { flex: 1; min-width: 0; }
.it b, .it .tt { display: block; font-weight: 700; font-size: 15px; }
.it small, .it .sub { display: block; color: var(--mut); font-size: 13px; }
.it .end { margin-left: auto; font-weight: 700; white-space: nowrap; text-align: right; flex: none; }
.rows > * { padding: 12px 0; border-bottom: 1px solid var(--ln); }
.rows > *:first-child { padding-top: 0; }
.rows > *:last-child { border-bottom: 0; padding-bottom: 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-size: 14px; }
.kv > span:first-child, .kv dt { color: var(--mut); }
.kv > :last-child, .kv dd { font-weight: 700; text-align: right; margin: 0; }
.kv.total { font-size: 16px; padding-top: 8px; border-top: 1px dashed var(--ln2); }
.kv.total > :last-child { font: italic 900 22px var(--fd); color: var(--acc); }

/* Cartões de produto (DS: .pg / .pc) */
.pg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .pg { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .pg { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.pc { background: var(--sf); border: 1px solid var(--ln); border-radius: var(--r2); overflow: hidden; display: flex; flex-direction: column; color: inherit; text-decoration: none; cursor: pointer; text-align: left; min-width: 0; transition: transform .15s, box-shadow .15s; }
.pc:hover { transform: translateY(-2px); box-shadow: var(--sh-sm); text-decoration: none; }
.pc .im { aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--org), var(--red)); color: #fff; display: grid; place-items: center; overflow: hidden; position: relative; }
.pc .im img { width: 100%; height: 100%; object-fit: cover; }
.pc .im .bd { position: absolute; top: 8px; left: 8px; background: var(--sf); }
.pc .tx { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pc .tx b, .pc .tt { font-size: 14px; line-height: 1.3; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.pc .pr2 { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.add { background: var(--red); color: #fff; border-radius: 99px; padding: 4px 12px; font: 700 12px/1.4 var(--fb); white-space: nowrap; }
/* Item de cardápio horizontal (DS: .li) */
.mi { display: flex; gap: 12px; justify-content: space-between; align-items: stretch; background: var(--sf); border: 1px solid var(--ln); border-radius: var(--r2); padding: 14px; cursor: pointer; color: inherit; text-align: left; width: 100%; transition: border-color .15s, box-shadow .15s; }
.mi:hover { border-color: var(--ln2); box-shadow: var(--sh-sm); }
.mi .bdy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mi .tt { font-weight: 700; font-size: 16px; line-height: 1.3; }
.mi .ds { color: var(--mut); font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mi .ft { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mi .th { width: 96px; height: 96px; border-radius: 12px; flex: none; overflow: hidden; background: linear-gradient(135deg, var(--org), var(--red)); color: #fff; display: grid; place-items: center; }
.mi .th img { width: 100%; height: 100%; object-fit: cover; }
.mi.off { opacity: .55; cursor: default; }
@media (min-width: 768px) { .mi .th { width: 112px; height: 112px; } }

/* KPIs (DS: .g4 .k) */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1024px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.k { background: var(--sf); border: 1px solid var(--ln); border-radius: var(--r2); padding: 14px 16px; min-width: 0; }
.k small, .k .k-l { display: block; color: var(--mut); font-weight: 600; font-size: 13px; }
.k b, .k .k-v { display: block; font: italic 900 26px/1.1 var(--fd); letter-spacing: -.02em; margin-top: 4px; overflow-wrap: anywhere; }
.k p, .k .k-s { font-size: 12px; color: var(--mut); margin-top: 2px; }
.k.ok b { color: var(--ok); } .k.info b { color: var(--info); } .k.org b { color: var(--org); } .k.red b { color: var(--acc); }
.k.hl { background: var(--red); border-color: var(--red); color: #fff; } .k.hl small, .k.hl p { color: rgba(255, 255, 255, .85); }
@media (min-width: 768px) { .k b, .k .k-v { font-size: 28px; } }

/* Atalhos (DS: .lk) */
.lk { padding: 16px; display: grid; gap: 10px; background: var(--sf); border: 1px solid var(--ln); border-radius: var(--r2); align-content: start; }
.lk .lk-h { display: flex; align-items: center; gap: 10px; color: var(--acc); }
.lk .lk-h b { color: var(--tx); }
.lk p { color: var(--mut); font-size: 14px; }

/* Tabelas */
.tbl-wrap { overflow-x: auto; background: var(--sf); border: 1px solid var(--ln); border-radius: var(--r2); -webkit-overflow-scrolling: touch; }
.tbl, table.tbl.stack { width: 100%; border-collapse: collapse; font-size: 14px; display: table; gap: 0; } /* table.tbl.stack: não herdar o utilitário .stack (flex) */
.tbl th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--mut); padding: 12px 14px; background: var(--sf2); border-bottom: 1px solid var(--ln); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--ln); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--tint) 55%, transparent); }
.tbl .num, .tbl td.r, .tbl th.r { text-align: right; white-space: nowrap; }
@media (max-width: 767px) {
	.tbl.stack thead { display: none; }
	.tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
	.tbl.stack tr { padding: 12px 14px; border-bottom: 1px solid var(--ln); }
	.tbl.stack tbody tr:last-child { border-bottom: 0; }
	.tbl.stack td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
	.tbl.stack td::before { content: attr(data-label); color: var(--mut); font-weight: 600; font-size: 13px; text-align: left; }
	.tbl.stack td[data-label=""]::before { display: none; }
}

/* ---------- 11. Modal, sheet e gaveta ---------- */
.modal {
	position: fixed; inset: 0; z-index: 1000;
	display: flex; align-items: flex-end; justify-content: center;
	background: var(--scrim); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
	overscroll-behavior: contain;
}
.modal > .sheet, .sheet.is-modal {
	position: relative; width: 100%; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
	background: var(--sf); color: var(--tx);
	border-radius: var(--r3) var(--r3) 0 0;
	padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
	box-shadow: var(--sh); animation: lp-up .26s cubic-bezier(.2, .8, .2, 1);
}
.modal > .sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--ln2); margin: -8px auto 12px; }
.modal > .sheet.flush { padding: 0; } .modal > .sheet.flush::before { position: absolute; left: 50%; transform: translateX(-50%); top: 8px; margin: 0; z-index: 2; }
@media (min-width: 768px) {
	.modal { align-items: center; padding: 24px; }
	.modal > .sheet { max-width: 560px; border-radius: var(--r3); padding: 24px; max-height: calc(100dvh - 48px); animation-name: lp-pop; }
	.modal > .sheet::before { display: none; }
	.modal > .sheet.sm { max-width: 420px; } .modal > .sheet.lg { max-width: 860px; } .modal > .sheet.xl { max-width: 1100px; }
	.modal.right { justify-content: flex-end; align-items: stretch; padding: 0; }
	.modal.right > .sheet { max-width: 460px; height: 100dvh; max-height: none; border-radius: var(--r3) 0 0 var(--r3); animation-name: lp-left; }
}
.modal.full > .sheet { max-height: 100dvh; height: 100dvh; border-radius: 0; }
.modal.right { text-align: start; } /* não herdar o utilitário .right (texto à direita) */
.sheet-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.sheet-h h2, .sheet-h h3 { flex: 1; min-width: 0; font-size: 22px; }
.sheet-h p { color: var(--mut); font-size: 14px; }
.sheet-f {
	position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom, 0px)); z-index: 2;
	margin: 16px -16px calc(-20px - env(safe-area-inset-bottom, 0px)); padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
	background: var(--sf); border-top: 1px solid var(--ln); display: flex; gap: 8px; flex-wrap: wrap;
}
.sheet-f > .btn { flex: 1 1 auto; }
@media (min-width: 768px) { .sheet-f { bottom: -24px; margin: 20px -24px -24px; padding: 14px 24px; } }
.x-btn { all: unset; box-sizing: border-box; cursor: pointer; width: 40px; height: 40px; border-radius: 99px; display: grid; place-items: center; background: var(--sf2); color: var(--tx); flex: none; }
.x-btn:hover { background: var(--ln); }
body.lp-lock { overflow: hidden; }

/* ---------- 12. Feedback ---------- */
.alert { --c: var(--info); display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r2); font-size: 14px; line-height: 1.45; background: color-mix(in srgb, var(--c) 9%, var(--sf)); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); color: var(--tx); }
.alert > svg.i { color: var(--c); margin-top: 1px; }
.alert b, .alert strong { display: block; }
.alert .grow > p { color: var(--mut); }
.alert.ok { --c: var(--ok); } .alert.warn { --c: var(--warn); } .alert.err { --c: var(--red); } .alert.info { --c: var(--info); } .alert.amb { --c: var(--amb); }
.alert.solid { background: var(--c); color: #fff; border: 0; } .alert.solid > svg.i { color: #fff; }
.banner { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px; text-align: center; font-weight: 700; font-size: 14px; background: var(--ink); color: #fff; }
.banner.red { background: var(--red); } .banner.amb { background: var(--amb); color: var(--ink); } .banner.ok { background: var(--ok); } .banner.wine { background: var(--wine); }
:root[data-theme="dark"] .banner:not(.red):not(.amb):not(.ok):not(.wine) { background: #F7EFEC; color: var(--ink); }

.lp-toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--lp-bottom) + 16px + env(safe-area-inset-bottom, 0px)); z-index: 2000; display: grid; gap: 8px; width: min(480px, 100% - 32px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r2); background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; box-shadow: var(--sh); animation: lp-up .22s cubic-bezier(.2, .8, .2, 1); }
.toast.ok { background: var(--ok); } .toast.err { background: var(--red); } .toast.warn { background: var(--warn); } .toast.info { background: var(--info); }
:root[data-theme="dark"] .toast:not(.ok):not(.err):not(.warn):not(.info) { background: #F7EFEC; color: var(--ink); }
.toast.out { opacity: 0; transform: translateY(8px); transition: .2s; }

.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 40px 16px; color: var(--mut); }
.empty > svg.i { width: 44px; height: 44px; color: var(--ln2); }
.empty h3, .empty b { color: var(--tx); font-size: 20px; }
.empty p { max-width: 42ch; font-size: 14px; }
.empty .btn { margin-top: 8px; }
.empty img { width: 132px; height: auto; margin-bottom: 4px; }

.skel { display: block; border-radius: 8px; min-height: 14px; background: linear-gradient(90deg, var(--sf2) 25%, color-mix(in srgb, var(--sf2) 40%, var(--sf)) 50%, var(--sf2) 75%); background-size: 200% 100%; animation: lp-sh 1.2s linear infinite; }
.spin { display: inline-block; width: 20px; height: 20px; border-radius: 50%; border: 3px solid color-mix(in srgb, currentColor 22%, transparent); border-top-color: currentColor; animation: lp-rot .7s linear infinite; vertical-align: middle; flex: none; }
.spin.lg { width: 36px; height: 36px; border-width: 4px; }
.loading-block { display: grid; place-items: center; gap: 10px; padding: 40px 16px; color: var(--mut); font-weight: 600; }
.progress { height: 8px; border-radius: 99px; background: var(--sf2); overflow: hidden; }
.progress > i, .progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--org), var(--red)); transition: width .4s; }
.pulse { position: relative; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid var(--red); animation: lp-pulse 1.6s ease-out infinite; }

/* Avatar (DS: .av) */
.av { width: 48px; height: 48px; border-radius: 14px; flex: none; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, var(--org), var(--red)); color: #fff; font: italic 900 20px/1 var(--fd); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.sm { width: 36px; height: 36px; border-radius: 10px; font-size: 15px; }
.av.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 26px; }
.av.xl { width: 88px; height: 88px; border-radius: 22px; font-size: 34px; }
.av.ink { background: var(--ink); } .av.round { border-radius: 50%; }

/* ---------- 13. Operação: KDS, kanban, linha do tempo, mapa ---------- */
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; align-items: start; }
.tk { --c: var(--st-novo); background: var(--sf); border: 1px solid var(--ln); border-top: 6px solid var(--c); border-radius: var(--r2); padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; min-width: 0; }
.tk.preparo { --c: var(--st-preparo); } .tk.pronto { --c: var(--st-pronto); } .tk.rota { --c: var(--st-rota); } .tk.late { --c: var(--red); box-shadow: 0 0 0 2px color-mix(in srgb, var(--red) 35%, transparent); }
.tk-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-n { font: italic 900 24px/1 var(--fd); letter-spacing: -.02em; }
.tk-t { margin-left: auto; font: italic 900 20px/1 var(--fd); color: var(--c); white-space: nowrap; }
.tk ul { list-style: none; margin: 0; padding: 0; }
.tk li { padding: 8px 0; border-bottom: 1px dashed var(--ln); }
.tk li:last-child { border-bottom: 0; }
.tk li b { font-weight: 800; }
.obs { display: block; margin-top: 4px; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; background: color-mix(in srgb, var(--amb) 20%, transparent); color: color-mix(in srgb, var(--warn) 80%, var(--tx)); }
:root[data-theme="dark"] .obs { color: var(--amb); }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 86vw); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.kanban > * { scroll-snap-align: start; }
@media (min-width: 768px) { .kanban { grid-auto-columns: minmax(280px, 1fr); } }
.kcol { background: var(--sf2); border-radius: var(--r2); padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 240px; min-width: 0; }
.kcol-h { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; padding: 4px 6px; }
.kcol-h .count { margin-left: auto; background: var(--sf); color: var(--tx); border: 1px solid var(--ln); }
.steps { list-style: none; margin: 0; padding: 0; }
.steps > li { position: relative; padding: 0 0 20px 36px; min-height: 40px; }
.steps > li::before { content: ""; position: absolute; left: 9px; top: 24px; bottom: 0; width: 2px; background: var(--ln); }
.steps > li:last-child { padding-bottom: 0; } .steps > li:last-child::before { display: none; }
.steps .dot { position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ln2); background: var(--sf); display: grid; place-items: center; color: #fff; }
.steps .dot svg.i { width: 12px; height: 12px; stroke-width: 3; }
.steps > li.done::before { background: var(--ok); }
.steps > li.done .dot { background: var(--ok); border-color: var(--ok); }
.steps > li.now .dot { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 5px color-mix(in srgb, var(--red) 20%, transparent); }
.steps b { display: block; font-size: 15px; }
.steps small { color: var(--mut); }
.steps > li:not(.done):not(.now) b { color: var(--mut); }
.map { position: relative; min-height: 240px; border-radius: var(--r2); overflow: hidden; border: 1px solid var(--ln); background: var(--sf2); z-index: 0; }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) saturate(.8); }
.leaflet-container { font-family: var(--fb) !important; }

/* Capa de loja e cabeçalho de vitrine */
.cover { height: 140px; background: linear-gradient(120deg, var(--ink), var(--wine) 55%, var(--org)) center / cover no-repeat; position: relative; }
@media (min-width: 768px) { .cover { height: 220px; } }
.store-card { position: relative; margin-top: -48px; display: flex; gap: 14px; align-items: flex-start; }
.store-logo { width: 84px; height: 84px; border-radius: 20px; border: 3px solid var(--sf); background: #fff; overflow: hidden; flex: none; box-shadow: var(--sh-sm); display: grid; place-items: center; font: italic 900 28px var(--fd); color: var(--red); }
.store-logo img { width: 100%; height: 100%; object-fit: cover; }

/* Barra fixa de sacola (iFood-like) e FAB */
.cart-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--lp-bottom) + 12px); z-index: 45; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r2); background: var(--red); color: #fff; box-shadow: var(--sh-btn); font-weight: 700; cursor: pointer; border: 0; min-height: 56px; width: auto; text-align: left; }
.cart-bar .count { background: rgba(255, 255, 255, .22); }
.cart-bar .price { color: #fff; margin-left: auto; }
@media (min-width: 768px) { .cart-bar { left: auto; right: 24px; width: 380px; bottom: 24px; } }
.fab { position: fixed; right: 16px; bottom: calc(var(--lp-bottom) + 16px); z-index: 45; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--red); color: #fff; box-shadow: var(--sh-btn); border: 0; cursor: pointer; }

/* Rodapé padrão */
.lp-foot { margin-top: 40px; padding: 28px 0 calc(28px + var(--lp-bottom)); border-top: 1px solid var(--ln); color: var(--mut); font-size: 14px; }
.lp-foot a { color: var(--mut); font-weight: 600; }
.lp-foot a:hover { color: var(--tx); }
.lp-foot .cols { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .lp-foot .cols { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.lp-foot h4 { color: var(--tx); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.lp-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.partner-seal { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--sf); border: 1px solid var(--ln); font-size: 13px; font-weight: 700; color: var(--tx); }
.partner-seal svg.i { color: var(--red); }

/* Tela de entrada (login) */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.auth-card { width: min(440px, 100%); background: var(--sf); border: 1px solid var(--ln); border-radius: var(--r3); padding: 24px 20px; box-shadow: var(--sh); }
@media (min-width: 768px) { .auth-card { padding: 32px; } }
.auth-brand { display: grid; justify-items: center; gap: 10px; text-align: center; margin-bottom: 20px; }
.auth-brand .lp-logo-card { max-width: 260px; }
.auth-brand h1 { font-size: 26px; }
.auth-brand p { color: var(--mut); font-size: 14px; }
.auth-band { height: 6px; border-radius: 99px; background: var(--app); width: 64px; margin: 0 auto; }

/* PWA: banner de instalação */
.pwa-card { position: fixed; left: 12px; right: 12px; bottom: calc(var(--lp-bottom) + 12px); z-index: 1500; display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r3); background: var(--sf); color: var(--tx); border: 1px solid var(--ln); box-shadow: var(--sh); animation: lp-up .3s cubic-bezier(.2, .8, .2, 1); }
@media (min-width: 768px) { .pwa-card { left: auto; right: 24px; bottom: 24px; width: 420px; } }
.pwa-card .app-ico { width: 56px; height: 56px; border-radius: 22%; flex: none; box-shadow: var(--sh-sm); }
.pwa-card .bdy { flex: 1; min-width: 0; }
.pwa-card .bdy b { display: block; font: italic 900 17px/1.15 var(--fd); }
.pwa-card .bdy small { display: block; color: var(--mut); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.pwa-card .acts { display: flex; flex-direction: column; gap: 6px; flex: none; }
.pwa-mini { position: fixed; left: 12px; bottom: calc(var(--lp-bottom) + 12px); z-index: 1400; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; background: var(--sf); color: var(--tx); border: 1px solid var(--ln); box-shadow: var(--sh-sm); font: 700 13px var(--fb); cursor: pointer; }
.pwa-mini img { width: 28px; height: 28px; border-radius: 22%; }
/* banner de instalar some com folha/modal aberto e sobe acima da barra da sacola */
body.lp-lock :is(.pwa-card, .pwa-mini),
body:has(.modal:not([hidden]):not([style*="display: none"])) :is(.pwa-card, .pwa-mini) { display: none; }
body:has(.cart-bar:not([hidden]):not([style*="display: none"])) :is(.pwa-card, .pwa-mini) { bottom: calc(var(--lp-bottom) + 84px); }
.app-ico { border-radius: 22%; display: block; }

/* ---------- 14. Animações ---------- */
@keyframes lp-up { from { transform: translateY(24px); opacity: 0; } }
@keyframes lp-pop { from { transform: scale(.96); opacity: 0; } }
@keyframes lp-left { from { transform: translateX(40px); opacity: 0; } }
@keyframes lp-rot { to { transform: rotate(360deg); } }
@keyframes lp-sh { to { background-position: -200% 0; } }
@keyframes lp-pulse { from { opacity: .9; transform: scale(.96); } to { opacity: 0; transform: scale(1.25); } }
@keyframes lp-fade { from { opacity: 0; } }
.fade-in { animation: lp-fade .25s ease-out; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
	@view-transition { navigation: none; }
}

/* ---------- 15. Impressão ---------- */
@media print {
	.lp-top, .lp-tabbar, .lp-side, .lp-side-scrim, .no-print, .pwa-card, .pwa-mini, .lp-toasts, .cart-bar, .fab { display: none !important; }
	body { background: #fff !important; color: #000 !important; }
	.card, .k, .it { border-color: #ccc !important; box-shadow: none !important; }
	.lp-layout { display: block !important; }
}

/* ==========================================================================
   Legal (LGPD): rodapé de 2 linhas, aceite nos cadastros, nota discreta e aviso de cookies
   ========================================================================== */
.lp-legal-foot { font-size: 12px; line-height: 1.55; color: var(--mut); text-align: center; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
.lp-legal-foot p { margin: 2px 0; }
.lp-legal-foot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.lp-accept { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--tx); text-align: left; cursor: pointer; }
.lp-accept input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--red, #E5161D); }
.lp-accept a { color: var(--red, #E5161D); font-weight: 600; }
.lp-legal-note { font-size: 12px; line-height: 1.5; color: var(--mut); }
.lp-legal-note a { color: inherit; text-decoration: underline; }
.lp-cookie { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--lp-bottom, 0px) + 12px); z-index: 1600; width: min(560px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; background: var(--sf); color: var(--tx); border: 1px solid var(--ln); border-radius: 999px; box-shadow: 0 10px 30px rgba(26, 18, 20, .16); font-size: 12.5px; line-height: 1.4; }
.lp-cookie a { color: var(--red, #E5161D); font-weight: 600; }
.lp-cookie button { flex: 0 0 auto; min-height: 36px; padding: 6px 16px; border: 0; border-radius: 999px; background: var(--red, #E5161D); color: #fff; font: 700 13px var(--fb, inherit); cursor: pointer; }
@media (max-width: 480px) { .lp-cookie { border-radius: 18px; } }
@media print { .lp-cookie { display: none !important; } }
/* Com uma janela aberta (convite do app, sacola, checkout...), o aviso de cookies espera ela fechar */
body:has(.modal) .lp-cookie { display: none; }

/* ==========================================================================
   Convite para baixar o app (lp-pwa.js e vai-pwa.js): ícone, chamada, vantagens e "Instalar agora"
   ========================================================================== */
.app-invite .ai-hero { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.app-invite .ai-hero img { width: 64px; height: 64px; border-radius: 22%; box-shadow: var(--sh-sm); flex: none; }
.app-invite .ai-hero h2 { font-size: 22px; line-height: 1.15; margin: 0; }
.app-invite .ai-hero p { color: var(--mut); font-size: 14px; margin: 4px 0 0; line-height: 1.45; }
.app-invite .ai-list { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; gap: 8px; }
.app-invite .ai-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.app-invite .ai-list li .i { color: var(--ok, #138a4b); flex: none; margin-top: 2px; }
.app-invite .ai-acts { display: grid; gap: 8px; }
.app-invite .ai-note { font-size: 12.5px; color: var(--mut); text-align: center; margin: 8px 0 0; line-height: 1.45; }
.app-invite .ai-alt { display: flex; justify-content: center; gap: 6px 16px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; }
.app-invite .ai-alt button, .app-invite .ai-alt a { background: none; border: 0; color: var(--mut); text-decoration: underline; cursor: pointer; font: inherit; padding: 6px 4px; }
