/* Estilo próprio do app (cardápio, painel e entregador). Sem framework. */
:root {
  --brand: #c2410c;
  --brand-ink: #fff;
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-2: #f3eee6;
  --ink: #1f1b16;
  --ink-2: #5c544a;
  --ink-3: #8a8177;
  --line: #e7dfd3;
  --ok: #15803d;
  --warn: #b45309;
  --danger: #b91c1c;
  --info: #1d4ed8;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(31, 27, 22, .06), 0 6px 20px rgba(31, 27, 22, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15120f; --surface: #1f1b17; --surface-2: #2a251f; --ink: #f4efe8; --ink-2: #c9c0b4;
    --ink-3: #91877b; --line: #3a332b; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
  }
  /* no escuro, o link volta para a cor da loja (o escurecido é só para fundo claro) */
  :root:not([data-theme="light"]) a { color: var(--brand); }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45; }
a { color: var(--brand-link, var(--brand)); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; }
small, .muted { color: var(--ink-3); }
.hidden { display: none !important; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: .75rem; }
.grow { flex: 1; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.strike { text-decoration: line-through; color: var(--ink-3); font-weight: 400; }

/* Botões e campos */
.btn { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius-sm);
  padding: .6rem 1rem; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem; text-decoration: none; min-height: 42px; }
