@font-face {
  font-family: "Rabar 021";
  src: url("/assets/fonts/Rabar_021.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f2ef;
  --panel: #ffffff;
  --ink: #14110f;
  --muted: #7a736c;
  --line: rgba(20, 17, 15, 0.08);
  --accent: #171310;
  --gold: #b8893a;
  --gold-soft: #f4ead7;
  --danger: #c4473a;
  --ok: #1f7a4d;
  --sidebar: #11100e;
  --shadow: 0 16px 40px rgba(24, 18, 12, 0.07);
  --radius: 20px;
  --font: "Sora", "Noto Sans Arabic", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
html[lang="ku"],
html[lang="ar"] {
  --font: "Rabar 021", "Noto Sans Arabic", system-ui, sans-serif;
  font-size: 108%;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body.admin-body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.lang-switch a {
  text-decoration: none;
  color: rgba(244,239,231,.62);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  line-height: 1;
}
.lang-switch a.on {
  background: rgba(224,191,106,.18);
  color: #f2d7a0;
}
.auth .lang-switch {
  margin: 0 0 0.85rem;
  background: rgba(20,17,15,.04);
  border-color: var(--line);
}
.auth .lang-switch a { color: var(--muted); }
.auth .lang-switch a.on {
  background: var(--gold-soft);
  color: var(--ink);
}
.topbar-actions .lang-switch {
  background: rgba(20,17,15,.04);
  border-color: var(--line);
}
.topbar-actions .lang-switch a { color: var(--muted); }
.topbar-actions .lang-switch a.on {
  background: var(--gold-soft);
  color: var(--ink);
}
.waiter-shell-tools {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
a { color: var(--gold); }
button, input, select, textarea { font: inherit; }

.admin {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}
/* dir=rtl already places the first column on the right — keep 280px | content */

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.15rem 0.9rem;
  background: var(--sidebar);
  color: #f4efe7;
  z-index: 40;
}
.aside-top {
  display: grid;
  gap: 0.75rem;
  padding: 0.4rem 0.55rem 0.9rem;
}
.aside-brand-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.aside-lang {
  padding: 0;
  display: flex;
  justify-content: flex-start;
}
.aside-lang .lang-switch {
  width: auto;
}
.manage-cafe-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: #1f2937;
  color: #f8fafc;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.manage-cafe-banner strong {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fbbf24;
}
.manage-cafe-banner span {
  font-size: 0.92rem;
}
.actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.actions-cell .inline { display: inline; margin: 0; }
/* Platform / codes */
.codes-page { display: grid; gap: 1rem; }
.codes-stats { margin-bottom: 0; }
.codes-mint {
  background:
    linear-gradient(135deg, rgba(184, 137, 58, 0.10), transparent 42%),
    var(--panel);
}
.codes-mint-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.codes-mint-note { grid-column: 1 / -1; }
.codes-list-panel { padding-top: 1rem; }
.codes-list-head {
  align-items: center;
  margin-bottom: 0.85rem;
}
.codes-search,
.platform-search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: min(280px, 100%);
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: #f7f5f1;
  border: 1px solid var(--line);
}
.codes-search i,
.platform-search i { color: var(--muted); font-size: 0.82rem; }
.codes-search input,
.platform-search input {
  border: 0;
  background: transparent;
  outline: none;
  width: 100%;
  min-width: 0;
  padding: 0.35rem 0;
  font: inherit;
}
.codes-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.codes-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f7f5f1;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.codes-tab b {
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(20, 17, 15, 0.06);
  font-size: 0.75rem;
}
.codes-tab.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.codes-tab.on b { background: rgba(255,255,255,0.16); color: #fff; }
.codes-grid {
  display: grid;
  gap: 0.7rem;
}
.code-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  background: #fcfbf9;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.code-card:hover {
  border-color: rgba(184, 137, 58, 0.35);
  box-shadow: 0 10px 28px rgba(24, 18, 12, 0.06);
}
.code-card.is-dim { opacity: 0.72; }
.code-card.is-used { background: #f6faf7; }
.code-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.code-value-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}
.code-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
  background: #fff;
  border: 1px dashed rgba(184, 137, 58, 0.45);
  color: var(--ink);
}
.code-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.code-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.code-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.code-meta b { color: var(--ink); font-weight: 700; }
.code-meta a { color: var(--ink); font-weight: 600; }
.code-meta i { margin-inline-end: 0.25rem; opacity: 0.7; }
.code-created { margin-inline-start: auto; opacity: 0.8; }
.code-edit-panel {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.code-edit-form { margin: 0; }
.code-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem 0.7rem;
  margin-bottom: 0.7rem;
}
.code-edit-grid label {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.code-edit-grid input[type="number"],
.code-edit-grid input[type="date"],
.code-edit-grid input[type="text"] {
  width: 100%;
  margin-top: 0.25rem;
}
.code-enable {
  align-self: end;
  margin-bottom: 0.35rem !important;
}
.code-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.btn.danger-text {
  color: var(--danger);
  background: rgba(196, 71, 58, 0.08);
}
.code-copy.copied {
  background: rgba(31, 122, 77, 0.12);
  color: var(--ok);
}
.platform-quick a {
  align-items: center;
}
.platform-quick-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  color: #7a5a1e;
  flex: 0 0 auto;
}
.pill.ready { background: rgba(184, 137, 58, 0.14); color: #7a5a1e; }
.pill.ghost { background: rgba(20, 17, 15, 0.05); color: var(--muted); }
.codes-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #faf9f7;
}
.platform-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.grant-code-form {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: #f7f5f1;
  border: 1px solid var(--line);
  margin-bottom: 0.25rem;
}
.danger-panel {
  border-color: rgba(196, 71, 58, 0.28);
  background:
    linear-gradient(135deg, rgba(196, 71, 58, 0.06), transparent 45%),
    var(--panel);
}
.danger-panel h2 { color: var(--danger); }
.btn.danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn.danger:hover { filter: brightness(1.05); }
.code-inline-edit { margin: 0; }
.code-inline-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: end;
}
.code-inline-fields label {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.code-inline-fields input {
  display: block;
  margin-top: 0.2rem;
  min-width: 90px;
  width: auto;
}
.row-muted { opacity: 0.55; }
.rest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
}
.rest-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.05rem;
  display: grid;
  gap: 0.75rem;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.rest-card:hover {
  transform: translateY(-2px);
  border-color: rgba(184, 137, 58, 0.35);
}
.rest-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: flex-start;
}
.rest-card-name {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.02rem;
}
.rest-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.rest-card-meta i { margin-inline-end: 0.2rem; opacity: 0.7; }
.rest-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
@media (max-width: 900px) {
  .codes-mint-grid,
  .code-edit-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .codes-mint-grid,
  .code-edit-grid { grid-template-columns: 1fr; }
  .code-created { margin-inline-start: 0; }
  .codes-list-head { flex-direction: column; align-items: stretch; }
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem 1rem;
}
.settings-grid .eyebrow {
  margin-bottom: 0.15rem;
}
.muted.small {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.15rem;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #e0bf6a, #9a6d2a);
  color: #1a1208;
  flex: 0 0 auto;
}
.brand { font-weight: 700; font-size: 1rem; letter-spacing: -0.02em; }
.brand-sub { color: rgba(244,239,231,.5); font-size: 0.72rem; margin-top: 0.12rem; }
.brand-copy { min-width: 0; flex: 1; }

