/* ══════════════════════════════════════
   SEATING CHART — Phase 15
══════════════════════════════════════ */

/* Full-page seating chart (like CMS editor) */
#tab-seating.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: var(--cream);
    animation: seatingSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes seatingSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Three-panel layout */
.seating-layout {
    display: grid;
    grid-template-columns: 220px 1fr 260px;
    grid-template-rows: auto 1fr;
    flex: 1;
    gap: 0;
    overflow: hidden;
    background: #fff;
}

/* Back button */
.seating-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: rgba(250, 245, 238, 0.5);
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 1px;
    cursor: pointer;
    padding: 0 0 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-family: inherit;
    transition: color 0.2s;
    width: 100%;
}
.seating-back-btn:hover {
    color: var(--cream);
}
.seating-back-btn svg {
    opacity: 0.6;
    transition:
        transform 0.2s,
        opacity 0.2s;
}
.seating-back-btn:hover svg {
    transform: translateX(-3px);
    opacity: 1;
}

/* LEFT TOOLBAR */
.seating-toolbar {
    grid-row: 1 / -1;
    background: var(--brown);
    color: var(--cream);
    padding: 16px 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.seating-toolbar::-webkit-scrollbar {
    width: 3px;
}
.seating-toolbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.seating-toolbar-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.seating-toolbar-label {
    font-size: 0.58rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(250, 245, 238, 0.4);
    font-weight: 300;
}
.seating-toolbar-actions {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    gap: 6px;
}
.seating-toolbar-actions .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.68rem;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--cream);
}
.seating-toolbar-actions .btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Shape picker */
.seating-shape-picker {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}
.shape-btn {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(250, 245, 238, 0.6);
    cursor: pointer;
    transition: var(--transition);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.shape-btn:hover {
    background: rgba(200, 88, 42, 0.2);
    border-color: var(--terra);
    color: var(--cream);
}
.shape-btn svg {
    width: 22px;
    height: 22px;
}

/* Element picker */
.seating-element-picker {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.element-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: rgba(250, 245, 238, 0.5);
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 300;
    padding: 6px 10px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}
.element-btn:hover {
    background: rgba(107, 155, 122, 0.15);
    border-color: var(--sage);
    color: var(--cream);
}

/* Toggles */
.seating-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 300;
    color: rgba(250, 245, 238, 0.6);
    cursor: pointer;
}
.seating-toggle input[type="checkbox"] {
    appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.seating-toggle input[type="checkbox"]:checked {
    background: var(--terra);
    border-color: var(--terra);
}
.seating-toggle input[type="checkbox"]:checked::after {
    content: "";
    display: block;
    width: 4px;
    height: 7px;
    border: solid var(--cream);
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
    margin: 1px 0 0 4px;
}

/* Zoom controls */
.seating-zoom-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}
.zoom-btn {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--cream);
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}
.zoom-btn.zoom-fit {
    width: auto;
    padding: 0 10px;
    font-size: 0.6rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.zoom-level {
    font-size: 0.68rem;
    color: rgba(250, 245, 238, 0.5);
    min-width: 36px;
    text-align: center;
}

/* Stats */
.seating-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.seating-stat {
    text-align: center;
    padding: 8px 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
}
.seating-stat-val {
    display: block;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--cream);
}
.seating-stat-val.seating-stat-warn {
    color: var(--terra-l);
}
.seating-stat-lbl {
    font-size: 0.52rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(250, 245, 238, 0.35);
    font-weight: 200;
}

/* CENTER CANVAS */
.seating-canvas-wrap {
    grid-column: 2;
    grid-row: 2;
    position: relative;
    overflow: hidden;
    background: #fafaf8;
    cursor: grab;
}
.seating-canvas-wrap:active {
    cursor: grabbing;
}
/* Grid is rendered on the canvas div so it zooms/pans with content */

.seating-canvas {
    position: absolute;
    width: 2000px;
    height: 1600px;
    transform-origin: 0 0;
    transition: transform 0.15s ease;
}

/* Table on canvas */
.sc-table {
    position: absolute;
    cursor: move;
    user-select: none;
    transition: box-shadow 0.2s;
    z-index: 2;
}
.sc-table:hover {
    z-index: 5;
}
.sc-table.sc-selected {
    z-index: 10;
}

.sc-table-shape {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--brown-l);
    background: #fff;
    box-shadow: 0 2px 8px rgba(44, 32, 22, 0.08);
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}
.sc-table:hover .sc-table-shape {
    border-color: var(--terra);
    box-shadow: 0 4px 16px rgba(200, 88, 42, 0.15);
}
.sc-table.sc-selected .sc-table-shape {
    border-color: var(--terra);
    box-shadow:
        0 0 0 3px rgba(200, 88, 42, 0.2),
        0 4px 16px rgba(200, 88, 42, 0.15);
}

/* Shape variants */
.sc-table-shape.shape-round {
    border-radius: 50%;
}
.sc-table-shape.shape-rectangular {
    border-radius: 6px;
}
.sc-table-shape.shape-square {
    border-radius: 6px;
}
.sc-table-shape.shape-oval {
    border-radius: 50%;
}
.sc-table-shape.shape-sweetheart {
    border-radius: 50% 50% 6px 6px;
    border-color: var(--terra-l);
    background: rgba(200, 88, 42, 0.04);
}

