/* ═══════════════════════════════════════════════
   THE CLOUD — Booking Mini App — style.css
   ═══════════════════════════════════════════════ */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-bg:       #080c14;
  --c-bg2:      #0d1220;
  --c-glass:    rgba(255,255,255,.06);
  --c-glass2:   rgba(255,255,255,.10);
  --c-border:   rgba(255,255,255,.10);
  --c-border2:  rgba(255,255,255,.18);
  --c-text:     #e8eaf0;
  --c-sub:      rgba(232,234,240,.55);
  --c-accent:   #c9a84c;
  --c-gold:     #c9a84c;
  --c-green:    #34d399;
  --c-amber:    #fbbf24;
  --c-red:      #f87171;
  --c-blue:     #60a5fa;

  --r-card:     20px;
  --r-pill:     50px;
  --r-chip:     14px;

  --tbl-free-bg:   #1b2748;
  --tbl-free-brd:  #1b2748;
  --tbl-pend:   #b8942e;
  --tbl-busy-bg:   #6b1535;
  --tbl-busy-brd:  #8b1a42;
  --tbl-sel:    #b8942e;

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top,    0px);
}

html { height: 100%; height: -webkit-fill-available; }
body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100dvh;
  height: -webkit-fill-available;
  overflow: hidden;
  position: relative;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

/* ── Ambient orbs ── */
.orbs { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(55px); opacity: .28; will-change: transform; }
.o1 { width: 320px; height: 320px; background: radial-gradient(circle, #8b7323, transparent); top: -80px; left: -60px; animation: drift 20s ease-in-out infinite; }
.o2 { width: 260px; height: 260px; background: radial-gradient(circle, #6b4f1d, transparent); bottom: 60px; right: -50px; animation: drift 16s ease-in-out infinite reverse; }
.o3 { width: 220px; height: 220px; background: radial-gradient(circle, #0e7490, transparent); top: 40%; left: 30%; animation: drift 24s ease-in-out infinite 5s; }
@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(16px,-24px) scale(1.06); }
  66%      { transform: translate(-16px,16px) scale(.94); }
}

/* ── App shell ── */
.app {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  height: 100dvh;
  height: -webkit-fill-available;
  padding-top: max(0px, var(--safe-t));
}

/* ── Top bar ── */
.topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px 6px;
  border-bottom: 1px solid var(--c-border);
  background: rgba(8,12,20,.6);
  backdrop-filter: blur(20px);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
/* Photo background variant (screen 0) */
.topbar--hero {
  background: url('/static/img/venue1.jpg') center 15% / cover no-repeat;
  border-bottom: 1px solid rgba(201,168,76,.25);
}
.topbar--hero::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(8,12,20,.72);
  backdrop-filter: blur(4px);
  z-index: 0;
}
.topbar--hero > * { position: relative; z-index: 1; }
/* Location pin next to hint */
.topbar-location-link {
  display: inline-flex; text-decoration: none;
  margin-left: 6px; font-size: 13px;
  transition: opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.topbar-location-link:active { opacity: .6; }
.topbar-hint { font-size: 11px; color: var(--c-sub); display: inline-flex; align-items: center; }
.topbar-left  { flex: 1; display: flex; align-items: center; gap: 6px; }
.topbar-mid   { flex: 0; display: flex; flex-direction: column; align-items: center; white-space: nowrap; gap: 1px; }
.topbar-name  { font-size: 15px; font-weight: 700; letter-spacing: 2.5px; color: #c9a84c; display: inline-flex; align-items: center; gap: 4px; }
.topbar-cloud-svg { width: 22px; height: 14px; flex-shrink: 0; }
.topbar-hint  { font-size: 11px; color: var(--c-sub); }
.topbar-right { flex: 1; display: flex; align-items: center; justify-content: flex-end; }
.step-pips { display: flex; gap: 5px; }
.pip { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.2); transition: all .3s; }
.pip.active { background: var(--c-accent); box-shadow: 0 0 8px var(--c-accent); }

.floor-section-lbl {
  position: absolute;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: rgba(251,191,36,.7);
  pointer-events: none;
  transform: translateY(-50%);
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.floor-section-lbl--vertical {
  font-size: 11px;
  letter-spacing: 2px;
  transform: translateX(-50%) translateY(-50%) rotate(-90deg);
}

/* ── Vietnam clock ── */
.vn-clock { display: flex; align-items: center; gap: 4px; }
.vn-clock-time  { font-size: 12px; font-weight: 700; color: var(--c-sub); font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.vn-clock-label { font-size: 10px; color: var(--c-sub); letter-spacing: .6px; text-transform: uppercase; opacity: .7; }

/* ── Venue info bar ── */
.venue-info-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 12px; border-radius: 10px; margin-bottom: 10px;
  background: rgba(201,168,76,.08); border: 1px solid rgba(201,168,76,.2);
  font-size: 12px; color: var(--c-sub);
}
.vi-item { color: var(--c-text); font-weight: 500; }
.vi-sep { opacity: .35; }
.vi-location {
  display: inline-flex; align-items: center; gap: 3px;
  text-decoration: none; color: var(--c-text);
  border-bottom: 1px dashed rgba(201,168,76,.6); padding-bottom: 1px;
  transition: opacity .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.vi-location:active { opacity: .65; }

/* ── Big Menu Button ── */
.menu-big-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 14px; margin-bottom: 8px;
  background: linear-gradient(135deg, rgba(245,197,66,.13) 0%, rgba(251,191,36,.06) 100%);
  border: 1px solid rgba(245,197,66,.42);
  text-decoration: none; color: var(--c-gold);
  box-shadow: 0 2px 12px rgba(245,197,66,.08);
  transition: transform .2s cubic-bezier(0.34, 1.56, 0.64, 1), background .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.menu-big-btn:active { transform: scale(.97); background: rgba(245,197,66,.2); box-shadow: 0 0 20px rgba(245,197,66,.18); }
.menu-big-btn-icon { font-size: 26px; flex-shrink: 0; }
.menu-big-btn-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.menu-big-btn-title { font-size: 15px; font-weight: 700; letter-spacing: .2px; color: var(--c-gold); }
.menu-big-btn-sub { font-size: 11px; color: rgba(245,197,66,.65); letter-spacing: .2px; }
.menu-big-btn-arr { opacity: .6; flex-shrink: 0; color: var(--c-gold); }

/* ── Happy Hours banner ── */
.happy-banner {
  border-radius: 14px; margin-bottom: 16px; overflow: hidden;
  background: linear-gradient(135deg, rgba(245,158,11,.12) 0%, rgba(239,68,68,.10) 100%);
  border: 1px solid rgba(245,158,11,.35);
}
.hb-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(245,158,11,.2);
}
.hb-fire { font-size: 18px; }
.hb-title {
  flex: 1; font-size: 13px; font-weight: 800; letter-spacing: 1.5px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hb-time { font-size: 11px; color: var(--c-amber); font-weight: 600; }
.hb-rows { padding: 8px 14px 10px; display: flex; flex-direction: column; gap: 8px; }
.hb-row { display: flex; align-items: center; gap: 10px; }
.hb-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.hb-text { display: flex; justify-content: space-between; flex: 1; align-items: center; gap: 8px; }
.hb-name { font-size: 13px; color: var(--c-text); }
.hb-price { font-size: 13px; color: var(--c-amber); white-space: nowrap; }
.hb-price s { color: var(--c-sub); text-decoration-color: rgba(248,113,113,.7); margin-right: 3px; font-weight: 400; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--c-glass); border: 1px solid var(--c-border);
  color: var(--c-text); display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: transform .18s cubic-bezier(0.34, 1.56, 0.64, 1), background .15s;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:active { background: var(--c-glass2); transform: scale(.86); }

/* ── Language toggle ── */
.lang-toggle-btn {
  font-size: 14px; font-weight: 700; letter-spacing: .3px;
  padding: 6px 14px; border-radius: 20px;
  background: rgba(201,168,76,.08);
  border: 1px solid rgba(201,168,76,.4);
  color: var(--c-text);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color .18s, background .18s, transform .15s;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.5;
}
.lang-toggle-btn:active {
  background: rgba(201,168,76,.22);
  border-color: var(--c-accent);
  transform: scale(.92);
}

/* ── Views ── */
#booking-view  { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
#staff-view    { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
#regulars-view { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
#admin-view    { flex: 1; overflow: hidden; display: flex; flex-direction: column; }

/* ── Screens ── */
.screens { flex: 1; display: flex; overflow: hidden; position: relative; }
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transform: translateX(100%);
  /* transitions driven by JS inline styles — no CSS transition here */
  will-change: transform, opacity;
  overflow: hidden;
}
/* Screen 0 is active from HTML — no JS animation needed on first load */
.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
.scroller {
  flex: 1; overflow-y: auto;
  padding: 16px 14px calc(16px + 70px + var(--safe-b));
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
#s2 .scroller {
  padding-bottom: 16px; /* submit button is inside scroller on Screen 2 */
}
.scroller::-webkit-scrollbar { display: none; }

/* ── Custom scroll indicator (полупрозрачный ползунок справа) ── */
.scroll-track {
  position: absolute; right: 3px; top: 56px; bottom: 90px;
  width: 4px; border-radius: 4px;
  background: rgba(255,255,255,.06);
  z-index: 50; pointer-events: none;
  opacity: 0; transition: opacity .4s ease;
}
.scroll-track.visible { opacity: 1; }
.scroll-thumb {
  width: 100%; border-radius: 4px;
  background: rgba(201,168,76,.45);
  box-shadow: 0 0 6px rgba(201,168,76,.35);
  min-height: 28px;
  transition: height .1s ease-out, top .1s ease-out;
  position: absolute; top: 0;
}

/* ── Gradient fade hint at bottom (градиент-подсказка внизу) ── */
.scroll-fade {
  position: absolute; bottom: 70px; left: 0; right: 0;
  height: 50px; pointer-events: none; z-index: 40;
  background: linear-gradient(to top, rgba(8,12,20,.85), transparent);
  transition: opacity .5s ease;
}
.scroll-fade.hidden { opacity: 0; }

.screen-foot {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 12px 14px calc(12px + var(--safe-b));
  background: linear-gradient(to top, rgba(8,12,20,.97) 65%, transparent);
  transition: opacity .2s ease, visibility .2s ease;
}

/* ── Keyboard open: hide footer & fade so inputs stay visible ── */
.kbd-open .screen-foot  { opacity: 0; visibility: hidden; pointer-events: none; }
.kbd-open .scroll-fade  { opacity: 0 !important; }
.kbd-open .tab-bar      { display: none; }
.kbd-open .scroller     { padding-bottom: 32px; }

/* apply touch-action to all interactive elements — removes 300ms tap delay everywhere */
button, .tappable, .seg-btn, .chip, .time-chip, .tbl, .pill, .icon-btn, .sc-btn, .tab {
  touch-action: manipulation;
}
/* ── Segments ── */
.seg { display: flex; gap: 6px; }
.seg-btn {
  flex: 1; padding: 11px 4px; border-radius: 10px; font-size: 13px; font-weight: 500;
  background: var(--c-glass); border: 1px solid var(--c-border);
  color: var(--c-sub); cursor: pointer;
  transition: transform .18s cubic-bezier(0.34, 1.56, 0.64, 1), background .2s, color .2s, box-shadow .2s;
  white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.seg-btn:active { transform: scale(.93); }
.seg-btn.active {
  background: var(--c-accent); border-color: var(--c-accent);
  color: #fff; box-shadow: 0 0 16px rgba(201,168,76,.5); transform: scale(1.0);
}

/* ── Labels ── */
.sec-label {
  font-size: 10.5px; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--c-sub); margin-bottom: 8px; font-weight: 600;
}
.sec-label.mt, .mt { margin-top: 20px; }

/* ── Glass rows ── */
.glass-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-radius: var(--r-card);
  background: var(--c-glass); border: 1px solid var(--c-border);
  backdrop-filter: blur(16px);
  transition: background .15s, border-color .15s;
}
.glass-row.tappable:active { background: var(--c-glass2); transform: scale(.985); transition-duration: .1s; }
.glass-row-sm {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 14px; border-radius: 10px;
  background: #131929; border: 1px solid rgba(255,255,255,.12);
  font-size: 12px; color: var(--c-sub); margin-bottom: 12px;
}
.row-icon { font-size: 18px; }
.row-label { flex: 1; font-size: 14px; color: var(--c-text); }
.row-chev  { opacity: .5; flex-shrink: 0; }
.tappable { cursor: pointer; }
#date-row { position: relative; overflow: hidden; }
.date-hidden {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; pointer-events: auto;
  font-size: 0;
}
.sep { opacity: .35; }

/* ── Custom calendar (desktop fallback) ── */
.custom-cal {
  margin-top: 8px;
  background: rgba(30, 34, 46, 0.97);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: calFadeIn .22s ease-out;
}
@keyframes calFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.custom-cal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.custom-cal-title {
  font-size: 15px; font-weight: 700; color: var(--c-text);
}
.custom-cal-nav {
  background: none; border: none; color: var(--c-text); font-size: 16px;
  padding: 6px 12px; cursor: pointer; border-radius: 8px;
  transition: background .15s;
}
.custom-cal-nav:hover { background: rgba(255,255,255,.08); }
.custom-cal-nav:disabled { opacity: .25; cursor: not-allowed; }
.custom-cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; font-size: 12px; font-weight: 600;
  color: var(--c-sub); margin-bottom: 6px; gap: 2px;
}
.custom-cal-days {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px; text-align: center;
}
.custom-cal-days .cd-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 14px; font-weight: 500;
  color: var(--c-text); cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.custom-cal-days .cd-cell:hover:not(.cd-disabled):not(.cd-empty) {
  background: rgba(255,255,255,.1);
}
.custom-cal-days .cd-cell.cd-today {
  background: rgba(96, 165, 250, .22);
  color: #60a5fa; font-weight: 700;
}
.custom-cal-days .cd-cell.cd-selected {
  background: var(--c-accent) !important;
  color: #fff !important; font-weight: 700;
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(201,168,76,.5);
}
.custom-cal-days .cd-cell.cd-disabled {
  opacity: .22; cursor: default; text-decoration: line-through;
}
.custom-cal-days .cd-cell.cd-empty {
  cursor: default;
}
.custom-cal-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.custom-cal-reset {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: var(--c-sub); font-size: 13px; font-weight: 600;
  padding: 8px 18px; border-radius: 20px; cursor: pointer;
  transition: background .15s;
}
.custom-cal-reset:hover { background: rgba(255,255,255,.12); }
.custom-cal-ok {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--c-accent); border: none;
  color: #fff; font-size: 20px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 2px 12px rgba(201,168,76,.4);
}
.custom-cal-ok:hover { transform: scale(1.08); box-shadow: 0 4px 18px rgba(201,168,76,.55); }
.custom-cal-ok:disabled { opacity: .35; cursor: not-allowed; transform: none; }

/* ── Time grid ── */
.time-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.time-chip {
  padding: 11px 4px; text-align: center; border-radius: 12px;
  font-size: 13px; font-weight: 500;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
  color: #e8eaf5; cursor: pointer;
  transition: transform .18s cubic-bezier(0.34, 1.56, 0.64, 1), background .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.time-chip.sel { background: linear-gradient(135deg, rgba(212,180,74,0.9), rgba(184,148,46,0.9)); border-color: rgba(255,255,255,.2); color: #fff; box-shadow: 0 4px 16px rgba(201,168,76,.4); transform: scale(1.04); font-weight: 600; }
.time-chip:active:not(:disabled) { transform: scale(.93); }
.time-chip:disabled, .time-chip.taken { opacity: .28; cursor: not-allowed; text-decoration: line-through; color: var(--c-sub); }
.time-chip.past { opacity: .32; cursor: not-allowed; color: var(--c-sub); background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.06); font-style: italic; }
.muted-text { font-size: 13px; color: var(--c-sub); text-align: center; }

/* Screen 1 (date/time) — darker background for better readability */
#s1 { background: #02040a; }
#s1 .scroller { background: #02040a; }
#s1 .glass-row { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.16); }
#s1 .glass-row-sm { background: #0b1022; border-color: rgba(255,255,255,.14); }
#s1 p.sec-label { color: rgba(200,210,255,.65); }

/* Screen 2 (booking form / confirm) — darker background */
#s2 { background: #02040a; }
#s2 .scroller { background: #02040a; }
#s2 .glass-row-sm { background: #0b1022; border-color: rgba(255,255,255,.14); }
#s2 .glass-card { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); }
#s2 p.sec-label { color: rgba(200,210,255,.65); }
#s2 .chip { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.18); }
#s2 .guests-section { background: rgba(201,168,76,.06); border-color: rgba(201,168,76,.22); }
#s2 .guests-section .chip { border-color: rgba(201,168,76,.3); }
#s2 .screen-foot { background: linear-gradient(to top, #02040a 65%, transparent); }

/* ── Submit button inside scroller (Screen 2) ── */
.submit-area {
  padding: 18px 0 calc(32px + var(--safe-b));
  text-align: center;
}
.submit-area .pill {
  width: 100%;
}
.submit-area .foot-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--c-sub);
}

/* ── Main tabs (Столы онлайн / The Cloud) ── */
.main-tabs {
  display: flex; gap: 0; flex-shrink: 0;
  background: rgba(8,12,20,.85);
  border-bottom: 1px solid var(--c-border);
}
.main-tab {
  flex: 1; padding: 7px 8px; font-size: 12.5px; font-weight: 700;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--c-sub); cursor: pointer; text-align: center;
  transition: color .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: .3px;
  white-space: nowrap;
}
.main-tab.active {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
}
.main-tab:active { opacity: .7; }