.side-nav {
  display: grid;
  gap: 1.1rem;
  overflow: auto;
  padding: 0 0.2rem 0.4rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.side-nav::-webkit-scrollbar { display: none; }
.nav-group { display: grid; gap: 0.25rem; }
.nav-label {
  margin: 0 0 0.25rem 0.75rem;
  color: rgba(244,239,231,.38);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.78rem 0.85rem;
  border-radius: 14px;
  color: rgba(244,239,231,.62);
  text-decoration: none;
  transition: 0.2s var(--ease);
}
.nav-link i { width: 1.05rem; text-align: center; font-size: 0.92rem; }
.nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-link.on {
  background: rgba(224,191,106,.14);
  color: #f2d7a0;
}

.who {
  margin-top: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.8rem;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.05);
}
.who-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: #e0bf6a; color: #1a1208; font-weight: 700;
}
.who-meta strong { display: block; font-size: 0.86rem; }
.who-meta small { color: rgba(244,239,231,.45); font-size: 0.72rem; text-transform: capitalize; }

.icon-btn {
  border: 0;
  background: transparent;
  color: inherit;
  width: 36px; height: 36px;
  border-radius: 12px;
  display: grid; place-items: center;
  cursor: pointer;
}
.icon-btn:hover { background: rgba(255,255,255,.07); }
.sidebar .icon-btn { color: rgba(244,239,231,.7); }

.workspace { min-width: 0; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.6rem 0.4rem;
}
.topbar-left { display: flex; align-items: center; gap: 0.7rem; }
.eyebrow {
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.topbar h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  letter-spacing: -0.035em;
}
.topbar-actions { display: flex; gap: 0.55rem; flex-wrap: wrap; align-items: center; }
.live-announce {
  position: sticky;
  top: 0;
  z-index: 80;
}
.live-announce-bar {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  height: 2cm;
  min-height: 2cm;
  padding: 0 1.25rem;
  box-sizing: border-box;
  background: #c4473a;
  color: #fff7f5;
  font: inherit;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 28px rgba(196, 71, 58, 0.28);
  animation: liveAnnouncePulse 1.5s ease-in-out infinite;
}
.live-announce-bar i {
  font-size: 1.1rem;
  animation: floorBell 0.9s ease-in-out infinite;
}
.live-announce-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-announce-bar em {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.86;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 247, 245, 0.16);
}
.live-announce-panel {
  border-bottom: 1px solid rgba(196, 71, 58, 0.2);
  background: #fff8f6;
  box-shadow: 0 16px 40px rgba(196, 71, 58, 0.12);
  max-height: min(50vh, 420px);
  overflow: auto;
}
.live-announce-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem 0.35rem;
}
.live-announce-head strong { font-size: 0.9rem; }
.live-announce-list {
  display: grid;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem 0.9rem;
}
.live-announce-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(196, 71, 58, 0.14);
}
.live-announce-item .ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(196, 71, 58, 0.1);
  color: #c4473a;
}
.live-announce-item strong { display: block; font-size: 0.9rem; }
.live-announce-item p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.live-announce-item .actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: end;
}
.live-announce-empty {
  text-align: center;
  color: var(--muted);
  padding: 1rem;
  font-size: 0.88rem;
}
@keyframes liveAnnouncePulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}
.ko-card.is-focus,
.call-card.is-focus,
.floor-tile.is-focus {
  outline: 3px solid #c4473a;
  outline-offset: 2px;
  box-shadow: 0 0 0 8px rgba(196, 71, 58, 0.16);
  animation: focusPulse 1.1s ease-in-out 3;
}
@keyframes focusPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}
@media (max-width: 640px) {
  .live-announce-bar em { display: none; }
  .live-announce-item {
    grid-template-columns: auto 1fr;
  }
  .live-announce-item .actions {
    grid-column: 1 / -1;
    justify-content: start;
  }
}

.content { padding: 1rem 1.6rem 3rem; }

