/* =========================================
   Sketch Editor – fullscreen modal overlay
   Shared between CRM Config & Event Card
   ========================================= */

.sketch-editor-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: var(--bg-app);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sketch-editor-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   Header bar
   ========================================= */
.sketch-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    background: var(--white);
    padding: 12px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    flex-shrink: 0;
    gap: 12px;
}

.sketch-header-bar .sketch-event-info h2 {
    font-weight: 800;
    font-size: 18px;
    color: var(--primary);
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.sketch-header-bar .sketch-event-info p {
    color: var(--text1);
    font-size: 13px;
    font-weight: 500;
    margin: 0;
}

.sketch-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Header buttons are close to top edge: show tooltips below */
.sketch-header-bar [data-tooltip]::before {
    top: calc(100% + 12px);
    bottom: auto;
    transform: translateX(-50%) translateY(-8px);
}

.sketch-header-bar [data-tooltip]::after {
    top: calc(100% + 5px);
    bottom: auto;
    transform: translateY(-8px);
    clip-path: polygon(50% 0, 0 100%, 100% 100%);
}

.sketch-btn-unlock {
    background-color: color-mix(in srgb, var(--red) 80%, var(--lbl4));
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 400;
    font-size: 16px;
}

.sketch-btn-unlock:hover {
    background-color: color-mix(in srgb, var(--red) 88%, var(--lbl4));
    border-color: color-mix(in srgb, var(--red) 88%, var(--lbl4));
    transform: translateY(-2px);
}

.sketch-btn-unlock.is-open {
    background-color: #48bb78;
    color: var(--white);
    border-color: #48bb78;
}

#lock-icon {
    font-size: 18px;
}

/* Table summary bar (event-card only) */
.seating-summary-bar {
    display: none;
    align-items: center;
    gap: 20px;
    padding: 5px 15px;
    background: var(--white);
    font-family: 'Heebo', sans-serif;
    border-radius: 10px;
    white-space: nowrap;
}

.sketch-rotation-row {
    display: none;
    position: fixed;
    z-index: 9200;
    direction: ltr;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    min-width: 250px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.sketch-rotation-row.active {
    display: flex;
}

.sketch-rotation-top {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 78px;
}

.sketch-rotation-label {
    font-size: 13px;
    color: var(--text1);
    font-weight: 700;
}

.sketch-rotation-value {
    font-size: 14px;
    color: var(--btn-primary);
    font-weight: 800;
    min-width: 38px;
    text-align: right;
}

.sketch-rotation-slider {
    flex: 1;
    min-width: 120px;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    outline: none;
}

.sketch-rotation-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 10px;
    background: #e2e8f0;
}

.sketch-rotation-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--btn-primary);
    border: 0;
    box-shadow: 0 2px 8px rgba(155, 81, 224, 0.35);
    margin-top: -7px;
    cursor: pointer;
}

.sketch-rotation-slider::-moz-range-track {
    height: 6px;
    border-radius: 10px;
    background: #e2e8f0;
}

.sketch-rotation-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--btn-primary);
    border: 0;
    box-shadow: 0 2px 8px rgba(155, 81, 224, 0.35);
    cursor: pointer;
}

.summary-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-group i {
    font-size: 14px;
    color: #64748b;
    opacity: 0.8;
}

.summary-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 400;
}

.summary-value {
    font-size: 16px;
    color: #1E4E84;
    font-weight: 700;
    min-width: 20px;
}

.separator {
    width: 1px;
    height: 16px;
    background-color: #e2e8f0;
}

.reserve-group i,
.reserve-group .summary-value {
    color: #d97706;
}

.update-flash {
    animation: flash 0.5s ease;
}

@keyframes flash {
    0% { opacity: 1; }
    50% { opacity: 0.3; transform: scale(1.1); }
    100% { opacity: 1; }
}

.sketch-save-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.sketch-save-status {
    font-size: 12px;
    font-weight: 700;
    color: var(--text1);
    padding: 0;
    line-height: 1;
    white-space: nowrap;
    min-width: 120px;
    flex-shrink: 0;
}

.sketch-save-status.dirty {
    color: var(--warning);
}

.sketch-save-status.saving {
    color: var(--text1);
}