/* Table label inside shape */
.sc-table-label {
    text-align: center;
    pointer-events: none;
}
.sc-table-name {
    display: block;
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--txt);
    line-height: 1.2;
}
.sc-table-count {
    display: block;
    font-size: 0.56rem;
    font-weight: 300;
    color: var(--txt-l);
    margin-top: 2px;
}
.sc-table-count.full {
    color: var(--sage-d);
    font-weight: 400;
}
.sc-table-count.over {
    color: var(--red);
    font-weight: 500;
}

/* Rotation handle */
.sc-rotate-handle {
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--terra);
    border: 2px solid #fff;
    cursor: grab;
    z-index: 12;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sc-rotate-handle svg {
    pointer-events: none;
    flex-shrink: 0;
}
.sc-rotate-handle::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 8px;
    background: var(--terra);
    opacity: 0.4;
}
.sc-rotate-handle:active {
    cursor: grabbing;
}
.sc-table:hover .sc-rotate-handle,
.sc-table.sc-selected .sc-rotate-handle,
.sc-venue-el:hover .sc-rotate-handle,
.sc-venue-el.sc-selected .sc-rotate-handle {
    opacity: 1;
}

/* Resize handle (corner) */
.sc-resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--sage);
    border: 1.5px solid #fff;
    border-radius: 2px;
    z-index: 12;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.sc-resize-br {
    bottom: -5px;
    right: -5px;
    cursor: nwse-resize;
}
.sc-venue-el:hover .sc-resize-handle,
.sc-venue-el.sc-selected .sc-resize-handle {
    opacity: 1;
}

/* Chair dots around table */
.sc-chair {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--cream-d);
    border: 1.5px solid var(--cream-dd);
    transition:
        background 0.2s,
        border-color 0.2s,
        transform 0.15s;
}
.sc-chair.occupied {
    background: var(--sage);
    border-color: var(--sage-d);
}
.sc-chair.occupied.has-meal {
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

/* Guest name tags floating near chairs */
.sc-guest-tag {
    position: absolute;
    font-size: 0.5rem;
    font-weight: 300;
    color: var(--txt-m);
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: 0.3px;
}

/* Meal dot on chair */
.sc-meal-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    bottom: -4px;
    right: -4px;
    border: 1.5px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Guest tooltip */
.sc-guest-tooltip {
    position: fixed;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ede0cc;
    border-radius: 10px;
    padding: 14px 16px;
    min-width: 200px;
    max-width: 300px;
    box-shadow:
        0 8px 24px rgba(60, 46, 31, 0.15),
        0 2px 6px rgba(60, 46, 31, 0.08);
    opacity: 0;
    transition: opacity 0.15s;
    font-size: 12px;
    line-height: 1.5;
}
.sgt-name {
    font-family: "Cormorant Garamond", serif;
    font-size: 16px;
    font-weight: 600;
    color: #3d2e1f;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f5ede0;
}
.sgt-row {
    padding: 2px 0;
    color: #5a4a38;
}
.sgt-label {
    font-weight: 400;
    color: #8b7a68;
    margin-right: 4px;
}
.sgt-meal-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 2px;
}
.sgt-tag {
    display: inline-block;
    background: #f5ede0;
    color: #6b5a48;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    margin-right: 3px;
}
.sgt-status {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
}
.sgt-status-confirmed {
    background: rgba(107, 155, 122, 0.15);
    color: #4a7a5a;
}
.sgt-status-declined {
    background: rgba(212, 114, 76, 0.12);
    color: #b85a3a;
}
.sgt-status-pending {
    background: rgba(212, 168, 75, 0.12);
    color: #9b8530;
}

/* Element inline toolbar (color + label) */
.sc-el-toolbar {
    position: absolute;
    bottom: -55px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #ede0cc;
    border-radius: 8px;
    padding: 5px 8px;
    box-shadow: 0 4px 12px rgba(60, 46, 31, 0.12);
    z-index: 20;
    white-space: nowrap;
}
.sc-el-toolbar-label {
    font-size: 10px;
    color: #8b7a68;
    cursor: pointer;
}
.sc-el-color-input {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid #ede0cc;
    border-radius: 4px;
    cursor: pointer;
    background: none;
}
.sc-el-label-input {
    width: 80px;
    font-size: 11px;
    padding: 2px 6px;
    border: 1px solid #ede0cc;
    border-radius: 4px;
    outline: none;
    font-family: inherit;
}
.sc-el-label-input:focus {
    border-color: var(--sage);
}

/* Table detail color picker */
.seating-detail-color {
    display: flex;
    align-items: center;
    gap: 8px;
}
.seating-detail-color label {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--txt-m, #8a7a6c);
    font-weight: 600;
}
.seating-detail-color input[type="color"] {
    width: 30px;
    height: 26px;
    padding: 0;
    border: 1.5px solid rgba(44, 32, 22, 0.12);
    border-radius: 8px;
    cursor: pointer;
    background: none;
}

