/* ── Палитра: слоновая кость, эвкалипт, шампанское ── */
:root {
  --paper: #faf7f1;
  --paper-deep: #f1ece2;
  --ink: #2d2a25;
  --ink-soft: #7a7468;
  --line: #e2dbcd;
  --green: #4a6b57;
  --green-deep: #3a5645;
  --green-tint: #e3ebe5;
  --gold: #c1a05e;
  --gold-tint: #f3ead7;
  --rose: #b0604f;
  --hold: #8a6fb0;
  --hold-tint: #ece6f3;
  --white: #fffdf9;
  --shadow: 0 2px 10px rgba(45, 42, 37, 0.08);
  --shadow-lift: 0 8px 30px rgba(45, 42, 37, 0.18);
  --font-display: "Cormorant", "Georgia", serif;
  --font-ui: "Golos Text", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--paper);
  display: flex;
  flex-direction: column;
}

/* ── Шапка ── */
.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.topbar-title h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.topbar-sub {
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
}

.topbar-stats {
  margin-left: auto;
  display: flex;
  gap: 22px;
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.topbar-stats b {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.topbar-stats .stat-accent b { color: var(--green); }
.topbar-stats .stat-held b { color: var(--hold); }

.topbar-actions { display: flex; gap: 8px; }

/* индикатор синхронизации */
.sync {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.sync::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line);
}
.sync-ok::before { background: var(--green); }
.sync-busy::before { background: var(--gold); }
.sync-offline::before, .sync-error::before { background: var(--rose); }
.sync-view::before { background: var(--hold); }
.sync[hidden] { display: none; }

/* ── Кнопки ── */
.btn {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.btn:hover { border-color: var(--gold); background: var(--gold-tint); }
.btn:focus-visible, .search:focus-visible, .btn-close:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.btn-primary:hover { background: var(--green-deep); border-color: var(--green-deep); }

.btn-small { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn:disabled:hover { border-color: var(--line); background: var(--white); }

.btn-danger { color: var(--rose); }
.btn-danger:hover { border-color: var(--rose); background: #f7ece9; }

/* ── Основная сетка ── */
.layout {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* ── План зала ── */
.hall-wrap {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* ── Панель над планом ── */
.hall-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 22px;
  font-size: 13px;
  color: var(--ink-soft);
}

.view-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}
.view-btn {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border: none;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
}
.view-btn + .view-btn { border-left: 1px solid var(--line); }
.view-btn.is-active { background: var(--green); color: var(--white); }
.view-btn:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--ink);
}
.toggle input { accent-color: var(--green); width: 15px; height: 15px; }

.seats-ctl { display: inline-flex; align-items: center; gap: 6px; }

.hall-hint {
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
  margin-top: -6px;
}
.hint-list { display: none; }
body.view-list .hint-list { display: block; }
body.view-list .hint-plan { display: none; }

/* ── Вид «Список» ── */
.hall-list {
  display: none;
  width: 100%;
  max-width: 820px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}
body.view-list .hall-list { display: grid; }
body.view-list .hall-scroll,
body.view-list .hall-legend { display: none; }

.list-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: border-color 0.12s, background 0.12s, transform 0.12s;
}
.list-card[draggable="true"] { cursor: grab; }
.list-card.dragging { opacity: 0.45; }
.list-card.drag-over {
  border-color: var(--green);
  background: var(--green-tint);
  transform: scale(1.02);
}
.list-card.kind-head, .list-card.kind-reserve { background: var(--paper); }
.list-card.search-hit { border-color: var(--gold); background: var(--gold-tint); }
.list-card.search-miss { opacity: 0.4; }
.list-handle { color: var(--line); font-size: 14px; letter-spacing: -2px; width: 12px; }
.list-num {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  min-width: 42px;
  color: var(--ink);
}
.list-card.kind-head .list-num, .list-card.kind-reserve .list-num { font-size: 13px; min-width: 0; }
.list-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-meta { font-size: 11px; color: var(--ink-soft); }

/* Масштаб плана: 1 см исходной схемы = var(--u) px.
   Все элементы зала позиционируются в сантиметрах через calc(). */
.hall {
  --u: 46px;
  --hall-w: 17;
  --hall-h: 22.9;
  position: relative;
  width: calc(var(--hall-w) * var(--u));
  height: calc(var(--hall-h) * var(--u));
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  flex-shrink: 0;
}

.hall-side-label {
  position: absolute;
  top: calc(0.55 * var(--u));
  width: calc(6.5 * var(--u));
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.side-bride { left: calc(0.1 * var(--u)); }
.side-groom { right: calc(0.1 * var(--u)); }

/* Танцпол — паркет между внутренними рядами, перед сценой */
.dancefloor {
  position: absolute;
  left: calc(6.15 * var(--u));
  top: calc(3.4 * var(--u));
  width: calc(4.7 * var(--u));
  height: calc(15.2 * var(--u));
  border: 2px solid var(--gold);
  border-radius: 12px;
  background:
    repeating-linear-gradient(45deg,
      #f6efdf 0px, #f6efdf 14px,
      #efe5cd 14px, #efe5cd 28px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dancefloor span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--gold);
  letter-spacing: 0.14em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* Сцена — полукруг у нижней стены */
.stage {
  position: absolute;
  left: calc(6.4 * var(--u));
  top: calc(19.35 * var(--u));
  width: calc(4.2 * var(--u));
  height: calc(1.95 * var(--u));
  border: 2px solid var(--ink-soft);
  border-bottom: none;
  border-radius: calc(1.1 * var(--u)) calc(1.1 * var(--u)) 0 0;
  background: var(--paper-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stage span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Нижняя стена зала */
.wall {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(21.3 * var(--u));
  border-top: 2px solid var(--ink);
}

/* Вход — дверь в нижней стене, слева */
.entrance {
  position: absolute;
  left: calc(4.5 * var(--u));
  top: calc(21.3 * var(--u));
  width: calc(1.7 * var(--u));
  height: calc(1.0 * var(--u));
  margin-top: -1px;
  border: 2px solid var(--ink);
  border-top-color: var(--white);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ── Стол на плане ── */
.table-spot {
  position: absolute;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  translate: -50% -50%;
  width: calc(2.4 * var(--u));
  height: calc(2.4 * var(--u));
  touch-action: none;
  cursor: grab;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-ui);
}

.table-circle {
  position: absolute;
  inset: calc(0.4 * var(--u));
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.table-spot:hover .table-circle,
.table-spot:focus-visible .table-circle {
  border-color: var(--green);
  box-shadow: var(--shadow);
  transform: scale(1.04);
}
.table-spot:focus-visible { outline: none; }

/* перетаскивание на плане */
.table-spot.dragging { z-index: 10; cursor: grabbing; }
.table-spot.dragging .table-circle {
  box-shadow: var(--shadow-lift);
  transform: scale(1.06);
  transition: none;
}
.table-spot.swap-target .table-circle {
  border-color: var(--green);
  border-style: dashed;
  box-shadow: 0 0 0 5px rgba(74, 107, 87, 0.2);
}

/* заполненность подсвечивает круг */
.table-spot.fill-some .table-circle { background: var(--green-tint); border-color: #b8cbbd; }
.table-spot.fill-full .table-circle { background: var(--green); border-color: var(--green); }
.table-spot.fill-full .table-num,
.table-spot.fill-full .table-label,
.table-spot.fill-full .table-count { color: var(--white); }

.table-num {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.table-label {
  font-size: 12px;
  font-weight: 600;
  max-width: 68px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}

.table-count {
  font-size: 11px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* Стол молодожёнов — прямоугольный, на 2 места, у верхней стены */
.table-spot.kind-head {
  width: calc(3.2 * var(--u));
  height: calc(1.7 * var(--u));
}
.table-spot.kind-head .table-circle {
  inset: calc(0.45 * var(--u)) calc(0.25 * var(--u)) calc(0.1 * var(--u));
  border-radius: 10px;
  border-color: var(--gold);
  flex-direction: row;
  gap: 8px;
}
.table-spot.kind-head .table-num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.table-spot.kind-head .table-label { display: none; }

/* Резервный стол — пунктирный контур */
.table-spot.kind-reserve .table-circle { border-style: dashed; }
.table-spot.kind-reserve .table-label { display: none; }
.table-spot.kind-reserve .table-num { font-size: 11px; font-weight: 600; }

/* точки-места вокруг стола */
.seat-dot {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--paper-deep);
  border: 1.5px solid var(--line);
  transform: translate(-50%, -50%);
  transition: background 0.15s, border-color 0.15s;
}

.seat-dot.taken {
  background: var(--gold);
  border-color: #a8894c;
}
.seat-dot.held {
  background: var(--hold);
  border-color: #6f5691;
}

.seat-dot:hover {
  transform: translate(-50%, -50%) scale(1.45);
  border-color: var(--green);
}

/* ── Всплывающая подсказка ── */
.tooltip {
  position: fixed;
  z-index: 60;
  max-width: 240px;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  line-height: 1.4;
  padding: 7px 11px;
  border-radius: 8px;
  box-shadow: var(--shadow-lift);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 9px));
  white-space: pre-line;
}
.tooltip b {
  display: block;
  font-size: 13px;
}
.tooltip .tooltip-soft { opacity: 0.7; }
.tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--ink);
  border-bottom: none;
}
.tooltip[hidden] { display: none; }

/* подсветка результатов поиска */
.table-spot.search-hit .table-circle {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(176, 96, 79, 0.18);
}
.table-spot.search-miss { opacity: 0.35; }

/* легенда */
.hall-legend {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: var(--ink-soft);
}
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.dot {
  width: 11px; height: 11px; border-radius: 50%; display: inline-block;
}
.dot-free { background: var(--paper-deep); border: 1.5px solid var(--line); }
.dot-taken { background: var(--gold); border: 1.5px solid #a8894c; }
.dot-held { background: var(--hold); border: 1.5px solid #6f5691; }

/* ── Боковая панель ── */
.sidebar {
  width: 320px;
  flex-shrink: 0;
  border-left: 1px solid var(--line);
  background: var(--white);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sidebar-head {
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.sidebar-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  margin-bottom: 10px;
}

.search {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}
.search::placeholder { color: var(--ink-soft); }

.table-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.table-card {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-ui);
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.table-card:hover { background: var(--paper); border-color: var(--line); }
.table-card:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.table-card.search-hit { background: var(--gold-tint); border-color: var(--gold); }
.table-card.search-miss { opacity: 0.4; }

.card-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.card-num {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.card-name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.card-dots {
  display: flex;
  gap: 4px;
  margin-top: 7px;
}
.card-dots i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--paper-deep);
  border: 1px solid var(--line);
}
.card-dots i.taken { background: var(--gold); border-color: #a8894c; }
.card-dots i.held { background: var(--hold); border-color: #6f5691; }

.card-guests {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.card-guests mark {
  background: var(--gold-tint);
  color: var(--ink);
  border-radius: 3px;
  padding: 0 2px;
}

/* ── Модальное окно ── */
.modal-overlay[hidden] { display: none; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 42, 37, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal {
  width: 440px;
  max-width: 100%;
  max-height: calc(100vh - 40px);
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lift);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 10px;
}
.modal-head > div { flex: 1; min-width: 0; }

.modal-num {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 2px;
}

.table-name-input {
  width: 100%;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  border: none;
  border-bottom: 1.5px dashed var(--line);
  background: none;
  padding: 2px 0 4px;
}
.table-name-input:focus {
  outline: none;
  border-bottom-color: var(--green);
}
.table-name-input::placeholder {
  color: var(--ink-soft);
  opacity: 0.5;
  font-size: 18px;
  font-family: var(--font-ui);
  font-weight: 400;
}

.btn-close {
  border: none;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  align-self: flex-start;
}
.btn-close:hover { color: var(--ink); background: var(--paper); }

.modal-occupancy {
  padding: 0 20px 12px;
  font-size: 12px;
  color: var(--ink-soft);
}
.modal-occupancy b { color: var(--green); }
.modal-occupancy .held-text { color: var(--hold); }

.modal-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 0 20px 10px;
  font-size: 12px;
  color: var(--ink-soft);
}
.seat-count { display: inline-flex; align-items: center; gap: 6px; }
.seat-count b { min-width: 20px; text-align: center; font-size: 14px; color: var(--ink); }
.hold-fill { display: inline-flex; gap: 6px; flex: 1; min-width: 220px; }
.hold-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
}
.hold-input:focus { outline: none; border-color: var(--hold); background: var(--white); }

.modal-msg {
  margin: 0 20px 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f7ece9;
  color: var(--rose);
  font-size: 12px;
}
.modal-msg[hidden] { display: none; }
.modal-hint { padding: 0 20px 6px; font-size: 11px; color: var(--ink-soft); opacity: 0.8; }

.seat-rows {
  overflow-y: auto;
  padding: 4px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.seat-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.seat-row-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.seat-row-num[draggable="true"] { cursor: grab; }
.seat-row.filled .seat-row-num {
  background: var(--gold);
  border-color: #a8894c;
  color: var(--white);
}
.seat-row.held .seat-row-num {
  background: var(--hold);
  border-color: #6f5691;
  color: var(--white);
}
.seat-row.held .seat-input { background: var(--hold-tint); border-color: #cfc3e0; }
.seat-row.dragging { opacity: 0.45; }
.seat-row.drag-over .seat-input { border-color: var(--green); box-shadow: 0 0 0 3px rgba(74, 107, 87, 0.18); }

.hold-btn {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.hold-btn:hover { border-color: var(--hold); color: var(--hold); }
.hold-btn.is-on { background: var(--hold); border-color: var(--hold); color: var(--white); }

.seat-input {
  flex: 1;
  font-family: var(--font-ui);
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}
.seat-input:focus {
  outline: none;
  border-color: var(--green);
  background: var(--white);
}
.seat-input::placeholder { color: var(--ink-soft); opacity: 0.55; }

.modal-foot {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
}

/* ── Код доступа / история ── */
.modal-narrow { width: 380px; }
.modal-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
}
.key-body { padding: 0 20px 8px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--ink-soft); }
.key-body .seat-input { font-size: 15px; }
.key-body .modal-msg { margin: 0; }
.key-body .modal-msg:empty { display: none; }

.history-list { overflow-y: auto; padding: 4px 20px 16px; display: flex; flex-direction: column; gap: 4px; }
.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
}
.history-row:hover { background: var(--paper); }
.history-row.is-current { background: var(--green-tint); }
.history-ver { font-weight: 600; min-width: 34px; font-variant-numeric: tabular-nums; }
.history-when { color: var(--ink-soft); min-width: 92px; }
.history-taken { color: var(--ink-soft); flex: 1; }
.history-cur { font-size: 11px; color: var(--green); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.history-empty { padding: 10px; font-size: 13px; color: var(--ink-soft); }

/* ── Всплывающее сообщение ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 70;
  max-width: min(560px, calc(100vw - 32px));
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  line-height: 1.4;
  box-shadow: var(--shadow-lift);
}
.toast-error { background: var(--rose); }
.toast[hidden] { display: none; }

/* ── Адаптив ── */
@media (max-width: 1100px) {
  .layout { flex-direction: column; overflow-y: auto; }
  .hall-wrap { overflow: visible; max-width: 100%; }
  .hall-scroll { max-width: 100%; overflow-x: auto; padding-bottom: 6px; }
  .sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--line);
  }
  .table-list { max-height: none; }
}

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .topbar-stats { margin-left: 0; width: 100%; order: 3; }
  .hall { --u: 36px; }
  .table-label { max-width: 52px; font-size: 11px; }
  .table-num { font-size: 9px; }
  .table-count { font-size: 10px; }
  .dancefloor span { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
