:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --ink: #232323;
  --muted: #72706a;
  --line: #ddd8cf;
  --accent: #0f766e;
  --accent-dark: #0a5f58;
  --rose: #c75f74;
  --gold: #b9822f;
  --shadow: 0 18px 50px rgba(35, 35, 35, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button,
.file-picker {
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  padding: 8px 10px;
  line-height: 1;
  font-size: 14px;
}

button:hover,
.file-picker:hover {
  background: var(--accent-dark);
}

.app-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  height: 100vh;
}

.is-tables-mode .app-shell {
  grid-template-columns: 150px minmax(0, 1fr);
}

.is-client-view .app-shell,
.is-client-view.is-tables-mode .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

.is-client-view .sidebar,
.is-client-view .project-heading select,
.is-client-view #renameProjectBtn,
.is-client-view .bulk-panel,
.is-client-view #selectionBar,
.is-client-view #outputExportProjectBtn,
.is-client-view #outputExportCsvBtn,
.is-client-view #exportBtn {
  display: none;
}

.is-client-view .project-actions button:not(#saveBtn),
.is-client-view .project-actions label {
  display: none;
}

.is-client-view:not(.client-can-export-excel) #outputExportExcelBtn,
.is-client-view:not(.client-can-export-excel) #exportExcelBtn,
.is-client-view:not(.client-can-export-excel) #quickExportExcelBtn {
  display: none;
}

.is-client-view:not(.client-can-print) .output-panel:nth-child(n + 2) {
  display: none;
}

.is-client-locked .workspace {
  filter: blur(2px);
  pointer-events: none;
}

.is-client-locked #tableEditor,
.is-client-locked #printModal,
.is-client-locked #importModal,
.is-client-locked #dimensionsModal {
  display: none !important;
}

.is-client-view .workflow-tabs {
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 8px;
}

.is-client-view .workflow-tab-buttons {
  flex: 0 1 auto;
}

.is-client-view .workflow-tab-buttons button,
.is-client-view #saveBtn {
  min-height: 44px;
  padding: 11px 14px;
  font-weight: 900;
}

.is-client-view .project-actions {
  display: flex;
  flex: 0 0 auto;
  margin-left: 0;
}

.is-client-view .toolbar {
  display: block;
  top: 52px;
  margin-bottom: 8px;
  padding-bottom: 8px;
}

.is-client-view .project-heading {
  display: none;
}

.is-client-view .floor-toolstrip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.is-client-view .floor-toolstrip button {
  min-height: 44px;
  width: 100%;
}

.is-client-view .content-grid {
  grid-template-columns: minmax(0, 1fr) 260px;
}

.is-client-view .details-panel {
  top: 120px;
}

.is-client-view .table-editor-view.is-open {
  gap: 10px;
  padding: 14px;
}

.is-client-view .editor-layout {
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 12px;
}

.is-client-view .editor-print-preview,
.is-client-view .editor-guest-panel {
  padding: 12px;
}

.is-client-view .editor-print-preview .editor-diagram-frame {
  overflow: visible;
  margin: 0 auto;
}

.is-client-view .editor-print-preview .print-meta {
  margin: 10px auto 8px;
  font-size: 12px;
}

.is-client-view .editor-print-preview .print-seat-list {
  display: block;
  max-height: 26vh;
  overflow: auto;
  font-size: 12px;
}

.is-client-view .editor-print-preview .print-seat-list thead,
.is-client-view .editor-print-preview .print-seat-list tbody,
.is-client-view .editor-print-preview .print-seat-list tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.is-client-view .editor-guest-card {
  /*min-height: 54px;*/
  padding: 12px;
  cursor: default;
}

.is-client-view .editor-guest-card:not(.is-unavailable) {
  cursor: grab;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #fbfaf7;
  padding: 12px;
  overflow: auto;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 18px;
}

h2 {
  font-size: 16px;
}

.brand p,
.hint,
.eyebrow,
.status,
.panel-title span {
  color: var(--muted);
  font-size: 13px;
}

.panel,
.details-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(35, 35, 35, 0.05);
}

.panel + .panel {
  margin-top: 10px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.file-picker {
  display: block;
  width: 100%;
  text-align: center;
}

.file-picker input {
  display: none;
}

.hint {
  margin-top: 10px;
}

.import-summary {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfaf7;
  color: var(--muted);
  padding: 9px;
  font-size: 12px;
  line-height: 1.35;
}

.import-summary strong {
  color: var(--ink);
}

.import-summary ul {
  margin: 6px 0 0;
  padding-left: 16px;
}

.import-summary .warning {
  color: #9a5a00;
  font-weight: 800;
}

.icon-btn {
  background: #ece8df;
  color: var(--ink);
  padding: 8px 10px;
}

.icon-btn:hover {
  background: #ded8cc;
}

.sidebar-tools {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.sidebar-tools button,
.sidebar-tools label {
  width: 100%;
}

.cad-import-tool {
  display: none;
  cursor: pointer;
}

.cad-import-tool input {
  display: none;
}

.is-tables-mode .sidebar {
  padding: 10px 8px;
}

.is-tables-mode .brand {
  justify-content: center;
  margin-bottom: 10px;
}

.is-tables-mode .brand > div {
  display: none;
}

.is-tables-mode .brand-mark {
  width: 38px;
  height: 38px;
}

.is-tables-mode .sidebar-pane[data-modes="tables"] {
  padding: 8px;
}

.is-tables-mode .sidebar-pane[data-modes="tables"] .panel-title {
  justify-content: center;
  margin-bottom: 6px;
}

.is-tables-mode .sidebar-pane[data-modes="tables"] .panel-title h2 {
  font-size: 13px;
}

.is-tables-mode #floorInfoBox {
  margin-bottom: 8px;
  text-align: center;
  font-size: 11px;
  line-height: 1.25;
}

.is-tables-mode .sidebar-tools {
  gap: 6px;
  margin-top: 8px;
}

.tool-palette-btn {
  position: relative;
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 68px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  padding: 7px 3px 6px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
}

.tool-palette-btn:hover {
  border-color: var(--line);
  background: #f4f1ea;
}

.tool-palette-btn::before {
  content: "";
  display: block;
  width: 48px;
  height: 30px;
  border: 3px solid #7d7a73;
  background: #f8f6f1;
}

.tool-palette-btn::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  display: block;
  width: 6px;
  height: 6px;
  /*background: #f5a623;*/
  transform: translateX(-50%);
  box-shadow:
    -25px 0 #f5a623,
    25px 0 #f5a623,
    -25px 24px #f5a623,
    0 -11px #f5a623,
    0 38px #f5a623,
    25px 25px #f5a623
}