.seating-detail-event {
    display: flex;
    align-items: center;
    gap: 8px;
}
.seating-detail-event label {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--txt-m, #8a7a6c);
    font-weight: 600;
    white-space: nowrap;
}
.seating-detail-event select {
    font-size: 0.72rem;
    padding: 6px 8px;
    border: 1.5px solid rgba(44, 32, 22, 0.12);
    border-radius: 8px;
    background: #fff;
    flex: 1;
    min-width: 0;
    transition: border-color 0.2s;
}
.seating-detail-event select:focus {
    border-color: var(--gold, #b8956a);
    outline: none;
}

/* Household badge in guest panel */
.sg-hh-badge {
    display: inline-block;
    font-size: 11px;
    margin-left: 4px;
    vertical-align: middle;
    cursor: help;
}

/* Venue elements */
.sc-venue-el {
    position: absolute;
    cursor: move;
    user-select: none;
    z-index: 1;
}
.sc-venue-el-inner {
    width: 100%;
    height: 100%;
    border: 1.5px dashed rgba(107, 155, 122, 0.4);
    border-radius: 6px;
    background: rgba(107, 155, 122, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    transition:
        border-color 0.2s,
        background 0.2s;
}
.sc-venue-el:hover .sc-venue-el-inner {
    border-color: var(--sage);
    background: rgba(107, 155, 122, 0.1);
}
.sc-venue-el.sc-selected .sc-venue-el-inner {
    border-color: var(--sage);
    border-style: solid;
    box-shadow: 0 0 0 3px rgba(107, 155, 122, 0.15);
}
.sc-venue-el-icon {
    font-size: 1.2rem;
    opacity: 0.4;
}
.sc-venue-el-label {
    font-size: 0.54rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--sage-d);
    font-weight: 300;
    opacity: 0.6;
}
.sc-venue-el .sc-el-delete {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    border: none;
    font-size: 0.6rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.sc-venue-el:hover .sc-el-delete,
.sc-venue-el.sc-selected .sc-el-delete {
    display: flex;
}

/* Empty state */
.seating-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    pointer-events: none;
}
.seating-empty p {
    font-size: 0.82rem;
    color: var(--txt-l);
    font-weight: 300;
}
.seating-empty-hint {
    font-size: 0.68rem !important;
    color: var(--txt-xl) !important;
}

/* RIGHT GUEST PANEL */
.seating-guests-panel {
    grid-row: 1 / -1;
    background: #fff;
    border-left: 1px solid var(--cream-d);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.seating-guests-header {
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--cream-d);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}
.seating-guests-header h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--txt);
}
.seating-guests-count {
    font-size: 0.62rem;
    color: var(--txt-l);
    font-weight: 300;
}
.seating-guests-search {
    margin: 10px 12px 0;
    padding: 8px 12px;
    border: 1px solid var(--cream-d);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--txt);
    outline: none;
    transition: var(--transition);
    background: var(--cream);
}
.seating-guests-search:focus {
    border-color: var(--terra);
    box-shadow: 0 0 0 3px rgba(200, 88, 42, 0.08);
}
.seating-guests-filters {
    padding: 8px 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.seating-filter-pill {
    padding: 7px 10px;
    border: 1px solid var(--cream-d);
    border-radius: var(--radius);
    background: none;
    font-family: inherit;
    font-size: 0.65rem;
    font-weight: 300;
    color: var(--txt-l);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.seating-filter-pill:hover {
    border-color: var(--terra);
    color: var(--terra);
}
.seating-filter-pill.active {
    background: var(--terra);
    border-color: var(--terra);
    color: #fff;
}
.seating-filter-tag {
    padding: 7px 8px;
    border: 1px solid var(--cream-d);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.65rem;
    font-weight: 300;
    color: var(--txt-m);
    background: #fff;
    cursor: pointer;
    width: 100%;
}

/* Guest list */
.seating-guests-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}
.seating-guests-list::-webkit-scrollbar {
    width: 4px;
}
.seating-guests-list::-webkit-scrollbar-thumb {
    background: var(--cream-dd);
    border-radius: 4px;
}

.sg-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    cursor: grab;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}
.sg-item:hover {
    background: var(--terra-bg);
}
.sg-item:active {
    cursor: grabbing;
}
.sg-item.sg-dragging {
    opacity: 0.4;
    background: var(--terra-bg);
}
.sg-item.sg-seated {
    opacity: 0.45;
}
.sg-item.sg-seated .sg-table-badge {
    display: inline;
}

.sg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--cream-d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.52rem;
    font-weight: 400;
    color: var(--txt-m);
    flex-shrink: 0;
    letter-spacing: 0.5px;
}
.sg-info {
    flex: 1;
    min-width: 0;
}
.sg-name {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--txt);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sg-meta {
    font-size: 0.56rem;
    color: var(--txt-l);
    font-weight: 200;
    display: flex;
    gap: 6px;
    align-items: center;
}
.sg-meal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.sg-table-badge {
    display: none;
    font-size: 0.5rem;
    padding: 1px 6px;
    border-radius: 10px;
    background: var(--sage-bg);
    color: var(--sage-d);
    font-weight: 400;
    letter-spacing: 0.5px;
}
.sg-drag-handle {
    color: var(--txt-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    flex-shrink: 0;
    cursor: grab;
    opacity: 0;
    transition: opacity 0.2s;
}
.sg-item:hover .sg-drag-handle {
    opacity: 1;
}

/* Locate button — shown only on seated guests */
.sg-locate-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--txt-xl);
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    opacity: 0;
    transition:
        opacity 0.2s,
        color 0.15s;
}
.sg-item:hover .sg-locate-btn {
    opacity: 1;
}
.sg-locate-btn:hover {
    color: var(--terra);
}