.flash, .err, .ok {
  display: flex; align-items: center; gap: 0.55rem;
  margin: 0 1.6rem 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  font-size: 0.92rem;
}
.content .flash, .content .err, .content .ok { margin-inline: 0; }
.flash { background: #e9f6ee; color: var(--ok); }
.err { background: #fdeceb; color: var(--danger); }
.ok { background: #e9f6ee; color: var(--ok); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}
.dash-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.dash-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: -0.25rem 0 1rem;
}
.dash-alert {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  background: #f3f1ec;
  color: var(--ink);
  border: 1px solid var(--line);
}
.dash-alert.warn { background: #fff1eb; border-color: rgba(196, 92, 52, 0.28); color: #9a3d1f; }
.dash-alert.due { background: #fff7e8; border-color: rgba(154, 116, 40, 0.28); color: #7a5a1c; }
.dash-alert.soft { background: #f4f2ef; color: var(--muted); }
.dash-side { display: grid; gap: 1rem; }
.dash-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.85rem;
}
.dash-meta > div { display: grid; gap: 0.15rem; }
.dash-meta span { color: var(--muted); font-size: 0.78rem; }
.dash-meta b { font-size: 0.95rem; }
.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}
.dash-kpis > div {
  background: #f7f5f1;
  border-radius: 14px;
  padding: 0.75rem 0.8rem;
  text-align: center;
}
.dash-kpis span { display: block; color: var(--muted); font-size: 0.75rem; margin-bottom: 0.2rem; }
.dash-kpis b { font-size: 1.25rem; letter-spacing: -0.03em; }
.dash-quick { grid-template-columns: 1fr 1fr; }
.quick-links.dash-quick {
  display: grid;
  gap: 0.45rem;
}
.stat, .panel, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stat {
  padding: 1.15rem 1.05rem;
  display: grid;
  gap: 0.35rem;
}
.stat b { font-size: 1.75rem; letter-spacing: -0.04em; }
.stat span { color: var(--muted); font-size: 0.84rem; }
.stat .stat-ico {
  width: 34px; height: 34px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--gold-soft); color: #7a5a1e;
  margin-bottom: 0.35rem;
}

.panel, .card {
  padding: 1.2rem 1.25rem;
  margin-bottom: 1rem;
}
.panel-head, .section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.panel h2, .section-head h2 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}
.panel p { margin: 0.35rem 0; color: var(--muted); line-height: 1.5; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.grid-dash {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
}
.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}
label {
  display: grid;
  gap: 0.38rem;
  margin: 0.5rem 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfaf8;
  color: var(--ink);
  padding: 0.78rem 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--gold) 50%, var(--line));
  box-shadow: 0 0 0 4px rgba(184,137,58,.12);
}
.checks {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  margin: 0.6rem 0;
}
.checks label {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin: 0; font-weight: 500;
}
.flag-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}
.flag-check {
  height: 2.75rem;
  min-height: 2.75rem;
  max-height: 2.75rem;
  padding: 0 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  cursor: pointer;
  box-sizing: border-box;
  overflow: hidden;
}
.flag-check span {
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-size: 0.84rem;
}
.flag-check:has(input:checked) {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  background: var(--gold-soft);
}

.btn, .panel button[type="submit"], .auth-card button[type="submit"], .actions > button, .actions > a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 12px;
  padding: 0.78rem 1.05rem;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.btn:hover, .panel button[type="submit"]:hover { transform: translateY(-1px); }
.btn.soft {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.btn.ghost, button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.danger, button.danger {
  background: #fff;
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 22%, var(--line));
}
.btn.sm, .actions button, .actions .btn {
  padding: 0.55rem 0.75rem;
  font-size: 0.84rem;
  border-radius: 10px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--panel);
}
.table th, .table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: start;
  vertical-align: middle;
  font-size: 0.92rem;
}
.table th {
  background: #faf8f5;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  position: sticky;
  top: 0;
}
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fcfbf9; }

