/* HUNGEXPO AV SZABDUL – közös kaja. Tervezési elvek és tokenek: DESIGN.md
   Grafit „keverőpult” fejléc, meleg semleges tartalom, egyetlen narancs kiemelő szín,
   LED-szerű állapotjelzők, táblázatos számok. Mobil-első, külső betűtípus nélkül. */
:root {
  /* felületek */
  --bg: #f3f2ef;
  --surface: #ffffff;
  --surface-2: #f8f7f5;
  --sunken: #ecebe7;
  --line: #e3e1dc;
  --line-strong: #cfccc5;
  /* szöveg */
  --ink: #17191c;
  --ink-2: #3a3d42;
  --muted: #63666b;
  /* fejléc (grafit) */
  --head: #16181b;
  --head-2: #202328;
  --head-line: #2e3137;
  --head-ink: #f2f1ee;
  --head-muted: #a4a7ad;
  /* kiemelő szín */
  --accent: #c4401a;
  --accent-hover: #a93512;
  --accent-ink: #b83c12;
  --accent-bright: #f07a4f;
  --accent-soft: #fbede7;
  --accent-line: #f0c6b5;
  /* állapotok (szöveg / LED / háttér) */
  --ok: #1f7a45;
  --ok-led: #22a35a;
  --ok-bg: #e7f4ec;
  --ok-line: #a8d5b8;
  --warn: #8a5a00;
  --warn-led: #e0a100;
  --warn-bg: #fbf1d9;
  --warn-line: #e5c26a;
  --bad: #b42318;
  --bad-led: #e5483b;
  --bad-bg: #fce9e7;
  --bad-line: #eba59d;
  --info: #1d4e89;
  --info-bg: #e8eff8;
  --info-line: #c3d4ea;
  --led-off: #c9c7c1;
  /* méretek: 4/8-as skála */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --gutter: 16px;
  --maxw: 1240px;
  --tap: 40px;
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --r-sheet: 16px;
  --sh-1: 0 1px 2px rgba(22, 24, 27, 0.06);
  --sh-2: 0 10px 28px rgba(22, 24, 27, 0.16);
  --sh-3: 0 18px 48px rgba(22, 24, 27, 0.28);
  /* betűk */
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  --fs-xs: 0.75rem; /* 12 */
  --fs-sm: 0.8125rem; /* 13 */
  --fs-md: 0.875rem; /* 14 */
  --fs-base: 0.9375rem; /* 15 */
  --fs-lg: 1.0625rem; /* 17 */
  --fs-xl: 1.25rem; /* 20 */
  --fs-2xl: 1.5rem; /* 24 */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ---- Alapok ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 400 var(--fs-base) / 1.5 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-base); }
