/* ============================================================
   Helph Menu — Design System
   Mobile-first · Cloudflare Pages
   ============================================================ */

/* ── 1. RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
a { text-decoration: none; color: inherit; }
h1,h2,h3,h4 { line-height: 1.2; }
ul { list-style: none; }

/* ── 2. DESIGN TOKENS ── */
:root {
  --primary:        #FF6B35;
  --primary-light:  rgba(255, 107, 53, 0.12);
  --primary-dark:   #e55a25;
  --bg:             #F7F8FA;
  --surface:        #FFFFFF;
  --text:           #1A1A2E;
  --text-2:         #6B7280;
  --text-3:         #9CA3AF;
  --border:         #E5E7EB;
  --border-2:       #F3F4F6;
  --success:        #10B981;
  --success-light:  rgba(16, 185, 129, 0.12);
  --error:          #EF4444;
  --error-light:    rgba(239, 68, 68, 0.1);
  --warning:        #F59E0B;
  --whatsapp:       #25D366;
  --whatsapp-dark:  #1da851;

  --radius-xs:  4px;
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --radius-full: 9999px;

  --shadow-xs:  0 1px 2px rgba(0,0,0,.06);
  --shadow-sm:  0 1px 4px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10), 0 1px 3px rgba(0,0,0,.06);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
  --shadow-xl:  0 20px 48px rgba(0,0,0,.16);

  --transition: 180ms ease;
  --transition-slow: 300ms ease;
}

