:root {
  --ink:#221e1a;
  --paper:#f5f2eb;
  --card:#fffefb;
  --wood:#8b5935;
  --line:#ded8cd;
  --muted:#6d665d;
  --green:#226341;
  --green-bg:#e9f3eb;
  --red:#993b32;
  --red-bg:#faece8;
  --gold:#a67320;
  --gold-bg:#fbf0d7;
  --shadow:0 12px 40px #2b21100d;
  --radius:18px
}
* {
  box-sizing:border-box
}
html {
  scroll-behavior:smooth
}
body {
  margin:0;
  color:var(--ink);
  background:var(--paper);
  font:16px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif
}
button,input,select,textarea {
  font:inherit
}
button,a,input,select,textarea {
  -webkit-tap-highlight-color:transparent
}
button {
  cursor:pointer
}
button:disabled {
  opacity:.45;
  cursor:not-allowed
}
button,a {
  touch-action:manipulation
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible {
  outline:3px solid #ad794c;
  outline-offset:3px
}
input,select,textarea {
  min-width:0;
  width:100%;
  padding:12px 13px;
  border:1px solid #bfb6a8;
  border-radius:10px;
  background:#fff;
  color:var(--ink);
  min-height:46px;
  font-size:16px
}
textarea {
  resize:vertical;
  min-height:110px;
  line-height:1.55
}
input[type=checkbox] {
  width:21px;
  height:21px;
  min-height:21px;
  padding:0;
  accent-color:var(--green)
}
input[type=date] {
  max-width:180px
}
input[readonly],textarea[readonly] {
  background:#f6f3ed;
  color:#514b43
}
label {
  font-weight:650;
  font-size:14px
}
a {
  color:inherit;
  text-underline-offset:3px
}
h1,h2,h3,p {
  margin:0
}
h1 {
  font-size:clamp(28px,3vw,42px);
  line-height:1.2;
  font-weight:720;
  letter-spacing:-.02em
}
h2 {
  font-size:23px;
  line-height:1.3;
  font-weight:700;
  letter-spacing:-.01em
}
h3 {
  font-size:18px;
  line-height:1.4
}
p+p {
  margin-top:10px
}
[hidden] {
  display:none!important
}
.small {
  font-size:13px
}
.muted {
  color:var(--muted)
}
.eyebrow {
  font-size:11px;
  letter-spacing:.13em;
  text-transform:uppercase;
  color:var(--wood);
  font-weight:750;
  margin-bottom:8px
}
.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 16px;
  min-height:44px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--card);
  color:var(--ink);
  font-weight:650;
  font-size:14px;
  line-height:1.35;
  text-decoration:none;
  transition:background .15s,box-shadow .15s
}
.button:hover {
  background:#eee8dd
}
.button.primary {
  background:var(--ink);
  border-color:var(--ink);
  color:#fff
}
.button.primary:hover {
  background:#44362a
}
.button.success {
  background:var(--green);
  border-color:var(--green);
  color:white
}
.button.whatsapp {
  background:#e5f4e9;
  color:#125630;
  border-color:#bbd7c3
}
.button.danger-outline {
  color:var(--red);
  border-color:#d4a9a0;
  background:#fff9f5
}
.button.subtle {
  background:transparent
}
.button.icon {
  min-width:44px;
  padding:8px;
  font-size:23px;
  flex-shrink:0
}
.button.is-active {
  background:var(--ink);
  color:#fff;
  border-color:var(--ink)
}
.button-group {
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap
}
.notice {
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#eee9de;
  color:#574c3c;
  margin:12px 0;
  font-size:14px
}
.notice.danger {
  color:#7a2c25;
  background:var(--red-bg);
  border-color:#e4bfb5
}
.notice.success {
  color:var(--green);
  background:var(--green-bg);
  border-color:#c3d9c7
}
.notice.warning {
  color:#735211;
  background:var(--gold-bg);
  border-color:#e7d6a5
}
.skip-link {
  position:fixed;
  top:-80px;
  left:12px;
  z-index:90;
  padding:12px;
  background:white
}
.skip-link:focus {
  top:12px
}
.app-header {
  background:var(--ink);
  color:#fff;
  border-bottom:1px solid #ffffff1c
}
.header-inner {
  max-width:1520px;
  margin:auto;
  padding:16px 30px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px
}
.brand {
  display:flex;
  align-items:baseline;
  gap:18px;
  text-decoration:none;
  font-size:35px;
  font-weight:750;
  line-height:1.15;
  letter-spacing:-.02em
}
.brand span {
  font-size:10px;
  font-weight:600;
  letter-spacing:.18em;
  color:#d4c7b5
}
.header-actions {
  display:flex;
  gap:12px;
  align-items:center
}
.header-link {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:8px 12px;
  border:1px solid #ffffff22;
  border-radius:10px;
  background:transparent;
  color:#fff;
  text-decoration:none;
  font-size:13px
}
.user-name {
  font-size:13px;
  color:#d6cec3
}
.app-shell {
  max-width:1520px;
  margin:auto;
  padding:30px
}
.page-heading {
  display:flex;
  gap:20px;
  align-items:center;
  justify-content:space-between
}
.page-heading .muted {
  margin-top:9px
}
.heading-actions {
  display:flex;
  gap:10px
}
.connection-line {
  display:flex;
  align-items:center;
  gap:7px;
  color:var(--muted);
  font-size:12px;
  margin:17px 0
}
.sync-dot {
  width:7px;
  height:7px;
  background:#b49e77;
  border-radius:50%
}
.sync-dot.ok {
  background:var(--green)
}
.sync-dot.error {
  background:var(--red)
}
.service-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:15px 18px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:var(--shadow)
}
.date-controls {
  display:flex;
  align-items:center;
  gap:7px
}
.date-label {
  display:flex;
  align-items:center;
  gap:10px
}
.date-label>span {
  font-size:12px;
  color:var(--muted);
  font-weight:550
}
.date-label input {
  border:0;
  background:#f2eee6;
  font-weight:650
}
.slot-switch {
  display:flex;
  padding:4px;
  border:1px solid var(--line);
  background:#f1ede5;
  border-radius:12px;
  gap:4px
}
.slot-switch button {
  min-width:120px;
  min-height:47px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--muted);
  font-weight:750;
  font-size:17px;
  padding:5px 16px
}
.slot-switch button span {
  display:block;
  font-size:10px;
  font-weight:500;
  line-height:1.3
}
.slot-switch button.active {
  background:var(--ink);
  color:white
}
.day-banner {
  padding:12px 16px;
  margin-top:12px;
  border-radius:12px;
  background:var(--red-bg);
  color:var(--red);
  border:1px solid #e1b5ab;
  font-size:14px
}
.metrics {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin:20px 0 25px
}
.metric {
  padding:18px 20px;
  background:var(--card);
  border-radius:14px;
  border:1px solid var(--line);
  display:flex;
  flex-direction:column;
  gap:3px
}
.metric strong {
  font-size:30px;
  line-height:1.15;
  font-weight:700
}
.metric span {
  font-size:13px;
  font-weight:650
}
.metric small {
  font-size:11px;
  color:var(--muted)
}
.workspace-tabs {
  display:flex;
  gap:5px;
  border-bottom:1px solid var(--line);
  margin-bottom:24px;
  overflow-x:auto
}
.workspace-tabs button {
  border:0;
  border-bottom:3px solid transparent;
  border-radius:8px 8px 0 0;
  background:transparent;
  padding:14px 20px;
  white-space:nowrap;
  min-height:49px;
  color:var(--muted);
  font-weight:650
}
.workspace-tabs button.active {
  border-bottom-color:var(--wood);
  color:var(--ink);
  background:#ece5d9
}
.count {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  min-height:24px;
  padding:2px 7px;
  background:#e8e1d5;
  color:#514434;
  border-radius:7px;
  font-size:12px;
  font-weight:750;
  vertical-align:middle
}
.workspace-tabs .count {
  margin-left:7px
}
.section-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  margin-bottom:14px
}
.section-heading .muted {
  margin-top:5px
}
.section-gap {
  margin-top:32px
}
.status-pill {
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:4px 9px;
  border-radius:7px;
  background:#ebe6dc;
  color:#5a4f3f;
  font-size:11px;
  font-weight:700;
  white-space:nowrap
}
.status-pill.pending {
  background:var(--gold-bg);
  color:#7a5716
}
.status-pill.confirmed,.status-pill.available {
  background:var(--green-bg);
  color:var(--green)
}
.status-pill.rejected,.status-pill.cancelled,.status-pill.full {
  background:var(--red-bg);
  color:var(--red)
}
.room-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:22px;
  align-items:start
}
.room-main {
  min-width:0
}
.map-actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin:15px 0
}