.tool-ruler::before {
  width: 50px;
  height: 12px;
  border: 0;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, #0f766e 0 4px, #dff7f1 4px 7px);
}

.tool-ruler::after,
.shape-row::after,
.venue-dance::after,
.venue-stage::after,
.venue-bar::after {
  display: none;
}

.cad-import-tool::before {
  width: 42px;
  height: 30px;
  border-radius: 3px;
  border-color: #0f766e;
  background:
    linear-gradient(90deg, transparent 48%, #0f766e 48% 52%, transparent 52%),
    linear-gradient(transparent 48%, #0f766e 48% 52%, transparent 52%),
    #f8f6f1;
}

.cad-import-tool::after {
  display: none;
}

.shape-rect::before {
  width: 34px;
  height: 34px;
}

.shape-head::before {
  width: 52px;
  height: 16px;
}

.shape-head::after {
  top: 12px;
  box-shadow:
    -24px -10px #f5a623,
    24px -10px #f5a623,
    0 -10px #f5a623
}

.shape-custom::before {
  width: 45px;
  height: 25px;
  /*border-radius: 999px;*/
}

.shape-custom::after {
  box-shadow: 
  -29px 4px #f5a623, 
   29px 4px #f5a623,   
   -29px 17px #f5a623, 
   -15px -11px #f5a623,  
   0 -11px #f5a623, 
   15px -11px #f5a623,  
   29px 17px #f5a623
}


.shape-circle::before {
  width: 42px;
  height: 42px;
  border-radius: 999px;
}

.shape-circle::after {
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  box-shadow:
    -28px 15px #f5a623,
    -17px -5px #f5a623,
    0 -11px #f5a623,
    17px -5px #f5a623,
    28px 15px #f5a623,
    20px 37px #f5a623,
    0 45px #f5a623,
    -20px 37px #f5a623
}

.shape-oval::after {
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  box-shadow:
    -33px 12px #f5a623,
    -23px -6px #f5a623,
    0 -11px #f5a623,
    23px -7px #f5a623,
    33px 12px #f5a623,
    24px 30px #f5a623,
    0 35px #f5a623,
    -24px 30px #f5a623
}

.shape-semi::before {
  width: 44px;
  height: 24px;
  border-radius: 44px 44px 4px 4px;
}

.shape-semi::after {
  top: 17px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  box-shadow:
    -26px 0 #f5a623,
    -15px -11px #f5a623,
    15px -11px #f5a623,
    26px 0 #f5a623,
    -11px 22px #f5a623,
    0 22px #f5a623,
    10px 22px #f5a623
}

.shape-serp::before {
  width: 62px;
  height: 42px;
  border: 0;
  background: center / contain no-repeat url("assets/half-serpentine.svg");
  transform: none;
}

.shape-serp::after {
  top: 15px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  box-shadow:
    -12px -7px #f5a623,
    -20px 1px #f5a623,
    -25px 15px #f5a623,
    -1px -12px #f5a623,
    21px -3px #f5a623,
    8px 13px #f5a623,
    2px 22px #f5a623
}

.shape-oval::before {
  width: 52px;
  height: 32px;
  border-radius: 999px;
}

.shape-row::before {
  width: 56px;
  height: 0;
  border: 0;
  border-top: 5px dashed #f5a623;
  background: transparent;
}

.venue-dance::before,
.venue-stage::before,
.venue-bar::before {
  width: 48px;
  height: 28px;
  border-radius: 6px;
}

.venue-dance::before {
  border-style: dashed;
  border-color: #0f766e;
  background: #dff7f1;
}

.venue-stage::before {
  border-style: dashed;
  border-color: #7c3aed;
  background: #ede9fe;
}

.venue-bar::before {
  border-style: dashed;
  border-color: #b9822f;
  background: #fff0c2;
}

.guest-list,
.table-list {
  display: grid;
  gap: 8px;
}

.bulk-panel {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfaf7;
  margin: 12px 0;
  overflow: hidden;
}

.bulk-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  list-style: none;
}

.bulk-summary::-webkit-details-marker {
  display: none;
}

.bulk-summary-icon {
  color: var(--muted);
  font-size: 14px;
  transition: transform 0.18s ease;
}

.bulk-panel[open] .bulk-summary-icon {
  transform: rotate(180deg);
}

.bulk-content {
  display: grid;
  gap: 10px;
  padding: 0 10px 10px;
}

.bulk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bulk-grid label {
  display: grid;
  gap: 5px;
}

.bulk-grid label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bulk-grid input,
.bulk-grid select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 8px;
}

