@import url("/static/fonts/fonts.css?v=66");

/* MenuDoro admin — bright 2020s SaaS (warm canvas + gold accent) */
:root {
  --bg: #F7F4EE;
  --bg-pure: #ffffff;
  --bg-soft: #F0EBE3;
  --bg-elev: #ffffff;
  --card: #ffffff;
  --ink: #0B0D12;
  --muted: #5C6570;
  --accent: #D4A84B;
  --accent-bright: #E0B85C;
  --accent-soft: #FBF6E9;
  --accent-warm: #D4A84B;
  --line: #E1E4EA;
  --line-soft: #EEF0F3;
  --line-strong: #C8CDD6;
  --danger: #C45C4A;
  --warn-bg: #FBF6E9;
  --warn-ink: #5C4A1A;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --serif: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --tap: 44px;
  --btn-ink: #FFFFFF;
  --btn-fill: #0B0D12;
  --space: 8px;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-btn: 10px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(11, 13, 18, 0.03), 0 10px 28px rgba(92, 64, 20, 0.06);
  --shadow-md: 0 2px 6px rgba(11, 13, 18, 0.04), 0 18px 44px rgba(92, 64, 20, 0.09);
  --shadow-btn: 0 1px 2px rgba(11, 13, 18, 0.06), 0 4px 12px rgba(11, 13, 18, 0.08);
  --shadow-btn-hover: 0 4px 16px rgba(11, 13, 18, 0.14);
  --sidebar-w: 260px;
  --sidebar-collapsed: 78px;
  --logo-plate: transparent;
  --focus-ring: 0 0 0 3px rgba(212, 168, 75, 0.35);
  --max-card: 720px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(800px 400px at 0% 0%, rgba(212, 168, 75, 0.07), transparent 55%),
    radial-gradient(600px 360px at 100% 0%, rgba(99, 120, 160, 0.06), transparent 50%),
    var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ——— Brand plate (pure black so gold logo artwork reads on light UI) ——— */
.brand-plate {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.brand-plate--login {
  width: calc(100% + 2.8rem);
  margin: -1.4rem -1.4rem 1.35rem;
  padding: 1.5rem 1.25rem 1.25rem;
  border-radius: var(--radius) var(--radius) 0 0;
}
.brand-plate--centered {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.brand-plate--centered .brand-logo {
  margin-left: auto;
  margin-right: auto;
  display: block;
  object-position: center center;
}
.brand-plate--side {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 14px;
  padding: 6px;
  flex-shrink: 0;
}
.brand-plate--side .brand-logo {
  height: 100%;
  width: 100%;
  max-width: none;
  object-fit: contain;
}
.brand-plate--top {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  padding: 5px;
  flex-shrink: 0;
}
.brand-plate--top .brand-logo {
  height: 100%;
  width: 100%;
  max-width: none;
  object-fit: contain;
}
.brand-logo {
  display: block;
  height: 96px;
  width: auto;
  max-width: min(360px, 78vw);
  object-fit: contain;
  object-position: center;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.brand-logo--lg { height: 210px; max-width: min(570px, 92vw); }
.brand-logo--md { height: 108px; max-width: min(330px, 72vw); }
.brand-logo--sm { height: 78px; max-width: min(255px, 60vw); }
.brand-logo--xs { height: 60px; max-width: 180px; }
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.brand-lockup strong {
  font-family: var(--font); font-weight: 650;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.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;
}

/* ——— App shell (sidebar + canvas) ——— */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.2s ease;
}
.app-shell.collapsed {
  grid-template-columns: var(--sidebar-collapsed) 1fr;
}
.app-shell.collapsed .nav-lbl,
.app-shell.collapsed .sidebar-rest,
.app-shell.collapsed .sidebar-footer .foot-lbl {
  display: none;
}
.app-shell.collapsed .sidebar-brand {
  justify-content: center;
  padding: 1rem 0.5rem;
}
.app-shell.collapsed nav.side button,
.app-shell.collapsed nav.side .side-link {
  justify-content: center;
  padding: 0.75rem;
}
.app-shell.collapsed .sidebar-footer {
  padding: 0.75rem;
  align-items: center;
}

.sidebar {
  background: var(--bg-pure);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
  box-shadow: 1px 0 0 rgba(15,23,42,0.02);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.15rem 1rem 1rem;
  border-bottom: 1px solid var(--line);
}
.sidebar-rest {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.sidebar-rest strong {
  font-family: var(--font); font-weight: 650;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-rest .role-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  width: fit-content;
  text-transform: capitalize;
}
.btn-icon {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  flex-shrink: 0;
  font-size: 1rem;
  font-family: inherit;
}
.btn-icon:hover { border-color: var(--accent); color: var(--ink); }

nav.side {
  flex: 1;
  padding: 0.85rem 0.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
nav.side button,
nav.side .side-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  text-align: left;
  margin: 0;
  padding: 0.7rem 0.85rem;
  min-height: var(--tap);
  border: 0;
  background: transparent;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--muted);
  text-decoration: none;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
nav.side button .nav-ico,
nav.side .side-link .nav-ico {
  width: 1.35rem;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.9;
}
nav.side button:hover,
nav.side .side-link:hover {
  background: var(--bg-soft);
  color: var(--ink);
}
nav.side button.active {
  background: var(--accent-soft);
  color: #8a6f12;
  box-shadow: inset 0 0 0 1px rgba(212, 168, 75, 0.28);
}
nav.side button.active .nav-ico { opacity: 1; }

.sidebar-footer {
  padding: 0.85rem 1rem 1.15rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
}
.sidebar-footer a:hover { background: var(--bg-soft); color: var(--ink); }
.sidebar-footer .guest-link { color: var(--accent); }

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.topbar {
  display: none;
  background: var(--bg-pure);
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 1rem;
  align-items: center;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 25;
}
.topbar strong {
  font-family: var(--font); font-weight: 650;
  font-size: 1.1rem;
  font-weight: 600;
}
.topbar-spacer { flex: 1; }
.topbar a { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.88rem; }

/* Legacy .top for kitchen / help / onboard pages */
.top {
  background: var(--bg-pure);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  min-height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.top strong {
  font-family: var(--font); font-weight: 650;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.top a { color: var(--accent); text-decoration: none; margin-left: 0.35rem; font-weight: 600; }
.top a:hover { color: var(--ink); }
.top-links { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; align-items: center; }
.top .brand-logo { height: 66px; max-width: 210px; }
.top .brand-plate--top { margin-right: 0.15rem; }

.layout { display: contents; } /* shell owns the grid */
main.panel { padding: 1.5rem 1.5rem 2.5rem; max-width: 1100px; width: 100%; margin: 0 auto; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow);
}
h1, h2, h3 {
  margin-top: 0;
  font-family: var(--font); font-weight: 650;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h1 { font-size: 2rem; }
h2 { font-size: 1.45rem; }
.h-sm { font-size: 1.1rem; margin: 0 0 0.5rem; font-family: var(--font); font-weight: 650; }
label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.55rem 0 0.3rem;
  font-weight: 600;
}
input, select, textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  min-height: 44px;
  height: 44px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  background: var(--bg-pure);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { height: auto; }
input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
textarea { min-height: 90px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

/* ——— Button system ———
   Primary: near-black fill, white label, 48px, soft 14px (admin density)
   Ghost/secondary: white fill, 1.5px solid #111, dark text
   Accent CTA: gold fill, near-black text
   Pills reserved for wizard / marketing CTAs via .pill or .wiz context
*/
button.primary, .btn.primary, a.btn.primary,
button.ghost, .btn.ghost, a.btn.ghost,
button.cta, .btn.cta, a.btn.cta,
button.accent, .btn.accent, a.btn.accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-height: 44px;
  padding: 0 18px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  border-radius: var(--radius-btn);
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-btn);
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}
button.primary:hover, .btn.primary:hover, a.btn.primary:hover,
button.ghost:hover, .btn.ghost:hover, a.btn.ghost:hover,
button.cta:hover, .btn.cta:hover, a.btn.cta:hover,
button.accent:hover, .btn.accent:hover, a.btn.accent:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn-hover);
}
button.primary:active, .btn.primary:active, a.btn.primary:active,
button.ghost:active, .btn.ghost:active, a.btn.ghost:active,
button.cta:active, .btn.cta:active, a.btn.cta:active,
button.accent:active, .btn.accent:active, a.btn.accent:active {
  transform: translateY(0);
  box-shadow: var(--shadow-btn);
}
button.primary:focus-visible, .btn.primary:focus-visible, a.btn.primary:focus-visible,
button.ghost:focus-visible, .btn.ghost:focus-visible, a.btn.ghost:focus-visible,
button.cta:focus-visible, .btn.cta:focus-visible, a.btn.cta:focus-visible,
button.accent:focus-visible, .btn.accent:focus-visible, a.btn.accent:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring), var(--shadow-btn);
}

button.primary, .btn.primary, a.btn.primary {
  background: var(--btn-fill);
  color: var(--btn-ink);
  border-color: var(--btn-fill);
}
button.primary:hover, .btn.primary:hover, a.btn.primary:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}

button.primary.gold-outline, .btn.primary.gold-outline {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--accent);
  box-shadow: none;
}
button.primary.gold-outline:hover, .btn.primary.gold-outline:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
  box-shadow: var(--shadow-btn);
}

button.cta, .btn.cta, a.btn.cta,
button.accent, .btn.accent, a.btn.accent {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(212, 168, 75, 0.35);
  border-radius: var(--radius-btn);
}
button.cta:hover, .btn.cta:hover, a.btn.cta:hover,
button.accent:hover, .btn.accent:hover, a.btn.accent:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(212, 168, 75, 0.42);
}

button.danger {
  background: var(--danger);
  color: #fff;
  border: 0;
  border-radius: var(--radius-btn);
  padding: 0 0.9rem;
  height: 38px;
  min-height: 38px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: -0.01em;
}

button.ghost, .btn.ghost, a.btn.ghost {
  background: #ffffff;
  border: 1.5px solid var(--btn-fill);
  color: var(--ink);
  box-shadow: none;
}
button.ghost:hover, .btn.ghost:hover, a.btn.ghost:hover {
  border-color: var(--btn-fill);
  color: var(--ink);
  background: var(--bg-soft);
}

button.pill, .btn.pill, a.btn.pill {
  border-radius: var(--radius-btn);
}
.wiz button.primary, .wiz .btn.primary, .wiz a.btn.primary,
.wiz button.ghost, .wiz .btn.ghost, .wiz a.btn.ghost,
.wiz button.cta, .wiz .btn.cta, .wiz a.btn.cta,
.wiz button.accent, .wiz .btn.accent, .wiz a.btn.accent {
  border-radius: var(--radius-btn);
}

button.tap, .tap { min-height: var(--tap); min-width: var(--tap); }

/* Disabled / cooldown — wiz + admin anti-spam (resend grey-out) */
button:disabled, .tap:disabled, .ghost:disabled,
button.is-cooling, .tap.is-cooling, .ghost.is-cooling,
.btn:disabled, .btn.is-cooling,
.wiz button:disabled, .wiz .tap:disabled, .wiz .ghost:disabled,
.wiz button.is-cooling {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: var(--shadow-btn);
}
button:disabled:hover, .tap:disabled:hover, .ghost:disabled:hover,
button.is-cooling:hover, .tap.is-cooling:hover, .ghost.is-cooling:hover,
.btn:disabled:hover, .wiz button:disabled:hover {
  transform: none !important;
  box-shadow: var(--shadow-btn);
  opacity: 0.45;
}