/* ── Main tab body containers ── */
.main-tab-body {
  display: flex; flex-direction: column; flex: 1; overflow: hidden;
}

/* ── Floor tabs (1 этаж / 2 этаж) ── */
.floor-tabs {
  display: flex; gap: 4px; padding: 6px; flex-shrink: 0;
  background: rgba(255,255,255,.05);
  border-radius: 20px;
  margin: 8px 12px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.floor-tab {
  flex: 1; padding: 8px 6px; border-radius: 14px; font-size: 13px; font-weight: 600;
  background: transparent; border: none;
  color: var(--c-sub); cursor: pointer; text-align: center;
  transition: all .25s ease-out;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: .3px;
}
.floor-tab.active {
  background: rgba(201,168,76,.15);
  color: var(--c-accent); box-shadow: 0 4px 12px rgba(0,0,0,.15);
  font-weight: 700;
}
.floor-tab:active { transform: scale(.95); }

/* ── Deposit hint (between floors & tables) ── */
.deposit-hint {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin: 0 12px 4px; padding: 0;
  font-size: 11px; color: var(--c-sub); opacity: .65;
  flex-shrink: 0;
}
.dep-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  background: var(--c-amber); box-shadow: 0 0 4px var(--c-amber);
}

/* ── Floor swipe container ── */
.floor-swipe {
  flex: 1; overflow: hidden; position: relative;
  touch-action: pan-y;
}
.floor-swipe-track {
  display: flex; width: 200%;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.floor-swipe-track.no-transition { transition: none; }
.floor-swipe-page {
  width: 50%; overflow-x: hidden; overflow-y: visible;
  display: flex; flex-direction: column;
}
.floor-swipe-page .floor-wrap {
  display: flex; flex-direction: column;
  overflow: visible; border-radius: 0; margin: 0;
}
.floor-swipe-page .floor-map {
  /* removed min-height */
}
.floor-swipe-page .floor-map-bg {
  width: 100%; display: block;
}

/* ── Static footer (not absolute, for tables tab) ── */
.screen-foot--static {
  flex-shrink: 0;
  padding: 4px 14px calc(4px + var(--safe-b));
  background: linear-gradient(to top, rgba(8,12,20,.97) 65%, transparent);
}
/* When admin tab-bar is visible, reduce floor padding */
body.staff-mode .floor-wrap {
  padding: 2px 4px;
}
body.staff-mode .floor-label-top,
body.staff-mode .floor-label-bot {
  display: none;
}
body.staff-mode .topbar {
  padding: 4px 14px 4px;
}
body.staff-mode .vn-clock {
  display: none;
}
body.staff-mode .topbar-hint {
  font-size: 9px;
}
body.staff-mode .main-tab {
  padding: 5px 8px;
  font-size: 12px;
}
body.staff-mode .floor-tab {
  padding: 4px 6px;
  font-size: 11px;
}
body.staff-mode .screen-foot--static {
  padding: 3px 14px calc(3px + var(--safe-b));
}

/* ── Info scroller (The Cloud tab) ── */
.info-scroller {
  flex: 1; overflow-y: auto;
  padding: 14px 14px calc(20px + var(--safe-b));
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.info-scroller::-webkit-scrollbar { display: none; }

/* ── Floor plan ── */
.floor-wrap {
  background: transparent;
  border: none;
  border-radius: 0; padding: 6px 6px; overflow: visible;
}
.floor-label-top, .floor-label-bot {
  text-align: center; font-size: 8px; letter-spacing: 1.8px;
  text-transform: uppercase; color: rgba(200,210,230,.35); padding: 2px 0; font-weight: 700;
}
.floor-stairs-wrap {
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.floor-stairs-wrap svg { flex-shrink: 0; opacity: .85; }
/* ── Hall tab buttons (full-width, above/below floor plan) ── */
.hall-tab-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 14px 8px;
  border-radius: 12px;
  font-size: 14px; font-weight: 600;
  background: var(--c-glass);
  border: 1px solid var(--c-border);
  color: var(--c-sub);
  cursor: pointer;
  transition: transform .18s cubic-bezier(0.34,1.56,0.64,1), background .2s, color .2s, box-shadow .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  letter-spacing: .3px;
}
.hall-tab-btn:active { transform: scale(.97); }
.hall-tab-btn.active {
  background: var(--c-accent); border-color: var(--c-accent);
  color: #fff; box-shadow: 0 0 16px rgba(201,168,76,.5);
  border-radius: 12px 12px 0 0;
}
.hall-tab-btn[data-hall="second"] {
  margin-top: 0;
  background: rgba(201,168,76,.15);
  border-color: rgba(201,168,76,.4);
  color: rgba(245,197,66,.85);
  font-weight: 600;
  border-radius: 0 0 12px 12px;
}
.floor-grid {
  display: grid; gap: 8px;
  justify-items: stretch; align-items: center;
  padding: 4px 0;
}
.tbl {
  width: 100%; min-width: 52px; height: 58px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; border: none; position: relative;
  transition: all .2s ease;
  user-select: none;
}
.tbl-num  { font-size: 12px; font-weight: 800; line-height: 1; letter-spacing: .3px; }
.tbl-cap  { font-size: 9px; opacity: .65; line-height: 1; }
.tbl-status { font-size: 8px; font-weight: 600; line-height: 1; letter-spacing: .2px; opacity: .85; margin-top: 1px; }
.tbl.free .tbl-status   { color: rgba(120,160,220,.7); }
.tbl.pending .tbl-status { color: rgba(220,195,130,.8); }
.tbl.busy .tbl-status   { color: rgba(220,150,165,.7); }
.tbl.available_limited .tbl-status { color: rgba(130,200,150,.8); }
/* Remaining time on live tables */
.tbl-remain {
  font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
  line-height: 1; letter-spacing: .3px; margin-top: 2px;
  padding: 2px 7px; border-radius: 6px;
  background: rgba(0,0,0,.4);
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.tbl-remain-amber { color: var(--c-amber); }
.tbl-remain-red   { color: var(--c-red); animation: blink-red .8s ease-in-out infinite; }
@keyframes blink-red { 0%,100% { opacity:.95; } 50% { opacity:.35; } }

/* ── Table occupancy progress bar (left→right full fill) ── */
.tbl-progress-wrap {
  position: absolute; inset: 0;
  border-radius: inherit;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}
.tbl-progress-bar {
  height: 100%;
  border-radius: inherit;
  transition: width 1s linear;
  will-change: width;
  opacity: .32;
}
.tbl-progress-bar.prog-green  { background: var(--c-green); }
.tbl-progress-bar.prog-amber  { background: var(--c-amber); }
.tbl-progress-bar.prog-red    { background: var(--c-red);
  animation: prog-pulse 1.2s ease-in-out infinite;
}
@keyframes prog-pulse {
  0%,100% { opacity: .25; }
  50%     { opacity: .12; }
}
/* Make text sit above the fill overlay */
.tbl-pin .tbl-num,
.tbl-pin .tbl-cap,
.tbl-pin .tbl-status,
.tbl-pin .tbl-remain,
.tbl-pin .tbl-dep-dot,
.tbl-pin .tbl-vip-crown { position: relative; z-index: 2; }
/* Pulsing glow border on table when time is critical (<10 min) */
.tbl-time-critical {
  animation: tbl-glow-critical 1.5s ease-in-out infinite !important;
}
@keyframes tbl-glow-critical {
  0%,100% { box-shadow: 0 0 0 0 rgba(248,113,113,0); }
  50%     { box-shadow: 0 0 12px 3px rgba(248,113,113,.55), inset 0 0 8px rgba(248,113,113,.15); }
}
.tbl-time-warning {
  animation: tbl-glow-warning 2s ease-in-out infinite !important;
}
@keyframes tbl-glow-warning {
  0%,100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); }
  50%     { box-shadow: 0 0 8px 2px rgba(251,191,36,.35); }
}

/* ── Progress bar inside occupied staff cards (left→right fill) ── */
.occ-progress-wrap {
  position: absolute; inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.occ-progress-bar {
  height: 100%;
  border-radius: inherit;
  transition: width 1s linear;
  will-change: width;
  opacity: .18;
}
.occ-card .sc-top { position: relative; z-index: 1; }

.tbl-dep-dot {
  position: absolute; top: 4px; right: 4px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-amber);
  box-shadow: 0 0 4px var(--c-amber);
}

.tbl-vip-crown {
  position: absolute; top: 3px; left: 4px;
  font-size: 11px; line-height: 1;
  filter: drop-shadow(0 0 3px rgba(255,200,50,.7));
}

/* Guest name on occupied table tiles (live view) */
.tbl-guest-name {
  font-size: 10px;
  line-height: 1.1;
  color: rgba(255,255,255,.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  position: relative;
  z-index: 2;
  margin-top: 1px;
  letter-spacing: .01em;
  font-weight: 600;
}

/* ── Occupied tables tab (staff panel) ── */
.occ-table-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  font-size: 14px; font-weight: 900;
  background: var(--c-glass); border: 1px solid var(--c-border2); color: var(--c-text);
}
.occ-table-badge.status-pending  { background: rgba(168,85,247,.2); border-color: rgba(168,85,247,.55); color: #e9d5ff; }
.occ-table-badge.status-en_route { background: rgba(139,92,246,.2); border-color: rgba(139,92,246,.55); color: #e9d5ff; }
.occ-table-badge.status-confirmed { background: rgba(107,21,53,.25); border-color: rgba(139,26,66,.45); color: #fecdd3; }
.occ-hall-label { font-size: 11px; color: var(--c-sub); margin-top: 2px; }
.occ-remain {
  font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--c-text); letter-spacing: .2px;
}
.tbl-section {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--c-sub);
  padding: 8px 0 4px; text-align: center;
  border-top: 1px solid var(--c-border);
}

/* FREE — dark navy rect, white text (exactly like Poster empty tables) */
.tbl.free {
  background: linear-gradient(145deg, #1f2a48, #182236);
  color: rgba(255,255,255,.95);
  box-shadow: 4px 4px 10px rgba(0,0,0,.35), -2px -2px 6px rgba(255,255,255,.05), inset 0 1px 1px rgba(255,255,255,.1);
}
.tbl.free:hover {
  background: linear-gradient(145deg, #243255, #1c2740);
  box-shadow: 5px 5px 12px rgba(0,0,0,.4), -2px -2px 8px rgba(255,255,255,.08), inset 0 1px 1px rgba(255,255,255,.15);
}
.tbl.free:active { transform: scale(.93); transition-duration: .1s; box-shadow: inset 2px 2px 5px rgba(0,0,0,.3); }

/* AVAILABLE_LIMITED — soft green (free but has upcoming booking, > 1h left) */
.tbl.available_limited {
  background: linear-gradient(145deg, #1e3a2d, #142a1e);
  color: rgba(255,255,255,.95);
  box-shadow: 4px 4px 10px rgba(0,0,0,.35), -2px -2px 6px rgba(255,255,255,.05), inset 0 1px 1px rgba(255,255,255,.1), 0 0 0 1.5px rgba(74,180,120,.45);
}
.tbl.available_limited:hover {
  box-shadow: 5px 5px 12px rgba(0,0,0,.4), -2px -2px 8px rgba(255,255,255,.08), inset 0 1px 1px rgba(255,255,255,.15), 0 0 0 2px rgba(74,180,120,.6);
}

/* PENDING — soft golden/amber (awaiting confirmation) */
.tbl.pending {
  background: linear-gradient(145deg, #453b23, #362d18);
  color: rgba(255,255,255,.95);
  box-shadow: 4px 4px 10px rgba(0,0,0,.35), -2px -2px 6px rgba(255,255,255,.05), inset 0 1px 1px rgba(255,255,255,.1), 0 0 0 1.5px rgba(200,165,60,.5);
  animation: pulse-pend 3s ease-in-out infinite;
}

/* EN_ROUTE — soft purple (guest on their way) */
.tbl.en_route {
  background: linear-gradient(145deg, #2d1b4e, #241340);
  color: rgba(255,255,255,.95);
  box-shadow: 4px 4px 10px rgba(0,0,0,.35), -2px -2px 6px rgba(255,255,255,.05), inset 0 1px 1px rgba(255,255,255,.1), 0 0 0 1.5px rgba(139,92,246,.5);
  cursor: not-allowed;
  animation: pulse-enroute 3s ease-in-out infinite;
}
.tbl.en_route .tbl-status { color: rgba(233,213,255,.8); }

/* BUSY/CONFIRMED — soft deep rosewood */
.tbl.busy {
  background: linear-gradient(145deg, #451b2e, #361421);
  color: rgba(255,210,220,.85);
  box-shadow: 4px 4px 10px rgba(0,0,0,.35), -2px -2px 6px rgba(255,255,255,.05), inset 0 1px 1px rgba(255,255,255,.1), 0 0 0 1.5px rgba(180,40,70,.4);
  cursor: not-allowed;
  animation: pulse-busy 3.5s ease-in-out infinite;
}

/* GUEST BUSY - Make occupied tables brighter and clearer for guests */
.tbl.guest-busy {
  background: linear-gradient(145deg, #d32f2f, #b71c1c) !important; /* Bright red gradient */
  color: #fff !important;
  border: 2px solid #ff5252 !important; /* Distinct bright border */
  box-shadow: 0 0 12px rgba(255, 82, 82, 0.4) !important;
  opacity: 1 !important;
  animation: pulse-guest-busy 2s infinite !important;
}

@keyframes pulse-guest-busy {
  0% { box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(255, 82, 82, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 82, 82, 0); }
}

/* SELECTED — purple, clearly different from both free and busy */
.tbl.selected {
  background: linear-gradient(145deg, #7c3aed, #5b21b6);
  color: #fff;
  box-shadow: 0 4px 20px rgba(109,40,217,.6), 0 0 0 2.5px rgba(230,220,255,.7), inset 0 1px 2px rgba(255,255,255,.3);
  transform: translate(-50%, -50%) scale(1.08) !important;
  z-index: 10;
}
  color: #fff;
  box-shadow: 0 0 0 3px rgba(124,58,237,.85), 0 6px 20px rgba(109,40,217,.65);
  transform: scale(1.08);
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .2s;
}

@keyframes pulse-pend {
  0%,100% { box-shadow: 0 0 0 1.5px rgba(200,165,60,.5), 0 3px 10px rgba(200,165,60,.2); }
  50%      { box-shadow: 0 0 0 3px rgba(200,165,60,.55), 0 3px 14px rgba(200,165,60,.3); }
}
@keyframes pulse-enroute {
  0%,100% { box-shadow: 0 0 0 1.5px rgba(139,92,246,.5), 0 3px 10px rgba(139,92,246,.2); }
  50%      { box-shadow: 0 0 0 3px rgba(139,92,246,.55), 0 3px 14px rgba(139,92,246,.3); }
}
@keyframes pulse-busy {
  0%,100% { box-shadow: 0 2px 8px rgba(90,20,45,.35); }
  50%      { box-shadow: 0 2px 8px rgba(90,20,45,.35), 0 0 12px rgba(110,25,55,.35); }
}
/* Table size variants based on capacity */
.tbl-sz-sm { height: 44px; }                        /* 2 чел — маленький */
/* default .tbl height = 58px — 4 чел — средний */
.tbl-sz-lg { height: 80px; }                        /* 6 чел — большой */

/* Visual row gap on 2nd floor */
.tbl-row-gap { height: 10px; }

.tbl-empty { width: 100%; min-width: 52px; height: 52px; }

/* Legend */
.legend { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 0; padding: 2px 10px; flex-shrink: 0; }
.leg-item { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--c-sub); }
.led { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.led.free { background: #1a2440; box-shadow: 0 0 0 1.5px rgba(255,255,255,.25), 0 0 6px rgba(100,130,220,.25); }
.led.available_limited { background: #2a5a3a; box-shadow: 0 0 5px rgba(74,180,120,.35); }
.led.pend { background: #8a7030; box-shadow: 0 0 5px rgba(200,165,60,.45); }
.led.enroute { background: #6d4fa9; box-shadow: 0 0 5px rgba(139,92,246,.45); }
.led.busy { background: #5a1830; box-shadow: 0 0 5px rgba(90,20,45,.5); }

.sel-badge-wrap { min-height: 32px; margin-top: 10px; }
.sel-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(129,140,248,.18); border: 1px solid rgba(129,140,248,.4);
  border-radius: 50px; padding: 6px 14px; font-size: 13px; color: #c7d2fe;
}

/* ── Guest banner ── */
.guest-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px; margin-bottom: 4px;
  background: rgba(245,197,66,.08); border: 1px solid rgba(245,197,66,.3);
}
.guest-badge { font-size: 20px; flex-shrink: 0; }
.guest-found-name { font-size: 14px; font-weight: 600; color: var(--c-gold); }
.guest-visits-text { font-size: 11px; color: var(--c-sub); margin-top: 1px; }

/* ── Chips ── */
.chip-row { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; }
.chip {
  padding: 16px 4px; border-radius: var(--r-chip); text-align: center;
  font-size: 18px; font-weight: 700;
  background: #131929; border: 2px solid rgba(255,255,255,.18);
  color: var(--c-sub); cursor: pointer;
  transition: transform .18s cubic-bezier(0.34, 1.56, 0.64, 1), background .15s, box-shadow .15s, color .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.chip:active { transform: scale(.87); }
.chip.sel {
  background: rgba(201,168,76,.2); border-color: var(--c-accent);
  color: var(--c-accent); box-shadow: 0 0 16px rgba(201,168,76,.35); transform: scale(1.06);
}

/* ── Guests section wrapper ── */
.guests-section {
  background: rgba(201,168,76,.06);
  border: 1.5px solid rgba(201,168,76,.22);
  border-radius: 16px;
  padding: 14px 14px 16px;
  margin-top: 20px;
}
.guests-section .sec-label { margin-top: 0 !important; }
.guests-label {
  font-size: 14px !important;
  letter-spacing: .5px !important;
  text-transform: none !important;
  color: rgba(201,168,76,.85) !important;
  margin-bottom: 12px !important;
}
/* Pulse border when no chip selected */
.guests-section:not(:has(.chip.sel)) {
  animation: guestsPulse 2s ease-in-out infinite;
}
@keyframes guestsPulse {
  0%, 100% { border-color: rgba(201,168,76,.22); box-shadow: none; }
  50% { border-color: rgba(201,168,76,.55); box-shadow: 0 0 12px rgba(201,168,76,.15); }
}

/* ── Input card ── */
.glass-card {
  background: rgba(19, 25, 41, 0.65); border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r-card); overflow: hidden;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.irow { display: flex; align-items: center; gap: 10px; padding: 13px 14px; }
.irow-ta { align-items: flex-start; padding-top: 14px; }
.iicon { font-size: 17px; width: 24px; text-align: center; flex-shrink: 0; }
.ifield { flex: 1; background: transparent; border: none; outline: none; color: var(--c-text); font-size: 16px; font-family: inherit; min-width: 0; }
.ifield::placeholder { color: rgba(232,234,240,.28); }
.ifield:focus { color: #fff; }
.itextarea { resize: none; line-height: 1.55; font-size: 16px; }
.idiv { height: 1px; background: var(--c-border); margin: 0 14px; }
.glass-card:has(.ifield:focus) { border-color: rgba(201,168,76,.5); box-shadow: 0 0 0 3px rgba(201,168,76,.12); transition: border-color .2s, box-shadow .2s; }

/* ── Pills ── */
.pill {
  display: block; width: 100%; padding: 14px; border-radius: var(--r-pill);
  font-size: 16px; font-weight: 600; letter-spacing: .2px;
  border: none; cursor: pointer;
  transition: transform .18s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow .18s ease, opacity .15s ease, filter .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.pill.primary {
  background: linear-gradient(135deg, rgba(212,180,74,0.95), rgba(184,148,46,0.95));
  color: #fff;
  box-shadow: 0 8px 24px rgba(201,168,76,.3), 0 1px 0 rgba(255,255,255,.25) inset;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.pill.primary:active { transform: scale(.96); box-shadow: 0 4px 12px rgba(201,168,76,.25); }
@media (hover: hover) { .pill.primary:not(:disabled):hover { filter: brightness(1.08); box-shadow: 0 10px 28px rgba(201,168,76,.4); } }
.pill.primary:disabled {
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.25);
  box-shadow: none; cursor: not-allowed; transform: none;
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.pill.ghost {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); 
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--c-text); box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.pill.ghost:active { transform: scale(.96); background: var(--c-glass2); }
.foot-note { text-align: center; font-size: 11.5px; color: var(--c-sub); margin-top: 8px; }

/* ── Success screen ── */
#s3 { background: var(--c-bg); }  /* solid bg so previous screen never shows through */
#s3 .scroller { background: var(--c-bg); }

.success-wrap {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 20px calc(90px + var(--safe-b)); min-height: 100%;
  text-align: center;
}
.success-blob {
  position: relative; width: 110px; height: 110px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 24px;
  flex-shrink: 0;
}
.blob-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--c-green); animation: ring-expand 1.2s ease-out forwards;
}
@keyframes ring-expand { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.1); opacity: .3; } }
.blob-icon {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(52,211,153,.15); border: 2px solid var(--c-green);
  display: flex; align-items: center; justify-content: center; color: var(--c-green);
  box-shadow: 0 0 30px rgba(52,211,153,.3);
}
.done-title {
  font-size: 26px; font-weight: 700; margin-bottom: 8px;
  color: var(--c-text); line-height: 1.2;
}
.done-sub {
  font-size: 14px; color: var(--c-sub); margin-bottom: 20px;
  text-align: center; line-height: 1.5;
}
.done-card {
  width: 100%; padding: 16px 18px; line-height: 2.0;
  font-size: 14px; color: var(--c-sub);
  background: var(--c-glass);
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  margin-bottom: 20px;
  text-align: left;
}
.done-card b { color: var(--c-text); font-weight: 600; }

/* ── Staff panel ── */
.staff-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 6px; border-bottom: 1px solid var(--c-border);
}
.staff-title { font-size: 16px; font-weight: 700; }
.staff-sub   { font-size: 12px; color: var(--c-sub); margin-top: 2px; }
.staff-filters { display: flex; gap: 8px; padding: 10px 14px 6px; }
.staff-filters .seg-btn { flex: none; padding: 8px 16px; }

/* ── Pending sub-tabs (day / night) ── */
.pending-subtabs {
  display: flex; gap: 6px; padding: 4px 14px 6px;
}
.subtab-btn {
  flex: 1; padding: 7px 4px; border-radius: 8px; font-size: 12px; font-weight: 600;
  background: var(--c-glass); border: 1px solid var(--c-border);
  color: var(--c-sub); cursor: pointer;
  transition: transform .18s cubic-bezier(0.34,1.56,0.64,1), background .2s, color .2s, box-shadow .2s;
  white-space: nowrap; -webkit-tap-highlight-color: transparent;
  text-align: center;
}
.subtab-btn:active { transform: scale(.93); }
.subtab-btn.active {
  background: rgba(168,85,247,.22); border-color: rgba(168,85,247,.5);
  color: #c084fc; box-shadow: 0 0 10px rgba(168,85,247,.25);
}
.subtab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(168,85,247,.7); color: #fff; font-size: 9px; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
  margin-left: 4px; vertical-align: middle;
}
.staff-list { flex: 1; overflow-y: auto; padding: 6px 14px calc(16px + var(--safe-b)); -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
.staff-list::-webkit-scrollbar { display: none; }

/* Admin panel scroll container */
#admin-panel-staff { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
#admin-panel-staff::-webkit-scrollbar { display: none; }

/* Regulars panels — fill all available height */
#reg-panel-guests    { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
#reg-panel-blacklist { flex: 1; overflow: hidden; display: flex; flex-direction: column; }

/* Regulars list — flex column with gap between cards */
#regulars-list { display: flex; flex-direction: column; gap: 10px; }

.staff-card {
  background: var(--c-glass); border: 1px solid var(--c-border);
  border-radius: 14px; padding: 14px; margin-bottom: 10px; transition: border-color .2s;
}
.staff-card.status-pending   { border-color: rgba(168,85,247,.55); box-shadow: 0 0 0 1px rgba(168,85,247,.2), 0 4px 16px rgba(168,85,247,.18); animation: pulse-pend-card 2.2s ease-in-out infinite; }
.staff-card.status-en_route  { border-color: rgba(139,92,246,.55); box-shadow: 0 0 0 1px rgba(139,92,246,.2), 0 4px 16px rgba(139,92,246,.18); animation: pulse-enroute-card 2.2s ease-in-out infinite; }
.staff-card.status-confirmed { border-color: rgba(139,26,66,.45); }
.staff-card.status-cancelled { border-color: rgba(248,113,113,.35); opacity: .55; }
@keyframes pulse-pend-card {
  0%,100% { box-shadow: 0 0 0 1px rgba(168,85,247,.2), 0 4px 14px rgba(168,85,247,.15); }
  50%      { box-shadow: 0 0 0 2px rgba(168,85,247,.45), 0 4px 22px rgba(168,85,247,.35); }
}
@keyframes pulse-enroute-card {
  0%,100% { box-shadow: 0 0 0 1px rgba(139,92,246,.2), 0 4px 14px rgba(139,92,246,.15); }
  50%      { box-shadow: 0 0 0 2px rgba(139,92,246,.45), 0 4px 22px rgba(139,92,246,.35); }
}

.sc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.sc-name { font-size: 15px; font-weight: 600; }
.sc-status { font-size: 11px; padding: 3px 9px; border-radius: 20px; font-weight: 600; }
.sc-status.pending   { background: rgba(168,85,247,.22); color: #c084fc; }
.sc-status.en_route  { background: rgba(139,92,246,.22); color: #a78bfa; }
.sc-status.confirmed { background: rgba(139,26,66,.18);  color: #fecdd3; }
.sc-status.cancelled { background: rgba(248,113,113,.2); color: var(--c-red);   }
.sc-status-pulse { animation: pulse-amber 1.6s ease-in-out infinite; }
@keyframes pulse-amber {
  0%,100% { box-shadow: 0 0 0 0 rgba(251,191,36,.5); }
  50%      { box-shadow: 0 0 0 5px rgba(251,191,36,0); }
}
/* Badge inside filter button */
.filter-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-red); color: #fff; font-size: 9px; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
  margin-left: 5px; vertical-align: middle;
  box-shadow: 0 0 6px var(--c-red);
}

/* Pending countdown timer */
.sc-countdown {
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 2px 8px; border-radius: 20px; letter-spacing: .5px;
}
.sc-countdown-green  { background: rgba(52,211,153,.15);  color: var(--c-green); }
.sc-countdown-amber  { background: rgba(251,191,36,.18);  color: var(--c-amber); }
.sc-countdown-red    { background: rgba(248,113,113,.2);  color: var(--c-red); animation: pulse-red 1s ease-in-out infinite; }
.sc-countdown-expired{ background: rgba(248,113,113,.3);  color: var(--c-red); font-style: italic; }
@keyframes pulse-red {
  0%,100% { box-shadow: 0 0 0 0 rgba(248,113,113,.5); }
  50%      { box-shadow: 0 0 0 4px rgba(248,113,113,0); }
}
.sc-meta { font-size: 12px; color: var(--c-sub); line-height: 1.6; }
.sc-meta b { color: var(--c-text); }
.sc-actions { display: flex; gap: 8px; margin-top: 10px; }
.sc-btn {
  flex: 1; padding: 11px; border-radius: 10px; font-size: 13px; font-weight: 600;
  border: none; cursor: pointer;
  transition: transform .18s cubic-bezier(0.34, 1.56, 0.64, 1), background .15s;
  -webkit-tap-highlight-color: transparent;
}
.sc-btn:active:not(:disabled) { transform: scale(.91); }
.sc-btn.confirm { background: rgba(52,211,153,.15); color: var(--c-green); border: 1px solid rgba(52,211,153,.3); }
.sc-btn.confirm:active { background: rgba(52,211,153,.3); }
.sc-btn.cancel  { background: rgba(248,113,113,.12); color: var(--c-red); border: 1px solid rgba(248,113,113,.25); }
.sc-btn.cancel:active  { background: rgba(248,113,113,.25); }
.sc-btn.enroute { background: rgba(139,92,246,.15); color: #8b5cf6; border: 1px solid rgba(139,92,246,.35); }
.sc-btn.enroute:active { background: rgba(139,92,246,.3); }
.sc-btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.sc-arrive-label {
  margin-top: 10px; padding: 8px 10px; border-radius: 8px;
  background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.3);
  color: #a78bfa; font-size: 12px; font-weight: 600; text-align: center;
}

/* ── Bottom tab bar ── */
.tab-bar {
  display: flex; border-top: 1px solid var(--c-border);
  background: rgba(8,12,20,.85); backdrop-filter: blur(20px);
  padding-bottom: var(--safe-b); flex-shrink: 0;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 2px 4px; background: none; border: none; cursor: pointer;
  color: var(--c-sub); font-size: 9px; font-family: inherit;
  transition: color .2s; position: relative;
}
.tab svg { width: 16px; height: 16px; }
.tab.active { color: var(--c-accent); }
.tab.active svg { filter: drop-shadow(0 0 6px var(--c-accent)); }
.tab-badge {
  position: absolute; top: 4px; right: calc(50% - 20px);
  background: var(--c-red); color: #fff; font-size: 9px; font-weight: 700;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 8px var(--c-red);
}

/* ── Spinner overlay ── */
.spinner-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,12,20,.6); backdrop-filter: blur(4px);
}
.spinner {
  width: 40px; height: 40px; border: 3px solid rgba(255,255,255,.1);
  border-top-color: var(--c-accent); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.toast {
  position: fixed; bottom: calc(80px + var(--safe-b)); left: 50%; transform: translateX(-50%);
  background: rgba(30,40,60,.95); backdrop-filter: blur(16px);
  border: 1px solid var(--c-border2); border-radius: 12px;
  padding: 10px 18px; font-size: 13px; color: var(--c-text);
  white-space: nowrap; z-index: 200; animation: toast-in .25s ease;
}
.toast.err { border-color: rgba(248,113,113,.5); color: var(--c-red); }
@keyframes toast-in {
  from { opacity:0; transform: translateX(-50%) translateY(10px); }
  to   { opacity:1; transform: translateX(-50%) translateY(0); }
}

/* ── Misc ── */
.spacer { height: 20px; }
.meta-pill { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 7px 12px; border-radius: 8px; background: var(--c-glass); border: 1px solid var(--c-border); font-size: 12px; color: var(--c-sub); margin-bottom: 10px; }

/* ── Live Tables view ── */
#tables-view { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.tables-fp-wrap {
  flex: 1; overflow-y: auto; padding: 0 14px calc(16px + var(--safe-b));
  -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
}
.tables-fp-wrap::-webkit-scrollbar { display: none; }
/* live table cells — no scale/hover effects but clickable */
.tbl.tbl-live {
  transition: none;
  cursor: pointer;
  height: 72px;  /* taller: fits num + cap + status for free cells */
}
.tbl.tbl-live:not(.tbl-pin):active,
.tbl.tbl-live:not(.tbl-pin):hover { transform: none; }
.tbl-pin.tbl-live:active,
.tbl-pin.tbl-live:hover { transform: translate(-50%, -50%) !important; }
/* Live pins: allow text to overflow — progress bar clips itself via own wrapper */
.tbl-pin.tbl-live { overflow: visible; }

/* Номер стола в углу для занятых столов */
.tbl-pin .tbl-num-corner {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 9px;
  font-weight: 700;
  opacity: .7;
  line-height: 1;
  letter-spacing: .2px;
  z-index: 2;
}

/* Адаптивные размеры таймера под ширину стола */
.tbl-pin .tbl-remain.tbl-remain-sm {
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 5px;
  letter-spacing: .2px;
}
.tbl-pin .tbl-remain.tbl-remain-md {
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: .3px;
}
.tbl-pin .tbl-remain.tbl-remain-lg {
  font-size: 15px;
  padding: 3px 7px;
  border-radius: 7px;
  letter-spacing: .4px;
}
/* live occupied: even taller to fit num + cap + status + timer */
.tbl.tbl-live.pending,
.tbl.tbl-live.busy,
.tbl.tbl-live.en_route,
.tbl.tbl-live.available_limited {
  height: 82px;
}
.tbl-sz-sm.tbl-live {
  height: 64px;
}
.tbl-sz-sm.tbl-live.pending,
.tbl-sz-sm.tbl-live.busy,
.tbl-sz-sm.tbl-live.en_route,
.tbl-sz-sm.tbl-live.available_limited {
  height: 74px;
}
.tbl-sz-lg.tbl-live {
  height: 80px;
}
.tbl-sz-lg.tbl-live.pending,
.tbl-sz-lg.tbl-live.busy,
.tbl-sz-lg.tbl-live.en_route,
.tbl-sz-lg.tbl-live.available_limited {
  height: 96px;
}

/* ── Deposit banner (screen 2) ── */
.deposit-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px; margin-bottom: 10px;
  background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.35);
}
.dep-icon { font-size: 20px; flex-shrink: 0; }
.dep-title { font-size: 12px; color: var(--c-sub); }
.dep-amount { font-size: 16px; font-weight: 800; color: var(--c-amber); }
.dep-time { font-size: 11px; color: var(--c-sub); margin-top: 2px; }
.cap-hint { font-size: 11px; color: var(--c-sub); margin-bottom: 4px; padding-left: 2px; }

/* ── Table Info Bottom Sheet ── */
.table-sheet {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end;
}
.ts-overlay {
  position: absolute; inset: 0;
  background: rgba(4,6,12,.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .3s ease;
}
.table-sheet.open .ts-overlay { opacity: 1; }
.ts-card {
  position: relative; z-index: 1; width: 100%;
  background: rgba(19, 25, 41, 0.65);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.35);
  padding: 8px 20px calc(20px + var(--safe-b));
  transform: translateY(100%);
  transition: transform .36s cubic-bezier(0.34,1.56,0.64,1);
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.table-sheet.open .ts-card { transform: translateY(0); }
.ts-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.2); margin: 0 auto 16px;
}
.ts-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.ts-icon { font-size: 32px; line-height: 1; }
.ts-header-text { flex: 1; }
.ts-title { font-size: 18px; font-weight: 800; color: var(--c-text); }
.ts-subtitle { font-size: 13px; color: var(--c-sub); margin-top: 2px; }
.ts-rows { display: flex; flex-direction: column; gap: 0; margin-bottom: 16px;
  border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--c-border); overflow: hidden; }
.ts-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--c-border);
}
.ts-row:last-child { border-bottom: none; }
.ts-row-label { font-size: 13px; color: var(--c-sub); }
.ts-row-val { font-size: 14px; font-weight: 700; color: var(--c-text); }
.ts-warn {
  font-size: 12px; color: var(--c-red);
  background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.3);
  border-radius: 8px; padding: 8px 12px; margin-bottom: 12px;
}

/* ── Regulars (Постоянники) ── */
.reg-search-wrap {
  display: flex; align-items: center; gap: 10px;
  margin: 0 14px 10px;
  flex-shrink: 0;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px; padding: 10px 14px;
}
.reg-search-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--c-text); font-size: 14px;
}
.reg-search-input::placeholder { color: var(--c-sub); }