.client-access-grid {
  display: grid;
  gap: 12px;
  width: 100%;
}

.client-access-grid label,
.client-permissions-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.client-access-grid input,
.client-access-grid select {
  width: 100%;
}

.client-access-grid .switch-row,
.client-access-grid .client-remember-row,
.client-permissions-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.client-access-grid .switch-row input,
.client-access-grid .client-remember-row input,
.client-permissions-grid input {
  width: auto;
}

.client-permissions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin-top: 14px;
}

.empty-state {
  color: var(--muted);
  font-size: 14px;
}

.guest-card {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 10px;
}

.guest-card.is-seated {
  opacity: 0.48;
}

.guest-name {
  font-weight: 700;
}

.guest-meta {
  color: var(--muted);
  font-size: 12px;
}

.workspace {
  min-width: 0;
  padding: 10px;
  overflow-x: hidden;
  overflow-y: auto;
}

.workflow-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--bg);
  padding: 2px 0 6px;
}

.workflow-tabs::before {
  content: "";
  position: absolute;
  left: -10px;
  right: -10px;
  top: -16px;
  height: 16px;
  background: var(--bg);
  pointer-events: none;
}

.workflow-tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-tab-buttons button {
  background: #ece8df;
  color: var(--ink);
  padding: 10px 12px;
}

.workflow-tab-buttons button.is-active {
  background: var(--accent);
  color: #fff;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 8px;
  position: sticky;
  top: 50px;
  z-index: 24;
  background: var(--bg);
  padding: 0 0 6px;
}

.toolbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
  background: var(--bg);
  pointer-events: none;
}

.project-heading {
  display: grid;
  grid-template-columns: auto minmax(150px, 240px);
  grid-template-areas:
    "eyebrow eyebrow"
    "title select";
  align-items: center;
  column-gap: 10px;
  row-gap: 4px;
  min-width: min(430px, 100%);
}

.project-heading .eyebrow {
  grid-area: eyebrow;
}

.project-title-row {
  grid-area: title;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.project-title-row h2 {
  min-width: 0;
}

.project-title-row .icon-btn {
  padding: 6px 8px;
  font-size: 12px;
}

#projectSelect {
  grid-area: select;
  width: min(240px, 100%);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 7px 8px;
}

.view-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.view-switch button {
  background: #ece8df;
  color: var(--ink);
}

.view-switch button.is-active {
  background: var(--accent);
  color: #fff;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 800;
}

.toolbar h2 {
  margin-top: 2px;
  font-size: 20px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.project-actions {
  margin-left: auto;
}

.mode-actions.is-hidden {
  display: none !important;
}

.toolbar-actions button,
.toolbar-file-btn {
  background: var(--ink);
  padding: 8px 9px;
  font-size: 13px;
}

.toolbar-actions button:hover,
.toolbar-file-btn:hover {
  background: #3a3a3a;
}

.toolbar-file-btn {
  border: 1px solid transparent;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

.toolbar-file-btn input {
  display: none;
}

.icon-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.icon-action::before {
  content: attr(data-icon);
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.floor-toolstrip .icon-action::before {
  background: #ece8df;
  color: var(--accent-dark);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 10px;
  align-items: start;
}

.is-hidden {
  display: none !important;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  max-width: min(360px, calc(100vw - 44px));
  border: 1px solid rgba(15, 118, 110, 0.35);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 14px 16px;
  box-shadow: 0 16px 36px rgba(35, 35, 35, 0.18);
  font-size: 14px;
  font-weight: 800;
}

.toast-success {
  border-color: rgba(15, 118, 110, 0.45);
  background: #f1fbf7;
}

.toast-error {
  border-color: rgba(161, 27, 27, 0.35);
  background: #fff1f1;
  color: #9b1c1c;
}

.guests-workspace {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  min-height: calc(100vh - 130px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.guests-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px auto auto;
  gap: 8px;
}

.guests-topbar input,
.guests-topbar select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px;
  background: #fff;
  color: var(--ink);
}

.columns-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 10px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  background: #eef6f4;
  padding: 10px;
}

.column-option {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(15, 118, 110, 0.1);
  border-radius: 7px;
  background: #ffffff;
  padding: 6px;
}

.column-option:nth-child(even) {
  background: #f8fcfb;
}

.column-option:hover {
  border-color: rgba(15, 118, 110, 0.35);
  background: #e4f3ef;
}

.column-order {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #d9eee9;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.column-option label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.column-option input {
  width: auto;
}

.column-move-actions {
  display: flex;
  gap: 5px;
}

.column-option button {
  min-width: 34px;
  padding: 6px 8px;
  font-weight: 900;
  background: #edf0ed;
  color: var(--ink);
}

.column-option button:hover {
  background: #dce8e4;
}

.guests-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.output-workspace {
  min-height: 0;
}

.output-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.output-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  box-shadow: 0 8px 24px rgba(35, 35, 35, 0.05);
}

.output-actions,
.output-options {
  display: grid;
  gap: 9px;
}

.output-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.output-options label:has(select) {
  display: grid;
  align-items: start;
  gap: 5px;
}

.output-options input {
  width: auto;
}

.output-options select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 9px;
}

.print-selected-summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.output-panel > button {
  margin-top: 12px;
  width: 100%;
}

.guests-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.guests-table th,
.guests-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  vertical-align: middle;
  font-size: 13px;
}

.guests-table tbody tr:nth-child(even) {
  background: rgba(244, 241, 234, 0.48);
}

.guests-table tbody tr:hover {
  background: #edf7f5;
}