.thumb {
  width: 48px; height: 48px; object-fit: cover; border-radius: 12px;
  background: #eee;
}
.thumb.lg { width: 96px; height: 96px; margin: 0.4rem 0; }
.actions { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.inline { display: inline; }
.muted { color: var(--muted); }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #f1eee9;
  color: var(--muted);
}
.pill.ok { background: #e8f6ee; color: var(--ok); }
.pill.warn { background: #fff4e5; color: #9a5b00; }
.pill.danger { background: #fdeceb; color: var(--danger); }

.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.list li {
  display: flex; justify-content: space-between; gap: 0.6rem; align-items: center;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: #faf8f5;
  border: 1px solid var(--line);
}
.branding-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 1.1rem;
  margin: 0.85rem 0 1.1rem;
  align-items: start;
}
.branding-themes h3,
.branding-preview-wrap h3 {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
}
.themes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0 0 0.85rem;
}
.theme-pick {
  position: relative;
  display: grid;
  gap: 0;
  padding: 0;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fbfaf8;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.theme-pick input { position: absolute; opacity: 0; pointer-events: none; }
.theme-pick-body {
  display: grid;
  gap: 0.55rem;
  padding: 0.7rem 0.75rem 0.8rem;
}
.theme-swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.28rem;
  height: 2rem;
}
.theme-swatch {
  border-radius: 8px;
  border: 1px solid rgba(20, 20, 20, 0.08);
}
.theme-pick-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}
.theme-pick-meta strong {
  font-size: 0.86rem;
  letter-spacing: -0.01em;
}
.theme-mode {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.theme-pick:has(input:checked) {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent);
  background: var(--gold-soft);
}
.accent-row {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #faf8f5;
}
.accent-field { margin: 0; }
.accent-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.accent-inputs input[type="color"] {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.accent-inputs input[type="text"] {
  flex: 1;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88rem;
}
.check-inline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.check-inline input { width: auto; margin: 0; }
.fx-row {
  margin-top: 0.95rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #faf8f5;
}
.fx-row h3 { margin: 0 0 0.25rem; font-size: 0.92rem; }
.fx-hint { margin: 0 0 0.65rem; font-size: 0.8rem; }
.fx-picks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}
.fx-pick {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 0.86rem;
}
.fx-pick input { width: auto; margin: 0; }
.fx-pick:has(input:checked) {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  background: var(--gold-soft);
}
.branding-preview {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(20, 20, 20, 0.08);
  background: var(--bg, #100e0c);
  color: var(--ink, #f3ebe1);
  font-family: var(--font, system-ui, sans-serif);
  box-shadow: var(--shadow, 0 18px 40px rgba(0, 0, 0, 0.2));
  min-height: 260px;
}
.bp-hero {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 1.35rem 1rem 1.1rem;
  background:
    radial-gradient(60% 80% at 50% 0%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%),
    var(--hero, var(--bg2));
  text-align: center;
  overflow: hidden;
}
.bp-cover {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, var(--hero-dark, 0.55));
  opacity: 0.85;
}
.bp-hero > *:not(.bp-cover) { position: relative; z-index: 1; }
.bp-cats {
  display: flex;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem 0.15rem;
  overflow: hidden;
}
.bp-cats[data-cat="underline"] {
  gap: 0.1rem;
  border-bottom: 1px solid var(--border);
  margin: 0 0.55rem;
  padding-bottom: 0;
}
.bp-cat {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.bp-cat.on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}
.bp-cats[data-cat="underline"] .bp-cat {
  border: 0;
  border-radius: 0;
  background: transparent;
  border-bottom: 2px solid transparent;
  padding: 0.45rem 0.55rem;
}
.bp-cats[data-cat="underline"] .bp-cat.on {
  color: var(--accent);
  background: transparent;
  border-bottom-color: var(--accent);
}
.bp-logo {
  width: calc(3rem * var(--logo-scale, 1));
  height: calc(3rem * var(--logo-scale, 1));
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 55%, var(--card));
  border: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  margin-bottom: 0.25rem;
}
.bp-logo[hidden] { display: none !important; }
.logo-opts {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.7rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #faf8f5;
}
.logo-scale-field {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 0.86rem;
}
.logo-scale-field input[type="range"] {
  margin: 0;
  width: 100%;
}
#logoScaleVal {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  min-width: 2.6rem;
  text-align: end;
}
.bp-name {
  font-family: var(--display, Georgia, serif);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.bp-tag {
  color: var(--muted);
  font-size: 0.78rem;
}
.bp-card {
  margin: 0.75rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  display: grid;
  gap: 0.45rem;
}
.bp-card p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}
.bp-chip {
  width: fit-content;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.bp-btn {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.8rem;
  pointer-events: none;
}
@media (max-width: 900px) {
  .branding-layout { grid-template-columns: 1fr; }
  .themes { grid-template-columns: 1fr; }
}

.quick-links {
  display: grid;
  gap: 0.55rem;
}
.quick-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  text-decoration: none;
  color: var(--ink);
  background: #faf8f5;
  border: 1px solid var(--line);
  transition: 0.2s var(--ease);
}
.quick-links a:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--gold) 40%, var(--line));
}
.quick-links span { color: var(--muted); font-size: 0.84rem; }

.menu-studio { display: grid; gap: 1rem; }
.menu-studio-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.menu-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.menu-form label { display: grid; gap: 0.35rem; margin-bottom: 0.75rem; }
.menu-form-wide { max-width: 980px; }
.menu-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.1rem;
}
.menu-form-grid section {
  padding: 0.9rem;
  border-radius: 16px;
  background: #faf8f5;
  border: 1px solid var(--line);
}
.menu-form-grid h3 {
  margin: 0 0 0.75rem;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.menu-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}
.menu-toolbar {
  display: grid;
  gap: 0.75rem;
}
.menu-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 420px;
  min-height: 2.7rem;
  padding: 0 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--muted);
}
.menu-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 0;
  padding: 0.7rem 0;
  margin: 0;
  font: inherit;
  color: var(--ink);
}
.menu-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.menu-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.2rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 650;
  box-sizing: border-box;
}
.menu-filter em {
  font-style: normal;
  min-width: 1.3rem;
  height: 1.3rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #f1eee9;
  font-size: 0.72rem;
}
.menu-filter.on {
  background: #171310;
  border-color: #171310;
  color: #fff;
}
.menu-filter.on em { background: rgba(255,255,255,.14); color: #fff; }
.cat-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}
.cat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.7rem;
}
.cat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.cat-card-ico {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  color: #8a641f;
}
.cat-card h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.cat-langs {
  display: grid;
  gap: 0.35rem;
}
.cat-langs span {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
  color: var(--ink);
  font-size: 0.84rem;
}
.cat-langs em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 1.5rem;
}
.cat-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}
.item-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.9rem;
  align-items: stretch;
}
.item-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.item-card[hidden] { display: none !important; }
.item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(24, 18, 12, 0.1);
}
.item-card.is-sold { opacity: 0.72; }
.item-card-media { position: relative; flex: 0 0 auto; }
.item-card img, .item-card .ph {
  width: 100%; height: 150px; object-fit: cover; background: #ece8e2;
  display: grid; place-items: center; color: #b2a89c; font-size: 1.4rem;
}
.item-card-flags {
  position: absolute;
  inset-inline-start: 0.55rem;
  top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  max-width: calc(100% - 1.1rem);
}
.item-card-flags .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.55rem;
  min-height: 1.55rem;
  width: 5.6rem;
  min-width: 5.6rem;
  max-width: 5.6rem;
  padding: 0 0.4rem;
  line-height: 1;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.68rem;
}
.item-card-flags .pill.ghost {
  background: rgba(255,255,255,.72);
  color: transparent;
  border: 1px solid transparent;
  visibility: hidden;
}
.item-card .body {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1 1 auto;
  min-height: 0;
}
.item-card-main {
  display: grid;
  gap: 0.4rem;
  flex: 1 1 auto;
}
.item-card-cat {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-height: 1rem;
}
.item-card .name {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1rem;
  line-height: 1.25;
  min-height: 2.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-card .meta { color: var(--muted); font-size: 0.9rem; }
.item-card .meta strong { color: var(--ink); font-size: 1.05rem; }
.item-card-ings {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.28rem;
  min-height: 1.7rem;
}
.item-card-ings span {
  min-height: 1.4rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: #f4f1ec;
  border: 1px solid var(--line);
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}
.item-card-ings .ing-empty {
  background: transparent;
  border-color: transparent;
  color: transparent;
}
.item-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.4rem;
  margin-top: auto;
  align-items: stretch;
}
.item-card-actions form {
  margin: 0;
  display: flex;
  min-width: 0;
}
.item-card-actions .btn {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.5rem 0.55rem;
  white-space: nowrap;
}
.item-card-actions .btn.icon-only {
  width: 2.35rem;
  min-width: 2.35rem;
  padding: 0;
}
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.2rem 1rem;
  display: grid;
  gap: 0.7rem;
  justify-items: center;
  color: var(--muted);
}
.empty-state i { font-size: 1.5rem; opacity: 0.55; }