.reg-card {
  background: rgba(255,255,255,.07); border-radius: 13px;
  padding: 13px 14px; border: 1px solid rgba(255,255,255,.09);
  display: flex; flex-direction: column; gap: 6px;
  flex-shrink: 0;
}
.reg-card-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.reg-card-name { font-weight: 700; font-size: 15px; color: var(--c-text); }
.reg-vip-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  background: linear-gradient(135deg,#f59e0b,#fbbf24);
  color: #1a0a00; border-radius: 6px; padding: 2px 7px;
}
.reg-card-meta { font-size: 12px; color: var(--c-sub); }
.reg-card-notes {
  font-size: 12px; color: rgba(200,210,255,.55);
  font-style: italic; margin-top: 2px;
}
.reg-card-actions {
  display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap;
}
.reg-btn {
  flex: 1; padding: 8px 10px; border-radius: 9px; border: none;
  font-size: 12px; font-weight: 600; cursor: pointer; min-width: 80px;
  touch-action: manipulation;
}
.reg-btn-book  { background: rgba(99,179,237,.2);  color: #7ec8f0; }
.reg-btn-vip   { background: rgba(245,158,11,.18); color: #fbbf24; }
.reg-btn-notes { background: rgba(255,255,255,.1);  color: var(--c-sub); }

/* ── Floor Map (SVG background + absolute table pins) ── */
.floor-map {
  position: relative;
  width: 100%;
  overflow: visible;
}
.floor-map-bg {
  width: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
  border-radius: 12px;
}
.tbl-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px; cursor: pointer;
  border: none;
  transition: all .3s cubic-bezier(0.25, 1, 0.5, 1);
  user-select: none;
  border-radius: 16px;
  overflow: hidden;
  box-sizing: border-box;
  padding: 4px 6px;
}
.tbl-pin-circle {
  border-radius: 50% !important;
  height: unset !important;
  min-height: unset !important;
  min-width: unset !important;
  padding: 0 !important;
  overflow: visible !important;
}
/* Таймер под круглым столиком — вынесен наружу */
.tbl-pin-circle .tbl-remain {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 2px;
  font-size: 9px !important;
  padding: 1px 5px !important;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}
/* Pins are absolutely-positioned — block all scale transforms on interact */
.tbl-pin:active,
.tbl-pin.selected,
.tbl-pin.free:active {
  transform: translate(-50%, -50%) !important;
  transition-duration: .1s;
}

/* Text inside floor-map pins: clipped, never overflow the shape */
.tbl-pin .tbl-num {
  font-size: 15px; font-weight: 800; line-height: 1; letter-spacing: .3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.tbl-pin .tbl-cap {
  font-size: 10px; opacity: .72; line-height: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.tbl-pin .tbl-status {
  font-size: 10px; font-weight: 600; line-height: 1; letter-spacing: .1px; opacity: .85;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.tbl-pin-circle .tbl-status {
  font-size: 12px; font-weight: 700; opacity: 1;
}
.tbl-pin .tbl-remain {
  font-size: 11px; font-weight: 800; line-height: 1;
  letter-spacing: .3px;
  white-space: nowrap;
  padding: 2px 5px; border-radius: 6px;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
  margin-top: 1px;
  position: relative;
  z-index: 2;
}

/* ═══════════════════════════════════════════════
   VENUE HERO — Photo carousel with logo branding
   ═══════════════════════════════════════════════ */
.venue-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1.5px solid rgba(201,168,76,.35);
  box-shadow: 0 4px 24px rgba(201,168,76,.12), 0 0 0 1px rgba(0,0,0,.4);
  height: 300px;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.venue-hero-track {
  display: flex;
  width: 600%;   /* 6 slides × 100% */
  height: 100%;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}

.venue-hero-slide {
  width: calc(100% / 6);
  height: 100%;
  position: relative;
  flex-shrink: 0;
}

.venue-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  filter: contrast(1.08) saturate(0.85) sepia(0.15) brightness(0.9);
  transform: scale(1);
  transition: none;
  pointer-events: none;
}
/* первый слайд — кальяны с неоном: зум + позиция сверху */
.venue-hero-slide:first-child img {
  object-position: center 15%;
  transform: scale(1.18);
  transform-origin: center top;
}

.venue-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8,12,20,.15) 0%,
    rgba(8,12,20,.05) 40%,
    rgba(8,12,20,.5) 85%,
    rgba(8,12,20,.85) 100%
  );
  pointer-events: none;
}
/* lighter overlay for neon-sign slide — let the text glow through */
.venue-hero-overlay--dim {
  background: linear-gradient(
    180deg,
    rgba(8,12,20,.0) 0%,
    rgba(8,12,20,.0) 55%,
    rgba(8,12,20,.55) 85%,
    rgba(8,12,20,.80) 100%
  );
}