.guests-table tbody tr.guest-new-row {
  background: #f5fbf9;
}

.guests-table thead th {
  position: sticky;
  top: 0;
  background: #f8f6f1;
  z-index: 1;
  text-align: left;
}

.guests-table input,
.guests-table select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: #fff;
}

.guest-actions {
  white-space: nowrap;
}

.guest-actions button {
  padding: 7px 10px;
  font-size: 12px;
}

.guest-actions .ghost-btn {
  background: #ece8df;
  color: var(--ink);
  margin-left: 6px;
}

.guest-actions .ghost-btn:hover {
  background: #ded8cc;
}

.floor-wrap {
  min-width: 0;
  position: sticky;
  top: 18px;
}

.floor-toolstrip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-self: end;
  gap: 6px;
  min-width: 0;
}

.floor-toolstrip button {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  padding: 7px 9px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(35, 35, 35, 0.06);
}

.floor-toolstrip button:hover {
  background: #ece8df;
}

#zoomResetBtn {
  min-width: 52px;
  background: var(--ink);
  color: #fff;
}

#zoomResetBtn:hover {
  background: #3a3a3a;
}

#magnifierBtn.is-active {
  border-color: rgba(15, 118, 110, 0.45);
  background: #dff7f1;
  color: var(--accent-dark);
}

.details-panel {
  position: sticky;
  top: 118px;
  max-height: calc(100vh - 132px);
  overflow: auto;
  align-self: start;
}

.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(15, 118, 110, 0.4);
  border-radius: 8px 8px 0 0;
  background: #e5f6f2;
  color: var(--accent-dark);
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 800;
}

.selection-bar.is-hidden {
  display: none;
}

.selection-bar button {
  background: #ffffff;
  color: var(--accent-dark);
  padding: 7px 10px;
}

.selection-rect {
  position: absolute;
  border: 2px solid var(--accent);
  background: rgba(15, 118, 110, 0.12);
  pointer-events: none;
  z-index: 20;
}

.selection-group-box {
  position: absolute;
  border: 2px dashed var(--accent);
  border-radius: 12px;
  background: rgba(15, 118, 110, 0.04);
  pointer-events: none;
  z-index: 5;
}

.selection-group-box span {
  position: absolute;
  left: 10px;
  top: -31px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.alignment-guide {
  position: absolute;
  pointer-events: none;
  z-index: 4;
}

.alignment-guide.is-horizontal {
  border-top: 2px solid rgba(58, 147, 255, 0.68);
  box-shadow:
    0 -18px 0 -17px rgba(58, 147, 255, 0.45),
    0 18px 0 -17px rgba(58, 147, 255, 0.45);
}

.alignment-guide.is-vertical {
  border-left: 2px solid rgba(58, 147, 255, 0.68);
  box-shadow:
    -18px 0 0 -17px rgba(58, 147, 255, 0.45),
    18px 0 0 -17px rgba(58, 147, 255, 0.45);
}

.floor-plan {
  position: relative;
  min-height: calc(100vh - 165px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(35, 35, 35, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 35, 35, 0.04) 1px, transparent 1px),
    #fffdf8;
  background-size: 32px 32px;
  overflow: auto;
  box-shadow: var(--shadow);
}

.floor-plan.has-magnifier {
  cursor: zoom-in;
}

.floor-magnifier {
  position: absolute;
  z-index: 40;
  display: none;
  width: 280px;
  height: 210px;
  border: 2px solid rgba(15, 118, 110, 0.85);
  border-radius: 12px;
  background: #fffdf8;
  box-shadow: 0 18px 44px rgba(35, 35, 35, 0.22);
  pointer-events: none;
  overflow: hidden;
}

.floor-magnifier.is-visible {
  display: block;
}

.floor-magnifier-label {
  position: absolute;
  right: 8px;
  top: 7px;
  z-index: 2;
  border-radius: 999px;
  background: rgba(35, 35, 35, 0.88);
  color: #fff;
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 900;
}

.floor-magnifier-content {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(35, 35, 35, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 35, 35, 0.04) 1px, transparent 1px),
    #fffdf8;
  background-size:
    calc(32px * var(--magnifier-zoom, 1)) calc(32px * var(--magnifier-zoom, 1)),
    calc(32px * var(--magnifier-zoom, 1)) calc(32px * var(--magnifier-zoom, 1)),
    auto;
  background-position:
    var(--magnifier-x, 0) var(--magnifier-y, 0),
    var(--magnifier-x, 0) var(--magnifier-y, 0),
    0 0;
}

.floor-magnifier-content::before,
.floor-magnifier-content::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  background: rgba(15, 118, 110, 0.9);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.floor-magnifier-content::before {
  width: 26px;
  height: 2px;
}

.floor-magnifier-content::after {
  width: 2px;
  height: 26px;
}

.floor-magnifier-clone {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: top left;
}

.floor-scene {
  position: relative;
  min-width: 100%;
  min-height: 100%;
  background:
    linear-gradient(rgba(35, 35, 35, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 35, 35, 0.035) 1px, transparent 1px),
    #e6e1d8;
  background-size: var(--grid-size, 32px) var(--grid-size, 32px);
}

.floor-content {
  position: absolute;
  left: 0;
  top: 0;
  border: 3px solid rgba(15, 118, 110, 0.52);
  border-radius: 8px;
  background:
    linear-gradient(rgba(35, 35, 35, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 35, 35, 0.045) 1px, transparent 1px),
    #fffdf8;
  background-size: 32px 32px;
  box-shadow: 0 0 0 14px rgba(15, 118, 110, 0.08), 0 18px 40px rgba(35, 35, 35, 0.1);
  box-sizing: border-box;
  transform: scale(var(--floor-zoom, 1));
  transform-origin: top left;
}