.map-stage {
  position:absolute;
  top:0;
  left:0;
  width:1600px;
  height:1432px;
  transform-origin:top left
}
.map-stage>img {
  display:block;
  position:absolute;
  inset:0;
  width:1600px;
  height:1432px;
  user-select:none;
  pointer-events:none
}
.table-node {
  position:absolute;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:center;
  border:3px solid #aba18e;
  border-radius:12px;
  background:#fffdf7;
  box-shadow:0 3px 4px #0000000c;
  color:var(--ink);
  padding:4px;
  transition:background .15s,border-color .15s;
  user-select:none
}
.table-node.occupied {
  background:#e1eee3;
  border-color:#447252
}
.table-node.grouped {
  border-style:double;
  border-width:5px;
  border-color:#a27c38
}
.table-node.selected {
  outline:5px solid #b67535;
  outline-offset:4px;
  background:#f8e6c6
}
.table-node.dragging {
  z-index:5;
  box-shadow:0 10px 30px #0003;
  opacity:.92
}
.table-node .table-open {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  min-width:0;
  min-height:0;
  flex:1;
  background:none;
  border:0;
  color:inherit;
  padding:4px;
  text-align:center;
  overflow:hidden
}
.table-node .table-title {
  font-weight:750;
  font-size:calc(16px / var(--scale));
  line-height:1.2;
  white-space:nowrap;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis
}
.table-node .table-capacity {
  font-size:calc(10px / var(--scale));
  line-height:1.3;
  white-space:nowrap;
  color:#625b4b
}
.table-node .table-guest {
  font-size:calc(10px / var(--scale));
  line-height:1.3;
  white-space:nowrap;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  font-weight:600;
  color:#245634
}
.table-node .drag-handle {
  min-height:calc(44px / var(--scale));
  background:#ddd0ba;
  border:0;
  border-radius:5px;
  padding:0;
  line-height:1;
  font-size:calc(18px / var(--scale));
  touch-action:none;
  cursor:grab;
  flex-shrink:0
}
.map-stage.moving .table-capacity,.map-stage.moving .table-guest,.map-stage.compact .table-capacity,.map-stage.compact .table-guest {
  display:none
}
.map-legend {
  display:flex;
  gap:17px;
  flex-wrap:wrap;
  align-items:center;
  margin:12px 0;
  color:var(--muted);
  font-size:11px
}
.map-legend span {
  display:flex;
  align-items:center;
  gap:6px
}
.legend-dot {
  display:inline-block;
  width:11px;
  height:11px;
  border:1px solid #a79881;
  border-radius:3px
}
.legend-dot.free {
  background:#fffdf7
}
.legend-dot.occupied {
  background:#c9e2cd;
  border-color:#447252
}
.legend-dot.grouped {
  background:#f6e8cd;
  border-color:#a27c38
}
.layout-actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:17px 0 10px
}
.assignment-sidebar {
  border:1px solid var(--line);
  background:var(--card);
  border-radius:18px;
  overflow:hidden
}
.assignment-section {
  padding:19px
}
.assignment-section+.assignment-section {
  border-top:1px solid var(--line)
}
.assignment-section h2 {
  font-size:19px
}
.assignment-section>.muted {
  margin:-6px 0 15px
}
.booking-stack {
  display:grid;
  gap:10px
}
.booking-card {
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:17px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--card);
  min-width:0
}
.booking-card.pending {
  border-left:4px solid #c99d46
}
.booking-card.compact {
  padding:13px;
  gap:7px;
  background:#f8f5ee
}
.booking-card h3 {
  font-size:17px;
  overflow-wrap:anywhere;
  letter-spacing:0
}
.card-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px
}
.card-meta {
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:12px
}
.card-meta strong {
  color:var(--ink)
}
.card-note {
  font-size:12px;
  color:#5b5147;
  overflow-wrap:anywhere;
  white-space:pre-wrap;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden
}
.card-tables {
  font-size:12px;
  font-weight:650;
  color:var(--green)
}
.card-warning {
  font-size:12px;
  color:#895718
}
.card-actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap
}
.card-actions .button {
  flex:1;
  min-width:70px;
  font-size:12px;
  min-height:44px;
  padding:8px
}
.booking-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px
}
.empty-state {
  border:1px dashed #cfc5b4;
  background:#f8f5ee;
  border-radius:13px;
  padding:22px 18px;
  color:var(--muted);
  font-size:13px;
  grid-column:1/-1
}
.table-list-details {
  margin-top:22px;
  border:1px solid var(--line);
  border-radius:13px;
  background:var(--card)
}
.table-list-details summary {
  padding:14px 16px;
  min-height:48px;
  cursor:pointer;
  font-size:14px;
  font-weight:650
}
.table-list {
  padding:0 12px 12px;
  display:grid;
  gap:8px;
  grid-template-columns:repeat(2,minmax(0,1fr))
}
.table-list-row {
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:space-between;
  padding:11px;
  border-radius:10px;
  background:#f1ece2;
  font-size:13px;
  min-width:0
}
.table-list-row>div {
  min-width:0
}
.table-list-row strong {
  display:block;
  overflow-wrap:anywhere
}
.table-list-row small {
  overflow-wrap:anywhere;
  display:block;
  color:var(--muted);
  font-size:11px
}
.search-label {
  display:block;
  max-width:430px;
  margin-bottom:18px;
  color:var(--muted);
  font-size:12px
}
.search-label input {
  margin-top:5px
}
.user-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin-top:20px
}
.user-card {
  padding:20px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  display:grid;
  gap:10px
}
.user-card.inactive {
  background:#eeebe4
}
.user-card .button {
  width:100%
}
.user-card h3 {
  overflow-wrap:anywhere
}
.app-footer {
  display:flex;
  justify-content:space-between;
  gap:20px;
  border-top:1px solid var(--line);
  padding-top:18px;
  margin-top:36px;
  font-size:11px;
  color:var(--muted)
}
dialog {
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:22px;
  padding:0;
  background:var(--card);
  box-shadow:0 25px 100px #0005
}
dialog::backdrop {
  background:#17130fd1;
  backdrop-filter:blur(3px)
}
.detail-dialog {
  width:min(720px,calc(100vw - 28px));
  max-height:calc(100dvh - 28px);
  overflow:auto
}
.dialog-header {
  position:sticky;
  top:0;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:15px;
  padding:23px 26px 18px;
  background:var(--card);
  border-bottom:1px solid var(--line);
  z-index:2
}
.dialog-header h2 {
  font-size:25px;
  overflow-wrap:anywhere
}
.dialog-header .eyebrow {
  margin-bottom:5px
}
.dialog-content {
  padding:22px 26px 28px
}
.dialog-content label {
  display:block;
  margin-bottom:6px
}
.dialog-content .checkbox-row {
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  font-weight:600;
  font-size:14px;
  margin-bottom:12px
}
.dialog-content .checkbox-row input {
  width:21px;
  flex-shrink:0
}
.form-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px
}
.form-grid .full {
  grid-column:1/-1
}
.form-stack {
  display:grid;
  gap:10px
}
.form-stack .button {
  margin-top:9px
}
.dialog-section {
  margin-top:23px;
  padding-top:21px;
  border-top:1px solid var(--line)
}
.dialog-section h3 {
  margin-bottom:11px
}
.dialog-actions {
  display:flex;
  gap:9px;
  justify-content:flex-end;
  flex-wrap:wrap;
  margin-top:20px
}
.dialog-actions .button {
  flex:1;
  min-width:100px
}
.booking-facts {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
.booking-facts>div {
  background:#f0ebe2;
  padding:11px 13px;
  border-radius:10px;
  font-size:14px;
  overflow-wrap:anywhere
}
.booking-facts small {
  display:block;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--muted);
  margin-bottom:4px
}
.booking-note {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  padding:14px;
  background:#f4f0e7;
  border-radius:12px;
  font-size:14px;
  margin-top:14px
}
.message-block+.message-block {
  margin-top:18px
}
.message-block .button {
  margin-top:8px
}
.message-hint {
  margin-bottom:16px;
  color:var(--muted);
  font-size:13px
}
.field-help {
  font-size:12px;
  color:var(--muted);
  margin-top:5px
}
.dialog-error {
  margin:14px 0 0
}
.confirm-dialog {
  width:min(460px,calc(100vw - 28px));
  padding:25px
}
.confirm-dialog h2 {
  font-size:23px;
  margin-bottom:12px
}
.confirm-dialog p {
  color:var(--muted);
  font-size:14px
}
.toast {
  position:fixed;
  bottom:22px;
  right:22px;
  z-index:100;
  background:var(--ink);
  color:#fff;
  padding:14px 19px;
  border-radius:13px;
  box-shadow:0 8px 28px #0004;
  max-width:min(500px,calc(100vw - 28px));
  font-size:14px;
  pointer-events:none
}
.login-page {
  min-height:100dvh;
  display:grid;
  place-items:center;
  padding:25px 15px;
  background:#221e1a
}
.login-card {
  width:min(450px,100%);
  background:var(--paper);
  border:1px solid #4d4234;
  border-radius:24px;
  padding:35px
}
.login-card .brand {
  margin-bottom:34px
}
.login-card .brand span {
  color:var(--wood)
}
.login-card h1 {
  font-size:32px;
  margin-bottom:8px
}
.login-card .form-stack {
  margin-top:25px
}
.login-card label {
  margin-top:4px
}
.login-card .button {
  width:100%
}
.back-link {
  display:block;
  text-align:center;
  margin-top:22px;
  font-size:13px;
  color:var(--muted)
}
@media(min-width:1500px) {
  
}
@media(max-width:1150px) {
  .app-shell {
    padding:22px
  }
  .header-inner {
    padding:14px 22px
  }
  .service-toolbar {
    flex-wrap:wrap
  }
  .service-toolbar .slot-switch {
    margin-left:auto
  }
  .room-layout {
    grid-template-columns:minmax(0,1fr) 290px
  }
  .assignment-section {
    padding:16px
  }
  .booking-grid,.user-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .metrics {
    gap:10px
  }
  .metric {
    padding:16px
  }
  .date-label>span {
    display:none
  }
  .page-heading h1 {
    font-size:32px
  }
  .heading-actions {
    flex-direction:column
  }
  .heading-actions .button {
    min-height:42px
  }
}
@media(max-width:860px) {
  .room-layout {
    grid-template-columns:1fr
  }
  .assignment-sidebar {
    display:grid;
    grid-template-columns:1fr 1fr
  }
  .assignment-section+.assignment-section {
    border-top:0;
    border-left:1px solid var(--line)
  }
  .heading-actions {
    flex-direction:row
  }
  .page-heading {
    align-items:flex-start;
    flex-direction:column;
    gap:15px
  }
  
  .table-list {
    grid-template-columns:repeat(3,minmax(0,1fr))
  }
  .service-toolbar {
    gap:12px
  }
  .service-toolbar .slot-switch {
    margin-left:0
  }
  .service-toolbar>#blockDayBtn {
    margin-left:auto
  }
  .user-name {
    display:none
  }
  .metric span {
    font-size:12px
  }
  .metric small {
    font-size:10px
  }
}
@media(max-width:600px) {
  .app-shell {
    padding:20px 14px 28px
  }
  .header-inner {
    padding:12px 14px
  }
  .brand {
    font-size:31px;
    gap:10px
  }
  .brand span {
    font-size:8px;
    letter-spacing:.12em
  }
  .header-actions {
    gap:7px
  }
  .header-link {
    font-size:12px;
    padding:8px 10px
  }
  .page-heading h1 {
    font-size:29px;
    letter-spacing:-.01em
  }
  .page-heading>.heading-actions {
    width:100%
  }
  .heading-actions .button {
    flex:1;
    font-size:12px;
    padding:10px
  }
  .connection-line {
    margin:14px 0
  }
  .service-toolbar {
    padding:12px;
    gap:12px
  }
  .date-controls {
    width:100%;
    justify-content:space-between;
    gap:4px
  }
  .date-label {
    flex:1
  }
  .date-label input {
    max-width:none;
    width:100%;
    padding:10px 8px;
    font-size:15px
  }
  .date-controls .button.subtle {
    padding:8px 9px
  }
  .service-toolbar .slot-switch {
    flex:1
  }
  .slot-switch button {
    min-width:0;
    flex:1;
    padding:7px 10px;
    font-size:17px
  }
  .slot-switch {
    width:100%
  }
  .service-toolbar>#blockDayBtn {
    width:100%;
    margin:0;
    min-height:44px
  }
  .metrics {
    grid-template-columns:repeat(2,1fr);
    margin:14px 0 20px;
    gap:8px
  }
  .metric {
    padding:14px 13px
  }
  .metric strong {
    font-size:26px
  }
  .workspace-tabs {
    margin-bottom:20px
  }
  .workspace-tabs button {
    padding:12px 13px;
    font-size:13px;
    min-height:48px
  }
  .workspace-tabs .count {
    margin-left:4px
  }
  .section-heading {
    gap:10px;
    align-items:flex-start
  }
  .section-heading h2 {
    font-size:21px
  }
  .map-actions .button-group {
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr
  }
  .map-actions .button-group .button {
    font-size:12px;
    padding:9px 10px
  }
  
  
  
  .map-legend {
    gap:12px
  }
  .layout-actions {
    display:grid;
    grid-template-columns:1fr
  }
  .layout-actions .button {
    font-size:13px
  }
  .assignment-sidebar {
    grid-template-columns:1fr
  }
  .assignment-section+.assignment-section {
    border-left:0;
    border-top:1px solid var(--line)
  }
  .assignment-section {
    padding:18px
  }
  .table-list {
    grid-template-columns:1fr
  }
  .booking-grid,.user-grid {
    grid-template-columns:1fr
  }
  .booking-card {
    padding:16px
  }
  .booking-card.compact {
    padding:13px
  }
  .card-actions .button {
    font-size:13px
  }
  .day-banner {
    font-size:13px
  }
  .app-footer {
    flex-direction:column;
    gap:5px
  }
  .detail-dialog {
    max-height:calc(100dvh - 16px);
    width:calc(100vw - 16px);
    border-radius:19px
  }
  .dialog-header {
    padding:18px 18px 15px
  }
  .dialog-header h2 {
    font-size:23px
  }
  .dialog-content {
    padding:18px
  }
  .dialog-actions .button {
    min-height:46px
  }
  .form-grid {
    gap:13px
  }
  .booking-facts {
    gap:9px
  }
  .booking-facts>div {
    padding:10px;
    font-size:13px
  }
  .dialog-content .form-grid.mobile-stack {
    grid-template-columns:1fr
  }
  .dialog-content .form-grid.mobile-stack .full {
    grid-column:auto
  }
  .dialog-actions {
    justify-content:stretch
  }
  .message-block .button {
    width:100%
  }
  .toast {
    right:14px;
    bottom:14px
  }
  .table-node .table-title {
    font-size:calc(15px / var(--scale))
  }
  .login-card {
    padding:28px
  }
  .confirm-dialog {
    padding:23px
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
    transition:none!important
  }
}
@media print {
  body {
    background:#fff
  }
  .app-header,.service-toolbar,.workspace-tabs,.heading-actions,.map-actions,.layout-actions,.assignment-sidebar,.app-footer,.metrics,.connection-line,.table-list-details {
    display:none!important
  }
  .room-layout {
    display:block
  }
  
  .app-shell {
    padding:0
  }
  .page-heading h1 {
    font-size:22px
  }
}
@media(max-width:360px) {
  .brand span {
    display:none
  }
  .app-shell {
    padding-left:10px;
    padding-right:10px
  }
}
.booking-grid>.full {
  grid-column:1/-1
}

