:root {
  --brand: #e63946;
  --brand-dark: #c1121f;
  --ink: #1d2433;
  --muted: #6b7280;
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e6e8eb;
  --ok: #2a9d8f;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(0,0,0,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; }
/* Botões e campos não herdam a fonte da página por padrão no navegador (usam a fonte do sistema).
 * Isso fazia "Nova categoria", "Pausar", "Aplicar" etc. aparecerem com outra fonte. */
button, input, select, textarea, optgroup { font-family: inherit; }

/* Logo GrowFood (/img/growfood-logo.svg) usada como máscara: pinta com a cor do texto (currentColor),
 * então segue a cor de quem a contém (ex.: a cor da loja no painel Premium). */
.gf-logo {
  display: inline-block; flex: none; width: 1em; height: 1em; vertical-align: middle;
  background-color: currentColor;
  -webkit-mask: url('/img/growfood-logo.svg') center / contain no-repeat;
  mask: url('/img/growfood-logo.svg') center / contain no-repeat;
}
/* Logo com o nome (símbolo + "GrowFood"): substitui o par logo + texto. Altura em em,
 * então acompanha o font-size de quem a contém; a largura sai da proporção do SVG. */
.gf-wordmark {
  display: inline-block; flex: none; height: 1.5em; aspect-ratio: 2422 / 702; vertical-align: middle;
  background-color: currentColor;
  -webkit-mask: url('/img/growfood-wordmark.svg') left center / contain no-repeat;
  mask: url('/img/growfood-wordmark.svg') left center / contain no-repeat;
}
/* "GrowSoft" em contornos (fonte Conthrax convertida em SVG; a fonte não fica no projeto).
 * Pinta com currentColor, então a cor vem do CSS de quem usa. */
.gs-wordmark {
  display: inline-block; flex: none; height: 1em; aspect-ratio: 608 / 99; vertical-align: middle;
  background-color: currentColor;
  -webkit-mask: url('/img/growsoft-wordmark.svg') left center / contain no-repeat;
  mask: url('/img/growsoft-wordmark.svg') left center / contain no-repeat;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff; border: none; border-radius: 10px;
  padding: 11px 18px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .15s ease;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.secondary:hover { background: #f0f1f3; }
.btn.wa { background: #25d366; }
.btn.wa:hover { background: #1da851; }
.btn.block { width: 100%; }
.btn.sm { padding: 6px 10px; font-size: 13px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff;
}
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }
.muted { color: var(--muted); }
.error { color: var(--brand-dark); font-size: 13px; margin-top: 8px; }

/* Erro do campo (forms.js), no lugar do balão nativo do navegador */
.gf-fielderr {
  display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 12.5px; font-weight: 600; line-height: 1.35; color: #c62828;
}
.gf-fielderr::before {
  content: '!'; flex: none; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #fff; background: #dc2626;
}
[data-theme="dark"] .gf-fielderr { color: #fca5a5; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #dc2626 !important; box-shadow: 0 0 0 4px rgb(220 38 38 / 12%) !important; }
@media (prefers-reduced-motion: no-preference) {
  .gf-fielderr { animation: gf-err-in 240ms cubic-bezier(.16, 1, .3, 1); }
  input[aria-invalid="true"] { animation: gf-shake 320ms cubic-bezier(.16, 1, .3, 1); }
}
@keyframes gf-err-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes gf-shake { 25% { transform: translateX(-4px); } 60% { transform: translateX(3px); } }

/* Busca: sem o "x" nativo do navegador (as telas têm seu próprio jeito de limpar) */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; background: #eef1f4;
}
.badge.free { background: #eef2ff; color: #4338ca; }
.badge.pro { background: #fff7ed; color: #c2410c; }
.tag-open { color: var(--ok); font-weight: 700; }
.tag-closed { color: var(--brand-dark); font-weight: 700; }

/* ---------- Landing ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.logo { font-size: 22px; font-weight: 700; color: var(--brand); }
.hero { text-align: center; padding: 56px 0 32px; }
.hero h1 { font-size: 40px; margin: 0 0 12px; line-height: 1.15; }
.hero p { font-size: 18px; color: var(--muted); max-width: 620px; margin: 0 auto 24px; }
.features { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 16px; margin: 32px 0; }
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; font-size: 14px; color: var(--muted); }
.pricing { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 20px; margin: 24px 0 48px; }
.plan { text-align: center; }
.plan .price { font-size: 34px; font-weight: 700; margin: 8px 0; }
.plan ul { list-style: none; padding: 0; text-align: left; margin: 16px 0; }
.plan li { padding: 6px 0; font-size: 14px; border-bottom: 1px dashed var(--line); }
.plan li.no { color: #b0b4bb; text-decoration: line-through; }

/* ---------- Modal ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: none; align-items: center; justify-content: center; padding: 16px; z-index: 50;
}
.overlay.show { display: flex; }
.modal { background: #fff; border-radius: var(--radius); max-width: 460px; width: 100%; padding: 24px; max-height: 90vh; overflow: auto; }
.modal h2 { margin-top: 0; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs button { flex: 1; background: #f0f1f3; border: none; padding: 10px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.tabs button.active { background: var(--brand); color: #fff; }

/* ---------- App (painel) ---------- */
.app-header {
  background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 12px 20px;
}
.app-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.app-nav button {
  background: none; border: none; padding: 8px 14px; border-radius: 8px;
  cursor: pointer; font-weight: 600; color: var(--muted);
}
.app-nav button.active { background: var(--brand); color: #fff; }
.app-nav button.locked { opacity: .7; }
.view { display: none; padding: 24px 0; }
.view.active { display: block; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background:#fff;
}
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 16px; }
.stat { text-align: center; }
.stat .num { font-size: 30px; font-weight: 700; color: var(--brand); }
.stat .lbl { font-size: 13px; color: var(--muted); }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); font-size: 14px; }

.order-card { border-left: 4px solid var(--brand); }
.status-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.status-novo { background:#eef2ff; color:#4338ca; }
.status-preparando { background:#fef9c3; color:#a16207; }
.status-pronto { background:#dcfce7; color:#166534; }
.status-entregue { background:#e0e7ff; color:#3730a3; }
.status-cancelado { background:#fee2e2; color:#991b1b; }

/* ---------- Cardápio público ---------- */
.menu-head { background: var(--brand); color: #fff; padding: 28px 0; }
.menu-head h1 { margin: 0 0 4px; }
.cat-title { font-size: 20px; margin: 24px 0 12px; border-bottom: 2px solid var(--line); padding-bottom: 6px; }
.prod {
  display: flex; gap: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; margin-bottom: 10px; cursor: pointer;
}
.prod:hover { border-color: var(--brand); }
.prod .thumb { width: 74px; height: 74px; border-radius: 8px; object-fit: cover; background: #f0f1f3; flex: none; }
.prod .price { color: var(--brand); font-weight: 700; }
.cart-bar {
  position: fixed; bottom: 0; left: 0; right: 0; background: var(--brand);
  color: #fff; padding: 14px 16px; display: none; align-items: center;
  justify-content: space-between; cursor: pointer; z-index: 40;
}
.cart-bar.show { display: flex; }
.qty { display: flex; align-items: center; gap: 10px; }
.qty button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 18px; cursor: pointer; }
.closed-banner { background: #fee2e2; color: #991b1b; text-align: center; padding: 10px; font-weight: 600; }
.hidden { display: none !important; }