.floor-label {
  position: absolute;
  top: 14px;
  left: 14px;
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}

.table {
  position: absolute;
  cursor: move;
  pointer-events: none;
  user-select: none;
}

.venue-object {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px dashed #6b7280;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #2f343b;
  cursor: move;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  user-select: none;
  box-shadow: 0 12px 26px rgba(35, 35, 35, 0.1);
}

.venue-object.dance {
  border-color: #0f766e;
  background: rgba(223, 247, 241, 0.74);
  color: #0a5f58;
}

.venue-object.stage {
  border-color: #7c3aed;
  background: rgba(237, 233, 254, 0.78);
  color: #4c1d95;
}

.venue-object.bar {
  border-color: #b9822f;
  background: rgba(255, 246, 224, 0.78);
  color: #7c4f12;
}

.venue-object.is-selected {
  outline: 3px solid var(--accent);
  outline-offset: 7px;
  box-shadow: 0 0 0 8px rgba(15, 118, 110, 0.14), 0 12px 26px rgba(35, 35, 35, 0.1);
}

.table-inner {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  transition: transform 160ms ease;
}

.table.is-selected .table-inner::after {
  content: "";
  position: absolute;
  inset: -14px;
  border: 3px solid var(--accent);
  border-radius: 18px;
  pointer-events: none;
  z-index: 4;
  box-shadow: 0 0 0 7px rgba(15, 118, 110, 0.16);
}

.selection-index-badge {
  position: absolute;
  left: -20px;
  top: -20px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
  transform: rotate(var(--counter-rotation, 0deg));
  z-index: 8;
  box-shadow: 0 6px 18px rgba(35, 35, 35, 0.22);
}

.table-surface {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: var(--surface-width);
  height: var(--surface-height);
  border: 2px solid var(--ink);
  background: #fff;
  box-shadow: 0 10px 28px rgba(35, 35, 35, 0.16);
  text-align: center;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.table-surface.round {
  border-radius: 999px;
}

.table-surface.circle {
  border-radius: 999px;
}

.table-surface.oval {
  border-radius: 50%;
}

.table-surface.semi {
  border-radius: 999px 999px 0 0;
}

.table-surface.row {
  border-radius: 6px;
}

.table-surface.rect {
  border-radius: 7px;
}

.table-title {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  transform: rotate(var(--counter-rotation, 0deg));
}

.table-subtitle {
  display: inline-block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transform: rotate(var(--counter-rotation, 0deg));
}

.table-surface.g,
.table-surface.pi,
.table-surface.halfserp {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.shape-segment {
  position: absolute;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(35, 35, 35, 0.12);
}

.g .segment-main,
.pi .segment-main {
  left: 50%;
  top: 18px;
  width: var(--surface-width);
  height: 52px;
  transform: translateX(-50%);
}

.g .segment-left,
.pi .segment-left {
  left: 50%;
  top: 18px;
  width: 52px;
  height: var(--surface-height);
  transform: translateX(calc(var(--surface-width) / -2));
}

.g .segment-right,
.pi .segment-right {
  left: 50%;
  top: calc(var(--surface-height) - 34px);
  width: var(--surface-width);
  height: 52px;
  transform: translateX(-50%);
}

.g .segment-right {
  display: none;
}

.pi .segment-right {
  top: 18px;
  width: 52px;
  height: var(--surface-height);
  transform: translateX(calc(var(--surface-width) / 2 - 52px));
}

.halfserp .serp-svg {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--surface-width);
  height: var(--surface-height);
}

.halfserp .serp-shape {
  fill: #fff;
  fill-rule: evenodd;
  stroke: var(--ink);
  stroke-width: 2;
}

.shape-label {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  gap: 2px;
  min-width: 72px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 8px;
  transform: translate(-50%, -50%);
}

.halfserp .serp-label {
  transform: translate(-50%, -50%);
  min-width: 92px;
}

.seat {
  position: absolute;
  display: grid;
  align-content: center;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #9d9588;
  border-radius: 999px;
  background: #f8efe2;
  color: var(--ink);
  padding: 0;
  box-shadow: 0 5px 12px rgba(35, 35, 35, 0.14);
  cursor: copy;
  z-index: 2;
}

.seat:hover,
.seat.is-drop-target {
  border-color: var(--accent);
  background: #dff7f1;
}

.seat.is-filled {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.seat-number {
  display: block;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(var(--counter-rotation, 0deg));
}

.seat-guest {
  display: block;
  font-size: 8px;
  font-weight: 900;
  line-height: 0.92;
  text-align: center;
  overflow-wrap: anywhere;
  transform: rotate(var(--counter-rotation, 0deg));
}

.table-list-item {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: #fff;
}

.table-list-item.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.bulk-edit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}

.bulk-edit-grid label {
  display: grid;
  gap: 5px;
}

.bulk-edit-grid label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bulk-edit-grid input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 9px;
}

.table-editor {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfaf7;
  padding: 10px;
}

.field-label,
.editor-grid label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.table-switch-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

select,
.editor-grid input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 9px;
}

.editor-grid input:disabled {
  border-color: #e3ded5;
  background: #f0ede6;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 1;
}

.editor-grid {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
}

.editor-grid-single {
  grid-template-columns: 1fr;
}

.size-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.size-row-with-gap {
  margin-top: 8px;
}

.switch-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}