.sketch-save-status.success {
    color: var(--green);
}

.sketch-history-controls {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
}

.sketch-btn-history {
    background: var(--white);
    border: 1px solid transparent;
    color: var(--black);
    padding: 7px 11px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
    line-height: 1;
}

.sketch-btn-history-print {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-weight: 700;
}

.sketch-btn-history:hover {
    background: var(--lighter);
    color: var(--primary);
}

.sketch-btn-save {
    position: relative;
    overflow: visible;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 136px;
    min-height: 40px;
    gap: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    box-sizing: border-box;
    font-size: 16px;
}

.sketch-btn-save [data-ref="saveText"] {
    font-size: 16px;
}

.sketch-save-spinner {
    display: none;
    animation: sketch-save-spin 1s linear infinite;
}

.sketch-btn-save.dirty {
    background: var(--btn-primary);
    border-color: var(--btn-primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(30, 78, 132, 0.25);
    padding: 7px 14px;
    font-size: 13px;
}

.sketch-btn-save.dirty::after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--warning);
    border-radius: 50%;
    position: absolute;
    top: 6px;
    right: 8px;
    border: 2px solid var(--btn-primary);
}

.sketch-btn-save.saving {
    opacity: 0.85;
    cursor: wait;
}

.sketch-btn-save.saving .sketch-save-spinner {
    display: inline-block;
}

.sketch-btn-save.success {
    background: var(--green);
    color: var(--white);
}

@keyframes sketch-save-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.sketch-btn-save:disabled {
    opacity: 1;
    cursor: not-allowed;
    pointer-events: auto;
}

.sketch-btn-close {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text1);
    padding: 7px 14px;
    min-height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
}

.sketch-btn-close:hover {
    background: var(--bg-app);
    color: var(--black);
}

.sketch-rename-modal .sketch-rename-field-wrap {
    margin-top: 10px;
    margin-bottom: 12px;
}

.sketch-rename-modal .sketch-rename-input {
    width: 100%;
    text-align: right;
}

/* =========================================
   Main layout
   ========================================= */
.sketch-seating-layout {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* =========================================
   Sidebar (right in RTL)
   ========================================= */
.sketch-sidebar {
    width: 280px;
    background: var(--white);
    border-left: 1px solid var(--border);
    padding: 18px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}

.sketch-sidebar-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sketch-tool-btn {
    background: var(--bg-app);
    border: 1px solid var(--border);
    padding: 9px 10px;
    border-radius: 10px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--black);
    transition: 0.2s;
    width: 100%;
    text-align: right;
}

.sketch-tool-btn:hover {
    background: var(--lighter);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(-2px);
}

.sketch-tool-btn i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sketch-tool-btn.dashed-border {
    border-style: dashed;
}

.sketch-section-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--text1);
    margin: 14px 0 8px 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
}

.sketch-action-group {
    background: var(--bg-app);
    padding: 14px;
    border-radius: 12px;
    margin-top: 18px;
    border: 1px dashed var(--border);
}

.sketch-action-group h4 {
    font-size: 13px;
    margin: 0 0 10px 0;
    color: var(--text1);
    font-weight: 700;
}

.sketch-background-preview {
    width: 100%;
    height: 116px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background-color: var(--white);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    overflow: hidden;
    position: relative;
    margin-bottom: 8px;
}

.sketch-background-preview::after {
    content: 'ללא תמונה';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text1);
    font-size: 13px;
    font-weight: 600;
    background: color-mix(in srgb, var(--white) 92%, transparent);
}

.sketch-background-preview.has-image::after {
    display: none;
}

.sketch-background-status {
    color: var(--text1);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 8px;
}

.sketch-btn-action {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
}

.sketch-btn-action:hover {
    background: var(--btn-primary);
    color: var(--white);
    border-color: var(--btn-primary);
}

/* =========================================
   Halls container (tabs + canvas)
   ========================================= */
.sketch-halls-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-app);
    min-width: 0;
}

.sketch-halls-tabs {
    display: flex;
    background: var(--white);
    padding: 8px 18px 0 18px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
    overflow-x: auto;
    flex-shrink: 0;
    position: relative;
    min-height: 52px;
}

