* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  background: #f3f4f6;
  color: #111827;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: #ffffff;
  border-bottom: 1px solid #d1d5db;
  position: sticky;
  top: 0;
  z-index: 20;
}
h1 { margin: 0; font-size: 20px; }
h2 { margin: 0 0 12px; font-size: 17px; }
h3 { margin: 14px 0 10px; font-size: 15px; }
.sub { font-size: 12px; color: #6b7280; margin-top: 3px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.datePickerLabel {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}
.datePickerLabel input {
  width: 145px;
  margin-top: 0;
  padding: 7px;
}
button, select {
  border: 1px solid #9ca3af;
  background: #fff;
  border-radius: 8px;
  padding: 8px 11px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  font-family: Verdana, Arial, Helvetica, sans-serif;
}
button:hover { background: #f9fafb; }
button.primary {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}
button.danger {
  color: #991b1b;
  border-color: #ef4444;
}
button.smallBtn {
  padding: 5px 7px;
  font-size: 12px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  height: calc(100vh - 70px);
}
.canvasWrap {
  overflow: auto;
  padding: 8px;
}
.stageShell {
  position: relative;
  min-width: 0;
  min-height: 0;
}
.stage {
  width: 1200px;
  height: 700px;
  position: absolute;
  left: 32px;
  top: 32px;
  overflow: visible;
  background:
    linear-gradient(#e5e7eb 1px, transparent 1px),
    linear-gradient(90deg, #e5e7eb 1px, transparent 1px);
  background-size: 25px 25px;
  border: 2px solid #111827;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.10);
  touch-action: none;
  user-select: none;
}
.item {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #374151;
  background: #ffffff;
  color: #111827;
  font-weight: 700;
  cursor: grab;
  box-shadow: 0 3px 10px rgba(0,0,0,.12);
  transform-origin: center center;
  user-select: none;
  touch-action: none;
  text-align: center;
  padding: 4px;
}
.item:active { cursor: grabbing; }
.item.round { border-radius: 999px; }
.item.square, .item.rect, .item.objectType-wc, .item.objectType-kitchen, .item.objectType-stairs, .item.objectType-label { border-radius: 10px; }
.item.objectType-bar, .item.objectType-partition { border-radius: 4px; }
.item.objectType-room {
  border: 0;
  background: transparent !important;
  box-shadow: none;
  padding: 0;
  z-index: 1;
}
.item.objectBoundaryEditable {
  border: 0;
  background: transparent !important;
  box-shadow: none;
  padding: 0;
  overflow: visible;
}
.objectBoundarySvg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.objectBoundaryContent {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 8px;
  line-height: 1.15;
  pointer-events: none;
}
.object-boundary-point {
  z-index: 55;
}
.item.objectType-partition {
  background: #d1d5db;
  border-color: #6b7280;
  z-index: 4;
}
.item.objectType-window {
  border-style: dashed;
  border-color: #2563eb;
  background: #eff6ff;
  z-index: 4;
}
.item.objectType-door {
  border-style: dashed;
  border-color: #92400e;
  background: #fff7ed;
  z-index: 4;
}
.item.objectType-chair {
  border-radius: 999px;
  z-index: 7;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
  font-size: 10px;
  padding: 0;
}
.item.objectType-bar,
.item.objectType-wc,
.item.objectType-kitchen,
.item.objectType-stairs,
.item.objectType-label {
  z-index: 4;
}
.item.tableItem {
  z-index: 8;
}
.item.selected {
  outline: 4px solid rgba(37, 99, 235, .35);
}
.item-content {
  width: 100%;
  line-height: 1.15;
  word-break: break-word;
  pointer-events: none;
}
.item-content.vertical {
  transform: rotate(-90deg);
  white-space: nowrap;
  width: auto;
}
.roomSvg {
  position: absolute;
  inset: 0;
  overflow: visible;
}
.roomLabel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-weight: 800;
  pointer-events: none;
  background: rgba(255,255,255,.65);
  padding: 3px 8px;
  border-radius: 8px;
  max-width: 90%;
  overflow-wrap: anywhere;
}
.meta {
  display: block;
  font-size: 11px;
  font-weight: 500;
  margin-top: 2px;
  opacity: .85;
}
.resMeta {
  display: block;
  font-size: 10px;
  font-weight: 700;
  margin-top: 2px;
  color: #92400e;
}
.resize-handle, .stage-handle, .room-point {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #2563eb;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, .35);
  z-index: 40;
}
.resize-handle.n { left: 50%; top: -8px; transform: translateX(-50%); cursor: n-resize; }
.resize-handle.s { left: 50%; bottom: -8px; transform: translateX(-50%); cursor: s-resize; }
.resize-handle.e { right: -8px; top: 50%; transform: translateY(-50%); cursor: e-resize; }
.resize-handle.w { left: -8px; top: 50%; transform: translateY(-50%); cursor: w-resize; }
.resize-handle.nw { left: -8px; top: -8px; cursor: nw-resize; }
.resize-handle.ne { right: -8px; top: -8px; cursor: ne-resize; }
.resize-handle.sw { left: -8px; bottom: -8px; cursor: sw-resize; }
.resize-handle.se { right: -8px; bottom: -8px; cursor: se-resize; }
.stage-handle.top { top: -8px; left: 50%; transform: translateX(-50%); cursor: n-resize; }
.stage-handle.bottom { bottom: -8px; left: 50%; transform: translateX(-50%); cursor: s-resize; }
.stage-handle.left { left: -8px; top: 50%; transform: translateY(-50%); cursor: w-resize; }
.stage-handle.right { right: -8px; top: 50%; transform: translateY(-50%); cursor: e-resize; }
.stage-handle.tl { left: -8px; top: -8px; cursor: nw-resize; }
.stage-handle.tr { right: -8px; top: -8px; cursor: ne-resize; }
.stage-handle.bl { left: -8px; bottom: -8px; cursor: sw-resize; }
.stage-handle.br { right: -8px; bottom: -8px; cursor: se-resize; }
.room-point {
  transform: translate(-50%, -50%);
  cursor: move;
  background: #0ea5e9;
}
.floor-point {
  width: 16px;
  height: 16px;
  background: #2563eb;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, .45), 0 3px 9px rgba(15, 23, 42, .22);
  z-index: 45;
}
.floor-point.locked {
  background: #dc2626;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, .50), 0 3px 9px rgba(15, 23, 42, .22);
  cursor: pointer;
}
.floor-point.locked::before,
.floor-point.locked::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
  transform-origin: center;
}
.floor-point.locked::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.floor-point.locked::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.stage-out-label {
  position: absolute;
  background: rgba(255,255,255,.95);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  z-index: 12;
  pointer-events: none;
  color: #111827;
  border: 1px solid #d1d5db;
}
.stage-out-label.top { transform: translate(-50%, -100%); }
.stage-out-label.bottom { transform: translate(-50%, 0); }
.stage-out-label.left { transform: translate(-100%, -50%) rotate(-90deg); transform-origin: center; }
.stage-out-label.right { transform: translate(0, -50%) rotate(90deg); transform-origin: center; }
.panel {
  background: #ffffff;
  border-left: 1px solid #d1d5db;
  padding: 18px;
  overflow-y: auto;
}
label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
}
.checkboxLabel {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkboxLabel input {
  width: auto;
  margin: 0;
}
input, textarea, select {
  width: 100%;
  margin-top: 5px;
  padding: 8px;
  border: 1px solid #9ca3af;
  border-radius: 8px;
  font-size: 14px;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  box-sizing: border-box;
  max-width: 100%;
}
input[type="color"] {
  padding: 2px;
  height: 40px;
}
textarea { resize: vertical; }
.hidden { display: none; }
.hint, .small {
  color: #4b5563;
  font-size: 13px;
  line-height: 1.45;
}
.strong { font-weight: 700; color: #111827; }
.buttonRow {
  display: flex;
  gap: 8px;
}
.buttonRow.hidden {
  display: none !important;
}
.buttonRow button { flex: 1; }
.roomEditBox {
  border: 1px solid #d1d5db;
  background: #f9fafb;
  border-radius: 10px;
  padding: 9px;
  margin-bottom: 12px;
}
.roomEditBox button {
  width: 100%;
  margin-bottom: 7px;
}
.twoCols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.statusColorsGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fullWidth { width: 100%; }
.saveStatus {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  min-height: 20px;
}
#saveStatus,
#mergeDebug {
  display: none !important;
}
.reservationCard, .dailyCard {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 9px;
  margin-bottom: 8px;
  background: #f9fafb;
}
.reservationCard.arrived {
  background: #eff6ff;
  border-color: #93c5fd;
}
.reservationCard .title, .dailyCard .title {
  font-weight: 800;
  margin-bottom: 4px;
}
.reservationCard .line, .dailyCard .line {
  font-size: 12px;
  color: #374151;
  line-height: 1.35;
}
.reservationActions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.emptyList {
  color: #6b7280;
  font-size: 13px;
  font-style: italic;
  margin-bottom: 8px;
}
@media (max-width: 980px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .panel {
    border-left: 0;
    border-top: 1px solid #d1d5db;
  }
  .canvasWrap {
    height: 62vh;
  }
}

/* v0.3.16 fixes */
.stage-out-label.left {
  transform: translate(-100%, -50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
}
.stage-out-label.right {
  transform: translate(0, -50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
}
.chairIcon {
  position: relative;
  width: 18px;
  height: 18px;
}
.chairBack {
  position: absolute;
  left: 3px;
  top: 1px;
  width: 12px;
  height: 5px;
  border: 2px solid #374151;
  border-bottom: 0;
  border-radius: 4px 4px 1px 1px;
  background: rgba(255,255,255,.8);
}
.chairSeat {
  position: absolute;
  left: 3px;
  top: 7px;
  width: 12px;
  height: 8px;
  border: 2px solid #374151;
  border-radius: 3px;
  background: rgba(255,255,255,.95);
}
.chairLegs::before,
.chairLegs::after {
  content: "";
  position: absolute;
  top: 15px;
  width: 2px;
  height: 4px;
  background: #374151;
}
.chairLegs::before { left: 5px; }
.chairLegs::after { right: 5px; }
.selectionBox {
  position: absolute;
  border: 1px dashed #2563eb;
  background: rgba(37, 99, 235, .10);
  z-index: 50;
  pointer-events: none;
}
.item.tableItem[data-grouped="1"] {
  outline: 2px dashed rgba(245, 158, 11, .8);
}

/* v0.3.16 label és szék javítások */
.stage-out-label {
  max-width: 520px;
  white-space: nowrap;
}
.stage-out-label.top {
  transform: translate(-50%, -100%);
  margin-top: -16px;
}
.stage-out-label.bottom {
  transform: translate(-50%, 0);
  margin-top: 16px;
}
.stage-out-label.left {
  transform: translate(-100%, -50%);
  margin-left: -18px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
}
.stage-out-label.right {
  transform: translate(0, -50%);
  margin-left: 18px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
}
.item.objectType-chair {
  border-radius: 6px;
  background: #ffffff;
  border-color: #374151;
  width: 28px;
  height: 24px;
}
.chairIcon {
  position: relative;
  width: 22px;
  height: 19px;
}
.chairBack {
  position: absolute;
  left: 3px;
  top: 0;
  width: 16px;
  height: 5px;
  border: 2px solid #374151;
  border-bottom: 0;
  border-radius: 4px 4px 1px 1px;
  background: #fff;
}
.chairSeat {
  position: absolute;
  left: 2px;
  top: 6px;
  width: 18px;
  height: 9px;
  border: 2px solid #374151;
  border-radius: 3px;
  background: #fff;
}
.chairLegs::before,
.chairLegs::after {
  content: "";
  position: absolute;
  top: 15px;
  width: 2px;
  height: 5px;
  background: #374151;
}
.chairLegs::before { left: 5px; }
.chairLegs::after { right: 5px; }
.roomEditBox {
  border: 2px solid #93c5fd;
  background: #eff6ff;
}
.room-point {
  width: 18px;
  height: 18px;
  background: #0284c7;
}
.room-point.floor-point {
  width: 16px;
  height: 16px;
  background: #2563eb;
}
.room-point.floor-point.locked {
  background: #dc2626;
}
.selectionBox {
  position: absolute;
  border: 1px dashed #2563eb;
  background: rgba(37, 99, 235, .10);
  z-index: 50;
  pointer-events: none;
}
.item.tableItem[data-grouped="1"] {
  outline: 2px dashed rgba(245, 158, 11, .9);
  outline-offset: 3px;
}

/* v0.3.16 */
.floorShapeLayer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.floorShapeSvg {
  position: absolute;
  inset: 0;
  pointer-events: stroke;
}
.floorShapeLayer .room-point {
  pointer-events: auto;
}
.floorShapeLayer .floor-point {
  background: #2563eb;
}
.floorShapeLayer .floor-point.locked {
  background: #dc2626;
}
.stage-out-label.top {
  margin-top: -8px;
}
.stage-out-label.bottom {
  margin-top: 8px;
}
.stage-out-label.left {
  margin-left: -8px;
}
.stage-out-label.right {
  margin-left: 8px;
}
.chairIcon {
  position: relative;
  width: 24px;
  height: 22px;
}
.chairBack {
  position: absolute;
  left: 4px;
  top: 0px;
  width: 16px;
  height: 6px;
  border: 2px solid #1f2937;
  border-bottom: 0;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(#ffffff, #e5e7eb);
}
.chairSeat {
  position: absolute;
  left: 2px;
  top: 7px;
  width: 20px;
  height: 10px;
  border: 2px solid #1f2937;
  border-radius: 4px;
  background: linear-gradient(#ffffff, #f3f4f6);
}
.chairLegs::before,
.chairLegs::after {
  content: "";
  position: absolute;
  top: 17px;
  width: 2px;
  height: 5px;
  background: #1f2937;
}
.chairLegs::before { left: 6px; }
.chairLegs::after { right: 6px; }
.item.objectType-chair {
  border: 0;
  background: transparent !important;
  box-shadow: none;
}
.item.objectType-chair.selected {
  outline: 2px solid rgba(37, 99, 235, .5);
  border-radius: 6px;
}

/* v0.3.16: kisebb margók, gördítősáv nélküli alaphelyzet */
.stageShell {
  min-width: 0 !important;
  min-height: 0 !important;
}
.stage {
  left: 32px !important;
  top: 32px !important;
}
.stage-out-label.top {
  margin-top: -2px !important;
}
.stage-out-label.bottom {
  margin-top: 2px !important;
}
.stage-out-label.left {
  margin-left: -2px !important;
}
.stage-out-label.right {
  margin-left: 2px !important;
}
.chairLegs,
.chairLegs::before,
.chairLegs::after {
  display: none !important;
}
.chairIcon {
  width: 24px;
  height: 18px;
}
.chairBack {
  left: 4px;
  top: 0;
  width: 16px;
  height: 5px;
  border: 2px solid #1f2937;
  border-bottom: 0;
  border-radius: 5px 5px 2px 2px;
}
.chairSeat {
  left: 2px;
  top: 6px;
  width: 20px;
  height: 10px;
  border: 2px solid #1f2937;
  border-radius: 4px;
}

/* v0.3.16: használható alaphelyzet, nincs felesleges nagy munkaterület */
.canvasWrap {
  overflow: hidden !important;
  padding: 6px !important;
}
.stageShell {
  min-width: 0 !important;
  min-height: 0 !important;
  width: auto;
  height: auto;
}
.stage {
  left: 16px !important;
  top: 16px !important;
}
.stage-out-label {
  z-index: 60;
  font-size: 13px;
  max-width: 360px;
  white-space: nowrap;
}
.stage-out-label.top {
  transform: translate(-50%, 0) !important;
  margin: 0 !important;
}
.stage-out-label.bottom {
  transform: translate(-50%, 0) !important;
  margin: 0 !important;
}
.stage-out-label.left {
  transform: translate(0, -50%) !important;
  margin: 0 !important;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.stage-out-label.right {
  transform: translate(0, -50%) !important;
  margin: 0 !important;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.chairLegs,
.chairLegs::before,
.chairLegs::after {
  display: none !important;
}
.mergeDebug {
  margin-top: 10px;
  padding: 8px;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 12px;
  color: #374151;
  line-height: 1.35;
}

/* v0.3.16: automatikus fit zoom, teljes alaprajz látható legyen */
.canvasWrap {
  overflow: hidden !important;
  padding: 4px !important;
}
.stageShell {
  min-width: 0 !important;
  min-height: 0 !important;
}
.stage {
  left: 42px !important;
  top: 42px !important;
}
.stage-out-label {
  z-index: 60;
  font-size: 13px;
  max-width: 360px;
  white-space: nowrap;
}
.stage-out-label.top {
  transform: translate(-50%, -100%) !important;
  margin: 0 !important;
}
.stage-out-label.bottom {
  transform: translate(-50%, 0) !important;
  margin: 0 !important;
}
.stage-out-label.left {
  transform: translate(-100%, -50%) !important;
  margin: 0 !important;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.stage-out-label.right {
  transform: translate(0, -50%) !important;
  margin: 0 !important;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* v0.3.16: oldalfelirat teljesen másképp: belső peremcímkék, nincs extra margó */
.stage-out-label {
  display: none !important;
}
.stage-edge-label {
  position: absolute;
  z-index: 65;
  background: rgba(255, 255, 255, .92);
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
  color: #111827;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stage-edge-label.top {
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
}
.stage-edge-label.bottom {
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
}
.stage-edge-label.left {
  left: 6px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: center;
}
.stage-edge-label.right {
  right: 6px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: center;
}
.item.tableItem[data-grouped="1"] {
  outline: 2px dashed rgba(245, 158, 11, .95);
  outline-offset: 4px;
}

/* v0.3.16: keretes kijelölés javítása */
.floorShapeLayer {
  pointer-events: auto !important;
}
.floorShapeSvg {
  pointer-events: auto !important;
}
.selectionBox {
  position: absolute;
  border: 1px dashed #2563eb;
  background: rgba(37, 99, 235, .12);
  z-index: 100;
  pointer-events: none;
}

/* v0.3.16: láthatatlan külső keret + belső helyszínrajz közötti feliratsáv */
.stageShell {
  position: relative;
  background: transparent;
  overflow: visible;
}
.stage {
  left: 34px !important;
  top: 34px !important;
}
.stage-out-label,
.stage-edge-label {
  display: none !important;
}
.frame-label {
  position: absolute;
  z-index: 80;
  background: rgba(255, 255, 255, .96);
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  color: #111827;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.frame-label.top,
.frame-label.bottom {
  transform: translate(-50%, -50%);
}
.frame-label.left {
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center;
}
.frame-label.right {
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center;
}

/* v0.3.16 Beállítások menü */
.settingsModal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.settingsDialog {
  width: min(720px, 96vw);
  max-height: 90vh;
  overflow: hidden;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
  border: 1px solid #cbd5e1;
}
.settingsHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
}
.settingsHeader h2 {
  margin: 0;
}
.settingsClose {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
}
.settingsBody {
  display: grid;
  grid-template-columns: 190px 1fr;
  min-height: 320px;
}
.settingsTabs {
  border-right: 1px solid #e5e7eb;
  padding: 12px;
  background: #f8fafc;
}
.settingsTab {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .12s ease;
}
.settingsTab.active {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
}
.settingsTab:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 118, 110, .12);
}
.settingsTab:active {
  transform: translateY(0);
  box-shadow: none;
}
.settingsPanel {
  padding: 16px;
}
.settingsFooter {
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  text-align: right;
}
.settingsCheck {
  padding: 9px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
}
@media (max-width: 700px) {
  .settingsBody {
    grid-template-columns: 1fr;
  }
  .settingsTabs {
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }
  .settingsTab {
    width: auto;
    white-space: nowrap;
    margin-bottom: 0;
  }
}


/* v0.3.16 modal elrejtés javítás */
.settingsModal.hidden {
  display: none !important;
}

.settingsPage {
  min-height: 100vh;
  background: #ffffff;
}
.settingsPageMain {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0 28px;
}
.settingsPagePanel {
  width: 100%;
}
.settingsPagePanel .settingsPageContent {
  width: 100%;
  max-height: none !important;
  min-height: calc(100vh - 170px);
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}
.settingsPagePanel .settingsHeader {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 14px;
  border-bottom: 0;
  background: #ffffff;
}
.settingsPagePanel .settingsHeader h2 {
  font-size: 18px;
  line-height: 1.2;
}
.settingsTitleBox,
.settingsSaveTop {
  width: var(--settings-menu-box-width, 156px);
  height: var(--settings-box-height, 36px);
  min-height: var(--settings-box-height, 36px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 800;
}
.settingsTitleBox {
  margin: 0;
  color: #0f766e;
  border: 1px solid #99f6e4;
  background: #ecfdf5;
}
.settingsSaveTop {
  width: var(--settings-action-box-width, 190px);
  white-space: nowrap;
  background: #c98a16 !important;
  border-color: #b7791f !important;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(201, 138, 22, .24);
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .12s ease;
  will-change: transform;
}
.settingsSaveTop:hover,
.settingsSaveTop.isHovering {
  background: #b7791f !important;
  border-color: #9a6617 !important;
  transform: translateY(-4px) scale(1.012) !important;
  box-shadow: 0 12px 24px rgba(201, 138, 22, .32);
}
.settingsSaveTop:active {
  transform: translateY(0) scale(.99) !important;
  box-shadow: 0 5px 12px rgba(201, 138, 22, .20);
}
.settingsSaveTop:focus-visible {
  outline: 3px solid rgba(245, 158, 11, .28);
  outline-offset: 2px;
}
.settingsPagePanel .settingsBody {
  grid-template-columns: calc(var(--settings-menu-box-width, 156px) + 24px) minmax(0, 1fr);
  min-height: 560px;
  overflow-y: visible !important;
  border-top: 1px solid #e5e7eb;
  position: relative;
}
.settingsPagePanel .settingsTabs {
  background: #ffffff;
  padding: 16px 24px 16px 0;
}
.settingsPagePanel .settingsTabs .settingsTab {
  width: var(--settings-menu-box-width, 156px);
}
.settingsPagePanel .settingsPanel {
  grid-column: 2;
  grid-row: 1;
  padding: 16px 0 24px 24px;
  padding-right: 0;
}
.settingsPagePanel .settingsPanel > h3:first-child {
  display: inline-flex;
  width: var(--settings-action-box-width, 190px);
  height: var(--settings-box-height, 36px);
  min-height: var(--settings-box-height, 36px);
  align-items: center;
  justify-content: center;
  margin: 0 0 12px;
  padding: 6px 12px;
  border: 1px solid #0f766e;
  border-radius: 7px;
  background: #0f766e;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.settingsPagePanel .settingsFooter {
  padding: 16px 0 0;
  border-top: 1px solid #e5e7eb;
  background: transparent;
}
.settingsPageStatus {
  display: none !important;
}
@media (max-width: 700px) {
  .settingsPageMain {
    width: 100%;
    padding: 12px 10px 24px;
  }
  .settingsPagePanel .settingsPageContent {
    min-height: calc(100vh - 120px);
  }
  .settingsPagePanel .settingsBody {
    grid-template-columns: 1fr;
    border-top: 1px solid #e5e7eb;
  }
  .settingsPagePanel .settingsTabs {
    display: none !important;
  }
  .settingsPagePanel .settingsTabs .settingsTab {
    width: auto;
  }
  .settingsPagePanel .settingsPanel {
    grid-column: 1;
    grid-row: 1;
    padding: 14px 0 24px;
    padding-right: 0;
  }
  .settingsTitleBox,
  .settingsSaveTop {
    width: var(--settings-menu-box-width, 156px);
    height: var(--settings-box-height, 36px);
    min-height: var(--settings-box-height, 36px);
    font-size: 14px;
  }
  .settingsSaveTop {
    width: auto;
    flex-shrink: 0;
  }
}

/* v0.3.16 settings color grids */
.settingsColorGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
  margin-bottom: 0;
}
.settingsColorGrid label {
  margin-bottom: 0;
}
.settingsColorGrid input[type="color"] {
  width: 100%;
  height: 34px;
}
@media (max-width: 700px) {
  .settingsColorGrid {
    grid-template-columns: 1fr;
  }
}

/* v0.3.16 Beállítások ablak görgetés javítás */
.settingsDialog {
  display: flex !important;
  flex-direction: column !important;
  max-height: 90vh !important;
}
.settingsHeader,
.settingsFooter {
  flex: 0 0 auto !important;
}
.settingsBody {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}
.settingsPanel {
  padding-bottom: 24px;
}


/* v0.3.48 vizuális fejlesztések */
html,
body {
  overscroll-behavior-y: none;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

:root {
  --settings-menu-box-width: 156px;
  --settings-action-box-width: 190px;
  --settings-box-height: 36px;
  --stage-bg: #ffffff;
  --grid-minor: #e6e9ef;
  --grid-major: #d3dae6;
  --panel-bg: #ffffff;
  --panel-border: #d1d5db;
  --toolbar-bg: rgba(255,255,255,.96);
}
body.theme-classic {
  --stage-bg: #ffffff;
  --grid-minor: #e6e9ef;
  --grid-major: #cfd7e3;
}
body.theme-modern {
  --stage-bg: #fcfdff;
  --grid-minor: #edf2f7;
  --grid-major: #dbe5f0;
}
body.theme-dark {
  background: #111827;
  color: #e5e7eb;
  --stage-bg: #1f2937;
  --grid-minor: rgba(255,255,255,.05);
  --grid-major: rgba(255,255,255,.11);
  --panel-bg: #0f172a;
  --panel-border: #334155;
  --toolbar-bg: rgba(15,23,42,.96);
}
body.theme-dark .topbar,
body.theme-dark .panel,
body.theme-dark .settingsDialog {
  background: var(--panel-bg);
  color: #e5e7eb;
  border-color: var(--panel-border);
}
body.theme-dark .sub,
body.theme-dark .small,
body.theme-dark .hint { color: #cbd5e1; }
body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select,
body.theme-dark button:not(.primary) {
  background: #111827;
  color: #e5e7eb;
  border-color: #475569;
}
body.theme-elegant {
  --stage-bg: #fffdf8;
  --grid-minor: #efe7dc;
  --grid-major: #dfd0bf;
}
.canvasWrap {
  overflow: auto;
  padding: 10px;
  position: relative;
}
.stage {
  background-color: var(--stage-bg);
  background-image: none !important;
  background-size: auto !important;
  box-shadow: 0 16px 40px rgba(15,23,42,.12);
}
.stage.grid-hidden {
  background-image: none;
}
.viewControls {
  position: sticky;
  top: 8px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  margin-bottom: 8px;
  background: rgba(255,255,255,.94);
  border: 1px solid #d1d5db;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.zoomInfo {
  min-width: 64px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
.viewControls button.activeZoomFit,
.mobileZoomPanel button.activeZoomFit {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
}
.selectionToolbar {
  position: absolute;
  z-index: 120;
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  background: var(--toolbar-bg);
  border: 1px solid rgba(148,163,184,.65);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(15,23,42,.18);
  backdrop-filter: blur(8px);
}
.selectionToolbar.hidden { display: none !important; }
.selectionToolbar button {
  padding: 7px 9px;
  font-size: 12px;
  border-radius: 9px;
}
.item {
  border: 2px solid #374151;
  box-shadow: 0 8px 18px rgba(15,23,42,.14), inset 0 1px 0 rgba(255,255,255,.7);
}
.item.tableItem,
.item.objectType-bar,
.item.objectType-wc,
.item.objectType-kitchen,
.item.objectType-stairs,
.item.objectType-door,
.item.objectType-window,
.item.objectType-label,
.item.objectType-partition {
  border-radius: 14px;
}
.item.selected {
  outline: 3px solid rgba(37, 99, 235, .25);
  box-shadow: 0 0 0 2px rgba(59,130,246,.65), 0 12px 28px rgba(15,23,42,.20);
}
.resize-handle, .stage-handle, .room-point {
  width: 12px;
  height: 12px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.95), 0 2px 8px rgba(0,0,0,.18);
}
.objectIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  margin-right: 7px;
  line-height: 1;
  border-radius: 10px;
  background: rgba(255,255,255,.78);
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.12), 0 2px 5px rgba(15,23,42,.12);
  vertical-align: middle;
}
.objectIcon svg {
  width: 24px;
  height: 24px;
  display: block;
}
.itemText { vertical-align: middle; }
.statusBadge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.92);
}
.statusBadge.free { color: #065f46; background: rgba(236,253,245,.96); }
.statusBadge.reserved { color: #92400e; background: rgba(255,251,235,.96); }
.statusBadge.arrived { color: #1d4ed8; background: rgba(239,246,255,.96); }
.statusBadge.blocked { color: #991b1b; background: rgba(254,242,242,.96); }
.roomLabel {
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 28px;
  letter-spacing: .08em;
  color: rgba(51,65,85,.42);
  text-transform: uppercase;
}
.chairIcon {
  position: relative;
  width: 24px;
  height: 24px;
}
.chairSeat {
  position: absolute;
  left: 6px;
  top: 8px;
  width: 12px;
  height: 10px;
  border: 2px solid #374151;
  border-radius: 5px 5px 4px 4px;
  background: rgba(255,255,255,.85);
}
.chairBack {
  position: absolute;
  left: 4px;
  top: 1px;
  width: 16px;
  height: 7px;
  border: 2px solid #374151;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: transparent;
}
.floorShapeLayer {
  position: absolute;
  inset: 0;
}
.panel {
  background: var(--panel-bg);
  border-left: 1px solid var(--panel-border);
}
.frame-label {
  position: absolute;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 26px;
  padding: 4px 10px;
  background: rgba(255,255,255,.96);
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(15,23,42,.08);
  font-weight: 700;
}
.frame-label.top,
.frame-label.bottom { transform: translate(-50%, -50%); }
.frame-label.left { transform: translate(-50%, -50%) rotate(-90deg); }
.frame-label.right { transform: translate(-50%, -50%) rotate(90deg); }
.settingsPanel {
  overflow-y: auto;
}
@media (max-width: 700px) {
  .viewControls {
    display: flex;
    flex-wrap: wrap;
    width: fit-content;
  }
}


/* v0.3.48 célzott javítások */
.stage {
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px) !important;
  background-size: 100px 100px, 100px 100px, 25px 25px, 25px 25px !important;
}
body.theme-classic,
body.theme-modern {
  --grid-minor: rgba(55, 65, 81, .18);
  --grid-major: rgba(30, 41, 59, .34);
}
body.theme-elegant {
  --grid-minor: rgba(120, 88, 45, .22);
  --grid-major: rgba(92, 64, 35, .38);
}
body.theme-dark {
  --grid-minor: rgba(255,255,255,.14);
  --grid-major: rgba(255,255,255,.28);
}
.stage.grid-hidden {
  background-image: none !important;
}
.selectionToolbar button:not(#selDuplicate):not(#selDelete) {
  display: none !important;
}
.statusBadge {
  top: auto !important;
  right: 8px !important;
  bottom: 8px !important;
}
.canvasWrap.no-scroll {
  overflow: hidden !important;
}
.canvasWrap.needs-scroll {
  overflow: auto !important;
}


/* v0.3.48 zoom/gördítősáv és helyszín háttérszín javítás */
.stage {
  background-color: var(--venue-room-bg, var(--stage-bg)) !important;
}
.scaledCanvasSize {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  visibility: hidden;
  z-index: -1;
}
.canvasWrap {
  position: relative !important;
}
.canvasWrap.needs-scroll {
  overflow: auto !important;
}
.canvasWrap.no-scroll {
  overflow: hidden !important;
}


/* v0.3.48 felső sor: étterem név + cím + fő gombok */
.topbar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 10px 16px !important;
  border-bottom: 1px solid #d1d5db !important;
  background: #f1fbf7 !important;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.restaurant-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.restaurant-name {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  line-height: 1.1;
}

.restaurant-address {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  line-height: 1.2;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-right button {
  padding: 8px 13px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  cursor: pointer;
  font-weight: 700;
}

.topbar-right button:hover {
  background: #eef2f7;
}

.editorActionBar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 16px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 58px;
  z-index: 90;
}

body.theme-dark .topbar,
body.theme-dark .editorActionBar {
  background: #0f172a !important;
  border-color: #334155 !important;
}

body.theme-dark .restaurant-name {
  color: #e5e7eb;
}

body.theme-dark .restaurant-address {
  color: #cbd5e1;
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .topbar-right {
    width: 100%;
  }

  .topbar-right button {
    flex: 1;
  }

  .editorActionBar {
    top: 96px;
  }
}


/* v0.3.48 egy soros felső menü */
.topbarOneLine {
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) auto auto !important;
  align-items: center !important;
  column-gap: 8px !important;
  row-gap: 8px !important;
  min-height: 58px;
}
.topbar-center {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.topVenueSelectWrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.topVenueSelectWrap select {
  min-width: 170px;
  max-width: 260px;
  background: #fff8e7 !important;
  border-color: #d8c28a !important;
  color: #172033 !important;
}
.topMenuWrap {
  position: relative;
}
.topDropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 3000;
  min-width: 260px;
  padding: 10px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(15,23,42,.18);
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.topDropdown.hidden {
  display: none !important;
}
.topDropdown button,
.topDropdown select,
.topDropdown input {
  width: 100%;
}
.topbar-right {
  justify-self: end;
}
.editorActionBar {
  display: none !important;
}
#venueSettingsTabs {
  display: block;
}
#venueSettingsTabs .settingsTab {
  margin-top: 8px;
}
@media (max-width: 980px) {
  .topbarOneLine {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }
  .topbar-center,
  .topbar-right {
    justify-content: stretch;
    flex-wrap: wrap;
  }
  .topbar-right button,
  .topbar-center button,
  .topVenueSelectWrap,
  .topVenueSelectWrap select {
    flex: 1;
  }
}


/* v0.3.48 cím és telefonszám mezők */
.topVenueSelectWrap {
  display: flex;
  align-items: center;
  margin: 0;
}
.topVenueSelectWrap select {
  min-width: 180px;
  max-width: 260px;
}
.settingsAddressGrid {
  display: grid;
  grid-template-columns: 130px minmax(160px, 1fr) minmax(220px, 1.6fr);
  gap: 14px 10px;
}
.settingsSectionBox {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 14px 12px;
  margin: 14px 0 14px;
  background: #f6f7f9;
}
.settingsIdentityBox {
  margin-top: 12px;
  display: grid;
  gap: 14px;
}
.settingsPagePanel .settingsPanel label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 0;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.2;
}
.settingsPagePanel .settingsPanel label input,
.settingsPagePanel .settingsPanel label select {
  margin-top: 0;
}
.settingsPhoneBlock {
  margin: 12px 0 16px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px;
  background: #f9fafb;
}
.settingsPhoneHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.settingsPhoneHeader h3 {
  margin: 0;
}
#btnAddPhoneRow {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  border-radius: 8px;
  white-space: nowrap;
}
.phoneAddIcon {
  font-size: 20px;
  line-height: 1;
}
.settingsPhoneRows {
  display: grid;
  gap: 8px;
}
.settingsPhoneRow {
  display: grid;
  grid-template-columns: 64px 82px minmax(120px, 1fr) 34px;
  gap: 8px;
  align-items: center;
}
.settingsPhoneRow input {
  margin-top: 0;
}
.phoneCountry {
  text-align: center;
  font-weight: 800;
  background: #eef2f7;
}
.phoneRemoveBtn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  color: #991b1b;
}
@media (max-width: 760px) {
  .settingsAddressGrid {
    grid-template-columns: 1fr;
  }
  .settingsPhoneRow {
    grid-template-columns: 58px 70px 1fr 32px;
  }
}


/* v0.3.48 célzott javítások */
.settingsDialog,
.settingsBody,
.settingsPanel {
  overflow-x: hidden !important;
  max-width: 100%;
}
.settingsPanel * {
  box-sizing: border-box;
}
.settingsVenueBlock {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.settingsVenueRows {
  display: grid;
  gap: 8px;
}
.settingsVenueRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: end;
}
.settingsVenueRow label {
  margin-bottom: 0;
}
.venueRemoveBtn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  color: #991b1b;
}
.addRowBtn {
  width: fit-content;
}
.item-content {
  font-size: 18px;
  font-weight: 800;
}
.tableContent {
  gap: 3px;
}
.tableTitle {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}
.item:not(.tableItem) .item-content {
  font-size: 18px;
  font-weight: 850;
}
.seatBadge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 3;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #334155;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.92);
}
.statusBadge {
  font-size: 10px !important;
  padding: 3px 7px !important;
}
.meta {
  display: none !important;
}
@media (max-width: 700px) {
  .settingsVenueRow {
    grid-template-columns: 1fr 34px;
  }
}


/* v0.3.48 objektumok beállítás és telefonszám + gomb elhelyezés */
.settingsPhoneBlock {
  display: grid;
  gap: 9px;
}
.settingsContactBox .settingsPhoneBlock {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.settingsPhoneHeader {
  display: block;
}
.settingsPhoneHeader #btnAddPhoneRow {
  margin-top: 8px;
  margin-left: 0;
}
.settingsPhoneRows {
  order: 1;
}
.settingsPhoneHeader {
  order: 2;
}
.settingsPhoneBlock .small {
  order: 3;
}
.settingsObjectRows {
  display: grid;
  gap: 8px;
  margin: 14px 0 16px;
}
.settingsObjectRow {
  display: grid;
  grid-template-columns: minmax(180px, 48%) 120px 36px;
  gap: 10px;
  align-items: center;
}
.settingsObjectName {
  font-weight: 800;
}
.settingsObjectColor {
  width: 100%;
  height: 34px;
}
.customObjectRemoveBtn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  color: #991b1b;
}
.addObjectTypeBlock {
  display: grid;
  grid-template-columns: minmax(180px, 1fr);
  gap: 10px;
  margin: 14px 0 6px;
}
.addObjectTypeBlock label {
  margin-bottom: 0;
}
.addObjectTypeBlock .addRowBtn {
  justify-self: start;
  min-height: 34px;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .settingsObjectRow {
    grid-template-columns: 1fr 90px 34px;
  }
  .addObjectTypeBlock {
    grid-template-columns: 1fr;
  }
  .addObjectTypeBlock .addRowBtn {
    justify-self: start;
  }
}


