/* QRRest Hall / Tables — shared operational map and editor surfaces. */
:root {
  --hall-bg: #07111d;
  --hall-bg-deep: #040a12;
  --hall-panel: rgba(10, 22, 36, 0.94);
  --hall-panel-soft: rgba(13, 27, 43, 0.82);
  --hall-panel-raised: #101f31;
  --hall-border: rgba(148, 163, 184, 0.16);
  --hall-border-strong: rgba(148, 163, 184, 0.28);
  --hall-text: #f8fafc;
  --hall-muted: #91a1b7;
  --hall-blue: #3b82f6;
  --hall-blue-bright: #60a5fa;
  --hall-green: #4ade80;
  --hall-amber: #fbbf24;
  --hall-orange: #fb923c;
  --hall-purple: #a78bfa;
  --hall-red: #f87171;
  --hall-radius: 18px;
  --hall-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  color-scheme: dark;
}

.hall-body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(37, 99, 235, 0.12), transparent 36rem),
    linear-gradient(145deg, var(--hall-bg) 0%, var(--hall-bg-deep) 100%);
  color: var(--hall-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hall-shell,
.hall-editor-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 18rem);
}

.hall-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 16px;
  padding: max(12px, env(safe-area-inset-top)) 18px 12px;
  border-bottom: 1px solid var(--hall-border);
  background: rgba(6, 15, 26, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}

.hall-brand {
  display: flex;
  min-width: 205px;
  align-items: center;
  gap: 10px;
  color: var(--hall-text);
  text-decoration: none;
}

.hall-brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.hall-brand-copy {
  display: grid;
  gap: 1px;
}

.hall-brand-copy strong {
  font-size: 17px;
  letter-spacing: -0.03em;
}

.hall-brand-copy span {
  color: var(--hall-muted);
  font-size: 11px;
}

.hall-summary-strip {
  display: grid;
  min-width: 0;
  flex: 1;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 9px;
}

.hall-summary-card {
  display: grid;
  min-height: 50px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--hall-border);
  border-radius: 12px;
  background: rgba(15, 28, 43, 0.72);
}

.hall-summary-card[data-active="true"] {
  border-color: color-mix(in srgb, var(--summary-color, var(--hall-blue)) 55%, transparent);
  background: color-mix(in srgb, var(--summary-color, var(--hall-blue)) 11%, rgba(15, 28, 43, 0.85));
}

.hall-summary-icon {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  color: var(--summary-color, var(--hall-muted));
  background: color-mix(in srgb, var(--summary-color, var(--hall-muted)) 13%, transparent);
  font-size: 15px;
}

.hall-summary-label {
  color: #cbd5e1;
  font-size: 11px;
  white-space: nowrap;
}