.btn:hover { border-color: var(--ink-3); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.05); border-color: var(--brand); }
.btn-danger { color: var(--danger); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-sm { min-height: 32px; padding: .3rem .65rem; font-size: .88rem; }
.btn-block { width: 100%; }
.btn-ghost { border-color: transparent; background: transparent; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .3rem; color: var(--ink-2); }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=search],
input[type=date], input[type=datetime-local], input[type=time], input[type=color], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .55rem .7rem; min-height: 42px; }
input[type=color] { padding: .2rem; width: 70px; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.field { margin-bottom: .9rem; }
.field-row { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.check { display: flex; gap: .55rem; align-items: center; font-weight: 500; color: var(--ink); margin-bottom: .5rem; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.help { font-size: .82rem; color: var(--ink-3); margin-top: .25rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 99px; font-size: .78rem; font-weight: 600;
  background: var(--surface-2); color: var(--ink-2); }
.pill-ok { background: #dcfce7; color: #166534; } .pill-danger { background: #fee2e2; color: #991b1b; }
.pill-warn { background: #fef3c7; color: #92400e; } .pill-info { background: #dbeafe; color: #1e40af; }
.alert { padding: .7rem .9rem; border-radius: var(--radius-sm); margin-bottom: 1rem; background: var(--surface-2); }
.alert-error { background: #fee2e2; color: #7f1d1d; } .alert-success { background: #dcfce7; color: #14532d; }
.alert-warn { background: #fef3c7; color: #78350f; }
table.table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table th, .table td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-3); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.empty { padding: 2rem 1rem; text-align: center; color: var(--ink-3); }

/* ---------- Cardápio ---------- */
.menu-hero { background: var(--brand); color: var(--brand-ink); padding: 1.4rem 1rem 3.2rem; }
.menu-hero .wrap, .menu-main { max-width: 860px; margin: 0 auto; }
.menu-hero h1 { font-size: 1.55rem; margin: 0; }
.menu-hero p { margin: .3rem 0 0; opacity: .92; }
.store-badge { width: 54px; height: 54px; border-radius: 14px; background: rgba(255,255,255,.18); display: grid; place-items: center;
  font-weight: 800; font-size: 1.4rem; flex: none; overflow: hidden; }
.store-info { margin: -2.2rem auto 0; max-width: 860px; padding: 0 1rem; }
.store-info .card { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.active-order { display: flex; gap: .8rem; align-items: center; margin-top: .6rem; padding: .8rem 1rem; border: 2px solid var(--brand); border-radius: 14px; background: var(--surface); color: inherit; text-decoration: none; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.active-order .grow { min-width: 0; }
.store-facts { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .9rem; color: var(--ink-2); }
.store-facts b { display: block; color: var(--ink); }
.menu-main { padding: 0 1rem 7rem; }
.cat-tabs { position: sticky; top: 0; z-index: 5; background: var(--bg); display: flex; gap: .4rem; overflow-x: auto; padding: .8rem 0 .6rem;
  scrollbar-width: none; margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: .4rem .9rem; font: inherit;
  font-weight: 600; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.cat-tab.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.search { margin: .3rem 0 1rem; }
.cat-section { scroll-margin-top: 64px; margin-top: 1.3rem; }
.cat-promo { background: #fff7ed; color: #9a3412; border-radius: var(--radius-sm); padding: .45rem .7rem; font-size: .88rem; margin-bottom: .6rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cat-promo { background: #3b2416; color: #fdba74; } }
.products { display: grid; gap: .7rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .products { grid-template-columns: 1fr 1fr; } }
.product { display: flex; gap: .8rem; text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .85rem; cursor: pointer; font: inherit; color: inherit; }
.product:hover { border-color: var(--ink-3); }
.product .info { flex: 1; min-width: 0; }
.product .name { font-weight: 700; }
.product .desc { color: var(--ink-2); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: .2rem 0 .4rem; }
.product .price { font-weight: 700; color: var(--ink); }
.product .thumb { width: 88px; height: 88px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); }
.product.sold-out { opacity: .6; }
.tags { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .35rem; }
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); z-index: 20;
  background: linear-gradient(to top, var(--bg) 70%, transparent); }
.cart-bar .btn { max-width: 860px; margin: 0 auto; display: flex; width: 100%; justify-content: space-between; min-height: 52px; font-size: 1rem; }

/* Folha (modal de baixo para cima) */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(15, 12, 9, .5); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 620px; max-height: 92vh; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; overflow: hidden; }
@media (min-width: 720px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 18px; max-height: 88vh; } }
.sheet-head { padding: 1rem 1rem .6rem; display: flex; gap: .8rem; align-items: flex-start; border-bottom: 1px solid var(--line); background: var(--surface); }
.sheet-head h2 { margin: 0; }
.sheet-body { padding: 1rem; overflow-y: auto; flex: 1; }
.sheet-foot { padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); display: flex; gap: .7rem; align-items: center; }
.close-x { margin-left: auto; border: 0; background: var(--surface-2); width: 36px; height: 36px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; color: var(--ink); flex: none; }
.sheet-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius); margin-bottom: .8rem; }
img.contain, .menu-caseiro .product img.thumb.contain { object-fit: contain; background: #fff; }
.group { margin-bottom: 1.1rem; }
.group-head { display: flex; justify-content: space-between; align-items: center; background: var(--surface-2); padding: .55rem .75rem; border-radius: var(--radius-sm); margin-bottom: .3rem; }
.group-head b { display: block; }
.opt { display: flex; align-items: center; gap: .7rem; padding: .75rem .85rem; min-height: 52px; border-bottom: 1px solid var(--line); cursor: pointer; }
.opt:last-child { border-bottom: 0; }
.opt .grow small { display: block; }
.opt input[type=radio], .opt input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--brand); flex: none; }
.opt.disabled { opacity: .5; cursor: not-allowed; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); }
.qty button { border: 0; background: transparent; width: 36px; height: 36px; font-size: 1.15rem; cursor: pointer; color: var(--brand); font-weight: 700; }
.qty button:disabled { color: var(--ink-3); }
.qty span { min-width: 1.6rem; text-align: center; font-weight: 700; }
.seg { display: flex; background: var(--surface-2); border-radius: 99px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 99px; padding: .75rem .5rem; min-height: 48px; font-size: 1rem; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.cart-line { display: flex; gap: .7rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.cart-line .opts { color: var(--ink-2); font-size: .85rem; }
.summary-line { display: flex; justify-content: space-between; padding: .2rem 0; }
.summary-line.total { font-weight: 800; font-size: 1.1rem; border-top: 1px solid var(--line); margin-top: .4rem; padding-top: .6rem; }
.map { height: 260px; border-radius: var(--radius); border: 1px solid var(--line); margin: .5rem 0; z-index: 1; }
.pay-option { display: flex; gap: .7rem; align-items: center; padding: .85rem 1rem; min-height: 54px; font-size: 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .4rem; background: var(--surface); cursor: pointer; }
.pay-option input { accent-color: var(--brand); width: 22px; height: 22px; flex: none; }
.pay-option:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: .65rem 1rem;
  border-radius: 10px; z-index: 60; max-width: calc(100% - 2rem); box-shadow: var(--shadow); font-weight: 500; animation: toast-in .18s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Acompanhamento */
.track { max-width: 620px; margin: 0 auto; padding: 1rem 1rem 3rem; }
.steps { list-style: none; padding: 0; margin: 1rem 0; }
.steps li { display: flex; gap: .8rem; align-items: flex-start; padding: .45rem 0; color: var(--ink-3); }
.steps li .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; margin-top: 1px; background: var(--surface); }
.steps li.done { color: var(--ink); }
.steps li.done .dot { background: var(--ok); border-color: var(--ok); }
.steps li.current .dot { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 25%, transparent); }
.steps li.current { color: var(--ink); font-weight: 700; }
.pix-box { text-align: center; }
.pix-box #qr { display: inline-block; background: #fff; padding: 10px; border-radius: 10px; margin: .6rem 0; }
.pix-box #qr img, .pix-box #qr svg { width: 210px; height: 210px; }
.copy-field { font-family: ui-monospace, monospace; font-size: .78rem; word-break: break-all; background: var(--surface-2); padding: .6rem; border-radius: 8px; text-align: left; }