/* v0.3.48 finomítások */
.phoneBlockTitle {
  margin: 0 !important;
  font-size: 13.5px;
  font-weight: 900;
  line-height: 1.2;
}
.settingsPhoneHeader {
  justify-self: start;
}
.settingsPhoneHeader #btnAddPhoneRow {
  margin-top: 0 !important;
  margin-left: 0 !important;
}

/* Rács láthatóság erősítése. A korábbi háttérszín ne takarja el. */
.stage.grid-visible {
  background-image: none !important;
  background-size: auto !important;
  background-blend-mode: normal;
}
body.theme-dark .stage.grid-visible {
  background-image: none !important;
}
.stage.grid-hidden {
  background-image: none !important;
}
/* v0.3.48 jobb oldali zoom/object/foglalás panelek */
.zoomPanelBlock {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.sideViewControls {
  position: static !important;
  display: flex !important;
  flex-direction: column;
  gap: 8px !important;
  width: 100%;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.sideViewControls > button {
  width: 100%;
}
.zoomStepRow {
  display: flex;
  gap: 8px;
  width: 100%;
}
.zoomStepRow button {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  width: 0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.zoomBtnPct {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
}
.zoomFitRow {
  display: flex;
  gap: 8px;
  width: 100%;
}
.zoomFitRow button {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  width: 0 !important;
}
.sideModePanel {
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 8px 10px 10px;
  margin-bottom: 12px;
  background: #ffffff;
}
.sideModePanel.hidden {
  display: none !important;
}
.sideObjectList {
  display: grid;
  gap: 8px;
}
.sideObjectList.hidden,
.sideObjectListTitle.hidden,
.sideObjectListHint.hidden {
  display: none !important;
}
.sideObjectRow {
  display: grid;
  grid-template-columns: 1fr 26px;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  border-radius: 10px;
  cursor: pointer;
}
.sideObjectRow:hover {
  background: #f9fafb;
}
.sideObjectColorPicker {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
.sideObjectColor {
  display: block;
  width: 22px;
  height: 22px;
  border: 1px solid #9ca3af;
  border-radius: 7px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.12);
  cursor: pointer;
}
.sideObjectColorInput {
  position: absolute;
  inset: 0;
  width: 22px !important;
  height: 22px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  cursor: pointer;
}
.sideObjectName {
  font-weight: 800;
  min-width: 0;
}
.sideDatePicker {
  display: grid;
  gap: 6px;
}
.topbar-center {
  flex-wrap: nowrap !important;
}
.topMenuWrap,
.topDropdown {
  display: none !important;
}
.canvasWrap .viewControls {
  display: none !important;
}
body.theme-dark .sideModePanel {
  background: #0f172a;
  border-color: #334155;
}
body.theme-dark .zoomBtnPct {
  color: #94a3b8;
}

/* v0.3.48 mentés jobb panelen */
.rightSaveBtn {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 900;
}


/* v0.3.48 státuszjelvény ikon és mentés animáció */
.statusBadge {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  right: 9px !important;
  bottom: 9px !important;
  border: 2px solid rgba(255,255,255,.95) !important;
  box-shadow: 0 1px 4px rgba(15,23,42,.35) !important;
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
}
.statusBadge.free {
  background: #16a34a !important;
}
.statusBadge.reserved {
  background: #f59e0b !important;
}
.statusBadge.arrived {
  background: #2563eb !important;
}
.statusBadge.blocked {
  background: #dc2626 !important;
}

@keyframes saveButtonPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, .0);
  }
  35% {
    transform: scale(1.035);
    box-shadow: 0 0 0 7px rgba(22, 163, 74, .22);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, .0);
  }
}
#btnSave.saveSuccess,
#btnSaveSettings.saveSuccess {
  background: #16a34a !important;
  border-color: #15803d !important;
  color: #ffffff !important;
  animation: saveButtonPulse .8s ease-out 1;
}
#btnSaveSettings.isSaving {
  background: #a86f14 !important;
  border-color: #8a5a10 !important;
  color: #ffffff !important;
  cursor: wait;
}
#btnSaveSettings.saveError {
  background: #b91c1c !important;
  border-color: #991b1b !important;
  color: #ffffff !important;
}