.hall-summary-value {
  color: var(--summary-color, var(--hall-text));
  font-size: 20px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.hall-clock {
  display: grid;
  min-width: 118px;
  justify-items: end;
}

.hall-clock strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.hall-clock span {
  color: var(--hall-muted);
  font-size: 10px;
}

.hall-workspace {
  display: grid;
  min-height: calc(100vh - 76px);
  grid-template-columns: 220px minmax(0, 1fr) 276px;
}

.hall-map-panel {
  min-width: 0;
  padding: 16px;
  overflow: hidden;
}

.hall-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.hall-map-toolbar .hall-search {
  flex: 1 1 240px;
}

.hall-poll-status {
  color: var(--hall-muted);
  font-size: 11px;
  white-space: nowrap;
}

.hall-rail,
.hall-detail-panel,
.hall-editor-library,
.hall-editor-inspector {
  min-width: 0;
  border-color: var(--hall-border);
  background: linear-gradient(180deg, rgba(10, 22, 36, 0.96), rgba(6, 15, 26, 0.96));
}

.hall-rail {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 18px 12px;
  border-right: 1px solid var(--hall-border);
}

.hall-rail-section {
  display: grid;
  gap: 7px;
}

.hall-rail-title {
  padding: 0 8px 4px;
  color: #708197;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hall-rail-button,
.hall-filter-button,
.hall-view-button,
.hall-icon-button,
.hall-action-button,
.hall-editor-button,
.hall-library-item {
  appearance: none;
  border: 1px solid transparent;
  font: inherit;
  cursor: pointer;
}

.hall-rail-button,
.hall-filter-button {
  display: grid;
  width: 100%;
  min-height: 40px;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #cbd5e1;
  background: transparent;
  text-align: left;
}

.hall-rail-button {
  grid-template-columns: minmax(0, 1fr) auto;
}

.hall-rail-button:hover,
.hall-filter-button:hover,
.hall-rail-button[aria-pressed="true"],
.hall-filter-button[aria-pressed="true"] {
  border-color: rgba(96, 165, 250, 0.2);
  background: rgba(51, 65, 85, 0.56);
  color: #fff;
}

.hall-rail-button[aria-pressed="true"],
.hall-filter-button[aria-pressed="true"] {
  box-shadow: inset 3px 0 var(--hall-blue);
}

.hall-rail-count {
  color: #a5b4c7;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.hall-main {
  min-width: 0;
  padding: 18px 16px 14px;
}

.hall-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hall-title-wrap {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.hall-title {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.035em;
}

.hall-select,
.hall-search-input,
.hall-editor-field,
.hall-editor-select {
  min-height: 42px;
  border: 1px solid var(--hall-border-strong);
  border-radius: 11px;
  outline: none;
  background: rgba(8, 18, 30, 0.92);
  color: var(--hall-text);
}

.hall-select,
.hall-editor-select {
  padding: 0 34px 0 12px;
}

.hall-search {
  position: relative;
  min-width: min(260px, 35vw);
}

.hall-search::before {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  content: "⌕";
  color: var(--hall-muted);
  transform: translateY(-50%);
}

.hall-search-input {
  width: 100%;
  padding: 0 12px 0 36px;
}

.hall-controls,
.hall-segmented,
.hall-toolbar-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hall-segmented {
  padding: 3px;
  border: 1px solid var(--hall-border);
  border-radius: 11px;
  background: rgba(5, 13, 22, 0.78);
}

.hall-view-button,
.hall-icon-button,
.hall-editor-button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  color: #cbd5e1;
  background: transparent;
}

.hall-icon-button {
  min-width: 40px;
  padding: 0;
  font-size: 18px;
}

.hall-view-button:hover,
.hall-icon-button:hover,
.hall-editor-button:hover,
.hall-view-button[aria-pressed="true"],
.hall-icon-button[aria-pressed="true"],
.hall-editor-button[aria-pressed="true"] {
  background: rgba(51, 65, 85, 0.86);
  color: #fff;
}

.hall-scene-shell {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  border: 1px solid var(--hall-border);
  border-radius: var(--hall-radius);
  background:
    radial-gradient(circle at 50% 40%, rgba(77, 55, 38, 0.38), transparent 28rem),
    linear-gradient(150deg, #14202d 0%, #07101a 68%);
  box-shadow: var(--hall-shadow);
  touch-action: none;
}

.hall-scene {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 600px;
  outline: none;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.hall-scene:active { cursor: grabbing; }
.hall-scene > svg { display: block; width: 100%; height: 100%; will-change: transform; }
.hall-svg-object { cursor: pointer; filter: drop-shadow(0 9px 9px rgba(0, 0, 0, .28)); }
.hall-svg-object:focus-visible { outline: none; filter: drop-shadow(0 0 7px var(--hall-blue-bright)); }
.hall-svg-table-name { fill: #f8fafc; font-size: 14px; font-weight: 800; pointer-events: none; }
.hall-svg-table-status { font-size: 9px; font-weight: 700; letter-spacing: .02em; pointer-events: none; }
.hall-svg-decor-label { fill: #d5dfeb; font-size: 11px; font-weight: 700; text-transform: capitalize; pointer-events: none; }
.hall-water { animation: hall-water-pulse 2.4s ease-in-out infinite; }
@keyframes hall-water-pulse { 50% { opacity: .52; } }

.hall-layout-notice {
  position: absolute;
  z-index: 4;
  inset: 12px auto auto 50%;
  transform: translateX(-50%);
  padding: 8px 13px;
  border: 1px solid rgba(245, 158, 11, .38);
  border-radius: 999px;
  background: rgba(69, 42, 8, .92);
  color: #fde68a;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(0,0,0,.28);
}

.hall-object.is-selected,
.hall-editor-object.is-selected { filter: drop-shadow(0 0 8px var(--hall-blue-bright)); }
.hall-empty { color: var(--hall-muted); text-align: center; padding: 30px 18px; }
.hall-empty strong,.hall-empty span { display:block; }
.hall-empty strong { color: var(--hall-text); margin-bottom: 7px; }
.hall-field { display:grid; gap:7px; margin-bottom:16px; color:var(--hall-muted); font-size:12px; font-weight:700; }
.hall-field input,.hall-field select,.hall-inspector-grid input {
  min-height:44px; width:100%; border:1px solid var(--hall-border); border-radius:10px;
  background:#0a1520; color:var(--hall-text); padding:9px 11px;
}
.hall-inspector-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:16px; }
.hall-inspector-grid label { display:grid; gap:5px; color:var(--hall-muted); font-size:10px; font-weight:800; }
.hall-danger-button { min-height:44px; width:100%; border:1px solid rgba(255,93,108,.35); border-radius:10px; background:rgba(255,93,108,.1); color:#ff9aa4; font-weight:800; }

.hall-scene:focus-visible,
.hall-select:focus-visible,
.hall-search-input:focus-visible,
.hall-view-button:focus-visible,
.hall-icon-button:focus-visible,
.hall-action-button:focus-visible,
.hall-rail-button:focus-visible,
.hall-filter-button:focus-visible,
.hall-editor-button:focus-visible,
.hall-library-item:focus-visible,
.hall-editor-field:focus-visible,
.hall-editor-select:focus-visible {
  outline: 2px solid var(--hall-blue-bright);
  outline-offset: 2px;
}

.hall-camera-controls {
  position: absolute;
  z-index: 8;
  bottom: 18px;
  left: 18px;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--hall-border-strong);
  border-radius: 10px;
  background: rgba(5, 13, 22, 0.9);
}

.hall-camera-controls .hall-icon-button {
  border-bottom: 1px solid var(--hall-border);
  border-radius: 0;
}

.hall-camera-controls .hall-icon-button:last-child {
  border-bottom: 0;
}

.hall-legend {
  display: flex;
  margin-top: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 10px 14px;
  border: 1px solid var(--hall-border);
  border-radius: 12px;
  background: rgba(11, 24, 38, 0.78);
  color: #b8c4d4;
  font-size: 11px;
}

.hall-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hall-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--dot, var(--hall-muted));
  box-shadow: 0 0 12px color-mix(in srgb, var(--dot, var(--hall-muted)) 45%, transparent);
}

.hall-offline-banner {
  position: absolute;
  z-index: 12;
  top: 12px;
  left: 50%;
  max-width: calc(100% - 32px);
  padding: 9px 14px;
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 10px;
  background: rgba(69, 39, 8, 0.92);
  color: #fde68a;
  font-size: 12px;
  transform: translateX(-50%);
}

.hall-offline-banner[hidden] {
  display: none;
}

.hall-poll-state {
  position: absolute;
  z-index: 8;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--hall-border);
  border-radius: 999px;
  background: rgba(5, 13, 22, 0.82);
  color: var(--hall-muted);
  font-size: 10px;
}

.hall-poll-state::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hall-green);
  content: "";
}

.hall-poll-state[data-state="stale"]::before,
.hall-poll-state[data-state="offline"]::before {
  background: var(--hall-amber);
}

.hall-detail-panel {
  display: flex;
  flex-direction: column;
  padding: 22px 18px;
  border-left: 1px solid var(--hall-border);
}

.hall-detail-panel[hidden] {
  display: none;
}

#hall-app[data-view="map"] #hall-table-list {
  display: none;
}

#hall-app[data-view="list"] .hall-scene-shell {
  display: none;
}

#hall-app[data-projection="flat"] .hall-table-side,
#hall-app[data-projection="flat"] .hall-table-shadow {
  display: none;
}

#hall-app[data-projection="flat"] .hall-svg-object {
  filter: none;
}

#hall-app[data-quality="low"] .hall-object:not(.hall-object--table) {
  opacity: .5;
  filter: none;
}

#hall-app[data-quality="low"] .hall-water {
  animation: none;
}

.hall-detail-empty {
  display: grid;
  min-height: 300px;
  place-items: center;
  color: var(--hall-muted);
  text-align: center;
}

.hall-detail-empty strong {
  display: block;
  margin-bottom: 5px;
  color: #dbe5f2;
}

.hall-detail-content {
  display: grid;
  gap: 17px;
}

.hall-detail-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.hall-detail-title {
  margin: 0;
  font-size: 22px;
}

.hall-status-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  width: max-content;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--status-color, var(--hall-muted)) 55%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--status-color, var(--hall-muted)) 14%, transparent);
  color: var(--status-color, var(--hall-text));
  font-size: 12px;
  font-weight: 650;
}

.hall-detail-facts {
  display: grid;
  gap: 11px;
  padding: 16px 0;
  border-top: 1px solid var(--hall-border);
  border-bottom: 1px solid var(--hall-border);
}

.hall-detail-fact {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: #d8e1ec;
  font-size: 13px;
}

.hall-detail-fact-icon {
  color: var(--hall-muted);
  text-align: center;
}

.hall-order-total span {
  display: block;
  margin-bottom: 4px;
  color: var(--hall-muted);
  font-size: 11px;
}

.hall-order-total strong {
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}

.hall-detail-actions {
  display: grid;
  gap: 8px;
}