.switch-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  border: 1px solid #cfc8bc;
  border-radius: 999px;
  background: #e7e1d7;
  transition: background 140ms ease, border-color 140ms ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(35, 35, 35, 0.25);
  transition: transform 140ms ease;
}

.switch-field input:checked + .switch-track {
  border-color: var(--accent);
  background: var(--accent);
}

.switch-field input:checked + .switch-track::after {
  transform: translateX(16px);
}

.circle-size-grid {
  grid-template-columns: 1fr 1fr;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.checkbox-field input {
  width: auto;
}

.venue-editor-grid {
  grid-template-columns: 1fr 92px 92px;
}

.editor-grid label {
  display: grid;
  gap: 5px;
}

.editor-help {
  color: var(--muted);
  font-size: 13px;
}

.table-list-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 800;
}

.table-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 9px;
}

.editor-controls {
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.editor-controls .open-table-btn {
  grid-column: 1 / -1;
}

.rotate-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  grid-column: 1 / -1;
}

.editor-controls .danger-btn {
  grid-column: 1 / -1;
}

.table-controls button {
  background: #ece8df;
  color: var(--ink);
  padding: 10px 8px;
  font-size: 13px;
}

.table-controls button:hover {
  background: #ded8cc;
}

.table-controls .danger-btn {
  background: #f4d8d8;
  color: #8f1d1d;
}

.table-controls .danger-btn:hover {
  background: #edc3c3;
}

.table-controls .danger-btn.is-confirming {
  background: #8f1d1d;
  color: #fff;
}

.control-spacer {
  min-height: 41px;
}

.save-table-btn {
  width: 100%;
}

.table-editor-view {
  display: none;
}

.table-editor-view.is-open {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  background: var(--bg);
  padding: 22px;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(35, 35, 35, 0.38);
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-shell.admin-login-shell {
  background: var(--bg);
  z-index: 200;
}

.modal-card {
  width: min(680px, 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.modal-card h3 {
  margin: 0;
  font-size: 28px;
}

.import-modal-shell {
  align-items: start;
  overflow: auto;
}

.import-card {
  width: min(1180px, 100%);
  margin: 20px auto;
}

.import-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.import-options,
.import-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.import-options label {
  display: grid;
  gap: 5px;
}

.import-options label span,
.import-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.import-options select,
.import-options input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 9px;
}

.import-stat {
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfaf7;
  padding: 9px;
}

.import-summary-grid > div {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfaf7;
  padding: 10px;
}

.import-summary-grid strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.import-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.import-table-wrap {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.import-map-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.import-map-table th,
.import-map-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.import-map-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f2eee6;
}

.import-map-table thead tr + tr th {
  top: 35px;
  background: #fbfaf7;
}

.import-map-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #f2eee6;
}

.import-map-table tbody th {
  background: #fbfaf7;
  color: var(--muted);
}

.import-map-table select {
  min-width: 140px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 7px;
}

.import-warning {
  border: 1px solid #edc878;
  border-radius: 7px;
  background: #fff8e6;
  color: #8a5300;
  padding: 9px;
  font-size: 13px;
  font-weight: 800;
}

.project-load-card {
  width: min(760px, 100%);
}

.project-load-list {
  display: grid;
  gap: 8px;
}

.project-load-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  padding: 10px;
}

.project-load-item.is-active {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.project-load-item div {
  display: grid;
  gap: 4px;
}

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

.project-load-actions .danger-btn {
  background: #f4d8d8;
  color: #8f1d1d;
}

.project-load-actions .danger-btn:hover {
  background: #edc3c3;
}

.project-load-item span {
  color: var(--muted);
  font-size: 12px;
}

.modal-inline-status {
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 800;
}

.modal-inline-status.is-error {
  background: #f4d8d8;
  color: #8f1d1d;
}

.modal-inline-status.is-success {
  background: #dff2ec;
  color: #0b6f62;
}

.cad-size-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.cad-size-grid label {
  display: grid;
  gap: 4px;
}

.cad-size-grid label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cad-size-grid input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 8px;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal-grid label {
  display: grid;
  gap: 6px;
}

.modal-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.modal-grid input,
.modal-grid select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: #fff;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.editor-topbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
  padding-bottom: 8px;
}

.editor-topbar h2 {
  margin-top: 2px;
  font-size: 28px;
}

.editor-top-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 8px;
}

.editor-top-actions [data-action="close-editor"] {
  min-width: 128px;
  min-height: 42px;
}

.editor-top-actions button.is-active {
  background: var(--accent);
  color: #fff;
}

.editor-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 320px;
  gap: 18px;
  min-height: 0;
}

.editor-preview {
  position: relative;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(35, 35, 35, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 35, 35, 0.04) 1px, transparent 1px),
    #fffdf8;
  background-size: 32px 32px;
  overflow: auto;
  box-shadow: var(--shadow);
}

.editor-print-preview {
  min-height: 0;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ece8df;
  padding: 24px;
}

.print-sheet {
  width: min-content;
  min-width: 760px;
  margin: 0 auto;
  background: #fff;
  color: var(--ink);
  padding: 28px 34px 38px;
  box-shadow: 0 14px 34px rgba(35, 35, 35, 0.15);
}

.editor-diagram-canvas {
  height: min(68vh, 720px);
  min-height: 360px;
  overflow: auto;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(35, 35, 35, 0.12);
}

.editor-diagram-frame {
  position: relative;
  margin: 0 auto;
}

.editor-diagram-content {
  position: relative;
  transform-origin: top left;
}

.editor-table-details {
  margin-top: 16px;
  background: #fff;
  color: var(--ink);
  padding: 18px 22px 24px;
  box-shadow: 0 14px 34px rgba(35, 35, 35, 0.12);
}