.map-stage.compact .table-title {
  font-size:calc(12px / var(--scale));
}

/* Version 3: a proportional floor plan in the page, without pan or zoom. */
.room-layout { display:block; }
.room-map { width:100%; aspect-ratio:1600 / 1432; position:relative; overflow:hidden; background:#fffdf9; border:0; box-shadow:inset 0 0 0 1px var(--line); border-radius:12px; touch-action:pan-y; }
.room-map .map-stage { inset:0 auto auto 0; width:1600px; height:1432px; transform-origin:top left; }
.room-map .table-node .drag-handle { position:absolute; inset:0; width:100%; height:100%; min-height:0; border-radius:8px; background:#e8d9bf; font-size:calc(16px / var(--scale)); }
.room-map .map-stage.moving .table-open { visibility:hidden; }
.room-map .map-stage.compact .table-title { font-size:calc(11px / var(--scale)); }
.room-map .table-node { border-radius:10px; }
.assignment-sidebar { display:grid; grid-template-columns:1fr 1fr; margin-top:24px; }
.assignment-section+.assignment-section { border-top:0; border-left:1px solid var(--line); }
.table-list-details h3 { margin:18px 16px 4px; }
.table-list-details>p { margin:0 16px 16px; }
.table-list { grid-template-columns:repeat(4,minmax(0,1fr)); }
.table-list-row { align-items:flex-start; flex-direction:column; gap:12px; }
.table-list-row .table-row-actions { display:flex; gap:7px; flex-wrap:wrap; width:100%; }
.table-row-actions .button { flex:1; padding:8px; font-size:12px; }
.table-list-row small { font-size:12px; line-height:1.55; }
.table-list-row.selected { background:#f8e6c6; box-shadow:inset 0 0 0 2px #b67535; }
.heading-actions { flex-wrap:wrap; justify-content:flex-end; }
.capacity-strip { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; padding:18px 20px; border:1px solid var(--line); background:#eee8dc; border-radius:14px; }
.capacity-strip>div { display:flex; flex-direction:column; gap:3px; }
.capacity-strip strong { font-size:24px; line-height:1.2; }
.capacity-strip span { font-size:13px; font-weight:650; }
.capacity-strip small { font-size:11px; color:var(--muted); }
.capacity-note { font-size:12px; color:var(--muted); margin:10px 0 24px; }
.slot-switch button { min-width:140px; }
.slot-switch button span { max-width:180px; }
.manual-source { color:var(--wood); font-size:11px; font-weight:650; }
.booking-facts .first-slot-note { grid-column:1/-1; background:var(--gold-bg); }
@media(max-width:900px) { .table-list { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) {
  .assignment-sidebar { grid-template-columns:1fr; }
  .assignment-section+.assignment-section { border-left:0; border-top:1px solid var(--line); }
  .table-list { grid-template-columns:1fr; }
  .table-list-row { flex-direction:row; align-items:center; }
  .table-list-row .table-row-actions { flex:0 0 130px; flex-direction:column; }
  .capacity-strip { grid-template-columns:1fr; padding:16px; gap:16px; }
  .capacity-strip>div+div { border-top:1px solid #d6ccb9; padding-top:14px; }
  .capacity-strip strong { font-size:22px; }
  .heading-actions .button { flex:1 1 43%; }
  .heading-actions #manualBookingBtn { flex-basis:100%; }
  .slot-switch button { min-width:0; font-size:16px; padding:9px 5px; }
  .slot-switch button span { font-size:10px; max-width:145px; line-height:1.4; }
  .room-map .table-node { border-width:3px; padding:3px; }
}

.position-buttons { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
@media(max-width:600px) { .position-buttons { grid-template-columns:repeat(2,minmax(0,1fr)); } }
