:root {
  --bg-ivory: #FAF7F2;
  --bg-champagne: #F3E8D8;
  --bg-card: #FFFFFF;
  --rose-gold: #C89B7B;
  --rose-gold-dark: #A6795A;
  --burgundy: #7C3A47;
  --burgundy-dark: #5F2A35;
  --sage: #4A7C59;
  --groom: #3B6998;
  --groom-soft: #EBF2F9;
  --bride: #B85D78;
  --bride-soft: #FBEFF3;
  --vip-gold: #D49A2A;
  --vip-soft: #FEF7E4;
  --dietary-amber: #C96A1B;
  --dietary-soft: #FFF2E5;
  --text-main: #2E2421;
  --text-muted: #70605B;
  --border-soft: #E6DDD2;
  --shadow-sm: 0 2px 8px rgba(66, 45, 35, 0.07);
  --shadow-md: 0 8px 24px rgba(66, 45, 35, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Noto Sans Thai', 'Sarabun', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background: var(--bg-ivory);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Prompt', 'Noto Sans Thai', sans-serif;
  margin: 0;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

.muted-text {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0;
}

/* App Shell */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Top Header */
.top-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #FFFDF9 0%, var(--bg-champagne) 100%);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  z-index: 20;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  font-size: 1.7rem;
  line-height: 1;
}

.header-brand h1 {
  font-size: 1.15rem;
  color: var(--burgundy);
  font-weight: 700;
}

.brand-subtitle {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Summary Bar */
.summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border-soft);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-main);
}

.summary-pill strong {
  font-weight: 700;
}

.summary-pill.groom {
  border-color: rgba(59, 105, 152, 0.35);
  color: var(--groom);
}

.summary-pill.bride {
  border-color: rgba(184, 93, 120, 0.35);
  color: var(--bride);
}

.summary-pill.dietary {
  background: var(--dietary-soft);
  border-color: rgba(201, 106, 27, 0.35);
  color: var(--dietary-amber);
}

/* Header Controls */
.header-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.presence-cluster, .action-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ws-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: #FFFFFF;
  border: 1px solid var(--border-soft);
}

.ws-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #999;
}

.ws-status.connected .ws-dot {
  background: var(--sage);
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.2);
}

.ws-status.reconnecting .ws-dot {
  background: var(--vip-gold);
}

.ws-status.disconnected .ws-dot {
  background: #C94A4A;
}

.presence-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.presence-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.82rem;
}

.btn-xs {
  padding: 3px 8px;
  font-size: 0.78rem;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: var(--burgundy);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--burgundy-dark);
}

.btn-secondary {
  background: var(--rose-gold);
  color: #FFFFFF;
}

.btn-secondary:hover {
  background: var(--rose-gold-dark);
}

.btn-soft {
  background: #FFFFFF;
  border-color: var(--border-soft);
  color: var(--text-main);
}

.btn-soft:hover {
  background: var(--bg-ivory);
  border-color: var(--rose-gold);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: rgba(124, 58, 71, 0.08);
  color: var(--burgundy);
}

.btn-danger {
  background: #C94A4A;
  color: #FFFFFF;
}