/* Dots */
.venue-hero-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.vhd {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  border: 1px solid rgba(201,168,76,.4);
  transition: all .3s;
  cursor: pointer;
}

.vhd.active {
  background: #c9a84c;
  box-shadow: 0 0 8px rgba(201,168,76,.6);
  transform: scale(1.2);
}

/* Logo badge */
.venue-hero-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 6px;
  border-radius: 20px;
  background: rgba(8,12,20,.7);
  border: 1px solid rgba(201,168,76,.4);
  backdrop-filter: blur(8px);
  z-index: 2;
}

.venue-cloud-icon {
  width: 22px;
  height: 14px;
}

.venue-hero-badge span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #c9a84c;
}

/* Instagram link in venue-info-bar */
.vi-insta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: #c9a84c;
  font-weight: 600;
  border-bottom: 1px dashed rgba(201,168,76,.5);
  padding-bottom: 1px;
  transition: opacity .15s;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.vi-insta:active { opacity: .65; }


/* ═══════════════════════════════════════════════
   MOBILE — адаптация для мобильных устройств
   ═══════════════════════════════════════════════ */

@media (max-width: 480px) {

  /* ── Table Info Sheet — карточка столика ── */
  .ts-card {
    padding: 10px 16px calc(20px + var(--safe-b));
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
  }
  .ts-icon {
    font-size: 36px;
  }
  .ts-title {
    font-size: 20px;
    font-weight: 800;
  }
  .ts-subtitle {
    font-size: 13px;
    margin-top: 3px;
  }
  .ts-row {
    padding: 12px 12px;
  }
  .ts-row-label {
    font-size: 14px;
  }
  .ts-row-val {
    font-size: 15px;
    font-weight: 700;
  }
  .ts-warn {
    font-size: 13px;
    padding: 10px 14px;
  }

  /* ── Booking pill (полоска с инфо: зал · стол · дата · время) ── */
  .booking-pill.glass-row-sm,
  .meta-pill.glass-row-sm,
  .meta-pill,
  .booking-pill {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    font-size: 13px;
    border-radius: 14px;
    text-align: center;
  }
  /* Скрываем точки-разделители на мобильном */
  .booking-pill .sep,
  .meta-pill .sep {
    display: none;
  }
  /* Верхняя строка (зал + стол) — в одну линию */
  .bp-top-line {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .bp-top-line .sep {
    display: inline !important;
  }
  /* Время — самое крупное и выделенное */
  #p-time {
    display: block;
    font-size: 32px !important;
    font-weight: 900;
    color: var(--c-accent);
    letter-spacing: 1px;
    line-height: 1.1;
    margin-top: 4px;
    text-shadow: 0 0 18px rgba(201,168,76,.35);
  }
  /* Дата — тоже чуть крупнее */
  #p-date {
    font-size: 15px;
    font-weight: 600;
    color: var(--c-text);
  }
  /* Зал и стол */
  #p-hall, #p-table {
    font-size: 13px;
    color: var(--c-sub);
  }
  /* Meta-pill на экране 1 (зал·стол) */
  #f-hall, #f-table {
    font-size: 14px;
  }

  /* ── Time grid — сетка выбора времени ── */
  .time-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .time-chip {
    padding: 14px 6px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
  }

  /* ── Popup: compact 5-col time grid (guest) ── */
  .dt-popup .time-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }
  .dt-popup .time-chip {
    padding: 12px 3px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
  }

  /* ── Секции и заголовки ── */
  .sec-label {
    font-size: 15px;
  }

  /* ── Кнопки (чипы гостей) ── */
  .chip-row {
    gap: 8px;
  }
  .chip {
    padding: 16px 8px;
    font-size: 18px;
    min-width: 44px;
  }

  /* ── Deposit banner — информация о депозите ── */
  .deposit-banner {
    padding: 14px;
  }
  .dep-amount {
    font-size: 18px;
  }

  /* ── Кнопки действий ── */
  .pill.primary,
  .pill.ghost {
    font-size: 15px;
    padding: 11px 20px;
    min-height: 42px;
  }

  /* ── Venue info bar ── */
  .venue-info-bar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
    font-size: 12px;
  }

  /* ── Календарь — немного крупнее ── */
  .custom-cal-days button {
    min-height: 42px;
    font-size: 15px;
  }

  /* ── Input card (форма бронирования) ── */
  .ifield {
    font-size: 16px; /* предотвращает зум на iOS при фокусе */
  }

  /* ── Столы (план зала) — увеличение для мобильных ── */
  .tbl {
    min-height: 66px;
  }
  /* Столы-пины на карте — размер задаётся координатами, min-height не нужен */
  .tbl.tbl-pin {
    min-height: unset;
  }
  .tbl-num {
    font-size: 15px;
  }
  .tbl-cap {
    font-size: 11px;
  }
  .tbl-status {
    font-size: 11px;
  }
  .tbl-guest-name {
    font-size: 11px;
  }
  .tbl-remain {
    font-size: 14px;
  }
  .floor-grid {
    gap: 10px;
  }
  .floor-section-lbl {
    font-size: 11px;
  }

  /* ── Happy Hours — крупнее цены и текст ── */
  .hb-name {
    font-size: 15px;
  }
  .hb-price {
    font-size: 15px;
  }
  .hb-title {
    font-size: 14px;
  }
  .hb-time {
    font-size: 13px;
  }

  /* ── Venue info bar ── */
  .venue-info-bar {
    line-height: 1.5;
  }
  .menu-big-btn-sub {
    font-size: 13px;
  }

  /* ── Часы Nha Trang — крупнее ── */
  .vn-clock-time {
    font-size: 14px;
  }
  .vn-clock-label {
    font-size: 12px;
  }

  /* ── Пипсы шагов — крупнее ── */
  .pip {
    width: 9px; height: 9px;
  }

  /* ── Нижний таб-бар (персонал) — крупнее ── */
  .tab {
    font-size: 12px;
  }
  .tab svg {
    width: 22px; height: 22px;
  }
  .tab-badge {
    font-size: 10px;
    width: 18px; height: 18px;
  }

  /* ── Фильтры персонала (inline-стили переопределяем) ── */
  .staff-filters .seg-btn {
    font-size: 14px !important;
    padding: 10px 8px !important;
  }

  /* ── Staff booking cards — улучшение читаемости ── */
  .sc-hall, .sc-table {
    font-size: 14px;
  }
}