.sketch-hall-tab {
    padding: 9px 18px;
    background: var(--lightgray);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--text1);
    white-space: nowrap;
    transition: 0.15s;
}

.sketch-hall-tab.active {
    background: var(--white);
    color: var(--primary);
    padding-bottom: 10px;
    margin-bottom: -1px;
    border-top: 3px solid var(--primary);
}

.event-card-readonly .sketch-hall-tab.is-readonly {
    opacity: 0.55;
    pointer-events: none;
    cursor: default;
}

.sketch-add-hall-btn {
    padding: 9px 14px;
    background: transparent;
    border: none;
    color: var(--btn-primary);
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
    font-family: inherit;
    font-size: 13px;
}

.sketch-add-hall-btn:hover {
    text-decoration: underline;
}

/* =========================================
   Canvas
   ========================================= */
.sketch-canvas-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.sketch-hall-canvas {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(25, 84, 141, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(25, 84, 141, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    cursor: crosshair;
    display: none;
}

.sketch-canvas-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-position: center top;
    background-repeat: no-repeat;
    background-size: 100% auto;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sketch-canvas-background.has-image {
    opacity: 1;
}

.sketch-hall-canvas.active {
    display: block;
}

.sketch-align-guide {
    position: absolute;
    display: none;
    pointer-events: none;
    z-index: 2000;
    background: var(--primary);
    opacity: 0.65;
}

.sketch-align-guide.active {
    display: block;
}

.sketch-align-guide.vertical {
    top: 0;
    bottom: 0;
    width: 1px;
}

.sketch-align-guide.horizontal {
    left: 0;
    right: 0;
    height: 1px;
}

/* =========================================
   Table shapes & objects on canvas
   ========================================= */
.sketch-table-shape {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    background: var(--white);
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(25, 84, 141, 0.15);
    font-size: 12px;
    font-weight: 800;
    cursor: grab;
    text-align: center;
    transform: translate(-50%, -50%) rotate(0deg);
    background-clip: padding-box;
    user-select: none;
    box-sizing: border-box;
    padding: 6px 8px;
    overflow: visible;
    z-index: 1;
}

.sketch-table-shape .sketch-table-number {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 2px;
    position: relative;
    z-index: 2;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sketch-table-shape .sketch-table-name {
    font-size: 11px;
    font-weight: 500;
    position: relative;
    z-index: 2;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sketch-table-shape .sketch-table-capacity {
    font-size: 15px;
    color: var(--text1);
    font-weight: 500;
    margin-top: 2px;
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
}

.sketch-table-shape .sketch-table-capacity i {
    font-size: 15px;
}

.sketch-table-occupancy-ring {
    position: absolute;
    inset: -12px;
    pointer-events: none;
    z-index: 1;
}

.sketch-table-occupancy-seat {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.sketch-table-occupancy-seat.is-compact {
    width: 9px;
    height: 9px;
}

.sketch-table-occupancy-seat.is-filled {
    background: var(--lbl14) !important;
    border-color: var(--lbl14) !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.sketch-table-assignment-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 800;
    color: var(--black);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.16);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    padding: 3px 9px;
    position: absolute;
    left: 50%;
    bottom: -33px;
    transform: translateX(-50%);
    z-index: 4;
    pointer-events: none;
    white-space: nowrap;
    direction: ltr;
    unicode-bidi: isolate;
}

.sketch-table-assignment-counts {
    display: inline-flex;
    align-items: center;
    direction: ltr;
    unicode-bidi: isolate;
}

.sketch-reserve-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--red);
    color: var(--white);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: 800;
    border: 2px solid var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

.sketch-table-shape[data-reserve="true"] .sketch-reserve-badge {
    display: flex;
}

.sketch-table-shape.selected {
    border-color: var(--btn-primary);
    box-shadow: 0 0 0 4px var(--lighter), 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000 !important;
}

.sketch-table-shape:active,
.sketch-table-shape.is-dragging {
    cursor: grabbing;
    box-shadow: 0 15px 30px rgba(25, 84, 141, 0.25);
    z-index: 1001 !important;
}

/* Shape variants */
.sketch-shape-round {
    border-radius: 50%;
}

.sketch-shape-square {
    border-radius: 12px;
}

.sketch-shape-rectangle {
    border-radius: 12px;
}

.sketch-shape-stage {
    background: #fef2f2;
    border-color: var(--red);
    color: var(--red);
    border-radius: 16px;
}

.sketch-shape-pillar {
    border-radius: 50%;
    background: var(--text1);
    border: none;
    color: var(--white);
}

.sketch-shape-wall {
    background: #cbd5e1;
    border: 2px solid #94a3b8;
    border-radius: 4px;
}

.sketch-shape-line {
    background: var(--black);
    border: none;
    border-radius: 2px;
}

.sketch-shape-arrow-thick,
.sketch-shape-arrow-thin {
    border: none;
    background: transparent;
    box-shadow: none !important;
}

.sketch-shape-arrow-thick {
    color: var(--white);
}

.sketch-shape-arrow-thick::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--black);
    clip-path: polygon(0% 30%, 70% 30%, 70% 0%, 100% 50%, 70% 100%, 70% 70%, 0% 70%);
    z-index: 1;
}

.sketch-shape-arrow-thin::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--black);
    clip-path: polygon(0% 40%, 80% 40%, 80% 10%, 100% 50%, 80% 90%, 80% 60%, 0% 60%);
    z-index: 1;
}