/* Flash animation when a table is located */
@keyframes seatingFlash {
    0%,
    100% {
        outline: 2px solid transparent;
        outline-offset: 4px;
    }
    25%,
    75% {
        outline: 2px solid var(--terra);
        outline-offset: 4px;
        filter: brightness(1.15);
    }
}
.sc-locate-flash {
    animation: seatingFlash 1.2s ease;
}

/* TABLE DETAIL PANEL */
.seating-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 30;
}
.seating-detail .mob-sheet-handle {
    display: none;
}
.seating-detail {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 440px;
    max-height: 380px;
    background: #fff;
    border-radius: 10px;
    box-shadow:
        0 8px 40px rgba(44, 32, 22, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    animation: slideUp 0.25s ease;
    display: flex;
    flex-direction: column;
}
.seating-detail-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
.seating-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(44, 24, 16, 0.06);
}
.seating-detail-name {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    border: none;
    outline: none;
    color: var(--txt, #2c1810);
    flex: 1;
}

.seating-detail-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(44, 24, 16, 0.06);
}
.seating-detail-info label {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--txt-m, #8a7a6c);
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}
.seating-detail-info select {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid rgba(44, 32, 22, 0.12);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.78rem;
    color: var(--txt, #2c1810);
    background: #fff;
    transition: border-color 0.2s;
}
.seating-detail-info select:focus {
    border-color: var(--gold, #b8956a);
    outline: none;
}
.seating-detail-rotation {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.seating-detail-rotation label {
    margin-bottom: 0;
}
.seating-detail-rotation input[type="range"] {
    flex: 1;
    accent-color: var(--gold, #b8956a);
    height: 2px;
}
#sd-rotation-val {
    font-size: 0.62rem;
    color: var(--txt-l, #8b7a68);
    min-width: 32px;
}

.cap-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}
.cap-controls button {
    width: 28px;
    height: 28px;
    border: 1.5px solid rgba(44, 32, 22, 0.12);
    border-radius: 8px;
    background: none;
    color: var(--txt, #2c1810);
    font-size: 0.82rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.cap-controls button:hover {
    background: rgba(184, 149, 106, 0.08);
    border-color: var(--gold, #b8956a);
}
.cap-controls span {
    font-size: 0.82rem;
    font-weight: 500;
    min-width: 24px;
    text-align: center;
}

.seating-detail-guests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px 8px;
}
.seating-detail-guests-header span {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--txt-m, #8a7a6c);
    font-weight: 600;
}
.seating-detail-count {
    font-weight: 500 !important;
    color: var(--txt-m, #8a7a6c) !important;
}

.seating-detail-guests {
    padding: 0 20px 10px;
    max-height: 120px;
    overflow-y: auto;
}
.sd-guest-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--txt, #2c1810);
    border-bottom: 1px solid rgba(44, 24, 16, 0.04);
}
.sd-guest-row:last-child {
    border-bottom: none;
}
.sd-guest-row .sg-meal-dot {
    margin-left: auto;
}
.sd-guest-remove {
    background: none;
    border: none;
    color: var(--txt-xl, #b0a090);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 4px;
    border-radius: 6px;
    transition: all 0.15s;
}
.sd-guest-remove:hover {
    color: var(--red);
    background: rgba(192, 57, 43, 0.06);
}

.seating-detail-meals {
    padding: 12px 20px;
    border-top: 1px solid rgba(44, 24, 16, 0.06);
}
.seating-detail-meals-title {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--txt-m, #8a7a6c);
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}
.seating-meal-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.seating-meal-badge {
    font-size: 0.6rem;
    padding: 3px 10px;
    border-radius: 100px;
    font-weight: 500;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.seating-detail-actions {
    padding: 12px 20px;
    border-top: 1px solid rgba(44, 24, 16, 0.06);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Drag ghost */
.sc-drag-ghost {
    position: fixed;
    z-index: 9999;
    padding: 6px 14px;
    background: var(--brown);
    color: var(--cream);
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 24px rgba(44, 32, 22, 0.2);
    pointer-events: none;
    white-space: nowrap;
}

/* Drop target highlight */
.sc-table.sc-drop-target .sc-table-shape {
    border-color: var(--sage);
    box-shadow:
        0 0 0 4px rgba(107, 155, 122, 0.2),
        0 4px 16px rgba(107, 155, 122, 0.15);
    background: rgba(107, 155, 122, 0.06);
}

/* Floating mobile back button (hidden on desktop) */
.seating-mob-back {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 60;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--brown);
    color: var(--cream);
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(30, 20, 12, 0.35);
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}
.seating-mob-back:active {
    transform: scale(0.92);
}

/* ═══ Event Switcher Bar ═══ */
.seating-event-bar {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #fafaf8;
    border-bottom: 1px solid var(--cream-d);
    min-height: 40px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}
.seating-event-bar::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
.seb-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--txt-xl);
    font-weight: 300;
    white-space: nowrap;
}
.seb-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
}
.seb-tab {
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 0.68rem;
    font-weight: 300;
    border: 1px solid var(--cream-d);
    background: #fff;
    color: var(--txt-m);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}
.seb-tab:hover {
    border-color: var(--sage);
    color: var(--sage-d);
}
.seb-tab.active {
    background: var(--brown);
    color: var(--cream);
    border-color: var(--brown);
    font-weight: 400;
}
.seb-tab-unassigned {
    border-style: dashed;
    opacity: 0.7;
}
.seb-tab-unassigned.active {
    opacity: 1;
    border-style: solid;
}

/* ═══ Auto-Assign Button ═══ */
.seating-autoassign-btn {
    background: linear-gradient(135deg, rgba(212, 168, 75, 0.15), rgba(107, 155, 122, 0.12)) !important;
    border: 1px solid rgba(212, 168, 75, 0.3) !important;
    color: #d4a84b !important;
    font-weight: 400 !important;
    letter-spacing: 0.3px;
    transition: all 0.25s;
}
.seating-autoassign-btn:hover {
    background: linear-gradient(135deg, rgba(212, 168, 75, 0.25), rgba(107, 155, 122, 0.2)) !important;
    border-color: rgba(212, 168, 75, 0.5) !important;
    box-shadow: 0 2px 12px rgba(212, 168, 75, 0.2);
    transform: translateY(-1px);
}

/* ═══ Auto-Assign Modal ═══ */
.autoassign-modal {
    background: #fff;
    border-radius: 16px;
    width: 560px;
    max-width: 95vw;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 24px 64px rgba(44, 32, 22, 0.2),
        0 0 0 1px rgba(237, 224, 204, 0.5);
    animation: aaSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes aaSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.aa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 14px;
    border-bottom: 1px solid var(--cream-d);
}
.aa-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.aa-header-left svg {
    color: #d4a84b;
}
.aa-header-left h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--brown);
    margin: 0;
}
.aa-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--cream-d);
    color: var(--txt-m);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    font-family: inherit;
}
.aa-close:hover {
    background: var(--cream-dd);
    color: var(--brown);
}