/* Дополнительно: очень маленькие экраны (iPhone SE и подобные) */
@media (max-width: 375px) {
  .ts-icon {
    font-size: 36px;
  }
  .ts-title {
    font-size: 20px;
  }
  .time-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .time-chip {
    padding: 12px 4px;
    font-size: 15px;
  }

  /* ── Popup: compact 5-col time grid (guest, small screens) ── */
  .dt-popup .time-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
  .dt-popup .time-chip {
    padding: 10px 2px;
    font-size: 13px;
  }

  #p-time {
    font-size: 28px !important;
  }
  .booking-pill.glass-row-sm,
  .booking-pill {
    padding: 10px 14px;
  }

  /* ── Столы — уменьшаем доп. на iPhone SE ── */
  .tbl {
    min-height: 60px;
  }
  .tbl.tbl-pin {
    min-height: unset;
  }
  .tbl-num {
    font-size: 14px;
  }
}

/* ═══════════════════════════════════════════════
   Help / Instruction view (staff tab)
   ═══════════════════════════════════════════════ */
#help-view {
  flex: 1; overflow: hidden; display: flex; flex-direction: column;
}
#help-view .staff-header { flex-shrink: 0; }
.help-scroll {
  flex: 1; overflow-y: auto; padding: 8px 14px calc(20px + var(--safe-b));
  -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
}
.help-scroll::-webkit-scrollbar { display: none; }

