* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #f4f5f7;
  color: #111827;
}

img {
  max-width: 100%;
  display: block;
}

.main {
  padding: 24px 0 40px;
}

.container {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Header ===== */

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
  gap: 16px;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.header__logo {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
}

.header__name {
  margin: 0;
  font-weight: 700;
  color: #111827;
  line-height: 1.1;
}

.header__tagline {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.2;
}

.nav__list {
  display: flex;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav__link {
  text-decoration: none;
  color: #374151;
  font-size: 14px;
}

.nav__link:hover {
  color: #111827;
}

/* ===== Footer ===== */

.site-footer {
  background: #111827;
  color: #ffffff;
  padding: 24px 0 0;
  margin-top: 40px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-col {
  flex: 1 1 240px;
  font-size: 14px;
}

.footer-bottom {
  text-align: center;
  padding: 12px 0;
  margin-top: 16px;
  background: rgba(0, 0, 0, 0.3);
  font-size: 13px;
  color: #9ca3af;
}

/* ===== Buttons ===== */

.btn,
.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.08s ease;
}

.btn:hover,
.button-primary:hover {
  opacity: 0.95;
}

.btn:active,
.button-primary:active {
  transform: translateY(1px);
}

.btn.secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn.secondary:hover {
  background: #d1d5db;
}

.button-primary:disabled,
.btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  opacity: 1;
  transform: none;
}

/* ===== Cards / text ===== */

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
  margin-bottom: 20px;
}

.meta {
  color: #6b7280;
  font-size: 14px;
}

.section h1,
.section h2,
.section h3 {
  margin-top: 0;
}

/* ===== Admin UI ===== */

.admin-center {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #0f172a;
}

.admin-card {
  background: #1e293b;
  padding: 40px;
  border-radius: 20px;
  width: 320px;
  text-align: center;
  color: white;
}

.admin-title {
  margin-bottom: 20px;
  font-size: 22px;
  font-weight: 600;
}

.admin-btn {
  width: 100%;
  height: 50px;
  margin: 10px 0;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
}

.admin-btn-blue { background: #3b82f6; color: white; }
.admin-btn-green { background: #22c55e; color: white; }
.admin-btn-gray { background: #475569; color: white; }
.admin-btn-red { background: #ef4444; color: white; }

.admin-btn:hover {
  opacity: 0.9;
}

/* ===== Hall helpers ===== */

.mobile-hall-viewport {
  position: relative;
}

.mobile-hall-scale {
  transform-origin: top center;
  will-change: transform;
}

/* ===== Price legend mobile ===== */

.price-legend-mobile {
  display: none;
  position: fixed;
  left: 0;
  top: 120px;
  z-index: 50;
}

.price-legend-mobile__stack {
  display: flex;
  flex-direction: column;
}

.price-legend-mobile__item {
  width: 56px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #fff;
  font-size: 14px;
}

/* ===== CASH TOPBAR ===== */

.cash-topbar {
  margin: 16px 0 24px;
  padding: 18px 22px;
  background: #0f172a;
  border-radius: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.cash-top-left {
  flex: 1;
  min-width: 280px;
}

.cash-title-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cash-label {
  font-size: 13px;
  color: #cbd5e1;
  margin-bottom: 0;
  font-weight: 600;
}

.cash-seance-select {
  width: 100%;
  max-width: 420px;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  background: #fff;
  color: #111827;
}

.cash-top-right {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.cash-status-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 16px;
  min-width: 160px;
}

.status-title {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 6px;
}

.status-value {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

/* ===== Responsive ===== */

@media (max-width: 640px) {
  .main {
    padding: 16px 0 24px;
  }

  .container {
    padding: 0 12px;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
    padding: 10px 0;
  }

  .nav__list {
    margin-top: 6px;
    flex-wrap: wrap;
  }

  .card {
    padding: 16px;
    border-radius: 14px;
  }

  .btn,
  .button-primary {
    min-height: 44px;
  }

  .footer-grid {
    gap: 18px;
  }

  .hall-hero {
    padding: 10px 12px;
  }

  .hall-title {
    font-size: 18px;
    margin-bottom: 6px;
  }

  .hall-subtitle {
    font-size: 12px;
    line-height: 1.3;
  }

  .hall-badges {
    display: none;
  }

  .hall-shell-head {
    padding: 10px 12px;
  }

  .hall-shell-title {
    font-size: 16px;
  }

  .hall-shell-meta {
    font-size: 12px;
  }

  .hall-legend {
    font-size: 11px;
    gap: 6px 10px;
  }

  .hall-scroll {
    overflow: hidden !important;
    padding: 8px 6px 12px;
  }

  .hall-inner {
    min-width: unset !important;
    width: max-content;
    margin: 0 auto;
  }

  .hall-summary-card {
    position: sticky;
    bottom: 0;
    z-index: 50;
    border-radius: 14px 14px 0 0;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 28px rgba(17, 24, 39, 0.12);
  }

  .hall-summary-title {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .hall-summary-meta {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .hall-summary-total {
    font-size: 18px;
    margin-bottom: 8px;
  }

  #go-order.button-primary {
    min-height: 44px;
    font-size: 15px;
    border-radius: 12px;
  }

  .price-legend-mobile {
    display: block;
  }

  .cash-topbar {
    padding: 16px;
    gap: 16px;
  }

  .cash-top-right {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .cash-status-card {
    min-width: 100%;
  }

  .cash-seance-select {
    max-width: 100%;
  }

 /* ===== BUILDER HALL MODE ===== */

.builder-hall-mode .hall-layout{
  display:grid;
  grid-template-columns:220px 1fr 260px;
  gap:20px;
  align-items:start;
}

.builder-hall-mode .hall-left{
  overflow:hidden;
  min-width:0;
}

.builder-hall-mode .hall-wrap{
  position:relative;
  overflow:auto;
  height:85vh;
  background:#f3f4f6;
  border-radius:16px;
}

.builder-hall-mode #hall{
  position:relative;
  transform-origin:top left;
  width:max-content;
  min-width:100%;
  min-height:100%;
}

.builder-hall-mode .hall-sidebar{
  position:sticky;
  top:20px;
}

.zoom-controls{
  position:absolute;
  right:16px;
  bottom:16px;
  display:flex;
  flex-direction:column;
  gap:8px;
  z-index:50;
}

.zoom-btn{
  width:42px;
  height:42px;
  border:none;
  border-radius:12px;
  background:#fff;
  font-size:22px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(0,0,0,.15);
} 
.club-tables-layer{
  position:relative;
  width:100%;
  min-height:700px;
}

.club-table{
  position:absolute;
  width:120px;
  height:120px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.18);
  background:#173257;
  color:#fff;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  transition:.15s ease;
}

.club-table--rect{
  border-radius:18px;
  width:150px;
  height:100px;
}

.club-table:hover{
  transform:scale(1.04);
  background:#21406a;
}

.club-table.selected{
  outline:3px solid #facc15;
}

.club-table.taken{
  opacity:.45;
  cursor:not-allowed;
}

.club-table-title{
  font-size:15px;
  font-weight:700;
}

.club-table-meta,
.club-table-price{
  font-size:12px;
  opacity:.85;
}