/* v0.3.48 körasztal forma javítás */
.tableItem.table-round,
.item.tableItem.table-round {
  border-radius: 9999px !important;
  aspect-ratio: 1 / 1;
}
.tableItem.table-square,
.item.tableItem.table-square {
  border-radius: 13px !important;
}
.tableItem.table-rect,
.item.tableItem.table-rect {
  border-radius: 14px !important;
}


/* v0.3.48 körasztal belső jelvények + valódi rács overlay */
.gridOverlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.gridOverlay .gridMinor {
  stroke: rgba(15, 23, 42, .28);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.gridOverlay .gridMajor {
  stroke: rgba(15, 23, 42, .48);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
body.theme-dark .gridOverlay .gridMinor {
  stroke: rgba(255,255,255,.24);
}
body.theme-dark .gridOverlay .gridMajor {
  stroke: rgba(255,255,255,.45);
}
.stage.grid-hidden .gridOverlay {
  display: none !important;
}
.floorShapeLayer {
  z-index: 2;
}
.item {
  z-index: 10;
}
.item.tableItem.round,
.item.tableItem.table-round {
  overflow: hidden;
}
.item.tableItem.round .seatBadge,
.item.tableItem.table-round .seatBadge {
  left: 50% !important;
  bottom: 12px !important;
  transform: translateX(-115%);
}
.item.tableItem.round .statusBadge,
.item.tableItem.table-round .statusBadge {
  right: 50% !important;
  bottom: 12px !important;
  transform: translateX(115%);
}
.seatBadge {
  font-weight: 500 !important;
  font-family: Verdana, Arial, Helvetica, sans-serif !important;
  font-size: 10px !important;
  letter-spacing: 0 !important;
  color: #1f2937 !important;
}
.item.tableItem.round .seatBadge,
.item.tableItem.table-round .seatBadge {
  font-size: 10px !important;
  padding: 2px 6px !important;
}


/* v0.3.48 rács ténylegesen a helyszínrajz fölé kerül */
.gridOverlay {
  z-index: 6 !important;
  opacity: var(--grid-opacity, 1) !important;
  mix-blend-mode: multiply;
}
.gridOverlay .gridMinor {
  stroke: rgba(0, 0, 0, .24) !important;
  stroke-width: .8 !important;
}
.gridOverlay .gridMajor {
  stroke: rgba(0, 0, 0, .38) !important;
  stroke-width: 1.15 !important;
}
body.theme-dark .gridOverlay {
  mix-blend-mode: screen;
}
body.theme-dark .gridOverlay .gridMinor {
  stroke: rgba(255, 255, 255, .24) !important;
}
body.theme-dark .gridOverlay .gridMajor {
  stroke: rgba(255, 255, 255, .40) !important;
}
.floorShapeLayer {
  z-index: 2 !important;
}
.item {
  z-index: 20;
}
.stage.grid-hidden .gridOverlay {
  display: none !important;
}
.stage.grid-visible .gridOverlay {
  display: block !important;
}

/* Az alaprajzot mar a kulso sokszog rajzolja, a regi teglalap-alap ne latszodjon at. */
.stage {
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.floorShapeLayer .floor-point,
.room-point.floor-point {
  cursor: default !important;
}
.floorShapeLayer .floor-point.locked,
.room-point.floor-point.locked {
  cursor: default !important;
}


/* v0.3.48 mobil felső menü + érintéses zoom/pan */
.mobileMenuButton,
.mobileTopMenu {
  display: none;
}
.canvasWrap {
  overscroll-behavior: contain;
}
.canvasWrap.isPanning {
  cursor: grabbing;
}
@media (max-width: 760px) {
  .topbarOneLine {
    grid-template-columns: 1fr auto !important;
    align-items: center !important;
    position: sticky;
    top: 0;
  }

  .topbar-center {
    display: none !important;
  }

  .topbar-right {
    display: flex !important;
    justify-content: flex-end !important;
    width: auto !important;
  }

  .topbar-right > #btnSettings {
    display: none !important;
  }

  .mobileMenuButton {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 38px;
    padding: 0 !important;
    font-size: 23px;
    font-weight: 900;
    border-radius: 10px;
  }

  .mobileTopMenu {
    position: absolute;
    right: 10px;
    top: calc(100% + 8px);
    z-index: 5000;
    width: min(280px, calc(100vw - 20px));
    padding: 10px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(15,23,42,.22);
    display: grid;
    gap: 8px;
  }

  .mobileTopMenu.hidden {
    display: none !important;
  }

  .mobileTopMenu button,
  .mobileTopMenu select {
    width: 100%;
  }

  .mobileMenuSlot {
    display: grid;
    gap: 6px;
  }

  .settingsPage .mobileSettingsSubMenu {
    display: grid;
    gap: 6px;
    padding-top: 8px;
    margin-top: 2px;
    border-top: 1px solid #e5e7eb;
  }

  .settingsMobileSubTab {
    min-height: 34px;
    padding: 7px 10px;
    text-align: left;
    font-size: 13.5px;
    border-radius: 8px;
  }

  .settingsMobileSubTab.active {
    background: #0f766e !important;
    color: #ffffff !important;
    border-color: #0f766e !important;
  }

  .canvasWrap {
    touch-action: none;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .stageShell {
    touch-action: none;
  }
}
body.theme-dark .mobileTopMenu {
  background: #0f172a;
  border-color: #334155;
}


/* v0.3.48 mobil zoom/pan finomítás + autosave állapot */
@media (max-width: 760px) {
  .canvasWrap {
    touch-action: none !important;
    overflow: auto !important;
    height: calc(100vh - 130px);
    max-height: calc(100vh - 130px);
    overscroll-behavior: contain;
  }

  .stageShell {
    transform-origin: 0 0 !important;
    will-change: transform;
  }

  .canvasWrap.isPanning {
    cursor: grabbing;
  }
}
#btnSave.saveSuccess,
#btnSaveSettings.saveSuccess {
  transition: background-color .2s ease, transform .2s ease;
}


/* v0.3.48 mobil stabil zoom vezérlő */
.mobileZoomPanel {
  display: none;
}
@media (max-width: 760px) {
  .mobileZoomPanel {
    position: sticky;
    top: 58px;
    z-index: 4500;
    display: grid;
    grid-template-columns: 46px 46px 1fr 94px;
    gap: 6px;
    padding: 7px 8px;
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid #d1d5db;
    box-shadow: 0 4px 12px rgba(15,23,42,.08);
  }

  .mobileZoomPanel button {
    min-height: 38px;
    border-radius: 10px;
    font-weight: 900;
    font-size: 14px;
  }

  #mobileZoomOut,
  #mobileZoomIn {
    font-size: 24px;
    line-height: 1;
  }

  #mobilePanToggle.active {
    background: #0f766e;
    color: #ffffff;
    border-color: #0f766e;
  }

  .canvasWrap {
    height: calc(100vh - 178px) !important;
    max-height: calc(100vh - 178px) !important;
    overflow: auto !important;
    touch-action: none !important;
    background: #f8fafc;
  }

  .canvasWrap.mobilePanMode {
    cursor: grab;
  }

  .canvasWrap.isPanning {
    cursor: grabbing;
  }
}
body.theme-dark .mobileZoomPanel {
  background: rgba(15,23,42,.98);
  border-color: #334155;
}