.help-section {
  margin-bottom: 8px; border-radius: 14px;
  background: var(--c-glass); border: 1px solid var(--c-border);
  overflow: hidden;
}
.help-section[open] {
  border-color: rgba(201,168,76,.35);
  box-shadow: 0 0 12px rgba(201,168,76,.08);
}
.help-section summary {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; font-size: 14px; font-weight: 700; color: var(--c-text);
  cursor: pointer; list-style: none;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.help-section summary::-webkit-details-marker { display: none; }
.help-section summary::after {
  content: "▸"; margin-left: auto;
  font-size: 12px; color: var(--c-sub); transition: transform .2s;
}
.help-section[open] summary::after { transform: rotate(90deg); }
.help-section summary:active { background: rgba(255,255,255,.04); }

.help-body {
  padding: 0 16px 14px; font-size: 13px; line-height: 1.7; color: var(--c-sub);
}
.help-body b, .help-body strong { color: var(--c-text); font-weight: 600; }

.help-steps {
  counter-reset: hstep; padding: 0; margin: 0; list-style: none;
}
.help-steps li {
  counter-increment: hstep; position: relative;
  padding: 8px 0 8px 36px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.help-steps li:last-child { border-bottom: none; }
.help-steps li::before {
  content: counter(hstep); position: absolute; left: 0; top: 8px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(201,168,76,.15); color: var(--c-accent);
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

.help-color {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 8px; margin: 3px 0;
  font-size: 12px; font-weight: 600;
}
.help-color--free    { background: #1a2440; color: rgba(255,255,255,.85); }
.help-color--limited { background: linear-gradient(145deg,#1a3328,#1e3d30); color: #4ade80; }
.help-color--pending { background: linear-gradient(145deg,#3d3520,#4a3f28); color: #fbbf24; }
.help-color--enroute { background: linear-gradient(145deg,#2d1f5e,#3a2870); color: #a78bfa; }
.help-color--busy    { background: linear-gradient(145deg,#3a1525,#45182a); color: #ff8a8a; }

.help-tip {
  margin: 8px 0; padding: 10px 14px; border-radius: 10px;
  font-size: 12px; line-height: 1.6;
}
.help-tip--info { background: rgba(96,165,250,.1); border: 1px solid rgba(96,165,250,.3); color: #93c5fd; }
.help-tip--warn { background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.3); color: #fcd34d; }
.help-tip--ok   { background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.3); color: #6ee7b7; }

/* ── Poster LED indicator (рядом с кнопкой обновления столов) ── */
.poster-led {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #555;
  flex-shrink: 0;
  cursor: pointer;
  transition: background .4s, box-shadow .4s;
}
.poster-led.ok {
  background: #4caf50;
  box-shadow: 0 0 6px 2px rgba(76,175,80,.5);
  animation: poster-pulse 3s ease-in-out infinite;
}
.poster-led.warn {
  background: #ffc107;
  box-shadow: 0 0 6px 2px rgba(255,193,7,.45);
  animation: poster-pulse 1.5s ease-in-out infinite;
}
.poster-led.err {
  background: #f44336;
  box-shadow: 0 0 6px 2px rgba(244,67,54,.5);
  animation: poster-pulse 1s ease-in-out infinite;
}
@keyframes poster-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .45; }
}
/* Анимация вращения кнопки обновления при синхронизации */
.icon-btn.syncing svg {
  animation: spin-refresh .8s linear infinite;
}
@keyframes spin-refresh {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Telegram status indicator on form ── */
.tg-status {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
  margin: 4px 0;
  text-align: center;
}
.tg-status.tg-ok {
  color: #4caf50;
  background: rgba(76, 175, 80, 0.1);
}
.tg-status.tg-warn {
  color: #ff9800;
  background: rgba(255, 152, 0, 0.1);
}

/* ── Venue contact block on success screen (no TG) ── */
.no-tg-warn {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 152, 0, 0.08);
  border: 1px solid rgba(255, 152, 0, 0.25);
  text-align: center;
}
.no-tg-title {
  font-weight: 600;
  font-size: 14px;
  color: #ff9800;
  margin-bottom: 6px;
}
.no-tg-text {
  font-size: 13px;
  color: var(--c-sub, #aaa);
  margin-bottom: 10px;
}
.no-tg-phones {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.no-tg-phone-link {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 10px;
  background: rgba(201, 168, 76, 0.12);
  color: #c9a84c;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background .2s;
}
.no-tg-phone-link:active {
  background: rgba(201, 168, 76, 0.25);
}

/* ════════════════════════════════════════════════════
   NEW BOOKING FLOW — Book button, popup, table states
   ════════════════════════════════════════════════════ */

/* ── Floating "Book a table" button ── */
.book-fab {
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: .3px;
  padding: 14px 24px !important;
  animation: fab-glow 2.5s ease-in-out infinite;
}
@keyframes fab-glow {
  0%, 100% { box-shadow: 0 2px 16px rgba(201,168,76,.35), 0 1px 0 rgba(255,255,255,.12) inset; }
  50%      { box-shadow: 0 4px 28px rgba(201,168,76,.55), 0 1px 0 rgba(255,255,255,.15) inset; }
}

/* ── Booking start overlay (dim tables + hero CTA) ── */
.booking-start-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(8, 12, 20, .35);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: opacity .4s ease;
  border-radius: 14px;
}
.overlay-my-bookings {
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(201,168,76,.45);
  color: var(--c-gold);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--r-pill);
  cursor: pointer;
  z-index: 41;
  letter-spacing: .3px;
  transition: background .15s, transform .2s;
  -webkit-tap-highlight-color: transparent;
}
.overlay-my-bookings:active {
  background: rgba(201,168,76,.15);
  transform: scale(.96);
}
.booking-start-overlay .book-fab--hero {
  font-size: 16px !important;
  font-weight: 600 !important;
  padding: 14px 28px !important;
  width: auto !important; /* Убираем width: 100% из .pill */
  min-width: 240px;
  background: linear-gradient(135deg, rgba(74, 212, 120, 0.95), rgba(46, 184, 80, 0.95)) !important;
  letter-spacing: .4px;
  border-radius: var(--r-pill) !important;
  animation: hero-glow 2.5s ease-in-out infinite;
  z-index: 41;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
}
@keyframes hero-glow {
  0%, 100% { box-shadow: 0 4px 24px rgba(74,212,120,.40), 0 0 0 0 rgba(74,212,120,.25), 0 1px 0 rgba(255,255,255,.12) inset; }
  50%      { box-shadow: 0 6px 36px rgba(74,212,120,.60), 0 0 0 8px rgba(74,212,120,.10), 0 1px 0 rgba(255,255,255,.15) inset; }
}
/* Dimmed tables while overlay is active */
.tables-dimmed .tbl {
  opacity: .30 !important;
  pointer-events: none !important;
  filter: brightness(.6) saturate(.4);
  transition: opacity .4s ease, filter .4s ease;
}
/* Staff mode: tables dim the same way on booking tab (overlay) */

/* ── Date/Time popup overlay ── */
.dt-popup {
  position: fixed; inset: 0; z-index: 210;
  display: flex; align-items: flex-end;
}
.dt-popup-overlay {
  position: absolute; inset: 0;
  background: rgba(4, 6, 12, 0.4);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .3s ease;
}
.dt-popup.open .dt-popup-overlay { opacity: 1; }
.dt-popup-card {
  position: relative; z-index: 1; width: 100%;
  background: rgba(19, 25, 41, 0.65);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.35);
  padding: 8px 20px calc(20px + var(--safe-b));
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(0.32, 1.2, 0.5, 1);
  max-height: 85vh;
  overflow-y: auto;
}
.dt-popup.open .dt-popup-card { transform: translateY(0); }
.dt-popup-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.2); margin: 4px auto 10px;
}
.dt-popup-title {
  font-size: 17px; font-weight: 800; color: var(--c-text);
  text-align: center; margin-bottom: 4px;
}

/* ── Compact 5-col time grid inside guest popup ── */
.dt-popup .time-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; }
.dt-popup .time-chip { padding: 9px 2px; font-size: 13px; font-weight: 600; }

/* ── Guest table statuses (shown after date/time selected) ── */
.tbl.guest-free {
  background: linear-gradient(145deg, #1e3a2d, #142a1e) !important;
  color: rgba(255,255,255,.95) !important;
  box-shadow: 4px 4px 10px rgba(0,0,0,.3), -2px -2px 6px rgba(255,255,255,.05), inset 0 1px 1px rgba(255,255,255,.1), 0 0 0 2px rgba(52,211,153,.5) !important;
  cursor: pointer !important;
  animation: guest-free-pulse 2s ease-in-out infinite;
}
@keyframes guest-free-pulse {
  0%, 100% { box-shadow: 4px 4px 10px rgba(0,0,0,.3), inset 0 1px 1px rgba(255,255,255,.1), 0 0 0 2px rgba(52,211,153,.5), 0 4px 14px rgba(52,211,153,.25); }
  50%      { box-shadow: 4px 4px 10px rgba(0,0,0,.3), inset 0 1px 1px rgba(255,255,255,.1), 0 0 0 3px rgba(52,211,153,.7), 0 6px 20px rgba(52,211,153,.35); }
}
.tbl.guest-free:active {
  transform: translate(-50%, -50%) scale(.93) !important;
}

.tbl.guest-busy {
  background: linear-gradient(145deg, #451b2e, #361421) !important;
  color: rgba(255,210,220,.5) !important;
  box-shadow: 4px 4px 10px rgba(0,0,0,.35), -2px -2px 6px rgba(255,255,255,.05), inset 0 1px 1px rgba(255,255,255,.05) !important;
  cursor: not-allowed !important;
  pointer-events: none;
  opacity: .55;
}
.tbl.guest-busy .tbl-num { opacity: .5; }
.tbl.guest-busy .tbl-cap { opacity: .35; }

/* Locked icon overlay for busy tables */
.tbl.guest-busy::after {
  content: "🔒";
  position: absolute;
  font-size: 12px;
  top: 2px; right: 2px;
  opacity: .7;
}
.tbl-pin-circle.guest-busy::after {
  top: -2px; right: -2px;
  font-size: 10px;
}

/* ── Blinking dot on 2nd floor tab ── */
.floor-dot {
  display: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c-red);
  margin-left: 4px;
  vertical-align: middle;
}
.floor-dot.active {
  display: inline-block;
  animation: floor-dot-blink 1.4s ease-in-out infinite;
}
@keyframes floor-dot-blink {
  0%, 100% { opacity: .25; transform: scale(.8); }
  50%      { opacity: 1;   transform: scale(1.1); }
}

/* ── Booking mode info bar ── */
.booking-mode-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 8px 12px;
  background: rgba(52,211,153,.12);
  border: 1px solid rgba(52,211,153,.3);
  border-radius: 10px; margin: 4px 10px 2px;
  font-size: 12px; font-weight: 600;
  color: var(--c-green);
  flex-shrink: 0;
}
.booking-mode-bar .bm-change {
  color: var(--c-accent); cursor: pointer;
  margin-left: auto;
  background: linear-gradient(135deg, rgba(212,180,74,.15), rgba(184,148,46,.08));
  border: 1px solid rgba(201,168,76,.45);
  border-radius: var(--r-pill);
  padding: 5px 14px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .2px;
  text-decoration: none;
  transition: transform .18s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow .18s ease, background .15s ease;
  box-shadow: 0 2px 8px rgba(201,168,76,.12);
  -webkit-tap-highlight-color: transparent;
}
.booking-mode-bar .bm-change:active {
  transform: scale(.93);
  background: rgba(201,168,76,.25);
  box-shadow: 0 0 12px rgba(201,168,76,.2);
}

/* ══════════════  COMPACT SCREEN 2 (booking form)  ══════════════ */

/* --- compact info pill — single row --- */
.booking-info-compact {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  font-size: 11.5px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}
.booking-info-compact .bic-line {
  white-space: nowrap;
  opacity: .92;
}

/* --- Make everything tighter inside #s2 --- */
#s2 .scroller { padding: 4px 14px 10px; }

#s2 .sec-label        { font-size: 12px; margin-bottom: 3px; }
#s2 .sec-label.mt     { margin-top: 4px; }

#s2 .input-card       { border-radius: 12px; }
#s2 .irow             { padding: 7px 12px; }
#s2 .irow .iicon      { font-size: 14px; }
#s2 .ifield           { font-size: 13px; }
#s2 .itextarea        { min-height: 24px; line-height: 1.25; }

#s2 .guests-section   { padding: 6px 10px; margin-top: 4px; border-radius: 12px; }
#s2 .guests-label     { font-size: 12px; margin-bottom: 3px; margin-top: 0; }
#s2 .chip             { padding: 8px 4px; font-size: 13px; border-radius: 10px; }

/* Deposit — one compact row */
#s2 .deposit-row {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px; margin-bottom: 2px;
  border-radius: 10px;
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.25);
  font-size: 11px; color: var(--c-amber, #f59e0b);
  font-weight: 500;
  overflow: hidden;
}
#s2 .deposit-row .dep-text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

#s2 .guest-banner     { padding: 5px 10px; margin-top: 3px; border-radius: 12px; }

#s2 .submit-area      { padding: 6px 16px 8px; }
#s2 .submit-area .pill { padding: 11px 0; font-size: 14px; border-radius: 14px; }
#s2 .foot-note        { font-size: 10px; margin-top: 3px; }
