:root {
  color-scheme: light;
  --bg: #f6f5f9;
  --surface: #ffffff;
  --surface-2: #f1eff7;
  --border: #e4e1ee;
  --text: #221c3d;
  --text-2: #6b6585;
  --accent: #5b47c9;
  --accent-2: #ece8fb;
  --good: #0a8a23;
  --bad: #c9302f;
  --warn-bg: #fff5dc;
  --warn-text: #7a5300;
  --grid: #ece9f3;
  --side: #2c244c;
  --side-text: #d9d4f0;
  --shadow: 0 1px 2px rgba(34, 28, 61, .06), 0 1px 8px rgba(34, 28, 61, .04);
  font-family: Inter, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #15121f; --surface: #1e1a2c; --surface-2: #272237; --border: #343048; --text: #ece9f7; --text-2: #a39dbb;
    --accent: #9887ef; --accent-2: #2e2850; --good: #3cc35a; --bad: #f07373; --warn-bg: #3a2f12; --warn-text: #f3cf7a; --grid: #2c2840; --side: #120f1c;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15121f; --surface: #1e1a2c; --surface-2: #272237; --border: #343048; --text: #ece9f7; --text-2: #a39dbb;
  --accent: #9887ef; --accent-2: #2e2850; --good: #3cc35a; --bad: #f07373; --warn-bg: #3a2f12; --warn-text: #f3cf7a; --grid: #2c2840; --side: #120f1c;
}