/* v0.3.48 mobilon a körülrajzolós kijelölés tiltása */
@media (max-width: 760px) {
  .selectionBox {
    display: none !important;
    pointer-events: none !important;
  }

  .stage.mobileNoBoxSelect {
    user-select: none;
  }
}


/* v0.3.48 kétujjas zoom visszatéve, mobil dobozkijelölés nélkül */
@media (max-width: 760px) {
  .canvasWrap,
  .stageShell,
  .stage {
    touch-action: none !important;
  }
}


/* v0.3.48 mobilon külön Mozgatás és Szerkesztés mód */
@media (max-width: 760px) {
  body.mobilePanModeActive .canvasWrap,
  body.mobilePanModeActive .stageShell,
  body.mobilePanModeActive .stage {
    touch-action: none !important;
  }

  body.mobilePanModeActive .stage .item,
  body.mobilePanModeActive .stage .resize-handle,
  body.mobilePanModeActive .stage .stage-handle,
  body.mobilePanModeActive .stage .room-point,
  body.mobilePanModeActive .selectionToolbar {
    pointer-events: none !important;
  }

  body.mobileEditModeActive .stage .item,
  body.mobileEditModeActive .stage .resize-handle,
  body.mobileEditModeActive .stage .stage-handle,
  body.mobileEditModeActive .stage .room-point {
    pointer-events: auto !important;
  }

  body.mobileEditModeActive .canvasWrap,
  body.mobileEditModeActive .stageShell,
  body.mobileEditModeActive .stage,
  body.mobileEditModeActive .stage .item {
    touch-action: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
  }

  body.mobileEditModeActive .stage .item *,
  body.mobileEditModeActive .stage .tableItem * {
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
  }

  #mobilePanToggle.active {
    background: #065f46 !important;
    color: #ffffff !important;
    border-color: #065f46 !important;
  }

  #mobilePanToggle:not(.active) {
    background: #f59e0b !important;
    color: #111827 !important;
    border-color: #d97706 !important;
  }
}


/* v0.3.48 mobil zoom panel csak Alaprajz szerkesztés nézetben */
@media (max-width: 760px) {
  .mobileZoomPanel {
    display: none !important;
  }

  body.mobileZoomVisible .mobileZoomPanel {
    display: grid !important;
  }

  .mobileZoomPanel.hidden {
    display: none !important;
  }
}


/* v0.3.48 kijelölt asztal napi naptára */
.tableCalendarPanel {
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 12px;
  background: #ffffff;
  overflow: hidden;
}
.tableCalendarPanel.hidden {
  display: none !important;
}
.tableCalendarTop {
  display: grid;
  grid-template-columns: 34px 1fr 34px auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.tableCalendarTop button {
  min-height: 34px;
  border-radius: 8px;
  font-weight: 800;
  background: #ffffff;
}
.tableCalDateLabel {
  text-align: center;
  font-weight: 900;
  font-size: 15px;
  color: #111827;
}
.tableCalTableLabel {
  margin: 8px 0 7px;
  font-weight: 900;
  color: #374151;
}
.tableCalGrid {
  display: block;
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid #dbe3ef;
  border-radius: 9px;
  background: #ffffff;
}
.timeCell {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 8px;
  align-items: center;
  text-align: left;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  cursor: pointer;
}
.timeCell.free {
  background: #f8fafc;
}
.timeCell.reserved {
  background: #fffbeb;
  border-color: #f59e0b;
}
.timeCellTime {
  font-weight: 900;
  color: #111827;
}
.timeCellText {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #4b5563;
}
@media (max-width: 760px) {
  .tableCalendarPanel {
    order: 20;
    margin: 10px 8px 12px;
    max-height: none;
  }
  .tableCalGrid {
    max-height: 300px;
  }
  /* Mobilon ez a panel vizuálisan az alaprajz alatt legyen: a jobb panelben is ott marad, de teljes szélességűként jelenik meg. */
  aside.panel .tableCalendarPanel {
    width: auto;
  }
}
body.theme-dark .tableCalendarPanel,
body.theme-dark .timeCell.free {
  background: #0f172a;
  border-color: #334155;
}
body.theme-dark .timeCellTime,
body.theme-dark .tableCalTableLabel {
  color: #e5e7eb;
}
body.theme-dark .timeCellText {
  color: #cbd5e1;
}


/* v0.3.48 asztal műveletválasztó */
.tableActionPanel {
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 12px;
  background: #ffffff;
}
.tableActionPanel.hidden,
.editPanelTitle.hidden {
  display: none !important;
}
#editPanelTitle {
  display: none !important;
}
.tableActionTitle {
  font-weight: 900;
  margin-bottom: 8px;
  color: #374151;
}
.tableActionButtons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tableActionButtons button {
  min-height: 38px;
  border-radius: 10px;
  font-weight: 900;
}
body.theme-dark .tableActionPanel {
  background: #0f172a;
  border-color: #334155;
}
body.theme-dark .tableActionTitle {
  color: #e5e7eb;
}
@media (max-width: 760px) {
  .tableActionPanel,
  .tableCalendarPanel {
    margin: 10px 8px 12px;
  }
}


/* v0.3.48 asztal kattintás utáni műveletpanel láthatóság */
.tableActionPanel:not(.hidden) {
  display: block !important;
}
.tableActionButtons {
  display: grid !important;
}


/* v0.3.48 final table click fallback */
.tableActionPanel:not(.hidden) {
  display: block !important;
  visibility: visible !important;
}
.tableActionPanel:not(.hidden) .tableActionButtons {
  display: grid !important;
}

/* v0.3.48 jobb oldali asztal menü finomítás */
.editPanelBelowActions {
  display: none !important;
}
.tableActionButtons button.activeTableAction {
  background: #0f766e !important;
  color: #ffffff !important;
  border-color: #0f766e !important;
}
.tableActionButtons button:not(.activeTableAction) {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: #9ca3af !important;
}
.tableActionButtons button:not(.activeTableAction):hover {
  background: #f9fafb !important;
}
body.theme-dark .tableActionButtons button:not(.activeTableAction) {
  background: #0f172a !important;
  color: #e5e7eb !important;
  border-color: #475569 !important;
}
body.theme-dark .tableActionButtons button.activeTableAction {
  background: #0f766e !important;
  color: #ffffff !important;
  border-color: #0f766e !important;
}

/* v0.3.50 kijelölt elem szerkesztő kompakt mezőelrendezés */
#editForm .editTwoCols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

#editForm .editTwoCols.hidden {
  display: none !important;
}

#editForm .editTwoCols label {
  margin-bottom: 12px;
}

.mergeSettingsRow {
  margin: 8px 0 4px;
}
.mergeAllowListBlock {
  margin-top: 8px;
  padding: 8px 10px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}
.mergeAllowListTitle {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
}
.mergeAllowAllLabel {
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 4px;
  font-weight: 700;
}
.mergeAllowList {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 160px;
  overflow-y: auto;
}
.editStatusRow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 2px 0 12px;
}

.editStatusCheck {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  min-width: 0;
  width: 100%;
  height: 30px;
  padding: 0 3px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
}