.tabs-mini {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 14px;
  background: #ebe7e1;
  margin-bottom: 0;
  flex-wrap: wrap;
}
.tabs-mini a, .tabs-mini button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.55rem 0.9rem;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  cursor: pointer;
  font-weight: 650;
  font-size: 0.88rem;
}
.tabs-mini em {
  font-style: normal;
  font-size: 0.72rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(20,17,15,.06);
}
.tabs-mini a.on, .tabs-mini button.on {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
}
.tabs-mini a.on em { background: rgba(255,255,255,.18); }

@media (max-width: 900px) {
  .menu-layout,
  .menu-form-grid { grid-template-columns: 1fr; }
}

.mobile-only { display: none; }

/* Full-bleed live board: sidebar hidden until opened */
.admin.admin-wide {
  grid-template-columns: 1fr;
}
.admin.admin-wide .sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(300px, 88vw);
  transform: translateX(-105%);
  transition: transform 0.28s var(--ease);
}
.admin.admin-wide.nav-open .sidebar { transform: none; }
.admin.admin-wide.nav-open .sidebar-backdrop { display: block; }
.admin.admin-wide .content {
  padding-inline: 1.1rem 1.25rem;
  max-width: none;
}
.admin.admin-wide .live-grid {
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.6fr);
}
.admin.admin-wide .kitchen-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.admin.admin-wide .kitchen-board-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10,8,6,.45);
  backdrop-filter: blur(4px);
  z-index: 35;
}

