/* ============ PedeAki — tema (variáveis pintadas pelo JS) ============ */
:root {
  --pa: #EA2D4F;     /* cor primária da marca (padrão — muda conforme a logo do cliente) */
  --pd: #B6001B;     /* primária escura (hierarquia: só em gradientes e sombras) */
  --ac: #FF8A00;     /* cor de destaque (badges, tags, preços em itens com opcionais) */
  --on: #FFFFFF;      /* texto sobre a cor primária */
  --bg: #f4f4f8;
  --card: #ffffff;
  --ink: #23233a;
  --muted: #8b8b9f;
  --line: #ececf3;
  --radius: 16px;
  --shadow: 0 4px 18px rgba(35, 35, 58, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ============ Header do app ============ */
.app-header {
  position: sticky; top: 0; z-index: 40;
  background: linear-gradient(135deg, var(--pa), var(--pd));
  color: var(--on);
  padding: 18px 16px 54px;
}
.app-header .row { display: flex; align-items: center; gap: 12px; max-width: 980px; margin: 0 auto; }
.app-header img.logo { width: 52px; height: 52px; object-fit: contain; background: rgba(255,255,255,.95); border-radius: 12px; padding: 4px; flex-shrink: 0; }
.app-header h1 { font-size: 20px; font-weight: 800; line-height: 1.15; }
.app-header .slogan { font-size: 12.5px; opacity: .9; }
.app-header .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.app-header .badges span { font-size: 11px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); padding: 3px 9px; border-radius: 99px; }
.header-actions { margin-left: auto; display: flex; gap: 8px; }
.header-actions button {
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.4);
  color: var(--on); font-size: 12px; padding: 7px 12px; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
}
.header-actions button:hover { background: rgba(255,255,255,.28); }

.app-desc {
  max-width: 980px; margin: -34px auto 0; padding: 0 16px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; font-size: 14px; line-height: 1.5; color: #44445a;
}

/* ============ Layout ============ */
.app-wrap { max-width: 980px; margin: 0 auto; padding: 16px; }
.app-main { display: grid; gap: 16px; }
@media (min-width: 860px) {
  .app-main { grid-template-columns: 1fr 360px; align-items: start; }
  .cart-panel { position: sticky; top: 96px; }
}

/* categorias */
.cat-bar { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.cat-bar::-webkit-scrollbar { display: none; }
.cat-bar button {
  flex-shrink: 0; border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 99px; cursor: pointer;
}
.cat-bar button.on { background: var(--pa); border-color: var(--pa); color: var(--on); }

/* lista de produtos */
.sec-title { font-size: 15px; font-weight: 800; margin: 14px 0 10px; }
.prod-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .prod-grid { grid-template-columns: 1fr 1fr; } }

.prod {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; display: flex; gap: 12px; position: relative; overflow: hidden;
  border: 1.5px solid transparent;
}
.prod.in-cart { border-color: var(--ac); }
.prod .art {
  width: 74px; height: 74px; flex-shrink: 0; border-radius: 12px; object-fit: cover;
  display: flex; align-items: center; justify-content: center; font-size: 38px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pa) 14%, white), color-mix(in srgb, var(--ac) 18%, white));
}
.prod .art img { width: 100%; height: 100%; object-fit: cover; }
.prod .info { flex: 1; min-width: 0; }
.prod .info h3 { font-size: 15px; font-weight: 700; }
.prod .info p { font-size: 12.5px; color: var(--muted); margin: 3px 0 6px; line-height: 1.4; }
.prod .price { font-size: 15px; font-weight: 800; color: var(--pd); }
.prod .opt-tag { font-size: 11px; color: var(--ac); font-weight: 700; margin-top: 3px; }

.qty-ctl {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 4px;
  background: color-mix(in srgb, var(--pa) 9%, white); border-radius: 99px; padding: 3px;
}
.qty-ctl button {
  width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--pa); color: var(--on); font-size: 17px; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.qty-ctl button:disabled { opacity: .35; cursor: not-allowed; }