.editStatusCheck input[type="checkbox"] {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin: 0;
  padding: 0;
  accent-color: var(--status-check-color, #0f766e);
}

.editStatusCheck span {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
}

.editStatusCheck:has(input:checked) {
  border-color: var(--status-check-color, #0f766e);
  background: color-mix(in srgb, var(--status-check-color, #0f766e) 18%, #ffffff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--status-check-color, #0f766e) 28%, transparent);
}

@media (max-width: 760px) {
  #editForm .editTwoCols {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  .editStatusRow {
    gap: 5px;
  }
}

.editStatusRow.hidden {
  display: none !important;
}

/* v0.3.50: nem asztal kijelölésekor csak a Szerkesztés gomb látszik */
.tableActionPanel.singleEditAction .tableActionButtons {
  grid-template-columns: 1fr !important;
}

/* v0.3.51: Foglalások főmenüben egyelőre csak a dátum látszik */
body.reservationsOnlyMode #tableActionPanel,
body.reservationsOnlyMode #tableCalendarPanel,
body.reservationsOnlyMode #editPanelTitle,
body.reservationsOnlyMode #emptyInfo,
body.reservationsOnlyMode #editForm,
body.reservationsOnlyMode #editPanelBelowActions,
body.reservationsOnlyMode #saveStatus,
body.reservationsOnlyMode #mergeDebug {
  display: none !important;
}

/* v0.3.55: Alaprajz szerkesztése menüben előbb az objektum tulajdonságok, utána az objektumlista */
.sideEditorPropertiesSlot {
  margin-bottom: 0;
}
.sideEditorPropertiesSlot .editPanelTitle {
  margin-top: 0;
}
.sideObjectListTitle {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.15;
  font-weight: 900;
  color: #111827;
}
.sideObjectListHint {
  margin: 0 0 12px;
  color: #334155;
  font-size: 13px;
  line-height: 1.4;
}
body.theme-dark .sideObjectListTitle {
  color: #e5e7eb;
}

.topbar-center button,
.topbar-right > button,
.topVenueSelectWrap select {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 1 !important;
  border-width: 1px !important;
  box-sizing: border-box !important;
}
.topbar-center button,
.topbar-right > button {
  display: inline-flex !important;
}
.topVenueSelectWrap select {
  display: block !important;
  padding-left: 12px !important;
  padding-right: 34px !important;
}
.topbar-right > .mobileMenuButton {
  display: none !important;
}
@media (max-width: 760px) {
  .topbar-right > .mobileMenuButton {
    display: inline-flex !important;
  }
}

/* v0.3.87 aktív felső menügomb */
.topbar-center button.topMenuActive,
.topbar-right > button.topMenuActive,
.mobileTopMenu button.topMenuActive {
  background: #0f766e !important;
  color: #ffffff !important;
  border-color: #0f766e !important;
}
.topbar-center button.topMenuActive:hover,
.topbar-right > button.topMenuActive:hover,
.mobileTopMenu button.topMenuActive:hover {
  background: #0f766e !important;
  color: #ffffff !important;
  border-color: #0f766e !important;
}
.topbar-center button:not(.topMenuActive),
.topbar-right > button:not(.topMenuActive) {
  background: #fff8e7 !important;
  border-color: #d8c28a !important;
  color: #172033 !important;
}
.topbar-center button:not(.topMenuActive):hover,
.topbar-right > button:not(.topMenuActive):hover {
  background: #fff1c7 !important;
  border-color: #caa24a !important;
}
.topVenueSelectWrap select:hover,
.topVenueSelectWrap select:focus {
  background: #fff1c7 !important;
  border-color: #caa24a !important;
}

/* v0.3.87 korábbi, szélesebb szék ikon visszaállítása */
.item.objectType-chair {
  min-width: 30px !important;
  min-height: 30px !important;
}
.item.objectType-chair .chairIcon {
  width: 30px !important;
  height: 22px !important;
}
.item.objectType-chair .chairBack {
  left: 4px !important;
  top: 0 !important;
  width: 22px !important;
  height: 6px !important;
  border: 2px solid #1f2937 !important;
  border-bottom: 0 !important;
  border-radius: 6px 6px 2px 2px !important;
  background: linear-gradient(#ffffff, #e5e7eb) !important;
}
.item.objectType-chair .chairSeat {
  left: 2px !important;
  top: 7px !important;
  width: 26px !important;
  height: 11px !important;
  border: 2px solid #1f2937 !important;
  border-radius: 5px !important;
  background: linear-gradient(#ffffff, #f3f4f6) !important;
}


/* v0.3.87 foglalási idő beállítások */
.settingsOpeningHoursBlock {
  margin: 14px 0 16px;
  border-top: 1px solid #d1d5db;
}
.settingsSiteColorsBox {
  margin: 14px 0 16px;
  border-top: 1px solid #d1d5db;
}
.settingsSiteColorsBox h3 {
  margin: 0 0 12px;
  font-size: 13.5px;
  font-weight: 900;
}
.settingsColorGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
.settingsColorRow {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  cursor: pointer;
}
.settingsColorRow span {
  font-size: 12px;
  color: #374151;
  font-weight: 600;
}
.settingsColorRow input[type="color"] {
  width: 100%;
  height: 32px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 2px 4px;
  cursor: pointer;
  background: none;
}
.settingsOpeningHoursBlock h3 {
  margin: 0 0 9px;
  font-size: 13.5px;
  font-weight: 900;
  line-height: 1.2;
}
.settingsReservationFeeBox {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.settingsReservationFeeBox h3 {
  margin: 0 0 2px;
  font-size: 15.5px;
  font-weight: 900;
  line-height: 1.2;
}
.settingsFeeAmountLabel {
  display: grid !important;
  grid-template-columns: minmax(170px, 220px) minmax(180px, 300px);
  align-items: center;
  gap: 12px;
  margin: 0 !important;
  padding: 0 10px 2px;
}
.settingsMoneyInput {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.settingsMoneyInput input {
  min-height: 37px;
  margin: 0 !important;
}
.settingsMoneyInput span {
  white-space: nowrap;
  color: #374151;
  font-weight: 800;
}
.settingsCheck.isDisabled {
  color: #64748b;
  background: #f8fafc;
  opacity: 0.72;
}
.settingsCheck.isDisabled input {
  cursor: not-allowed;
}
.settingsFeeAmountLabel.isDisabled {
  color: #64748b;
  opacity: 0.72;
}
.settingsFeeAmountLabel.isDisabled input {
  cursor: not-allowed;
  background: #f8fafc;
}
@media (max-width: 760px) {
  .settingsPageMain {
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }
  .settingsPagePanel .settingsBody {
    grid-template-columns: 1fr !important;
  }
  .settingsPagePanel .settingsTabs {
    display: none !important;
  }
  .settingsPagePanel .settingsPanel {
    grid-column: 1 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .settingsFeeAmountLabel {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px;
    padding-left: 0;
    padding-right: 0;
  }
  .settingsMoneyInput {
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }
  .settingsMoneyInput input {
    min-width: 0;
  }
  .settingsMoneyInput span {
    font-size: 13px;
  }
}
.settingsTimeInline,
.settingsVenueReservationGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 12px;
}
.settingsTimeInline label,
.settingsVenueReservationGrid label {
  margin-bottom: 0;
}
.settingsTimeInline select,
.settingsVenueReservationGrid select {
  width: 100%;
  margin-top: 0;
}
.settingsTimeInline label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 8px;
}
.settingsTimeInline .timeSuffix {
  padding-bottom: 8px;
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .settingsTimeInline,
  .settingsVenueReservationGrid {
    grid-template-columns: 1fr 1fr;
  }
}

/* v0.3.129 helyszín beállítás oldal rendezése */
.settingsVenueSection {
  display: grid;
  gap: 14px;
}
.settingsVenueSection h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 900;
  line-height: 1.2;
}
.settingsPagePanel .settingsPanel .checkboxLabel {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  margin: 0;
  line-height: 1.25;
}
.settingsPagePanel .settingsPanel .checkboxLabel input {
  width: auto;
  margin: 0;
}
.settingsCheckGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.settingsRangeBox {
  display: grid;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
}
.settingsRangeBox.hidden {
  display: none !important;
}
.settingsPaymentProviderBox {
  display: grid;
  gap: 12px;
}
.settingsPaymentProviders {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.settingsPaymentProviderCard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  cursor: pointer;
}
.settingsPaymentProviderCard.active {
  border-color: #0f766e;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.18);
}
.settingsPaymentProviderCard.isOpen {
  background: #f0fdfa;
}
.settingsPaymentProviderCard:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.3);
  outline-offset: 2px;
}
.settingsPaymentProviderCard strong {
  display: block;
  font-size: 15px;
  margin-bottom: 3px;
}
.settingsPaymentProviderCard button,
.settingsPaymentExternalBtn {
  min-height: 34px;
  white-space: nowrap;
}
.settingsPaymentStatus,
.settingsPaymentDetailsHeader span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}
.settingsPaymentStatus.activeStatus,
.settingsPaymentDetailsHeader span.activeStatus {
  background: #dcfce7;
  color: #166534;
}
.settingsPaymentDetails {
  display: grid;
  gap: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}
.settingsPaymentDetailsHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.settingsPaymentDetailsHeader strong {
  font-size: 15.5px;
}
.settingsPaymentProviderDetails {
  display: grid;
  gap: 10px;
}
.settingsPaymentProviderDetails.hidden {
  display: none !important;
}
.settingsPaymentGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 760px) {
  .settingsPaymentProviders,
  .settingsPaymentGrid {
    grid-template-columns: 1fr;
  }
  .settingsPaymentProviderCard {
    grid-template-columns: 1fr;
  }
  .settingsPaymentProviderCard button,
  .settingsPaymentExternalBtn {
    width: 100%;
  }
}
.settingsRangeHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 900;
  line-height: 1.2;
}
.settingsRangeHeader strong {
  min-width: 46px;
  text-align: right;
  color: #0f766e;
}
.settingsRangeBox input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: #0f766e;
}
.settingsGridPreview {
  position: relative;
  height: 74px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: var(--grid-preview-bg, #f8fafc);
}
.settingsGridPreviewOverlay {
  position: absolute;
  inset: 0;
  opacity: var(--grid-preview-opacity, 1);
  background-image:
    linear-gradient(rgba(15, 23, 42, .38) 1.15px, transparent 1.15px),
    linear-gradient(90deg, rgba(15, 23, 42, .38) 1.15px, transparent 1.15px),
    linear-gradient(rgba(15, 23, 42, .24) .8px, transparent .8px),
    linear-gradient(90deg, rgba(15, 23, 42, .24) .8px, transparent .8px);
  background-size: 100px 100px, 100px 100px, 25px 25px, 25px 25px;
  background-position: 0 0;
  pointer-events: none;
}
.settingsStageLabelGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
}
@media (max-width: 700px) {
  .settingsTimeInline,
  .settingsVenueReservationGrid,
  .settingsStageLabelGrid {
    grid-template-columns: 1fr;
  }
}
.settingsSnapGuidePointsGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 12px;
}

/* v0.3.87 Foglalások főnézet */
body.reservationsMainMode .layout {
  display: none !important;
}
body.reservationsMainMode .mobileZoomPanel {
  display: none !important;
}
.reservationsMainView {
  padding: 14px 18px 22px;
  background: #f3f4f6;
  min-height: calc(100vh - 58px);
}
.reservationsMainView.hidden {
  display: none !important;
}
.reservationsMainToolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.reservationsDateNav,
.reservationsTablePager {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.resMainDateLabel {
  min-width: 190px;
  text-align: center;
  font-weight: 800;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
}
.resMainTableButtons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.resMainTableBtn {
  min-width: 54px;
  padding-left: 14px;
  padding-right: 14px;
}
.resTableNameWrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 24px);
  max-width: calc(100% - 24px);
  min-width: 0;
  margin: 0 auto;
  padding-right: 8px;
  line-height: 1.08;
}
.resTableNameGroup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px 5px;
  max-width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  white-space: normal;
  overflow-wrap: anywhere;
}
.resTableNameBase {
  color: #0f172a;
  font-weight: 900;
  min-width: 0;
}
body.reservationsMainMode .resMainHead .resTableNameBase {
  color: #ffffff;
}
.resTableNameDash {
  color: #64748b;
  font-weight: 800;
}
body.reservationsMainMode .resMainHead .resTableNameDash {
  color: rgba(255,255,255,.72);
}
.resTableNameBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid #99f6e4;
  border-radius: 7px;
  background: #ccfbf1;
  color: #115e59;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
  font-weight: 900;
  line-height: 1;
}
.resTableNameWrapSmall {
  font-size: 14px;
}
.resTableNameWrapSmall .resTableNameBadge {
  min-width: 22px;
  min-height: 20px;
  padding: 1px 6px;
}
.resTableNameWrapTiny {
  font-size: 12px;
}
.resTableNameWrapTiny .resTableNameGroup {
  gap: 2px 3px;
}
.resTableNameWrapTiny .resTableNameBadge {
  min-width: 18px;
  min-height: 17px;
  padding: 1px 4px;
  border-radius: 5px;
}
.resMainCalendar {
  overflow: auto;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  isolation: isolate;
  transform: translateZ(0);
  touch-action: pan-x pan-y;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
}
.resMainGrid {
  display: grid;
  grid-template-columns: 92px repeat(5, 180px);
  min-width: 992px;
}
.resMainHead,
.resMainTimeHead,
.resMainTimeCell,
.resMainCell {
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}
.resMainHead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  font-weight: 800;
  text-align: center;
  padding: 8px 28px 8px 6px;
  min-width: 0;
}
.resMainTimeHead {
  left: 0;
  z-index: 3;
}
.resMainTimeCell {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #f8fafc;
  font-weight: 800;
  text-align: center;
  padding: 9px 8px;
}
.resMainCell {
  min-height: 38px;
  background: #ffffff;
}
.resMainCellButton {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: block;
  cursor: pointer;
}
.resMainCellButton:hover {
  background: #eff6ff;
}
.resMainBlankHead,
.resMainBlankCell {
  background: #f8fafc;
}
.resMainTableBtnPlaceholder {
  visibility: hidden;
  pointer-events: none;
}
.resMainEmpty {
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 4px;
}
@media (max-width: 760px) {
  .reservationsMainView {
    padding: 10px 8px 16px;
  }
  .reservationsMainToolbar {
    align-items: stretch;
  }
  .reservationsDateNav,
  .reservationsTablePager {
    width: 100%;
  }
  .resMainDateLabel {
    flex: 1;
    min-width: 150px;
  }
  .resMainTableButtons {
    flex: 1 1 100%;
    order: 2;
  }
  .resMainTableBtn {
    flex: 1 1 calc(20% - 8px);
    min-width: 48px;
  }
  .resMainGrid {
    grid-template-columns: 78px repeat(var(--res-cols), minmax(120px, 1fr));
    min-width: 560px;
  }
  body.reservationsMainMode .resMainHead {
    min-height: 42px;
    padding: 5px 22px 5px 4px !important;
  }
  body.reservationsMainMode .resTableNameWrap {
    width: calc(100% - 18px);
    max-width: calc(100% - 18px);
    padding-right: 3px;
    font-size: 14px;
  }
  body.reservationsMainMode .resTableNameWrapSmall {
    font-size: 11px;
  }
  body.reservationsMainMode .resTableNameWrapTiny {
    font-size: 9.5px;
  }
  body.reservationsMainMode .resTableNameGroup {
    gap: 4px 2px;
  }
  body.reservationsMainMode .resTableNameBadge {
    min-width: 16px;
    min-height: 15px;
    padding: 0 3px;
    border-radius: 4px;
  }
  body.reservationsMainMode .resTableNameDash {
    line-height: 1;
  }
}