/* ── 3. UTILITIES ── */
.hidden  { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── 4. BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius-md);
  font-weight: 600; font-size: .9rem; line-height: 1;
  transition: all var(--transition); white-space: nowrap; cursor: pointer;
}
.btn:active { transform: scale(.97); }
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline  { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--text-2); }
.btn-ghost    { background: transparent; color: var(--text-2); }
.btn-ghost:hover  { background: var(--border-2); color: var(--text); }
.btn-sm       { padding: 7px 12px; font-size: .8rem; border-radius: var(--radius-sm); }
.btn-full     { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-whatsapp {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 15px; border-radius: var(--radius-md);
  background: var(--whatsapp); color: #fff;
  font-weight: 700; font-size: 1rem;
  transition: background var(--transition);
}
.btn-whatsapp:hover { background: var(--whatsapp-dark); }
.btn-whatsapp:active { transform: scale(.98); }

/* ── 5. FORM ELEMENTS ── */
.form-group   { display: flex; flex-direction: column; gap: 5px; }
.form-label   { font-size: .85rem; font-weight: 600; color: var(--text); }
.form-label .required { color: var(--error); }
.form-hint    { font-size: .78rem; color: var(--text-3); }
.form-input {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-size: .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-input::placeholder { color: var(--text-3); }
.form-input.error { border-color: var(--error); }
textarea.form-input { resize: vertical; min-height: 72px; }
.form-select  { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.form-select-sm { font-size: .8rem; padding: 6px 28px 6px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background-color: var(--surface); color: var(--text); outline: none; }
.form-row     { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-checks { align-items: center; margin-top: 4px; }
.form-check   { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .9rem; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

/* Color picker */
.color-picker-wrap { display: flex; gap: 8px; align-items: center; }
.color-picker { width: 42px; height: 42px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 2px; cursor: pointer; background: none; }
.color-text   { flex: 1; font-family: monospace; }

/* ── 6. LOADING & STATES ── */
.loading-screen {
  position: fixed; inset: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.loading-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-screen {
  min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 2rem;
  text-align: center; gap: 12px;
}
.error-icon  { font-size: 3rem; }
.error-screen h2 { font-size: 1.3rem; color: var(--text); }
.error-screen p  { color: var(--text-2); max-width: 28ch; }

.list-loading { padding: 2rem; text-align: center; color: var(--text-3); font-size: .9rem; }
.list-empty   { padding: 3rem 2rem; text-align: center; color: var(--text-3); }
.list-empty-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.list-empty p { font-size: .9rem; }

/* ── 7. TOAST ── */
.toast {
  position: fixed; bottom: 88px; left: 50%; transform: translateX(-50%);
  z-index: 9000; padding: 11px 18px; border-radius: var(--radius-full);
  font-size: .875rem; font-weight: 500; white-space: nowrap;
  box-shadow: var(--shadow-lg); pointer-events: none;
  animation: toastIn .25s ease;
}
.toast.success { background: var(--text); color: #fff; }
.toast.error   { background: var(--error); color: #fff; }
@keyframes toastIn { from { opacity:0; transform: translateX(-50%) translateY(10px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }

/* ── 8. MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0,0,0,.45); backdrop-filter: blur(2px);
  animation: fadeIn var(--transition);
}
.modal {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 801;
  background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  max-height: 92svh; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom);
  animation: slideUp var(--transition-slow);
}
@media (min-width: 600px) {
  .modal {
    top: 50%; left: 50%; right: auto; bottom: auto;
    transform: translate(-50%, -50%);
    width: 480px; max-height: 88vh;
    border-radius: var(--radius-xl);
    animation: fadeIn var(--transition);
  }
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 12px; border-bottom: 1px solid var(--border-2); }
.modal-title  { font-size: 1rem; font-weight: 700; }
.modal-close  { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-full); color: var(--text-2); transition: background var(--transition); }
.modal-close:hover { background: var(--border-2); }
.modal-body   { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer { display: flex; gap: 10px; padding: 12px 20px 20px; border-top: 1px solid var(--border-2); }
.modal-footer .btn { flex: 1; }

/* Image preview */
.img-preview-wrap { margin-top: 8px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); max-height: 160px; }
.img-url-row { display: flex; gap: 8px; align-items: stretch; }
.img-url-row .form-input { flex: 1; min-width: 0; }
.btn-upload { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer; font-size: 13px; }
.upload-progress { margin-top: 6px; font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.upload-progress::before { content: ''; display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.img-preview { width: 100%; height: 160px; object-fit: cover; }

/* ── 9. MENU PAGE ── */
.menu-page { background: var(--bg); min-height: 100svh; padding-bottom: 100px; }

/* Header do cardápio */
.menu-header {
  background: var(--surface);
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border-2);
}
.menu-header-inner { display: flex; align-items: center; gap: 14px; }
.business-logo-wrap { flex-shrink: 0; }
.business-logo-wrap img,
.business-initial {
  width: 60px; height: 60px; border-radius: var(--radius-md);
  object-fit: cover; box-shadow: var(--shadow-sm);
}
.business-initial {
  display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff;
  font-size: 1.5rem; font-weight: 800;
}
.business-name { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.business-desc { font-size: .82rem; color: var(--text-2); margin-top: 3px; line-height: 1.4; }

/* Navegação de categorias */
.category-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface); border-bottom: 1px solid var(--border-2);
  box-shadow: var(--shadow-xs);
}
.category-nav-inner {
  display: flex; gap: 6px; padding: 10px 14px;
  overflow-x: auto; scrollbar-width: none;
}
.category-nav-inner::-webkit-scrollbar { display: none; }
.category-pill {
  flex-shrink: 0; padding: 6px 14px; border-radius: var(--radius-full);
  font-size: .82rem; font-weight: 600; color: var(--text-2);
  background: var(--border-2); border: 1.5px solid transparent;
  transition: all var(--transition); cursor: pointer; white-space: nowrap;
}
.category-pill:hover  { color: var(--primary); border-color: var(--primary-light); background: var(--primary-light); }
.category-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Seção de categoria */
.products-section { padding: 20px 14px 4px; }
.section-title {
  font-size: 1rem; font-weight: 800; color: var(--text);
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.section-title-icon { font-size: 1rem; }

/* Card de produto */
.products-list { display: flex; flex-direction: column; gap: 2px; }
.product-card {
  display: flex; align-items: stretch; gap: 0;
  background: var(--surface); border-radius: var(--radius-md);
  overflow: hidden; cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  border: 1px solid var(--border-2);
  margin-bottom: 8px;
}
.product-card:active { transform: scale(.99); }
.product-card:hover  { box-shadow: var(--shadow-md); }
.product-card.featured { border-color: var(--primary-light); }

.product-info { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; min-width: 0; }
.product-badges { display: flex; gap: 4px; margin-bottom: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: var(--radius-full);
  font-size: .7rem; font-weight: 700; letter-spacing: .02em;
}
.badge-featured { background: var(--primary-light); color: var(--primary); }
.product-name { font-size: .95rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.product-desc {
  font-size: .8rem; color: var(--text-2); margin-top: 4px;
  line-height: 1.4; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.product-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 8px; }
.product-price { font-size: 1rem; font-weight: 800; color: var(--text); }

/* Botão +/- do produto */
.product-qty-ctrl { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.qty-btn {
  width: 30px; height: 30px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; line-height: 1;
  transition: all var(--transition);
}
.qty-btn-add  { background: var(--primary); color: #fff; }
.qty-btn-add:hover  { background: var(--primary-dark); }
.qty-btn-sub  { background: var(--border-2); color: var(--text-2); }
.qty-btn-sub:hover  { background: var(--border); }
.qty-value    { font-size: .9rem; font-weight: 700; min-width: 20px; text-align: center; }

/* Imagem do produto */
.product-image-wrap { flex-shrink: 0; width: 108px; position: relative; }
.product-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-image-placeholder { width: 100%; height: 100%; background: var(--border-2); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }

/* Featured (destaque) no topo */
.featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.featured-card {
  background: var(--surface); border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid var(--primary-light); cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.featured-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.featured-card img { width: 100%; height: 110px; object-fit: cover; }
.featured-card-info { padding: 10px; }
.featured-card-name { font-size: .85rem; font-weight: 700; }
.featured-card-price { font-size: .85rem; font-weight: 700; color: var(--primary); margin-top: 2px; }

/* Cart FAB */
.cart-fab {
  position: fixed; bottom: 20px; right: 16px; z-index: 500;
  width: 56px; height: 56px; border-radius: var(--radius-full);
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(255, 107, 53, .45);
  transition: all var(--transition);
}
.cart-fab:hover  { background: var(--primary-dark); transform: scale(1.05); }
.cart-fab:active { transform: scale(.95); }
.cart-fab-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--text); color: #fff;
  border-radius: var(--radius-full); border: 2px solid white;
  font-size: .7rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* Cart Overlay */
.cart-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,.4); backdrop-filter: blur(2px);
  animation: fadeIn var(--transition);
}

/* Cart Drawer */
.cart-drawer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 700;
  background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  max-height: 85svh; overflow-y: auto;
  padding-bottom: calc(env(safe-area-inset-bottom) + 16px);
  animation: slideUp var(--transition-slow);
  box-shadow: var(--shadow-xl);
}
@media (min-width: 600px) {
  .cart-drawer { max-width: 440px; left: 50%; right: auto; transform: translateX(-50%); border-radius: var(--radius-xl); bottom: 24px; max-height: 80vh; animation: fadeIn var(--transition); }
}
.cart-handle {
  width: 36px; height: 4px; background: var(--border); border-radius: 2px;
  margin: 12px auto 0;
}
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 10px; border-bottom: 1px solid var(--border-2);
}
.cart-title  { font-size: 1.05rem; font-weight: 800; }
.cart-close  { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-full); color: var(--text-2); transition: background var(--transition); }
.cart-close:hover { background: var(--border-2); }

.cart-body   { padding: 0 16px; }
.cart-empty  { padding: 3rem 0; text-align: center; }
.cart-empty-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.cart-empty p { color: var(--text-2); font-size: .9rem; }

.cart-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--border-2);
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name  { font-size: .9rem; font-weight: 600; }
.cart-item-price { font-size: .82rem; color: var(--text-2); margin-top: 2px; }
.cart-item-ctrl  { display: flex; align-items: center; gap: 8px; }
.cart-item-del   { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-full); color: var(--text-3); transition: color var(--transition), background var(--transition); }
.cart-item-del:hover { color: var(--error); background: var(--error-light); }

.cart-footer { padding: 14px 16px 4px; display: flex; flex-direction: column; gap: 12px; }
.cart-obs-label { font-size: .82rem; font-weight: 600; color: var(--text-2); margin-bottom: 4px; display: block; }
.cart-obs {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: .875rem; resize: none; outline: none;
  transition: border-color var(--transition);
}
.cart-obs:focus { border-color: var(--primary); }
.cart-total-row  { display: flex; justify-content: space-between; align-items: center; }
.cart-total-label { font-weight: 700; font-size: .9rem; }
.cart-total-value { font-weight: 800; font-size: 1.2rem; color: var(--text); }
.cart-disclaimer  { text-align: center; font-size: .75rem; color: var(--text-3); }

/* Footer do cardápio */
.menu-footer {
  padding: 20px 16px; margin-top: 8px;
  background: var(--surface); border-top: 1px solid var(--border-2);
  display: flex; flex-direction: column; gap: 10px;
}
.footer-info { display: flex; align-items: flex-start; gap: 8px; font-size: .85rem; color: var(--text-2); }
.footer-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.footer-social { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-social a {
  display: flex; align-items: center; gap: 5px;
  font-size: .82rem; color: var(--text-2); padding: 5px 10px;
  border-radius: var(--radius-full); border: 1px solid var(--border);
  transition: all var(--transition);
}
.footer-social a:hover { border-color: var(--primary); color: var(--primary); }
.footer-legal { font-size: .75rem; color: var(--text-3); display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.footer-legal a:hover { color: var(--text-2); }

/* ── 10. DARK MODE ── */
html[data-theme="dark"] {
  --bg:          #111318;
  --surface:     #1C1F2E;
  --text:        #EFF0F6;
  --text-2:      #9AA5B4;
  --text-3:      #636D7B;
  --border:      #2A2E3E;
  --border-2:    #222534;
  --primary-light: rgba(255, 107, 53, .18);
  --shadow-xs:   0 1px 3px rgba(0,0,0,.4);
  --shadow-sm:   0 2px 6px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04);
  --shadow-md:   0 4px 14px rgba(0,0,0,.55);
  --shadow-lg:   0 8px 28px rgba(0,0,0,.65);
  --shadow-xl:   0 20px 50px rgba(0,0,0,.75);
}
/* Textarea precisa de background explícito no dark */
.cart-obs { background: var(--surface); color: var(--text); }

/* Toast invertido no dark (bg claro não funciona com text branco) */
html[data-theme="dark"] .toast.success { background: #DEE1EF; color: #111318; }

/* Badge do FAB usa --text como bg; no dark fica claro demais */
html[data-theme="dark"] .cart-fab-badge { background: #111318; border-color: var(--surface); }

/* Seta do select no dark */
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .form-select-sm {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239AA5B4' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

/* Botão de toggle de tema */
.theme-toggle {
  margin-left: auto;
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: var(--radius-full);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.theme-toggle:hover { background: var(--border-2); color: var(--text); }
/* Sol visível só no dark, lua visível só no light */
.icon-theme-sun  { display: none; }
.icon-theme-moon { display: block; }
html[data-theme="dark"] .icon-theme-sun  { display: block; }
html[data-theme="dark"] .icon-theme-moon { display: none; }

/* ── 11. ADMIN PAGE ── */
.admin-page { background: var(--bg); min-height: 100svh; }

/* Header admin */
.admin-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--surface); border-bottom: 1px solid var(--border-2);
  box-shadow: var(--shadow-xs);
}
.admin-header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; gap: 12px; }
.admin-header-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-header-brand > div { min-width: 0; }
.admin-header-name  { display: block; font-weight: 800; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.admin-header-label { display: block; font-size: .72rem; color: var(--text-3); font-weight: 500; }
.admin-header-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Tabs de navegação */
.admin-tabs {
  display: flex; background: var(--surface);
  border-bottom: 1px solid var(--border-2);
  position: sticky; top: 61px; z-index: 199;
}
.admin-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 8px; font-size: .8rem; font-weight: 600; color: var(--text-2);
  border-bottom: 2px solid transparent;
  transition: all var(--transition); cursor: pointer;
}
.admin-tab:hover  { color: var(--text); background: var(--border-2); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Conteúdo das abas */
.admin-content { padding: 0 0 80px; }
.tab-panel { padding: 0; }

.tab-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 12px; gap: 10px; flex-wrap: wrap;
}
.tab-topbar-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.tab-title { font-size: 1.05rem; font-weight: 800; flex-shrink: 0; }

/* Listas admin */
.admin-list { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.admin-list-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border-radius: var(--radius-md);
  padding: 12px; border: 1px solid var(--border-2);
  transition: box-shadow var(--transition);
}
.admin-list-item:hover { box-shadow: var(--shadow-sm); }

/* Item de produto na lista admin */
.prod-img {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0; background: var(--border-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; overflow: hidden;
}
.prod-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-info { flex: 1; min-width: 0; }
.prod-name  { font-size: .9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-meta  { font-size: .78rem; color: var(--text-2); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; }
.prod-meta-cat { color: var(--text-3); }
.prod-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Toggle ativo/inativo */
.toggle-wrap { display: flex; align-items: center; gap: 0; }
.toggle {
  position: relative; width: 38px; height: 22px;
  background: var(--border); border-radius: var(--radius-full);
  cursor: pointer; transition: background var(--transition);
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-knob {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; background: #fff; border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle input:checked ~ .toggle-knob { transform: translateX(16px); }
.toggle:has(input:checked) { background: var(--success); }

/* Ação de ícone */
.icon-btn {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); color: var(--text-2);
  transition: all var(--transition);
}
.icon-btn:hover     { background: var(--border-2); color: var(--text); }
.icon-btn.danger:hover { background: var(--error-light); color: var(--error); }

/* Item de categoria na lista admin */
.cat-info   { flex: 1; min-width: 0; }
.cat-name   { font-size: .9rem; font-weight: 700; }
.cat-count  { font-size: .78rem; color: var(--text-3); margin-top: 2px; }
.cat-order  { display: flex; flex-direction: column; gap: 2px; }
.order-btn  { width: 22px; height: 18px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-xs); color: var(--text-3); transition: all var(--transition); }
.order-btn:hover { background: var(--border-2); color: var(--text); }

/* Settings */
.settings-form { padding: 16px; display: flex; flex-direction: column; gap: 0; }
.settings-section { background: var(--surface); border-radius: var(--radius-md); padding: 16px; margin-bottom: 12px; border: 1px solid var(--border-2); display: flex; flex-direction: column; gap: 14px; }
.settings-section-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 2px; }
.settings-actions { padding-top: 4px; display: flex; flex-direction: column; gap: 10px; }
.save-feedback { padding: 10px 14px; border-radius: var(--radius-sm); font-size: .875rem; text-align: center; }
.save-feedback.success { background: var(--success-light); color: var(--success); }
.save-feedback.error   { background: var(--error-light); color: var(--error); }

/* ── 11. LOGIN ── */
.login-screen {
  min-height: 100svh; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; background: var(--bg);
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 32px 28px; box-shadow: var(--shadow-lg);
}
.login-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.1rem; font-weight: 800; margin-bottom: 20px;
  color: var(--text);
}
.login-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 4px; }
.login-slug  { font-size: .85rem; color: var(--text-2); margin-bottom: 24px; }
.login-form  { display: flex; flex-direction: column; gap: 16px; }
.login-error {
  padding: 10px 14px; background: var(--error-light); color: var(--error);
  border-radius: var(--radius-sm); font-size: .875rem;
}
.login-footer { text-align: center; margin-top: 18px; font-size: .82rem; }
.link-subtle { color: var(--text-3); transition: color var(--transition); }
.link-subtle:hover { color: var(--text-2); }

/* Campo de senha com botão mostrar/ocultar */
.input-password-wrap { position: relative; }
.input-password-wrap .form-input { padding-right: 42px; }
.btn-show-password {
  position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); color: var(--text-3);
  transition: color var(--transition), background var(--transition);
}
.btn-show-password:hover { color: var(--text-2); background: var(--border-2); }

/* Toggle de tema no login card */
.login-theme-toggle {
  display: flex; align-items: center; justify-content: center;
  margin: 14px auto 0; width: 36px; height: 36px;
  border-radius: var(--radius-full);
  color: var(--text-3);
  transition: color var(--transition), background var(--transition);
}
.login-theme-toggle:hover { color: var(--text-2); background: var(--border-2); }

/* ── 12. NOVOS ELEMENTOS ── */

/* Banner de promoção */
.promo-banner {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; background: var(--primary); color: #fff;
  font-size: .85rem; font-weight: 600; text-align: center;
}
.promo-banner-icon { flex-shrink: 0; font-size: 1rem; }

/* Produto esgotado */
.product-card.oos { opacity: .65; }
.product-card.oos .product-image-wrap { filter: grayscale(.6); }
.oos-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: .75rem; font-weight: 700;
  background: var(--error-light); color: var(--error);
}
.featured-card.oos { opacity: .65; filter: grayscale(.4); }
.oos-label { font-size: .72rem; font-weight: 700; color: var(--error); margin-top: 2px; }

/* Tempo de preparo */
.product-price-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prep-badge {
  font-size: .72rem; font-weight: 600; color: var(--text-3);
  background: var(--border-2); border-radius: var(--radius-full);
  padding: 2px 7px; white-space: nowrap;
}

/* Endereço clicável no footer */
.footer-address-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-address-link:hover { color: var(--primary); }
.footer-wa-link { color: var(--whatsapp); font-weight: 600; }
.footer-wa-link:hover { color: var(--whatsapp-dark); }

/* Aviso pedido mínimo no carrinho */
.cart-min-order-warn {
  font-size: .8rem; color: var(--error); font-weight: 600;
  text-align: center; padding: 6px 0 2px;
}

/* WhatsApp input com prefixo +55 */
.whatsapp-input-wrap { display: flex; align-items: center; gap: 0; }
.whatsapp-prefix {
  flex-shrink: 0; padding: 10px 10px; font-size: .85rem; font-weight: 700;
  background: var(--border-2); color: var(--text-2);
  border: 1.5px solid var(--border); border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  line-height: 1.2; white-space: nowrap;
}
.whatsapp-input-wrap .form-input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* CEP */
.cep-wrap { display: flex; gap: 8px; align-items: center; }
.cep-wrap .form-input { flex: 1; }
.btn-cep { white-space: nowrap; flex-shrink: 0; }

/* Builder de horários */
.hours-days-builder { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.hours-day-row {
  display: grid; grid-template-columns: 70px 1fr auto 1fr;
  gap: 6px; align-items: center;
}
.hours-day-label {
  display: flex; align-items: center; gap: 6px;
  font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.hours-day-label input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--primary); }
.hours-time { padding: 8px 10px; font-size: .82rem; text-align: center; }
.hours-time:disabled { opacity: .4; cursor: not-allowed; }
.hours-sep { font-size: .8rem; color: var(--text-3); text-align: center; white-space: nowrap; }

/* Prep time no modal */
.prep-time-wrap { display: flex; align-items: center; gap: 0; }
.prep-time-wrap .form-input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.prep-time-unit {
  padding: 10px 10px; font-size: .82rem; font-weight: 600; color: var(--text-2);
  background: var(--border-2); border: 1.5px solid var(--border); border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; white-space: nowrap;
}

/* Badges na lista de produtos (admin) */
.prod-badge {
  display: inline-flex; align-items: center;
  padding: 1px 6px; border-radius: var(--radius-full);
  font-size: .7rem; font-weight: 700; margin-left: 4px;
}
.badge-feat { background: rgba(255,193,7,.15); color: #b8860b; }
.badge-oos  { background: var(--error-light); color: var(--error); }
.badge-time { background: var(--border-2); color: var(--text-3); }

/* QR Code */
.qr-section { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.qr-img-wrap {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px; background: #fff; flex-shrink: 0;
}
.qr-img { width: 140px; height: 140px; display: block; }
.qr-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.qr-url  { font-size: .78rem; color: var(--text-3); word-break: break-all; }

/* ── 13. LEGAL PAGES ── */
.legal-page { background: var(--bg); min-height: 100svh; }
.legal-header { background: var(--surface); padding: 14px 20px; border-bottom: 1px solid var(--border-2); }
.legal-logo { display: inline-flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 800; }
.legal-content { max-width: 680px; margin: 0 auto; padding: 32px 20px; }
.legal-content h1 { font-size: 1.6rem; font-weight: 900; margin-bottom: 4px; }
.legal-updated { font-size: .82rem; color: var(--text-3); margin-bottom: 28px; }
.legal-content h2 { font-size: 1.05rem; font-weight: 700; margin-top: 24px; margin-bottom: 8px; }
.legal-content h3 { font-size: .95rem; font-weight: 600; margin-top: 14px; margin-bottom: 6px; }
.legal-content p, .legal-content li { font-size: .9rem; color: var(--text-2); line-height: 1.7; }
.legal-content ul { padding-left: 18px; list-style: disc; display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.legal-content a { color: var(--primary); }
.legal-content code { font-family: monospace; background: var(--border-2); padding: 1px 5px; border-radius: 3px; font-size: .85em; }
.legal-footer { text-align: center; padding: 20px; font-size: .8rem; color: var(--text-3); border-top: 1px solid var(--border-2); }
.legal-footer a:hover { color: var(--text-2); }

/* ── "Em Construção" / Coming Soon ── */
.coming-soon-screen {
  min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 32px 24px;
  text-align: center; gap: 12px;
}
.coming-soon-logo {
  width: 72px; height: 72px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 32px; font-weight: 800; margin-bottom: 4px;
}
.coming-soon-name { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.coming-soon-icon { font-size: 48px; line-height: 1; margin: 8px 0; }
.coming-soon-title { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.coming-soon-sub { font-size: .9rem; color: var(--text-2); max-width: 320px; line-height: 1.6; }
.coming-soon-wa {
  display: inline-flex; align-items: center; gap: 8px;
  background: #25D366; color: #fff; border-radius: 12px;
  padding: 12px 22px; font-size: 15px; font-weight: 700; margin-top: 8px;
  transition: opacity .15s;
}
.coming-soon-wa:hover { opacity: .88; }
.coming-soon-powered { font-size: .78rem; color: var(--text-3); margin-top: 12px; }
.coming-soon-powered a { color: var(--primary); }

/* ── Onboarding Wizard ── */
.onboarding-screen {
  min-height: 100svh; display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 24px 16px;
}
.onboarding-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 32px 24px; width: 100%; max-width: 520px;
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
}
.ob-step { display: flex; flex-direction: column; gap: 20px; }
.ob-header { text-align: center; }
.ob-logo { display: flex; justify-content: center; margin-bottom: 12px; }
.ob-title { font-size: 1.4rem; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.ob-sub { font-size: .9rem; color: var(--text-2); line-height: 1.6; }
.ob-steps-indicator { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.ob-step-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background .2s; }
.ob-step-dot.active { background: var(--primary); }

.ob-type-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px;
}
.ob-type-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 6px; border-radius: 14px; border: 2px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text); background: var(--bg);
  text-align: center; word-break: break-word; min-height: 90px;
  transition: border-color .15s, background .15s; cursor: pointer;
}
.ob-type-card:hover { border-color: var(--primary); background: var(--primary-light); }
.ob-type-card.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.ob-type-card > :first-child { font-size: 28px; line-height: 1; }

.ob-color-grid { display: flex; gap: 10px; flex-wrap: wrap; }

/* Badge aberto/fechado */
.open-status-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; margin-top: 4px; }
.open-status-badge.open   { background: #d1fae5; color: #065f46; }
.open-status-badge.closed { background: #fee2e2; color: #991b1b; }
[data-theme="dark"] .open-status-badge.open   { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .open-status-badge.closed { background: #7f1d1d; color: #fca5a5; }
.ob-color-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent;
  cursor: pointer; transition: transform .15s, border-color .15s;
}
.ob-color-btn:hover { transform: scale(1.12); }
.ob-color-btn.selected { border-color: var(--text); transform: scale(1.12); }

.ob-step-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.ob-step-actions .btn-ghost { margin-right: auto; }
.ob-error { color: var(--error); font-size: .85rem; background: var(--error-light); border-radius: var(--radius-sm); padding: 8px 12px; }
.btn-ghost { background: none; color: var(--text-2); border: none; font-size: .9rem; padding: 8px 12px; border-radius: var(--radius-sm); }
.btn-ghost:hover { color: var(--text); background: var(--border-2); }

/* ── 13b. MODAL DE PEDIDO (cliente) ── */
.order-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 300;
  animation: fadeIn .18s ease;
}
.order-modal {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 301;
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: slideUp .22s ease;
}
@media (min-width: 600px) {
  .order-modal { max-width: 480px; margin: auto; border-radius: var(--radius-xl); top: 50%; bottom: auto; left: 50%; transform: translate(-50%,-50%); }
}
.order-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.order-modal-title { font-size: 1.05rem; font-weight: 700; }
.order-modal-body { padding: 16px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.order-label { font-size: .82rem; font-weight: 600; color: var(--text-2); display: block; margin-bottom: 4px; }
.order-label .required { color: var(--error); }
.order-input { width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: .95rem; }
.order-input:focus { outline: none; border-color: var(--primary); }
.order-textarea { resize: none; }
.order-payment-opts { display: flex; gap: 10px; flex-wrap: wrap; }
.order-payment-opt { display: flex; align-items: center; gap: 6px; cursor: pointer; background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 8px 14px; font-size: .9rem; transition: border-color .15s; }
.order-payment-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.order-payment-opt input { display: none; }
.order-modal-footer { padding: 12px 16px 20px; flex-shrink: 0; }

/* ── 13c. TELA DE STATUS DO PEDIDO ── */
.order-status-screen {
  position: fixed; inset: 0; background: var(--bg); z-index: 400;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.order-status-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  max-width: 400px; width: 100%;
  text-align: center;
  box-shadow: var(--shadow-xl);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.order-status-icon { font-size: 3rem; animation: pulse 1.8s infinite; }
.order-status-id { font-size: .78rem; font-weight: 700; color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; }
.order-status-title { font-size: 1.2rem; font-weight: 700; }
.order-status-sub { font-size: .9rem; color: var(--text-2); line-height: 1.5; }

.order-status-steps {
  display: flex; align-items: center; gap: 0;
  width: 100%; justify-content: center;
  margin: 8px 0;
}
.order-step { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 0 0 auto; }
.order-step-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--border);
  transition: background .3s, transform .3s;
}
.order-step.active .order-step-dot { background: var(--primary); transform: scale(1.2); }
.order-step.done   .order-step-dot { background: var(--success); }
.order-step.cancelled .order-step-dot { background: var(--error); }
.order-step-label { font-size: .72rem; color: var(--text-3); white-space: nowrap; }
.order-step.active .order-step-label { color: var(--primary); font-weight: 600; }
.order-step.done   .order-step-label { color: var(--success); }
.order-step-line { flex: 1; height: 2px; background: var(--border); min-width: 24px; margin: 0 4px; margin-bottom: 20px; }
.order-step.done + .order-step-line { background: var(--success); }

.order-status-wa-btn { margin-top: 8px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; }
.order-status-new-btn { width: 100%; padding: 11px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); font-size: .95rem; font-weight: 600; margin-top: 4px; }
.order-status-new-btn:hover { background: var(--bg); }

/* ── 13d. PEDIDOS ADMIN ── */
.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 10px;
}
.order-card-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.order-card-id { font-weight: 700; font-size: .85rem; font-family: monospace; }
.order-card-time { font-size: .75rem; color: var(--text-3); margin-left: auto; }
.order-status-badge { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-full); }
.status-pending   { background: rgba(245,158,11,.15); color: #b45309; }
.status-confirmed { background: var(--success-light); color: #065f46; }
.status-ready     { background: rgba(59,130,246,.12); color: #1d4ed8; }
.status-cancelled { background: var(--error-light); color: var(--error); }
.order-card-body { padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.order-card-customer { display: flex; flex-direction: column; gap: 2px; }
.order-card-customer strong { font-size: .95rem; }
.order-meta { font-size: .8rem; color: var(--text-2); }
.order-card-items { font-size: .82rem; color: var(--text-2); margin-top: 4px; }
.order-obs { font-size: .8rem; color: var(--text-2); font-style: italic; background: var(--bg); border-radius: var(--radius-xs); padding: 4px 8px; }
.order-card-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 8px; }
.order-total { font-size: 1rem; color: var(--text); }
.order-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.order-wa-btn { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; }

/* Telegram status feedback */
.telegram-status { padding: 8px 12px; border-radius: var(--radius-sm); font-size: .85rem; margin-top: 8px; }
.telegram-status.status-ok  { background: var(--success-light); color: #065f46; }
.telegram-status.status-err { background: var(--error-light); color: var(--error); }

/* Tab badge */
.tab-badge {
  background: var(--error);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 5px;
  margin-left: 2px;
  line-height: 1.4;
}

/* ── 13. ANIMATIONS ── */
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp  { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes pulse    { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ── 14. RESPONSIVE — DESKTOP ── */
@media (min-width: 768px) {
  .menu-page { max-width: 600px; margin: 0 auto; padding-bottom: 80px; }
  .menu-page .menu-header { border-radius: 0; }
  .cart-fab { right: calc(50% - 300px + 20px); }

  .featured-grid { grid-template-columns: repeat(3, 1fr); }

  .admin-content { max-width: 720px; margin: 0 auto; }
  .settings-form { max-width: 600px; margin: 0 auto; }
  .admin-tabs { max-width: 720px; margin: 0 auto; position: static; }
  .admin-header-name { max-width: 260px; }
}
