:root {
  --ink: #21170f;
  --ink-soft: #675542;
  --muted: #8a7967;
  --paper: #fffaf2;
  --ivory: #fff6e9;
  --cream: #f8ebd8;
  --champagne: #ead4ae;
  --champagne-soft: rgba(214, 174, 105, 0.2);
  --gold: #b68a3e;
  --gold-deep: #8f6728;
  --rose: #b9867d;
  --sage: #84916b;
  --line: rgba(122, 92, 50, 0.18);
  --shadow: 0 22px 80px rgba(94, 65, 30, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.88), transparent 24rem),
    radial-gradient(circle at 88% 3%, rgba(214, 174, 105, 0.24), transparent 22rem),
    radial-gradient(circle at 15% 92%, rgba(185, 134, 125, 0.15), transparent 24rem),
    linear-gradient(135deg, #fffaf2 0%, #f8ead6 50%, #fff7ed 100%);
  font-family: "Assistant", Arial, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.22;
  background-image:
    linear-gradient(90deg, rgba(143, 103, 40, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(143, 103, 40, 0.06) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: linear-gradient(180deg, transparent, #000 16%, #000 74%, transparent);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(122, 92, 50, 0.22);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  padding: 10px 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(182, 138, 62, 0.54);
  box-shadow: 0 0 0 4px rgba(182, 138, 62, 0.12);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Noto Serif Hebrew", "Times New Roman", serif;
  font-weight: 300;
}

.seating-app {
  width: min(1660px, calc(100% - 32px));
  margin-inline: auto;
  padding: 22px 0 36px;
}

.workspace-header {
  display: grid;
  grid-template-columns: minmax(180px, 0.48fr) minmax(320px, 1fr) minmax(220px, 0.55fr);
  gap: 22px;
  align-items: center;
  min-height: 132px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 250, 242, 0.48)),
    rgba(255, 246, 233, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-link {
  display: inline-grid;
  justify-self: start;
  text-align: center;
}

.brand-link span {
  color: var(--ink);
  font-family: "Noto Serif Hebrew", "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 4.2rem);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: 0.08em;
}

.brand-link small {
  margin-top: 6px;
  color: var(--gold-deep);
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.event-summary {
  justify-self: center;
  text-align: center;
}

.workspace-status,
.save-status,
.eyebrow {
  color: var(--gold-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.workspace-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 14px;
  border: 1px solid rgba(182, 138, 62, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

h1 {
  margin-top: 12px;
  font-size: clamp(2.15rem, 4vw, 4.7rem);
  line-height: 1.06;
}

.event-summary p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.workspace-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.save-status {
  min-height: 20px;
}

.soft-button,
.primary-button,
.text-button,
.danger-button,
.mini-button {
  border: 0;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.soft-button,
.mini-button {
  border: 1px solid rgba(182, 138, 62, 0.24);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
}

.soft-button,
.primary-button,
.text-button,
.danger-button {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
}

.primary-button {
  color: #fffaf2;
  background: linear-gradient(135deg, #b68a3e, #8f6728);
  box-shadow: 0 16px 34px rgba(143, 103, 40, 0.2);
}

.text-button {
  color: var(--gold-deep);
  background: transparent;
}

.danger-button {
  color: #8f4f4c;
  background: rgba(185, 134, 125, 0.12);
}

.mini-button {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
}

.soft-button:hover,
.soft-button:focus-visible,
.primary-button:hover,
.primary-button:focus-visible,
.mini-button:hover,
.mini-button:focus-visible {
  transform: translateY(-2px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none !important;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.stat-card,
.panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 250, 242, 0.52)),
    rgba(255, 246, 233, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stat-card {
  min-height: 104px;
  padding: 18px;
  border-radius: 24px;
}

.stat-card strong {
  display: block;
  font-family: "Noto Serif Hebrew", "Times New Roman", serif;
  font-size: clamp(1.75rem, 3vw, 3.1rem);
  font-weight: 300;
  line-height: 0.95;
  white-space: nowrap;
}

.stat-card span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.stat-import-button {
  color: var(--gold-deep);
  font-family: "Noto Serif Hebrew", "Times New Roman", serif;
  font-size: 1.2rem;
  line-height: 1.6;
  text-align: center;
}

.stat-import-button:hover,
.stat-import-button[aria-expanded="true"] {
  border-color: var(--gold);
  background: var(--paper);
}

.stat-import-button:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(540px, 1fr) minmax(300px, 360px);
  grid-template-areas: "hall guests";
  gap: 16px;
  align-items: start;
  direction: ltr;
  margin-top: 16px;
  position: relative;
}

.workspace-grid > * {
  direction: rtl;
}

/* Keep the existing map hooks available without showing the seating area. */
.workspace-grid.guests-only {
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.95fr);
  grid-template-areas: "guests details";
  direction: rtl;
}

.guest-import-panel[hidden],
.guest-add-panel[hidden] {
  display: none;
}

body:has(.guest-tool-dialog[open]) {
  overflow: hidden;
}

.guest-tool-dialog {
  position: fixed;
  inset: 0;
  width: clamp(340px, 26vw, 430px);
  max-width: calc(100vw - 24px);
  max-height: calc(100svh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow-y: auto;
  overscroll-behavior: contain;
}

#guestAddDialog {
  width: clamp(300px, 21vw, 360px);
}

.guest-tool-dialog::backdrop {
  background: rgba(33, 23, 15, 0.28);
  backdrop-filter: blur(2px);
}

.guest-dialog-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 8px 12px 0;
}

.guest-dialog-toolbar button {
  min-height: 36px;
  padding: 4px 8px;
  border-radius: 10px;
}

.guest-tool-dialog > .panel {
  width: 100%;
  margin: 0;
}

.manual-guest-feedback {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink-soft);
  background: var(--champagne-soft);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.manual-guest-feedback[data-tone="error"],
.manual-guest-feedback[data-tone="warning"] {
  color: #8f4f4c;
  border-color: rgba(185, 134, 125, 0.4);
  background: rgba(185, 134, 125, 0.12);
}

.manual-guest-feedback[data-tone="success"] {
  color: #49623a;
  border-color: rgba(132, 145, 107, 0.4);
  background: rgba(132, 145, 107, 0.12);
}

.guests-only > .guests-panel {
  position: static;
  max-height: none;
  overflow: visible;
}

.guest-add-panel {
  grid-area: add;
}

.guest-details-panel {
  grid-area: details;
  position: sticky;
  top: 16px;
}

.guest-details-panel .selected-strip {
  position: static;
  flex-direction: column;
  align-items: stretch;
  overflow-wrap: anywhere;
}

.guest-add-panel > .manual-form {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.guest-tool-dialog > .guest-import-panel {
  grid-area: import;
  margin-top: 0;
}

.guest-import-panel .settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guest-import-panel .settings-grid > label:last-child {
  grid-column: 1 / -1;
}

.guests-only .guest-list {
  max-height: min(65svh, 720px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
}

.hall-panel[hidden] {
  display: none;
}

.guests-panel {
  grid-area: guests;
}

.hall-panel {
  grid-area: hall;
}

.panel {
  min-width: 0;
  border-radius: 28px;
  padding: 20px;
}

.guests-panel {
  position: sticky;
  top: 16px;
  max-height: calc(100svh - 32px);
  overflow: auto;
}

.editor-panel {
  width: min(100%, 760px);
  padding: 12px;
  border: 1px solid rgba(122, 92, 50, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.44);
}

.editor-panel:not(.is-open) {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 250, 242, 0.66)),
    rgba(255, 246, 233, 0.76);
}

.editor-panel:not(.is-open) .table-details,
.editor-panel:not(.is-open) .table-editor,
.editor-panel:not(.is-open) .assignment-box,
.editor-panel:not(.is-open) .changes-panel,
.editor-panel:not(.is-open) .editor-close {
  display: none;
}

.editor-panel.is-open {
  background: rgba(255, 250, 242, 0.72);
}

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

.editor-panel:not(.is-open) .editor-heading {
  display: none;
}

.editor-heading h3 {
  font-size: clamp(1.08rem, 1.25vw, 1.34rem);
}

.editor-close {
  display: grid;
  width: 34px;
  aspect-ratio: 1;
  border: 1px solid rgba(122, 92, 50, 0.16);
  border-radius: 50%;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.58);
  font-size: 1.25rem;
  line-height: 1;
  place-items: center;
}

.editor-close:hover,
.editor-close:focus-visible {
  color: var(--gold-deep);
  border-color: rgba(182, 138, 62, 0.34);
  background: rgba(255, 250, 242, 0.88);
}

.editor-compact {
  display: grid;
  gap: 11px;
}

.editor-panel.is-open .editor-compact {
  display: none;
}

.editor-compact p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hall-element-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(122, 92, 50, 0.12);
}

.hall-element-form label {
  gap: 4px;
  font-size: 0.84rem;
}

.hall-element-form input {
  min-height: 38px;
  border-radius: 13px;
}

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.hall-heading {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(320px, 1fr);
  align-items: start;
}

.hall-heading > .editor-panel {
  justify-self: stretch;
}

.panel-heading.compact {
  margin-bottom: 10px;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
}

.panel-heading h2 {
  font-size: clamp(1.55rem, 2.2vw, 2.4rem);
}

.panel-heading h3 {
  font-size: 1.3rem;
}

.panel-heading p {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.selected-strip {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid rgba(122, 92, 50, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 242, 0.78)),
    rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 42px rgba(94, 65, 30, 0.1);
  backdrop-filter: blur(16px);
}

.selected-strip span,
.selected-strip small,
.selected-strip em {
  color: var(--muted);
}

.selected-strip strong {
  display: block;
  margin: 2px 0;
  font-size: 1.12rem;
}

.guest-name-button {
  width: fit-content;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.guest-name-button:hover,
.guest-name-button:focus-visible {
  color: var(--gold-deep);
}

.selected-strip em {
  font-style: normal;
}

.guest-rsvp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
}

.guest-rsvp-link {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid rgba(76, 128, 87, 0.22);
  border-radius: 999px;
  color: #3f7750;
  background: rgba(222, 242, 226, 0.58);
  font-size: 0.82rem;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.guest-rsvp-link:hover,
.guest-rsvp-link:focus-visible {
  border-color: rgba(76, 128, 87, 0.42);
  background: rgba(222, 242, 226, 0.86);
  transform: translateY(-1px);
}

.guest-rsvp-link.secondary {
  color: var(--muted);
  border-color: rgba(122, 92, 50, 0.16);
  background: rgba(255, 255, 255, 0.58);
}

.manual-rsvp-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  margin-top: 9px;
  padding: 8px;
  border: 1px solid rgba(122, 92, 50, 0.14);
  border-radius: 16px;
  background: rgba(255, 250, 242, 0.72);
}

.manual-rsvp-panel > span {
  flex-basis: 100%;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.manual-rsvp-button,
.manual-rsvp-close {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.82rem;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.manual-rsvp-button:hover,
.manual-rsvp-button:focus-visible,
.manual-rsvp-close:hover,
.manual-rsvp-close:focus-visible {
  transform: translateY(-1px);
}

.manual-rsvp-button.confirmed {
  color: #2f6b35;
  border-color: rgba(76, 139, 72, 0.24);
  background: #dff2d3;
}

.manual-rsvp-button.pending {
  color: var(--gold-deep);
  border-color: rgba(182, 138, 62, 0.24);
  background: rgba(214, 174, 105, 0.18);
}

.manual-rsvp-button.declined {
  color: #8f4f4c;
  border-color: rgba(185, 134, 125, 0.28);
  background: rgba(185, 134, 125, 0.16);
}

.manual-rsvp-close {
  color: var(--muted);
  border-color: rgba(122, 92, 50, 0.16);
  background: rgba(255, 255, 255, 0.62);
}

.guest-search {
  margin-top: 12px;
  color: var(--ink-soft);
}

.guest-search input {
  min-height: 44px;
  border-radius: 16px;
}

.manual-form,
.import-box,
.assignment-box,
.changes-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.guests-panel > .import-box {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.manual-form {
  display: grid;
  gap: 10px;
}

.manual-form h3,
.assignment-box h3 {
  font-size: 1.18rem;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-weight: 700;
}

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

#excelFile {
  display: none;
}

.upload-helper {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.seating-settings-form {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(182, 138, 62, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 250, 242, 0.48)),
    rgba(234, 212, 174, 0.14);
}

.settings-heading {
  display: grid;
  gap: 3px;
}

.settings-heading strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.settings-heading span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

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

.settings-grid label {
  font-size: 0.86rem;
}

.upload-template {
  margin: 8px 0 0;
  color: var(--gold-deep);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
}

.upload-area {
  display: grid;
  min-height: 88px;
  margin-top: 8px;
  border: 1px dashed rgba(182, 138, 62, 0.38);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.48);
  place-items: center;
  text-align: center;
  cursor: pointer;
}

.upload-area span {
  color: var(--ink);
  font-size: 1.02rem;
}

.upload-area small {
  color: var(--muted);
}

.import-summary {
  display: grid;
  gap: 4px;
  margin: 10px 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.import-note {
  color: var(--gold-deep);
}

.import-warning {
  color: #8f4f4c;
}

.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.import-actions .primary-button,
.import-actions .soft-button {
  flex: 1 1 130px;
}

.suggested-tables {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.suggested-tables.is-empty {
  display: none;
}

.suggested-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.suggested-heading h3 {
  font-size: 1.18rem;
}

.suggested-heading small {
  max-width: 12rem;
  color: var(--muted);
  line-height: 1.45;
}

.suggested-table-list {
  display: grid;
  gap: 10px;
}

.suggested-table-card {
  display: grid;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(182, 138, 62, 0.2);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(255, 250, 242, 0.5)),
    rgba(234, 212, 174, 0.16);
}

.suggested-card-top,
.suggested-stats,
.suggested-actions,
.suggested-guests li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.suggested-card-top span,
.suggested-capacity span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.suggested-card-top strong {
  display: block;
  margin-top: 3px;
  font-size: 1.02rem;
}

.suggested-capacity {
  min-width: 72px;
  padding: 8px 10px;
  border: 1px solid rgba(182, 138, 62, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.54);
  text-align: center;
}

.suggested-capacity strong {
  color: var(--gold-deep);
  font-family: "Noto Serif Hebrew", "Times New Roman", serif;
  font-size: 1.45rem;
  line-height: 1;
}

.suggested-stats {
  justify-content: flex-start;
  flex-wrap: wrap;
  color: var(--gold-deep);
  font-size: 0.88rem;
  font-weight: 700;
}

.suggested-warning {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(185, 134, 125, 0.24);
  border-radius: 15px;
  color: #8f4f4c;
  background: rgba(185, 134, 125, 0.1);
  font-size: 0.88rem;
  line-height: 1.45;
}

.suggested-guests {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.suggested-guests li {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 13px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.56);
}

.suggested-guests small {
  color: var(--muted);
}

.suggested-actions {
  flex-wrap: wrap;
}

.suggestion-approve,
.suggestion-split,
.suggestion-reject {
  flex: 1 1 120px;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.suggestion-approve {
  color: #fffaf2;
  background: linear-gradient(135deg, #b68a3e, #8f6728);
  box-shadow: 0 12px 26px rgba(143, 103, 40, 0.16);
}

.suggestion-split {
  color: var(--gold-deep);
  border-color: rgba(182, 138, 62, 0.28);
  background: rgba(255, 250, 242, 0.74);
}

.suggestion-reject {
  color: #8f4f4c;
  border-color: rgba(185, 134, 125, 0.22);
  background: rgba(185, 134, 125, 0.1);
}

.suggestion-approve:hover,
.suggestion-approve:focus-visible,
.suggestion-split:hover,
.suggestion-split:focus-visible,
.suggestion-reject:hover,
.suggestion-reject:focus-visible {
  transform: translateY(-1px);
}

.unassigned-drop {
  margin: 16px 0;
  padding: 13px;
  border: 1px dashed rgba(185, 134, 125, 0.42);
  border-radius: 18px;
  color: #8f4f4c;
  background: rgba(185, 134, 125, 0.1);
  line-height: 1.45;
}

.guest-status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.guest-status-filters button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.7);
}

.guest-status-filters button[aria-pressed="true"] {
  color: var(--gold-deep);
  border-color: var(--gold);
  background: var(--champagne-soft);
  font-weight: 700;
}

.guest-status-filters button:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

.guest-status-filters [data-status-count] {
  font-variant-numeric: tabular-nums;
}

.guest-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.guest-search-empty {
  margin: 0;
  text-align: center;
}

.guest-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
  min-height: 82px;
  padding: 13px;
  border: 1px solid rgba(122, 92, 50, 0.12);
  border-radius: 18px;
  color: inherit;
  background: rgba(255, 255, 255, 0.5);
  text-align: right;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.guest-row:hover,
.guest-row:focus-visible,
.guest-row.is-selected {
  border-color: rgba(182, 138, 62, 0.42);
  background: rgba(255, 255, 255, 0.78);
  transform: translateY(-1px);
}

.guest-row.is-unassigned {
  border-style: dashed;
}

.guest-row.is-declined {
  opacity: 0.68;
}

.guest-main strong,
.guest-main small {
  display: block;
}

.guest-main strong {
  font-size: 1.02rem;
}

.guest-main small {
  margin-top: 4px;
  color: var(--muted);
}

.guest-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rsvp-pill,
.table-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
}

.rsvp-pill {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.68);
}

.rsvp-pill.confirmed {
  color: #2f6b35;
  background: #dff2d3;
  box-shadow: inset 0 0 0 1px rgba(76, 139, 72, 0.28);
}

.rsvp-pill.pending {
  color: #8f6728;
  background: rgba(214, 174, 105, 0.2);
}

.rsvp-pill.declined {
  color: #8f4f4c;
  background: rgba(185, 134, 125, 0.18);
}

.table-pill {
  color: var(--gold-deep);
  border: 1px solid rgba(182, 138, 62, 0.2);
  background: rgba(255, 250, 242, 0.62);
}

.table-pill.unassigned {
  color: #8f4f4c;
  border-color: rgba(185, 134, 125, 0.28);
  background: rgba(185, 134, 125, 0.12);
}

.hall-panel {
  overflow: visible;
}

.hall-map {
  position: relative;
  min-height: clamp(560px, 68vh, 760px);
  overflow: visible;
  border: 1px solid rgba(122, 92, 50, 0.2);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.7), transparent 25rem),
    linear-gradient(90deg, rgba(143, 103, 40, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(143, 103, 40, 0.06) 1px, transparent 1px),
    rgba(255, 250, 242, 0.72);
  background-size: auto, 68px 68px, 68px 68px;
}

.hall-boundary {
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(143, 103, 40, 0.18);
  border-radius: 26px;
  pointer-events: none;
}

.hall-elements-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.hall-element {
  position: absolute;
  display: grid;
  border: 1px solid rgba(182, 138, 62, 0.24);
  color: var(--gold-deep);
  background: rgba(255, 255, 255, 0.56);
  font-weight: 700;
  place-items: center;
  text-align: center;
  user-select: none;
}

.hall-element span {
  position: relative;
  z-index: 2;
  padding: 4px 8px;
  line-height: 1.15;
}

.hall-element.stage {
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(234, 212, 174, 0.34)),
    rgba(255, 250, 242, 0.64);
  box-shadow: 0 14px 32px rgba(94, 65, 30, 0.1);
}

.hall-element.custom {
  min-width: 56px;
  min-height: 38px;
  border-color: rgba(122, 92, 50, 0.2);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 250, 242, 0.5)),
    rgba(185, 134, 125, 0.1);
  box-shadow: 0 16px 36px rgba(94, 65, 30, 0.12);
  cursor: move;
  pointer-events: auto;
  touch-action: none;
}

.hall-element.custom:hover,
.hall-element.custom:focus-visible {
  border-color: rgba(182, 138, 62, 0.5);
  box-shadow:
    0 20px 46px rgba(94, 65, 30, 0.16),
    0 0 0 4px rgba(182, 138, 62, 0.09);
}

.hall-resize-handle {
  position: absolute;
  z-index: 3;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(143, 103, 40, 0.42);
  border-radius: 50%;
  background: #fffaf2;
  box-shadow: 0 4px 10px rgba(94, 65, 30, 0.14);
}

.hall-resize-handle.nw {
  top: -6px;
  left: -6px;
  cursor: nwse-resize;
}

.hall-resize-handle.n {
  top: -6px;
  right: 50%;
  transform: translateX(50%);
  cursor: ns-resize;
}

.hall-resize-handle.ne {
  top: -6px;
  right: -6px;
  cursor: nesw-resize;
}

.hall-resize-handle.e {
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.hall-resize-handle.se {
  right: -6px;
  bottom: -6px;
  cursor: nwse-resize;
}

.hall-resize-handle.s {
  right: 50%;
  bottom: -6px;
  transform: translateX(50%);
  cursor: ns-resize;
}

.hall-resize-handle.sw {
  left: -6px;
  bottom: -6px;
  cursor: nesw-resize;
}

.hall-resize-handle.w {
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.table-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.map-table {
  position: absolute;
  z-index: 3;
  display: grid;
  align-content: center;
  justify-items: center;
  row-gap: 3px;
  border: 1px solid rgba(122, 92, 50, 0.22);
  color: var(--ink);
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.92), transparent 42%),
    linear-gradient(135deg, rgba(234, 212, 174, 0.42), rgba(255, 255, 255, 0.58));
  box-shadow:
    0 18px 42px rgba(94, 65, 30, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.46);
  text-align: center;
  touch-action: none;
  transform: translate(-50%, -50%);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
  user-select: none;
}

.map-table.round {
  width: 88px;
  height: 88px;
  border-radius: 50%;
}

.map-table.banquet.horizontal {
  width: 144px;
  height: 64px;
  border-radius: 24px;
}

.map-table.banquet.vertical {
  width: 68px;
  height: 146px;
  border-radius: 24px;
}

.map-table:hover,
.map-table:focus-visible,
.map-table.is-selected {
  z-index: 12;
  border-color: rgba(182, 138, 62, 0.62);
  box-shadow:
    0 22px 54px rgba(94, 65, 30, 0.2),
    0 0 0 5px rgba(182, 138, 62, 0.1);
  filter: saturate(1.04);
}

.map-table-name {
  order: 2;
  display: -webkit-box;
  max-width: calc(100% - 14px);
  overflow: hidden;
  font-family: "Noto Serif Hebrew", "Times New Roman", serif;
  font-size: 0.94rem;
  line-height: 1.08;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.map-table-id {
  order: 1;
  display: inline-grid;
  min-width: 28px;
  min-height: 19px;
  margin: 0;
  padding: 2px 7px;
  border: 1px solid rgba(182, 138, 62, 0.22);
  border-radius: 999px;
  color: var(--gold-deep);
  background: rgba(255, 250, 242, 0.58);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  place-items: center;
}

.map-table-count {
  order: 3;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.table-popover {
  position: absolute;
  right: 50%;
  bottom: calc(100% + 12px);
  z-index: 40;
  width: 240px;
  padding: 13px;
  border: 1px solid rgba(122, 92, 50, 0.18);
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.96);
  box-shadow: 0 22px 56px rgba(94, 65, 30, 0.18);
  opacity: 0;
  pointer-events: none;
  text-align: right;
  transform: translateX(50%) translateY(8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  visibility: hidden;
}

.map-table:hover .table-popover,
.map-table:focus-visible .table-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(50%) translateY(0);
  visibility: visible;
}

.table-popover strong,
.table-popover small {
  display: block;
}

.table-popover strong {
  font-size: 0.98rem;
}

.table-popover small {
  margin-top: 3px;
  color: var(--muted);
}

.table-popover ul,
.table-selected-card ul {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.popover-guest,
.table-selected-card li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
}

.empty-popover {
  color: var(--muted);
  font-size: 0.9rem;
}

.mobile-assign-bar {
  display: none;
}

.table-selected-card {
  padding: 10px 12px;
  border: 1px solid rgba(122, 92, 50, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
}

.table-selected-card strong,
.table-selected-card span {
  display: block;
}

.table-selected-card strong {
  font-size: 1.18rem;
}

.table-selected-card span {
  margin-top: 4px;
  color: var(--muted);
}

.editor-panel .table-selected-card ul,
.editor-panel .assignment-box,
.editor-panel .changes-panel {
  display: none;
}

.table-editor,
.assignment-box,
.action-stack {
  display: grid;
  gap: 10px;
}

.table-editor {
  grid-template-columns: repeat(5, minmax(104px, 1fr));
  align-items: end;
  gap: 8px;
  margin-top: 10px;
}

.editor-panel .table-editor label {
  gap: 4px;
  font-size: 0.84rem;
}

.editor-panel .table-editor input,
.editor-panel .table-editor select {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 13px;
}

.editor-panel .action-stack {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assignment-box h3 {
  margin-bottom: 10px;
}

.changes-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.changes-heading h3 {
  font-size: 1.12rem;
}

.changes-heading span {
  display: grid;
  width: 30px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fffaf2;
  background: var(--gold);
  place-items: center;
}

.change-item {
  margin: 11px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.empty-state {
  color: var(--muted);
  line-height: 1.55;
}

.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(33, 23, 15, 0.36);
  backdrop-filter: blur(8px);
}

.confirm-dialog[hidden] {
  display: none;
}

.confirm-card {
  width: min(100%, 430px);
  padding: 26px;
  border: 1px solid rgba(185, 134, 125, 0.32);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 242, 0.84)),
    var(--paper);
  box-shadow: 0 30px 90px rgba(33, 23, 15, 0.22);
  text-align: right;
}

.confirm-card h2 {
  margin-top: 8px;
  color: var(--ink);
  font-size: 1.7rem;
}

.confirm-card p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: end;
  margin-top: 22px;
}

@media (max-width: 1280px) {
  .workspace-header {
    grid-template-columns: 1fr;
  }

  .brand-link,
  .workspace-actions,
  .event-summary {
    justify-self: center;
  }

  .workspace-actions {
    justify-items: center;
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .workspace-grid.guests-only {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "guests details";
  }

  .guest-details-panel {
    position: static;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "guests"
      "hall";
    direction: rtl;
  }

  .guests-panel {
    position: static;
    max-height: none;
  }

  .editor-panel {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .workspace-grid.guests-only {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "details"
      "guests";
  }

  .seating-app {
    width: min(100% - 20px, 1660px);
    padding-top: 10px;
  }

  .workspace-header,
  .panel,
  .stat-card {
    border-radius: 22px;
  }

  .workspace-header,
  .panel {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-heading,
  .form-row,
  .settings-grid,
  .hall-element-form,
  .suggested-heading,
  .suggested-card-top {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hall-map {
    min-height: 620px;
  }

  .map-table.round {
    width: 76px;
    height: 76px;
  }

  .map-table.banquet.horizontal {
    width: 116px;
    height: 58px;
  }

  .map-table.banquet.vertical {
    width: 58px;
    height: 118px;
  }

  .table-popover {
    width: min(230px, 82vw);
  }

  .mobile-assign-bar {
    position: sticky;
    bottom: 12px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 10px;
    border: 1px solid rgba(122, 92, 50, 0.18);
    border-radius: 999px;
    background: rgba(255, 250, 242, 0.9);
    box-shadow: 0 18px 48px rgba(94, 65, 30, 0.14);
    backdrop-filter: blur(14px);
  }

  .mobile-assign-bar span {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

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

@media (max-width: 460px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.2rem;
  }
}

.guest-permanent-delete {
  display: block;
  margin-top: 0.65rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid #d9b8af;
  border-radius: 12px;
  background: #fff8f5;
  color: #873e30;
  font: inherit;
  cursor: pointer;
}

.guest-permanent-delete:disabled {
  opacity: 0.55;
  cursor: wait;
}