/* =========================================
   Resize & rotate handles
   ========================================= */
.sketch-resize-handle {
    position: absolute;
    bottom: -6px;
    left: -6px;
    width: 16px;
    height: 16px;
    background: var(--white);
    border: 3px solid var(--btn-primary);
    border-radius: 50%;
    cursor: sw-resize;
    display: none;
    z-index: 10;
}

.sketch-rotate-handle {
    position: absolute;
    top: -30px;
    left: calc(50% - 12px);
    width: 24px;
    height: 24px;
    background: var(--white);
    border: 2px solid var(--btn-primary);
    border-radius: 50%;
    cursor: grab;
    display: none;
    justify-content: center;
    align-items: center;
    color: var(--btn-primary);
    font-size: 12px;
    z-index: 10;
}

.sketch-table-shape.selected .sketch-resize-handle {
    display: block;
}

.sketch-table-shape.selected .sketch-rotate-handle {
    display: flex;
}

.sketch-rotate-handle:active {
    cursor: grabbing;
    background: var(--btn-primary);
    color: var(--white);
}

/* =========================================
   Context menus
   ========================================= */
.sketch-context-menu {
    position: fixed;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 230px;
    padding: 15px;
    display: none;
    z-index: 9999;
    border: 1px solid var(--border);
}

.sketch-context-menu.active {
    display: block;
}

.sketch-tool-btn[data-add="snake"] {
    display: none;
}

.sketch-ctx-header {
    font-size: 14px;
    font-weight: 800;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.sketch-ctx-group {
    margin-bottom: 12px;
}

.sketch-ctx-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text1);
}

.sketch-ctx-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    background: var(--white);
    color: var(--black);
}

.sketch-ctx-input:focus {
    outline: none;
    border-color: var(--btn-primary);
}

.sketch-ctx-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 15px;
}

.sketch-ctx-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
}

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

/* Tab context menu */
.sketch-tab-context-menu {
    position: fixed;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 180px;
    padding: 10px;
    display: none;
    z-index: 9999;
    border: 1px solid var(--border);
}

.sketch-tab-context-menu.active {
    display: block;
}

.sketch-tab-menu-item {
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    transition: 0.15s;
    border: none;
    background: none;
    width: 100%;
    font-family: inherit;
    color: var(--black);
    text-align: right;
}

.sketch-tab-menu-item:last-child {
    margin-bottom: 0;
}

.sketch-tab-menu-item:hover {
    background: var(--bg-app);
    color: var(--primary);
}

.sketch-tab-menu-item.danger {
    color: var(--red);
}

.sketch-tab-menu-item.danger:hover {
    background: #fee2e2;
    color: var(--red);
}

/* =========================================
   CRM Config – Sketches tab content
   ========================================= */
.sketch-config-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 40px 20px;
}

.sketch-config-panel .sketch-config-desc {
    text-align: center;
    color: var(--text1);
    font-size: 14px;
    max-width: 400px;
    line-height: 1.7;
}

.sketch-config-panel .sketch-config-icon {
    font-size: 48px;
    color: var(--primary);
    opacity: 0.3;
}