/* v0.3.87 foglaló layer */
.reservationLayer {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(15, 23, 42, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}
.reservationLayer.hidden {
  display: none !important;
}
.reservationLayerDialog {
  width: min(520px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  overflow-x: hidden;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(15,23,42,.35);
  padding: 16px;
  box-sizing: border-box;
}
.reservationLayerHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.reservationLayerTitleBlock {
  min-width: 0;
}
.reservationLayerHeader h2 {
  margin: 0;
}
.reservationLayerMeta {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: #374151;
  font-size: 14px;
  font-weight: 800;
}
.reservationLayerTableBadge {
  min-width: 32px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 7px;
  background: #2f7d70;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(47, 125, 112, .18);
}
.reservationLayerMetaText {
  white-space: nowrap;
}
#reservationLayerClose {
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}
.reservationLayerError {
  min-height: 20px;
  margin: 6px 0 10px;
  color: #991b1b;
  font-size: 13px;
  font-weight: 700;
}
.reservationLayerDialog input.fieldInvalid,
.reservationLayerDialog input.fieldInvalid:focus {
  border-color: #dc2626 !important;
  background-color: #fff5f5 !important;
  outline-color: #dc2626;
}
.reservationContactRow label:has(.phonePrefixInput input.fieldInvalid) .phonePrefixInput {
  border-color: #dc2626 !important;
  background-color: #fff5f5 !important;
}
.reservationTableOptionEligible {
  background: #dcfce7;
  color: #14532d;
}
.reservationGuestSeatRow {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: start !important;
}
.reservationContactRow {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: start !important;
}
.reservationContactRow label,
.reservationGuestSeatRow label {
  display: block !important;
  margin: 0 0 12px 0 !important;
  width: 100% !important;
}
.reservationContactRow input,
.reservationGuestSeatRow input {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: 36px !important;
  margin-top: 5px !important;
  box-sizing: border-box !important;
}
.reservationContactRow .phonePrefixInput input {
  margin-top: 0 !important;
}
.reservationDepositRows {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}
.reservationDepositRows .checkboxLabel {
  margin: 0;
}
.reservationDepositPaidLabel {
  color: #475569;
}
.reservationDepositPaidLabel input {
  cursor: default;
}
.reservationSendOptions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  margin: 2px 0 8px;
}
.reservationSendOptions .checkboxLabel {
  margin: 0;
  white-space: nowrap;
}
#reservationLayerGuests,
#reservationLayerCapacity {
  width: 100% !important;
  max-width: none !important;
}
#reservationLayerCapacity {
  background: #f3f4f6;
  color: #475569;
  border-color: #9ca3af;
  cursor: default;
}
.reservationLogPanel {
  position: fixed;
  z-index: 7000;
  width: 310px;
  max-width: calc(100vw - 16px);
  max-height: 380px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
  overflow: hidden;
  font-family: Verdana, Geneva, sans-serif;
}
.reservationLogPanel.hidden {
  display: none;
}
.reservationLogHeader {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: #2f7d70;
  color: #ffffff;
  font-size: 13px;
}
.reservationLogHeader button {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 20px;
  line-height: 20px;
  font-weight: 800;
}
.reservationLogBody {
  max-height: 330px;
  overflow: auto;
  padding: 12px;
  background: #ffffff;
}
.reservationLogItem {
  display: flex;
  gap: 8px;
}
.reservationLogRail {
  width: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.reservationLogRail span {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 999px;
  background: #2f7d70;
}
.reservationLogRail i {
  width: 1px;
  flex: 1;
  min-height: 28px;
  margin-top: 3px;
  background: #d1d5db;
}
.reservationLogText {
  min-width: 0;
  flex: 1;
  padding-bottom: 10px;
}
.reservationLogAction {
  font-size: 12px;
  font-weight: 800;
  color: #111827;
}
.reservationLogNote {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
  color: #4b5563;
}
.reservationLogMeta {
  margin-top: 3px;
  font-size: 10px;
  color: #9ca3af;
}
.reservationLogEmpty,
.reservationLogLoading,
.reservationLogError {
  padding: 14px 4px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
}
.reservationLogError {
  color: #b91c1c;
}
@media (max-width: 760px) {
  .resMainGrid {
    grid-template-columns: 82px repeat(5, 150px);
    min-width: 832px;
  }
  .reservationLayer {
    display: block;
    align-items: initial;
    justify-content: initial;
    width: 100%;
    height: var(--reservation-layer-height, 100dvh);
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: pan-y;
  }
  .reservationLayerDialog {
    position: absolute;
    inset: 8px;
    display: flex;
    flex-direction: column;
    width: auto;
    max-width: 520px;
    margin: 0 auto;
    max-height: none;
    min-height: 0;
    overflow-y: hidden;
    overflow-x: hidden;
    border-radius: 14px;
    padding: 14px;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  .reservationLayerHeader {
    flex: 0 0 auto;
  }
  .reservationLayerDialog form {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .reservationLayerDialog form,
  .reservationLayerDialog label,
  .reservationLayerDialog input,
  .reservationLayerDialog select,
  .reservationLayerDialog textarea,
  .phonePrefixInput {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .reservationLayerDialog .reservationDurationTableRow,
  .reservationLayerDialog .reservationGuestSeatRow {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  #reservationLayerDate {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    min-inline-size: 0;
    max-inline-size: 100%;
    height: 36px;
    background-color: #ffffff !important;
    color: #111827;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 8px;
  }
  #reservationLayerDate::-webkit-date-and-time-value {
    min-width: 0;
    text-align: left;
  }
  #reservationLayerDate::-webkit-calendar-picker-indicator {
    margin: 0;
    padding: 0;
  }
  #reservationLayerSave {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin-top: 12px;
    margin-bottom: 0;
    box-shadow: 0 -8px 14px rgba(255, 255, 255, .92);
  }
}

/* v0.3.87 Foglalások naptár finomítás */
.reservationsTablePager {
  flex: 1 1 520px;
  min-width: 0;
}
.resMainTableButtons {
  flex: 1 1 auto;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-width: min(760px, 100%);
}
.resMainTableBtn {
  width: 100%;
  min-width: 0;
}
.resMainCalendar {
  width: 100%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.resMainGrid {
  width: 100%;
  grid-template-columns: 92px repeat(5, minmax(150px, 1fr)) !important;
  min-width: 842px;
}
.resMainCellButton {
  border-right: 1px solid #e5e7eb !important;
  border-bottom: 1px solid #e5e7eb !important;
  background: #ffffff;
  text-align: left;
  padding: 4px 6px !important;
  line-height: 1.15;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.resMainBlankCell,
.resMainBlankHead {
  border-right: 1px solid #e5e7eb !important;
  border-bottom: 1px solid #e5e7eb !important;
}
.resMainCellButton.reserved {
  background: #fff7ed;
  border-left: 3px solid #f59e0b !important;
}
.resMainReservationName {
  font-size: .77rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.resMainReservationPhone {
  margin-top: 1px;
  font-size: .7rem;
  font-weight: 400;
  color: #6c757d;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.resReservationPersonIcon,
.resReservationPhoneIcon {
  display: inline-block;
  width: 12px;
  margin-right: 3px;
  text-align: center;
  color: #0d6efd;
  vertical-align: 1px;
}
.resReservationPersonIcon {
  font-size: .5rem;
}
.resReservationPhoneIcon {
  font-size: .65rem;
}
.resReservationActions {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  margin-top: 4px;
}
.resReservationIconBtn {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  border-radius: 3px;
  position: relative;
  z-index: 13;
}
.resReservationIconBtn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}
.resReservationEditBtn:hover {
  color: #2563eb;
}
.resReservationLogBtn:hover,
.resReservationLogBtn.active {
  color: #7c3aed;
}
.resReservationDeleteBtn {
  color: #dc2626;
}
.resReservationDeleteBtn:hover {
  color: #991b1b;
  background: rgba(220, 38, 38, .08);
}
@media (max-width: 760px) {
  .reservationsTablePager {
    flex-basis: 100%;
    width: 100%;
  }
  .resMainTableButtons {
    min-width: 0;
  }
  .resMainGrid {
    grid-template-columns: 76px repeat(5, minmax(120px, 1fr)) !important;
    min-width: 676px;
  }
}

/* v0.3.87 foglalásblokk húzás / átméretezés */
.resMainCellButton.reservedContinuation {
  background: #fff7ed;
  border-left: 3px solid transparent !important;
}
.resMainReservationBlock {
  position: relative;
  display: block;
  min-height: 32px;
  padding: 6px 6px;
  border-radius: 8px;
  background: #ffedd5;
  border: 1px solid #f59e0b;
  cursor: move;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}
.resMainReservationBlock.draggingReservation {
  outline: 2px solid #111827;
  opacity: .8;
}
.resResizeHandle {
  position: absolute;
  left: 0;
  right: 0;
  height: 7px;
  cursor: ns-resize;
  z-index: 2;
}
.resResizeTop { top: -4px; }
.resResizeBottom { bottom: -4px; }
.resResizeTop::before,
.resResizeBottom::before {
  content: '';
  display: block;
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: rgba(17,24,39,.45);
  margin: 2px auto;
}

/* v0.3.87 teljes foglalásblokk és szerkesztési kattintás */
.resMainCellButton {
  position: relative !important;
  overflow: visible !important;
}
.resMainCellButton.reservationStartCell {
  z-index: 12;
}
.resMainCellButton.reservedContinuation {
  z-index: 1;
}
.resMainReservationBlock {
  position: absolute !important;
  left: 6px;
  right: 6px;
  top: 4px;
  height: calc((var(--reservation-rows, 1) * 38px) - 8px);
  min-height: 32px;
  z-index: 30;
  border: 2px solid #f59e0b !important;
  box-shadow: 0 2px 8px rgba(146, 64, 14, .18);
  background: #ffedd5;
  overflow: hidden;
}
.resMainReservationBlock.draggingReservation {
  z-index: 1000;
  pointer-events: none;
  opacity: .92;
  outline: 2px solid #111827;
  box-shadow: 0 10px 30px rgba(15,23,42,.28);
}
.resMainReservationName,
.resMainReservationPhone {
  cursor: pointer;
}
.resMainReservationName:hover,
.resMainReservationPhone:hover {
  text-decoration: underline;
}
.resMainCellButton.reservedContinuation {
  background: #fff7ed;
  border-left: 3px solid #f59e0b !important;
}


/* v0.3.87 foglalási blokk pontos cellaszél + sárga bal csík eltávolítása */
.resMainCellButton {
  position: relative !important;
  overflow: visible !important;
  padding: 0 !important;
  min-height: 38px !important;
  height: 38px !important;
  border-left: 0 !important;
}
.resMainCellButton.reserved,
.resMainCellButton.reservedContinuation {
  border-left: 0 !important;
  background: #fff7ed;
}
.resMainReservationBlock {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  height: calc(var(--reservation-rows, 1) * 38px) !important;
  min-height: 38px !important;
  border: 2px solid #f59e0b !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
  padding: 7px 8px !important;
  background: #ffedd5 !important;
  box-shadow: 0 2px 8px rgba(146, 64, 14, .18);
  overflow: hidden;
}
.resMainReservationBlock.draggingReservation {
  z-index: 1000 !important;
  pointer-events: none !important;
  opacity: .38;
  outline: 2px solid #111827;
  box-shadow: 0 10px 30px rgba(15,23,42,.28);
}
.resMainReservationBlock.resizingReservation {
  z-index: 1001 !important;
  outline: 2px solid #2563eb;
  box-shadow: 0 10px 28px rgba(37,99,235,.25);
}
.resDraggingSource .resMainReservationBlock {
  opacity: .35;
}
.resDropTarget {
  outline: none;
}
.resDropPreview {
  position: absolute;
  inset: 0 auto auto 0;
  left: 0;
  right: 0;
  z-index: 80;
  pointer-events: none;
  border: 3px solid #2563eb;
  border-radius: 8px;
  background: rgba(37, 99, 235, .10);
  box-sizing: border-box;
}
.resDragGhost {
  position: fixed;
  z-index: 6000;
  width: auto;
  max-width: none;
  pointer-events: none;
  opacity: .94;
  transform: translate(-50%, -50%) scale(.96);
  box-shadow: 0 12px 30px rgba(15,23,42,.25);
  border-radius: 8px;
  overflow: visible;
}
.resDragGhost .resMainReservationBlock {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  width: 100%;
  min-height: 42px;
  height: 100%;
  opacity: 1 !important;
  pointer-events: none !important;
  transform: none !important;
  cursor: grabbing;
}
.resResizeTop { top: -4px !important; }
.resResizeBottom { bottom: -4px !important; }


/* v0.3.87 foglalási blokk alsó élének pontosítása: a magasság a kezdőcella tényleges magasságának többszöröse */
.resMainReservationBlock {
  height: var(--reservation-height, calc(var(--reservation-rows, 1) * 100%)) !important;
}


/* v0.3.87 foglalási naptár pontosítások */
.reservationsMainToolbar {
  justify-content: space-between;
}
.reservationsTablePager {
  flex: 0 1 auto !important;
  justify-content: flex-end !important;
  margin-left: auto !important;
}
.resMainTableButtons {
  flex: 0 0 360px !important;
  width: 360px !important;
  min-width: 0 !important;
  max-width: 42vw !important;
}
.resMainTableBtn {
  min-height: 34px !important;
  padding: 6px 8px !important;
  font-size: 13px !important;
}
.resMainGrid {
  --res-row-height: 46px;
  grid-template-columns: 92px repeat(5, minmax(0, 1fr)) !important;
  min-width: 760px !important;
}
.resMainTimeCell,
.resMainCell,
.resMainCellButton {
  height: var(--res-row-height) !important;
  min-height: var(--res-row-height) !important;
  box-sizing: border-box !important;
}
.resMainTimeCell {
  padding: 0 8px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1px !important;
  line-height: 1.05 !important;
}
.resMainTimeStart {
  display: block;
  font-size: 15px;
  font-weight: 900;
}
.resMainTimeEnd {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(17, 24, 39, .62);
}
.resMainCellButton {
  border-right: 1px solid #e2e8f0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  appearance: none;
  -webkit-appearance: none;
}
.resMainReservationBlock {
  height: var(--reservation-height) !important;
  bottom: auto !important;
}

/* v0.3.136 foglalt cella korvonal a palyafoglalasi cella mintajara */
.resMainReservationBlock {
  left: 2px !important;
  right: 2px !important;
  top: 3px !important;
  height: calc(var(--reservation-height, calc(var(--reservation-rows, 1) * var(--res-row-height, 46px))) - 6px) !important;
  border: 4px solid #f59e0b !important;
  border-radius: 5px !important;
  padding: 7px 10px 8px 10px !important;
  box-shadow: none !important;
}
.resMainReservationBlock.draggingReservation,
.resMainReservationBlock.resizingReservation {
  border-radius: 5px !important;
}
.resDropPreview {
  top: 3px !important;
  left: 2px !important;
  right: 2px !important;
  border: 3px solid #2563eb !important;
  border-radius: 5px !important;
}
.resDragGhost {
  width: auto;
  max-width: none;
  border-radius: 6px;
  overflow: hidden;
}
.resResizeTop { top: -5px !important; }
.resResizeBottom { bottom: -5px !important; }
@media (max-width: 760px) {
  .reservationsMainToolbar { align-items: stretch; }
  .reservationsTablePager { width: 100%; margin-left: 0 !important; }
  .resMainTableButtons { max-width: none !important; width: 100% !important; flex-basis: auto !important; }
  .resMainGrid { grid-template-columns: 76px repeat(5, 130px) !important; min-width: 726px !important; }
  .resMainReservationBlock {
    padding: 6px 8px 8px 10px !important;
  }
  .resMainReservationName,
  .resMainReservationPhone {
    max-width: 100%;
    padding-right: 0;
  }
  .resReservationPersonIcon,
  .resReservationPhoneIcon {
    display: none;
  }
  .resReservationActions {
    right: auto;
    bottom: auto;
    gap: 6px;
    margin-top: 4px;
  }
  .resReservationIconBtn {
    width: 20px;
    height: 20px;
  }
  .resReservationIconBtn svg {
    width: 16px;
    height: 16px;
  }
}

/* v0.3.87 jobb oldali egyszlopos asztalnaptár */
.sideSingleTableCalendar {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.sideSingleTimeHead,
.sideSingleTableHead,
.sideSingleTimeCell,
.sideSingleResCell {
  min-height: 38px;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  box-sizing: border-box;
}
.sideSingleTimeHead,
.sideSingleTableHead {
  background: #f8fafc;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.sideSingleTimeCell {
  background: #f8fafc;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}
.sideSingleResCell {
  width: 100%;
  border-radius: 0;
  padding: 6px 8px;
  text-align: left;
  background: #fff;
  font-weight: 700;
}
.sideSingleResCell.free { color: #4b5563; }
.sideSingleResCell.reserved { background: #ffedd5; color: #111827; }
.sideSingleResCell.reserved span { display: block; font-size: 11px; margin-top: 2px; }
.sideSingleResCell.reservedContinuation { min-height: 38px; }

/* v0.3.88 floorplan table corner layout */
.tableOverlay {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}
.tableCorner {
  position: absolute;
  z-index: 2;
  line-height: 1.05;
  color: #111827;
  text-shadow: 0 1px 0 rgba(255,255,255,.25);
}
.tableCornerTopLeft {
  top: 8px;
  left: 10px;
  font-size: 21px;
  font-weight: 900;
}
.item.tableItem[data-grouped="1"] .tableCornerTopLeft {
  top: 8px;
  left: 9px;
  right: 9px;
  bottom: 27px;
  font-size: 18px;
  line-height: 1.05;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-align: left;
}
.tableCornerTopRight {
  top: 10px;
  right: 10px;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}
.tableCornerBottomLeft {
  left: 10px;
  bottom: 10px;
  font-size: 10px;
  font-weight: 800;
  color: #334155;
}
.tableCornerBottomRight {
  right: 7px;
  bottom: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
}
.tableStatusDot {
  display: inline-block;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.95);
  box-shadow: 0 2px 6px rgba(15,23,42,.38);
  touch-action: manipulation;
}
.tableStatusDot[data-reservation-id],
.tableStatusDot[data-new-reservation-table-id] {
  cursor: pointer;
  pointer-events: auto;
}
.item.tableItem:has(.tableStatusDot[data-reservation-id]:active),
.item.tableItem:has(.tableStatusDot[data-new-reservation-table-id]:active) {
  cursor: pointer;
}
.tableStatusDot.free { background: #16a34a; }
.tableStatusDot.reserved { background: #f59e0b; }
.tableStatusDot.arrived { background: #2563eb; }
.tableStatusDot.blocked { background: #dc2626; }
.tableCenterInfo {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
}
.tableNextGuest {
  width: 100%;
  max-width: 100%;
  line-height: 1.08;
  color: #111827;
}
.tableNextGuestName {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 11px;
  font-weight: 900;
}
.tableGroupTag {
  font-size: 10px;
  font-weight: 800;
  color: #7c2d12;
}
.item.tableItem.table-round .tableCornerTopLeft,
.item.tableItem.round .tableCornerTopLeft {
  top: 11px;
  left: 18px;
  font-size: 18px;
}
.item.tableItem.table-round .tableCornerTopRight,
.item.tableItem.round .tableCornerTopRight {
  top: 12px;
  right: 18px;
}
.item.tableItem.table-round .tableCornerBottomLeft,
.item.tableItem.round .tableCornerBottomLeft {
  left: 18px;
  bottom: 12px;
}
.item.tableItem.table-round .tableCornerBottomRight,
.item.tableItem.round .tableCornerBottomRight {
  right: 18px;
  bottom: 10px;
}
.item.tableItem.table-round .tableCenterInfo,
.item.tableItem.round .tableCenterInfo {
  left: 16px;
  right: 16px;
}

/* v0.3.88 selected table side calendar uses the same reservation grid style */
.tableCalGrid .resMainGrid {
  --res-row-height: 46px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) !important;
  min-width: 0 !important;
  width: 100%;
  border: 0;
}
.tableCalGrid .resMainHead,
.tableCalGrid .resMainCell,
.tableCalGrid .resMainCellButton {
  min-width: 0;
}
.tableCalGrid .resMainTimeHead,
.tableCalGrid .resMainHead {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 42px;
  border-bottom: 1px solid #dbe3ef !important;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px !important;
  line-height: 1.1;
}
.tableCalGrid .resMainTimeHead {
  background: #f59e0b !important;
  color: #ffffff !important;
  font-weight: 900;
  text-align: center;
}
.tableCalGrid .resMainHead {
  background: #0b1f4d !important;
  color: #ffffff !important;
  font-weight: 900;
  text-align: center;
}
.tableCalGrid .resMainHead .resTableNameGroup,
.tableCalGrid .resMainHead .resTableNameBase,
.tableCalGrid .resMainHead .resTableNameDash {
  color: #ffffff !important;
}
.tableCalGrid .resMainCellButton {
  min-height: var(--res-row-height);
  background: #ffffff;
  border-right: 0 !important;
  border-bottom: 1px solid #dbe3ef !important;
  padding: 0 !important;
}
.tableCalGrid .resMainTimeCell {
  min-height: var(--res-row-height);
  background: #fff7cc;
  border-right: 1px solid #dbe3ef;
  border-bottom: 1px solid #dbe3ef;
  padding: 4px 2px;
}
.tableCalGrid .resMainTimeStart {
  font-size: 16px;
  line-height: 1.05;
}
.tableCalGrid .resMainTimeEnd {
  font-size: 11px;
  line-height: 1.05;
}
.tableCalGrid .resMainReservationBlock {
  left: 2px !important;
  right: 2px !important;
  top: 3px !important;
  bottom: auto !important;
  height: calc(var(--reservation-height, calc(var(--reservation-rows, 1) * var(--res-row-height, 46px))) - 6px) !important;
  border-radius: 5px !important;
  border: 4px solid #f59e0b !important;
  background: #ffedd5 !important;
  padding: 7px 10px 8px 10px !important;
  box-shadow: none !important;
}
.tableCalGrid .resMainReservationBlock.draggingReservation,
.tableCalGrid .resMainReservationBlock.resizingReservation {
  border-radius: 5px !important;
}
.tableCalGrid .resResizeTop { top: -5px !important; }
.tableCalGrid .resResizeBottom { bottom: -5px !important; }
.tableCalGrid .resResizeHandle {
  height: 12px;
}
.tableCalGrid .resMainReservationName,
.tableCalGrid .resMainReservationPhone {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tableCalGrid .resCellAvailabilityToggle {
  top: 5px;
  right: 5px;
}
.tableCalGrid .resCellAvailabilityCenter.bookable {
  width: 20px;
  height: 20px;
  font-size: 15px;
}

/* v0.3.90 round-table inner square layout + smaller central text */
.item.tableItem.table-round .tableOverlay,
.item.tableItem.round .tableOverlay {
  inset: 14.5%;
}
.item.tableItem.table-round .tableCenterInfo,
.item.tableItem.round .tableCenterInfo {
  left: 6px;
  right: 6px;
}
.item.tableItem.table-round .tableNextGuestName,
.item.tableItem.round .tableNextGuestName {
  font-size: 9px;
  font-weight: 800;
}
.item.tableItem.table-round .tableCornerTopLeft,
.item.tableItem.round .tableCornerTopLeft {
  top: 2px;
  left: 4px;
  font-size: 15px;
}
.item.tableItem.table-round[data-grouped="1"] .tableCornerTopLeft,
.item.tableItem.round[data-grouped="1"] .tableCornerTopLeft {
  top: 3px;
  left: 5px;
  right: 5px;
  bottom: 23px;
  font-size: 15px;
}
.item.tableItem.table-round .tableCornerTopRight,
.item.tableItem.round .tableCornerTopRight {
  top: 4px;
  right: 4px;
  font-size: 10px;
}
.item.tableItem.table-round .tableCornerBottomLeft,
.item.tableItem.round .tableCornerBottomLeft {
  left: 4px;
  bottom: 3px;
  font-size: 8px;
}
.item.tableItem.table-round .tableCornerBottomRight,
.item.tableItem.round .tableCornerBottomRight {
  right: 4px;
  bottom: 1px;
}

/* v0.3.92 foglalás layer: időtartam + asztalszám egy sorban */
.reservationDurationTableRow {
  align-items: end;
}
.reservationDurationTableRow label {
  margin-bottom: 12px;
}

/* v0.3.94 reservation phone prefix and layer two-column row */
.phonePrefixInput {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0;
  margin-top: 5px;
  border: 1px solid #9ca3af;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}
.phonePrefixInput span {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 10px;
  font-weight: 800;
  color: #111827;
  background: #f8fafc;
  border-right: 1px solid #d1d5db;
}
.phonePrefixInput input {
  border: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  width: 100%;
}
.reservationDurationTableRow {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
}
@media (max-width: 640px) {
  .reservationDurationTableRow {
    grid-template-columns: 1fr;
  }
}

/* v0.3.94: Foglalás layer - Asztal száma / Időtartam azonos szélességben */
.reservationDurationTableRow {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: start !important;
}
.reservationDurationTableRow label {
  display: block !important;
  margin: 0 0 12px 0 !important;
  width: 100% !important;
}
.reservationDurationTableRow input,
.reservationDurationTableRow select {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 36px !important;
  margin-top: 5px !important;
  box-sizing: border-box !important;
}
@media (max-width: 640px) {
  .reservationGuestSeatRow,
  .reservationDurationTableRow {
    grid-template-columns: 1fr !important;
  }
}


/* v0.3.98 foglalhatósági jelölők */
.resMainHead {
  position: relative;
}
.resHeadAvailabilityStatus {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .16);
  cursor: pointer;
  user-select: none;
  z-index: 50;
}
.resHeadAvailabilityStatus.bookable {
  background: #16a34a;
  color: #fff;
}
.resHeadAvailabilityStatus.unbookable {
  background: #dc2626;
  color: #fff;
}
.resMainCellButton {
  position: relative;
}
.resMainCellButton.cellExternallyBlocked:not(.reserved):not(.reservedContinuation) {
  background: #fef2f2 !important;
}
body.reservationDragNoSelect,
body.reservationDragNoSelect * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}
.resMainCellButton.reserved .resCellAvailabilityToggle,
.resMainCellButton.reservedContinuation .resCellAvailabilityToggle,
.resMainCellButton.reserved .resCellAvailabilityCenter,
.resMainCellButton.reservedContinuation .resCellAvailabilityCenter {
  display: none !important;
}
.resCellAvailabilityToggle,
.resCellAvailabilityCenter {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  line-height: 1;
}
.resCellAvailabilityToggle {
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .18);
  cursor: pointer;
  user-select: none;
  z-index: 45;
}
.resCellAvailabilityToggle.bookable {
  background: #16a34a;
  color: #fff;
}
.resCellAvailabilityToggle.unbookable {
  background: #dc2626;
  color: #fff;
}
.resCellAvailabilityCenter.bookable {
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 700;
  background: rgba(22, 163, 74, .16);
  border: 1px solid rgba(22, 163, 74, .28);
  color: rgba(22, 101, 52, .78);
  pointer-events: none;
  z-index: 1;
}
.tableCalGrid .resHeadAvailabilityStatus {
  width: 18px;
  height: 18px;
  font-size: 12px;
}
.tableCalGrid .resCellAvailabilityToggle {
  width: 15px;
  height: 15px;
  font-size: 10px;
}
.tableCalGrid .resCellAvailabilityCenter.bookable {
  width: 18px;
  height: 18px;
  font-size: 12px;
}


/* v0.3.99 mobil Foglalások finomítás */
@media (max-width: 760px) {
  body.reservationsMainMode .reservationsMainToolbar {
    gap: 8px !important;
  }
  body.reservationsMainMode .reservationsTablePager {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 32px repeat(5, minmax(0, 1fr)) 32px !important;
    gap: 4px !important;
    align-items: center !important;
    margin-left: 0 !important;
    flex: 0 0 auto !important;
  }
  body.reservationsMainMode .resMainTableButtons {
    display: contents !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
  }
  body.reservationsMainMode .reservationsTablePager > button,
  body.reservationsMainMode .resMainTableBtn,
  body.reservationsMainMode .resMainTableBtnPlaceholder {
    min-width: 0 !important;
    width: 100% !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 4px 2px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
  }
  body.reservationsMainMode .resMainTimeHead,
  body.reservationsMainMode .resMainTimeCell {
    background: #f8fafc !important;
    opacity: 1 !important;
    z-index: 80 !important;
    box-shadow: 2px 0 0 #e2e8f0, 4px 0 8px rgba(15, 23, 42, .08) !important;
  }
  body.reservationsMainMode .resMainTimeHead {
    z-index: 120 !important;
  }
  body.reservationsMainMode .resMainGrid {
    grid-template-columns: 76px repeat(5, 130px) !important;
    min-width: 726px !important;
  }
}


/* v0.3.100 mobil Foglalások sticky fejlec + Idopont oszlop */
@media (max-width: 760px) {
  body.reservationsMainMode {
    overflow: hidden !important;
    overscroll-behavior: none;
  }
  body.reservationsMainMode .reservationsMainView {
    height: calc(100dvh - 58px);
    min-height: 0;
    overflow: hidden;
  }
  body.reservationsMainMode .resMainCalendar {
    position: relative !important;
    overflow: auto !important;
    overscroll-behavior: none !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    transform: translateZ(0);
  }
  body.reservationsMainMode .resMainGrid {
    position: relative !important;
  }
  body.reservationsMainMode .resMainHead,
  body.reservationsMainMode .resMainTimeHead {
    position: sticky !important;
    top: 0 !important;
    background: #f8fafc !important;
  }
  body.reservationsMainMode .resMainHead {
    z-index: 120 !important;
  }
  body.reservationsMainMode .resMainTimeCell {
    position: sticky !important;
    left: 0 !important;
    background: #f8fafc !important;
    opacity: 1 !important;
    z-index: 110 !important;
    box-shadow: 2px 0 0 #e2e8f0, 4px 0 8px rgba(15, 23, 42, .08) !important;
  }
  body.reservationsMainMode .resMainTimeHead {
    left: 0 !important;
    z-index: 140 !important;
    box-shadow: 2px 0 0 #e2e8f0, 4px 0 8px rgba(15, 23, 42, .08) !important;
  }
}


/* v0.3.101 Foglalások színezés */
body.reservationsMainMode .resMainHead {
  background: #0b1f4d !important;
  color: #ffffff !important;
}
body.reservationsMainMode .resMainTimeCell {
  background: #fff7bf !important;
  color: #111827 !important;
}
body.reservationsMainMode .resMainTimeHead {
  background: #f59e0b !important;
  color: #ffffff !important;
}
@media (max-width: 760px) {
  body.reservationsMainMode .resMainHead {
    background: #0b1f4d !important;
    color: #ffffff !important;
  }
  body.reservationsMainMode .resMainTimeCell {
    background: #fff7bf !important;
    color: #111827 !important;
  }
  body.reservationsMainMode .resMainTimeHead {
    background: #f59e0b !important;
    color: #ffffff !important;
  }
}


/* v0.3.102 mobil vezérlő és foglalhatósági pötty finomítás */
.resCellAvailabilityToggle {
  width: 12px !important;
  height: 12px !important;
  font-size: 8px !important;
  top: 5px !important;
  right: 5px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .10) !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent;
}
.resCellAvailabilityToggle.bookable {
  background: #86efac !important;
  color: rgba(255,255,255,.96) !important;
}
.resCellAvailabilityToggle.unbookable {
  background: #fca5a5 !important;
  color: rgba(255,255,255,.96) !important;
}
.tableCalGrid .resCellAvailabilityToggle {
  width: 11px !important;
  height: 11px !important;
  font-size: 7px !important;
}

@media (max-width: 760px) {
  .resCellAvailabilityToggle {
    z-index: 80 !important;
  }

  .mobileZoomPanel {
    grid-template-columns: 38px 38px 58px 82px !important;
    gap: 4px !important;
    padding: 6px 6px !important;
  }

  .mobileZoomPanel button {
    min-height: 36px !important;
    padding: 4px 3px !important;
    font-size: 12px !important;
    line-height: 1.05 !important;
  }

  #mobileZoomOut,
  #mobileZoomIn {
    font-size: 22px !important;
  }

  #mobileZoomFit {
    font-size: 10px !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  #mobilePanToggle,
  #mobileEditToggle {
    font-size: 12px !important;
    white-space: normal !important;
  }
}


/* v0.3.103 mobil Mozgat/Szerkeszt külön gombok + Foglalások ikon kattintás */
.resCellAvailabilityCenter.bookable {
  pointer-events: auto !important;
  cursor: pointer;
  touch-action: manipulation;
}

@media (max-width: 760px) {
  .mobileZoomPanel {
    grid-template-columns: 36px 36px 60px 1fr 1fr !important;
    gap: 4px !important;
    padding: 6px 6px !important;
  }

  .mobileZoomPanel button {
    min-height: 36px !important;
    padding: 4px 4px !important;
    font-size: 11px !important;
    line-height: 1.05 !important;
  }

  #mobileZoomOut,
  #mobileZoomIn {
    font-size: 21px !important;
    padding: 0 !important;
  }

  #mobileZoomFit {
    white-space: normal !important;
    word-break: break-word !important;
    font-size: 10px !important;
  }

  #mobilePanToggle,
  #mobileEditToggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    font-weight: 800 !important;
    white-space: normal !important;
    border-width: 1px !important;
    text-align: center !important;
    line-height: 1.08 !important;
    min-height: 42px !important;
    font-size: 10px !important;
  }

  #mobilePanToggle.active,
  #mobileEditToggle.active {
    background: #fef3c7 !important;
    color: #111827 !important;
    border-color: #f59e0b !important;
    opacity: 1 !important;
  }

  #mobilePanToggle.inactive,
  #mobileEditToggle.inactive {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border-color: #d1d5db !important;
    opacity: 1 !important;
  }
}


/* v0.3.104 mobil Alaprajz: nagyobb Teljes nézet, Nézet gombsor rejtés, mentés az alaprajz alatt */
@media (max-width: 760px) {
  body:not(.reservationsMainMode) .mobileZoomPanel {
    grid-template-columns: 34px 34px 90px 1fr 1fr !important;
    gap: 4px !important;
    padding: 6px 6px !important;
  }

  body:not(.reservationsMainMode) #mobileZoomFit {
    min-width: 90px !important;
    min-height: 42px !important;
    font-size: 12px !important;
    line-height: 1.05 !important;
    padding: 5px 4px !important;
  }

  body:not(.reservationsMainMode) .layout {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
  }

  body:not(.reservationsMainMode) .canvasWrap {
    order: 1 !important;
  }

  body:not(.reservationsMainMode) .panel {
    order: 2 !important;
    border-left: 0 !important;
    border-top: 1px solid #d1d5db !important;
  }

  body:not(.reservationsMainMode) .zoomPanelBlock h2,
  body:not(.reservationsMainMode) .zoomPanelBlock .viewControls {
    display: none !important;
  }

  body:not(.reservationsMainMode) .zoomPanelBlock {
    display: block !important;
    padding: 10px 12px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
  }

  body:not(.reservationsMainMode) #btnSave.rightSaveBtn {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    min-height: 42px !important;
    font-size: 15px !important;
  }
}