.editor-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 0;
}

.editor-preview-toolbar button {
  min-width: 44px;
  padding: 7px 9px;
  background: #ece8df;
  color: var(--ink);
  font-weight: 900;
}

.editor-preview-toolbar span {
  min-width: 54px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  padding: 7px 9px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.print-diagram {
  position: relative;
  margin: 0 auto;
}

.print-table {
  cursor: default;
}

.print-seat {
  cursor: copy;
}

.seat-name-label {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #5a3f1e;
  font-weight: 800;
  line-height: 1.12;
  text-align: center;
  overflow-wrap: break-word;
  word-break: normal;
}

.seat-name-label.is-empty {
  color: rgba(35, 35, 35, 0.34);
}

.print-meta {
  display: grid;
  grid-template-columns: max-content minmax(260px, 1fr);
  gap: 7px 20px;
  width: min(560px, 100%);
  margin: 18px auto 28px;
  font-size: 16px;
}

.print-seat-list {
  width: min(720px, 100%);
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 15px;
}

.print-seat-list-wrap {
  width: min(940px, 100%);
  margin: 0 auto;
}

.print-seat-list-wrap.is-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.print-seat-list-wrap.is-two-column .print-seat-list {
  width: 100%;
}

.print-seat-list th,
.print-seat-list td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.print-seat-list th {
  font-size: 14px;
}

.print-modal-shell {
  align-items: start;
  overflow: auto;
}

.print-preview-shell {
  width: min(1240px, calc(100vw - 36px));
  margin: 18px auto;
}

.print-preview-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  margin-bottom: 10px;
}

.print-preview-toolbar > div {
  display: flex;
  gap: 8px;
}

.print-preview-content {
  display: grid;
  gap: 18px;
}

.print-page {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(35, 35, 35, 0.15);
  padding: 16px;
}

.floor-print-page {
  overflow: hidden;
  box-sizing: border-box;
}

.floor-print-page h1,
.floor-print-page p {
  margin: 0 0 5px;
}

.print-floor-host {
  width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  overflow: auto;
  border: 1px solid var(--line);
  background: #f8f6f1;
}

.print-floor-content {
  position: relative;
  transform-origin: top left;
}

.print-diagram-frame {
  position: relative;
  overflow: visible;
  margin: 0 auto;
}

.print-diagram-frame .print-diagram {
  transform-origin: top left;
}

.fit-floor-print .print-floor-content {
  transform: scale(var(--print-floor-scale, 1));
}

.fit-floor-print .print-floor-host {
  max-width: 100%;
  overflow: hidden;
}

.hide-seat-guests .seat-guest,
.hide-seat-numbers .seat-number,
.hide-venue-objects .venue-object {
  display: none !important;
}

.table-print-page {
  width: 100%;
  box-sizing: border-box;
  page-break-after: always;
  break-after: page;
  page-break-inside: avoid;
  break-inside: avoid;
  padding: 4px 8px;
}

.table-print-page .print-meta {
  margin: 4px auto 6px;
  font-size: 11px;
}

.table-print-page .print-seat-list {
  font-size: 9px;
}

.table-print-page .print-seat-list-wrap {
  width: min(1180px, 100%);
}

.table-print-page .print-seat-list th,
.table-print-page .print-seat-list td {
  padding: 1px 4px;
}

.muted-cell {
  color: var(--muted);
}

.editor-side {
  align-self: start;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(35, 35, 35, 0.08);
}

.editor-guest-panel {
  align-self: start;
  display: grid;
  gap: 12px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(35, 35, 35, 0.08);
}

#editorGuestSearch {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px;
}

.editor-touch-hint {
  border: 1px solid rgba(15, 118, 110, 0.25);
  border-radius: 7px;
  background: #e7f6f3;
  color: var(--accent-dark);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
}

.editor-guest-title-actions,
.editor-guest-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.editor-guest-title-actions .icon-btn,
.editor-guest-card-actions .icon-btn {
  background: #ece8df;
  color: var(--ink);
  padding: 7px 9px;
}

.editor-guest-card-actions {
  flex-wrap: wrap;
}

.editor-guest-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 190px);
  overflow: auto;
  border: 1px dashed transparent;
  border-radius: 8px;
  padding: 2px;
}

.editor-guest-list.is-drop-target {
  border-color: var(--accent);
  background: #dff7f1;
}

.editor-guest-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 10px;
  cursor: grab;
}

.editor-guest-card:active {
  cursor: grabbing;
}

.editor-guest-card.is-unavailable {
  background: #f0ede6;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.55;
}

.editor-guest-card.is-selected-for-seat {
  border-color: var(--accent);
  background: #dff7f1;
  box-shadow: inset 4px 0 0 var(--accent);
}

.seat-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(35, 35, 35, 0.36);
}

.seat-picker-sheet {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 91;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  width: min(620px, calc(100vw - 28px));
  max-height: min(76vh, 680px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 24px 70px rgba(35, 35, 35, 0.28);
  transform: translateX(-50%);
}

.seat-picker-sticky {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding-bottom: 12px;
}

.seat-picker-header,
.seat-picker-current {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.seat-picker-header h3 {
  margin: 2px 0 0;
  font-size: 24px;
}

.seat-picker-current {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  padding: 10px;
}

.seat-picker-current span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.seat-picker-search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
}

.seat-picker-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  min-height: 0;
  padding: 12px 2px 0 0;
  overscroll-behavior: contain;
}

.seat-picker-guest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  text-align: left;
}