.btn-danger:hover {
  background: #A93838;
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.btn-icon:hover {
  background: var(--bg-champagne);
  color: var(--burgundy);
}

/* Workspace Split */
.workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Left Sidebar */
.guest-sidebar {
  width: 370px;
  min-width: 320px;
  max-width: 420px;
  background: #FFFDF9;
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel-section {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.section-title {
  font-size: 0.88rem;
  color: var(--burgundy);
  margin-bottom: 8px;
}

.quick-add-form {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.quick-row {
  display: flex;
  gap: 6px;
}

.quick-row-2 > * {
  flex: 1;
  min-width: 0;
}

.quick-row-3 {
  align-items: center;
}

.quick-row-3 select {
  flex: 1;
  min-width: 0;
}

input[type="text"],
input[type="search"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: #FFFFFF;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--rose-gold);
  box-shadow: 0 0 0 3px rgba(200, 155, 123, 0.18);
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #FFFFFF;
  font-size: 0.8rem;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.checkbox-pill input {
  width: auto;
  margin: 0;
  accent-color: var(--burgundy);
}

/* Filters */
.filter-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #FAF5EE;
}

.segmented-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 3px;
  background: var(--bg-champagne);
  border-radius: var(--radius-sm);
}

.tab-btn {
  border: none;
  background: transparent;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.tab-btn.active {
  background: #FFFFFF;
  color: var(--burgundy);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.filter-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.filter-row select {
  flex: 1;
  min-width: 0;
}

.unseat-dropzone {
  margin: 8px 12px 0;
  padding: 12px;
  border: 2px dashed var(--rose-gold);
  border-radius: var(--radius-md);
  background: var(--bg-champagne);
  color: var(--burgundy);
  text-align: center;
  font-size: 0.84rem;
  font-weight: 600;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.unseat-dropzone.drag-over {
  background: #F4DFCC;
  transform: scale(1.01);
}

.guest-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.hint-text {
  font-weight: 400;
  font-size: 0.74rem;
}

.guest-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-state {
  text-align: center;
  padding: 28px 14px;
  color: var(--text-muted);
  font-size: 0.88rem;
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-md);
  background: #FFFFFF;
}

/* Guest Card */
.guest-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--groom);
  border-radius: var(--radius-md);
  padding: 9px 11px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  cursor: grab;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.guest-card.side-bride {
  border-left-color: var(--bride);
}

.guest-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.guest-card.selected {
  outline: 2px solid var(--burgundy);
  background: #FFF7F5;
}

.guest-card.dragging {
  opacity: 0.55;
}

.guest-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.guest-name-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}

.guest-name {
  font-weight: 600;
  font-size: 0.92rem;
  word-break: break-word;
}

.guest-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.guest-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-groom {
  background: var(--groom-soft);
  color: var(--groom);
}

.badge-bride {
  background: var(--bride-soft);
  color: var(--bride);
}

.badge-group {
  background: var(--bg-champagne);
  color: var(--text-main);
}

.badge-vip {
  background: var(--vip-soft);
  color: #9C6B0C;
  border: 1px solid rgba(212, 154, 42, 0.35);
}

.badge-dietary {
  background: var(--dietary-soft);
  color: var(--dietary-amber);
}

.badge-seated {
  background: #EAF3EC;
  color: var(--sage);
}

.badge-unseated {
  background: #F4F1ED;
  color: var(--text-muted);
}

.guest-notes-preview {
  margin-top: 4px;
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Floor Plan */
.floorplan-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #F7F1E8;
}

.floorplan-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  background: #FFFDF9;
  border-bottom: 1px solid var(--border-soft);
}

.toolbar-group, .toolbar-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.zoom-label {
  font-size: 0.82rem;
  font-weight: 600;
  min-width: 44px;
  text-align: center;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-groom { background: var(--groom); }
.dot-bride { background: var(--bride); }
.dot-vip { background: var(--vip-gold); }
.dot-dietary { background: var(--dietary-amber); }

.selection-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  background: var(--burgundy);
  color: #FFFFFF;
  font-size: 0.86rem;
  font-weight: 500;
}

.floorplan-viewport {
  flex: 1;
  overflow: auto;
  padding: 20px;
  position: relative;
}

.floorplan-canvas {
  position: relative;
  width: 1400px;
  height: 950px;
  transform-origin: top left;
  background-color: #FCF9F4;
  background-image:
    linear-gradient(to right, rgba(200, 155, 123, 0.14) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(200, 155, 123, 0.14) 1px, transparent 1px);
  background-size: 40px 40px;
  border: 2px solid var(--rose-gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.canvas-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Landmarks */
.landmark-item {
  position: absolute;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 2px dashed var(--rose-gold);
  background: linear-gradient(135deg, rgba(243, 232, 216, 0.92), rgba(255, 253, 249, 0.95));
  color: var(--burgundy);
  font-family: 'Prompt', 'Noto Sans Thai', sans-serif;
  font-weight: 600;
  cursor: move;
  user-select: none;
  box-shadow: var(--shadow-sm);
  touch-action: none;
}

.landmark-item.type-stage {
  background: linear-gradient(135deg, #7C3A47, #9E5260);
  border: 2px solid #C89B7B;
  color: #FFFDF9;
}

.landmark-edit-btn {
  position: absolute;
  top: 4px;
  right: 6px;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  color: inherit;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.72rem;
  cursor: pointer;
}

.landmark-edit-btn:hover {
  background: rgba(255, 255, 255, 0.45);
}

/* Banquet Table */
.table-node {
  position: absolute;
  width: 240px;
  height: 240px;
  pointer-events: auto;
  user-select: none;
  touch-action: none;
}

.table-node.remote-dragging .table-center {
  box-shadow: 0 0 0 4px rgba(200, 155, 123, 0.5), var(--shadow-md);
}

.table-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 118px;
  height: 118px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFFFFF, #F5E9D8);
  border: 3px solid var(--rose-gold);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  cursor: move;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.table-node.is-vip .table-center {
  border-color: var(--vip-gold);
  background: radial-gradient(circle at 35% 30%, #FFFDF5, #F9E8BE);
}

.table-center.drop-target-table {
  border-color: var(--sage);
  box-shadow: 0 0 0 5px rgba(74, 124, 89, 0.25);
}

.table-title {
  font-family: 'Prompt', 'Noto Sans Thai', sans-serif;
  font-weight: 700;
  font-size: 0.84rem;
  line-height: 1.15;
  color: var(--burgundy);
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-occupancy {
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-main);
}

.table-occupancy.full {
  background: var(--burgundy);
  color: #FFFFFF;
}

.table-meta-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 3px;
  font-size: 0.72rem;
}

.table-dietary-pill {
  background: var(--dietary-soft);
  color: var(--dietary-amber);
  border-radius: 999px;
  padding: 0 5px;
  font-weight: 700;
  font-size: 0.68rem;
}

.table-edit-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: #FFFFFF;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.table-edit-btn:hover {
  color: var(--burgundy);
  border-color: var(--burgundy);
}

/* Radial Seats */
.seat-node {
  position: absolute;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px dashed #C7B9AC;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  text-align: center;
}

.seat-node:hover {
  transform: translate(-50%, -50%) scale(1.08);
  border-color: var(--burgundy);
  z-index: 5;
}

.seat-node.occupied {
  border-style: solid;
  border-width: 2.5px;
  cursor: grab;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.seat-node.occupied.side-groom {
  background: var(--groom-soft);
  border-color: var(--groom);
  color: #1F3E5E;
}

.seat-node.occupied.side-bride {
  background: var(--bride-soft);
  border-color: var(--bride);
  color: #6B273C;
}

.seat-node.selected-seat {
  outline: 3px solid var(--burgundy);
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 6;
}

.seat-node.drag-over {
  border-style: solid;
  border-color: var(--sage);
  background: #E2F3E7;
  transform: translate(-50%, -50%) scale(1.14);
  box-shadow: 0 0 0 4px rgba(74, 124, 89, 0.25);
  z-index: 8;
}

.seat-num {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
}

.seat-guest-name {
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.05;
  max-width: 42px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-markers {
  position: absolute;
  top: -5px;
  right: -5px;
  display: flex;
  gap: 1px;
  font-size: 0.65rem;
}

.seat-unseat-btn {
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px solid #FFFFFF;
  background: #C94A4A;
  color: #FFFFFF;
  font-size: 0.6rem;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.seat-node.occupied:hover .seat-unseat-btn {
  display: flex;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(35, 24, 21, 0.52);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal-card {
  background: #FFFDF9;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
}

.modal-card-wide {
  max-width: 860px;
}

.auth-gate {
  position: fixed;
  inset: 0;
  background: var(--bg-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.auth-card {
  max-width: 360px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.modal-header h3 {
  font-size: 1.05rem;
  color: var(--burgundy);
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field > span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.checkbox-field {
  justify-content: flex-end;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.spacer {
  flex: 1;
}

.form-error {
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #FDECEC;
  color: #B42318;
  font-size: 0.84rem;
  font-weight: 600;
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  max-width: 340px;
}

.toast {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: #2E2421;
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
}

.toast.success {
  background: var(--sage);
}

.toast.error {
  background: #B42318;
}

/* Print Summary */
.print-summary-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.print-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.print-stat-box {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: #FFFFFF;
}

.print-tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.print-table-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 12px;
  background: #FFFFFF;
  break-inside: avoid;
}

.print-table-card h4 {
  color: var(--burgundy);
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.print-guest-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.84rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* RSVP Import / Export Modal */
.rsvp-section {
  background: #FFFFFF;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rsvp-section-title {
  font-size: 0.92rem;
  color: var(--burgundy);
  margin: 0;
}

.rsvp-guide {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.rsvp-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rsvp-options {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.rsvp-options .field {
  min-width: 190px;
}

.rsvp-preview-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rsvp-summary-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rsvp-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-champagne);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
}

.rsvp-badge.success {
  background: #E9F5EC;
  color: var(--sage);
  border-color: rgba(74, 124, 89, 0.35);
}

.rsvp-badge.warn {
  background: var(--vip-soft);
  color: #9A6B12;
  border-color: rgba(212, 154, 42, 0.35);
}

.rsvp-badge.muted {
  background: #F4F1ED;
  color: var(--text-muted);
}

.rsvp-badge.error {
  background: #FDECEC;
  color: #B42318;
  border-color: rgba(180, 35, 24, 0.3);
}

.rsvp-preview-scroll {
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
}

.rsvp-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.rsvp-preview-table th,
.rsvp-preview-table td {
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}

.rsvp-preview-table th {
  position: sticky;
  top: 0;
  background: var(--bg-champagne);
  color: var(--burgundy);
  font-weight: 600;
  z-index: 1;
}

.rsvp-preview-table tr.companion-row {
  background: #FCF9F4;
}

.rsvp-companion-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-champagne);
  color: var(--burgundy);
}

.rsvp-issues-list {
  background: #FFF9F2;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.8rem;
}

.rsvp-issues-list.error {
  background: #FDECEC;
  border-color: rgba(180, 35, 24, 0.25);
  color: #B42318;
}

.rsvp-issues-list ul {
  margin: 6px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Change Password & Admin User Management */
.cp-notice,
#cp-notice {
  background: var(--vip-soft);
  border: 1px solid rgba(212, 154, 42, 0.35);
  color: #7D5208;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 12px;
}

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

.admin-users-count {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
}

.admin-form-card {
  background: #FFFFFF;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.admin-edit-card {
  background: #FCF9F4;
  margin-top: -4px;
}

.admin-form-title {
  margin: 0 0 2px;
  font-size: 0.92rem;
  color: var(--burgundy);
}

.admin-checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: #FFFFFF;
}

.admin-user-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.admin-user-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 0.9rem;
}

.admin-self-tag {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--burgundy);
}

.admin-username {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-user-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.admin-user-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.role-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.role-badge.admin {
  background: rgba(124, 58, 71, 0.12);
  color: var(--burgundy);
  border-color: rgba(124, 58, 71, 0.25);
}

.role-badge.member {
  background: var(--bg-champagne);
  color: var(--text-main);
  border-color: var(--border-soft);
}

.status-badge.active {
  background: #E9F5EC;
  color: var(--sage);
  border-color: rgba(74, 124, 89, 0.3);
}

.status-badge.inactive {
  background: #F4F1ED;
  color: var(--text-muted);
  border-color: var(--border-soft);
}

.status-badge.warn {
  background: var(--vip-soft);
  color: #9A6B12;
  border-color: rgba(212, 154, 42, 0.35);
}

/* Responsive */
@media (max-width: 960px) {
  .app-shell {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .workspace {
    flex-direction: column;
    overflow: visible;
  }

  .guest-sidebar {
    width: 100%;
    max-width: none;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
    max-height: 55vh;
  }

  .floorplan-viewport {
    min-height: 520px;
  }
}

@media print {
  body {
    background: #FFFFFF;
  }

  .no-print {
    display: none !important;
  }

  .modal-backdrop {
    position: static;
    background: transparent;
    padding: 0;
  }

  .modal-card {
    box-shadow: none;
    border: none;
    max-width: none;
    max-height: none;
    overflow: visible;
    padding: 0;
  }
}