h2 small, h3 small { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); letter-spacing: 0; }
small { font-size: var(--fs-xs); }
p { margin: 0 0 0.75em; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.ico { flex: none; display: inline-block; vertical-align: -0.2em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.center { text-align: center; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.warn-text { color: var(--bad); }
.ok-text { color: var(--ok); }
.print-only { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* LED állapotjelző */
.led { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--led-off); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); vertical-align: 0.05em; }
.led.paid { background: var(--ok-led); box-shadow: 0 0 0 3px rgba(34, 163, 90, 0.18); }
.led.requested { background: var(--warn-led); box-shadow: 0 0 0 3px rgba(224, 161, 0, 0.2); }
.led.open { background: var(--bad-led); box-shadow: 0 0 0 3px rgba(229, 72, 59, 0.16); }

.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--sunken); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; line-height: 1.5; vertical-align: 0.1em; white-space: nowrap; letter-spacing: 0; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.tag { display: inline-block; max-width: 100%; padding: 1px 7px; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag.mod { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }

/* ---- Fejléc ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--head);
  color: var(--head-ink);
  border-bottom: 1px solid var(--head-line);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px var(--gutter) 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; min-height: var(--tap); color: inherit; text-decoration: none; border-radius: var(--r); justify-self: start; }
.owl-mark { flex: none; display: block; border-radius: 7px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { color: var(--head-muted); font-size: var(--fs-md); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
.brand-accent { color: #fff; }
.brand-sub { color: var(--head-muted); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.datebar { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; }
.date-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.date-wrap input[type='date'] {
  width: auto;
  min-width: 0;
  height: var(--tap);
  min-height: var(--tap);
  padding: 0 10px;
  border: 1px solid var(--head-line);
  border-radius: var(--r);
  background: var(--head-2);
  color: var(--head-ink);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color-scheme: dark;
}
.date-wrap input[type='date']:hover { border-color: #43474e; }
.date-wrap input[type='date']:focus { outline: 2px solid var(--accent-bright); outline-offset: 1px; }
.date-label { min-width: 7.5em; color: var(--accent-bright); font-size: var(--fs-sm); font-weight: 600; text-transform: capitalize; white-space: nowrap; }
.status-wrap { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; justify-self: end; max-width: 100%; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid var(--head-line);
  border-radius: 999px;
  color: #d9dade;
  font-size: var(--fs-sm);
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#statusChip { display: block; }
.chip.warn { border-color: rgba(224, 161, 0, 0.55); color: #f5cd6b; }
.chip.bad { border-color: rgba(229, 72, 59, 0.6); color: #ff9c92; }
.chip.admin { flex: none; border-color: var(--accent-bright); background: var(--accent-bright); color: var(--head); font-weight: 700; }
.live-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #5b5f66; transition: background-color 0.3s, box-shadow 0.3s; }
.live-dot.on { background: var(--ok-led); box-shadow: 0 0 0 3px rgba(34, 163, 90, 0.25); }

.mainnav { max-width: var(--maxw); margin: 0 auto; padding: 0 calc(var(--gutter) - 12px); display: flex; gap: 4px; }
.mainnav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--head-muted);
  font-size: var(--fs-md);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.mainnav a::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent-bright); transform: scaleX(0); transition: transform 0.2s var(--ease); }
.mainnav a:hover { color: #fff; }
.mainnav a.active { color: #fff; }
.mainnav a.active::after { transform: scaleX(1); }
.mainnav a:focus-visible { outline-offset: -2px; border-radius: var(--r); }
.nav-count { min-width: 20px; padding: 2px 6px; border-radius: 999px; background: var(--accent-bright); color: var(--head); font-size: var(--fs-xs); font-weight: 700; line-height: 1.2; text-align: center; font-variant-numeric: tabular-nums; }
.nav-count:empty { display: none; }

@media (max-width: 999px) {
  .brand-name { display: flex; flex-direction: column; font-size: var(--fs-xs); letter-spacing: 0.1em; line-height: 1.15; }
  .brand-accent { font-size: var(--fs-base); letter-spacing: 0.08em; }
  .brand-sub, .admin-text { display: none; }
}
@media (max-width: 759px) {
  :root { --gutter: 12px; }
  .topbar-inner { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'brand status' 'date date'; gap: 2px 8px; padding-top: 6px; padding-bottom: 4px; }
  .brand { grid-area: brand; gap: 8px; }
  .owl-mark { width: 30px; height: 30px; }
  .status-wrap { grid-area: status; max-width: 58vw; }
  .datebar { grid-area: date; justify-content: space-between; }
  .date-wrap { flex: 1 1 auto; justify-content: center; }
  .mainnav { padding: 0; gap: 0; }
  .mainnav a { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 2px; min-height: 52px; padding: 4px 2px 6px; font-size: var(--fs-xs); }
  .mainnav a::after { left: 22%; right: 22%; }
  .nav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .nav-count { position: absolute; top: 4px; left: calc(50% + 8px); padding: 1px 5px; }
}

/* ---- Elrendezés ---- */
.container { flex: 1 0 auto; width: 100%; max-width: var(--maxw); min-height: calc(100vh - var(--sticky-top, 120px)); min-height: calc(100dvh - var(--sticky-top, 120px)); margin: 0 auto; padding: 20px var(--gutter) 32px; }
.view, .menu-col, .basket-col { min-width: 0; }
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 1000px) {
  :root { --gutter: 24px; }
  .order-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
}
@media (min-width: 1200px) { .order-layout { grid-template-columns: minmax(0, 1fr) 380px; } }

/* ---- Gombok, mezők ---- */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s var(--ease);
}
.btn:hover:not(:disabled) { border-color: #b5b2aa; background: var(--surface-2); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { border-color: var(--accent-hover); background: var(--accent-hover); }
.btn.danger { color: var(--bad); border-color: var(--bad-line); }
.btn.danger:hover:not(:disabled) { background: var(--bad-bg); border-color: var(--bad); }
.btn.ghost { background: transparent; color: var(--head-ink); border-color: var(--head-line); }
.btn.ghost:hover:not(:disabled) { background: var(--head-2); border-color: #43474e; }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: var(--fs-sm); }
.btn.block { display: flex; width: 100%; min-height: 48px; margin-top: 8px; font-size: var(--fs-base); }
.btn-meta { color: var(--muted); font-size: var(--fs-xs); font-weight: 500; }
@media (max-width: 759px), (pointer: coarse) { .btn.small { min-height: var(--tap); min-width: var(--tap); } }
.icon-btn {
  appearance: none;
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0;
  border: 0;
  border-radius: var(--r);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--sunken); color: var(--ink); }
.icon-btn.light { width: var(--tap); color: var(--head-ink); }
.icon-btn.light:hover { background: var(--head-2); color: #fff; }
input[type='text'], input[type='search'], input[type='number'], input[type='password'], input[type='time'], input[type='date'], input[type='url'], input[type='email'], input[type='tel'], textarea, select {
  width: 100%;
  max-width: 100%;
  min-height: var(--tap);
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px; /* iOS: ne nagyítson */
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type='number'] { font-variant-numeric: tabular-nums; }
textarea { min-height: 64px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #8b8e93; }
input:hover, textarea:hover, select:hover { border-color: #b5b2aa; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(196, 64, 26, 0.16); }
input.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.14); }
.field { display: block; margin: 12px 0; }
.field > span { display: flex; align-items: center; gap: 4px; min-height: 22px; margin-bottom: 4px; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; }
.field > span:has(> details.info-tip) { min-height: 32px; }
.field.inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.field.inline > span { margin: 0; }
.field.inline input { width: 160px; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); margin: 2px 0; cursor: pointer; }
.check input, .radio input, .cell-check input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.check.inline { display: inline-flex; margin: 0 16px 0 0; }
.cell-check { display: inline-grid; place-items: center; min-width: var(--tap); min-height: var(--tap); cursor: pointer; }
.notice { display: block; margin: 12px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: var(--fs-md); }
.notice:has(> .ico) { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; }
.notice > .ico { margin-top: 2px; }
.notice .btn { margin: 4px 0 0 4px; }
.notice.warn { border-color: var(--warn-line); background: var(--warn-bg); color: #5c3c00; }
.notice.info { border-color: var(--info-line); background: var(--info-bg); color: var(--info); }
.empty { margin: 0; color: var(--muted); text-align: center; }
p.empty, div.empty { padding: 24px 16px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }

/* ---- Rendelés: fülek ---- */
.tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.tab {
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 56px;
  padding: 6px 2px;
  border: 0;
  border-radius: var(--r);
  background: transparent;
  color: var(--ink-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.tab:hover:not(.active) { background: var(--surface-2); color: var(--ink); }
.tab.active { background: var(--head); color: #fff; }
.tab-ico { color: var(--muted); }
.tab.active .tab-ico { color: var(--accent-bright); }
.tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-full { display: none; }
.tab-count { position: absolute; top: 4px; right: 4px; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--sunken); color: var(--ink-2); font-size: var(--fs-xs); line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.tab.active .tab-count { background: var(--head-2); color: var(--head-ink); }
@media (min-width: 700px) {
  .tab { flex-direction: row; gap: 8px; min-height: 44px; padding: 0 10px; font-size: var(--fs-md); }
  .tl-full { display: inline; }
  .tl-short { display: none; }
  .tab-count { position: static; }
}
.img-note { display: flex; align-items: center; gap: 6px; min-height: var(--tap); margin: 4px 0 8px; padding: 0 2px; color: var(--muted); font-size: var(--fs-sm); }
.pane-head { margin: 8px 0 16px; }
.pane-head h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; margin: 0; }
.pane-sub { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-md); }
.pane-sub b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---- Étlap eszköztár ---- */
.etlap-tools { position: sticky; top: var(--sticky-top, 100px); z-index: 10; margin: 0 calc(-1 * var(--gutter)) 8px; padding: 8px var(--gutter); background: var(--bg); border-bottom: 1px solid var(--line); }
.search-wrap { position: relative; }
.search-wrap .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-wrap input[type='search'] { min-height: 44px; padding-left: 40px; }
.chips { display: flex; gap: 6px; margin: 0 calc(-1 * var(--gutter)); padding: 8px var(--gutter) 0; overflow-x: auto; overscroll-behavior-x: contain; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip-btn {
  appearance: none;
  flex: none;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.chip-btn:hover { border-color: var(--ink-2); color: var(--ink); }
@media (max-width: 759px), (pointer: coarse) { .chip-btn { min-height: var(--tap); } }
.cat-section { margin-bottom: 24px; scroll-margin-top: calc(var(--sticky-top, 100px) + 120px); }
.cat-title { display: flex; align-items: baseline; gap: 8px; margin: 20px 0 12px; font-size: var(--fs-lg); }
.cat-count { color: var(--muted); font-size: var(--fs-sm); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---- Kártyák ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: border-color 0.15s, box-shadow 0.15s; }
@media (hover: hover) { .card:hover { border-color: var(--line-strong); box-shadow: var(--sh-1); } }
.card.in-basket { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.card-img { position: relative; flex: none; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sunken); }
.card-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-img.ph { display: grid; place-items: center; color: #9a9ca1; }
.img-badge { position: absolute; left: 8px; bottom: 8px; padding: 1px 7px; border-radius: var(--r-sm); background: rgba(22, 24, 27, 0.78); color: #fff; font-size: var(--fs-xs); line-height: 1.5; }
.qty-badge { position: absolute; top: 8px; right: 8px; z-index: 1; min-width: 28px; padding: 2px 7px; border-radius: var(--r-sm); background: var(--accent); color: #fff; font-size: var(--fs-sm); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.card-body { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 14px 14px; }
.card-title { margin: 0; font-size: var(--fs-base); font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.card-desc { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; overflow-wrap: anywhere; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.contents { margin: 2px 0 0; padding-left: 18px; color: var(--muted); font-size: var(--fs-sm); }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 12px; margin-top: auto; padding-top: 12px; }
.card-body > .card-foot { margin-top: auto; border-top: 1px solid var(--line); }
.price-wrap { min-width: 0; }
.price { font-size: var(--fs-lg); font-weight: 700; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price.muted { font-size: var(--fs-md); font-weight: 600; }
.price-sub { color: var(--muted); font-size: var(--fs-xs); line-height: 1.35; font-variant-numeric: tabular-nums; }
.btn.add { flex: none; min-height: 36px; padding: 6px 14px; }
@media (max-width: 759px), (pointer: coarse) { .btn.add { min-height: var(--tap); } }
@media (max-width: 559px) {
  .grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .card { display: grid; grid-template-columns: 96px minmax(0, 1fr); }
  .card .card-img { width: 96px; height: auto; aspect-ratio: auto; min-height: 100%; }
  .qty-badge { top: 6px; left: 6px; right: auto; }
  .card-body { padding: 10px 12px 12px; }
  .img-badge { left: 4px; right: 4px; bottom: 4px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.desserts { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.desserts h3 { font-size: var(--fs-base); }
.desserts ul { margin: 4px 0 8px; padding-left: 20px; }
.desserts p { margin: 0; }

/* ---- Heti menü ---- */
.week { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.week-day { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.week-day.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.wd-head { display: flex; align-items: baseline; gap: 8px; text-transform: capitalize; }
.wd-head .muted { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.wd-body { display: flex; flex: 1; flex-direction: column; font-size: var(--fs-md); }
.wd-text { display: grid; gap: 4px; }
.wd-k { display: block; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.wd-buy { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.wd-text + .wd-buy { margin-top: 12px; }
.lastweek, .drink-ov, .text-preview, .day-log { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.lastweek > summary, .drink-ov > summary, .text-preview > summary, .day-log > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  list-style: none;
  font-size: var(--fs-md);
  font-weight: 600;
  cursor: pointer;
}
.lastweek > summary::-webkit-details-marker, .drink-ov > summary::-webkit-details-marker, .text-preview > summary::-webkit-details-marker, .day-log > summary::-webkit-details-marker { display: none; }
.lastweek > summary::after, .drink-ov > summary::after, .text-preview > summary::after, .day-log > summary::after {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 1.8px solid var(--muted);
  border-bottom: 1.8px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s;
}
details[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.lastweek ul { margin: 0; padding: 0 14px 12px 32px; color: var(--muted); font-size: var(--fs-md); }

/* ---- Saját rendelés ---- */
.mine { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; padding: 10px 14px; border: 1px solid var(--ok-line); border-radius: var(--r-lg); background: var(--ok-bg); font-size: var(--fs-md); }
.mine-text { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.mine-text .led { margin-right: 8px; }
.mine-actions { display: flex; gap: 8px; }
@media (max-width: 559px) { .mine-actions { width: 100%; } .mine-actions > * { flex: 1 1 0; } }

/* ---- Kosár ---- */
.basket { position: relative; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.basket-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; border-bottom: 1px solid var(--line); }
.basket-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-lg); }
.basket-count { padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; }
.basket > .small.muted { margin: 10px 0 0; }
.basket-lines { margin: 4px 0 0; padding: 0; list-style: none; }
.bl { padding: 10px 0 12px; border-bottom: 1px solid var(--line); }
.bl-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; font-size: var(--fs-md); font-weight: 650; }
.bl-name { min-width: 0; padding-top: 9px; overflow-wrap: anywhere; }
.bl-top .icon-btn { margin-right: -8px; }
.bl select, .bl .bl-note { margin-top: 6px; }
.bl-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.bl-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper { display: inline-flex; align-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); }
.stepper button { appearance: none; display: grid; place-items: center; width: var(--tap); height: var(--tap); border: 0; background: var(--surface-2); color: var(--ink); cursor: pointer; transition: background-color 0.15s; }
.stepper button:hover { background: var(--sunken); }
.stepper span { min-width: 36px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.basket p.empty { margin: 12px 0; }
.totals { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); font-size: var(--fs-md); }
.totals > div { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; font-variant-numeric: tabular-nums; }
.totals > .small { font-size: var(--fs-xs); }
.basket-foot { position: sticky; bottom: 0; z-index: 2; margin: 12px -16px 0; padding: 10px 16px 16px; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); background: var(--surface); }
.basket-foot .grand { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--fs-xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.basket-foot .grand > span:first-child { display: inline-flex; align-items: center; font-size: var(--fs-base); }
.basket-foot details.info-tip > .info-body { top: auto; bottom: calc(100% + 4px); }
.basket-fab {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + var(--safe-b));
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 616px;
  min-height: 52px;
  margin: 0 auto;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--head);
  color: #fff;
  font-size: var(--fs-base);
  font-weight: 600;
  box-shadow: var(--sh-3);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.12s var(--ease);
}
.basket-fab:active { transform: scale(0.985); }
.basket-fab.has-items { background: var(--accent); }
.fab-count { color: #fff; font-weight: 500; font-variant-numeric: tabular-nums; }
.fab-count::before { content: '·'; margin-right: 8px; opacity: 0.7; }
.fab-total { margin-left: auto; font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.basket-backdrop { display: none; }
@media (max-width: 999px) {
  .basket-col {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 50;
    max-width: 640px;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    margin: 0 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: var(--r-sheet) var(--r-sheet) 0 0;
    background: var(--surface);
    box-shadow: var(--sh-3);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform 0.28s var(--ease), visibility 0s linear 0.28s;
  }
  body.basket-open .basket-col { transform: none; visibility: visible; transition: transform 0.28s var(--ease); }
  .basket-col .basket { border: 0; border-radius: 0; }
  .basket-col .basket::before { content: ''; position: absolute; top: 6px; left: 50%; z-index: 4; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--line-strong); }
  .basket-col .basket-head { position: sticky; top: 0; z-index: 3; margin: 0 -16px; padding: 10px 8px 0 16px; background: var(--surface); }
  .basket-foot { padding-bottom: calc(16px + var(--safe-b)); border-radius: 0; }
  body.basket-open { overflow: hidden; }
  body.basket-open .basket-backdrop { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(22, 24, 27, 0.5); animation: fade-in 0.2s ease; }
  body.basket-open .basket-fab, body:not([data-route='rendeles']) .basket-fab { display: none; }
  body[data-route='rendeles'] .footer { padding-bottom: calc(84px + var(--safe-b)); }
}
@media (min-width: 1000px) {
  .basket-col { position: sticky; top: calc(var(--sticky-top, 100px) + 20px); max-height: calc(100vh - var(--sticky-top, 100px) - 40px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border-radius: var(--r-lg); }
  .basket-fab, .only-mobile { display: none !important; }
}

/* ---- Párbeszédablak ---- */
dialog {
  width: min(480px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  border-radius: var(--r-lg);
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh-3);
}
dialog[open] { animation: dlg-in 0.2s var(--ease); }
dialog::backdrop { background: rgba(22, 24, 27, 0.55); }
.dlg { padding: 0 16px; }
.dlg-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 12px 0 8px; background: var(--surface); }
.dlg-head h3 { margin: 0; padding-top: 8px; font-size: var(--fs-lg); overflow-wrap: anywhere; }
.dlg-head .icon-btn { margin-right: -8px; }
.dlg-desc { margin: 0 0 8px; font-size: var(--fs-md); }
.koret { min-width: 0; margin: 12px 0; padding: 0 12px 4px; border: 1px solid var(--line); border-radius: var(--r); }
.koret legend { padding: 0 4px; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; }
.radio { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 44px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: var(--fs-md); }
.radio:last-child { border-bottom: 0; }
.radio > .muted { font-variant-numeric: tabular-nums; }
.radio:has(input:checked) > span:nth-of-type(1) { font-weight: 650; }
.dlg-foot { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 12px 0 16px; border-top: 1px solid var(--line); background: var(--surface); }
.dlg-foot .btn.primary { flex: 1 1 auto; min-height: 48px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  dialog { width: 100%; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); margin: auto 0 0; border-radius: var(--r-sheet) var(--r-sheet) 0 0; }
  dialog[open] { animation: sheet-in 0.26s var(--ease); }
  .dlg-foot { padding-bottom: calc(16px + var(--safe-b)); }
}
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes tip-in { from { opacity: 0; transform: translateY(-4px); } }

/* ---- Fejléc-sor a nézetek tetején, műveletek ---- */
.view, .pane, .settings, .summary, .history, fieldset, .pane-head { position: relative; }
.sum-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.sum-head h2 { margin: 0 0 2px; }
.sum-head p { margin: 0; }
.sum-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
@media (max-width: 759px) {
  .sum-head > div:first-child { width: 100%; }
  .sum-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .sum-actions .btn { min-width: 0; padding-inline: 10px; }
  .sum-actions .btn > span { overflow: hidden; text-overflow: ellipsis; }
  .sum-actions .sa-wide { grid-column: 1 / -1; }
}
@media (max-width: 399px) { .sum-actions .btn-meta { display: none; } }
.bringer { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; margin-bottom: 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.bringer-label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: var(--fs-md); font-weight: 650; white-space: nowrap; }
.bringer-label .ico { color: var(--accent-ink); }
.bringer:not(:has(a.btn)) { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 759px) { .bringer, .bringer:not(:has(a.btn)) { grid-template-columns: minmax(0, 1fr); } }

/* ---- Számláló csempék (KPI) ---- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.stat { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.stat > span { color: var(--muted); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat > b { font-size: var(--fs-xl); font-weight: 700; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stat > small { color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.stat.grand { border-color: var(--head); background: var(--head); color: #fff; }
.stat.grand > span, .stat.grand > small { color: var(--head-muted); }
.stats > .stat.grand:first-child { grid-column: 1 / -1; }
.stats > .stat.grand:first-child ~ .stat:last-child:nth-child(even),
.stats:not(:has(> .grand:first-child)) > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .stats { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; }
  .stats > .stat { grid-column: auto !important; }
}

/* ---- Táblázatok ---- */
.table-wrap { max-width: 100%; margin-bottom: 16px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { background: var(--surface-2); color: var(--muted); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl th.num, .tbl td.num { text-align: right; }
.tbl th.center, .tbl td.center { text-align: center; }
.tbl td.big { font-weight: 700; font-variant-numeric: tabular-nums; }
.tbl tfoot td { border-top: 1px solid var(--line-strong); border-bottom: 0; background: var(--surface-2); }
.tbl tr.paid td { color: var(--muted); }
.tbl tr.deposit-row td { color: var(--ink-2); }
.tbl.compact th, .tbl.compact td { padding: 8px 10px; }
.tbl.compact td { vertical-align: middle; }
.tbl input[type='number'], .tbl input[type='text'], .tbl select { min-height: 36px; padding: 6px 8px; }
.tbl input[type='text'] { min-width: 150px; }
.tbl input[type='number'] { width: 100px; min-width: 88px; }
.tbl select { min-width: 130px; }
@media (max-width: 759px), (pointer: coarse) {
  .tbl input[type='number'], .tbl input[type='text'], .tbl select { min-height: var(--tap); }
  .tbl td > a, .uns-daylist li > a { display: inline-flex; align-items: center; min-height: var(--tap); }
}
.tbl a { font-weight: 600; text-decoration: none; }
.tbl a:hover { text-decoration: underline; }
.text-preview { margin-top: 12px; }
.text-preview pre { margin: 0; padding: 12px 14px; border-top: 1px solid var(--line); font: var(--fs-sm) / 1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- Időszak űrlap ---- */
.range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 8px 0 16px; }
.range label { display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; }

/* ---- Beállítások ---- */
.settings { max-width: 880px; margin: 0 auto; }
.settings.narrow { max-width: 440px; padding-top: 24px; }
.settings fieldset { min-width: 0; margin: 0 0 16px; padding: 16px 20px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.settings legend { float: left; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; width: 100%; margin-bottom: 8px; padding: 0; font-size: var(--fs-base); font-weight: 700; }
.settings legend + * { clear: both; }
.settings .sum-head .muted, .settings.narrow > .muted { display: flex; align-items: center; flex-wrap: wrap; margin: 0 0 4px; }
.settings fieldset .table-wrap { margin-bottom: 12px; }
@media (max-width: 559px) { .settings fieldset { padding: 14px 14px 16px; } }
.fees { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 24px; }
.fee { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--tap); font-size: var(--fs-md); }
.fee input { flex: none; width: 104px; }
.checks { margin-bottom: 8px; }
.pin-form { display: flex; gap: 8px; margin-top: 16px; }
.pin-form input { flex: 1 1 auto; min-width: 0; }
.save-bar { position: sticky; bottom: calc(12px + var(--safe-b)); z-index: 5; display: flex; justify-content: flex-end; margin: 0 0 16px; pointer-events: none; }
.save-bar .btn { min-height: 48px; padding: 0 28px; font-size: var(--fs-base); box-shadow: var(--sh-2); pointer-events: auto; }
.po-tbl td:nth-child(3) input { width: 112px; margin-left: auto; text-align: right; }
.po-add { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; align-items: end; gap: 8px; }
.po-add label > span { display: block; margin-bottom: 4px; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; }
@media (max-width: 559px) { .po-add { grid-template-columns: minmax(0, 1fr) auto; } .po-pick { grid-column: 1 / -1; } }
#customBody input[type='text'] { min-width: 140px; }
#customBody input[type='number'] { width: 96px; }
.drink-ov { margin-top: 12px; }
.drink-ov .table-wrap { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.drink-ov input { width: 104px; }
#imgFilter { margin: 8px 0 12px; }
.img-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: var(--fs-md); }
.img-sum a { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); }
.img-list { display: grid; gap: 6px; max-height: 520px; overflow: auto; padding-right: 4px; }
.img-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r); }
.img-row img, .img-row .img-ph { display: grid; place-items: center; width: 64px; height: 48px; border-radius: var(--r-sm); background: var(--sunken); color: #9a9ca1; object-fit: cover; }
.img-info { display: flex; flex-direction: column; min-width: 0; }
.img-info b { font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-info small { color: var(--muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-actions { display: flex; gap: 4px; }
.img-actions .btn { padding-inline: 10px; }
.img-actions label.btn { cursor: pointer; }
.credits li { margin: 0 0 10px; }

/* ---- Lábléc, értesítés ---- */
.footer { flex: none; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); }
.footer-bar { position: relative; max-width: var(--maxw); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding: 8px var(--gutter) calc(8px + var(--safe-b)); }
.footer-updated { display: inline-flex; align-items: center; gap: 2px; min-height: var(--tap); font-variant-numeric: tabular-nums; }
.footer-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.footer-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 10px; border-radius: var(--r); color: var(--ink-2); font-weight: 600; text-decoration: none; transition: background-color 0.15s; }
.footer-link:hover { background: var(--sunken); }
@media (max-width: 559px) { .footer-bar { justify-content: center; } .footer-actions { justify-content: center; } }
.footer .info-body p { margin: 0 0 8px; }
.footer .info-body p:last-child { margin: 0; }
.footer-sources { margin-bottom: 8px; }
.footer-sources #footerSources { display: block; font-size: 0; }
.footer-sources #footerSources::before { content: 'Utolsó frissítés forrásonként'; display: block; margin-bottom: 2px; font-size: var(--fs-md); font-weight: 700; }
.footer-sources #footerSources > span { display: block; font-size: var(--fs-md); line-height: 1.55; font-variant-numeric: tabular-nums; }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(80px + var(--safe-b));
  z-index: 100;
  width: max-content;
  max-width: min(92vw, 440px);
  padding: 10px 16px;
  border-radius: var(--r);
  background: var(--head);
  color: #fff;
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  box-shadow: var(--sh-2);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
  transition: opacity 0.2s, transform 0.25s var(--ease);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--bad); }
@media (min-width: 1000px) { .toast { bottom: 28px; } }

/* ---- ⓘ magyarázó (infoTip) ---- */
details.info-tip { display: inline-block; margin: -9px -6px -9px -4px; font: normal 400 1rem/1 var(--font); letter-spacing: normal; text-transform: none; vertical-align: middle; }
details.info-tip > summary {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  list-style: none;
  border-radius: 50%;
  color: var(--muted);
  font: 700 0.75rem/1 var(--font);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
details.info-tip > summary::-webkit-details-marker { display: none; }
details.info-tip > summary::before { content: ''; position: absolute; inset: 11px; z-index: -1; border: 1.5px solid currentColor; border-radius: 50%; transition: background-color 0.15s, border-color 0.15s; }
details.info-tip > summary:hover { color: var(--ink); }
details.info-tip > summary:focus-visible { outline: none; }
details.info-tip > summary:focus-visible::before { box-shadow: 0 0 0 3px rgba(196, 64, 26, 0.35); }
details.info-tip[open] > summary { color: #fff; }
details.info-tip[open] > summary::before { border-color: var(--ink); background: var(--ink); }
details.info-tip > .info-body {
  position: absolute;
  left: 8px;
  right: 8px;
  z-index: 45;
  max-width: 600px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--accent);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--sh-2);
  color: var(--ink);
  font: normal 400 var(--fs-md) / 1.55 var(--font);
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: auto;
  animation: tip-in 0.15s var(--ease);
}
details.info-tip.up > .info-body { top: auto; bottom: calc(100% - 4px); }
.footer details.info-tip > .info-body { left: var(--gutter); right: var(--gutter); }

/* ---- Belépő oldal ---- */
.login-body { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--head); }
.login-card { width: min(380px, 100%); padding: 32px 24px 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-3); text-align: center; }
.login-card .owl-mark { margin: 0 auto 14px; border-radius: 10px; }
.login-card h1 { margin: 0 0 2px; font-size: var(--fs-lg); letter-spacing: 0.08em; text-transform: uppercase; }
.login-card h1 span { color: var(--accent-ink); }
.login-card > p { margin: 0; font-size: var(--fs-md); }
.login-card form { display: grid; gap: 12px; margin: 24px 0 12px; text-align: left; }
.login-card .field { margin: 0; }
.login-card input[type='password'] { min-height: 48px; font-size: 1.0625rem; }
.login-card .notice { margin: 0; }
.login-card .btn.big { width: 100%; min-height: 48px; font-size: var(--fs-base); }
.login-hint { margin: 0; }

/* ---- Nyomtatás ---- */
@media print {
  body { background: #fff; }
  .topbar, .footer, .no-print, .basket-fab, #toast, .mainnav, details.info-tip { display: none !important; }
  .print-only { display: inline !important; }
  .container { max-width: none; padding: 0; }
  .view:not(#view-osszesito) { display: none !important; }
  #view-osszesito { display: block !important; }
  .table-wrap, .stat, .bringer, .pcard { border: 1px solid #bbb; box-shadow: none; }
  .bringer input { display: none; }
  .stat.grand { background: #fff; color: #000; }
  .stat.grand > span { color: #555; }
  h2, h3 { break-after: avoid; }
  tr, .pcard { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ==== Karcsúsítás és csiszolás: kompakt fejléc, rendelőlap, kosár, beállítások, lábléc ==== */
.btn, .icon-btn, .tab, .chip-btn, .footer-link, .mainnav a { -webkit-tap-highlight-color: transparent; }
.icon-btn, .tab, .chip-btn, .footer-link { transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.12s var(--ease); }
.icon-btn:active, .tab:active, .chip-btn:active, .footer-link:active, .stepper button:active { transform: translateY(1px); }
.mainnav a:active { color: #fff; }
.dl-date { display: none; }
.today-btn { padding: 4px 10px; }

/* Fejléc mobilon: egy sor (bagoly + SZABDUL · ‹ dátum › · élő/admin) + kompakt menü */
@media (max-width: 759px) {
  .topbar-inner { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'brand date status'; gap: 0 4px; padding: 4px var(--gutter); }
  .brand { gap: 7px; }
  .owl-mark { width: 28px; height: 28px; }
  .brand-pre, #statusChip { display: none; }
  .brand-name { display: block; }
  .brand-accent { font-size: var(--fs-md); letter-spacing: 0.1em; }
  .status-wrap { max-width: none; gap: 6px; }
  .chip.admin { padding: 4px 6px; }
  .datebar { justify-content: center; gap: 0; }
  .datebar .icon-btn.light { width: 32px; }
  .date-wrap { position: relative; flex: 0 1 auto; min-width: 0; height: var(--tap); padding: 0 4px; border-radius: var(--r); }
  .date-wrap input[type='date'] { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
  .date-wrap:focus-within { outline: 2px solid var(--accent-bright); outline-offset: -2px; }
  .date-wrap:active { background: var(--head-2); }
  .date-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--head-ink); font-size: var(--fs-sm); text-transform: none; }
  .dl-day { color: var(--accent-bright); }
  .dl-wd { display: none; }
  .dl-date { display: inline; font-variant-numeric: tabular-nums; }
  .today-btn { min-height: 32px !important; min-width: 0 !important; margin-left: 2px; padding: 2px 8px; }
  .topbar-inner:has(#todayBtn:not(.hidden)) .brand-text { display: none; }
  .mainnav a { min-height: 46px; gap: 1px; padding: 3px 2px 5px; font-size: 11px; }
  .nav-count { top: 3px; }
}

/* Rendelőlap */
#tabsWrap { margin-bottom: 12px; }
.pane-sub { margin: 0 0 12px; font-size: var(--fs-sm); }
.dessert-line { margin: 12px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.card-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.card-foot { align-items: center; padding-top: 10px; }
.btn.add { gap: 6px; padding: 6px 12px 6px 10px; }
.btn.add .ico { margin-left: -2px; }
.week { grid-template-columns: minmax(0, 1fr); }
.week + .lastweek { margin-top: 12px; }
.lastweek li { margin: 2px 0; }
@media (max-width: 559px) {
  .card { grid-template-columns: 84px minmax(0, 1fr); }
  .card .card-img { width: 84px; }
  .card-body { gap: 2px; padding: 10px 12px; }
  .card-desc { -webkit-line-clamp: 2; font-size: var(--fs-xs); }
  .card-body > .card-foot { padding-top: 8px; }
  .card-tags { margin-top: 4px; }
}

/* Kosár és tétel ablak */
.basket-day { color: var(--muted); font-size: var(--fs-sm); font-weight: 500; font-variant-numeric: tabular-nums; }
.basket-form .field { margin: 10px 0; }
.basket-form #orderNote { min-height: var(--tap); }
.basket .bl-note { min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: var(--fs-sm); }
.dlg-break { margin: 0 0 8px; color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.dlg-note { margin: 12px 0 4px; }
@media (max-width: 999px) {
  .basket-fab:not(.show) { display: none; }
  body[data-route='rendeles'] .footer { padding-bottom: 0; }
  body[data-route='rendeles']:has(.basket-fab.show) .footer { padding-bottom: calc(72px + var(--safe-b)); }
}

/* Lábléc: egy rövid sor */
.footer-bar { flex-wrap: nowrap; justify-content: flex-start; gap: 0; padding: 2px var(--gutter) calc(2px + var(--safe-b)); }
.footer-updated { padding-left: 2px; white-space: nowrap; }
.footer-sep { flex: 1 1 auto; }
button.footer-link { border: 0; background: transparent; font: inherit; font-weight: 600; cursor: pointer; }
button.footer-link:disabled { opacity: 0.5; cursor: progress; }
.footer-link { padding: 0 8px; }
@media (max-width: 559px) { .footer-bar { justify-content: flex-start; } }
@media (max-width: 389px) { .footer-link .ico { display: none; } }

/* Beállítások: harmonika */
.settings .sum-head > div:first-child { display: flex; align-items: center; gap: 2px; }
.settings .sum-head h2 { margin: 0; }
.set-sec { margin: 0 0 8px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.set-sec > summary { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; min-height: 48px; padding: 4px 44px 4px 16px; border-radius: var(--r-lg); font-size: var(--fs-base); font-weight: 650; list-style: none; cursor: pointer; transition: background-color 0.15s; }
.set-sec > summary::-webkit-details-marker { display: none; }
.set-sec > summary::after { content: ''; position: absolute; top: 50%; right: 20px; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s var(--ease); }
.set-sec[open] > summary::after { transform: translateY(3px) rotate(225deg); }
.set-sec > summary:hover { background: var(--surface-2); }
.set-sec > summary:focus-visible { outline-offset: -2px; }
.set-sec[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.settings .set-sec > fieldset { margin: 0; padding: 12px 16px 16px; border: 0; border-radius: 0; background: none; box-shadow: none; }
.set-sec[open] > fieldset { animation: fade-in 0.18s ease; }