.sketch-config-actions-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.sketch-config-venue-field {
    min-width: 220px;
    margin: 0;
}

.sketch-config-venue-field .label {
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid var(--primary);
}

.sketch-default-chairs-field {
    width: min(100%, 420px);
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

#screen-crm-config #tab-sketches .sketch-default-chairs-field > .label {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.sketch-default-chairs-field .input {
    width: 100%;
}

.sketch-config-field-note {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.sketch-config-panel .sketch-lock-field {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 14px;
    width: min(100%, 420px);
    min-width: 0;
    padding: 12px 20px;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.06);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.sketch-config-panel .sketch-lock-field:focus-within {
    border-color: var(--primary);
    background: var(--bg-app);
}

.sketch-config-panel .sketch-lock-label {
    all: unset;
    box-sizing: border-box;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    cursor: pointer;
    text-align: right;
}

.sketch-config-panel .sketch-lock-label .sketch-lock-title {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text1);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    white-space: normal;
}

.sketch-config-panel .sketch-lock-label .sketch-lock-title i {
    font-size: 13px;
    color: var(--primary);
}

.sketch-config-panel .sketch-lock-label .sketch-lock-subtitle {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    white-space: normal;
}

.sketch-config-panel .sketch-lock-field .switch {
    margin-right: 0;
    margin-left: 0;
    flex: 0 0 auto;
}

.sketch-config-panel .sketch-lock-field .switch .slider {
    transition: 0.25s ease;
}

.sketch-config-panel .sketch-lock-field .switch .slider:before {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.14);
}

/* Guard against global ".form-tab-panel .field label" rules from other modules */
#screen-crm-config #tab-sketches .sketch-lock-field > .sketch-lock-label {
    all: unset;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    cursor: pointer !important;
    text-align: right !important;
    white-space: normal !important;
}

#screen-crm-config #tab-sketches .sketch-lock-field > .sketch-lock-label .sketch-lock-title,
#screen-crm-config #tab-sketches .sketch-lock-field > .sketch-lock-label .sketch-lock-subtitle {
    width: auto !important;
    max-width: none !important;
    white-space: normal !important;
}

.sketch-open-editor-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--btn-primary);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.sketch-open-editor-btn:hover {
    background: var(--btn-pr-hover);
}

.sketch-open-editor-btn i {
    font-size: 16px;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 767px) {
    .sketch-sidebar {
        width: 220px;
        padding: 12px;
    }

    .sketch-header-bar {
        padding: 10px 14px;
        flex-wrap: wrap;
    }
    .sketch-config-panel {
        padding-top: 15px;
    }

    .sketch-tool-btn {
        font-size: 12px;
        padding: 7px 8px;
    }

    .sketch-config-actions-row {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .sketch-config-venue-field {
        min-width: 0;
        width: 100%;
    }

    .sketch-default-chairs-field {
        width: 100%;
    }
    
        #screen-crm-config #tab-sketches .sketch-default-chairs-field .input {
            border-radius: 8px;
}

@media (max-width: 600px) {
    .sketch-seating-layout {
        flex-direction: column;
    }

    .sketch-sidebar {
        width: 100%;
        max-height: 200px;
        border-left: none;
        border-bottom: 1px solid var(--border);
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        overflow-y: auto;
    }

    .sketch-sidebar-title {
        width: 100%;
    }

    .sketch-section-label {
        width: 100%;
    }

    .sketch-tool-btn {
        width: auto;
        flex: 0 0 auto;
    }

    .sketch-tool-btn[data-add="round"],
    .sketch-tool-btn[data-add="square"],
    .sketch-tool-btn[data-add="rectangle"],
    .sketch-tool-btn[data-add="stage"] {
        width: calc(50% - 3px);
        min-height: 76px;
        margin-bottom: 0;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        text-align: center;
        padding: 10px 8px;
    }

    .sketch-tool-btn[data-add="round"] i,
    .sketch-tool-btn[data-add="square"] i,
    .sketch-tool-btn[data-add="rectangle"] i,
    .sketch-tool-btn[data-add="stage"] i {
        width: auto;
    }

    .sketch-action-group {
        width: 100%;
    }
}