.qty-ctl .n { min-width: 34px; text-align: center; font-weight: 800; font-size: 15px; }
.qty-add {
  margin-top: 8px; border: 1.5px dashed var(--pa); background: none; color: var(--pa);
  font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: 99px; cursor: pointer;
}
.qty-add:hover { background: color-mix(in srgb, var(--pa) 8%, white); }

/* ============ Carrinho / resumo ============ */
.cart-panel {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; position: relative;
}
.cart-panel h2 { font-size: 16px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.cart-panel h2 .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ac); display: none; }
.cart-panel h2 .dot.show { display: block; }
.cart-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 18px 0; }
.cart-items { display: flex; flex-direction: column; gap: 10px; }
.ci { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; }
.ci .qn {
  min-width: 26px; height: 22px; border-radius: 7px; background: color-mix(in srgb, var(--pa) 12%, white);
  color: var(--pd); font-weight: 800; font-size: 12.5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ci .nm { flex: 1; line-height: 1.35; }
.ci .nm .sub { color: var(--muted); font-size: 12px; display: block; }
.ci .pr { font-weight: 700; white-space: nowrap; }
.ci .rm { border: none; background: none; color: #c0c0d0; cursor: pointer; font-size: 15px; padding: 2px; }
.ci .rm:hover { color: var(--pd); }
.ci .rm.on { color: var(--pd); }

.cart-note, .cart-pickup {
  margin-top: 12px;
}
.cart-note textarea, .field input, .field select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font-size: 13.5px; font-family: inherit; background: #fafafe; resize: vertical;
}
.cart-note textarea { min-height: 56px; }
.flabel { font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 6px; display: block; }
.cart-pickup { display: flex; gap: 10px; }
.cart-pickup label { flex: 1; cursor: pointer; }
.cart-pickup input { display: none; }
.cart-pickup .opt {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; text-align: center;
  font-size: 13px; font-weight: 700; background: #fafafe;
}
.cart-pickup input:checked + .opt { border-color: var(--pa); background: color-mix(in srgb, var(--pa) 8%, white); color: var(--pd); }

/* opcionais do item */
.optzone {
  margin: 6px 0 2px; background: color-mix(in srgb, var(--ac) 8%, white);
  border: 1px solid color-mix(in srgb, var(--ac) 30%, white);
  border-radius: 12px; padding: 10px 12px;
}
.optzone .otitle { font-size: 11.5px; font-weight: 800; color: var(--pd); margin-bottom: 7px; display: flex; align-items: center; gap: 5px; }
.optzone label { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; cursor: pointer; }
.optzone input { accent-color: var(--pa); width: 16px; height: 16px; }
.optzone .op { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 600; }

.cart-totals { margin-top: 14px; border-top: 1.5px dashed var(--line); padding-top: 12px; }
.cart-totals .tr { display: flex; justify-content: space-between; font-size: 13.5px; padding: 2px 0; color: #44445a; }
.cart-totals .tr.gr { font-size: 17px; font-weight: 800; color: var(--ink); padding-top: 8px; }
.cart-totals .tr.gr span:last-child { color: var(--pd); }

/* campo de pedido (completa/retire) */
.mode-tabs { display: flex; gap: 8px; margin: 12px 0; }
.mode-tabs button {
  flex: 1; border: 1.5px solid var(--line); background: #fafafe; border-radius: 12px;
  padding: 10px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--ink);
}
.mode-tabs button.on { border-color: var(--pa); background: color-mix(in srgb, var(--pa) 8%, white); color: var(--pd); }

/* pagamento */
.pay-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-row label { display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer; background: #fafafe; }
.pay-row input { accent-color: var(--pa); }

/* preview do pedido */
.order-preview {
  margin-top: 12px; background: #f1f6f1; border: 1.5px dashed #9fc7a5; border-radius: 12px;
  padding: 12px; font-size: 12.5px; white-space: pre-line; line-height: 1.55; color: #33463a;
  font-family: 'Segoe UI', sans-serif;
}
.order-preview h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: #6d8f74; margin-bottom: 6px; font-family: inherit; }

.btn-wa {
  width: 100%; margin-top: 14px; border: none; cursor: pointer;
  background: #25D366; color: #fff; font-size: 15px; font-weight: 800;
  padding: 14px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, .35);
}
.btn-wa:hover { filter: brightness(.95); }
.btn-wa:disabled { background: #b9dcc2; box-shadow: none; cursor: not-allowed; }
.btn-wa svg { width: 20px; height: 20px; }
.cart-clear { position: absolute; top: 14px; right: 14px; border: none; background: none; color: var(--muted); font-size: 12px; cursor: pointer; }
.cart-clear:hover { color: var(--pd); }

/* modal de opcionais */
.modal-bg {
  position: fixed; inset: 0; background: rgba(20, 20, 35, .55); z-index: 100;
  display: none; align-items: flex-end; justify-content: center;
}
.modal-bg.open { display: flex; }
.modal {
  background: var(--card); width: 100%; max-width: 560px; border-radius: 22px 22px 0 0;
  padding: 18px 16px 24px; max-height: 88vh; overflow-y: auto;
}
@media (min-width: 860px) {
  .modal-bg { align-items: center; }
  .modal { border-radius: 22px; max-width: 500px; }
}
.modal h3 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.modal .mdesc { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.modal .mactions { display: flex; gap: 10px; margin-top: 14px; }
.modal .mactions button {
  flex: 1; padding: 13px; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer;
  border: 1.5px solid var(--line); background: #fafafe;
}
.modal .mactions .go { background: var(--pa); border-color: var(--pa); color: var(--on); }
.modal .mactions .go:hover { filter: brightness(.94); }
.m-qty { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.m-qty .qty-ctl { margin: 0; }
.m-qty .pr { font-size: 14px; font-weight: 800; color: var(--pd); margin-left: auto; }

/* rodapé */
.app-footer {
  text-align: center; padding: 26px 16px; color: var(--muted); font-size: 12px;
}
.app-footer a { color: var(--muted); }

/* toast */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 13.5px;
  z-index: 200; transition: transform .25s ease; max-width: 90vw; text-align: center;
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* ============ Tela de login / cadastro ============ */
.auth-screen {
  position: fixed; inset: 0; z-index: 400;
  background: linear-gradient(135deg, var(--pa), var(--pd));
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.auth-card {
  background: var(--card); border-radius: 22px; box-shadow: 0 12px 44px rgba(20,20,35,.35);
  padding: 28px 24px; max-width: 400px; width: 100%; text-align: center;
}
.auth-logo img { width: 66px; height: 66px; object-fit: contain; }
.auth-card h2 { font-size: 21px; font-weight: 900; margin: 10px 0 4px; color: var(--ink); }
.auth-sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  background: #f1f1f7; padding: 4px; border-radius: 12px; margin-bottom: 14px;
}
.auth-tabs button {
  border: none; background: none; padding: 9px; font-size: 13px; font-weight: 800;
  color: var(--muted); cursor: pointer; border-radius: 9px;
}
.auth-tabs button.on { background: var(--card); color: var(--pd); box-shadow: 0 2px 6px rgba(35,35,58,.08); }
.auth-type { display: flex; gap: 16px; justify-content: center; margin-bottom: 12px; }
.auth-type .chk-row { font-size: 13px; color: var(--muted); padding: 2px 0; }
.auth-field { display: grid; gap: 8px; margin-bottom: 12px; text-align: left; }
.auth-field input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font-size: 14px; font-family: inherit; background: #fafafe;
}
.auth-go {
  width: 100%; border: none; cursor: pointer; background: linear-gradient(90deg, var(--pa), var(--ac));
  color: var(--on); font-size: 15px; font-weight: 800; padding: 13px; border-radius: 13px;
}
.auth-go:hover { filter: brightness(.95); }
.auth-err { color: #dc2626; font-size: 12.5px; font-weight: 700; min-height: 18px; margin-top: 8px; }

/* alternativas: Google + "continuar sem conta" */
.auth-alts { margin-top: 12px; display: grid; gap: 10px; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-google {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--line); background: #fff; border-radius: 13px; padding: 11px;
  font-size: 14px; font-weight: 800; color: var(--ink); cursor: pointer; font-family: inherit;
}
.auth-google:hover { border-color: var(--pa); }
.auth-google .g {
  width: 18px; height: 18px; border-radius: 50%; font-weight: 900; font-size: 13px; line-height: 18px;
  text-align: center; color: #fff; background: #4285F4; font-style: normal;
}
.auth-guest-btn {
  width: 100%; border: none; background: none; color: var(--muted);
  font-size: 13px; cursor: pointer; text-decoration: underline; font-weight: 700; padding: 4px;
}

/* detalhes dos pedidos no painel */
.u-items { display: block; font-size: 11.5px; color: var(--muted); margin: 2px 0; }

/* link do rodapé (redes / login) */
.app-footer a.f-link {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700;
  color: var(--ink); text-decoration: none; background: var(--card);
  border: 1.5px solid var(--line); padding: 6px 12px; border-radius: 99px;
}
.app-footer a.f-link:hover { border-color: var(--pa); color: var(--pd); }

/* ============ Painel admin (visual corporativo — "produto sério de empresa") ============ */
.adm-wrap {
  min-height: 100vh;
  background:
    radial-gradient(1200px 420px at 85% -8%, color-mix(in srgb, var(--pa) 14%, #eef1f6), transparent 70%),
    #f5f6fa;
}
.adm-header {
  background: linear-gradient(135deg, #12151f, #1f2436);
  color: #fff; padding: 0; display: flex; align-items: center;
  position: sticky; top: 0; z-index: 40;
  border-bottom: 3px solid var(--pa);
  box-shadow: 0 6px 24px rgba(15,17,27,.28);
}
.adm-header::before {
  /* filete de marca no topo, reforça identidade corporativa */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--pa), var(--ac));
}
.adm-header .l { font-size: 21px; font-weight: 900; letter-spacing: -.3px; line-height: 1.05; }
.adm-header .l em { font-style: normal; color: var(--ac); }
.adm-header .s {
  font-size: 10.5px; font-weight: 700; opacity: .65;
  text-transform: uppercase; letter-spacing: 1.4px; margin-top: 3px;
}
.adm-header > div { padding: 15px 20px; }
.adm-header .tools { margin-left: auto; padding: 15px 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.adm-header .tools a, .adm-header .tools button {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); color: #eef0f7;
  text-decoration: none; font-size: 12.5px; font-weight: 600; padding: 9px 14px; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; gap: 6px; transition: background .12s, border-color .12s;
}
.adm-header .tools a:hover, .adm-header .tools button:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); }
.adm-header .tools a:last-child { background: transparent; border: none; opacity: .6; }
.adm-header .tools a:last-child:hover { opacity: 1; }

.adm-tabs {
  display: flex; gap: 2px; overflow-x: auto; background: #fff; border-bottom: 1.5px solid var(--line);
  padding: 6px 12px; position: sticky; top: 60px; z-index: 30; scrollbar-width: none;
  box-shadow: 0 2px 10px rgba(15,17,27,.05);
}
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tabs button {
  border: none; background: none; padding: 12px 15px; font-size: 13px; font-weight: 700;
  color: var(--muted); cursor: pointer; border-bottom: 2.5px solid transparent; white-space: nowrap;
  border-radius: 8px;
}
.adm-tabs button:hover { color: var(--ink); background: color-mix(in srgb, var(--pa) 6%, white); }
.adm-tabs button.on { color: var(--pd); border-bottom-color: var(--pa); background: color-mix(in srgb, var(--pa) 8%, white); }

.adm-body { max-width: 920px; margin: 0 auto; padding: 26px 14px 90px; }
.panel { display: none; }
.panel.on { display: block; animation: panelIn .25s ease; }
@keyframes panelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel h2 {
  font-size: 20px; font-weight: 800; margin: 2px 0 4px; letter-spacing: -.3px; color: #12151f;
}
.panel h2::after { content: ""; display: block; width: 44px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--pa), var(--ac)); margin-top: 8px; }
.panel .hint { font-size: 13px; color: var(--muted); margin: 14px 0 18px; line-height: 1.6; max-width: 640px; }

.card {
  background: var(--card); border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15,17,27,.04), 0 8px 26px rgba(15,17,27,.06);
  border: 1px solid color-mix(in srgb, var(--pa) 8%, #e9ebf3);
  padding: 22px; margin-bottom: 18px;
}
.card h3 {
  font-size: 14.5px; font-weight: 800; margin-bottom: 14px; color: #12151f;
  display: flex; align-items: center; gap: 8px;
}
.card h3::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: linear-gradient(var(--pa), var(--ac)); }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 5px; color: #44445a; }
.field input, .field select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font-size: 13.5px; font-family: inherit; background: #fafafe;
}
.grid2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid2 { grid-template-columns: 1fr 1fr; } }