/* v0.3.105 mobil Alaprajz: mentés közvetlenül az alaprajz alatt, stabil felső gombsor */
.mobileSaveUnderCanvas {
  display: none;
}

@media (max-width: 760px) {
  body:not(.reservationsMainMode) .mobileZoomPanel {
    display: grid !important;
    position: sticky !important;
    top: 58px !important;
    z-index: 4600 !important;
  }

  body.reservationsMainMode .mobileZoomPanel {
    display: none !important;
  }

  body:not(.reservationsMainMode) .layout {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
  }

  body:not(.reservationsMainMode) .canvasWrap {
    order: 1 !important;
    height: 58vh !important;
    max-height: 58vh !important;
    min-height: 360px !important;
    margin: 0 !important;
  }

  body:not(.reservationsMainMode) .mobileSaveUnderCanvas {
    order: 2 !important;
    display: block !important;
    padding: 8px 10px 6px !important;
    margin: 0 !important;
    background: #f3f4f6 !important;
    border-top: 1px solid #d1d5db !important;
  }

  body:not(.reservationsMainMode) #mobileBtnSaveFloorplan {
    display: block !important;
    width: 100% !important;
    min-height: 44px !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    border-radius: 10px !important;
  }

  body:not(.reservationsMainMode) .panel {
    order: 3 !important;
    border-left: 0 !important;
    border-top: 1px solid #d1d5db !important;
  }

  body:not(.reservationsMainMode) .zoomPanelBlock {
    display: none !important;
  }

  body:not(.reservationsMainMode) #btnSave.rightSaveBtn {
    display: none !important;
  }
}