.hall-action-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 13px;
  border-color: var(--hall-border-strong);
  border-radius: 11px;
  background: rgba(30, 41, 59, 0.8);
  color: #e5edf7;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}

.hall-action-button:hover {
  background: #293a50;
}

.hall-action-button--primary {
  border-color: rgba(96, 165, 250, 0.48);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
}

.hall-action-button--danger {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(127, 29, 29, 0.34);
  color: #fecaca;
}

.hall-action-button[disabled],
.hall-action-button[aria-disabled="true"] {
  opacity: 0.44;
  cursor: not-allowed;
}

.hall-list-panel {
  display: none;
  min-width: 0;
}

.hall-table-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hall-list-card {
  display: grid;
  width: 100%;
  min-height: 68px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border: 1px solid var(--hall-border);
  border-radius: 13px;
  background: rgba(14, 28, 44, 0.85);
  color: var(--hall-text);
  text-align: left;
}

.hall-list-card:hover,
.hall-list-card[aria-current="true"] {
  border-color: rgba(96, 165, 250, 0.66);
  background: rgba(24, 54, 88, 0.62);
}

.hall-list-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--status-color, #334155);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.18), 0 8px 18px rgba(0, 0, 0, 0.22);
  font-size: 18px;
  font-weight: 800;
}

.hall-list-copy {
  min-width: 0;
}

.hall-list-copy strong,
.hall-list-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hall-list-copy strong {
  margin-bottom: 4px;
  font-size: 14px;
}

.hall-list-copy span {
  color: #a8b6c8;
  font-size: 11px;
}

.hall-list-age {
  color: var(--status-color, var(--hall-muted));
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.hall-mobile-detail {
  display: none;
}

.hall-mobile-tabs {
  display: none;
}

.hall-dialog {
  position: fixed;
  z-index: 70;
  inset: 0;
}

.hall-dialog[hidden] {
  display: none;
}

.hall-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 7, 14, 0.72);
  backdrop-filter: blur(5px);
}

.hall-dialog-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(92vw, 460px);
  max-height: min(86vh, 720px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--hall-border-strong);
  border-radius: 18px;
  background: #0c1b2b;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
  transform: translate(-50%, -50%);
}