table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td {
  text-align: left;
  padding: 0.7rem 0.45rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.login-wrap {
  max-width: 440px;
  margin: 5vh auto 2rem;
  text-align: center;
  overflow: hidden;
}
.login-wrap label, .login-wrap input, .login-wrap select, .login-wrap p,
.login-wrap h2, .login-wrap hr { text-align: left; }
body:has(#loginView:not(.hidden)) {
  background: var(--bg);
  min-height: 100vh;
}

.ing-list { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0; }
.ing-list span {
  background: var(--bg-soft);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid var(--line);
}
.ing-list span button {
  border: 0;
  background: transparent;
  cursor: pointer;
  margin-left: 0.2rem;
  min-height: 28px;
  color: var(--accent);
}
.muted { color: var(--muted); font-size: 0.88rem; }
.hidden { display: none !important; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
.check-row {
  display: flex !important;
  gap: 0.55rem;
  align-items: center;
  margin: 0.75rem 0;
  font-size: 0.95rem;
  color: var(--ink);
}
.check-row input { width: auto; min-height: 1.25rem; }
.create-qr {
  margin-top: 0.75rem;
  padding: 0.85rem;
  background: var(--bg-soft);
  border-radius: 12px;
  border: 1px solid var(--line);
}
.banner-warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
  border-bottom: 1px solid #f0e0a8;
}
.banner-support {
  background: var(--ink);
  color: #fff;
  padding: 0.55rem 1rem;
  font-weight: 600;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.15rem 0;
}
.dash-card {
  text-align: left;
  background: var(--bg-pure);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.1rem;
  cursor: pointer;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font: inherit;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.dash-card:hover, .dash-card:focus {
  border-color: rgba(212, 168, 75, 0.55);
  box-shadow: var(--shadow-md);
  outline: 0;
  transform: translateY(-2px);
}
.dash-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}
.dash-card strong {
  font-size: 1.2rem;
  font-family: var(--font); font-weight: 650;
  font-weight: 600;
}
.dash-count { color: var(--accent); font-weight: 700; font-size: 1rem; }
.dash-hint { color: var(--muted); font-size: 0.85rem; }

.sample-box {
  background: var(--accent-soft);
  border: 1px solid rgba(212, 168, 75, 0.35);
  border-radius: 14px;
  padding: 1.1rem;
  margin: 1rem 0;
}
.sample-actions, .tables-actions, .import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.import-preview { margin-top: 0.85rem; overflow: auto; max-height: 420px; }
.warn-row { background: var(--warn-bg) !important; }
.tip-line { color: #8a6f12; font-weight: 600; }

.wizard-steps {
  display: flex;
  gap: 0.4rem;
  margin: 0 0 1rem;
  flex-wrap: wrap;
}
.wizard-steps span {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
}
.wizard-steps span.on {
  background: var(--accent);
  color: var(--btn-ink);
  border-color: var(--accent);
}
.wizard-steps span.done {
  background: var(--accent-soft);
  color: #8a6f12;
  border-color: rgba(212, 168, 75, 0.35);
}

.import-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-top: 0.75rem;
}
.import-card {
  background: var(--bg-pure);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.import-card.warn { border-color: #e8d48a; background: #fffcf5; }
.import-card .media {
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  overflow: hidden;
  position: relative;
}
.import-card .media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.import-card .media .ph {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.import-card .body {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.import-card .body input, .import-card .body select {
  min-height: 36px;
  padding: 0.4rem 0.5rem;
  font-size: 0.88rem;
}
.import-card .name-row { display: flex; gap: 0.4rem; align-items: center; }
.import-card .name-row input[type=checkbox] { width: auto; min-height: auto; }
.import-card .meta { font-size: 0.75rem; color: var(--muted); }
.import-card .price-tag { color: var(--accent); font-weight: 700; }

/* Menu management — modern card grid (not HTML tables) */
.menu-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 1rem;
}
.menu-sec-title {
  margin: 1.35rem 0 0.65rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 700;
  font-family: var(--font);
}
.menu-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.9rem;
}
.menu-dish {
  background: var(--bg-pure);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s, transform 0.12s;
}
.menu-dish:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.menu-dish.unavailable { opacity: 0.62; }
.menu-dish .media {
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, #f0f1f4, #e6e8ec);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.menu-dish .media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.menu-dish .media .ph {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.menu-dish .body { padding: 0.95rem 1rem 1.05rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.menu-dish .body strong { font-family: var(--font); font-weight: 650; font-size: 1.12rem; font-weight: 600; }
.menu-dish .price { color: var(--accent); font-weight: 700; font-size: 1.05rem; }
.menu-dish .tags { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.menu-dish .tags span {
  font-size: 0.7rem;
  background: var(--bg-soft);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid var(--line);
}
.menu-dish .actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.55rem;
  flex-wrap: wrap;
}
.menu-dish .actions button { min-height: 40px; font-size: 0.88rem; }

.allergen-presets, .diet-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  margin: 0.35rem 0 0.75rem;
  padding: 0.75rem 0.85rem;
  background: var(--bg-soft);
  border-radius: 12px;
  border: 1px solid var(--line);
}
.allergen-presets label, .diet-presets label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 500;
  margin: 0;
  cursor: pointer;
  min-height: 40px;
  padding: 0.2rem 0.15rem;
  color: var(--ink);
}
.allergen-presets input, .diet-presets input { width: auto; min-height: 1.1rem; }

.k-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0; }
.k-chip {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #8a6f12;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(212, 168, 75, 0.3);
}
.k-why { font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem; }
.banner {
  background: var(--warn-bg);
  border: 1px solid #f0e0a8;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  margin: 0.75rem 0;
  font-size: 0.9rem;
  color: var(--warn-ink);
}
.steps { display: flex; gap: 0.35rem; margin-bottom: 1rem; flex-wrap: wrap; }
.steps span {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
}
.steps span.on { background: var(--ink); color: #fafaf8; }
.steps span.done { background: var(--accent-soft); color: var(--accent); }
code.block {
  display: block;
  white-space: pre-wrap;
  background: var(--bg-soft);
  padding: 0.75rem;
  border-radius: 12px;
  font-size: 0.82rem;
  border: 1px solid var(--line);
}
code {
  background: var(--bg-soft);
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
  font-size: 0.85em;
}

/* Kitchen tickets — light, high-contrast, huge table # */
.ticket-big {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.25rem 1.35rem;
  margin: 1rem 0;
  background: var(--bg-pure);
  box-shadow: var(--shadow);
}
.ticket-big .table-huge {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-family: var(--font); font-weight: 650;
  color: var(--ink);
}
.ticket-big .ticket-type {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
  letter-spacing: 0.03em;
}
.ticket-food { border-color: rgba(212, 168, 75, 0.35); background: #fffcf5; }
.ticket-food .ticket-type {
  background: var(--ink);
  color: var(--btn-ink);
}
.ticket-waiter { border-color: #b8c8e8; background: #f4f7fc; }
.ticket-waiter .ticket-type { background: #5a7ab0; color: #fff; }
.ticket-waiter .table-huge { color: #2a4060; }
.ticket-bill { border-color: #e8d48a; background: #fff9eb; }
.ticket-bill .ticket-type { background: var(--accent); color: var(--btn-ink); }
.ticket-bill .table-huge { color: #8a6f12; }
.ticket-big button.primary {
  width: 100%;
  margin-top: 0.9rem;
  font-size: 1.2rem;
  padding: 1rem;
}
.ticket-big ul { font-size: 1.15rem; }

a { color: var(--accent); }

.guide .tip {
  background: var(--accent-soft);
  border: 1px solid rgba(212, 168, 75, 0.35);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0.75rem 0;
  color: var(--ink);
}
.guide .step-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin: 0.7rem 0;
  padding: 1rem;
  background: var(--bg-pure);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.guide .step-card .n {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--btn-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
  margin: 0.75rem 0 1.25rem;
}
.stat-card {
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 1rem;
  border: 1px solid var(--line);
}
.stat-card .n {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--font); font-weight: 650;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat-card .l { font-size: 0.8rem; color: var(--muted); font-weight: 600; margin-top: 0.2rem; }

/* Mobile: sidebar as drawer */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 28;
  backdrop-filter: blur(2px);
}
.sidebar-backdrop.show { display: block; }

@media (max-width: 900px) {
  .app-shell,
  .app-shell.collapsed {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(300px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-md);
  }
  .app-shell.side-open .sidebar { transform: translateX(0); }
  .app-shell.collapsed .nav-lbl,
  .app-shell.collapsed .sidebar-rest,
  .app-shell.collapsed .sidebar-footer .foot-lbl {
    display: initial;
  }
  .app-shell.collapsed .sidebar-brand { justify-content: flex-start; padding: 1.15rem 1rem 1rem; }
  .app-shell.collapsed nav.side button,
  .app-shell.collapsed nav.side .side-link {
    justify-content: flex-start;
    padding: 0.7rem 0.85rem;
  }
  .btn-collapse-desk { display: none !important; }
  .topbar { display: flex; }
  .row { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-card { min-height: 120px; }
  main.panel { padding: 1rem; }
  .ticket-big .table-huge { font-size: 2.7rem; }
  .menu-cards { grid-template-columns: 1fr; }
}
@media (min-width: 901px) {
  .btn-open-side { display: none !important; }
}


/* ——— Premium setup wizard ——— */
body.wiz-page {
  background: var(--bg);
  min-height: 100vh;
}
body.wiz-page .top { display: none; }

.wiz-top {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wiz-top a {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}
.wiz-top a:hover { color: var(--ink); }
.wiz-top .brand-lockup strong {
  font-family: var(--font); font-weight: 650;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.wiz {
  max-width: 720px;
  margin: 1.5rem auto 3.5rem;
  padding: 0 1.5rem;
}
.wiz-shell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 4px 6px rgba(10, 10, 10, 0.03), 0 18px 48px rgba(10, 10, 10, 0.07);
  padding: 2rem 2rem 1.85rem;
}
.wiz .banner {
  background: var(--accent-soft);
  border: 1px solid #E8D9A8;
  color: var(--warn-ink);
  padding: 0.85rem 1.05rem;
  border-radius: 14px;
  margin: 0 0 1.35rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
.wiz-progress {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.wiz-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
  counter-reset: wiz;
}
.wiz-steps li {
  flex: 1;
  position: relative;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2.35rem;
}
.wiz-steps li::before {
  counter-increment: wiz;
  content: counter(wiz);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: #fff;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0;
  z-index: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.wiz-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.05rem;
  left: calc(50% + 1.2rem);
  right: calc(-50% + 1.2rem);
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.wiz-steps li.on { color: var(--ink); }
.wiz-steps li.on::before {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(212, 168, 75, 0.4);
}
.wiz-steps li.done { color: var(--accent); }
.wiz-steps li.done::before {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
  content: "✓";
  font-size: 0.85rem;
}
.wiz-steps li.done:not(:last-child)::after { background: var(--accent); }

.wiz h2 {
  font-family: var(--font); font-weight: 650;
  font-weight: 600;
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem;
  color: var(--ink);
  line-height: 1.15;
}
.wiz .lead {
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0 0 1.5rem;
  line-height: 1.55;
  max-width: 40ch;
}
.wiz-nav {
  margin-top: 1.75rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.wiz-nav .primary,
.wiz-nav .ghost,
.wiz .wiz-nav button {
  min-width: 110px;
  font-size: 0.95rem;
  height: 44px;
}
.wiz .muted { color: var(--muted); font-size: 0.9rem; }
.wiz #msg { min-height: 1.25rem; margin-top: 0.85rem; }

/* Sample cuisine as big selectable cards */
.wiz .sample-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin: 0.25rem 0 1.35rem;
}
.wiz .sample-card {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
  width: 100%;
  min-height: 112px;
  padding: 1.25rem 1.2rem;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, background 0.15s;
}
.wiz .sample-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.wiz .sample-card:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}
.wiz .sample-card.is-selected,
.wiz .sample-card[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px rgba(212, 168, 75, 0.25), var(--shadow);
}
.wiz .sample-card .sc-emoji {
  font-size: 1.65rem;
  line-height: 1;
}
.wiz .sample-card .sc-title {
  font-family: var(--font); font-weight: 650;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.wiz .sample-card .sc-sub {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: -0.01em;
}
@media (max-width: 560px) {
  .wiz .sample-actions { grid-template-columns: 1fr; }
  .wiz-shell { padding: 1.5rem 1.25rem 1.35rem; }
}


@media (max-width: 640px) {
  .wiz { padding: 0 1rem; margin: 1rem auto 2.5rem; }
  .wiz-shell { padding: 1.25rem 1.1rem 1.2rem; border-radius: 14px; }
  .wiz-top { padding: 1rem 1rem 0; }
  .wiz-steps li { font-size: 0; padding-top: 2.2rem; }
  .wiz .sample-actions { grid-template-columns: 1fr; }
  .wiz-nav { flex-direction: column; }
  .wiz-nav .primary, .wiz-nav .ghost, .wiz .wiz-nav button { width: 100%; min-width: 0; }
  .wiz h2 { font-size: 1.45rem; }
}


/* Import readiness badges (owner-facing, no raw %) */
.import-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }
.import-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  line-height: 1.3;
}
.import-badge.badge-ok { background: #d8f5e4; color: #1a6b3c; }
.import-badge.badge-warn { background: #fff3cd; color: #7a5a00; }
.import-badge.badge-muted { background: #eceff3; color: #555; }
.guest-link-line a { color: var(--accent, #c45c26); }
#phoneStatusLine { margin-bottom: 0.5rem; }


/* Saved tables list + language switcher */
.lang-select, .lang-switch select {
  font: inherit;
  padding: .35rem .5rem;
  border-radius: 8px;
  border: 1px solid var(--line, #333);
  background: var(--card, #1a1f1c);
  color: inherit;
}
.login-lang { display:flex; justify-content:flex-end; margin-bottom:.5rem; }
.saved-tables-list { margin:.5rem 0 1rem; }
.saved-table-grid { display:flex; flex-direction:column; gap:.5rem; }
.saved-table-row {
  display:flex; flex-wrap:wrap; gap:.5rem 1rem; align-items:center;
  padding:.65rem .75rem; border:1px solid rgba(255,255,255,.08); border-radius:10px;
  background: rgba(0,0,0,.15);
}
.saved-table-actions { display:flex; gap:.35rem; flex-wrap:wrap; margin-left:auto; }


/* Desktop language control in sidebar (topbar lang is mobile-only) */
.side-lang-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.55rem 0.55rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
}
.side-lang-wrap .lang-select--side {
  flex: 0 0 auto;
  min-width: 4.2rem;
}
.app-shell.collapsed .side-lang-wrap .side-lang-lbl {
  display: none;
}
.app-shell.collapsed .side-lang-wrap {
  justify-content: center;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}


/* ——— Wave B: analytics-first dashboard + food-forward polish ——— */
.dash-home-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  margin-bottom: 0.35rem;
}
.dash-home-head h2 { margin: 0 0 0.25rem; }
.dash-home-head .muted { margin: 0; max-width: 36rem; }

.period-seg {
  display: inline-flex;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem;
  gap: 0.15rem;
}
.period-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  min-height: 40px;
}
.period-btn.on {
  background: var(--bg-pure);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.period-btn:focus-visible { outline: 0; box-shadow: var(--focus-ring); }

.dash-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.1rem 0 1.25rem;
}
.metric-card {
  background: linear-gradient(165deg, #fffefb 0%, var(--bg-pure) 55%, var(--accent-soft) 140%);
  border: 1px solid rgba(212, 168, 75, 0.22);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow);
  min-height: 92px;
}
.metric-n {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}
.metric-l {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-inset {
  background: var(--bg-pure);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.15rem;
  box-shadow: var(--shadow);
}
.dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.dash-section-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
}
.tiny-btn { min-height: 36px !important; padding: 0.35rem 0.75rem !important; font-size: 0.82rem !important; }

.bestseller-list { display: flex; flex-direction: column; gap: 0.55rem; }
.bs-row {
  display: grid;
  grid-template-columns: 1.6rem 3.1rem minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.45rem 0.35rem;
  border-radius: 14px;
}
.bs-row:hover { background: var(--accent-soft); }
.bs-rank {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
  text-align: center;
}
.bs-thumb {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.bs-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bs-ph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #8a6f12;
  background: linear-gradient(145deg, #fbf6e9, #f0e0b8);
  font-size: 1rem;
}
.bs-name {
  font-weight: 650;
  font-size: 0.98rem;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bs-bar-track {
  height: 7px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
}
.bs-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #d4a84b, #e8c56a);
  min-width: 4px;
}
.bs-count {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
  min-width: 2.4rem;
  text-align: right;
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.15rem 0 0.35rem;
}
.dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-pure);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.dash-chip:hover, .dash-chip:focus-visible {
  border-color: rgba(212, 168, 75, 0.55);
  box-shadow: var(--shadow-md);
  outline: 0;
  transform: translateY(-1px);
}

/* Menu food-forward */
.menu-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.cat-chip {
  border: 1px solid var(--line);
  background: var(--bg-pure);
  color: var(--muted);
  font: inherit;
  font-weight: 650;
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  min-height: 38px;
}
.cat-chip.on {
  background: var(--accent-soft);
  color: #6b5410;
  border-color: rgba(212, 168, 75, 0.45);
}
.menu-sec-title { margin: 0.35rem 0 0.75rem; border: 0; letter-spacing: 0; text-transform: none; }
.menu-sec-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #6b5410;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(212, 168, 75, 0.3);
}
.menu-cards {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.menu-dish {
  border-radius: 20px;
  border-color: rgba(212, 168, 75, 0.14);
}
.menu-dish .media {
  aspect-ratio: 5 / 4;
  background: linear-gradient(160deg, #f7f1e4, #ebe4d6);
}
.menu-dish .body { padding: 1rem 1.05rem 1.1rem; gap: 0.4rem; }
.menu-dish-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}
.menu-dish-top strong {
  font-size: 1.08rem;
  line-height: 1.25;
  flex: 1;
}
.menu-dish .price {
  flex-shrink: 0;
  font-size: 1.02rem;
}
.menu-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.menu-ings {
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.menu-dish .tags span {
  background: #fffaf0;
  border-color: rgba(212, 168, 75, 0.25);
  color: #7a6520;
}

/* Settings readability */
.settings-page h3 {
  margin: 1.35rem 0 0.55rem;
  padding: 0.65rem 0.85rem;
  background: var(--accent-soft);
  border-radius: 12px;
  border: 1px solid rgba(212, 168, 75, 0.22);
  font-size: 1rem;
}
.settings-page h3:first-of-type { margin-top: 0.5rem; }
.settings-page label {
  font-weight: 650;
  color: var(--ink);
  margin-top: 0.65rem;
}
.settings-page .sep {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 1.35rem 0;
}
.settings-save-row {
  margin-top: 1.35rem;
  padding: 1rem;
  background: var(--accent-soft);
  border: 1px solid rgba(212, 168, 75, 0.35);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.settings-save-row .primary {
  min-width: 10rem;
  font-size: 1rem;
}

@media (max-width: 900px) {
  .dash-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bs-row { grid-template-columns: 1.35rem 2.6rem minmax(0, 1fr) auto; gap: 0.45rem; }
  .bs-thumb { width: 2.6rem; height: 2.6rem; }
  .menu-cards { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (max-width: 520px) {
  .dash-metrics { grid-template-columns: 1fr 1fr; gap: 0.55rem; }
  .metric-n { font-size: 1.55rem; }
  .period-btn { padding: 0.4rem 0.7rem; font-size: 0.82rem; }
  .dash-chip { flex: 1 1 calc(50% - 0.45rem); justify-content: center; }
}

/* —— Kitchen floor (tables grid + drawer, tablet-friendly) —— */
body.kitchen-body #kitchenApp .top {
  flex-wrap: wrap;
  gap: 0.75rem;
}
.kitchen-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}
.kitchen-panel {
  max-width: none !important;
  margin: 0 !important;
  padding: 0.65rem 0.9rem 1.35rem;
}
.kitchen-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 1rem;
  margin-bottom: 0.75rem;
}
.kitchen-status {
  font-size: 1.05rem;
  margin: 0;
  flex: 1 1 14rem;
}
.kitchen-summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.kf-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #fffcf5;
  min-height: 2rem;
}
.kf-pill--new { border-color: rgba(196, 92, 74, 0.45); background: #fff4f1; color: #8a3228; }
.kf-pill--cooking { border-color: rgba(212, 168, 75, 0.55); background: #fff8e8; color: #7a5520; }
.kf-pill--ready { border-color: rgba(61, 139, 110, 0.45); background: #eef8f3; color: #24614a; }
.kf-pill--bill { border-color: rgba(90, 122, 176, 0.45); background: #eef2fa; color: #2f4a7a; }

.kitchen-tickets { min-height: 50vh; }
.kf-empty { font-size: 1.1rem; padding: 1.5rem 0.5rem; }

.kf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.7rem;
}

.kf-mesa {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.25rem;
  min-height: 6.4rem;
  padding: 0.85rem 0.9rem 0.75rem;
  text-align: left;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: #fffcf5;
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.kf-mesa:hover, .kf-mesa:focus-visible {
  outline: none;
  border-color: rgba(212, 168, 75, 0.75);
  box-shadow: 0 4px 16px rgba(90, 60, 20, 0.12);
}
.kf-mesa--selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.35);
}
.kf-mesa--idle {
  opacity: 0.78;
  background: #f7f3ea;
  border-color: var(--line-soft);
}
.kf-mesa--hot {
  opacity: 1;
}
.kf-mesa--new {
  border-color: #c45c4a;
  background: #fff6f4;
  box-shadow: 0 0 0 3px rgba(196, 92, 74, 0.22);
}
.kf-mesa--cooking {
  border-color: #d4a84b;
  background: #fff9ec;
  box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.28);
}
.kf-mesa--ready {
  border-color: #3d8b6e;
  background: #f1faf6;
  box-shadow: 0 0 0 3px rgba(61, 139, 110, 0.25);
}
.kf-mesa--bill {
  border-color: #5a7ab0;
  background: #f3f6fc;
  box-shadow: 0 0 0 3px rgba(90, 122, 176, 0.25);
}

.kf-mesa-label {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}
.kf-mesa-hint {
  font-size: 0.95rem;
  font-weight: 600;
}
.kf-mesa-dots {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.2rem;
  min-height: 0.55rem;
}
.kf-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  display: inline-block;
}
.kf-dot--new { background: #c45c4a; }
.kf-dot--cooking { background: #d4a84b; }
.kf-dot--ready { background: #3d8b6e; }
.kf-dot--bill { background: #5a7ab0; }

.kf-mesa-badge {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.4rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  line-height: 1;
}
.kf-mesa-badge--new { background: #c45c4a; }
.kf-mesa-badge--cooking { background: #b8860b; color: #fff; }
.kf-mesa-badge--ready { background: #3d8b6e; }
.kf-mesa-badge--bill { background: #5a7ab0; }

/* Drawer / sheet */
.kf-drawer[hidden] { display: none !important; }
.kf-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
}
.kf-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 28, 12, 0.38);
}
.kf-drawer-panel {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  max-width: 100%;
  height: 100%;
  background: #fffcf5;
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 28px rgba(40, 28, 12, 0.18);
  display: flex;
  flex-direction: column;
  animation: kf-slide-in 0.18s ease-out;
}
@keyframes kf-slide-in {
  from { transform: translateX(12px); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}
.kf-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--line-soft);
  background: #fff8e8;
}
.kf-drawer-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.kf-drawer-sub {
  margin: 0.2rem 0 0;
  font-size: 1rem;
}
.kf-drawer-close {
  min-width: 2.75rem;
  min-height: 2.75rem;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.kf-drawer-body {
  flex: 1;
  overflow: auto;
  padding: 0.85rem;
  -webkit-overflow-scrolling: touch;
}
.kf-drawer-empty {
  font-size: 1.1rem;
  padding: 1rem 0.25rem;
}
.kf-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.kb-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem 0.95rem;
  box-shadow: var(--shadow);
}
.kb-card--bill {
  border-color: rgba(90, 122, 176, 0.45);
  background: #f5f8fc;
}
.kb-card--cooking {
  border-color: rgba(212, 168, 75, 0.45);
  background: #fff8f0;
}
.kb-card--ready {
  border-color: rgba(61, 139, 110, 0.4);
  background: #f4fbf7;
}
.kb-card--new {
  border-color: rgba(196, 92, 74, 0.35);
  background: #fff8f6;
}
.kb-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.kf-ticket-status {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kb-meta { font-size: 0.92rem; margin-bottom: 0.4rem; }
.kb-items, .kf-items {
  margin: 0.4rem 0 0.55rem;
  padding-left: 0;
  list-style: none;
  font-size: 1.22rem;
  line-height: 1.4;
}
.kf-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.45rem;
  margin: 0.35rem 0;
  padding: 0.2rem 0;
  border-bottom: 1px dashed var(--line-soft);
}
.kf-item:last-child { border-bottom: 0; }
.kf-item-qty {
  font-weight: 800;
  color: var(--warn-ink);
  font-size: 1.15em;
  min-width: 2.1rem;
}
.kf-item-name {
  font-weight: 700;
  color: var(--ink);
  flex: 1 1 8rem;
}
.kb-notes {
  margin: 0.25rem 0 0.5rem;
  font-size: 1rem;
}
.kb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}
.kb-actions .tap {
  min-height: 2.75rem;
  min-width: 5.5rem;
  font-size: 1.05rem;
  padding: 0.6rem 1rem;
}

.kb-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.kb-badge--food { background: #5a3d1a; color: #fff; }
.kb-badge--added { background: #7a5520; color: #fff; }
.kb-badge--waiter { background: #5a7ab0; color: #fff; }
.kb-badge--bill { background: var(--accent); color: var(--btn-ink); }

@media (max-width: 720px) {
  .kf-grid { grid-template-columns: repeat(auto-fill, minmax(8.2rem, 1fr)); gap: 0.55rem; }
  .kf-mesa { min-height: 5.8rem; padding: 0.7rem 0.75rem; }
  .kf-mesa-label { font-size: 1.35rem; }
  .kf-drawer-panel {
    width: 100%;
    border-left: 0;
    border-radius: 1rem 1rem 0 0;
    margin-top: auto;
    height: min(88vh, 100%);
    align-self: flex-end;
  }
  .kf-drawer { align-items: flex-end; }
  .kitchen-panel { padding: 0.5rem 0.65rem 1.25rem; }
}
@media (min-width: 1100px) {
  .kf-grid { grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); }
  .kf-mesa-label { font-size: 1.7rem; }
  .kf-drawer-panel { width: min(32rem, 42vw); }
}

.kf-name-fb{opacity:.45;font-weight:700;margin-left:.15rem}


/* === Kitchen premium polish v52 === */
.md-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
}
.md-brand:hover { color: var(--ink); }
.md-mark { width: 32px; height: 32px; display: block; flex-shrink: 0; }
.md-mark--lg { width: 56px; height: 56px; }
.md-word {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  line-height: 1;
  position: relative;
  color: var(--ink);
  padding-right: 0.35rem;
}
.md-word::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  right: 0;
  top: 52%;
  transform: translateY(-50%);
}
.md-brand--login {
  flex-direction: column;
  gap: 0.65rem;
  margin: 0 auto 0.75rem;
  text-align: center;
}
.md-brand--login .md-word { font-size: 1.85rem; }
.md-brand--login .md-word::after { width: 6px; height: 6px; }
.md-brand--top .md-word { font-size: 1.25rem; }

body.kitchen-body {
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(212, 168, 75, 0.12), transparent 55%),
    linear-gradient(180deg, #FBF8F1 0%, #F7F4EE 40%, #F0EBE3 100%);
}
body.kitchen-body #kitchenApp .top {
  background: rgba(255, 252, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212, 168, 75, 0.22);
  padding: 0.7rem 1rem;
  align-items: center;
  box-shadow: 0 1px 0 rgba(255,255,255,0.7);
}
body.kitchen-body .brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
body.kitchen-body .kf-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding-left: 0.65rem;
  border-left: 1px solid var(--line);
}
body.kitchen-body .kitchen-top-actions .ghost.tap,
body.kitchen-body .kitchen-top-actions .primary.tap,
body.kitchen-body .kitchen-top-actions .lang-select {
  min-height: 2.65rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.92rem;
}
body.kitchen-body .kitchen-top-actions .ghost.tap {
  background: #fffcf5;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
body.kitchen-body .kitchen-top-actions .primary.tap {
  background: var(--accent);
  color: var(--ink);
  border: 1px solid var(--accent);
  box-shadow: 0 2px 10px rgba(212, 168, 75, 0.3);
}
body.kitchen-body .kitchen-status {
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink);
}
body.kitchen-body .kf-pill {
  font-size: 0.98rem;
  padding: 0.4rem 0.85rem;
  background: #fffcf5;
  box-shadow: 0 1px 2px rgba(90, 60, 20, 0.04);
}
body.kitchen-body .kf-grid {
  grid-template-columns: repeat(auto-fill, minmax(10.25rem, 1fr));
  gap: 0.85rem;
}
body.kitchen-body .kf-mesa {
  min-height: 7.1rem;
  padding: 1rem 1rem 0.9rem;
  border-radius: 16px;
  background: linear-gradient(165deg, #fffef9, #fffcf5);
  border-width: 2px;
  box-shadow: 0 1px 2px rgba(90, 60, 20, 0.04), 0 10px 24px rgba(90, 60, 20, 0.06);
}
body.kitchen-body .kf-mesa--idle {
  background: #f5f0e6;
  opacity: 0.88;
}
body.kitchen-body .kf-mesa-label {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
body.kitchen-body .kf-mesa-hint {
  font-size: 1.02rem;
}
body.kitchen-body .kf-mesa-badge {
  min-width: 1.9rem;
  height: 1.9rem;
  font-size: 1rem;
}
body.kitchen-body .kf-empty {
  font-size: 1.2rem;
  color: var(--muted);
  text-align: center;
  padding: 2.5rem 1rem;
  background: rgba(255, 252, 245, 0.7);
  border: 1px dashed rgba(212, 168, 75, 0.35);
  border-radius: 16px;
}
body.kitchen-body .kf-drawer-panel {
  background: #fffcf5;
  border-left: 1px solid rgba(212, 168, 75, 0.25);
}
body.kitchen-body .kf-drawer-head {
  background: linear-gradient(180deg, #fff8e8, #fffcf5);
  padding: 1.15rem 1.15rem 0.9rem;
}
body.kitchen-body .kf-drawer-title {
  font-size: 1.9rem;
  letter-spacing: -0.03em;
}
body.kitchen-body .kf-drawer-sub { font-size: 1.05rem; }
body.kitchen-body .kb-items,
body.kitchen-body .kf-items { font-size: 1.28rem; }
body.kitchen-body .kf-item-name { font-size: 1.05em; }
body.kitchen-body .kb-actions .tap {
  min-height: 3rem;
  font-size: 1.08rem;
  border-radius: 12px;
}
body.kitchen-body #kitchenLogin.card {
  background: #fffcf5;
  border: 1px solid rgba(212, 168, 75, 0.28);
  box-shadow: 0 12px 40px rgba(90, 60, 20, 0.08);
  border-radius: 18px;
}
@media (min-width: 900px) {
  body.kitchen-body .kf-mesa-label { font-size: 1.85rem; }
  body.kitchen-body .kf-grid { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
}
@media (min-width: 1100px) {
  body.kitchen-body .kf-drawer-panel { width: min(34rem, 40vw); }
}

/* —— Kitchen header v2: one clean row, compact language, calm status —— */
body.kitchen-body #kitchenApp .kf-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  min-height: 64px;
  padding: 0.55rem 1.1rem;
}
body.kitchen-body .kf-top .brand-lockup { min-width: 0; flex: 1 1 auto; }
body.kitchen-body .kf-top .brand-logo { height: 44px; max-width: 120px; }
body.kitchen-body .kf-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-left: 0.75rem;
  border-left: 1px solid var(--line);
  line-height: 1.15;
}
body.kitchen-body .kf-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a7a32;
}
body.kitchen-body .kf-top .kf-title {
  border-left: 0;
  padding-left: 0;
  font-size: 1.12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}
body.kitchen-body .kf-top .kitchen-top-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}
body.kitchen-body .kf-top .kitchen-top-actions .lang-select.kf-lang {
  width: auto;
  min-width: 0;
  max-width: 4.9rem;
  flex: 0 0 auto;
  margin: 0;
  padding: 0 1.6rem 0 0.7rem;
  height: 2.5rem;
  min-height: 2.5rem;
  font-size: 0.88rem;
  font-weight: 700;
  background-color: #fffcf5;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
}
body.kitchen-body .kf-top .kf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: auto;
  height: 2.5rem;
  min-height: 2.5rem;
  margin: 0;
  padding: 0 0.85rem;
  white-space: nowrap;
  text-decoration: none;
  font-size: 0.9rem;
}
body.kitchen-body .kf-top .kf-btn .kf-ico { font-size: 1rem; line-height: 1; }
body.kitchen-body .kf-top #btnSound.is-on {
  background: #fff4d6;
  border-color: rgba(212, 168, 75, 0.7);
}
body.kitchen-body .kf-top .kf-btn--quiet { color: var(--muted); }

body.kitchen-body .kitchen-panel { min-height: calc(100vh - 64px); }
body.kitchen-body .kitchen-summary { margin: 0.35rem 0 0.9rem; }
body.kitchen-body .kf-status-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.75rem;
  flex: 1 1 16rem;
  min-width: 0;
}
body.kitchen-body .kitchen-status { flex: 0 1 auto; margin: 0; font-size: 1.15rem; }
body.kitchen-body .kitchen-status.is-busy { color: #8a3228; }
body.kitchen-body .kitchen-status.is-offline { color: #a1462f; }
body.kitchen-body .kf-updated { font-size: 0.85rem; }
body.kitchen-body .kf-quiet {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.95rem;
  font-size: 0.98rem;
  background: rgba(255, 252, 245, 0.75);
  border: 1px dashed rgba(212, 168, 75, 0.4);
  border-radius: 12px;
}
body.kitchen-body .kf-empty-state {
  max-width: 30rem;
  margin: 3rem auto;
  padding: 2rem 1.5rem;
  text-align: center;
  background: rgba(255, 252, 245, 0.85);
  border: 1px dashed rgba(212, 168, 75, 0.45);
  border-radius: 18px;
}
body.kitchen-body .kf-empty-ico { font-size: 2.2rem; }
body.kitchen-body .kf-empty-title { margin: 0.5rem 0 0.35rem; font-size: 1.35rem; }
body.kitchen-body .kf-empty-state p { margin: 0; font-size: 1.02rem; }

/* Tablet portrait: labels stay, logo shrinks */
@media (max-width: 1024px) {
  body.kitchen-body .kf-top .brand-logo { height: 38px; max-width: 100px; }
  body.kitchen-body .kf-top .kf-title { max-width: 30vw; }
}
/* Phone: title row, then one compact row of actions (icons for sound/refresh) */
@media (max-width: 640px) {
  body.kitchen-body #kitchenApp .kf-top {
    flex-wrap: wrap;
    padding: 0.5rem 0.75rem;
    gap: 0.45rem;
  }
  body.kitchen-body .kf-top .brand-lockup { flex: 1 1 100%; }
  body.kitchen-body .kf-top .brand-logo { height: 34px; max-width: 88px; }
  body.kitchen-body .kf-top .kf-title { max-width: 60vw; font-size: 1.05rem; }
  body.kitchen-body .kf-top .kitchen-top-actions { flex: 1 1 100%; justify-content: flex-start; }
  body.kitchen-body .kf-top .kf-btn { padding: 0 0.7rem; height: 2.4rem; min-height: 2.4rem; }
  body.kitchen-body .kf-top #btnSound .kf-btn-label,
  body.kitchen-body .kf-top #btnRefresh .kf-btn-label { display: none; }
  body.kitchen-body .kf-top #btnSound,
  body.kitchen-body .kf-top #btnRefresh { width: 2.6rem; padding: 0; }
  body.kitchen-body .kf-top .kf-btn--quiet { margin-left: auto; }
  body.kitchen-body .kitchen-panel { min-height: calc(100vh - 100px); }
  body.kitchen-body .kitchen-status { font-size: 1.05rem; }
}

/* v67: sidebar language select stays compact inside the sidebar */
.side-lang-wrap .lang-select--side {
  width: auto !important;
  max-width: 5.5rem;
  min-width: 4.2rem;
  flex: 0 0 auto;
}

/* Round 2: compact language select on login cards (admin + kitchen) */
.login-lang .lang-select { width:auto; min-width:4.2rem; max-width:5.5rem; flex:0 0 auto; }

/* Round 3: owner translation editor */
.tr-editor { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid rgba(212,168,75,.35); }
.tr-editor h3 { margin: 0 0 .25rem; font-size: 1.15rem; }
.tr-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0 .9rem; }
.tr-tab { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .35rem .8rem;
  border-radius: 999px; border: 1px solid rgba(60,45,20,.18); background: #fffdf8; font-weight: 600;
  letter-spacing: .02em; cursor: pointer; color: #3b2f1c; }
.tr-tab small { font-weight: 500; font-size: .72rem; color: #6f6044; letter-spacing: 0; }
.tr-tab.on { background: #2b2216; color: #fff7e6; border-color: #2b2216; }
.tr-tab.on small { color: #e8d6ac; }
.tr-dot { width: .55rem; height: .55rem; border-radius: 50%; display: inline-block; background: #9bb58a; }
.tr-dot-src { background: #c9a44c; }
.tr-dot-owner { background: #d4a84b; box-shadow: 0 0 0 2px rgba(212,168,75,.3); }
.tr-dot-missing { background: #c9c2b4; }
.tr-dot-dirty { background: #c0533a; }
.tr-ref { background: rgba(245,238,222,.6); border: 1px dashed rgba(212,168,75,.45); border-radius: 12px;
  padding: .7rem .9rem; margin-bottom: .9rem; }
.tr-ref-title { font-size: .75rem; font-style: italic; color: #7a6a4c; margin-bottom: .2rem; }
.tr-ref-name { font-weight: 700; }
.tr-ref-desc { color: #5d5140; margin-top: .15rem; }
.tr-state { display: inline-block; margin: 0 0 .6rem; padding: .25rem .65rem; border-radius: 999px;
  font-size: .85rem; background: #eef4e8; color: #3f5a2f; }
.tr-state-owner { background: #fbf1d9; color: #7a5a14; }
.tr-state-missing { background: #f1eee8; color: #6b6356; }
.tr-state-pending { background: #eef2f8; color: #3a4f6e; }
.tr-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.tr-editor textarea { min-height: 84px; }
@media (max-width: 640px) {
  .tr-tab { padding: .3rem .6rem; }
}
/* Round 3: mobile top bar keeps one line; editor title not hidden under the sticky bar */
.topbar #topNameMobile { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .topbar-spacer { flex: 0 0 .25rem; }
.topbar .lang-select { width: auto; flex: 0 0 auto; }
.tr-editor { scroll-margin-top: 76px; }
/* Kitchen: waiter calls / bill requests are requests, not comandas — compact card */
.kb-card.kf-request { padding: .7rem .9rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.kf-request--waiter { border-left: 4px solid #5a7ab0; background: #f3f6fb; }
.kf-request--bill { border-left: 4px solid var(--accent); background: #fbf6ea; }
.kf-request-line { font-size: 1.02rem; line-height: 1.3; }
.kf-request-title { font-weight: 700; }
.kf-request-age { font-size: .88rem; }
.kf-request .kb-actions { margin: 0; }
.kf-mesa-badge--req { font-size: .95rem; }

/* === v74 — approved wide gold wordmark everywhere (3.4:1; sized by width, height auto) === */
.logo-wide-pic, .logo-mark-pic { display: contents; }
img.brand-logo.logo-wide {
  height: auto !important;
  aspect-ratio: 355 / 104;
  max-width: 100% !important;
  object-fit: contain;
}
/* Login cards: owner login, admin login gate, kitchen password, platform */
.brand-plate--login, .login-wrap .brand-plate--centered, #kLogin .brand-plate--centered, .brand-plate--centered {
  width: auto;
}
.brand-plate--login { width: calc(100% + 2.8rem); padding: 1.6rem 1.25rem 1.1rem; }
img.brand-logo--lg.logo-wide { width: clamp(200px, 62vw, 260px) !important; }

/* Legacy .top bars (help, cookies, privacy, platform, dev hosts) + setup wizard header */
.top .brand-plate--top, .wiz-top .brand-plate--top {
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  border-radius: 0 !important;
  overflow: visible;
}
.top .brand-plate--top img.brand-logo.logo-wide,
.wiz-top .brand-plate--top img.brand-logo.logo-wide {
  width: 150px !important;
  height: auto !important;
}

/* Owner admin sidebar: wordmark on top, venue name + role below */
.sidebar-brand { flex-wrap: wrap; row-gap: 0.55rem; }
.sidebar-brand .brand-plate--side {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  flex: 1 1 auto;
  justify-content: flex-start;
  overflow: visible;
}
.sidebar-brand .btn-collapse-desk { order: 1; align-self: center; }
.sidebar-brand .brand-plate--side img.brand-logo.logo-wide { width: 168px !important; height: auto !important; }
.sidebar-brand .brand-plate--side .brand-mark { display: none; }
.sidebar-brand .sidebar-rest { flex: 1 1 100%; order: 2; }
@media (min-width: 901px) {
  /* collapsed rail (78px): the wordmark's own M+fork glyph */
  .app-shell.collapsed .sidebar-brand .brand-plate--side { justify-content: center; flex-basis: 100%; }
  .app-shell.collapsed .sidebar-brand .brand-plate--side img.brand-logo.logo-wide { display: none; }
  .app-shell.collapsed .sidebar-brand .brand-plate--side .brand-mark { display: block; width: 44px; height: auto; }
}
/* Owner admin phone topbar */
.topbar .brand-plate--top {
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  border-radius: 0 !important;
  overflow: visible;
  flex-shrink: 0;
}
.topbar .brand-plate--top img.brand-logo.logo-wide { width: 118px !important; height: auto !important; }
.topbar #topNameMobile { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Kitchen header (dark): readable wordmark, soft shadow only */
body.kitchen-body .kf-top img.brand-logo.logo-wide {
  width: 150px !important;
  max-width: none !important;
  height: auto !important;
}
@media (max-width: 1024px) {
  body.kitchen-body .kf-top img.brand-logo.logo-wide { width: 136px !important; }
}
@media (max-width: 640px) {
  body.kitchen-body .kf-top img.brand-logo.logo-wide { width: 124px !important; }
}
@media (max-width: 520px) {
  .top .brand-plate--top img.brand-logo.logo-wide,
  .wiz-top .brand-plate--top img.brand-logo.logo-wide { width: 124px !important; }
}
/* Phone: the wider wordmark needs its own line room */
@media (max-width: 560px) {
  .wiz-top { flex-wrap: wrap; row-gap: 0.6rem; }
  .wiz-top > div { width: 100%; justify-content: flex-start; column-gap: 0.55rem !important; }
  .wiz-top > div > select { width: auto; }
}
@media (max-width: 520px) {
  .topbar { flex-wrap: wrap; row-gap: 0.15rem; }
  .topbar #topNameMobile { order: 10; flex: 1 1 100%; font-size: 0.98rem; padding-left: 0.1rem; }
}

/* === v75 — responsive tables (cookies, menu-upload guide): stacked cards on phones === */
.card table.table-stack code { overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 600px) {
  .card table.table-stack,
  .card table.table-stack tbody,
  .card table.table-stack tr,
  .card table.table-stack td { display: block; width: 100%; }
  .card table.table-stack { border: 0; font-size: 0.95rem; }
  .card table.table-stack thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  .card table.table-stack tr {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-pure, #fff);
    padding: 0.65rem 0.85rem;
    margin: 0 0 0.7rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }
  .card table.table-stack td {
    border: 0;
    padding: 0.28rem 0;
    overflow-wrap: anywhere;
  }
  .card table.table-stack td + td { border-top: 1px dashed var(--line); padding-top: 0.45rem; margin-top: 0.2rem; }
  .card table.table-stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.12rem;
  }
  .card table.table-stack td:first-child { font-weight: 600; }
}

/* === v76 — header links wrap as whole words (help, help-menu, cookies, privacy…) === */
.top a { white-space: nowrap; }

/* === v80 — login: one click, visible progress; admin: no login-form flash while the session loads === */
.btn-login { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; min-height: 44px; }
.btn-login .btn-spin { display: none; width: 1em; height: 1em; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: md-spin .7s linear infinite; }
.btn-login.is-busy .btn-spin { display: inline-block; }
.btn-login.is-busy, .btn-login.is-busy:disabled { opacity: 0.85; cursor: progress; }
@keyframes md-spin { to { transform: rotate(360deg); } }
.boot-loader { display: none; }
body.booting #loginView, body.booting #appView { display: none !important; }
body.booting .boot-loader { display: flex; min-height: 70vh; align-items: center; justify-content: center; }
.boot-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(201,162,39,.25);
  border-top-color: var(--accent, #c9a227); animation: md-spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .btn-login .btn-spin, .boot-spin { animation-duration: 2s; } }

/* === v80 — language selects look like real selects (chevron, compact), header/setup/login === */
.top .lang-select, .wiz-top .lang-select, .login-lang .lang-select {
  -webkit-appearance: none; appearance: none;
  width: auto; min-width: 4.75rem; max-width: 7rem; min-height: 38px;
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  font: inherit; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink);
  background-color: var(--card, #fff);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23857a66' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.7rem center; background-size: 12px 8px;
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.top .lang-select:hover, .wiz-top .lang-select:hover, .login-lang .lang-select:hover { border-color: var(--accent); }
.top .lang-select:focus-visible, .wiz-top .lang-select:focus-visible, .login-lang .lang-select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* v81 — upload: reviewed allergens before publish */
[hidden] { display: none !important; }
.import-preview { max-height: none; overflow: visible; }
.import-cards { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.import-card .media { aspect-ratio: 16 / 7; }
.import-card .media .ph {
  font-size: 1.6rem; font-weight: 700; letter-spacing: 0; text-transform: none;
  color: rgba(138, 111, 18, 0.55);
  background: linear-gradient(135deg, #fbf4e2, #f3ead3);
}
.import-card.skipped { opacity: 0.5; }
.import-card.alg-open { border-color: #e2b24c; box-shadow: 0 0 0 2px rgba(226, 178, 76, 0.18), var(--shadow); }
.alg-notice {
  display: flex; gap: 0.75rem; align-items: flex-start;
  margin: 0.85rem 0 0.25rem; padding: 0.9rem 1rem;
  border: 1px solid rgba(212, 168, 75, 0.45); border-left: 4px solid #d4a84b;
  border-radius: 14px; background: #fffaf0;
}
.alg-notice-ico { font-size: 1.35rem; line-height: 1.2; }
.alg-notice strong { display: block; font-size: 1rem; margin-bottom: 0.2rem; }
.alg-notice p { margin: 0.15rem 0 0; font-size: 0.9rem; line-height: 1.45; color: var(--ink, #2b2b2b); }
.alg-notice .alg-notice-sum { margin-top: 0.45rem; font-weight: 600; color: #8a5a00; }
.alg-notice .alg-notice-sum.ok { color: #2e7d4f; }
.imp-alg { border-top: 1px dashed var(--line); margin-top: 0.3rem; padding-top: 0.45rem; }
.imp-alg-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.78rem; font-weight: 700; color: var(--muted); margin-bottom: 0.3rem; }
.imp-alg-none { font-weight: 500; font-style: italic; }
.imp-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.imp-chip {
  font: inherit; font-size: 0.74rem; line-height: 1; cursor: pointer;
  padding: 0.32rem 0.5rem; min-height: 26px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-pure); color: var(--muted);
}
.imp-chip:hover { border-color: #d4a84b; color: var(--ink, #222); }
.imp-chip.on { background: #2b2b2b; border-color: #2b2b2b; color: #fff; }
.imp-chip.flag:not(.on) { border-color: #e2b24c; background: #fff4d6; color: #7a5200; }
.imp-chip.extra { cursor: default; background: #555; border-color: #555; }
.imp-chip:focus-visible { outline: 2px solid #d4a84b; outline-offset: 1px; }
.imp-flag {
  margin-top: 0.45rem; padding: 0.5rem 0.6rem; border-radius: 10px;
  background: #fff6de; border: 1px solid #f0d58c; font-size: 0.82rem; line-height: 1.35;
}
.imp-flag-act { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.imp-flag-act .sm { min-height: 30px; padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.import-confirm {
  position: sticky; bottom: 0; z-index: 5; margin-top: 1rem; padding: 0.85rem 1rem;
  background: var(--bg-pure); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.06);
}
.imp-confirm-check { display: flex; gap: 0.55rem; align-items: flex-start; font-weight: 600; cursor: pointer; }
.imp-confirm-check input { width: 20px; height: 20px; min-height: 0; margin-top: 0.1rem; flex: none; accent-color: #2b2b2b; }
.imp-publish-hint { margin: 0.4rem 0 0; font-size: 0.84rem; color: #8a5a00; }
.import-confirm .import-actions { margin-top: 0.55rem; }
#btnImportPreview[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.imp-flag-act button, .imp-chip { width: auto; flex: 0 0 auto; }
.imp-flag-act .sm { min-height: 30px !important; padding: 0.3rem 0.65rem !important; font-size: 0.8rem !important; border-radius: 999px; }
.metric-s { font-size: 0.72rem; color: var(--muted); opacity: 0.85; margin-top: 0.1rem; }

/* v82 — upload review: calm card grid, docked action bar that never covers the last card */
.import-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1rem; margin-top: 1rem; align-items: start; }
.import-card { border-radius: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); container-type: inline-size; }
.import-card.warn { border-color: var(--line); background: var(--bg-pure); }
.import-card.alg-open { border-color: #e6c77a; box-shadow: 0 0 0 3px rgba(226, 178, 76, 0.12); }
.import-card .media { aspect-ratio: 16 / 7; background: #f4f1ea; }
.import-card .body { padding: 1rem; gap: 0.55rem; }
.import-card .name-row { gap: 0.6rem; }
.import-card .name-row input[type=checkbox] { width: 18px; height: 18px; flex: none; accent-color: #2b2b2b; margin: 0; }
.import-card .imp-name { font-weight: 650; font-size: 0.95rem; }
.imp-row2 { display: grid; grid-template-columns: minmax(0, 1fr) 7rem; gap: 0.5rem; }
.import-card .body select {
  min-height: 36px; padding: 0.4rem 2rem 0.4rem 0.6rem; font-size: 0.88rem; width: 100%;
  -webkit-appearance: none; appearance: none; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-pure) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23857a66' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.65rem center / 11px 7px;
}
.imp-issues { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.imp-issue { font-size: 0.74rem; font-weight: 600; padding: 0.22rem 0.6rem; border-radius: 999px; background: #fff3cd; color: #7a5a00; }
.imp-alg { border-top: 1px solid var(--line); margin-top: 0.2rem; padding-top: 0.65rem; }
.imp-alg-head { margin-bottom: 0.45rem; }
.imp-chips { gap: 0.3rem; }
.imp-flag { margin-top: 0.65rem; padding: 0.75rem 0.8rem; border-radius: 12px; background: #fffaf0; border: 1px solid #f0dcaa; }
.imp-flag-txt { margin: 0; font-size: 0.86rem; line-height: 1.4; color: var(--ink); }
.imp-flag-act { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.6rem; }
.imp-flag-act button, .imp-flag-act .sm {
  width: 100%; min-height: 38px !important; padding: 0.45rem 0.7rem !important; font-size: 0.83rem !important;
  border-radius: 10px; white-space: normal; line-height: 1.2; margin: 0;
}
@container (max-width: 290px) { .imp-flag-act { grid-template-columns: 1fr; } }
.alg-notice { align-items: flex-start; }
.alg-notice-ico { color: #b8892a; display: inline-flex; padding-top: 0.1rem; }

.import-confirm {
  position: fixed; left: var(--sidebar-w); right: 0; bottom: 0; z-index: 25; margin: 0;
  padding: 0.75rem clamp(1rem, 3vw, 2rem) calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.97); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
}
.app-shell.collapsed .import-confirm { left: var(--sidebar-collapsed); }
.imp-bar-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 0.75rem 1.5rem; }
.imp-bar-main { flex: 1; min-width: 0; }
.imp-bar-actions { display: flex; gap: 0.6rem; flex: none; }
.imp-bar-actions button { width: auto; min-height: 44px; padding: 0.55rem 1.15rem; white-space: nowrap; margin: 0; }
.imp-confirm-check { font-size: 0.92rem; line-height: 1.35; }
.imp-publish-hint { margin: 0.25rem 0 0 calc(20px + 0.55rem); font-size: 0.82rem; }
#tab-import.has-imp-bar { padding-bottom: calc(var(--imp-bar-h, 0px) + 1.5rem); }
@media (max-width: 900px) { .import-confirm { left: 0; } }
@media (max-width: 720px) {
  .imp-bar-inner { flex-direction: column; align-items: stretch; gap: 0.55rem; }
  .import-confirm { padding-top: 0.6rem; padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px)); }
  .imp-bar-actions { display: grid; grid-template-columns: 1fr 1.6fr; }
  .imp-publish-hint { margin-top: 0.15rem; font-size: 0.8rem; }
  .imp-bar-actions button { white-space: normal; padding: 0.5rem 0.75rem; line-height: 1.2; }
  .imp-confirm-check { font-size: 0.86rem; }
  .imp-flag-act { grid-template-columns: 1fr; }
  .import-card .body { padding: 0.85rem; }
}
.imp-file-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 0.9rem; margin: 0.35rem 0 1.1rem; position: relative; }
.imp-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.imp-file-btn { display: inline-flex; align-items: center; justify-content: center; width: auto; min-height: 44px; padding: 0.55rem 1.2rem; margin: 0; cursor: pointer; }
.imp-file-input:focus-visible + .imp-file-btn { outline: 2px solid var(--accent); outline-offset: 2px; }
.imp-file-name { font-size: 0.88rem; min-width: 0; overflow-wrap: anywhere; }
.imp-file-name.has-file { color: var(--ink); font-weight: 600; }
#tab-import .import-actions { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; margin: 0.5rem 0 1rem !important; }
#tab-import .import-actions a { min-height: 32px; padding: 0.2rem 0; display: inline-flex; align-items: center; width: auto; }

/* Kitchen allergy banner: must be impossible to miss */
.kf-allergy { margin: 6px 0 8px; padding: 8px 10px; border-radius: 8px; background: #c62828; color: #fff;
  border: 2px solid #8e0000; line-height: 1.3; }
.kf-allergy-head { display: block; font-size: 1.05rem; font-weight: 800; letter-spacing: .01em; }
.kf-allergy-note { margin-top: 4px; font-size: .9rem; opacity: .95; word-break: break-word; }
/* Dish editor allergen check (same cards as the import review) */
.dish-alg-check { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; flex-wrap: wrap; }
.dish-alg-flags .imp-flag { margin-top: 8px; }

/* v85 kitchen: open tables keep their served rounds + running total until paid / closed */
.kf-mesa--open {
  border-color: rgba(212, 168, 75, 0.55);
  background: #fffaf0;
}
body.kitchen-body .kf-mesa--open { background: linear-gradient(165deg, #fffdf6, #fbf3e2); }
.kf-mesa-total {
  font-size: 0.95rem;
  font-weight: 700;
  color: #6b5320;
  font-variant-numeric: tabular-nums;
}
.kf-mesa-new {
  position: absolute;
  bottom: 0.55rem;
  right: 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #c45c4a;
  color: #fff;
}
.kf-mesa--fresh { animation: kfFresh 1.6s ease-in-out 3; }
@keyframes kfFresh { 50% { box-shadow: 0 0 0 6px rgba(196, 92, 74, 0.28); } }
.kf-round { display: block; margin: 0 0 0.7rem; }
.kf-round-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  margin: 0 0 0.35rem;
}
.kf-round-no { font-weight: 800; color: var(--ink); }
.kf-round-total { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.kf-round-new {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #c45c4a;
  color: #fff;
}
.kf-round--new > .kb-card { box-shadow: 0 0 0 3px rgba(196, 92, 74, 0.25); }
.kf-round-state { color: #3d8b6e; font-weight: 700; }
.kf-round--served {
  border: 1px solid var(--line-soft, #eadfca);
  border-radius: 12px;
  background: #f7f3ea;
  padding: 0.5rem 0.75rem;
  opacity: 0.8;
}
.kf-round--served[open] { opacity: 1; }
.kf-round--served > summary { cursor: pointer; list-style: none; }
.kf-round--served > summary::-webkit-details-marker { display: none; }
.kf-round--served > summary .kf-round-head { margin: 0; }
.kf-round--served > summary .kf-round-head::before { content: "▸"; color: var(--muted); }
.kf-round--served[open] > summary .kf-round-head::before { content: "▾"; }
.kf-served-list { list-style: none; margin: 0.45rem 0 0; padding: 0; }
.kf-served-line { display: flex; gap: 0.4rem; padding: 0.15rem 0; color: #5b5445; }
.kf-served-line .kf-line-price { margin-left: auto; font-variant-numeric: tabular-nums; }
.kf-table-foot {
  position: sticky;
  bottom: 0;
  margin-top: 0.8rem;
  padding: 0.85rem 0 0.4rem;
  background: #fffcf5;
  border-top: 1px solid rgba(212, 168, 75, 0.35);
}
.kf-table-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.05rem; margin-bottom: 0.6rem; }
.kf-table-total strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.kf-table-acts { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.kf-table-acts button { flex: 1 1 8rem; min-height: 2.9rem; }
.kf-table-help { font-size: 0.85rem; margin: 0.5rem 0 0; }
.kf-close-q { font-weight: 600; margin: 0 0 0.55rem; }

/* v85 Settings: header photo focal point / whole photo */
.hdr-framer { margin-top: 0.75rem; padding: 0.9rem; border: 1px solid rgba(212, 168, 75, 0.3); border-radius: 12px; background: #fffcf5; max-width: 46rem; }
.hdr-framer-h { font-weight: 700; margin: 0 0 0.5rem; }
.hdr-fit-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; margin: 0 0 0.75rem; }
.hdr-fit-opt { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; cursor: pointer; }
.hdr-framer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 720px) { .hdr-framer-grid { grid-template-columns: 1fr; } }
.hdr-stage { position: relative; display: inline-block; max-width: 100%; cursor: crosshair; touch-action: none; user-select: none; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); line-height: 0; }
.hdr-stage img { display: block; max-width: 100%; max-height: 16rem; width: auto; height: auto; }
.hdr-stage.is-whole { cursor: default; }
.hdr-dot { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(212, 168, 75, 0.95), 0 2px 8px rgba(0, 0, 0, 0.35); background: rgba(212, 168, 75, 0.35); pointer-events: none; }
.hdr-dot[hidden] { display: none; }
.hdr-phone { width: 100%; max-width: 15rem; border-radius: 18px; border: 6px solid #1b1b1f; background: #faf7f0; overflow: hidden; }
.hdr-phone-media { height: 8.2rem; overflow: hidden; background: #111; }
.hdr-phone-media img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(0.8); }
.hdr-phone.is-whole .hdr-phone-media { height: auto; background: #f3ede0; }
.hdr-phone.is-whole .hdr-phone-media img { height: auto; max-height: 12rem; object-fit: contain; filter: none; }
.hdr-phone-name { display: block; padding: 0.45rem 0.6rem 0.6rem; font-size: 0.95rem; text-align: center; }
.hdr-fit-opt input[type="radio"] { width: 1.1rem; height: 1.1rem; min-height: 0; margin: 0; padding: 0; flex: 0 0 auto; accent-color: #b8912f; }
.hdr-fit-opt span { white-space: normal; }

/* v85 Upload: one clear main action (choose file); pasting is a small secondary option */
.imp-drop { text-align: center; padding: 1.6rem 1rem 1.3rem; border: 2px dashed rgba(212, 168, 75, 0.55); border-radius: 16px; background: #fffcf5; margin: 0.4rem 0 1rem; }
.imp-drop-ico { font-size: 2rem; line-height: 1; margin-bottom: 0.4rem; }
.imp-drop-h { font-weight: 700; font-size: 1.08rem; margin: 0 0 0.85rem; }
.imp-file-btn--big { font-size: 1.05rem; padding: 0.8rem 1.8rem; min-height: 3rem; }
.imp-drop .imp-file-name { display: block; margin-top: 0.6rem; }
.imp-drop-hint { margin: 0.6rem 0 0; }
.imp-paste { margin: 0 0 0.75rem; border: 1px solid var(--line-soft, #eadfca); border-radius: 12px; padding: 0.55rem 0.85rem; background: #fff; }
.imp-paste > summary { cursor: pointer; font-weight: 600; color: #6b5320; list-style: none; }
.imp-paste > summary::-webkit-details-marker { display: none; }
.imp-paste > summary::before { content: "▸ "; color: var(--muted); }
.imp-paste[open] > summary::before { content: "▾ "; }
.imp-paste-hint { margin: 0.5rem 0; }

/* v85 Tables & QR: menu-only QR (door / window / flyers) apart from the table QRs */
.menu-qr-card { display: flex; gap: 1.1rem; align-items: center; padding: 1rem; margin: 0.6rem 0 1.4rem; border: 1px solid rgba(212, 168, 75, 0.35); border-radius: 14px; background: #fffcf5; }
.menu-qr-img { width: 132px; height: 132px; flex: 0 0 132px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; image-rendering: pixelated; }
.menu-qr-body h3 { margin: 0 0 0.3rem; }
.menu-qr-body p { margin: 0 0 0.6rem; }
.menu-qr-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
@media (max-width: 560px) { .menu-qr-card { flex-direction: column; text-align: center; } .menu-qr-actions { justify-content: center; } }

/* v86 — owner rule: primary buttons are the soft logo-gold gradient with a glassy highlight
   (same look as the guest menu's primary), never solid black. Dark ink label for contrast
   (≈9:1 on gold) so it stays readable on the kitchen tablet. */
button.primary, .btn.primary, a.btn.primary,
button.cta, .btn.cta, a.btn.cta,
button.accent, .btn.accent, a.btn.accent {
  background: linear-gradient(180deg, #E8C56A 0%, #D4A84B 100%);
  color: #1F1705;
  border: 1px solid rgba(168, 126, 36, 0.55);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 4px 14px rgba(201, 162, 39, 0.26);
}
button.primary:hover, .btn.primary:hover, a.btn.primary:hover,
button.cta:hover, .btn.cta:hover, a.btn.cta:hover,
button.accent:hover, .btn.accent:hover, a.btn.accent:hover {
  background: linear-gradient(180deg, #EDCF7F 0%, #D9AF55 100%);
  color: #1F1705;
  border-color: rgba(168, 126, 36, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 18px rgba(201, 162, 39, 0.36);
}
button.primary:focus-visible, .btn.primary:focus-visible, a.btn.primary:focus-visible {
  box-shadow: var(--focus-ring), inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 4px 14px rgba(201, 162, 39, 0.26);
}
button.primary:disabled, .btn.primary[aria-disabled="true"], button.primary[disabled] {
  opacity: 0.55; cursor: not-allowed; transform: none;
}
/* Secondary stays the light outline, but softer than a black border */
button.ghost, .btn.ghost, a.btn.ghost { border-color: rgba(11, 13, 18, 0.55); }
/* Destructive confirm (e.g. "Sí, cerrar mesa"): distinct, not black */
button.danger { background: linear-gradient(180deg, #D26C59 0%, #C45C4A 100%); color: #fff; border: 1px solid rgba(150, 60, 45, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 12px rgba(196, 92, 74, 0.25); }
button.danger:hover { background: linear-gradient(180deg, #D87865 0%, #B9513F 100%); }
.kf-table-acts button.danger, .kf-close-confirm button.danger { height: 44px; min-height: 44px; padding: 0 1rem; font-weight: 700; font-size: 0.9rem; }

/* v87 — dish editor: real photo upload */
.dish-photo { margin: 0.4rem 0 0.6rem; }
.dp-drop { position: relative; display: grid; place-items: center; min-height: 168px; max-width: 420px; border: 1.5px dashed rgba(212, 168, 75, 0.7);
  border-radius: 16px; background: #fffcf4; cursor: pointer; overflow: hidden; transition: border-color .15s, background .15s, box-shadow .15s; }
.dp-drop:hover, .dp-drop:focus-visible, .dp-drop.is-drag { border-color: #b88a2a; background: #fbf3de; outline: 0; box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.25); }
.dp-drop.has-photo { border-style: solid; border-color: rgba(212, 168, 75, 0.45); background: #f4efe4; }
.dp-drop img { width: 100%; height: 220px; object-fit: cover; display: block; }
.dp-empty { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 1.2rem; text-align: center; }
.dp-empty .dp-ico { font-size: 1.8rem; }
.dp-empty strong { font-size: 1.02rem; }
.dp-busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 0.5rem; background: rgba(255, 252, 244, 0.86); font-weight: 600; }
.dp-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(212, 168, 75, 0.35); border-top-color: #b88a2a; animation: dpspin .8s linear infinite; }
@keyframes dpspin { to { transform: rotate(360deg); } }
.dp-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }
.dp-msg { margin: 0.35rem 0 0; font-size: 0.9rem; min-height: 1.1em; }
.dp-msg--err { color: #a1392b; font-weight: 600; }
.dp-msg--ok { color: #3f6b2f; font-weight: 600; }
.dp-link { margin-top: 0.35rem; }
.dp-link summary { cursor: pointer; color: var(--muted); font-size: 0.88rem; }
.dp-link input { margin-top: 0.4rem; max-width: 420px; }
.d-rec-wrap { display: flex; flex-direction: column; justify-content: flex-end; }
.d-rec { margin: 0 !important; font-weight: 600; }
.d-rec-wrap .tiny { margin: 0.2rem 0 0; }

/* v87 — Settings: top of the guest menu (name / phrase / style) with live phone preview */
.hdr-text-box { margin: 1.1rem 0 0.4rem; padding: 1rem 1.1rem; border: 1px solid rgba(212, 168, 75, 0.3); border-radius: 16px; background: #fffdf7; }
.hdr-text-box h3 { margin-top: 0; }
.hdrtxt-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1.2rem; align-items: start; }
@media (max-width: 760px) { .hdrtxt-grid { grid-template-columns: 1fr; } }
.hdrtxt-lbl { margin: 0.2rem 0 0.35rem; font-weight: 700; }
.hdr-style-row { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.7rem; }
.hdr-style-opt { display: flex; align-items: center; gap: 0.55rem; font-weight: 500; padding: 0.5rem 0.7rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.hdr-style-opt:has(input:checked) { border-color: #c9a13f; background: #fbf4e0; }
.hdr-style-opt input, .hdrtxt-check input { width: 18px; height: 18px; margin: 0; accent-color: #b88a2a; flex: 0 0 auto; }
.hdrtxt-check { margin: 0.55rem 0 0.3rem !important; font-weight: 600; }
.hdrtxt-form input[type="text"], .hdrtxt-form input:not([type]) { width: 100%; max-width: 28rem; }
.hdrtxt-form input:disabled { opacity: 0.5; }
.hdrtxt-form .tiny { margin: 0.2rem 0 0; }
.hdr-live { position: relative; width: 240px; min-height: 150px; border-radius: 22px; overflow: hidden; border: 6px solid #1c1c1f; background: #f4efe4;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(11, 13, 18, 0.14); }
.hdr-live-media { position: absolute; inset: 0; display: none; }
.hdr-live.has-photo .hdr-live-media { display: block; }
.hdr-live-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hdr-live.is-whole .hdr-live-media img { object-fit: contain; background: #1c1c1f; }
.hdr-live.has-photo .hdr-live-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.05) 30%, rgba(0,0,0,0.5) 100%); }
.hdr-live-text { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 1rem; text-align: center; }
.hdr-live-name { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.5rem; line-height: 1.1; color: #1c1c1f; }
.hdr-live-tag { font-size: 0.8rem; color: #5b5445; }
.hdr-live.has-photo .hdr-live-name, .hdr-live.has-photo .hdr-live-tag { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,0.45); }
.d-rec input[type="checkbox"], .hdrtxt-check input[type="checkbox"] {
  width: 1.2rem; height: 1.2rem; min-height: 0; padding: 0; margin: 0; border: 0; box-shadow: none;
  outline-offset: 2px; accent-color: #b8892b; flex: 0 0 auto;
}
/* «Remember me» on the login screens */
.remember-row { margin: 0.7rem 0 0.1rem !important; font-weight: 600; cursor: pointer; }
.remember-row input[type="checkbox"] {
  width: 1.2rem; height: 1.2rem; min-height: 0; padding: 0; margin: 0; border: 0; box-shadow: none;
  accent-color: #b8892b; flex: 0 0 auto; cursor: pointer;
}
.remember-hint { margin: 0.1rem 0 0.2rem 1.75rem; font-size: 0.8rem; }

/* Logo → landing (/) */
a.brand-home { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; color: inherit; border-radius: 10px; }
a.brand-home:focus-visible { outline: 2px solid rgba(201, 162, 39, 0.8); outline-offset: 3px; }

/* v90 danger zone: premium red outline (never black), plan cancel box + confirm dialog */
.danger-outline {
  appearance: none; background: #fff; color: #b3261e; border: 1.5px solid rgba(179, 38, 30, 0.75);
  border-radius: 999px; padding: 0.6rem 1.15rem; font-weight: 650; cursor: pointer;
  box-shadow: 0 1px 2px rgba(179, 38, 30, 0.08);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.danger-outline:hover { background: #fdf1ef; border-color: #b3261e; box-shadow: 0 4px 14px -6px rgba(179, 38, 30, 0.35); }
.danger-outline:focus-visible { outline: 2px solid rgba(179, 38, 30, 0.5); outline-offset: 2px; }
.danger-outline[disabled] { opacity: 0.55; cursor: progress; }
.plan-cancel {
  margin: 0.4rem 0 1.1rem; padding: 0.95rem 1.1rem; border-radius: 14px;
  border: 1px solid rgba(179, 38, 30, 0.18); background: linear-gradient(180deg, #fffaf8 0%, #fff 100%);
}
.plan-cancel h4 { margin: 0 0 0.35rem; font-size: 1rem; }
.plan-cancel-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 0.6rem 0 0.2rem; }
.plan-cancel.is-cancelled { border-color: rgba(201, 162, 39, 0.35); background: linear-gradient(180deg, #fffaf0 0%, #fff 100%); }
.md-dialog {
  border: 0; border-radius: 18px; padding: 1.4rem 1.5rem 1.2rem; max-width: 30rem; width: calc(100% - 2rem);
  box-shadow: 0 24px 60px -12px rgba(20, 16, 8, 0.35); color: inherit;
}
.md-dialog::backdrop { background: rgba(28, 22, 12, 0.45); backdrop-filter: blur(3px); }
.md-dialog h3 { margin: 0 0 0.6rem; }
.md-dialog-actions { display: flex; justify-content: flex-end; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.md-dialog h3 { background: none; border: 0; padding: 0; box-shadow: none; font-size: 1.2rem; }
.plan-cancel .danger-outline, .danger-outline { font-size: 0.92rem; }

/* ——— Password fields: show/hide eye, account & security block ——— */
.pw-field { position: relative; }
.pw-field input { padding-right: 3rem; }
.pw-eye {
  position: absolute; top: 50%; right: .35rem; transform: translateY(-50%);
  width: 40px; height: 40px; min-height: 0; padding: 0; margin: 0;
  border: 0; border-radius: 10px; background: transparent; cursor: pointer;
  color: var(--muted);
}
.pw-eye::before {
  content: ""; display: block; width: 22px; height: 22px; margin: auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pw-eye.is-on::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7c2 0 3.7.6 5.1 1.5M22 12s-3.5 7-10 7c-2 0-3.7-.6-5.1-1.5'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7c2 0 3.7.6 5.1 1.5M22 12s-3.5 7-10 7c-2 0-3.7-.6-5.1-1.5'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E");
}
.pw-eye:hover { color: var(--ink); }
.pw-eye:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.pw-h { font-size: 1.35rem; margin: .5rem 0 .4rem; }
.login-forgot { margin: .45rem 0 0; font-size: .9rem; text-align: right; }
.login-forgot a { color: var(--muted); }
.acct-box { border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; margin: .5rem 0 1rem; background: var(--bg-pure, #fff); }
.acct-box h4 { margin: 0 0 .35rem; }
.acct-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 760px) { .acct-grid { grid-template-columns: 1fr; } }
.acct-msg.ok { color: #1f7a3d; font-weight: 600; }
.acct-msg.bad { color: #b3261e; }

/* Setup: terms acceptance line; dish editor: owner allergen responsibility */
.wiz .setup-accept { font-size: 0.82rem; line-height: 1.45; margin: 0.9rem 0 0; }
.wiz .setup-accept a { color: inherit; text-decoration: underline; }
.alg-owner-note { margin: 0.35rem 0 0.6rem; line-height: 1.4; }

/* contact line (Ajustes help, help pages, legal pages) */
.contact-line { margin: 0.6rem 0; }
.mailto-link { color: #8a6420; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(187, 142, 67, 0.55); word-break: break-word; }
.mailto-link:hover { color: #5e4210; text-decoration-color: currentColor; }
.banner-warn .mailto-link, #freezeBanner .mailto-link { color: #ffe3a3; text-decoration-color: rgba(255, 227, 163, 0.6); }

.bs-body { min-width: 0; }

.sample-or { margin: 0.9rem 0 0.4rem; font-size: 0.9rem; }

/* Login/setup footer links: AA contrast on white (gold #d4a84b was 2.2:1). */
.login-wrap .muted a { color: #8A6416; }

/* ---- Batch 1 (Oct 2026): settings spacing, AI header row, dish editor chips, photo 1:1 ---- */
/* Settings: one rhythm. Hint text sits close to its control; checkbox rows get room above. */
.settings-page p.muted { margin: 0.3rem 0 0.55rem; line-height: 1.45; }
.settings-page label + input, .settings-page label + select, .settings-page label + textarea { margin-top: 0.3rem; }
.settings-page .check-row { margin: 1rem 0 0.15rem !important; }
.settings-page .check-row + p.muted { margin-top: 0.15rem; }
.settings-page h4 { margin: 1.1rem 0 0.3rem; font-size: 0.95rem; }
.settings-page .guest-link-line { margin: 0.2rem 0 0.6rem !important; }
.settings-page textarea + p.muted { margin-top: 0.4rem; }
#billingCard { background: #fffaf0 !important; border: 1px solid rgba(212, 168, 75, 0.3); box-shadow: none; }
#billingCard p.muted { margin: 0.25rem 0; }
#headerImageRow input[type="file"] { margin: 0.35rem 0 0.55rem; }
#headerImageRow #btnHeaderClear { margin-left: 0.35rem; }
#headerVisualsControls select { margin-bottom: 0.9rem !important; }
.hdr-ai-row { display: grid; grid-template-columns: minmax(0, 28rem) auto; gap: 0.3rem 0.6rem; align-items: end; margin: 0.9rem 0 0.4rem; }
.hdr-ai-row label { grid-column: 1 / -1; margin: 0; }
.hdr-ai-row input { margin: 0; }
.hdr-ai-row button { white-space: nowrap; }
@media (max-width: 560px) { .hdr-ai-row { grid-template-columns: 1fr; } }
#headerVisualsMsg:empty { display: none; }

/* Dish editor: «Clear form» lives up by the title, small and away from Save. */
.edit-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.edit-head h2 { margin-bottom: 0.4rem; }
.edit-clear-btn {
  background: none; border: 0; padding: 0.35rem 0.2rem; min-height: 36px; cursor: pointer;
  color: var(--muted); font: inherit; font-size: 0.85rem; text-decoration: underline; text-underline-offset: 3px;
}
.edit-clear-btn:hover, .edit-clear-btn:focus-visible { color: #8A6416; }
.tag-chips:empty { display: none; }
.tag-add-row { align-items: center; gap: 0.5rem; }
.tag-add-row input { flex: 1 1 auto; min-width: 0; }
.tag-add-row button { flex: 0 0 auto; }
#algExtraHint, #dietExtraHint { margin: 0.2rem 0 0.4rem; }

/* Dish photo: say it's square and let the owner choose Fill or Whole. */
.dp-fit { border: 0; padding: 0; margin: 0.3rem 0 0.6rem; display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
.dp-fit legend { padding: 0; margin-bottom: 0.35rem; color: var(--ink); font-size: 0.88rem; }
.dp-fit-opt { display: inline-flex !important; align-items: center; gap: 0.4rem; font-weight: 500 !important; font-size: 0.9rem; margin: 0 !important; cursor: pointer; }
.dp-fit-opt input { width: auto; min-height: 1.1rem; accent-color: #b88a2a; }
.dp-fit-note { flex-basis: 100%; margin: 0.1rem 0 0; }
.dp-drop { max-width: 300px; }
.dp-drop img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
#tab-edit .row:has(#ingNew), #tab-edit .tag-add-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; }
#tab-edit .row:has(#ingNew) button, #tab-edit .tag-add-row button { min-width: 7.5rem; }
/* Gold text links on white failed contrast (2.2:1): darker gold, same family. */
#ownerGuestLink, #ownerKitchenLink, #acctForgotLink, #guestLink2, .settings-page a[data-i18n="settings_start_support"] { color: #8A6416; }
/* Saved tables: light rows, real buttons (QR card is the main action). */
.saved-table-row { background: #fffdf8; border: 1px solid rgba(212, 168, 75, 0.25); border-radius: 12px; padding: 0.6rem 0.75rem; }
.saved-table-row > strong { color: var(--ink); min-width: 4.5rem; }
.saved-table-row code { color: #5c5346; background: #f6f1e7; }
.saved-table-actions { align-items: center; gap: 0.45rem; }
.saved-table-actions a.btn, .saved-table-actions button.tap { height: 40px; min-height: 40px; padding: 0 16px; font-size: 0.9rem; }
.saved-table-actions .btn-deact-table { color: var(--muted); }
@media (max-width: 560px) { .saved-table-actions { margin-left: 0; width: 100%; } .saved-table-actions .btn-deact-table { margin-left: auto; } }
#phoneStatusLine[style*="3d9a5f"] { color: #2c7a49 !important; }

/* ——— Batch 2: Plan & billing tab ——— */
.billing-page { max-width: 880px; }
.bill-status {
  margin: 0.4rem 0 1.2rem; padding: 1rem 1.15rem; border-radius: 14px;
  border: 1px solid rgba(212, 168, 75, 0.28); background: linear-gradient(180deg, #fffcf4 0%, #fff 100%);
}
.bill-status p { margin: 0.2rem 0; }
.bill-state { font-weight: 650; font-size: 1.05rem; color: var(--ink); }
.bill-days { font-size: 1.6rem; font-weight: 700; color: #8A6416; letter-spacing: -0.01em; }
.bill-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 0 0 1rem; }
.bill-plan {
  display: flex; flex-direction: column; gap: 0.35rem; padding: 1.1rem 1.15rem 1.15rem; border-radius: 16px;
  border: 1px solid var(--line); background: #fff; box-shadow: 0 1px 2px rgba(11, 13, 18, 0.04);
}
.bill-plan--best { border-color: rgba(201, 162, 39, 0.55); box-shadow: 0 10px 28px -18px rgba(138, 100, 22, 0.55); }
.bill-plan h3 { margin: 0; font-size: 1.05rem; background: none; border: 0; padding: 0; box-shadow: none; }
.bill-plan .bill-amt { margin: 0; font-size: 1.45rem; font-weight: 700; color: var(--ink); }
.bill-plan .muted { margin: 0 0 0.6rem; flex: 1 1 auto; }
.bill-plan button.primary { width: 100%; }
#billingMsg:empty { display: none; }
.billing-page .plan-cancel h3 { margin: 0 0 0.35rem; font-size: 1rem; background: none; border: 0; padding: 0; box-shadow: none; }

/* ——— Batch 2: paid-only blocks without an active plan or trial ——— */
.paid-lock-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem;
  margin: 0.6rem 0; padding: 0.6rem 0.85rem; border-radius: 12px;
  background: #fbf6ea; border: 1px solid rgba(201, 162, 39, 0.35); color: #4a3b17; font-size: 0.93rem;
}
.paid-lock-note a { color: #8A6416; font-weight: 650; }
.paid-area.is-locked, .hdr-ai-row.is-locked { opacity: 0.5; filter: grayscale(0.5); pointer-events: none; user-select: none; }

/* ——— Batch 2: unsaved-changes bar ——— */
.dirty-bar {
  position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); transform: translate(-50%, 0);
  z-index: 60; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; justify-content: center;
  width: max-content; max-width: calc(100% - 1.5rem); padding: 0.6rem 0.7rem 0.6rem 1.1rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.96); border: 1px solid rgba(201, 162, 39, 0.4);
  box-shadow: 0 18px 40px -16px rgba(20, 16, 8, 0.35); backdrop-filter: blur(8px);
}
.dirty-bar[hidden] { display: none; }
.dirty-bar-msg { font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.dirty-bar-acts { display: flex; gap: 0.5rem; }
.dirty-bar button { min-height: 42px; padding: 0 1.1rem; }
@media (min-width: 900px) { .dirty-bar { left: calc(50% + 120px); } }
@media (max-width: 560px) {
  .dirty-bar { border-radius: 16px; bottom: max(0.6rem, env(safe-area-inset-bottom)); width: calc(100% - 1rem); justify-content: space-between; }
}
/* Plan ended: calm light-red notice (dark red text, AA), never dark-on-dark. */
.banner-warn.is-frozen { background: #fdf1ef !important; color: #7a1f17 !important; border-color: rgba(179, 38, 30, 0.3) !important; }
.banner-warn.is-frozen a { color: #7a1f17; }
/* Sidebar role: plain text, not a pill. */
.sidebar-rest .role-pill, .role-pill { background: none !important; border: 0 !important; padding: 0 !important; border-radius: 0 !important;
  color: var(--muted) !important; font-size: 0.82rem !important; font-weight: 500 !important; text-transform: none !important; letter-spacing: 0 !important; }
body:has(#dirtyBar:not([hidden])) main.panel { padding-bottom: 6rem; }
.menu-dish .menu-dish-top .price { color: #8A6416 !important; } /* price: AA on white */

/* ——— BATCH 3: guest-menu theming in Settings ——— */
.theme-box { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.theme-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.5rem; align-items: start; }
@media (max-width: 760px) { .theme-grid { grid-template-columns: 1fr; } }
.theme-field { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.theme-field legend { font-weight: 650; margin: 0 0 0.5rem; padding: 0; }
.theme-shapes { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.theme-shape { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 0.7rem 0.9rem; min-width: 6.5rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; font-size: 0.88rem; }
.theme-shape-demo { width: 4.2rem; height: 1.7rem; background: linear-gradient(180deg, #e0b85c, #d4a84b); }
.theme-swatches { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.theme-swatch { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; width: 5.4rem; padding: 0.55rem 0.3rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; font-size: 0.8rem; text-align: center; }
.theme-dot { width: 2rem; height: 2rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.theme-custom input[type="color"] { width: 2.2rem; height: 2.2rem; padding: 0; border: 0; background: none; cursor: pointer; }
.theme-shape input, .theme-swatch input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.theme-shape:has(input:checked), .theme-swatch:has(input[type="radio"]:checked) { border-color: #b8892e; box-shadow: 0 0 0 2px rgba(212, 168, 75, 0.45); }
.theme-shape:has(input:focus-visible), .theme-swatch:has(input:focus-visible) { outline: 2px solid #8a6416; outline-offset: 2px; }
.theme-sw-name { color: var(--ink); line-height: 1.2; }

/* Preview: a small guest-menu mock painted with the same variables static/theme.js sets on the guest page */
.theme-preview { --t-radius: 999px; --t-radius-box: 14px; --bg: #f7f3ea; --paper: #fffdf8; --accent: #d4a84b; --accent-bright: #dfb965;
  --on-accent: #1c1408; --gold-ink: #85621a; --accent-rgb: 212, 168, 75; --t-line: rgba(212, 168, 75, 0.32);
  background: var(--bg); border: 1px solid var(--line); border-radius: 22px; padding: 0.9rem 0.8rem; display: grid; gap: 0.7rem;
  font-family: Inter, system-ui, sans-serif; color: #1c1810; }
.tp-chips { display: flex; gap: 0.4rem; }
.tp-chip { padding: 0.4rem 0.85rem; border-radius: var(--t-radius); background: #fff; border: 1px solid rgba(60, 45, 20, 0.12); font-weight: 600; font-size: 0.82rem; }
.tp-chip.on { background: linear-gradient(180deg, var(--accent-bright), var(--accent)); border-color: var(--accent); color: var(--on-accent); }
.tp-sec { display: flex; align-items: center; gap: 0.6rem; font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.25rem; font-weight: 600; justify-content: center; }
.tp-sec::before, .tp-sec::after { content: ""; flex: 1; max-width: 4rem; height: 1px; }
.tp-sec::before { background: linear-gradient(270deg, rgba(var(--accent-rgb), 0.75), rgba(var(--accent-rgb), 0)); }
.tp-sec::after { background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.75), rgba(var(--accent-rgb), 0)); }
.tp-card { background: var(--paper); border: 1px solid rgba(60, 45, 20, 0.09); border-radius: 16px; padding: 0.8rem 0.9rem; box-shadow: 0 6px 18px -10px rgba(40, 30, 10, 0.25); }
.tp-head { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; }
.tp-head strong { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.15rem; font-weight: 600; }
.tp-price { color: var(--gold-ink); font-weight: 700; font-size: 0.92rem; }
.tp-foot { display: flex; justify-content: flex-end; margin-top: 0.6rem; }
.tp-add { padding: 0.45rem 0.95rem; border-radius: var(--t-radius); background: linear-gradient(180deg, var(--accent-bright), var(--accent)); color: var(--on-accent); font-weight: 700; font-size: 0.85rem; }
.tp-dock { display: flex; gap: 0.5rem; align-items: center; }
.tp-input { flex: 1; padding: 0.55rem 0.8rem; border-radius: var(--t-radius); background: #fff; border: 1px solid rgba(60, 45, 20, 0.12); color: #6a6154; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-round { width: 2.3rem; height: 2.3rem; flex: 0 0 auto; border-radius: var(--t-radius); background: linear-gradient(180deg, var(--accent-bright), var(--accent)); }
.theme-custom input[type="color"] { -webkit-appearance: none; appearance: none; width: 2rem; height: 2rem; border-radius: 50%; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.theme-custom input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.theme-custom input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.theme-custom input[type="color"]::-moz-color-swatch { border: 0; border-radius: 50%; }
.theme-shapes .theme-shape { flex: 1 1 6rem; min-width: 0; }

/* Wave 4: row-by-row notes from an uploaded menu table */
.imp-rows { margin: .5rem 0 .75rem; padding: .65rem .85rem; border: 1px solid var(--line); border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); }
.imp-rows-h { margin: 0 0 .3rem; font-weight: 600; }
.imp-rows ul { margin: 0; padding-left: 1.1rem; }
.imp-rows li { margin: .15rem 0; line-height: 1.4; }
.imp-rows li.is-err { color: #8f2d10; }
.imp-diy a { font-weight: 600; }

.bill-renew { margin: .75rem 0 1rem; max-width: 40rem; }

/* Wave 8: Stripe disclaimer on Plan & billing + button label fit */
.bill-stripe {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 1rem 0 0.75rem; padding: 12px 14px;
  background: #F7F0E6; border: 1px solid rgba(30, 23, 16, 0.08);
  border-radius: 12px; max-width: 40rem;
}
.bill-stripe-logo {
  flex: 0 0 auto; width: 72px; height: auto; margin-top: 2px;
  /* Clear space around Stripe wordmark */
  padding: 4px;
}
.bill-stripe p { margin: 0; line-height: 1.45; }
.bill-stripe a { color: #635BFF; text-decoration: underline; text-underline-offset: 2px; }
.bill-plan button.primary {
  width: 100%;
  height: auto;
  min-height: 44px;
  white-space: normal;
  line-height: 1.25;
  padding: 9px 14px;
  text-align: center;
  box-sizing: border-box;
}
button.primary, .btn.primary, a.btn.primary,
button.ghost, .btn.ghost, a.btn.ghost {
  white-space: normal;
  line-height: 1.25;
  height: auto;
  min-height: 44px;
  padding-top: 9px;
  padding-bottom: 9px;
  text-align: center;
  box-sizing: border-box;
}



/* Wave 10: clear trial→paid note above plan cards */
.bill-trial-before {
  grid-column: 1 / -1;
  margin: 0 0 .35rem;
  padding: .75rem 1rem;
  border-radius: 12px;
  background: #FFF6EA;
  border: 1px solid rgba(187, 142, 67, 0.35);
  color: #4E3626;
  line-height: 1.45;
}

/* Plan & billing: founding offer (first 20 restaurants) */
.bill-founding { margin: 1.2rem 0; padding: 1.1rem 1.2rem; border: 1px solid var(--line, #EDE4D3); border-left: 3px solid #BB8E43; border-radius: 14px; background: #fff; }
.bill-founding h3 { margin: 0 0 .4rem; }
.bill-fo-left { margin: .6rem 0; }
.bill-fo-left b { font: 600 1.8rem/1 "Cormorant Garamond", Georgia, serif; }
.bill-fo-consent { display: flex; gap: .55rem; align-items: flex-start; margin: .6rem 0; line-height: 1.45; }
.bill-fo-consent input { margin-top: .25rem; flex: 0 0 auto; }
.bill-fo-btns { display: flex; gap: .6rem; flex-wrap: wrap; }
.bill-fo-member { font-weight: 600; margin: 0; }

.fo-abar { position: relative; margin: 0 0 1rem; padding: .8rem 3rem .85rem 1.1rem; border-radius: 14px;
  background: linear-gradient(90deg, #17110A, #2A1E10); color: #FAF6EF; border: 1px solid rgba(214, 169, 90, .55); }
.fo-abar[hidden] { display: none; }
.fo-abar p { margin: 0; display: flex; flex-wrap: wrap; gap: .35rem .8rem; align-items: center; font-weight: 600; line-height: 1.35; }
.fo-abar em { font: italic 600 1.3rem/1.1 "Cormorant Garamond", Georgia, serif; color: #F0D08C; }
.fo-abar-cta { min-height: 36px; padding: 0 1rem; border-radius: 999px; border: 1px solid rgba(122, 86, 30, .55); cursor: pointer;
  font-weight: 700; color: #1C1508; background: linear-gradient(180deg, #F0D08C, #D6A95A); }
.fo-abar-x { position: absolute; top: .3rem; right: .3rem; width: 40px; height: 40px; border: 0; background: transparent; color: rgba(250,246,239,.75); font-size: 1.5rem; cursor: pointer; }

/* Plan & billing: every block spans the card and shares one inner inset (Oct 2026 tidy-up). */
.billing-page .bill-stripe { max-width: none; align-items: center; padding: 1rem 1.15rem; border-radius: 14px; }
.billing-page .bill-renew { max-width: none; margin: .75rem 0 1rem; padding: 0 1.15rem; }
.billing-page .bill-founding, .billing-page .plan-cancel { padding: 1rem 1.15rem; }
.billing-page #billingMsg:empty { display: none; }

/* Guest-menu typeface picker */
.theme-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .5rem; }
.theme-font { position: relative; display: flex; flex-direction: column; gap: .15rem; padding: .55rem .7rem; border: 1px solid rgba(30, 23, 16, .12); border-radius: 12px; cursor: pointer; background: #fff; }
.theme-font:has(input:checked) { border-color: #BB8E43; box-shadow: 0 0 0 2px rgba(187, 142, 67, .25); }
.theme-font input { position: absolute; opacity: 0; pointer-events: none; }
.theme-font .tf-aa { font-size: 1.5rem; line-height: 1.1; font-weight: 600; }
.theme-font .tf-name { font-size: .82rem; color: var(--muted, #6b6256); }
.theme-preview { font-family: var(--font, inherit); }
.theme-preview .tp-sec, .theme-preview .tp-head strong { font-family: var(--display, "Cormorant Garamond", Georgia, serif); }

/* Kitchen password: set state */
.kpin-done { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: .4rem 0 .6rem; }
.kpin-ok { display: inline-flex; align-items: center; gap: .4rem; color: #2c7a49; font-weight: 600; }
.kpin-ok::before { content: "✓"; display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: #e3f3e8; color: #2c7a49; font-size: .85rem; }
.theme-custom input[type="color"] { flex: 0 0 auto; align-self: center; height: 2rem; width: 2rem; block-size: 2rem; }

/* Referral card (dashboard home) */
.ref-card { margin-top: 20px; padding: 16px 18px; border: 1px solid rgba(0,0,0,.12); border-radius: 12px; }
.ref-card h3 { margin: 0 0 6px; font-size: 17px; }
.ref-card-row { margin: 10px 0; }
.ref-card-copy { display: flex; gap: 8px; margin-top: 4px; }
.ref-card-copy input { flex: 1; min-width: 0; }
.ref-card-links { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