/* ---------- Painel ---------- */
.admin { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: #1c1712; color: #e9e1d6; padding: 1rem .7rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { display: flex; gap: .6rem; align-items: center; padding: .3rem .5rem 1rem; font-weight: 800; }
.side .brand span.logo { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; color: var(--brand-ink); }
.side nav a { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 8px; color: #d6cdc1; text-decoration: none; font-weight: 500; font-size: .93rem; }
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.side nav .sep { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #8f857a; padding: .9rem .6rem .3rem; }
.side .ico { width: 18px; text-align: center; opacity: .85; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: .8rem; padding: .7rem 1.2rem; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.topbar h1 { font-size: 1.15rem; margin: 0; }
.content { padding: 1.2rem; }
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; left: 0; top: 0; width: 250px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .menu-toggle { display: inline-flex; }
  .content { padding: .9rem; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.stat .label { color: var(--ink-3); font-size: .85rem; }
.stat .value { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Kanban */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: .8rem; overflow-x: auto; padding-bottom: 1rem; align-items: start; }
.col { background: var(--surface-2); border-radius: var(--radius); padding: .6rem; min-height: 200px; }
.col-head { display: flex; align-items: center; gap: .5rem; padding: .2rem .3rem .6rem; font-weight: 700; }
.col-head .count { margin-left: auto; background: var(--surface); border-radius: 99px; padding: 0 .55rem; font-size: .85rem; }
.col-head .bar { width: 10px; height: 10px; border-radius: 50%; }
.ocard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .7rem; margin-bottom: .55rem; box-shadow: var(--shadow); }
.ocard.late { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.ocard.fresh { animation: pulse 1.2s ease-in-out 3; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 35%, transparent); } }
.ocard .num { font-weight: 800; font-size: 1.05rem; }
.ocard .sel { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; }
.ocard .sel input { width: 18px; height: 18px; accent-color: var(--brand); }
.ocard.selected { box-shadow: 0 0 0 2px var(--brand); }
.bulk-bar { position: sticky; top: 0; z-index: 5; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .5rem .8rem; margin-bottom: .7rem; box-shadow: var(--shadow); }
.ocard .meta { font-size: .83rem; color: var(--ink-2); }
.ocard .actions { display: flex; gap: .35rem; margin-top: .55rem; flex-wrap: wrap; }
.ocard .timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .85rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .9rem; align-items: center; }
.filters input:not([type=checkbox]), .filters select { width: auto; min-width: 160px; }

/* Cozinha (KDS) */
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.ticket { background: var(--surface); border-radius: 12px; border: 2px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.ticket-head { padding: .55rem .75rem; display: flex; justify-content: space-between; align-items: center; background: var(--surface-2); font-weight: 800; }
.ticket.warn .ticket-head { background: #fef3c7; color: #78350f; }
.ticket.late .ticket-head { background: #fee2e2; color: #7f1d1d; }
.ticket ul { list-style: none; margin: 0; padding: .5rem .75rem; flex: 1; }
.ticket li { padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.ticket li:last-child { border-bottom: 0; }
.ticket li .q { font-weight: 800; margin-right: .3rem; }
.ticket li .o { display: block; font-size: .85rem; color: var(--ink-2); padding-left: 1.4rem; }
.ticket li .n { display: block; font-size: .85rem; color: var(--danger); font-weight: 600; padding-left: 1.4rem; }
.ticket .foot { padding: .55rem .75rem; border-top: 1px solid var(--line); }

/* Entregas */
.dispatch { display: grid; grid-template-columns: 380px 1fr; gap: 1rem; }
@media (max-width: 1000px) { .dispatch { grid-template-columns: 1fr; } }
.dispatch .map { height: calc(100vh - 160px); min-height: 360px; margin: 0; }
.route-card { border-left: 5px solid var(--brand); }
.stop { display: flex; gap: .55rem; align-items: center; padding: .3rem 0; font-size: .9rem; }
.stop .n { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: .78rem; font-weight: 800; flex: none; }
.marker-num { background: var(--brand); color: var(--brand-ink); border-radius: 50%; width: 28px !important; height: 28px !important; display: grid !important; place-items: center;
  font-weight: 800; font-size: 13px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.marker-store { background: #1c1712; color: #fff; border-radius: 8px; width: 30px !important; height: 30px !important; display: grid !important; place-items: center; border: 2px solid #fff; font-size: 15px; }

/* Formulários do painel */
.form-card { max-width: 860px; }
.form-actions { display: flex; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.tabs-line { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.tabs-line a { padding: .55rem .8rem; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs-line a.active { color: var(--ink); border-color: var(--brand); }
.list-item { display: flex; align-items: center; gap: .7rem; padding: .6rem .2rem; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.bars { display: flex; flex-direction: column; gap: .35rem; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 90px; gap: .6rem; align-items: center; font-size: .9rem; }
.bar-track { background: var(--surface-2); border-radius: 6px; height: 14px; overflow: hidden; }
.bar-fill { background: var(--brand); height: 100%; border-radius: 6px; }

/* Entregador */
.courier { max-width: 560px; margin: 0 auto; padding: 1rem 1rem 5rem; }
.courier-stop { border-left: 5px solid var(--line); }
.courier-stop.next { border-left-color: var(--brand); }
.courier-stop .big { font-size: 1.05rem; font-weight: 700; }
.login-box { max-width: 380px; margin: 8vh auto; padding: 0 1rem; }

/* Impressão (comanda 80 mm) */
.ticket-print { font-family: ui-monospace, "Courier New", monospace; font-size: 13px; width: 76mm; margin: 0 auto; color: #000; background: #fff; padding: 4mm 0; }
.ticket-print h2 { font-size: 16px; text-align: center; margin: 0 0 4px; }
.ticket-print hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.ticket-print .l { display: flex; justify-content: space-between; gap: 6px; }
.ticket-print .sub { padding-left: 12px; }
@media print { .no-print { display: none !important; } body { background: #fff; } @page { margin: 0; size: 80mm auto; } }

/* Painel de pedidos prontos (TV) */
.ready-board { min-height: 100vh; display: grid; grid-template-columns: 1fr 1.4fr; grid-template-rows: auto 1fr; gap: 1.2rem; padding: 1.2rem; background: #1c1712; color: #fff; }
.rb-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.rb-store { font-size: 1.6rem; font-weight: 800; }
.rb-clock { font-size: 1.6rem; font-variant-numeric: tabular-nums; opacity: .8; }
.rb-col { background: rgba(255,255,255,.06); border-radius: 18px; padding: 1rem 1.2rem; }
.rb-col h2 { font-size: 1.5rem; margin-bottom: 1rem; color: #e7ded3; }
.rb-ready { background: rgba(22,163,74,.18); }
.rb-ready h2 { color: #86efac; }
.rb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.rb-card { background: rgba(255,255,255,.08); border-radius: 14px; padding: .8rem; text-align: center; }
.rb-card b { display: block; font-size: 3rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rb-card span { font-size: 1.1rem; opacity: .85; }
.rb-ready .rb-card { background: #15803d; }
.rb-card.fresh { animation: pulse 1.2s ease-in-out 4; }
.rb-empty { opacity: .5; font-size: 1.4rem; }
@media (max-width: 700px) { .ready-board { grid-template-columns: 1fr; } }

/* Salão */
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.table-tile { display: flex; flex-direction: column; gap: .2rem; min-height: 96px; padding: .7rem; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: inherit; text-decoration: none; }
.table-tile b { font-size: 1.3rem; }
.table-tile small { opacity: .75; }
.table-tile.free { padding: 0; border-style: dashed; }
.table-tile.free button { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: .2rem; padding: .7rem; height: 100%; box-sizing: border-box; }
.table-tile.busy { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.table-tile.has-ready { border-color: var(--ok); }
.seg label { flex: 1; text-align: center; padding: .5rem; border-radius: 99px; cursor: pointer; font-weight: 600; color: var(--ink-2); position: relative; }
.seg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
[hidden] { display: none !important; }
/* duas colunas de cartões que viram uma no celular */
.cols { display: grid; gap: 1rem; align-items: start; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.cols > * { min-width: 0; }
.pending-list { max-height: 46vh; overflow-y: auto; margin-right: -.4rem; padding-right: .4rem; }

/* chat do pedido (motoboy e cliente) */
.chat { display: flex; flex-direction: column; gap: .5rem; }
.chat-list { display: flex; flex-direction: column; gap: .6rem; max-height: 62vh; min-height: 280px; overflow-y: auto; padding: .8rem; background: var(--surface-2); border-radius: 14px; }
.chat-msg { max-width: 88%; padding: .65rem .9rem; font-size: 1.02rem; line-height: 1.4; border-radius: 16px; background: var(--surface); white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg small { display: block; margin-top: .15rem; color: var(--ink-3); font-size: .72rem; }
.chat-msg.mine { align-self: flex-end; background: var(--brand); color: var(--brand-ink); }
.chat-msg.mine small { color: inherit; opacity: .8; }
.chat-quick { display: flex; gap: .4rem; flex-wrap: wrap; }
.chat-form { display: flex; gap: .4rem; align-items: flex-end; }
.chat-form textarea { flex: 1; resize: none; min-height: 52px; font-size: 1rem; }
.chat-form .btn { min-height: 52px; padding: 0 1.2rem; }
.chat-quick .btn { min-height: 40px; }
.chat-badge { display: inline-block; min-width: 1.3rem; padding: 0 .35rem; margin-left: .3rem; border-radius: 99px; background: var(--danger); color: #fff; font-size: .75rem; line-height: 1.3rem; text-align: center; }
.chat-sheet { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; justify-content: flex-end; background: rgba(0,0,0,.45); }
.chat-sheet > .card { margin: 0; border-radius: 18px 18px 0 0; max-height: 92vh; overflow: auto; }
.legal h2 { margin-top: 1.2rem; font-size: 1.1rem; } .legal ul { padding-left: 1.2rem; } .legal li { margin: .3rem 0; } .legal p, .legal li { line-height: 1.55; }
.legal-links { text-align: center; font-size: .85rem; margin: 2rem 0 6rem; color: var(--ink-3); } .legal-links a { color: inherit; } .terms-check { display: flex; gap: .5rem; align-items: flex-start; font-size: .92rem; } .terms-check input { margin-top: .2rem; }
.peak-bar { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; padding: .5rem .8rem; margin-bottom: .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: .9rem; }
.peak-bar.alert { border-color: var(--warn); background: #fff7ed; }
.peak-group { display: inline-flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.stars { display: flex; gap: .3rem; }
.stars button { font-size: 2.2rem; line-height: 1; background: none; border: 0; color: var(--line); cursor: pointer; padding: .1rem; }
.stars button.on { color: #f59e0b; }

/* Cardápio do dia */
.day-section { margin-bottom: 1rem; }
.day-section summary { cursor: pointer; list-style: none; }
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; margin-top: .7rem; }
.day-item { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; min-height: 76px; padding: .7rem .8rem; border-radius: 12px; border: 2px solid #16a34a; background: #f0fdf4; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.day-item small { color: var(--ink-2); font-size: .8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.day-item .state { margin-top: auto; font-size: .8rem; font-weight: 700; color: #15803d; }
.day-item.out { border-color: #dc2626; background: #fef2f2; }
.day-item.out b { text-decoration: line-through; color: var(--ink-2); }
.day-item.out .state { color: #b91c1c; }
.day-item:disabled { opacity: .6; }

/* conta do cliente */
.account { max-width: 480px; margin: 0 auto; padding: 1rem 1rem 3rem; }
.account-back { display: inline-block; margin: .25rem 0 1rem; text-decoration: none; font-weight: 600; }
.account-hero { margin-bottom: 1rem; }
.account-hero h1 { font-size: 1.7rem; margin-bottom: .2rem; }
.account-hero p { margin: 0; }
.account-tabs { margin-bottom: 1rem; }
.account-tabs a { flex: 1; text-align: center; padding: .75rem .5rem; min-height: 48px; border-radius: 99px; font-weight: 600; text-decoration: none; color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.account-tabs a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.account-form { padding: 1.2rem; }
.account-form .field label { display: block; font-weight: 600; margin-bottom: .3rem; }
.account-form input[type=text], .account-form input[type=tel], .account-form input[type=email], .account-form input[type=password], .account-form input:not([type]) { min-height: 50px; font-size: 1rem; }
.account-form .field small { display: block; margin-top: .25rem; }
.account-submit { min-height: 52px; font-size: 1.05rem; margin-top: .5rem; }
.account-alt { text-align: center; margin: .9rem 0 0; }
.account-invite { margin: 0 0 1rem; padding: .7rem .9rem; background: var(--surface-2); border-radius: var(--radius-sm); }
.account-invite summary { cursor: pointer; font-weight: 600; }
.account-section { margin: 1.2rem 0; }
.history-order { display: block; text-decoration: none; color: inherit; margin-bottom: .6rem; }
.history-items { margin-top: .3rem; font-size: .92rem; }
.account .card + .card, .account details.card { margin-top: .6rem; }

/* Cartão online: os campos seguros do Mercado Pago aparecem como iframes dentro destas caixas */
.mp-field { height: 2.6rem; border: 1px solid var(--line, #d6d3d1); border-radius: 10px; padding: 0 .6rem; background: var(--surface, #fff); display: flex; align-items: center; }
/* cozinha: corrigido, enviando "pronto" (com desfazer) e letra grande */
.ticket.changed { border-color: #d97706; }
.ticket-changed { margin: 0; padding: .45rem .75rem; background: #fef3c7; color: #78350f; font-weight: 800; }
.ticket li.item-changed { background: #fffbeb; }
.ticket.sending { opacity: .5; }
.kds.kds-big { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); font-size: 1.3rem; }
.kds.kds-big .ticket li .o, .kds.kds-big .ticket li .n { font-size: 1.1rem; }
/* lançamento: observações de um toque e últimos pedidos do cliente */
.note-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
/* cliente no novo pedido: busca → lista de candidatos → ficha do escolhido */
.staff-cust { margin-bottom: 1rem; }
.staff-cust h3 { margin: 0 0 .6rem; }
.staff-cust .field { margin-bottom: 0; min-width: 0; }
.cust-search { display: grid; gap: .75rem; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.cust-search input[type=tel] { font-size: 1.05rem; }
.cust-fields { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-top: .8rem; }
.cust-actions { margin-top: .7rem; }
.cust-results:not(:empty) { margin-top: .7rem; }
.cust-head { font-size: .88rem; margin-bottom: .35rem; }
.cust-none { margin: 0; font-size: .9rem; }
.cust-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; max-height: 320px; overflow-y: auto; }
.cust-cand { display: grid; grid-template-columns: minmax(0, 1fr) auto 1rem; gap: .2rem .8rem; align-items: center; width: 100%; text-align: left;
  font: inherit; color: inherit; background: var(--surface); border: 0; border-bottom: 1px solid var(--line); padding: .6rem .8rem; cursor: pointer; }
.cust-cand:last-child { border-bottom: 0; }
.cust-cand:hover, .cust-cand.active { background: var(--surface-2); }
.cust-cand.active { box-shadow: inset 3px 0 0 var(--brand); }
.cust-cand-main { display: flex; flex-direction: column; min-width: 0; }
.cust-cand-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-cand-main .tnum, .cust-detail-head .tnum { white-space: nowrap; }
.cust-cand-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: .8rem; text-align: right; }
.cust-cand-go { font-size: 1.4rem; color: var(--ink-3); line-height: 1; }
.cust-badge { font-weight: 700; border-radius: 99px; padding: 0 .5rem; }
.cust-badge.warn { background: #fef3c7; color: #78350f; }
.staff-cust mark { background: #fde68a; color: #1f1b16; border-radius: 3px; padding: 0 1px; }
.cust-detail { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem; background: var(--surface-2); }
.cust-detail-head { display: flex; gap: .6rem; align-items: flex-start; flex-wrap: wrap; }
.cust-name { font-size: 1.05rem; }
.cust-sec { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin: .8rem 0 .35rem; }
.cust-where { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.cust-opt { display: flex; flex-direction: column; align-items: flex-start; text-align: left; justify-content: center; gap: .1rem; min-height: 54px; white-space: normal; }
.cust-opt small { font-size: .74rem; font-weight: 500; opacity: .9; }
.cust-opt span { font-weight: 600; line-height: 1.25; }
.last-orders { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: .86rem; }
.lo-row { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto auto; gap: .6rem; align-items: center; padding: .4rem .6rem; border-bottom: 1px solid var(--line); }
.lo-row:last-child { border-bottom: 0; }
.lo-date { font-weight: 700; }
.lo-items { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lo-total { font-weight: 600; white-space: nowrap; }
.cust-picked { display: flex; gap: .8rem; align-items: center; padding: .7rem .9rem; border-radius: var(--radius-sm); background: #dcfce7; color: #14532d; }
@media (max-width: 520px) {
  .cust-search { grid-template-columns: 1fr; }
  .lo-row { grid-template-columns: 2.6rem minmax(0, 1fr) auto; }
  .lo-row .lo-total { display: none; }
}


/* Montagem por unidade mantém os cartões na ordem de chegada. */
.kds-done{opacity:.45;text-decoration:line-through}
.kds-progress{margin:.35rem 0;gap:.6rem}
.kds-all-done{outline:3px solid var(--success, #15803d);outline-offset:3px;font-weight:800}

/* menu do painel: seções que abrem e fecham */
.side nav details.navgroup > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; border-radius: 8px; }
.side nav details.navgroup > summary::-webkit-details-marker { display: none; }
.side nav details.navgroup > summary::after { content: '▸'; font-size: .8rem; transition: transform .15s; }
.side nav details.navgroup[open] > summary::after { transform: rotate(90deg); }
.side nav details.navgroup > summary:hover { color: #d6cdc1; }

/* visão do dia (Início) */
.delta.up { color: #166534; } .delta.down { color: #991b1b; }
.bar-track { position: relative; }
.bar-mark { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink-2, #6b6259); transform: translateX(-1px); }
.attention a.list-item { color: inherit; text-decoration: none; }
.attention a.list-item:hover { background: var(--surface-2); }

/* saúde do sistema */
.health-group .pill { min-width: 84px; justify-content: center; text-align: center; }

/* telas de entrada: logo da loja e portas por perfil */
.login-brand { display: flex; flex-direction: column; align-items: center; gap: .5rem; margin-bottom: 1rem; font-size: 1.05rem; }
.login-logo { width: 64px; height: 64px; border-radius: 18px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: 1.6rem; overflow: hidden; }
.login-logo img { width: 100%; height: 100%; object-fit: cover; }
.login-other { margin-top: 1rem; }
.entry h1 { text-align: center; font-size: 1.3rem; margin: 0 0 1rem; }
.entry-doors { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1.2rem; }
.entry-door { display: flex; align-items: center; gap: .9rem; padding: 1rem; text-decoration: none; color: inherit; min-height: 72px; }
.entry-door:hover { border-color: var(--brand); }
.entry-door .grow { display: flex; flex-direction: column; gap: .15rem; }
.entry-door .muted { font-size: .88rem; }
.entry-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 1.2rem; flex: none; }
.login-box .center { text-align: center; }