/* Auth */
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    radial-gradient(700px 360px at 80% 0%, rgba(184,137,58,.18), transparent 60%),
    linear-gradient(160deg, #171310, #2a2118 55%, #12100e);
}
.auth-panel { width: min(440px, 100%); }
.auth-brand {
  display: flex; align-items: center; justify-content: center; gap: 0.55rem;
  color: #f2d7a0; font-weight: 700; margin-bottom: 1rem;
}
.auth-card {
  background: rgba(255,255,255,.97);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.auth-card h1 { margin: 0; font-size: 1.55rem; letter-spacing: -0.03em; }
.auth-lead { margin: 0.4rem 0 1rem; color: var(--muted); font-size: 0.92rem; }
.auth-card button[type="submit"] { width: 100%; margin-top: 0.7rem; }
.auth-card .muted { text-align: center; margin-top: 0.9rem; }

/* Floor / waiter board */
.floor { display: grid; gap: 1rem; }
.floor-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}
.floor-stat.calling { border: 1px solid rgba(196, 92, 52, 0.28); }
.floor-stat.calling b { color: #c45c34; }
.floor-stat.occupied b { color: #9a7428; }
.floor-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.floor-legend .dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-inline-end: 0.3rem;
  vertical-align: middle;
}
.floor-legend .dot.free { background: #c9c4bb; }
.floor-legend .dot.occupied { background: #c9a24a; }
.floor-legend .dot.calling { background: #c45c34; animation: floorPulse 1.2s ease-in-out infinite; }
.floor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.55rem;
}
.floor-tile {
  position: relative;
  appearance: none;
  border: 1px solid rgba(20,20,20,.08);
  background: #f3f1ec;
  color: #2a2a28;
  border-radius: 16px;
  padding: 0.85rem 0.55rem 0.7rem;
  min-height: 92px;
  display: grid;
  align-content: start;
  gap: 0.15rem;
  text-align: start;
  cursor: default;
}
.floor-tile strong { font-size: 1.2rem; letter-spacing: -0.03em; }
.floor-tile span, .floor-tile small { color: #6d6d68; font-size: 0.72rem; text-transform: capitalize; }
.floor-tile.occupied {
  background: #fff7e8;
  border-color: rgba(154, 116, 40, 0.28);
}
.floor-tile.calling {
  background: #fff1eb;
  border-color: rgba(196, 92, 52, 0.45);
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(196, 92, 52, 0.35);
  animation: floorPulse 1.2s ease-in-out infinite;
}
.floor-tile .tile-bell {
  position: absolute;
  top: 0.55rem;
  inset-inline-end: 0.55rem;
  color: #c45c34;
  animation: floorBell 0.8s ease-in-out infinite;
}
.calls-panel {
  border-color: rgba(196, 92, 52, 0.22);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(196, 92, 52, 0.08), transparent 55%),
    var(--panel);
}
.calls-panel .panel-head { align-items: end; }
.calls-panel .eyebrow { margin: 0 0 0.15rem; color: #9a3d1f; }
.call-count {
  background: rgba(196, 92, 52, 0.12);
  color: #9a3d1f;
}
.calls-list { display: grid; gap: 0.65rem; }
.call-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(196, 92, 52, 0.18);
  box-shadow: 0 10px 28px rgba(196, 92, 52, 0.06);
}
.call-card.open {
  animation: floorPulse 1.4s ease-in-out infinite;
}
.call-card-ico {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(196, 92, 52, 0.12);
  color: #c45c34;
  font-size: 1.05rem;
}
.call-card.open .call-card-ico { animation: floorBell 0.9s ease-in-out infinite; }
.call-card-ico.soft {
  background: rgba(20, 17, 15, 0.05);
  color: var(--muted);
  animation: none;
}
.call-card-body { min-width: 0; }
.call-card-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}
.call-card-body p {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}
.call-card-body small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.pill.warn { background: rgba(196, 92, 52, 0.14); color: #9a3d1f; }
.pill.ok { background: rgba(31, 122, 77, 0.12); color: #1f7a4d; }
.pill.status-done, .pill.status-ready { background: rgba(31, 122, 77, 0.12); color: #1f7a4d; }
.pill.status-served { background: rgba(31, 79, 138, 0.12); color: #1f4f8a; }
.pill.status-cancelled { background: rgba(20, 17, 15, 0.06); color: var(--muted); }
.pill.status-new { background: rgba(196, 92, 52, 0.12); color: #9a3d1f; }
.pill.status-preparing { background: rgba(154, 116, 40, 0.14); color: #7a5a1c; }
@keyframes floorPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 92, 52, 0.28); }
  50% { box-shadow: 0 0 0 7px rgba(196, 92, 52, 0); }
}
@keyframes floorBell {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(12deg); }
  75% { transform: rotate(-10deg); }
}

/* Live floor = orders + waiter calls */
.live { display: grid; gap: 0.85rem; }
.live-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
}
.live-strip {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.live-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #f4f2ef;
  white-space: nowrap;
}
.live-metric span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.live-metric b {
  font-size: 0.92rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.live-metric.due b { color: #9a3d1f; }
.live-metric.calling b { color: #c45c34; }
.live-metric.new b { color: #c45c34; }
.live-metric.prep b { color: #9a7428; }
.live-metric.ready b { color: #2f7a4c; }
.live-metric.pay b { color: #1f4f8a; }
.live-metric.soft {
  background: transparent;
  border: 1px solid var(--line);
}
.cashier-open {
  flex: 0 0 auto;
  white-space: nowrap;
  padding-inline: 1rem;
}
.pill.pay-ok { background: rgba(47, 122, 76, 0.14); color: #1f6a42; }
.pill.pay-due { background: rgba(196, 92, 52, 0.14); color: #9a3d1f; }
.ko-card.unpaid { box-shadow: inset 3px 0 0 #c45c34; }
.cashier-pay { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cashier-pay .chip { display: inline-flex; align-items: center; gap: 0.35rem; }
.pill.ch-reception { background: rgba(47, 122, 76, 0.14); color: #1f6a42; }
.pill.ch-phone { background: rgba(47, 98, 160, 0.14); color: #1f4f8a; }
.pill.ch-whatsapp { background: rgba(31, 158, 85, 0.14); color: #14663a; }
.pill.ch-waiter { background: rgba(88, 86, 214, 0.14); color: #3d3a9e; }
.pill.ch-table { background: rgba(154, 116, 40, 0.14); color: #7a5a1c; }

.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 0.4rem;
  max-height: 140px;
  overflow: auto;
}
.table-chip {
  min-height: 42px;
  border: 1px solid var(--line);
  background: #f3f1ec;
  color: var(--ink);
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}
.table-chip.on {
  background: #1f1c18;
  color: #fff8ef;
  border-color: #1f1c18;
}

/* Cashier drawer */
.cashier[hidden] { display: none !important; }
.cashier {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: stretch end;
}
.cashier-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 6, 0.45);
  backdrop-filter: blur(6px);
}
.cashier-sheet {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  height: 100%;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px rgba(20, 16, 10, 0.18);
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 0.75rem;
  padding: 1rem 1.1rem 1.2rem;
  overflow: hidden;
}
.cashier-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.75rem;
}
.cashier-head h2 { margin: 0.1rem 0 0; font-size: 1.35rem; letter-spacing: -0.03em; }
.cashier-source { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cashier-source .chip { display: inline-flex; align-items: center; gap: 0.4rem; }
.cashier-block { display: grid; gap: 0.4rem; }
.cashier-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.cashier-label-row small { font-weight: 500; }
.linkish {
  border: 0;
  background: transparent;
  color: var(--gold);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.cashier-search {
  position: relative;
  margin: 0;
}
.cashier-search i {
  position: absolute;
  inset-inline-start: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.cashier-search input { padding-inline-start: 2.2rem; margin: 0; }
.cashier-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 0.85rem;
  overflow: hidden;
}
.cashier-menu {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7f5f1;
  padding: 0.75rem;
}
.cashier-cat + .cashier-cat { margin-top: 0.85rem; }
.cashier-cat h4 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.cashier-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.45rem;
}
.cashier-item {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  text-align: start;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 0.7rem 0.75rem;
  cursor: pointer;
  font-weight: 700;
}
.cashier-item:hover { border-color: rgba(184, 137, 58, 0.45); }
.cashier-item strong { color: var(--muted); font-size: 0.85rem; font-weight: 800; }
.cashier-cart {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem;
  background: #fff;
}
.cashier-cart h3 { margin: 0; font-size: 0.95rem; }
.cashier-cart-list { overflow: auto; display: grid; gap: 0.45rem; align-content: start; }
.cashier-line {
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  align-items: center;
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  background: #f7f5f1;
}
.cashier-line strong { display: block; font-size: 0.88rem; }
.cashier-line span { color: var(--muted); font-size: 0.75rem; }
.cashier-cart .ord-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  background: #fff;
  border-radius: 999px;
  padding: 0.1rem;
}
.cashier-cart .ord-qty button {
  border: 0;
  background: transparent;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 700;
}
.cashier-cart .ord-qty em {
  min-width: 1rem;
  text-align: center;
  font-style: normal;
  font-weight: 800;
}
.cashier-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.92rem;
}
.cashier-total strong { font-size: 1.15rem; }
body.cashier-open { overflow: hidden; }
.live-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.4fr);
  gap: 1rem;
  align-items: start;
}
.history-panel { overflow: hidden; }
.history-head {
  align-items: end;
  margin-bottom: 0.85rem;
}
.history-head .eyebrow { margin: 0 0 0.15rem; }
.live-history {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  align-items: start;
}
.history-col {
  min-width: 0;
  display: grid;
  gap: 0.65rem;
}
.history-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.history-col-head h3 {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}
.history-feed {
  display: grid;
  gap: 0.55rem;
  max-height: min(48vh, 520px);
  overflow: auto;
  padding-right: 0.15rem;
}
.history-empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
}
.history-empty i {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 1.35rem;
  opacity: 0.7;
}
.history-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.85rem 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: #faf9f7;
  border: 1px solid var(--line);
}
.history-row.call-row {
  grid-template-columns: auto 1fr auto;
}
.history-row.is-open {
  background: #fff8f5;
  border-color: rgba(196, 92, 52, 0.2);
}
.history-row.is-due {
  box-shadow: inset 3px 0 0 #c45c34;
}
.history-row.is-paid {
  box-shadow: inset 3px 0 0 #2f7a4c;
}
.history-row-main { min-width: 0; }
.history-row-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}
.history-row-copy,
.history-row-items {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}
.history-row-items {
  margin-top: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-row-side {
  display: grid;
  justify-items: end;
  gap: 0.35rem;
  text-align: end;
}
.history-row-side b {
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.history-row-side small {
  color: var(--muted);
  font-size: 0.75rem;
}
.history-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 0.35rem;
}

/* Kitchen orders board */
.kitchen { display: grid; gap: 1rem; }
.kitchen-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kitchen-stat.new b { color: #c45c34; }
.kitchen-stat.preparing b { color: #9a7428; }
.kitchen-stat.ready b { color: #2f7a4c; }
.kitchen-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
}
.kitchen-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: #f3f1ec;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.chip.on {
  background: #1f1c18;
  border-color: #1f1c18;
  color: #fff8ef;
}
.kitchen-search {
  position: relative;
  margin: 0;
  min-width: min(240px, 100%);
}
.kitchen-search i {
  position: absolute;
  inset-inline-start: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.8rem;
  pointer-events: none;
}
.kitchen-search input {
  padding-inline-start: 2.2rem;
  margin: 0;
}
.kitchen-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: start;
}
.kitchen-board-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1280px) {
  .kitchen-board-4,
  .admin.admin-wide .kitchen-board-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.kitchen-col {
  background: #f7f5f1;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.75rem;
  min-height: 280px;
}
.kitchen-col.pay-col {
  background: #f0f5fb;
  border-color: rgba(31, 79, 138, 0.18);
}
.ko-card.status-served {
  border-color: rgba(31, 79, 138, 0.28);
  box-shadow: 0 0 0 1px rgba(31, 79, 138, 0.06);
}
.ko-card.status-served.unpaid .ko-actions .btn:not(.soft) {
  background: #1f4f8a;
  color: #fff;
}
.kitchen-col header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.7rem;
  padding: 0.15rem 0.25rem;
}
.kitchen-col h2 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}
.kitchen-stack { display: grid; gap: 0.65rem; }
.ko-empty {
  margin: 1.2rem 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}
.ko-card {
  background: #fff;
  border: 1px solid rgba(20,20,20,.08);
  border-radius: 16px;
  padding: 0.85rem;
  display: grid;
  gap: 0.55rem;
  box-shadow: 0 8px 24px rgba(40, 30, 16, 0.04);
}
.ko-card.status-new { border-color: rgba(196, 92, 52, 0.28); }
.ko-card.status-preparing { border-color: rgba(154, 116, 40, 0.28); }
.ko-card.status-ready { border-color: rgba(47, 122, 76, 0.28); }
.ko-card-top, .ko-meta, .ko-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
}
.ko-card-top strong { font-size: 1.05rem; letter-spacing: -0.03em; }
.ko-age { color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.ko-meta { color: var(--muted); font-size: 0.8rem; }
.ko-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.ko-items {
  margin: 0;
  padding: 0.55rem 0.75rem;
  list-style: none;
  background: #f7f5f1;
  border-radius: 12px;
  display: grid;
  gap: 0.28rem;
  font-size: 0.9rem;
}
.ko-note {
  margin: 0;
  color: #8a4b2a;
  font-size: 0.84rem;
  background: #fff5ee;
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
}
.ko-card-foot { flex-wrap: wrap; }
.ko-card-foot b { font-size: 0.95rem; }
.ko-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: flex-end; }
.settings-form { display: grid; gap: 1rem; }
.settings-lead {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.settings-tables {
  display: grid;
  gap: 0.45rem;
  max-width: 280px;
}
.settings-tables-field {
  margin: 0;
  display: grid;
  gap: 0.4rem;
}
.settings-tables-field input {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 0.85rem 1rem;
}
.settings-toggles {
  display: grid;
  gap: 0.65rem;
}
.settings-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--border, rgba(0,0,0,.08));
  background: var(--panel-soft, rgba(0,0,0,.03));
  cursor: pointer;
}
.settings-toggle input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  flex: 0 0 auto;
}
.settings-toggle span {
  display: grid;
  gap: 0.15rem;
}
.settings-toggle strong {
  font-size: 0.95rem;
}
.settings-toggle small {
  color: var(--muted, #6b7280);
  font-size: 0.8rem;
}
.settings-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.settings-actions {
  display: flex;
  justify-content: flex-end;
}
.settings-actions .btn { min-width: 160px; }
.settings-domain-dns {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}
.settings-cname {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.92rem;
  word-break: break-all;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.settings-domain-steps {
  margin-top: 0.75rem;
}
.settings-dns-example {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.55rem;
}
.settings-dns-table {
  display: grid;
  gap: 0.35rem;
  overflow-x: auto;
}
.settings-dns-row {
  display: grid;
  grid-template-columns: 72px 72px minmax(140px, 1.4fr) minmax(120px, 1fr);
  gap: 0.45rem;
  align-items: start;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  font-size: 0.78rem;
}
.settings-dns-row.head {
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  padding-bottom: 0.15rem;
}
.settings-dns-row code {
  font-size: 0.78rem;
  word-break: break-all;
}
.settings-domain-links {
  margin-top: 0.85rem;
  align-items: start;
}
.settings-domain-links a {
  word-break: break-all;
}
@media (max-width: 720px) {
  .settings-dns-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
  .settings-dns-row.head { display: none; }
}

.sys-confirm {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  padding: 1.25rem;
  background: rgba(12, 10, 8, 0.48);
  backdrop-filter: blur(6px);
}
.sys-confirm.open { display: grid; }
body.sys-confirm-lock { overflow: hidden; }
.sys-confirm-card {
  width: min(100%, 420px);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 1.25rem 1.25rem 1.15rem;
  animation: sysConfirmIn 0.22s var(--ease);
}
@keyframes sysConfirmIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.sys-confirm-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(20, 17, 15, 0.06);
  color: var(--ink);
  margin-bottom: 0.85rem;
  font-size: 1.15rem;
}
.sys-confirm-ico.warn {
  background: rgba(196, 71, 58, 0.1);
  color: var(--danger);
}
.sys-confirm-card h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.sys-confirm-card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
}
.sys-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 1.15rem;
}
.sys-confirm-actions .btn {
  width: 100%;
  justify-content: center;
}

.kitchen-print { display: none; }
.ko-ticket {
  width: 62mm;
  max-width: 100%;
  margin: 0 auto;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  line-height: 1.2;
}
.ko-ticket .kt-brand {
  margin: 0 0 0.25rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ko-ticket .kt-hero {
  display: grid;
  gap: 0.08rem;
  text-align: center;
  padding: 0.3rem 0.15rem;
  border: 2px solid #000;
  margin-bottom: 0.28rem;
}
.ko-ticket .kt-order {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}
.ko-ticket .kt-place {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.05;
}
.ko-ticket .kt-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.2rem 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  margin-bottom: 0.28rem;
}
.ko-ticket .kt-paid { color: #000; }
.ko-ticket .kt-due { color: #000; text-decoration: underline; text-underline-offset: 1px; }
.ko-ticket .kt-items {
  display: grid;
  gap: 0.22rem;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  padding: 0.32rem 0;
}
.ko-ticket .kt-item {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) auto;
  gap: 0.2rem;
  align-items: center;
  min-width: 0;
}
.ko-ticket .kt-qty {
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.1;
}
.ko-ticket .kt-name {
  min-width: 0;
}
.ko-ticket .kt-name strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}
.ko-ticket .kt-price {
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.ko-ticket .kt-empty {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.ko-ticket .kt-note {
  margin-top: 0.28rem;
  padding: 0.28rem 0.35rem;
  border: 2px solid #000;
}
.ko-ticket .kt-note b {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.ko-ticket .kt-note p {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}
.ko-ticket .kt-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
}
.ko-ticket .kt-total strong {
  font-size: 0.95rem;
  font-weight: 800;
}
.ko-ticket .kt-tear,
.kitchen-print .kt-tear {
  display: block;
  width: 100%;
  min-height: 12mm;
  padding-top: 2mm;
  margin: 0;
  font-size: 9px;
  line-height: 2.5mm;
  color: #000;
  text-align: center;
}
.mm-print-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 120;
  transform: translateX(-50%) translateY(120%);
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: #1a1f27;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}
.mm-print-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.mm-print-toast.ok { background: #14663a; }
@media print {
  @page {
    size: auto;
    margin: 0;
  }
  html, body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    min-height: 0 !important;
  }
  body {
    display: block !important;
  }
  body * { visibility: hidden !important; }
  .kitchen-print, .kitchen-print * { visibility: visible !important; }
  .kitchen-print {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 1.5mm 0 0 !important;
    background: #fff;
    color: #000;
  }
  .ko-ticket {
    width: 62mm;
    max-width: 94%;
    margin: 0 auto !important;
    text-align: left;
    font-family: Arial, Helvetica, sans-serif !important;
    font-weight: 700 !important;
  }
  .mm-print-toast { display: none !important; }
}

@media (max-width: 980px) {
  .admin { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 88vw);
    transform: translateX(-105%);
    transition: transform 0.28s var(--ease);
  }
  html[dir="rtl"] .sidebar {
    inset: 0 0 0 auto;
    transform: translateX(105%);
  }
  .admin.nav-open .sidebar { transform: none; }
  .admin.nav-open .sidebar-backdrop { display: block; }
  .mobile-only { display: grid; }
  .stats, .dash-stats, .grid-2, .grid-dash, .floor-stats, .kitchen-stats, .live-stats, .live-stats.money-stats, .money-panel .money-grid, .dash-quick, .dash-meta { grid-template-columns: 1fr 1fr; }
  .live-grid, .live-history, .kitchen-board, .kitchen-board-4, .cashier-body { grid-template-columns: 1fr; }
  .call-card,
  .history-row.call-row {
    grid-template-columns: auto 1fr;
  }
  .history-row {
    grid-template-columns: 1fr;
  }
  .history-row-side,
  .call-card .btn {
    grid-column: 1 / -1;
    justify-items: start;
    text-align: start;
  }
  .history-row-actions { justify-content: start; }
  .call-card .btn { width: 100%; justify-content: center; }
  .cashier-sheet { width: min(100vw, 100%); }
  .topbar, .content { padding-inline: 1rem; }
  .flash { margin-inline: 1rem; }
}
@media (max-width: 640px) {
  .stats, .dash-stats, .grid-2, .grid-dash, .floor-stats, .kitchen-stats, .live-stats, .live-stats.money-stats, .money-panel .money-grid, .dash-quick, .dash-meta, .dash-kpis { grid-template-columns: 1fr; }
  .topbar { align-items: start; flex-direction: column; }
  .kitchen-toolbar { align-items: stretch; }
  .kitchen-search { min-width: 100%; }
  .cashier-open { width: 100%; }
  .cashier-cart { max-height: 42vh; }
}