/* v0.3.106 mobil Alaprajz: nincs nagy hézag az alaprajz és a mentés gomb között */
@media (max-width: 760px) {
  body:not(.reservationsMainMode) .canvasWrap {
    order: 1 !important;
    position: relative !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    padding: 8px !important;
    margin: 0 !important;
    overflow: auto !important;
    background: #f8fafc !important;
  }

  body:not(.reservationsMainMode) .canvasWrap #stageShell {
    position: absolute !important;
    left: 8px !important;
    top: 8px !important;
    margin: 0 !important;
  }

  body:not(.reservationsMainMode) .canvasWrap #scaledCanvasSize {
    position: relative !important;
    display: block !important;
    left: auto !important;
    top: auto !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: -1 !important;
  }

  body:not(.reservationsMainMode) .mobileSaveUnderCanvas {
    order: 2 !important;
    display: block !important;
    padding: 6px 10px 2px !important;
    margin: 0 !important;
    background: #f3f4f6 !important;
    border-top: 1px solid #d1d5db !important;
  }

  body:not(.reservationsMainMode) .panel {
    padding-top: 3px !important;
    border-top: 0 !important;
  }

  body:not(.reservationsMainMode) #sideEditorPanel {
    margin-top: 0 !important;
  }
}

@media (max-width: 760px) {
  body.reservationLayerOpen {
    overflow: hidden !important;
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
  }
  .reservationLayer {
    position: fixed !important;
    inset: 0 !important;
    width: 100dvw !important;
    max-width: 100dvw !important;
    height: var(--reservation-layer-height, 100dvh) !important;
    max-height: var(--reservation-layer-height, 100dvh) !important;
  }
  .reservationLayerDialog {
    position: fixed !important;
    top: 8px !important;
    right: 8px !important;
    bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
  }
  .reservationLayerDialog .reservationDurationTableRow {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* v0.3.181 mobil: a felső étterem/menu sáv mindig a képernyő tetején marad */
@media (max-width: 760px) {
  :root {
    --mobile-topbar-height: 58px;
  }

  body {
    padding-top: 0 !important;
  }

  .topbar.topbarOneLine {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-height: var(--mobile-topbar-height) !important;
    z-index: 7600 !important;
    transform: translateZ(0);
    will-change: transform;
  }

  .mobileTopMenu {
    position: fixed !important;
    top: calc(var(--mobile-topbar-height) + 8px) !important;
  }

  body:not(.reservationsMainMode) .mobileZoomPanel {
    top: var(--mobile-topbar-height) !important;
  }

  body.reservationLayerOpen {
    padding-top: 0 !important;
  }

  body.reservationLayerOpen .reservationLayer {
    z-index: 9000 !important;
  }

  .settingsPageMain {
    margin-top: var(--mobile-topbar-height) !important;
  }

  body.reservationsMainMode .reservationsMainView {
    margin-top: var(--mobile-topbar-height) !important;
    height: calc(100dvh - var(--mobile-topbar-height)) !important;
  }

  body:not(.settingsPage):not(.reservationsMainMode) .canvasWrap {
    height: var(--mobile-canvas-height, auto) !important;
    max-height: var(--mobile-canvas-height, none) !important;
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 4px !important;
  }

  body:not(.settingsPage):not(.reservationsMainMode) .canvasWrap #stageShell {
    top: var(--mobile-stage-top, 70px) !important;
  }

  body:not(.settingsPage):not(.reservationsMainMode) .canvasWrap #scaledCanvasSize {
    margin-bottom: 0 !important;
  }
}

/* v0.3.160 mobil Foglalások: szélesebb időpont és asztaloszlopok */
@media (max-width: 760px) {
  body.reservationsMainMode .resMainGrid {
    grid-template-columns: 86px repeat(5, 142px) !important;
    min-width: 796px !important;
  }
}

/* v0.3.161 mobil Foglalások: nagyobb időtartam-húzó felületek */
@media (max-width: 760px) {
  body.reservationsMainMode .resMainReservationBlock {
    padding-top: 14px !important;
    padding-bottom: 22px !important;
  }
  body.reservationsMainMode .resResizeHandle {
    left: 0 !important;
    right: 0 !important;
    height: 12px !important;
    z-index: 8 !important;
    touch-action: none !important;
  }
  body.reservationsMainMode .resResizeTop {
    top: 0 !important;
  }
  body.reservationsMainMode .resResizeBottom {
    bottom: 0 !important;
  }
  body.reservationsMainMode .resResizeTop::before,
  body.reservationsMainMode .resResizeBottom::before {
    width: 46px !important;
    height: 2.4px !important;
    margin-top: 3px !important;
    background: rgba(120, 53, 15, .16) !important;
  }
  body.reservationsMainMode .resResizeBottom::before {
    margin-top: 6px !important;
  }
}

/* Desktop Foglalások: nagyobb felső/alsó megfogási sáv */
@media (min-width: 761px) {
  body.reservationsMainMode .resResizeHandle {
    height: 13px !important;
    z-index: 12 !important;
  }
  body.reservationsMainMode .resResizeTop {
    top: -7px !important;
  }
  body.reservationsMainMode .resResizeBottom {
    bottom: -7px !important;
  }
}

/* v0.3.181 Foglalások: fejlécsor magasság és függőleges középre igazítás */
body.reservationsMainMode .resMainHead,
body.reservationsMainMode .resMainTimeHead {
  min-height: 52px !important;
  height: 52px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.08 !important;
}

body.reservationsMainMode .resMainTimeHead {
  text-align: center !important;
  padding: 0 !important;
  place-items: center !important;
}

body.reservationsMainMode .resMainHead {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

body.reservationsMainMode .resTableNameWrap {
  align-self: center !important;
}

body.reservationsMainMode .resTableNameGroup {
  align-items: center !important;
  align-content: center !important;
}

@media (max-width: 760px) {
  body.reservationsMainMode .resMainHead,
  body.reservationsMainMode .resMainTimeHead {
    min-height: 46px !important;
    height: 46px !important;
  }

  body.reservationsMainMode .resMainHead {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }
}

/* v0.3.181 mobil menügomb: pontosan középre igazított, rajzolt ikon */
@media (max-width: 760px) {
  .topbar-right > .mobileMenuButton {
    position: relative !important;
    width: 42px !important;
    height: 38px !important;
    min-width: 42px !important;
    padding: 0 !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    overflow: hidden !important;
  }

  .topbar-right > .mobileMenuButton::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 19px;
    height: 14px;
    transform: translate(-50%, -50%);
    background:
      linear-gradient(#111827, #111827) center 0 / 19px 2.2px no-repeat,
      linear-gradient(#111827, #111827) center 6px / 19px 2.2px no-repeat,
      linear-gradient(#111827, #111827) center 12px / 19px 2.2px no-repeat;
    border-radius: 2px;
  }
}