/* SVG scene styling. */
.hall-svg-floor {
  fill: url(#hall-floor-pattern);
  stroke: #617085;
  stroke-opacity: 0.42;
  stroke-width: 2;
}

.hall-svg-zone {
  fill: var(--zone-fill, rgba(30, 64, 175, 0.08));
  stroke: var(--zone-stroke, rgba(96, 165, 250, 0.34));
  stroke-dasharray: 9 8;
  stroke-width: 1.5;
}

.hall-svg-zone-label {
  fill: #d7e3f2;
  font-size: 16px;
  font-weight: 750;
  paint-order: stroke;
  stroke: #08111c;
  stroke-width: 5px;
}

.hall-svg-object {
  cursor: pointer;
  outline: none;
}

.hall-svg-object[data-selected="true"] .hall-svg-select-ring {
  opacity: 1;
}

.hall-svg-select-ring {
  fill: none;
  stroke: #7dd3fc;
  stroke-width: 4;
  stroke-dasharray: 10 5;
  opacity: 0;
  filter: drop-shadow(0 0 7px rgba(125, 211, 252, 0.9));
}

.hall-svg-table-badge {
  stroke: color-mix(in srgb, var(--status-color, #64748b) 72%, white 10%);
  stroke-width: 2;
  fill: color-mix(in srgb, var(--status-color, #64748b) 76%, #07111d 24%);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.48));
}

.hall-svg-table-number {
  fill: white;
  font-size: 19px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(3, 7, 18, 0.55);
  stroke-width: 2px;
}

.hall-svg-status-icon {
  fill: white;
  font-size: 12px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
}

.hall-svg-object[data-attention="true"] .hall-svg-table-badge {
  animation: hallAttention 1.8s ease-in-out infinite;
}

@keyframes hallAttention {
  0%, 100% { filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.44)); }
  50% { filter: drop-shadow(0 0 13px var(--status-color, #fbbf24)); }
}

/* Editor. */
.hall-editor-topbar {
  display: grid;
  min-height: 70px;
  grid-template-columns: 220px minmax(180px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--hall-border);
  background: rgba(7, 17, 29, 0.96);
}

.hall-editor-title {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: center;
}

.hall-editor-title h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.hall-editor-state {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 10px;
  background: rgba(120, 68, 5, 0.22);
  color: #fcd34d;
  font-size: 12px;
  font-weight: 700;
}

.hall-editor-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.hall-editor-button {
  border-color: var(--hall-border-strong);
  background: rgba(18, 33, 50, 0.8);
}

.hall-editor-button--primary {
  border-color: rgba(74, 222, 128, 0.44);
  background: #239653;
  color: white;
}

.hall-editor-button--accent {
  border-color: rgba(96, 165, 250, 0.45);
  background: #1d4ed8;
  color: white;
}

.hall-editor-workspace {
  display: grid;
  height: calc(100vh - 70px);
  grid-template-columns: 286px minmax(0, 1fr) 292px;
}

.hall-editor-library {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  border-right: 1px solid var(--hall-border);
}

.hall-editor-categories {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px 8px;
  border-right: 1px solid var(--hall-border);
}

.hall-editor-category {
  display: grid;
  min-height: 62px;
  place-items: center;
  gap: 4px;
  padding: 7px 3px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--hall-muted);
  font-size: 9px;
  cursor: pointer;
}

.hall-editor-category strong {
  font-size: 18px;
}

.hall-editor-category[aria-pressed="true"] {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
}

.hall-editor-library-list {
  display: grid;
  min-height: 0;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding: 12px 10px;
}

.hall-editor-library-list h2 {
  margin: 0 0 10px;
  font-size: 13px;
}

.hall-library-items {
  display: grid;
  gap: 8px;
}

.hall-library-item {
  display: grid;
  min-height: 72px;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-color: var(--hall-border);
  border-radius: 10px;
  background: rgba(16, 31, 49, 0.8);
  color: #e2e8f0;
  text-align: left;
}

.hall-library-item:hover {
  border-color: rgba(96, 165, 250, 0.56);
  background: rgba(30, 58, 91, 0.64);
}

.hall-library-preview {
  display: grid;
  width: 58px;
  height: 54px;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(145deg, #304763, #152638);
  color: #cbd5e1;
  font-size: 27px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
}

.hall-editor-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #07111d;
  touch-action: none;
}

.hall-editor-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hall-editor-stage-toolbar {
  position: absolute;
  z-index: 10;
  right: 18px;
  bottom: 16px;
  left: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.hall-editor-stage-toolbar > * {
  pointer-events: auto;
}

.hall-editor-inspector {
  min-height: 0;
  overflow: auto;
  padding: 18px 16px;
  border-left: 1px solid var(--hall-border);
}

.hall-inspector-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 20px;
}

.hall-inspector-head h2 {
  margin: 0;
  font-size: 17px;
}

.hall-inspector-head span {
  display: block;
  margin-top: 4px;
  color: var(--hall-muted);
  font-size: 10px;
}

.hall-inspector-section {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.hall-inspector-section h3 {
  margin: 0;
  color: #d7e2ef;
  font-size: 12px;
}

.hall-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hall-field-label {
  display: grid;
  gap: 5px;
  color: var(--hall-muted);
  font-size: 10px;
}

.hall-editor-field {
  min-width: 0;
  width: 100%;
  padding: 0 9px;
}

.hall-toggle-row {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #dce5ef;
  font-size: 12px;
}

.hall-switch {
  position: relative;
  width: 38px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: #334155;
  cursor: pointer;
}

.hall-switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  content: "";
  transition: transform 160ms ease;
}

.hall-switch[aria-pressed="true"] {
  background: #22c55e;
}

.hall-switch[aria-pressed="true"]::after {
  transform: translateX(16px);
}

.hall-editor-empty {
  display: grid;
  min-height: 300px;
  place-items: center;
  color: var(--hall-muted);
  text-align: center;
}

.hall-editor-status {
  min-height: 22px;
  color: var(--hall-muted);
  font-size: 11px;
}

.hall-editor-status[data-tone="success"] { color: #86efac; }
.hall-editor-status[data-tone="error"] { color: #fca5a5; }
.hall-editor-status[data-tone="warning"] { color: #fcd34d; }

.hall-svg-handle {
  fill: #eff6ff;
  stroke: #2563eb;
  stroke-width: 2;
  cursor: nwse-resize;
}

.hall-svg-rotate-handle {
  fill: #2563eb;
  stroke: white;
  stroke-width: 2;
  cursor: grab;
}

@media (max-width: 1280px) {
  .hall-summary-strip {
    grid-template-columns: repeat(3, minmax(110px, 1fr));
  }

  .hall-clock {
    display: none;
  }

  .hall-workspace {
    grid-template-columns: 186px minmax(0, 1fr);
  }

  .hall-detail-panel {
    display: none;
  }

  .hall-detail-panel:not([hidden]) {
    position: fixed;
    z-index: 60;
    top: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    width: min(360px, calc(100vw - 24px));
    overflow-y: auto;
    border: 1px solid var(--hall-border-strong);
    border-radius: 18px;
    box-shadow: var(--hall-shadow);
  }

  .hall-mobile-detail {
    display: grid;
    margin-top: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 13px 15px;
    border: 1px solid var(--hall-border);
    border-radius: 14px;
    background: rgba(12, 28, 45, 0.9);
  }

  .hall-editor-workspace {
    grid-template-columns: 244px minmax(0, 1fr) 258px;
  }
}

@media (max-width: 920px) {
  .hall-topbar {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .hall-brand {
    min-width: 0;
  }

  .hall-summary-strip {
    grid-column: 1 / -1;
    grid-template-columns: repeat(6, minmax(104px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hall-workspace {
    display: block;
  }

  .hall-rail {
    display: none;
  }

  .hall-main {
    padding: 15px 14px;
  }

  .hall-scene-shell,
  .hall-scene {
    min-height: 500px;
  }

  .hall-editor-topbar {
    grid-template-columns: 1fr auto;
  }

  .hall-toolbar-group {
    display: flex;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .hall-editor-actions {
    grid-column: 1 / -1;
  }

  .hall-editor-workspace {
    height: auto;
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .hall-editor-stage {
    min-height: 680px;
  }

  .hall-editor-inspector {
    grid-column: 1 / -1;
    border-top: 1px solid var(--hall-border);
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .hall-topbar {
    min-height: 64px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .hall-brand-copy span,
  .hall-summary-strip {
    display: none;
  }

  .hall-title-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .hall-title {
    font-size: 19px;
  }

  .hall-floor-control {
    max-width: 150px;
  }

  .hall-main-head {
    align-items: stretch;
    flex-direction: column;
  }

  .hall-controls {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .hall-search {
    min-width: 100%;
  }

  .hall-mobile-tabs {
    display: grid;
    margin-bottom: 11px;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--hall-border);
    border-radius: 12px;
    background: rgba(7, 17, 29, 0.9);
  }

  .hall-mobile-tabs .hall-view-button {
    min-height: 44px;
  }

  .hall-mobile-tabs .hall-view-button[aria-pressed="true"] {
    background: #1d4ed8;
  }

  .hall-desktop-mode {
    display: none;
  }

  .hall-scene-shell,
  .hall-scene {
    min-height: 280px;
    height: 280px;
  }

  .hall-main[data-mode="list"] .hall-map-panel {
    display: none;
  }

  .hall-main[data-mode="list"] .hall-list-panel {
    display: block;
  }

  .hall-main[data-mode="map"] .hall-list-panel {
    display: none;
  }

  .hall-mobile-detail {
    position: sticky;
    z-index: 16;
    right: 0;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 0;
    grid-template-columns: 1fr;
    box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.34);
  }

  .hall-mobile-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
  }

  .hall-mobile-actions .hall-action-button {
    min-width: 0;
    padding: 8px 6px;
    font-size: 10px;
  }

  .hall-legend {
    justify-content: start;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .hall-dialog-card {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    max-height: 78vh;
    border-radius: 22px 22px 0 0;
    transform: none;
  }

  .hall-editor-topbar {
    display: flex;
    align-items: stretch;
    flex-direction: column;
  }

  .hall-editor-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .hall-editor-workspace {
    display: block;
  }

  .hall-editor-library {
    display: block;
    border-right: 0;
  }

  .hall-editor-categories {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--hall-border);
  }

  .hall-editor-category {
    min-width: 72px;
  }

  .hall-editor-library-list {
    max-height: 230px;
  }

  .hall-library-items {
    display: flex;
    overflow-x: auto;
  }

  .hall-library-item {
    min-width: 180px;
  }

  .hall-editor-stage {
    min-height: 540px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hall-svg-object[data-attention="true"] .hall-svg-table-badge {
    animation: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .hall-svg-table-badge,
  .hall-list-number,
  .hall-status-pill {
    forced-color-adjust: none;
  }
}

/* Hall v15 operational command surface. */
.hall-group-link {
  fill: none;
  stroke: rgba(109, 168, 255, 0.82);
  stroke-width: 13px;
  stroke-dasharray: 3 20;
  filter: drop-shadow(0 0 7px rgba(96, 165, 250, 0.58));
  pointer-events: none;
}

.hall-shell .hall-svg-object:not(.hall-object--table) { pointer-events: none; }

.hall-zone-filter-list,
.hall-detail-workflows,
.hall-queue-list,
.hall-history-list {
  display: grid;
  gap: 8px;
}

.hall-zone-button {
  display: grid;
  width: 100%;
  min-height: 36px;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #b8c6d8;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.hall-zone-button:hover,
.hall-zone-button[aria-pressed="true"] {
  border-color: rgba(96, 165, 250, .25);
  background: rgba(51, 65, 85, .52);
  color: #fff;
}

.hall-zone-button > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--zone-color, #64748b);
  box-shadow: 0 0 10px color-mix(in srgb, var(--zone-color, #64748b) 65%, transparent);
}

.hall-zone-button b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.hall-zone-button small { color: #71829a; font-variant-numeric: tabular-nums; }

.hall-detail-panel {
  overflow-y: auto;
  scrollbar-width: thin;
}

.hall-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.hall-detail-head > span { grid-column: 1 / -1; color: #73849a; font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hall-detail-facts { gap: 7px; padding: 12px 0; }
.hall-detail-fact { grid-template-columns: minmax(80px, .78fr) minmax(0, 1fr); gap: 8px; font-size: 11px; }
.hall-detail-fact dt { color: #71829a; }
.hall-detail-fact dd { margin: 0; overflow-wrap: anywhere; color: #edf4fc; font-weight: 650; text-align: right; }
.hall-detail-actions { margin-top: 12px; }

.hall-workflow {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(72, 91, 113, .54);
  border-radius: 12px;
  background: rgba(9, 23, 38, .76);
}

.hall-workflow h3 { margin: 0; color: #e7eef8; font-size: 12px; }
.hall-workflow p { margin: 0; color: #8fa0b5; font-size: 11px; line-height: 1.45; }
.hall-workflow--notice { border-color: rgba(96, 165, 250, .28); background: rgba(30, 64, 175, .1); }

.hall-action-form {
  display: grid;
  gap: 8px;
}

.hall-action-form label {
  display: grid;
  gap: 5px;
  color: #8596aa;
  font-size: 10px;
  font-weight: 700;
}

.hall-action-form input,
.hall-action-form select,
.hall-action-form textarea {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #2a4056;
  border-radius: 9px;
  outline: none;
  background: #081521;
  color: #eef5fd;
  font: inherit;
}

.hall-action-form textarea { min-height: 62px; resize: vertical; }
.hall-action-form input:focus-visible,
.hall-action-form select:focus-visible,
.hall-action-form textarea:focus-visible { border-color: #60a5fa; box-shadow: 0 0 0 2px rgba(96, 165, 250, .16); }
.hall-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.hall-workflow .hall-action-button { min-height: 40px; }

.hall-command-drawer {
  position: fixed;
  z-index: 90;
  top: 76px;
  right: 14px;
  bottom: 14px;
  width: min(680px, calc(100vw - 28px));
  overflow: auto;
  border: 1px solid #30475e;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(12, 29, 47, .985), rgba(5, 14, 24, .99));
  box-shadow: 0 34px 100px rgba(0, 0, 0, .68);
}

.hall-command-drawer[hidden] { display: none; }
.hall-command-drawer > header { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid #243a50; background: rgba(9, 23, 38, .96); backdrop-filter: blur(12px); }
.hall-command-drawer h2 { margin: 3px 0 0; font-size: 21px; }
.hall-command-drawer header span { color: #7790aa; font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hall-command-content { padding: 18px 20px 24px; }

.hall-queue-card,
.hall-history-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #253b51;
  border-radius: 12px;
  background: rgba(13, 29, 46, .72);
}

.hall-queue-card { grid-template-columns: minmax(0, 1fr) auto; }
.hall-queue-card strong,.hall-queue-card span { display: block; }
.hall-queue-card span { margin-top: 4px; color: #8fa2b7; font-size: 11px; }
.hall-queue-actions { display: flex; gap: 7px; }
.hall-queue-actions .hall-action-button { min-height: 38px; padding-inline: 11px; }
.hall-history-row { grid-template-columns: 95px minmax(0, 1fr) minmax(80px, .8fr); }
.hall-history-row time,.hall-history-row span { color: #8194aa; font-size: 10px; }
.hall-history-row strong,.hall-history-row span { display: block; }
.hall-history-row code { overflow: hidden; color: #75a7dd; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.hall-zone-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 9px; margin-bottom: 14px; }
.hall-turnover-card { display: grid; gap: 5px; padding: 13px; border: 1px solid #294158; border-radius: 12px; background: rgba(17, 39, 61, .74); }
.hall-turnover-card span,.hall-turnover-card small { color: #89a0b8; font-size: 10px; }
.hall-turnover-card strong { font-size: 18px; }
.hall-table-scroll { overflow-x: auto; }
.hall-metrics-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.hall-metrics-table th,.hall-metrics-table td { padding: 10px 9px; border-bottom: 1px solid #253a4f; text-align: left; white-space: nowrap; }
.hall-metrics-table th { color: #8296ab; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.hall-status-dot { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--status) 20%, #0b1724); color: var(--status); font-weight: 850; }
.hall-list-card > span:nth-child(2) { min-width: 0; }
.hall-list-card > span:nth-child(2) strong,.hall-list-card > span:nth-child(2) small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hall-list-card > span:nth-child(2) small { margin-top: 4px; color: #8497ad; font-size: 10px; }
.hall-list-card > b { color: #c7d5e5; font-size: 10px; white-space: nowrap; }

.hall-editor-type,
.hall-editor-visibility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--hall-border);
  border-radius: 10px;
  background: rgba(8, 21, 33, .82);
  color: #8497ad;
  font-size: 11px;
}

.hall-editor-type strong { color: #dce8f5; font-size: 11px; text-transform: capitalize; }
.hall-editor-visibility { justify-content: flex-start; cursor: pointer; }
.hall-editor-visibility input { width: 18px; height: 18px; accent-color: #3b82f6; }
.hall-editor-object[data-editor-hidden="true"] { opacity: .28; filter: grayscale(1) drop-shadow(0 0 4px #60a5fa); }

@media (min-width: 921px) {
  .hall-mobile-command { display: none; }
}

@media (max-width: 920px) {
  .hall-mobile-command { display: inline-flex; }
  .hall-map-toolbar { align-items: stretch; }
  .hall-map-toolbar .hall-search { flex-basis: 100%; }
  .hall-command-drawer { top: 12px; }
}

@media (max-width: 640px) {
  .hall-map-panel { padding: 10px; }
  .hall-toolbar-group { gap: 4px; }
  .hall-toolbar-group .hall-select,
  .hall-toolbar-group [data-hall-zoom] { display: none; }
  .hall-view-button { min-height: 42px; padding-inline: 9px; font-size: 11px; }
  .hall-command-drawer { inset: auto 0 0; width: 100%; max-height: 88vh; border-width: 1px 0 0; border-radius: 22px 22px 0 0; }
  .hall-command-content { padding: 14px 13px calc(20px + env(safe-area-inset-bottom)); }
  .hall-queue-card,.hall-history-row { grid-template-columns: 1fr; }
  .hall-queue-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hall-form-grid { grid-template-columns: 1fr; }
  .hall-list-card { grid-template-columns: 38px minmax(0, 1fr); }
  .hall-list-card > b { grid-column: 2; }
}

/* Wave 1 waiter shell: the selected table stays beside the hall on landscape tablets. */
@media (min-width: 921px) and (max-width: 1280px) {
  .hall-topbar { flex-wrap: wrap; }
  .hall-wave1-navigation { flex: 1 0 100%; }
  .hall-wave1-navigation [data-operational-ux-staff-nav] { justify-content: flex-start; }
  .hall-workspace { grid-template-columns: minmax(154px, 18vw) minmax(280px, 1fr) minmax(270px, 29vw); }
  .hall-detail-panel:not([hidden]) {
    position: sticky;
    top: 8px;
    right: auto;
    bottom: auto;
    width: auto;
    max-height: calc(100vh - 92px);
    border-radius: 14px;
    box-shadow: none;
  }
}

/* Hall runs without Tailwind, so give the shared waiter navigation local styles. */
body[data-device-surface="waiter"] #hall-app { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
.hall-wave1-navigation [data-operational-ux-staff-nav] { display: flex; flex-wrap: wrap; gap: 6px; }
.hall-wave1-navigation [data-operational-ux-nav-key] { min-height: 42px; padding: 0 10px; border: 1px solid var(--hall-border); border-radius: 11px; background: rgba(10, 22, 36, .9); color: #dce5ef; text-decoration: none; font-size: 11px; font-weight: 700; }
.hall-wave1-navigation [data-operational-ux-nav-key][aria-current="page"] { border-color: rgba(251,191,36,.48); background: rgba(251,191,36,.12); color: #ffe29a; }
[data-operational-ux-mobile-nav] { position: fixed; z-index: 80; inset-inline: 0; bottom: 0; display: flex; gap: 4px; padding: 7px max(8px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); border-top: 1px solid rgba(148,163,184,.22); background: rgba(4,10,18,.97); box-shadow: 0 -12px 28px rgba(0,0,0,.48); color: #dce5ef; backdrop-filter: blur(14px); }
[data-operational-ux-mobile-nav] > a,
[data-operational-ux-mobile-nav] > details { position: relative; display: flex; min-width: 0; min-height: 48px; flex: 1; align-items: center; justify-content: center; flex-direction: column; gap: 3px; padding: 2px 3px; border: 1px solid transparent; border-radius: 11px; color: #aab9c9; text-decoration: none; font-size: 10px; font-weight: 700; }
[data-operational-ux-mobile-nav] > a[aria-current="page"] { border-color: rgba(251,191,36,.28); background: rgba(251,191,36,.13); color: #ffe29a; }
[data-operational-ux-mobile-nav] > a:focus-visible,
[data-operational-ux-mobile-nav] summary:focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }
[data-operational-ux-mobile-nav] summary { display: flex; min-height: 44px; list-style: none; align-items: center; justify-content: center; flex-direction: column; gap: 3px; cursor: pointer; }
[data-operational-ux-mobile-nav] summary::-webkit-details-marker { display: none; }
[data-operational-ux-mobile-nav] [data-operational-ux-more] > div { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 90; width: min(300px, calc(100vw - 20px)); max-height: 60vh; overflow: auto; padding: 9px; border: 1px solid var(--hall-border-strong); border-radius: 16px; background: #07111d; box-shadow: var(--hall-shadow); }
[data-operational-ux-mobile-nav] [data-operational-ux-more] input,
[data-operational-ux-mobile-nav] [data-operational-ux-overflow-item] { display: flex; width: 100%; min-height: 44px; align-items: center; padding: 8px 11px; border: 1px solid var(--hall-border); border-radius: 10px; background: #0d1b2b; color: #e2e8f0; font: inherit; text-decoration: none; }
.operational-ux-badge { display: inline-flex; min-width: 16px; min-height: 16px; align-items: center; justify-content: center; padding: 0 4px; border-radius: 999px; background: #16a36a; color: #03140c; font-size: 9px; font-weight: 850; font-variant-numeric: tabular-nums; }
@media (min-width: 768px) {
  body[data-device-surface="waiter"] #hall-app { padding-bottom: 0; }
  body[data-device-surface="waiter"] [data-operational-ux-mobile-nav] { display: none; }
}
@media (min-width: 768px) and (max-width: 920px) {
  .hall-workspace { grid-template-columns: minmax(130px, 17vw) minmax(240px, 1fr) minmax(230px, 31vw); }
  .hall-detail-panel:not([hidden]) { position: sticky; top: 8px; right: auto; bottom: auto; width: auto; max-height: calc(100vh - 92px); border-radius: 14px; box-shadow: none; }
}
@media (max-width: 640px) {
  body[data-device-surface="waiter"] #hall-app { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .hall-wave1-navigation { display: none; }
}

@media (max-width: 767px) {
  body[data-device-surface="waiter"] .hall-detail-panel:not([hidden]) {
    position: fixed;
    z-index: 75;
    top: auto;
    right: max(8px, env(safe-area-inset-right));
    /* Keep the selected-table sheet clear of the rendered 75px mobile nav. */
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    width: auto;
    max-height: min(46vh, 400px);
    overflow-y: auto;
    padding: 14px 13px calc(12px + env(safe-area-inset-bottom));
    border: 1px solid var(--hall-border-strong);
    border-radius: 18px;
    background: rgba(8, 19, 31, .98);
    box-shadow: 0 -18px 50px rgba(0, 0, 0, .5);
  }

  body[data-device-surface="waiter"] .hall-detail-actions {
    position: sticky;
    z-index: 2;
    bottom: -1px;
    padding-top: 8px;
    background: linear-gradient(180deg, rgba(8, 19, 31, .78), rgba(8, 19, 31, .99) 24%);
  }
}

/* Wave 1.1: exact current-check composer stays inside the selected-table pane. */
.hall-wave11-composer { display: grid; gap: 9px; margin: 12px 0; padding: 12px; border: 1px solid rgba(245,191,85,.38); border-radius: 15px; background: #0b1b2a; }
.hall-wave11-composer[hidden],.hall-wave11-config[hidden],.hall-wave11-composer [hidden] { display: none; }
.hall-wave11-heading { display: grid; gap: 3px; }
.hall-wave11-heading span { color: #f5bf55; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hall-wave11-heading strong { color: #f4f7fb; font-size: 15px; }
#hall-wave11-check-selector { width: 100%; min-height: 44px; margin: 6px 0; padding: 8px; border: 1px solid #f5bf55; border-radius: 9px; background: #081522; color: #f4f7fb; font: inherit; }
#hall-wave11-check-selector[hidden] { display: none; }
.hall-wave11-sent { display: grid; gap: 5px; max-height: 125px; overflow: auto; }
.hall-wave11-sent-line { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; background: #142c3d; font-size: 11px; }
.hall-wave11-sent-line small { color: #a3b8c9; }
.hall-wave11-search-label,.hall-wave11-pending { display: grid; gap: 5px; font-size: 11px; font-weight: 700; }
.hall-wave11-search-label input,.hall-wave11-config input,.hall-wave11-config textarea { width: 100%; min-height: 44px; padding: 8px; border: 1px solid #456078; border-radius: 9px; background: #081522; color: #f4f7fb; font: inherit; }
.hall-wave11-categories { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 3px; }
.hall-wave11-category { flex: 0 0 auto; min-height: 40px; padding: 6px 9px; border: 1px solid #456078; border-radius: 9px; background: #152b3b; color: #d8e4ef; font-weight: 700; }
.hall-wave11-category[aria-pressed="true"] { border-color: #f5bf55; background: #f5bf55; color: #10202f; }
.hall-wave11-menu { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; max-height: 240px; overflow: auto; }
.hall-wave11-menu-card { display: grid; gap: 3px; min-width: 0; padding: 8px; border: 1px solid #304a60; border-radius: 10px; background: #102638; font-size: 11px; }
.hall-wave11-menu-card strong,.hall-wave11-menu-card small { overflow-wrap: anywhere; }
.hall-wave11-menu-card small { color: #a2b4c5; }
.hall-wave11-menu-card button,.hall-wave11-pending-row button { min-height: 40px; padding: 5px 8px; border: 1px solid #d8a951; border-radius: 8px; background: #c9943f; color: #15212a; font-weight: 800; }
.hall-wave11-menu-card button:disabled { opacity: .48; }
.hall-wave11-config { display: grid; gap: 7px; padding: 9px; border: 1px solid #567087; border-radius: 10px; background: #101c2b; }
.hall-wave11-modifier-group { display: grid; gap: 5px; border: 0; padding: 0; }
.hall-wave11-modifier-group legend { margin-bottom: 4px; font-weight: 700; }
.hall-wave11-option { display: flex; gap: 7px; align-items: center; min-height: 40px; }
.hall-wave11-option input { width: 18px; min-height: 18px; }
.hall-wave11-pending-row { display: grid; grid-template-columns: minmax(0,1fr) 40px 40px; align-items: center; gap: 4px; padding: 5px; border-radius: 8px; background: #163244; }
.hall-wave11-composer #hall-wave11-send { width: 100%; justify-content: center; min-height: 48px; }
.hall-wave11-composer #hall-wave11-send:disabled { opacity: .5; }
.hall-wave11-status { margin: 0; color: #aabed0; font-size: 11px; line-height: 1.4; }
.hall-wave11-status[data-state="error"] { color: #ff9da7; }
.hall-wave11-status[data-state="success"] { color: #78e6a9; }
.hall-wave11-status[data-state="warning"] { color: #ffd185; }
.hall-wave11-composer[data-recovery="true"] { border-color: #e2a94d; }
@media (min-width: 768px) and (max-width: 1024px) {
  body[data-device-surface="waiter"] .hall-workspace { display: grid; grid-template-columns: minmax(0,1fr) minmax(310px,36vw); gap: 9px; }
  body[data-device-surface="waiter"] .hall-workspace:has(.hall-detail-panel[hidden]) { grid-template-columns: minmax(0,1fr); }
  body[data-device-surface="waiter"] .hall-workspace > .hall-rail { display: none; }
  body[data-device-surface="waiter"] .hall-workspace > .hall-map-panel { grid-column: 1; min-width: 0; }
  body[data-device-surface="waiter"] .hall-workspace > .hall-detail-panel:not([hidden]) { grid-column: 2; grid-row: 1; position: sticky; inset: auto; display: flex; width: auto; min-width: 0; max-height: calc(100vh - 20px); overflow: auto; padding: 10px; box-shadow: none; }
}

.hall-detail-more { margin: 8px 0; border: 1px solid var(--hall-border); border-radius: 11px; background: rgba(10, 25, 39, .65); }
.hall-detail-more > summary { min-height: 44px; display: flex; align-items: center; padding: 8px 12px; color: #d9e7f3; font-size: 12px; font-weight: 750; cursor: pointer; }
.hall-detail-more > .hall-detail-facts { margin: 0 10px 10px; }
.hall-object--bar_stool .hall-svg-decor-label { display: none; }
.hall-floor-hint,.hall-floor-fit { display: none; }
body[data-device-surface="waiter"] #qr-cookie-settings-fab {
  left: auto !important;
  right: max(12px, env(safe-area-inset-right)) !important;
  top: max(10px, env(safe-area-inset-top)) !important;
  bottom: auto !important;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 0;
}
body[data-device-surface="waiter"] #qr-cookie-settings-fab::before { content: "⚙"; font-size: 18px; }
@media (max-width: 767px) {
  body[data-device-surface="waiter"] .hall-floor-hint,
  body[data-device-surface="waiter"] .hall-floor-fit { position: absolute; z-index: 5; display: flex; align-items: center; min-height: 42px; bottom: 9px; border: 1px solid rgba(148, 163, 184, .55); border-radius: 10px; background: rgba(5, 16, 27, .92); color: #e5eff8; font-size: 11px; font-weight: 750; }
  body[data-device-surface="waiter"] .hall-floor-hint { left: 8px; right: 100px; padding: 5px 9px; line-height: 1.2; pointer-events: none; }
  body[data-device-surface="waiter"] .hall-floor-fit { right: 8px; min-width: 86px; justify-content: center; padding: 5px 8px; cursor: pointer; }
  .hall-wave11-menu { grid-template-columns: 1fr; max-height: 160px; }
}

/* Wave 1.2: the floor is the phone's primary operational surface. */
@media (max-width: 767px) {
  body[data-device-surface="waiter"] .hall-scene-shell,
  body[data-device-surface="waiter"] .hall-scene {
    min-height: 440px;
    height: clamp(440px, 58svh, 590px);
  }
  body[data-device-surface="waiter"] [data-operational-ux-mobile-nav] > a,
  body[data-device-surface="waiter"] [data-operational-ux-mobile-nav] > details {
    min-height: 56px;
    font-size: 12px;
  }
  body[data-device-surface="waiter"] .hall-detail-panel:not([hidden]) {
    max-height: min(72dvh, 680px);
    padding: 16px;
    background: #08131f;
  }
  body[data-device-surface="waiter"] .hall-wave11-menu-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 12px;
    padding: 12px;
    font-size: 13px;
  }
  body[data-device-surface="waiter"] .hall-wave11-menu-card button {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-width: 74px;
    min-height: 48px;
  }
  body[data-device-surface="waiter"] .hall-wave11-category,
  body[data-device-surface="waiter"] .hall-wave11-pending-row button { min-height: 48px; }
  body[data-device-surface="waiter"] .hall-wave11-composer #hall-wave11-send { min-height: 56px; font-size: 14px; }
  body[data-device-surface="waiter"] .hall-detail-fact { font-size: 13px; }
  body[data-device-surface="waiter"] .hall-wave11-sent-line { min-height: 38px; align-items: center; font-size: 13px; }
  body[data-device-surface="waiter"] .hall-detail-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body[data-device-surface="waiter"] .hall-detail-actions > :first-child { grid-column: 1 / -1; }
  body[data-device-surface="waiter"] .hall-detail-actions > * { min-height: 48px; justify-content: center; text-align: center; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  body[data-device-surface="waiter"] .hall-wave11-menu-card { padding: 12px; font-size: 13px; }
  body[data-device-surface="waiter"] .hall-wave11-menu-card button,
  body[data-device-surface="waiter"] .hall-wave11-category { min-height: 48px; }
  body[data-device-surface="waiter"] .hall-wave11-composer #hall-wave11-send { min-height: 56px; }
}

/* Wave 1.3: service-first composition. Canonical table coordinates and actions are unchanged. */
.hall-mobile-tools,.hall-zone-picker { display: none; }
.hall-mobile-tools > summary,.hall-zone-picker > summary { list-style: none; cursor: pointer; }
.hall-mobile-tools > summary::-webkit-details-marker,.hall-zone-picker > summary::-webkit-details-marker { display: none; }
body[data-device-surface="waiter"] .hall-service-glance {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(96, 165, 250, .32);
  border-radius: 16px;
  background: #10283c;
}
body[data-device-surface="waiter"] .hall-service-glance-top,
body[data-device-surface="waiter"] .hall-service-glance-check {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
body[data-device-surface="waiter"] .hall-service-glance-check { display: grid; gap: 3px; }
body[data-device-surface="waiter"] .hall-service-glance-top strong { font-size: 16px; }
body[data-device-surface="waiter"] .hall-service-glance-top span,
body[data-device-surface="waiter"] .hall-service-glance-check span { color: #b8cddd; font-size: 13px; }
body[data-device-surface="waiter"] .hall-service-glance-check strong { color: #fff2c8; font-size: 22px; font-variant-numeric: tabular-nums; }
body[data-device-surface="waiter"] .hall-service-glance p { margin: 0; color: #9ee4c1; font-size: 13px; font-weight: 700; }
body[data-device-surface="waiter"] .hall-detail-head > span { color: #b8cddd; font-size: 10px; }
body[data-device-surface="waiter"] .hall-detail-title { font-size: 30px; line-height: 1.08; }
body[data-device-surface="waiter"] .hall-detail-more { margin-top: 0; }
body[data-device-surface="waiter"] .hall-detail-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
body[data-device-surface="waiter"] .hall-detail-actions > :first-child { grid-column: 1 / -1; }

@media (max-width: 767px) {
  body[data-device-surface="waiter"] .hall-topbar { min-height: 58px; padding: 7px 12px; }
  body[data-device-surface="waiter"] .hall-brand { gap: 8px; }
  body[data-device-surface="waiter"] .hall-brand-copy strong { font-size: 15px; }
  body[data-device-surface="waiter"] .hall-map-panel { padding: 8px; }
  body[data-device-surface="waiter"] .hall-map-toolbar {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
  }
  body[data-device-surface="waiter"] .hall-map-toolbar .hall-search { min-width: 0; grid-column: 1; }
  body[data-device-surface="waiter"] .hall-search-input { min-height: 48px; font-size: 14px; }
  body[data-device-surface="waiter"] .hall-toolbar-group { min-width: 0; grid-column: 2; gap: 5px; }
  body[data-device-surface="waiter"] .hall-toolbar-group [role="group"] { display: flex; }
  body[data-device-surface="waiter"] .hall-view-button { min-height: 44px; padding-inline: 8px; font-size: 12px; }
  body[data-device-surface="waiter"] .hall-mobile-tools { position: relative; display: block; }
  body[data-device-surface="waiter"] .hall-mobile-tools > summary { display: flex; min-height: 44px; align-items: center; padding: 0 8px; border: 1px solid var(--hall-border-strong); border-radius: 10px; color: #e4ecf6; font-size: 12px; font-weight: 700; }
  body[data-device-surface="waiter"] .hall-mobile-tools > div { position: absolute; z-index: 25; top: calc(100% + 6px); right: 0; display: grid; gap: 6px; width: 172px; padding: 8px; border: 1px solid var(--hall-border-strong); border-radius: 12px; background: #081725; box-shadow: var(--hall-shadow); }
  body[data-device-surface="waiter"] .hall-mobile-tools:not([open]) > div { display: none; }
  body[data-device-surface="waiter"] #hall-poll-status { position: absolute; z-index: 4; top: calc(100% + 13px); right: 10px; padding: 3px 6px; border-radius: 6px; background: rgba(7,17,29,.88); pointer-events: none; }
  body[data-device-surface="waiter"] .hall-scene-shell,
  body[data-device-surface="waiter"] .hall-scene { min-height: 510px; height: clamp(510px, 62svh, 610px); }
  body[data-device-surface="waiter"] .hall-svg-table-name { font-size: 17px; font-weight: 850; }
  body[data-device-surface="waiter"] .hall-svg-table-status { font-size: 13px; font-weight: 800; }
  body[data-device-surface="waiter"] .hall-zone-picker { position: absolute; z-index: 12; top: 9px; left: 9px; display: block; }
  body[data-device-surface="waiter"] .hall-zone-picker > summary { display: flex; min-height: 44px; align-items: center; padding: 0 13px; border: 1px solid rgba(251,191,36,.55); border-radius: 11px; background: rgba(5,16,27,.94); color: #ffe29a; font-size: 13px; font-weight: 800; }
  body[data-device-surface="waiter"] .hall-zone-picker > div { display: grid; gap: 4px; width: min(235px,calc(100vw - 36px)); max-height: 52vh; overflow-y: auto; margin-top: 6px; padding: 7px; border: 1px solid var(--hall-border-strong); border-radius: 12px; background: #081725; box-shadow: var(--hall-shadow); }
  body[data-device-surface="waiter"] .hall-zone-picker:not([open]) > div { display: none; }
  body[data-device-surface="waiter"] .hall-zone-picker .hall-zone-button { min-height: 46px; }
  body[data-device-surface="waiter"] [data-operational-ux-mobile-nav] > a,
  body[data-device-surface="waiter"] [data-operational-ux-mobile-nav] > details { min-height: 60px; font-size: 13px; }
  body[data-device-surface="waiter"] .hall-detail-panel:not([hidden]) { max-height: min(76dvh,720px); }
  body[data-device-surface="waiter"] .hall-wave11-composer { margin-block: 9px; }
  body[data-device-surface="waiter"] .hall-wave11-composer #hall-wave11-send { min-height: 60px; font-size: 15px; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  body[data-device-surface="waiter"] .hall-workspace { grid-template-columns: minmax(0,1.45fr) minmax(330px,1fr); }
  body[data-device-surface="waiter"] .hall-workspace > .hall-detail-panel:not([hidden]) { padding: 16px; }
  body[data-device-surface="waiter"] .hall-scene-shell,
  body[data-device-surface="waiter"] .hall-scene { min-height: 590px; }
  body[data-device-surface="waiter"] .hall-wave11-menu-card button { min-height: 52px; }
}