.aa-desc {
    padding: 14px 24px;
    font-size: 0.72rem;
    color: var(--txt-l);
    line-height: 1.55;
    margin: 0;
    background: rgba(212, 168, 75, 0.04);
    border-bottom: 1px solid var(--cream-d);
}

.aa-options {
    padding: 14px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    border-bottom: 1px solid var(--cream-d);
}
.aa-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--txt-m);
    cursor: pointer;
}
.aa-option input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--sage);
    cursor: pointer;
}

.aa-preview {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    max-height: 340px;
}
.aa-preview::-webkit-scrollbar {
    width: 4px;
}
.aa-preview::-webkit-scrollbar-thumb {
    background: var(--cream-dd);
    border-radius: 4px;
}

/* Table assignment cards in preview */
.aa-table-card {
    margin-bottom: 12px;
    border: 1px solid var(--cream-d);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.aa-table-card:hover {
    border-color: var(--sage);
}
.aa-table-card.aa-rejected {
    opacity: 0.4;
}
.aa-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--cream);
    border-bottom: 1px solid var(--cream-d);
}
.aa-table-name {
    font-family: "Cormorant Garamond", serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brown);
}
.aa-table-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.aa-table-count {
    font-size: 0.62rem;
    color: var(--txt-l);
    background: var(--cream-d);
    padding: 2px 8px;
    border-radius: 10px;
}
.aa-table-actions {
    display: flex;
    gap: 4px;
}
.aa-table-accept,
.aa-table-reject {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--cream-d);
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.15s;
    font-family: inherit;
}
.aa-table-accept:hover {
    background: rgba(107, 155, 122, 0.1);
    border-color: var(--sage);
    color: var(--sage-d);
}
.aa-table-reject:hover {
    background: rgba(212, 114, 76, 0.08);
    border-color: #d4724c;
    color: #d4724c;
}
.aa-table-accept.selected {
    background: var(--sage);
    color: #fff;
    border-color: var(--sage);
}
.aa-table-reject.selected {
    background: #d4724c;
    color: #fff;
    border-color: #d4724c;
}