.seat-picker-guest:hover {
  background: #edf7f5;
}

.seat-picker-guest span {
  display: grid;
  gap: 3px;
}

.seat-picker-guest small,
.seat-picker-guest em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.seat-picker-guest em {
  border-radius: 999px;
  background: #ece8df;
  padding: 5px 8px;
  white-space: nowrap;
}

.seat-picker-guest:not(.is-seated) em {
  background: #dff7f1;
  color: var(--accent-dark);
}

.guest-seat-label {
  border-radius: 999px;
  background: #ece8df;
  color: var(--muted);
  padding: 5px 8px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
}

.client-guest-card {
  width: min(720px, 100%);
}

.client-table-settings-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.client-table-settings {
  display: grid;
  gap: 12px;
  padding: 2px;
}

.client-guest-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.client-guest-form label {
  display: grid;
  gap: 6px;
}

.client-guest-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.client-guest-form input,
.client-guest-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 9px;
}

.client-guest-form textarea {
  min-height: 84px;
  resize: vertical;
}

.client-guest-form label:has(textarea) {
  grid-column: 1 / -1;
}

.editor-guest-card:not(.is-unavailable) .guest-seat-label {
  background: #dff7f1;
  color: var(--accent);
}

.editor-controls {
  margin-top: 0;
}

.seated-guests {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.status {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

@media (max-width: 980px) {
  .app-shell,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .toolbar {
    align-items: flex-start;
    flex-direction: column;
    top: 0;
  }

  .project-heading {
    grid-template-columns: 1fr;
    grid-template-areas:
      "eyebrow"
      "title"
      "select";
    min-width: 0;
    width: 100%;
  }

  .workflow-tabs {
    align-items: flex-start;
  }

  .view-switch {
    width: 100%;
  }

  .toolbar-actions {
    justify-content: flex-start;
  }

  .project-actions {
    margin-left: 0;
  }

  .floor-wrap {
    position: static;
  }

  .details-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .floor-plan {
    min-height: 560px;
  }

  .table-editor-view.is-open {
    overflow: auto;
  }

  .editor-topbar,
  .editor-layout {
    grid-template-columns: 1fr;
  }

  .editor-topbar {
    align-items: flex-start;
  }

  .editor-top-actions {
    grid-column: 1;
  }

  .editor-preview {
    min-height: 520px;
  }

  .editor-guest-list {
    max-height: 320px;
  }

  .guests-topbar {
    grid-template-columns: 1fr;
  }

  .output-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .is-client-view .workspace {
    padding: 8px;
  }

  .is-client-view .workflow-tabs,
  .is-client-view .toolbar {
    position: sticky;
  }

  .is-client-view .workflow-tabs {
    top: 0;
  }

  .is-client-view .toolbar {
    top: 58px;
    gap: 8px;
  }

  .is-client-view .floor-toolstrip {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    width: 100%;
  }

  .is-client-view .floor-toolstrip button {
    min-height: 42px;
  }

  .is-client-view .content-grid {
    grid-template-columns: 1fr;
  }

  .is-client-view .details-panel {
    max-height: 36vh;
    display: none;
  }

  .is-client-view .floor-plan {
    min-height: 62vh;
  }

  .is-client-view .table-editor-view.is-open {
    padding: 8px;
  }

  .is-client-view .editor-layout {
    grid-template-columns: 1fr;
  }

  .is-client-view .editor-side {
    display: none;
  }

  .is-client-view .editor-print-preview {
    order: 1;
    min-height: 58vh;
    padding: 12px;
  }

  .is-client-view .editor-diagram-canvas {
    height: 58vh;
    min-height: 320px;
  }

  .is-client-view .editor-guest-panel {
    order: 2;
  }

  .is-client-view .editor-guest-list {
    max-height: 30vh;
  }

  .is-client-view .editor-topbar h2 {
    font-size: 22px;
  }

  .is-client-view .editor-top-actions {
    width: 100%;
  }

  .is-client-view .editor-top-actions button,
  .is-client-view .editor-top-actions select {
    min-height: 42px;
    flex: 1 1 150px;
  }

  .seat-picker-sheet {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 82vh;
    border-radius: 14px 14px 0 0;
    transform: none;
  }

  .seat-picker-guest {
    min-height: 58px;
  }
}

@page {
  size: A4 landscape;
  margin: 8mm;
}

@media print {
  html,
  body {
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    background: #fff !important;
  }

  body > *:not(#printModal) {
    display: none !important;
  }

  #printModal {
    position: static !important;
    inset: auto !important;
    display: block !important;
    background: #fff !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  #printModal * {
    visibility: visible !important;
  }

  .print-preview-toolbar {
    display: none !important;
  }

  .print-preview-shell {
    width: auto !important;
    margin: 0 !important;
  }

  .print-preview-content {
    display: block !important;
  }

  .print-sheet,
  .print-page {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    page-break-after: always;
    break-after: page;
    page-break-inside: avoid;
    break-inside: avoid;
    margin: 0 !important;
  }

  .table-print-page {
    min-height: auto !important;
    overflow: hidden !important;
  }

  .print-floor-host {
    max-width: 100% !important;
    max-height: none !important;
    overflow: hidden !important;
    border: 0 !important;
  }

  .fit-floor-print .print-floor-content {
    transform: scale(var(--print-floor-scale, 1));
    transform-origin: top left;
  }
}

@media (max-width: 560px) {
  .sidebar,
  .workspace {
    padding: 14px;
  }

  .toolbar h2 {
    font-size: 23px;
  }

  .toolbar-actions button {
    flex: 1 1 calc(50% - 8px);
  }
}