/* logo upload */
.logo-drop {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center;
  cursor: pointer; transition: border-color .15s;
}
.logo-drop:hover { border-color: var(--pa); }
.logo-drop img { max-width: 180px; max-height: 90px; margin-bottom: 8px; border-radius: 8px; background: #f6f6fb; padding: 8px; }
.logo-drop .lt { font-size: 13px; font-weight: 700; color: var(--muted); }
.color-preview { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.color-preview .sw { width: 46px; height: 46px; border-radius: 12px; border: 1.5px solid var(--line); }
.color-preview input[type=color] { width: 46px; height: 46px; border: 1.5px solid var(--line); border-radius: 12px; padding: 3px; cursor: pointer; background: #fff; }
.color-preview .ct { font-size: 12px; color: var(--muted); line-height: 1.5; }
.swatch-set { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.swatch-set button { width: 30px; height: 30px; border-radius: 9px; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }

/* lista de produtos no admin */
.adm-prod {
  display: flex; gap: 10px; align-items: center; padding: 10px; border: 1.5px solid var(--line);
  border-radius: 14px; margin-bottom: 8px; background: #fafafe;
}
.adm-prod .e { width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; object-fit: cover; display: flex; align-items: center; justify-content: center; font-size: 22px; background: #f0f0f7; overflow: hidden; }
.adm-prod .e img { width: 100%; height: 100%; object-fit: cover; }
.adm-prod .mid { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 90px; gap: 4px; }
.adm-prod input { border: 1.5px solid var(--line); border-radius: 9px; padding: 7px 9px; font-size: 13px; font-family: inherit; background: #fff; }
.adm-prod .acts { display: flex; flex-direction: column; gap: 5px; }
.adm-prod .acts button {
  border: none; background: none; cursor: pointer; font-size: 15px; padding: 2px 6px; color: var(--muted);
  border-radius: 7px;
}
.adm-prod .acts button:hover { background: color-mix(in srgb, var(--pa) 10%, white); color: var(--pd); }

.add-prod {
  width: 100%; border: 2px dashed color-mix(in srgb, var(--pa) 45%, white); background: none;
  border-radius: 14px; padding: 14px; font-size: 13.5px; font-weight: 800; color: var(--pa); cursor: pointer;
  margin-top: 4px;
}
.add-prod:hover { background: color-mix(in srgb, var(--pa) 6%, white); }

.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-list .tag {
  display: flex; align-items: center; gap: 6px; background: color-mix(in srgb, var(--pa) 9%, white);
  border: 1.5px solid color-mix(in srgb, var(--pa) 30%, white); color: var(--pd);
  border-radius: 99px; padding: 6px 6px 6px 13px; font-size: 13px; font-weight: 700;
}
.tag-list .tag button { border: none; background: color-mix(in srgb, var(--pa) 22%, white); color: var(--pd); border-radius: 50%; width: 20px; height: 20px; cursor: pointer; font-size: 11px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.tag-add { display: flex; gap: 8px; margin-top: 10px; }
.tag-add input { flex: 1; border: 1.5px solid var(--line); border-radius: 11px; padding: 9px 12px; font-size: 13px; }
.tag-add button { border: none; background: var(--pa); color: var(--on); font-weight: 800; border-radius: 11px; padding: 0 18px; cursor: pointer; font-size: 13px; }

.share-box { display: flex; gap: 10px; margin-top: 10px; }
.share-box input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 11px; padding: 10px; font-size: 12px;
  background: #f6f6fb; min-width: 0; font-family: ui-monospace, Consolas, monospace;
}
.share-box button { border: none; background: var(--pa); color: var(--on); font-weight: 800; border-radius: 11px; padding: 0 18px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.share-box .wa-share { background: #25D366; }

.sw-live { background: #f4f4f8; border-radius: 22px; max-width: 380px; margin: 8px auto; border: 8px solid #23233a; overflow: hidden; }
.sw-live iframe { width: 100%; height: 560px; border: none; display: block; }

.savebar {
  position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(15,17,27,.08);
  padding: 14px 18px; display: flex; gap: 10px; justify-content: center; align-items: center; z-index: 30;
}
.savebar #saveState { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 0 6px; white-space: nowrap; }
.savebar #saveState.ok { color: var(--ok, #16a34a); }
.savebar #saveState.err { color: #dc2626; }
.savebar button {
  border: none; cursor: pointer; font-size: 14px; font-weight: 800; padding: 13px 26px; border-radius: 13px;
  transition: filter .12s, background .12s;
}
.savebar .primary { background: linear-gradient(135deg, var(--pa), var(--pd)); color: var(--on); box-shadow: 0 4px 14px color-mix(in srgb, var(--pa) 35%, transparent); }
.savebar .primary:hover { filter: brightness(.95); }
.savebar .ghost { background: #eceef4; color: var(--ink); }
.savebar .ghost:hover { background: #e2e4ec; }

input[type=checkbox].big { width: 20px; height: 20px; accent-color: var(--pa); cursor: pointer; }

/* chips de dia (funcionamento) */
.day-tog {
  display: inline-flex; align-items: center; border: 1.5px solid var(--line);
  border-radius: 11px; padding: 8px 13px; font-size: 13px; font-weight: 700; cursor: pointer;
  background: #fafafe; color: var(--ink); user-select: none;
}
.day-tog input { display: none; }
.day-tog span { opacity: .55; transition: opacity .1s; }
.day-tog:has(input:checked) { border-color: var(--pa); background: color-mix(in srgb, var(--pa) 9%, white); }
.day-tog:has(input:checked) span { opacity: 1; color: var(--pd); }

/* status aberto/fechado no cardápio */
.open-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800;
  padding: 5px 11px; border-radius: 99px;
}
.open-pill .odot { width: 8px; height: 8px; border-radius: 50%; }
.open-pill.open { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.35); color: var(--on); }
.open-pill.open .odot { background: #5be08a; box-shadow: 0 0 8px #5be08a; }
.open-pill.closed { background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.25); color: #ffd7d7; }
.open-pill.closed .odot { background: #ff6b6b; }
.open-pill.sub { margin-top: 8px; background: none; border: none; color: var(--muted); font-size: 11.5px; }
.open-pill.sub .odot { box-shadow: none; }
.chk-row { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; padding: 6px 0; cursor: pointer; }

/* lock screen do admin */
.lock-screen {
  position: fixed; inset: 0; z-index: 300; background: linear-gradient(135deg, #23233a, #3a3a5c);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.lock-box { text-align: center; padding: 30px; max-width: 320px; width: 90%; }
.lock-box .lk-logo { font-size: 34px; font-weight: 900; margin-bottom: 6px; }
.lock-box .lk-logo em { font-style: normal; color: var(--ac); }
.lock-box p { font-size: 13px; opacity: .75; margin-bottom: 18px; }
.lock-box input {
  width: 100%; padding: 13px; border-radius: 13px; border: 1.5px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.1); color: #fff; font-size: 15px; text-align: center; outline: none;
}
.lock-box input::placeholder { color: rgba(255,255,255,.4); }
.lock-box button {
  width: 100%; margin-top: 12px; padding: 13px; border-radius: 13px; border: none; cursor: pointer;
  background: linear-gradient(90deg, var(--pa), var(--ac)); color: #fff; font-size: 14.5px; font-weight: 800;
}
.lock-box .err { color: #ff8a8a; font-size: 12.5px; margin-top: 10px; min-height: 16px; }

/* ============ Aba Usuários (Supabase) ============ */
.user-count-big {
  font-size: 40px; font-weight: 800; line-height: 1;
  background: linear-gradient(90deg, var(--pa), var(--ac));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin: 2px 0 2px;
}
.user-count-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.user-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.user-row {
  display: flex; align-items: center; gap: 10px;
  background: #fafafe; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.user-row .u-ic { font-size: 17px; }
.user-row .u-id { font-weight: 600; font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .u-when { font-size: 11.5px; color: var(--muted); margin-left: auto; flex-shrink: 0; }
.user-empty { font-size: 13px; color: var(--muted); padding: 10px 2px; }
.sql-box {
  width: 100%; min-height: 120px; margin-top: 8px; font-family: ui-monospace, Consolas, monospace; font-size: 12px;
  background: #1c1c28; color: #7ee787; border-radius: 12px; padding: 12px; white-space: pre; overflow: auto;
}

/* ============ 📍 localização + rastreamento (app) ============ */
.loc-btn {
  margin-top: 8px; width: 100%; padding: 9px 10px;
  background: #f2f0ff; color: var(--pa); font-weight: 700; font-size: 12.5px;
  border: 1.5px dashed var(--pa); border-radius: 10px; cursor: pointer;
}
.loc-status { font-size: 11.5px; color: var(--muted); margin-top: 5px; min-height: 0; }
.track-card {
  margin: 14px 0 4px; padding: 12px; border-radius: 14px;
  background: #f6f5ff; border: 1.5px solid var(--pa);
}
.track-card h4 { margin: 0 0 8px; font-size: 14px; }
.track-row { display: flex; align-items: center; gap: 8px; }
.track-badge {
  font-size: 13px; font-weight: 800; color: var(--pa);
  background: #fff; border: 1.5px solid var(--pa); border-radius: 999px; padding: 5px 12px;
}
.track-when { font-size: 11.5px; color: var(--muted); }
.track-map { margin-top: 10px; border-radius: 12px; overflow: hidden; }
.track-map iframe { width: 100%; height: 190px; border: 0; display: block; }
.track-close {
  margin-top: 8px; background: none; border: none; color: var(--muted);
  font-size: 11.5px; cursor: pointer; text-decoration: underline;
}
/* tamanhos no modal */
.size-opt {
  display: flex; align-items: center; gap: 8px; padding: 7px 4px;
  font-size: 13.5px; border-bottom: 1px dashed var(--line); cursor: pointer;
}
.size-opt b { min-width: 34px; }
/* rodapé: suporte */
.app-footer .support { font-size: 12.5px; font-weight: 700; color: var(--pa); text-decoration: none; }
.app-footer .f-link { text-decoration: underline; }

/* ============ tela de rastreamento (admin?track=) ============ */
.track-screen { min-height: 100vh; padding: 16px; background: #f4f3fa; }
.track-panel {
  max-width: 460px; margin: 0 auto; background: #fff; border-radius: 18px;
  border: 1.5px solid var(--line); padding: 18px;
}
.tp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.tp-head .l { font-size: 19px; font-weight: 800; } .tp-head .l em { color: var(--pa); font-style: normal; }
.tp-head .s { font-size: 12px; color: var(--muted); } .tp-head a { font-size: 13px; color: var(--pa); text-decoration: none; font-weight: 700; }
.tp-client { font-weight: 800; font-size: 15px; }
.tp-key { font-size: 11.5px; color: var(--muted); font-family: ui-monospace, monospace; margin-bottom: 12px; }
.tp-steps { display: grid; gap: 8px; }
.tp-steps button {
  text-align: left; padding: 12px 14px; font-size: 14.5px; font-weight: 700;
  border: 1.5px solid var(--line); background: #fff; border-radius: 12px; cursor: pointer;
  transition: all .12s;
}
.tp-steps button.on { border-color: var(--pa); background: var(--pa); color: #fff; }
.tp-map { margin-top: 14px; border-radius: 12px; overflow: hidden; }
.tp-map iframe { width: 100%; height: 230px; border: 0; display: block; }
.tp-loc { margin-top: 14px; }
.tp-loc label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 700; }

/* ============ mini-tutorial ============ */
.tut-bg {
  position: fixed; inset: 0; background: rgba(20, 18, 34, .62);
  display: flex; align-items: center; justify-content: center; z-index: 900; padding: 18px;
}
.tut-box {
  background: #fff; border-radius: 18px; max-width: 430px; width: 100%;
  padding: 22px; border: 2px solid var(--pa);
}
.tut-box h3 { margin: 0 0 12px; font-size: 17px; }
.tut-steps { margin: 0 0 16px; padding-left: 18px; font-size: 13.5px; color: var(--ink); line-height: 1.55; display: grid; gap: 9px; }
.tut-steps i { background: #f6f5ff; padding: 1px 5px; border-radius: 5px; font-style: normal; font-family: ui-monospace, monospace; font-size: 12px; }
.tut-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tut-foot .primary { padding: 11px 18px; border-radius: 11px; border: none; font-weight: 800; font-size: 14px; background: var(--pa); color: #fff; cursor: pointer; }

/* ============ Entrada visível do dono (canto do cardápio) ============ */
.h-admin {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.45);
  color: var(--on); text-decoration: none; font-size: 12px; font-weight: 700;
  padding: 7px 12px; border-radius: 10px;
}
.h-admin:hover { background: rgba(255,255,255,.30); }
@media (max-width: 420px) { .h-admin-txt { display: none; } .h-admin { padding: 8px 10px; } }

/* ============ Carrinho retrátil: em telas pequenas a tela de início é o
   CARDÁPIO; o pedido vira um painel deslizante aberto pelo botão flutuante ============ */
@media (max-width: 859px) {
  .cart-fab {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--pa), var(--pd));
    color: var(--on); font-size: 14.5px; font-weight: 800;
    padding: 15px 18px; border-radius: 16px; box-shadow: 0 8px 24px rgba(20,20,35,.30);
  }
  .cart-fab:active { filter: brightness(.95); }
  .cart-fab .cf-badge {
    min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px;
    background: rgba(255,255,255,.25); border: 1px solid rgba(255,255,255,.45);
    display: flex; align-items: center; justify-content: center; font-size: 12px;
  }
  .cart-fab .cf-badge.hide { display: none; }

  .cart-panel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    max-height: 92vh; overflow-y: auto;
    border-radius: 22px 22px 0 0; box-shadow: 0 -8px 30px rgba(20,20,35,.22);
    transform: translateY(105%); transition: transform .28s ease;
    margin: 0;
  }
  .cart-panel.open { transform: translateY(0); }
  .cart-close {
    position: absolute; top: 14px; right: 70px; z-index: 2;
    border: none; background: color-mix(in srgb, var(--pa) 10%, white);
    color: var(--pd); font-size: 14px; font-weight: 800; cursor: pointer;
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
  }
}
@media (min-width: 860px) {
  .cart-close { display: none; }
}