.aa-guest-list {
    padding: 6px 14px 10px;
}
.aa-guest-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.68rem;
    color: var(--txt-m);
    border-bottom: 1px solid rgba(237, 224, 204, 0.3);
}
.aa-guest-row:last-child {
    border-bottom: none;
}
.aa-guest-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--cream-d);
    color: var(--txt-l);
    font-size: 8px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.aa-guest-name {
    flex: 1;
}
.aa-guest-tag {
    font-size: 0.56rem;
    background: var(--cream-d);
    color: var(--txt-l);
    padding: 1px 6px;
    border-radius: 8px;
}
.aa-guest-meal {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.aa-guest-hh {
    font-size: 0.56rem;
    color: var(--txt-xl);
}
.aa-new-badge {
    font-size: 0.5rem;
    background: rgba(212, 168, 75, 0.15);
    color: #b8942e;
    padding: 1px 5px;
    border-radius: 6px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.aa-summary {
    padding: 10px 24px;
    font-size: 0.7rem;
    color: var(--txt-l);
    background: rgba(107, 155, 122, 0.04);
    border-top: 1px solid var(--cream-d);
    line-height: 1.6;
}
.aa-summary strong {
    color: var(--brown);
    font-weight: 500;
}

.aa-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 24px;
    border-top: 1px solid var(--cream-d);
}
.aa-footer .btn-primary {
    background: linear-gradient(135deg, #d4a84b, #b8942e);
    border-color: #b8942e;
    color: #fff;
}
.aa-footer .btn-primary:hover {
    background: linear-gradient(135deg, #b8942e, #9b7a20);
    box-shadow: 0 4px 16px rgba(212, 168, 75, 0.3);
}

.aa-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--txt-xl);
    font-size: 0.72rem;
}
.aa-empty svg {
    margin-bottom: 8px;
    opacity: 0.3;
}

/* Print styles */
@media print {
    .seating-toolbar,
    .seating-guests-panel,
    .seating-detail,
    .seating-empty,
    .seating-event-bar,
    .sidebar,
    .mob-menu-btn,
    .sidebar-overlay {
        display: none !important;
    }
    .seating-layout {
        grid-template-columns: 1fr !important;
        height: auto !important;
        border: none !important;
    }
    .seating-canvas-wrap {
        overflow: visible !important;
        position: static !important;
    }
    .seating-canvas {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
    }
}

/* Responsive */
@media (max-width: 1100px) {
    .seating-layout {
        grid-template-columns: 180px 1fr 220px;
    }
}
/* ── Canva-style mobile elements: hidden on desktop ── */
.sc-mob-topbar,
.sc-mob-bottombar,
.sc-mob-sheet-overlay {
    display: none;
}
.sd-add-guest-btn {
    display: none;
}

@media (max-width: 900px) {
    /* ── Full-screen app shell ── */
    #tab-seating.active {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* ── Hide desktop toolbar + guest panel ── */
    .seating-toolbar {
        display: none !important;
    }
    .seating-guests-panel {
        display: none !important;
    }
    .seating-back-btn {
        display: none;
    }
    .seating-mob-back {
        display: none;
    }

    /* ── Flex order: topbar(0) → layout(1) → bottombar(2) ── */
    .sc-mob-topbar {
        order: 0;
    }
    .seating-layout {
        order: 1;
    }
    .sc-mob-bottombar {
        order: 2;
    }
    .sc-mob-sheet-overlay {
        order: 3;
    }

    /* ── Layout: event bar + canvas only ── */
    .seating-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }

    /* ── Event bar: slim horizontal scroll ── */
    .seating-event-bar {
        grid-column: 1;
        grid-row: 1;
        padding: 6px 10px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none !important;
        -ms-overflow-style: none;
    }
    .seating-event-bar::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    /* ── Canvas: fills remaining space ── */
    .seating-canvas-wrap {
        grid-column: 1;
        grid-row: 2;
        flex: 1;
        min-height: 0;
        height: auto;
        touch-action: none;
    }

    /* ── Top bar — matches mob-global-appbar ── */
    .sc-mob-topbar {
        display: flex;
        align-items: center;
        gap: 12px;
        position: relative;
        z-index: 10;
        flex-shrink: 0;
        padding: max(14px, env(safe-area-inset-top, 0px)) 16px 14px;
        background: rgba(251, 247, 240, 0.94);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(44, 24, 16, 0.06);
    }
    .sc-mob-btn {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        border: none;
        background: rgba(44, 24, 16, 0.04);
        color: var(--txt, #2c1810);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition:
            background 0.2s,
            transform 0.15s;
        font-family: inherit;
        flex-shrink: 0;
    }
    .sc-mob-btn:active {
        transform: scale(0.9);
        background: rgba(44, 24, 16, 0.1);
    }
    .sc-mob-btn-sm {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
        font-weight: 600;
    }
    .sc-mob-stats {
        font-family: "Cormorant Garamond", Georgia, serif;
        font-size: 1rem;
        font-weight: 600;
        color: var(--txt, #2c1810);
        white-space: nowrap;
        margin-left: auto;
    }
    .sc-mob-zoom {
        display: flex;
        align-items: center;
        gap: 4px;
        margin-left: 8px;
    }
    #sc-mob-zoom-lvl {
        font-size: 0.65rem;
        color: var(--txt-l, #8b7a68);
        min-width: 30px;
        text-align: center;
    }

    /* ── Bottom tab bar — matches mob-global-nav ── */
    .sc-mob-bottombar {
        display: flex;
        align-items: stretch;
        position: relative;
        z-index: 10;
        flex-shrink: 0;
        padding: 4px 0 calc(4px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-top: 1px solid rgba(44, 24, 16, 0.06);
        box-shadow: 0 -4px 24px rgba(44, 24, 16, 0.05);
    }
    .sc-mob-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        border: none;
        background: none;
        color: var(--txt-m, #8a7a6c);
        cursor: pointer;
        font-family: inherit;
        font-size: 0.6rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        transition: color 0.2s;
        padding: 8px 2px 4px;
        position: relative;
        -webkit-tap-highlight-color: transparent;
    }
    .sc-mob-tab svg {
        transition: transform 0.2s;
    }
    .sc-mob-tab.active {
        color: var(--gold, #b8956a);
    }
    .sc-mob-tab.active svg {
        transform: scale(1.12);
        color: var(--gold, #b8956a);
    }
    .sc-mob-tab.active::after {
        content: "";
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 24px;
        height: 3px;
        border-radius: 0 0 4px 4px;
        background: var(--gold, #b8956a);
    }
    .sc-mob-tab:active {
        opacity: 0.6;
    }

    /* ── Seating sheet overlay (uses global mob-sheet-overlay + mob-sheet) ── */
    .sc-mob-sheet-overlay {
        z-index: 64;
    }
    .sc-mob-sheet-overlay .sc-mob-sheet {
        z-index: 65;
    }

    /* ── Full-height variant (guests + assign) — same sheet, full page ── */
    .sc-mob-sheet.sc-mob-sheet-full {
        max-height: 100%;
        height: 100%;
        border-radius: 0;
    }
    .sc-mob-sheet.sc-mob-sheet-full .mob-sheet-handle {
        display: none;
    }

    /* ── Full-height sheet header (back + title) ── */
    .sc-mob-sheet-header {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 0 0 14px;
        margin-bottom: 14px;
        border-bottom: 1px solid rgba(44, 24, 16, 0.06);
    }
    .sc-mob-sheet-header-title {
        font-size: 1rem;
        font-weight: 600;
        color: var(--txt, #2c1810);
    }

    /* Shapes grid — 5 buttons in a row */
    .sc-mob-drawer-shapes {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }
    .sc-mob-shape {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 14px 4px;
        border: 1.5px solid rgba(44, 32, 22, 0.1);
        border-radius: 14px;
        background: #fff;
        cursor: pointer;
        font-family: inherit;
        font-size: 0.6rem;
        font-weight: 500;
        color: var(--txt-m, #8a7a6c);
        transition: all 0.2s;
    }
    .sc-mob-shape svg {
        width: 28px;
        height: 28px;
        color: var(--txt, #2c1810);
    }
    .sc-mob-shape:active {
        background: rgba(184, 149, 106, 0.08);
        border-color: var(--gold, #b8956a);
        transform: scale(0.95);
    }

    /* Elements grid — 2 columns */
    .sc-mob-drawer-elements {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .sc-mob-el {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 13px 14px;
        border: 1.5px solid rgba(44, 32, 22, 0.1);
        border-radius: 14px;
        background: #fff;
        cursor: pointer;
        font-family: inherit;
        font-size: 0.72rem;
        font-weight: 500;
        color: var(--txt, #2c1810);
        transition: all 0.2s;
    }
    .sc-mob-el:active {
        background: rgba(184, 149, 106, 0.08);
        border-color: var(--gold, #b8956a);
        transform: scale(0.97);
    }
    .sc-mob-el-icon {
        font-size: 1.2rem;
        flex-shrink: 0;
    }

    /* Guests drawer */
    .sc-mob-drawer-guests {
        margin: -4px -4px 0;
    }
    .sc-mob-drawer-guests .seating-guests-header {
        display: none;
    }
    .sc-mob-drawer-guests .seating-guests-search {
        margin: 0 0 10px;
        width: 100%;
        padding: 11px 14px;
        border: 1.5px solid rgba(44, 32, 22, 0.12);
        border-radius: 12px;
        font-size: 0.82rem;
    }
    .sc-mob-drawer-guests .seating-guests-search:focus {
        border-color: var(--gold, #b8956a);
        outline: none;
    }
    .sc-mob-drawer-guests .seating-guests-filters {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 10px;
        padding: 2px 0;
    }
    .sc-mob-drawer-guests .seating-guests-filters::-webkit-scrollbar {
        display: none;
    }
    .sc-mob-drawer-guests .seating-filter-pill {
        flex: 0 0 auto;
        padding: 7px 14px;
        border-radius: 100px;
        font-size: 0.7rem;
        font-weight: 500;
        border: 1px solid rgba(44, 24, 16, 0.1);
        background: #fff;
        color: var(--txt, #2c1810);
        transition: all 0.2s;
        white-space: nowrap;
    }
    .sc-mob-drawer-guests .seating-filter-pill.active {
        background: var(--gold, #b8956a);
        color: #fff;
        border-color: var(--gold, #b8956a);
    }
    .sc-mob-drawer-guests .seating-filter-tag {
        width: 100%;
    }
    .sc-mob-drawer-guests .seating-guests-list {
        max-height: none;
        overflow-y: visible;
    }

    /* Actions list — matches mob-detail-actions pattern */
    .sc-mob-drawer-actions {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    .sc-mob-action {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px 16px;
        border: none;
        border-radius: 14px;
        background: rgba(44, 24, 16, 0.03);
        cursor: pointer;
        font-family: inherit;
        font-size: 0.82rem;
        font-weight: 500;
        color: var(--txt, #2c1810);
        transition: background 0.15s;
    }
    .sc-mob-action svg {
        color: var(--gold, #b8956a);
        flex-shrink: 0;
    }
    .sc-mob-action:active {
        background: rgba(184, 149, 106, 0.1);
    }

    /* View toggles inside sheet */
    .sc-mob-sheet .seating-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 0;
        font-size: 0.78rem;
        color: var(--txt, #2c1810);
    }

    /* ── "+" button in table detail guests header ── */
    .sd-add-guest-btn {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        border: 1.5px solid var(--gold, #b8956a);
        background: rgba(184, 149, 106, 0.08);
        color: var(--gold, #b8956a);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s;
        flex-shrink: 0;
    }
    .sd-add-guest-btn:active {
        background: var(--gold, #b8956a);
        color: #fff;
        transform: scale(0.9);
    }

    /* ── Assign-mode drawer ── */
    .sc-mob-assign-header {
        display: flex;
        align-items: center;
        gap: 14px;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(44, 24, 16, 0.06);
        margin-bottom: 12px;
    }
    .sc-mob-assign-title {
        font-size: 0.82rem;
        color: var(--txt, #2c1810);
    }
    .sc-mob-assign-title strong {
        color: var(--txt, #2c1810);
        font-weight: 700;
    }
    .sc-mob-assign-count {
        font-size: 0.68rem;
        color: var(--txt-l, #8b7a68);
        font-weight: 400;
    }
    .sc-mob-assign-search {
        width: 100%;
        padding: 11px 14px;
        border: 1.5px solid rgba(44, 32, 22, 0.12);
        border-radius: 12px;
        font-family: inherit;
        font-size: 0.82rem;
        color: var(--txt, #2c1810);
        background: #fff;
        margin-bottom: 10px;
        outline: none;
        transition: border-color 0.2s;
    }
    .sc-mob-assign-search:focus {
        border-color: var(--gold, #b8956a);
    }
    .sc-mob-assign-list {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    .sc-mob-assign-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        border: none;
        border-radius: 12px;
        background: transparent;
        cursor: pointer;
        font-family: inherit;
        text-align: left;
        transition: background 0.15s;
        width: 100%;
    }
    .sc-mob-assign-item:active {
        background: rgba(184, 149, 106, 0.08);
    }
    .sc-mob-assign-info {
        flex: 1;
        min-width: 0;
    }
    .sc-mob-assign-info .sg-name {
        font-size: 0.82rem;
        color: var(--txt, #2c1810);
        font-weight: 500;
    }
    .sc-mob-assign-info .sg-meta {
        font-size: 0.62rem;
        color: var(--txt-l, #8b7a68);
    }
    .sc-mob-assign-icon {
        color: var(--gold, #b8956a);
        flex-shrink: 0;
        opacity: 0.4;
    }
    .sc-mob-assign-item:active .sc-mob-assign-icon {
        opacity: 1;
    }
    .sc-mob-assign-empty {
        padding: 30px 16px;
        text-align: center;
        font-size: 0.72rem;
        color: var(--txt-xl);
        font-weight: 200;
    }

    /* ── Detail overlay — matches mob-sheet-overlay ── */
    .seating-detail-overlay {
        position: absolute;
        inset: 0;
        z-index: 64;
        background: transparent;
        display: flex;
        align-items: flex-end;
        pointer-events: none;
    }
    .seating-detail-overlay > .seating-detail {
        pointer-events: auto;
    }
    .seating-detail .mob-sheet-handle {
        display: block;
        margin: 8px auto 4px;
        flex-shrink: 0;
    }
    .seating-detail {
        position: relative;
        width: 100%;
        max-width: 100%;
        max-height: 85vh;
        bottom: auto;
        left: auto;
        right: auto;
        transform: none;
        border-radius: 20px 20px 0 0;
        overflow: hidden;
        box-shadow: 0 -8px 32px rgba(44, 24, 16, 0.12);
        animation: mobileSheetUp 0.35s cubic-bezier(0.32, 1.2, 0.54, 1);
        display: flex;
        flex-direction: column;
    }
    @keyframes mobileSheetUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    /* Fixed header */
    .seating-detail-header {
        flex-shrink: 0;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 2;
        border-bottom: 1px solid rgba(44, 24, 16, 0.06);
    }
    /* Scrollable body */
    .seating-detail-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        min-height: 0;
    }
    .seating-detail-info {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 16px 20px;
    }
    /* Hide rotation on mobile */
    .seating-detail-rotation {
        display: none !important;
    }
    .seating-detail-guests {
        max-height: none;
    }
    /* Fixed footer */
    .seating-detail-actions {
        flex-shrink: 0;
        position: sticky;
        bottom: 0;
        background: #fff;
        z-index: 2;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid rgba(44, 24, 16, 0.06);
    }

    /* ── Touch-friendly rotate + resize + delete handles ── */
    .sc-table.sc-selected .sc-rotate-handle,
    .sc-venue-el.sc-selected .sc-rotate-handle {
        opacity: 1;
        width: 28px;
        height: 28px;
        top: -36px;
    }
    .sc-venue-el.sc-selected .sc-resize-handle {
        opacity: 1;
        width: 20px;
        height: 20px;
    }
    .sc-resize-br {
        bottom: -10px;
        right: -10px;
    }
    .sc-venue-el.sc-selected .sc-el-delete {
        display: flex;
        width: 26px;
        height: 26px;
        font-size: 0.85rem;
        top: -10px;
        right: -10px;
    }

    /* ── Fix toggle text + checkbox for white sheet/detail background ── */
    .sc-mob-sheet .seating-toggle,
    .seating-detail .seating-toggle {
        color: var(--txt-m);
    }
    .sc-mob-sheet .seating-toggle input[type="checkbox"],
    .seating-detail .seating-toggle input[type="checkbox"] {
        border-color: var(--cream-dd);
        background: var(--cream);
    }
    .sc-mob-sheet .seating-toggle input[type="checkbox"]:checked,
    .seating-detail .seating-toggle input[type="checkbox"]:checked {
        background: var(--gold, #b8956a);
        border-color: var(--gold, #b8956a);
    }
}

/* ── Extra small: 480px ── */
@media (max-width: 480px) {
    .sc-mob-drawer-shapes {
        grid-template-columns: repeat(3, 1fr);
    }
    .sc-mob-shape {
        padding: 10px 4px;
    }
    .sc-mob-shape svg {
        width: 24px;
        height: 24px;
    }
    .sc-mob-el {
        font-size: 0.66rem;
        padding: 10px 10px;
    }
    .seating-detail {
        max-height: 55vh;
    }
    .seating-detail-info {
        grid-template-columns: 1fr;
    }
    .sg-item {
        padding: 8px 12px;
        gap: 8px;
    }
    .sg-drag-handle {
        display: none;
    }
    .sg-locate-btn {
        opacity: 1;
    }
    .seating-event-bar {
        gap: 6px;
        padding: 4px 8px;
    }
}