* { box-sizing: border-box; }
/* overflow-x: clip (not hidden) so position: sticky keeps working */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; overflow-x: clip; max-width: 100vw; }
img, svg, select, input, textarea { max-width: 100%; }
h1 { font-size: 22px; margin: 0 0 2px; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 14px; margin: 0; font-weight: 600; }
button, input, select { font: inherit; color: inherit; }
code, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.pad { padding: 8px 0 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Layout */
.layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; color: #fff; padding: 0 8px 18px; }
.brand.big { color: var(--text); font-size: 20px; padding: 0 0 6px; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #8b6cff, #4f3bd1); color: #fff; display: grid; place-items: center; font-weight: 700; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.nav-sep { height: 1px; background: rgba(255, 255, 255, .1); margin: 8px 6px; }
.org-switch { display: flex; flex-direction: column; gap: 4px; padding: 0 8px 14px; font-size: 11px; color: #9d96bd; text-transform: uppercase; letter-spacing: .04em; }
.org-switch select { height: 32px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .06); color: #fff; padding: 0 8px; text-transform: none; letter-spacing: 0; font-size: 13px; }
.org-switch select option { color: #221c3d; }
.org-name { padding: 0 8px 14px; margin-top: -8px; color: #c7bff3; font-size: 13px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--side-text); text-decoration: none; }
.side nav a:hover { background: rgba(255, 255, 255, .06); }
.side nav a.active { background: rgba(152, 135, 239, .22); color: #fff; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; font-size: 12px; }
.side-foot .muted { color: #9d96bd; }
.side-foot .link { color: #c7bff3; }
.side .bad { color: #ff9a9a; }
.me { padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .1); color: #fff; }
.fresh { line-height: 1.5; }
.main { min-width: 0; max-width: 100%; overflow-x: clip; }
.page { padding: 24px 28px 48px; max-width: 1400px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.page > * { min-width: 0; max-width: 100%; }
.page-h > div { min-width: 0; }
.page-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.topbar, .menu-backdrop { display: none; }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 30; width: 250px; transform: translateX(-100%); transition: transform .2s; }
  .menu-open .side { transform: none; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 25; height: 52px; padding: 0 12px;
    padding-top: env(safe-area-inset-top); box-sizing: content-box; background: var(--side); color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
  .topbar-burger { border: 0; background: rgba(255, 255, 255, .1); color: #fff; border-radius: 8px; width: 38px; height: 38px; font-size: 18px; cursor: pointer; flex: none; }
  .topbar-title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .logo.sm { width: 26px; height: 26px; border-radius: 7px; font-size: 13px; flex: none; }
  .menu-backdrop { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(20, 16, 36, .45); }
  .side { padding-top: calc(18px + env(safe-area-inset-top)); }
  .page { padding: 16px 14px 40px; }
  .filterbar { position: static; }
}

/* Controls */
.input, .select { height: 34px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 0 10px; outline: none; min-width: 0; }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
select.select { padding-right: 26px; }
button.select { text-align: left; min-width: 170px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 14px) 15px, calc(100% - 10px) 15px; background-size: 4px 4px; background-repeat: no-repeat; padding-right: 26px; }
.btn { height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font-weight: 550; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--border); }
.btn.ghost:hover { background: var(--accent-2); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.danger { color: var(--bad); }
.btn.wide { width: 100%; height: 40px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.icon-btn { border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--text-2); line-height: 1; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.check { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; }
.checks { display: flex; flex-direction: column; gap: 6px; }
.checks label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checks.inline { flex-direction: row; gap: 16px; flex-wrap: wrap; }
.checks.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; max-height: 220px; overflow: auto; padding: 4px 0; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 7px 2px; cursor: pointer; border-right: 1px solid var(--border); font-size: 13px; }
.seg button:last-child { border-right: 0; }
.seg button.active { background: var(--accent-2); color: var(--accent); font-weight: 600; }
.seg.small button { padding: 5px 4px; font-size: 12px; }
.swatches { display: flex; gap: 8px; }
.swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.swatches button.active { box-shadow: 0 0 0 2px var(--text); }

.filterbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; position: sticky; top: 0; z-index: 10; box-shadow: var(--shadow); }
.ms { position: relative; }
.ms-pop { position: absolute; top: 38px; left: 0; z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .15); padding: 6px; min-width: 240px; max-height: 340px; overflow: auto; }
.ms-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.ms-opt:hover { background: var(--surface-2); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 0; flex: none; }

.tabs { display: flex; gap: 2px; background: var(--surface-2); padding: 3px; border-radius: 9px; flex-wrap: wrap; width: fit-content; }
.tabs button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-size: 13px; }
.tabs button.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }

/* Cards & KPIs */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.grid-2 > * { min-width: 0; }
.grid-2.tight { gap: 10px; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.card .kpi { box-shadow: none; background: var(--surface-2); border-color: transparent; }
.kpi-label { font-size: 12px; color: var(--text-2); font-weight: 550; }
.kpi-value { font-size: 22px; font-weight: 650; margin: 4px 0 6px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-foot { display: flex; gap: 8px; align-items: center; font-size: 12px; flex-wrap: wrap; }
.delta { font-size: 12px; font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.delta.flat { color: var(--text-2); }

.loading { display: flex; align-items: center; gap: 10px; color: var(--text-2); padding: 24px; justify-content: center; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { color: var(--text-2); padding: 28px; text-align: center; }
.empty.big { background: var(--surface); border: 1px dashed var(--border); border-radius: 12px; padding: 48px; }
.error-box, .warn-box, .info-box, .ok-box { border-radius: 10px; padding: 10px 12px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.error-box { background: #fde8e8; color: #8a1d1d; }
.warn-box { background: var(--warn-bg); color: var(--warn-text); }
.info-box { background: var(--accent-2); color: var(--text); }
.ok-box { background: #e3f6e7; color: #145c22; }
:root[data-theme="dark"] .error-box { background: #3d1c1f; color: #ffb4b4; }
:root[data-theme="dark"] .ok-box { background: #17331d; color: #a6e8b4; }
.tag { display: inline-block; margin-left: 8px; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); }
.status { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; }
.status.ok { background: var(--good); }
.status.bad { background: var(--bad); }
.status.unknown { background: #a7a3b8; }

/* Tables */
.table-wrap { overflow: auto; max-height: 640px; border: 1px solid var(--border); border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 8px 10px; cursor: pointer; white-space: nowrap; user-select: none; z-index: 1; }
.table td { padding: 8px 10px; border-top: 1px solid var(--border); vertical-align: top; }
.table .num { text-align: right; white-space: nowrap; }
.table tfoot td { font-weight: 650; background: var(--surface-2); position: sticky; bottom: 0; }
.table tr.click { cursor: pointer; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tr.selected td { background: var(--accent-2); }
.table tr.inactive td { opacity: .55; }
.table.pnl tr.strong td { font-weight: 650; background: var(--surface-2); }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn { margin-left: 4px; }

/* Charts */
.chart { width: 100%; max-width: 100%; min-width: 0; position: relative; }
.chart svg { display: block; overflow: visible; max-width: 100%; }
.grid { stroke: var(--grid); stroke-width: 1; }
.axis { fill: var(--text-2); font-size: 11px; }
.crosshair { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; }
.ring { stroke: var(--surface); stroke-width: 2; }
.tt { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 6px 24px rgba(0, 0, 0, .14); border-radius: 8px; padding: 8px 10px; font-size: 12px; min-width: 160px; z-index: 5; }
.tt b { display: block; margin-bottom: 4px; }
.tt-row { display: flex; align-items: center; gap: 6px; }
.tt-row span { margin-left: auto; padding-left: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tt-row i { width: 8px; height: 8px; border-radius: 50%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend.vertical { flex-direction: column; gap: 6px; min-width: 0; flex: 1; max-width: 320px; }
.legend.vertical span { cursor: default; }
.legend.vertical b { margin-left: auto; padding-left: 10px; color: var(--text); font-weight: 600; }
.donut { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.donut-v { fill: var(--text); font-size: 18px; font-weight: 650; }
.barlist { display: flex; flex-direction: column; gap: 4px; }
.barlist-row { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; gap: 10px; align-items: center; padding: 3px 4px; border-radius: 6px; }
.barlist-row.click { cursor: pointer; }
.barlist-row:hover { background: var(--surface-2); }
.barlist-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.barlist-track { height: 12px; background: var(--surface-2); border-radius: 0 4px 4px 0; }
.barlist-bar { height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.barlist-value { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.barlist-value small { display: block; font-weight: 400; color: var(--text-2); font-size: 11px; }
.heat-wrap { overflow: auto; }
.heat { border-collapse: separate; border-spacing: 2px; width: 100%; font-size: 11px; font-variant-numeric: tabular-nums; }
.heat th { color: var(--text-2); font-weight: 500; padding: 2px 4px; }
.heat td { text-align: center; padding: 8px 2px; border-radius: 4px; color: #1d3550; min-width: 38px; cursor: default; background: var(--surface-2); }
.heat td.dark { color: #fff; }
.heat-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; margin-top: 8px; }
.heat-scale { display: inline-flex; align-items: center; gap: 2px; color: var(--text-2); }
.heat-scale i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }

.abc { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 6px; font-weight: 700; font-size: 12px; }
.abc-A { background: #d7f2dd; color: #11622a; }
.abc-B { background: #fdeccc; color: #7a4d00; }
.abc-C { background: #fbdcdc; color: #8a1d1d; }
.abc-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.abc-card { border-radius: 10px; padding: 12px 14px; background: var(--surface-2); }
.abc-card-h { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 4px; }

/* Builder */
/* The settings panel scrolls with the page: no inner scrollbar that cuts the card in half. */
.builder { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.builder-side { min-width: 0; }
.builder-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 1000px) { .builder { grid-template-columns: 1fr; } }

/* Modal & toasts */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 16, 36, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; width: 520px; max-width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal.wide { width: 760px; }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 8px; }
.modal-body { padding: 8px 18px; overflow: auto; }
.modal footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--border); }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: #221c3d; color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); max-width: 420px; font-size: 13px; }
.toast.err { background: #a52828; }

/* Login */
.login-bg { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #3a2f6b, #1a1530 70%); padding: 16px; }
.login { background: var(--surface); border-radius: 16px; padding: 28px; width: 380px; max-width: 100%; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 4px; }
.login p { margin: 0 0 16px; }

@media print {
  .side, .filterbar, .topbar, .btn, .tabs { display: none !important; }
  .layout { display: block; }
  .card, .kpi { box-shadow: none; break-inside: avoid; }
}

/* Restaurants */
.dot.big { width: 12px; height: 12px; margin-right: 10px; vertical-align: 2px; }
.rest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.rest-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.rest-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.rest-card-h { display: flex; align-items: center; margin-bottom: 8px; }
.rest-card-v { font-size: 22px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rest-card-ops { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-2); }
.rest-card-ops.has { color: var(--text); }
.rest-layout { align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Control operations block (shift report) */
.card.ops { background: linear-gradient(180deg, #2c244c, #231d3d); color: #f1eefc; border-color: #3a3163; }
.ops h3 { font-size: 20px; font-weight: 650; color: #fff; }
.ops-h { margin-bottom: 14px; }
.ops-sub { font-style: italic; color: #c9c2ec; margin-top: 4px; }
.ops .muted { color: #b3abd8; }
.ops-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid #463d73; border-radius: 12px; overflow: hidden; font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.ops-table th { background: #3a3166; color: #e3ddff; font-weight: 600; padding: 10px 12px; text-align: center; }
.ops-table td { padding: 10px 12px; border-top: 1px solid #463d73; }
.ops-table .num { text-align: right; white-space: nowrap; }
.ops-table th + th, .ops-table td + td { border-left: 1px solid #463d73; }
.ops-table tfoot td { font-weight: 700; background: #352c5e; }
.ops-table tr.click { cursor: pointer; }
.ops-table tbody tr:hover td { background: rgba(255, 255, 255, .05); }
.ops-table tr.selected td { background: rgba(152, 135, 239, .25); }
.ops-table.plain { border: 0; }
.ops-table.plain td + td, .ops-table.plain th + th { border-left: 0; }
.ops-table.plain tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .04); }
.ops-ico { margin-right: 8px; }
.ops-section { margin: 18px 0 10px; font-size: 16px; color: #fff; }
.ops .link { color: #c7bff3; }
.ops-btn { width: 100%; margin-top: 16px; height: 44px; background: #1f6f3a; border-color: #2a8a4b; color: #c8f5d5; font-size: 15px; }
.ops-detail { margin-top: 14px; background: var(--surface); color: var(--text); border-radius: 10px; padding: 10px; }
.ops-detail .tag { display: inline-flex; gap: 6px; align-items: center; }
.nowrap { white-space: nowrap; }

/* Equipment */
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.st b { font-size: 11px; }
.st.sm { margin-left: 10px; font-size: 11px; }
.st-up { color: var(--good); }
.st-warn { color: #b26a00; }
.st-down { color: var(--bad); }
.st-unknown { color: var(--text-2); }
:root[data-theme="dark"] .st-warn { color: #f3b14a; }
.kpi-btn { text-align: left; cursor: pointer; font: inherit; color: inherit; }
.kpi-btn.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-2); }
.kpi-btn.alarm { border-color: var(--bad); }
.kpi-btn.alarm .kpi-value { color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.chips button { border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 5px 10px; cursor: pointer; font-size: 12px; }
.chips button b { margin-left: 4px; color: var(--text-2); font-weight: 600; }
.chips button.active { background: var(--accent-2); border-color: var(--accent); color: var(--accent); }
.strip { display: inline-flex; gap: 2px; vertical-align: middle; }
.strip i { width: 5px; height: 16px; border-radius: 2px; background: var(--good); }
.strip i.s-warn { background: #f2a600; }
.strip i.s-bad { background: var(--bad); }
.strip i.s-empty { background: var(--surface-2); }
.table.devices tr.row-down td { background: rgba(201, 48, 47, .06); }
.link.strong { font-weight: 600; text-decoration: none; color: var(--text); }
.link.strong:hover { text-decoration: underline; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.type-grid button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 8px; cursor: pointer; text-align: left; font-size: 12px; }
.type-grid button span { font-size: 16px; }
.type-grid button.active { border-color: var(--accent); background: var(--accent-2); color: var(--accent); font-weight: 600; }
.textarea { height: auto; padding: 8px 10px; resize: vertical; width: 100%; }
.dev-mini { display: flex; flex-direction: column; gap: 4px; }
.dev-mini-row { display: grid; grid-template-columns: 22px 1fr auto 56px; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; }
.dev-mini-row.st-down { background: rgba(201, 48, 47, .07); }
.dev-mini-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-mini-row .muted { text-align: right; }
.howto { margin: 0; padding-left: 20px; line-height: 1.6; }
.howto pre { background: var(--surface-2); border-radius: 8px; padding: 10px; overflow: auto; font-size: 12px; margin: 6px 0 10px; }
.table.devices { table-layout: fixed; min-width: 1050px; }
.table.devices th:nth-child(1) { width: 120px; }
.table.devices th:nth-child(2) { width: 22%; }
.table.devices th:nth-child(3) { width: 120px; }
.table.devices th:nth-child(4) { width: 13%; }
.table.devices th:nth-child(5), .table.devices th:nth-child(6) { width: 80px; }
.table.devices th:nth-child(7) { width: 110px; }
.table.devices th:nth-child(8) { width: 180px; }
.table.devices th:nth-child(9) { width: 210px; }
.table.devices td { overflow: hidden; text-overflow: ellipsis; }

.login-org { margin: 0 0 16px; font-size: 16px; font-weight: 600; color: var(--accent); }
.org-name .link { color: #c7bff3; font-size: 11px; }
.slug-field { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); overflow: hidden; }
.slug-field input { border: 0; flex: 1; height: 32px; padding: 0 10px; outline: none; background: transparent; font-family: ui-monospace, Menlo, Consolas, monospace; }
.slug-field span { padding: 0 10px; color: var(--text-2); background: var(--surface-2); height: 32px; line-height: 32px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.host-link { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  :root { font-size: 14px; }
  h1 { font-size: 20px; }
  .page { padding: 12px 12px 32px; gap: 12px; }
  .page-h { align-items: flex-start; }
  .page-h > .row, .page-h > .btn { width: 100%; }
  .filterbar { position: static; padding: 8px; gap: 6px; }
  .filterbar > * { flex: 1 1 100%; min-width: 0; }
  .filterbar .select, .filterbar .input, .filterbar button.select { width: 100%; min-width: 0; }
  .filterbar .ms-pop { min-width: 0; width: 100%; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi-value { font-size: 18px; word-break: break-word; }
  .kpi-foot { font-size: 11px; gap: 4px; }
  .card { padding: 12px; border-radius: 10px; }
  .card-h { flex-direction: column; gap: 8px; }
  .card-actions { width: 100%; }
  .tabs { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { white-space: nowrap; flex: none; padding: 6px 10px; }
  .barlist-row { grid-template-columns: minmax(70px, 34%) minmax(0, 1fr) auto; gap: 6px; }
  .donut { justify-content: center; }
  .donut .legend.vertical { max-width: 100%; flex-basis: 100%; }
  .abc-summary { grid-template-columns: minmax(0, 1fr); }
  .table th, .table td { padding: 7px 8px; font-size: 13px; }
  .table-wrap { max-height: none; }
  .rest-grid { grid-template-columns: minmax(0, 1fr); }
  .ops h3 { font-size: 17px; }
  .ops-table th, .ops-table td { padding: 8px; font-size: 13px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chips button { flex: none; }
  .modal-bg { padding: 0; align-items: end; }
  .modal, .modal.wide { width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; }
  .grid-2.tight { grid-template-columns: minmax(0, 1fr); }
  .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toasts { left: 12px; right: 12px; }
  .heat td { min-width: 30px; padding: 6px 1px; font-size: 10px; }

  /* Tables → one card per row: label on the left, value on the right */
  .table-wrap:has(> .table.rtable) { border: 0; overflow: visible; }
  .table.rtable, .table.rtable tbody, .table.rtable tfoot, .table.rtable tr, .table.rtable td { display: block; width: 100%; }
  .table.rtable { min-width: 0 !important; table-layout: auto; }
  .table.rtable thead { display: none; }
  .table.rtable tr { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; padding: 4px 0; background: var(--surface); }
  .table.rtable td.stack-head { order: -1; }
  .table.rtable tbody tr:hover td { background: transparent; }
  .table.rtable td { border: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 12px; text-align: right; white-space: normal; overflow: visible; }
  .table.rtable td::before { content: attr(data-label); color: var(--text-2); font-size: 12px; text-align: left; flex: none; max-width: 50%; }
  .table.rtable td > .cell { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .table.rtable td.stack-head { font-weight: 600; font-size: 14px; justify-content: flex-start; text-align: left; padding-top: 8px; }
  .table.rtable td.stack-head::before, .table.rtable td:not([data-label])::before { content: none; }
  .table.rtable td.stack-empty, .table.rtable td.stack-hide { display: none; }
  .table.rtable td.stack-actions { justify-content: flex-end; flex-wrap: wrap; padding-bottom: 8px; }
  .table.rtable tfoot td { position: static; background: transparent; }
  .table.rtable tfoot tr { background: var(--surface-2); }
  .table.rtable tr.row-down { border-color: var(--bad); }
  .table.rtable tr.row-down td { background: transparent; }
  .table.rtable .strip i { width: 4px; height: 14px; }
}
.dev-since { display: block; }
.table.rtable .dev-since { display: inline; }
/* Desktop: keep the name column readable, numbers on one line */
@media (min-width: 641px) {
  .table.rtable th:first-child, .table.rtable td.stack-head { min-width: 200px; }
  .table.rtable td.num .cell { display: inline-flex; flex-direction: column; align-items: flex-end; white-space: nowrap; line-height: 1.25; }
  .table.rtable td.num .cell .delta { font-size: 11px; font-weight: 500; }
  .table.rtable th { white-space: normal; vertical-align: bottom; }
  .table.rtable th.num { text-align: right; }
}

.dep-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 4px 12px; margin-bottom: 12px; }
.dep-list .check { margin: 8px 0; }
.tag.warn { background: var(--warn-bg); color: var(--warn-text); }

@media (max-width: 640px) { .modal footer .btn { flex: 1 1 100%; } }
.more-row { display: flex; justify-content: center; padding: 10px 0 2px; }

/* P&L / cash flow report */
.view-seg { width: 230px; }
.fin-table td:first-child { white-space: normal; min-width: 220px; }
.fin-table.wide td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.fin-table tr.fin-account td:first-child { padding-left: 30px; color: var(--text-2); }
.fin-table tr.fin-section td { background: var(--surface-2); font-weight: 650; cursor: pointer; }
.fin-table tr.fin-section td:first-child { background: var(--surface-2); }
.fin-table tr.fin-total td { font-weight: 700; border-top: 2px solid var(--border); }
.fin-table tr.fin-grand td { background: var(--accent-2); color: var(--accent); font-size: 14px; }
.fin-table tr.fin-grand td:first-child { background: var(--accent-2); }
.fin-table tr.fin-grand td.bad { color: var(--bad); }
.fin-caret { display: inline-block; width: 16px; color: var(--text-2); }
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .view-seg { width: 100%; }
  .fin-table td:first-child { min-width: 150px; }
  .fin-table tr.fin-account td:first-child { padding-left: 18px; }
  .fin-table td, .fin-table th { padding: 7px 6px; font-size: 12.5px; }
}

/* Menu / nomenclature */
.menu-types { flex: none; }
.menu-types button { font-size: 13px; padding: 6px 12px; }
.chip-n { margin-left: 6px; color: var(--text-2); font-weight: 600; font-size: 12px; }
.chips button.active .chip-n { color: var(--accent); }
.menu-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.menu-filters .input { flex: 1 1 260px; }
.menu-filters .select { flex: 0 1 230px; }
.menu-filters .check { margin: 0; }
.menu-table .menu-name { font-weight: 600; margin-right: 6px; }
.menu-table tr.menu-idle td { color: var(--text-2); }
.table th.sortable { cursor: pointer; }
.loading-fade { opacity: .55; transition: opacity .15s; }
.tag.type-DISH { background: #e3effc; color: #1b5fae; }
.tag.type-GOODS { background: #e6f6ee; color: #0b7a4b; }
.tag.type-PREPARED { background: #fff1d6; color: #8a5a00; }
:root[data-theme="dark"] .tag.type-DISH { background: #17304d; color: #9cc7f5; }
:root[data-theme="dark"] .tag.type-GOODS { background: #133524; color: #8fe0b5; }
:root[data-theme="dark"] .tag.type-PREPARED { background: #3a2c0c; color: #f0c977; }
@media (max-width: 640px) {
  .menu-types { flex-wrap: nowrap; overflow-x: auto; }
  .menu-filters .input, .menu-filters .select { flex: 1 1 100%; }
}
@media (max-width: 640px) {
  .menu-table td.stack-head { flex-wrap: wrap; align-items: center; gap: 4px 6px; }
  .menu-table td.stack-head > div { flex-basis: 100%; }
}
.table tr.lead-new td { background: var(--accent-2); }

/* CRM */
.crm-segments { flex: none; }
.crm-segments button { font-size: 13px; padding: 6px 12px; }
.crm-table tr.click { cursor: pointer; }
.crm-table tr.click:hover td { background: var(--surface-2); }
.crm-name { font-weight: 600; }
.crm-guest h3 { font-size: 15px; margin: 18px 0 8px; }
.crm-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 20px; margin-bottom: 14px; }
.crm-facts > div { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.crm-facts span:first-child { color: var(--text-2); font-size: 12px; }
.crm-wallets { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.crm-wallet { border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; display: flex; flex-direction: column; min-width: 120px; }
.crm-wallet span { color: var(--text-2); font-size: 12px; }
.crm-wallet b { font-size: 18px; }
.crm-kpis { margin-top: 6px; }
.crm-kpis .small-v { font-size: 15px; }
.crm-scroll { max-height: 320px; }
@media (max-width: 640px) {
  .crm-segments { flex-wrap: nowrap; overflow-x: auto; }
  .crm-facts { grid-template-columns: minmax(0, 1fr); }
}

.crm-last { display: inline-flex; flex-direction: column; align-items: flex-end; }
@media (max-width: 640px) {
  .crm-table td.stack-head { flex-wrap: wrap; align-items: center; gap: 2px 6px; }
  .crm-table td.stack-head > div { flex-basis: 100%; }
  .crm-last { flex-direction: row; gap: 6px; }
}
.crm-facts > div { align-items: flex-start; }
.crm-facts > div > div, .crm-facts .tag-row { display: flex; flex-wrap: wrap; gap: 4px; }
.crm-facts a { color: var(--accent); }

.section-presets { flex: none; margin: 2px 0 10px; }
.section-presets button { font-size: 12.5px; }

.crm-who { display: inline-flex; align-items: center; gap: 10px; }
.crm-avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.crm-initials { display: inline-grid; place-items: center; color: var(--accent); background: var(--accent-2); font-weight: 650; }
.tag.fit { background: #e6f6ee; color: #0b7a4b; }
.tag.fit.on { background: #1e9e5a; color: #fff; }
.crm-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.crm-fit b { margin-right: 6px; }
@media (max-width: 640px) { .crm-table td.stack-head { display: block; } }

/* Self-service MikroTik */
.selfmt-empty p { margin: 0 0 10px; max-width: 70ch; line-height: 1.5; }
.script-box { position: relative; margin: 10px 0; }
.script-box .btn { position: absolute; top: 8px; right: 8px; }
.script-box pre { background: var(--surface-2); border-radius: 8px; padding: 12px; padding-top: 44px; max-height: 320px; overflow: auto; font-size: 11.5px; line-height: 1.45; margin: 0; white-space: pre; }
.table.discover td { vertical-align: middle; }
.table.discover .input.sm, .table.discover .select.sm { padding: 4px 8px; font-size: 13px; min-width: 0; width: 100%; }

/* CRM → бонуси між закладами */
.table td.num.pos { color: var(--good); }
.table td.num.neg { color: var(--bad); }

/* Банкети */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.list-pick { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; max-height: 260px; overflow: auto; }
.list-pick-item { text-align: left; border: 1px solid var(--border, #e3e1ef); background: var(--surface); color: var(--text); border-radius: 8px; padding: 7px 10px; cursor: pointer; font: inherit; }
.list-pick-item:hover { background: var(--accent-2); }
.list-pick .btn { align-self: flex-start; margin-top: 4px; }
.text-warn, td .warn { color: var(--warn-text); }
/* Шахматка броней */
.board-wrap { overflow-x: auto; }
.board { border-collapse: collapse; width: 100%; min-width: 900px; table-layout: fixed; font-size: 12px; }
.board th, .board td { padding: 0; }
.board .board-tbl { width: 120px; text-align: left; padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: sticky; left: 0; background: var(--surface); z-index: 2; }
.board .board-h { text-align: left; font-weight: 500; color: var(--text-2); padding: 4px 0 4px 2px; border-left: 1px solid var(--border); }
.board .board-sec td { padding: 8px 8px 4px; font-weight: 600; color: var(--text-2); }
.board-row { position: relative; height: 30px; }
.board-cells { position: relative; display: grid; grid-template-columns: repeat(var(--slots), 1fr); height: 30px; }
.board-cell { border: 0; border-left: 1px dashed var(--border); border-bottom: 1px solid var(--border); background: transparent; cursor: pointer; padding: 0; }
.board-cell.hour { border-left-style: solid; }
.board-cell:hover:not(:disabled) { background: var(--accent-2); }
.board-cell.past { background: repeating-linear-gradient(45deg, transparent 0 4px, var(--surface-2) 4px 6px); cursor: default; }
.board-bar { position: absolute; top: 3px; bottom: 3px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 11px; line-height: 24px; padding: 0 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: auto; z-index: 1; }
.board-bar.banquet { background: #d9822b; }
.board-bar.foreign { background: #8a8799; }
.board-legend { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--accent); color: #fff; margin-right: 4px; }
.board-legend.banquet { background: #d9822b; }
.board-legend.foreign { background: #8a8799; }
/* План залу */
.plan-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.plan-kpi { font-size: 13px; color: var(--text-2); }
.plan-kpi b { color: var(--text); font-size: 15px; }
.plan-time { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.plan-time input[type=range] { flex: 1; accent-color: var(--accent); }
.plan-clock { font-size: 22px; font-variant-numeric: tabular-nums; min-width: 64px; }
.plan-legend { margin-top: 10px; }
.plan-legend .chip { cursor: default; }
.plan-legend .chip i, .plan-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.plan-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .plan-layout { grid-template-columns: 1fr; } }
.plan-canvas { background: #1d1a2b; border-radius: 14px; padding: 8px; }
.plan-canvas svg { width: 100%; height: auto; max-height: 72vh; display: block; touch-action: none; user-select: none; }
.plan-floor { fill: #2a2640; stroke: #3d3858; stroke-width: 2; }
.plan-grid { stroke: #3a3552; stroke-width: 0.6; }
.plan-decor rect, .plan-decor ellipse { fill: #4a4566; }
.plan-decor.d-wall rect { fill: #6c6790; }
.plan-decor.d-window rect { fill: #3f7c9a; }
.plan-decor.d-bar rect { fill: #5b4a3a; }
.plan-decor.d-door rect, .plan-decor .mark { fill: none; stroke: #8f89b5; stroke-width: 1.5; }
.plan-decor text { fill: #b9b4d6; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; pointer-events: none; }
.plan-decor.sel rect, .plan-decor.sel ellipse, .plan-table.sel .top { stroke: #fff; stroke-width: 2.5; }
.editing .plan-decor, .editing .plan-table { cursor: move; }
.plan-table { cursor: pointer; }
.plan-table .top { fill: #4b4762; stroke: #6d6890; stroke-width: 1.5; stroke-dasharray: 4 3; }
.plan-table .chair { fill: #5b5776; }
.plan-table .tname { fill: #fff; font-weight: 700; font-size: 15px; pointer-events: none; }
.plan-table .tsub { fill: #fff; opacity: .85; font-size: 10px; pointer-events: none; }
.plan-table:hover .top { filter: brightness(1.15); }
.st-res .top { fill: #8a6a12; stroke: #f2c14e; stroke-dasharray: none; } .st-res .chair { fill: #b8912a; }
.st-soon .top { stroke: #f2c14e; stroke-dasharray: 5 3; stroke-width: 2; }
.st-busy .top { fill: #1f7a52; stroke: #43d18d; stroke-dasharray: none; } .st-busy .chair { fill: #2e9d6a; }
.st-late .top { fill: #8e2d36; stroke: #ff6b78; stroke-dasharray: none; } .st-late .chair { fill: #b84452; }
.st-bill .top { fill: #4b3a99; stroke: #9d8cff; stroke-dasharray: none; } .st-bill .chair { fill: #6a58c6; }
.chip.st-free i, .plan-dot.st-free { background: #6d6890; } .chip.st-res i, .plan-dot.st-res { background: #f2c14e; } .chip.st-busy i, .plan-dot.st-busy { background: #43d18d; }
.chip.st-late i, .plan-dot.st-late { background: #ff6b78; } .chip.st-bill i, .plan-dot.st-bill { background: #9d8cff; } .chip.st-soon i, .plan-dot.st-soon { background: transparent; border: 2px dashed #f2c14e; }
.plan-list { display: flex; flex-direction: column; gap: 6px; max-height: 70vh; overflow: auto; }
.plan-res { text-align: left; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.plan-res:hover { background: var(--accent-2); }
.plan-res.static { cursor: default; margin-top: 6px; }
.plan-info { display: grid; gap: 8px; }
.btn.active { background: var(--accent-2); }
/* Підбір страв */
.dish-picker { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 12px; min-height: 420px; }
.dish-groups { display: flex; flex-direction: column; gap: 2px; max-height: 60vh; overflow: auto; border-right: 1px solid var(--border); padding-right: 8px; }
.dish-groups button { text-align: left; border: 0; background: transparent; color: var(--text); padding: 6px 8px; border-radius: 7px; cursor: pointer; font: inherit; font-size: 13px; }
.dish-groups button:hover { background: var(--surface-2); }
.dish-groups button.active { background: var(--accent-2); font-weight: 600; }
.dish-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dish-items { max-height: 54vh; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.dish-item { display: grid; grid-template-columns: minmax(0, 1fr) 90px 130px; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; }
.dish-item:hover { background: var(--surface-2); }
.dish-item.on { background: var(--accent-2); }
.dish-name { cursor: pointer; }
.dish-price { text-align: right; font-variant-numeric: tabular-nums; }
.dish-qty { display: flex; gap: 4px; align-items: center; justify-content: flex-end; }
.dish-qty .input { width: 56px; padding: 4px 6px; text-align: center; }
@media (max-width: 700px) { .dish-picker { grid-template-columns: 1fr; } .dish-groups { flex-direction: row; flex-wrap: wrap; max-height: none; border: 0; } }
.tables-toggle { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 9px; padding: 9px 12px; cursor: pointer; font: inherit; font-size: 13px; }
.tables-toggle:hover { background: var(--surface-2); }
.tables-caret { transition: transform .15s; color: var(--text-2); }
.tables-toggle.open .tables-caret { transform: rotate(180deg); }
.tables-panel { border: 1px solid var(--border); border-top: 0; border-radius: 0 0 9px 9px; padding: 4px 12px 10px; margin-top: -4px; }
.tables-toggle.open { border-radius: 9px 9px 0 0; }
.halls { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.hall + .hall { border-top: 1px solid var(--border); }
.hall-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: var(--surface); color: var(--text); padding: 9px 12px; cursor: pointer; font: inherit; font-size: 13px; }
.hall-head:hover { background: var(--surface-2); }
.hall.open .hall-head { background: var(--surface-2); }
.hall.open .tables-caret { transform: rotate(180deg); }
.hall-body { padding: 8px 12px 10px; }
