/* ============================================================
   PathRa CMS — Dark Glassmorphic Theme
   ============================================================ */

:root {
    /* Core palette */
    --bg-deep: #07080C;
    --bg-surface: #0D0F14;
    --bg-card: #12141A;
    --bg-elevated: #181B24;
    --bg-hover: #1E2230;

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.15);

    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    /* Brand */
    --gold: #FFB800;
    --gold-dim: rgba(255, 184, 0, 0.15);
    --gold-glow: rgba(255, 184, 0, 0.3);

    /* Status */
    --green: #22C55E;
    --red: #EF4444;
    --blue: #3B82F6;

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-bg-hover: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Layout */
    --sidebar-width: 240px;
    --preview-width: 380px;
    --nav-height: 56px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Shell layout */
    --toolbar-width: 64px;
    --panel-width: 420px;
    --panel-margin: 12px;
    --topbar-height: 40px;
    --gold-alpha: rgba(255, 184, 0, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Custom Scrollbar — thin dark style */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 184, 0, 0.25) transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 184, 0, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 184, 0, 0.4);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

.hidden { display: none !important; }

/* ============================================================
   Auth Gate
   ============================================================ */
#auth-gate {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-deep);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 16px;
    padding: 48px 40px;
    width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .logo-diamond {
    font-size: 32px;
    color: var(--gold);
    margin-bottom: 8px;
}

.login-logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.login-logo p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

#auth-gate input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: var(--bg-deep);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

#auth-gate input:focus {
    border-color: var(--gold);
}

#auth-gate button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: var(--gold);
    color: var(--bg-deep);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    margin-top: 8px;
    transition: all 0.2s;
}

#auth-gate button[type="submit"]:hover { background: #e6a600; }
#auth-gate button:disabled { opacity: 0.5; cursor: not-allowed; }

.error {
    color: var(--red);
    font-size: 13px;
    text-align: center;
    margin-top: 12px;
    min-height: 18px;
}

/* ============================================================
   UNIFIED SHELL — Viewer Backdrop
   ============================================================ */
.viewer-frame {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    border: none;
    z-index: 0;
}

.viewer-empty-state {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: radial-gradient(ellipse at 50% 40%, #0f172a 0%, #07080C 80%);
    color: var(--text-muted);
}

.viewer-empty-state .material-symbols-outlined {
    font-size: 80px;
    opacity: 0.15;
    color: var(--gold);
}

.viewer-empty-state p {
    font-size: 14px;
    opacity: 0.5;
}

/* ============================================================
   UNIFIED SHELL — Left Toolbar
   ============================================================ */
.shell-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--toolbar-width);
    height: 100vh;
    z-index: 200;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 0;
    background: rgba(8, 10, 16, 0.82);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-right: 1px solid var(--glass-border);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.25), inset -1px 0 0 rgba(255, 255, 255, 0.03);
}

.toolbar-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.toolbar-logo {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.logo-diamond-sm {
    font-size: 22px;
    color: var(--gold);
}

.toolbar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 48px;
    padding: 8px 4px;
    border: none;
    border-radius: var(--radius);
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    font-family: inherit;
}

.toolbar-btn .material-symbols-outlined {
    font-size: 22px;
    transition: color 0.2s;
}

.toolbar-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.toolbar-btn:hover {
    color: var(--text-primary);
    background: var(--glass-bg-hover);
}

.toolbar-btn.active {
    color: var(--gold);
    background: var(--gold-dim);
    box-shadow: 0 0 12px rgba(255, 184, 0, 0.1), inset 0 0 0 1px rgba(255, 184, 0, 0.15);
}

.toolbar-btn-ghost {
    width: 48px;
    padding: 8px;
}

.toolbar-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
}

/* Venue selector in toolbar */
.toolbar-venue {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
}

.toolbar-venue .material-symbols-outlined {
    font-size: 18px;
    color: var(--gold);
}

.toolbar-venue select {
    width: 48px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 8px;
    font-family: inherit;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    text-align: center;
    text-overflow: ellipsis;
}

.toolbar-venue select option {
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 12px;
}

/* Environment selector in toolbar */
.toolbar-env {
    width: 100%;
    text-align: center;
}

.toolbar-env select {
    width: 48px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 9px;
    font-family: inherit;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    text-align: center;
}

.toolbar-env select option {
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 12px;
}

/* ============================================================
   UNIFIED SHELL — Top Status Bar
   ============================================================ */
.shell-topbar {
    position: fixed;
    top: 0;
    left: var(--toolbar-width);
    right: calc(var(--panel-width) + var(--panel-margin) * 2);
    height: var(--topbar-height);
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: rgba(8, 10, 16, 0.5);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    pointer-events: none;
    transition: right 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

.topbar-logo {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.topbar-sep {
    color: var(--text-muted);
    opacity: 0.4;
    font-size: 12px;
}

.topbar-venue {
    font-size: 13px;
    color: var(--gold);
    font-weight: 600;
}

.topbar-mode {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.topbar-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.status-dot-sm {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

/* ============================================================
   UNIFIED SHELL — Right Floating Panel
   ============================================================ */
.shell-panel {
    position: fixed;
    top: var(--panel-margin);
    right: var(--panel-margin);
    width: var(--panel-width);
    height: calc(100vh - var(--panel-margin) * 2);
    z-index: 100;
    display: flex;
    flex-direction: column;
    background: rgba(10, 12, 18, 0.78);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.3s ease;
    overflow: hidden;
}

.shell-panel.collapsed {
    transform: translateX(calc(100% + var(--panel-margin)));
    opacity: 0;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.02);
}

.panel-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.panel-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.panel-content {
    min-height: 100%;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    color: var(--text-primary);
    background: var(--glass-bg-hover);
}

/* ============================================================
   Panel internal layout (replaces old 3-column grid)
   ============================================================ */
.panel-content .table-panel {
    max-width: 100%;
    padding: 16px 20px;
}

.menus-layout-shell {
    display: flex;
    flex-direction: column;
}

/* ============================================================
   Left Sidebar — Entity Types
   ============================================================ */
#types-sidebar {
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px 12px;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.btn-icon-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    background: var(--glass-bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-sm:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--gold-dim);
}

.btn-icon-sm .material-symbols-outlined { font-size: 16px; }

.types-list {
    padding: 0 8px 16px;
    flex-grow: 1;
}

.type-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
    margin-bottom: 2px;
}

.type-item:hover {
    background: var(--glass-bg-hover);
}

.type-item.active {
    background: var(--gold-dim);
    border-color: rgba(255, 184, 0, 0.2);
}

.type-item .type-icon {
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg-elevated);
    flex-shrink: 0;
}

.type-item .type-icon .material-symbols-outlined {
    font-size: 18px;
    color: var(--text-secondary);
}

.type-item.active .type-icon .material-symbols-outlined {
    color: var(--gold);
}

.type-item.active .type-icon {
    background: var(--gold-dim);
}

.type-item .type-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.type-item .type-count {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
}

.type-item.active .type-name { color: var(--gold); }

/* ============================================================
   Center — Module Editor
   ============================================================ */
#module-editor {
    background: var(--bg-deep);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 24px;
}

.editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.editor-type-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.type-icon-lg {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
}

.editor-type-info h2 {
    font-size: 20px;
    font-weight: 600;
}

.slug-label {
    font-size: 12px;
    color: var(--text-muted);
    font-family: monospace;
}

.editor-actions {
    display: flex;
    gap: 4px;
}

.btn-ghost {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: none;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ghost:hover {
    background: var(--glass-bg-hover);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.btn-ghost .material-symbols-outlined { font-size: 16px; }

.btn-danger:hover {
    border-color: rgba(239, 68, 68, 0.4);
    color: var(--red);
    background: rgba(239, 68, 68, 0.08);
}

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

.editor-section-label span {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.btn-sm {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sm:hover {
    background: var(--gold-dim);
    border-color: rgba(255, 184, 0, 0.3);
    color: var(--gold);
}

.btn-sm .material-symbols-outlined { font-size: 14px; }

/* Module List */
.modules-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 100px;
}

.module-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    cursor: grab;
    transition: all 0.15s;
    user-select: none;
}

.module-item:hover {
    border-color: var(--border-default);
    background: var(--bg-elevated);
}

.module-item.dragging {
    opacity: 0.5;
    border-color: var(--gold);
    box-shadow: 0 4px 20px rgba(255, 184, 0, 0.1);
}

.module-item.drag-over {
    border-color: var(--gold);
    background: var(--gold-dim);
}

.module-drag-handle {
    color: var(--text-muted);
    cursor: grab;
    flex-shrink: 0;
}

.module-drag-handle .material-symbols-outlined { font-size: 18px; }

.module-toggle {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border-strong);
    border-radius: 4px;
    background: var(--bg-deep);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: all 0.15s;
}

.module-toggle:checked {
    background: var(--gold);
    border-color: var(--gold);
}

.module-toggle:checked::after {
    content: '✓';
    position: absolute;
    top: -1px;
    left: 1px;
    font-size: 12px;
    color: var(--bg-deep);
    font-weight: 700;
}

.module-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.module-type-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.module-type-icon {
    font-size: 14px;
}

.module-source {
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
}

.module-color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--border-default);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: all 0.15s;
}

.module-color-swatch:hover {
    border-color: var(--text-secondary);
    transform: scale(1.1);
}

.module-color-swatch input[type="color"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.module-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s;
    flex-shrink: 0;
}

.module-item:hover .module-remove-btn { opacity: 1; }

.module-remove-btn:hover {
    color: var(--red);
    background: rgba(239, 68, 68, 0.1);
}

.module-remove-btn .material-symbols-outlined { font-size: 16px; }

/* Editor Footer */
.editor-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--gold);
    color: var(--bg-deep);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover { background: #e6a600; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary .material-symbols-outlined { font-size: 18px; }

.save-status {
    font-size: 13px;
    color: var(--green);
    opacity: 0;
    transition: opacity 0.3s;
}

.save-status.visible { opacity: 1; }

/* ============================================================
   Right — Live Preview
   ============================================================ */
#preview-panel {
    background: var(--bg-surface);
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 12px;
    flex-shrink: 0;
}

.preview-header h2 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.preview-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--gold-dim);
    color: var(--gold);
}

.preview-frame {
    flex-grow: 1;
    padding: 12px;
    display: flex;
    justify-content: center;
}

.preview-card {
    width: 100%;
    max-width: 340px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    color: var(--text-primary);
    padding: 24px;
    padding-bottom: 16px;
    box-shadow: 0 15px 40px -15px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    max-height: calc(100vh - 140px);
    align-self: flex-start;
}

/* Preview card inner styles (match venue-ui) */
.preview-card .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.preview-card .modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.preview-card .modal-section {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid;
}

.preview-card .modal-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-card .modal-section p {
    font-size: 13px;
    line-height: 1.6;
    color: #CBD5E1;
}

.preview-card .dyn-section h3::before { display: none; }

.preview-card .section-indicator {
    display: inline-block;
    width: 4px;
    height: 18px;
    border-radius: 2px;
    flex-shrink: 0;
}

.preview-card .modal-content-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 160px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 16px;
}

.preview-card .schedule-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 6px;
    background: rgba(148, 163, 184, 0.05);
    border-radius: 6px;
    margin-bottom: 6px;
}

.preview-card .stage-name-in-list { font-size: 0.7rem; font-weight: 700; color: #F59E0B; text-transform: uppercase; margin-bottom: 2px; }
.preview-card .group-dates { font-size: 0.75rem; color: #94A3B8; }
.preview-card .group-times { font-size: 0.85rem; font-weight: 500; }

.preview-card .artist-links-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.preview-card .artist-links-list a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; font-size: 18px;
    border-radius: 8px; background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
    text-decoration: none;
    transition: all 0.2s;
}

.preview-card .stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.preview-card .stat-item { display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 8px; background: rgba(0,0,0,0.15); border: 1px solid rgba(255,255,255,0.05); }
.preview-card .stat-label { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; color: #64748B; }
.preview-card .stat-value { font-size: 0.9rem; font-weight: 500; }

.preview-card .contact-cards { display: flex; flex-direction: column; gap: 0.4rem; }
.preview-card .contact-card { display: flex; align-items: center; gap: 0.6rem; padding: 8px; border-radius: 8px; background: rgba(0,0,0,0.15); border: 1px solid rgba(255,255,255,0.05); color: #CBD5E1; text-decoration: none; font-size: 0.85rem; }

.preview-card .price-list { display: flex; flex-direction: column; gap: 0.3rem; }
.preview-card .price-item { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px dashed rgba(255,255,255,0.05); font-size: 0.85rem; }
.preview-card .price-item:last-child { border-bottom: none; }
.preview-card .price-value { font-weight: 600; }

/* Link icon colors (subset) */
.preview-card .fa-spotify { color: #1DB954; }
.preview-card .fa-youtube { color: #FF0000; }
.preview-card .fa-instagram { color: #E4405F; }
.preview-card .fa-facebook { color: #1877F2; }
.preview-card .fa-twitter { color: #1DA1F2; }
.preview-card .fa-globe { color: #6366F1; }
.preview-card .fa-soundcloud { color: #FF5500; }
.preview-card .fa-bandcamp { color: #629AA9; }
.preview-card .fa-apple { color: #A2AAAD; }

/* ============================================================
   Empty States
   ============================================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    flex-grow: 1;
    color: var(--text-muted);
}

.empty-state .material-symbols-outlined {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 13px;
    max-width: 200px;
    line-height: 1.5;
}

/* ============================================================
   Modals
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 16px;
    padding: 32px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
}

.modal-card label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.modal-card input[type="text"],
.modal-card select {
    width: 100%;
    padding: 10px 14px;
    margin-top: 6px;
    background: var(--bg-deep);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.modal-card input:focus,
.modal-card select:focus {
    border-color: var(--gold);
}

.modal-card input[readonly] {
    color: var(--text-muted);
    cursor: not-allowed;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-half { flex: 1; }

.color-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.color-input-wrap input[type="color"] {
    width: 40px;
    height: 36px;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    cursor: pointer;
    background: none;
    padding: 2px;
}

.color-hex {
    font-size: 13px;
    font-family: monospace;
    color: var(--text-secondary);
}

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

/* Module Picker */
.module-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.module-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--bg-deep);
    cursor: pointer;
    transition: all 0.15s;
}

.module-picker-item:hover {
    border-color: var(--gold);
    background: var(--gold-dim);
}

.module-picker-item .module-type-icon { font-size: 18px; }
.module-picker-item .module-type-label { font-size: 13px; font-weight: 500; }

/* ============================================================
   Table Panels (Entities & Schedule tabs)
   ============================================================ */
.table-panel {
    padding: 16px 20px;
    max-width: 100%;
    margin: 0;
    width: 100%;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar-search {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    min-width: 160px;
    flex: 1;
    transition: border-color 0.2s, background 0.2s;
}

.toolbar-search:focus {
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.06);
}

.toolbar-select {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    min-width: 100px;
}

.toolbar-select option {
    background: var(--bg-card);
}

.table-wrap {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    overflow: hidden;
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.02);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    padding: 10px 14px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    white-space: nowrap;
}

tbody td {
    padding: 10px 14px;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.entity-thumb {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    display: block;
}

.entity-thumb-empty {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
}

.entity-thumb-empty .material-symbols-outlined {
    font-size: 16px;
    color: var(--text-muted);
    opacity: 0.4;
}

.entity-name {
    font-weight: 500;
}

.type-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tags-cell {
    color: var(--text-muted);
    font-size: 12px;
}

.muted {
    color: var(--text-muted);
    opacity: 0.5;
}

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

.status-dot.active {
    background: var(--green);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

.status-dot.inactive {
    background: var(--text-muted);
    opacity: 0.5;
}

.actions-cell {
    display: flex;
    gap: 4px;
}

/* Modal wide variant */
.modal-card-wide {
    width: 560px;
    max-height: 85vh;
    overflow-y: auto;
}

/* Collapsible form sections (details/summary) */
.form-section {
    margin: 12px 0;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--bg-deep);
    overflow: hidden;
}
.form-section summary {
    cursor: pointer;
    padding: 10px 14px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    transition: color 0.2s;
}
.form-section summary:hover { color: var(--text-primary); }
.form-section summary .material-symbols-outlined { font-size: 18px; color: var(--gold); }
.form-section[open] summary { border-bottom: 1px solid var(--border-default); color: var(--text-primary); }
.form-section > :not(summary) { padding: 10px 14px; }

/* Link rows */
.link-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.link-platform-label {
    width: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: capitalize;
    flex-shrink: 0;
}
.link-row input {
    flex: 1;
    padding: 6px 10px;
    font-size: 13px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}
.link-row input:focus { border-color: var(--gold); }

/* Metadata key-value rows */
.meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.meta-row input {
    flex: 1;
    padding: 6px 10px;
    font-size: 13px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}
.meta-row input:focus { border-color: var(--gold); }
.meta-key { max-width: 140px; }
.remove-meta-row { color: var(--text-muted); flex-shrink: 0; }
.remove-meta-row:hover { color: var(--red); }

/* Contact card rows */
.contact-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.contact-row select {
    width: 110px;
    padding: 6px 8px;
    font-size: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    flex-shrink: 0;
}
.contact-row input {
    flex: 1;
    padding: 6px 10px;
    font-size: 13px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
}
.contact-row input:focus,
.contact-row select:focus { border-color: var(--gold); }

/* Price list rows */
.price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.price-row input {
    flex: 1;
    padding: 6px 10px;
    font-size: 13px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
}
.price-row input:focus { border-color: var(--gold); }
.price-row .price-value { max-width: 100px; text-align: right; }
.remove-contact-row,
.remove-price-row { color: var(--text-muted); flex-shrink: 0; }
.remove-contact-row:hover,
.remove-price-row:hover { color: var(--red); }

/* Form hints */
.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 8px 0;
    padding: 0;
}
.form-hint-inline {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}
.form-hint-block {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin: 8px 0;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-deep);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
}
.form-hint-block .material-symbols-outlined { font-size: 18px; color: var(--gold); }

/* Dynamic JSON textareas inside form sections */
.form-section textarea.dyn-json {
    width: 100%;
    padding: 8px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    resize: vertical;
    outline: none;
}
.form-section textarea.dyn-json:focus { border-color: var(--gold); }

.modal-card textarea {
    width: 100%;
    padding: 10px 14px;
    margin-top: 6px;
    background: var(--bg-deep);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s;
}

.modal-card textarea:focus {
    border-color: var(--gold);
}

.modal-card input[type="url"],
.modal-card input[type="number"],
.modal-card input[type="datetime-local"] {
    width: 100%;
    padding: 10px 14px;
    margin-top: 6px;
    background: var(--bg-deep);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.modal-card input[type="url"]:focus,
.modal-card input[type="number"]:focus,
.modal-card input[type="datetime-local"]:focus {
    border-color: var(--gold);
}

.modal-card input[type="checkbox"] {
    accent-color: var(--gold);
    width: 16px;
    height: 16px;
}

/* ============================================================
   Theme Tab — 2-column layout
   ============================================================ */
.theme-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 0;
    height: calc(100vh - 56px);
}
.theme-layout.hidden {
    display: none !important;
}

.theme-controls {
    padding: 28px 32px;
    overflow-y: auto;
}

.theme-header {
    margin-bottom: 24px;
}

.theme-header h2 {
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.theme-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Section grouping */
.theme-section {
    margin-bottom: 28px;
}

.theme-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.theme-section-title:hover {
    color: var(--gold-light, #ffd700);
}

.theme-section-title .material-symbols-outlined:first-child {
    font-size: 18px;
}

.section-chevron {
    margin-left: auto;
    font-size: 20px !important;
    transition: transform 0.25s ease;
    color: var(--text-muted);
}

.theme-section.collapsed .section-chevron {
    transform: rotate(-90deg);
}

.theme-section.collapsed .theme-section-grid {
    display: none;
}

.theme-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

/* ── Color cards ── */
.theme-color-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.theme-color-card:hover {
    border-color: var(--border-default);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.theme-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.theme-swatch {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid var(--border-subtle);
    flex-shrink: 0;
    transition: background 0.15s;
    /* Checkerboard pattern behind swatch to show alpha */
    background-image:
        linear-gradient(45deg, #2d3748 25%, transparent 25%),
        linear-gradient(-45deg, #2d3748 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #2d3748 75%),
        linear-gradient(-45deg, transparent 75%, #2d3748 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0;
    position: relative;
    overflow: hidden;
}

.theme-card-label {
    flex: 1;
    min-width: 0;
}

.theme-card-label label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1px;
    text-transform: none;
    letter-spacing: 0;
}

.theme-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.4;
}

/* ── Color + hex input row ── */
.color-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-input-wrap input[type="color"] {
    width: 36px;
    height: 28px;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    cursor: pointer;
    background: none;
    padding: 2px;
    flex-shrink: 0;
}

.color-hex {
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    user-select: all;
}

/* ── Opacity slider row ── */
.opacity-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
}

.opacity-label {
    font-size: 10px !important;
    font-weight: 500 !important;
    color: var(--text-muted) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 0 !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.opacity-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--bg-deep);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.opacity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--bg-card);
    box-shadow: 0 0 6px rgba(255, 184, 0, 0.3);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.opacity-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 184, 0, 0.5);
}

.opacity-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--bg-card);
    box-shadow: 0 0 6px rgba(255, 184, 0, 0.3);
    cursor: pointer;
}

.opacity-slider::-moz-range-track {
    height: 4px;
    background: var(--bg-deep);
    border-radius: 2px;
}

.opacity-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    min-width: 36px;
    text-align: right;
    flex-shrink: 0;
}

/* ── Range cards (blur, radius, scale) ── */
.theme-range-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 14px;
    transition: border-color 0.2s;
}

.theme-range-card:hover {
    border-color: var(--border-default);
}

.theme-range-card label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.theme-range-card .theme-desc {
    margin-bottom: 10px;
}

.range-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-range {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--bg-deep);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.theme-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--bg-card);
    box-shadow: 0 0 6px rgba(255, 184, 0, 0.3);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.theme-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 184, 0, 0.5);
}

.theme-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--bg-card);
    box-shadow: 0 0 6px rgba(255, 184, 0, 0.3);
    cursor: pointer;
}

.theme-range::-moz-range-track {
    height: 4px;
    background: var(--bg-deep);
    border-radius: 2px;
}

.range-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 42px;
    text-align: right;
    flex-shrink: 0;
    background: var(--bg-deep);
    padding: 3px 8px;
    border-radius: 4px;
}

/* ── Select cards (fonts) ── */
.theme-select-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 14px;
    transition: border-color 0.2s;
}

.theme-select-card:hover {
    border-color: var(--border-default);
}

.theme-select-card label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.theme-select-card .theme-desc {
    margin-bottom: 10px;
}

.theme-select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6'%3E%3Cpath d='M0 0l6 6 6-6z' fill='%2394a3b8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.theme-select:hover {
    border-color: var(--border-default);
}

.theme-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(255, 184, 0, 0.15);
}

/* Actions */
.theme-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
    margin-top: 8px;
}

.save-status {
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s;
}

.save-status.visible {
    opacity: 1;
}

/* ── Theme Preview Panel ── */
.theme-preview-panel {
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    background: var(--bg-surface);
    overflow: hidden;
}

.theme-preview-panel .preview-header {
    padding: 20px 24px 12px;
    width: 100%;
    flex-shrink: 0;
}

/* Phone frame wrapper — flex:1 from the column gives it a real height */
.theme-phone-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 0;    /* allow flex shrink */
    width: 100%;
}

.theme-phone-frame {
    /*  height: 90% of wrap → aspect-ratio derives width.
        Works because .theme-phone-wrap has a definite height
        from the grid parent (100vh - 56px).                  */
    height: 90%;
    max-height: 680px;
    aspect-ratio: 9 / 19.5;
    max-width: calc(100% - 40px);

    position: relative;
    overflow: hidden;
    border-radius: 36px;
    border: 3px solid #2d3748;
    background: #000;
    box-shadow:
        0 20px 60px -10px rgba(0,0,0,0.7),
        inset 0 0 0 1px #1a202c,
        0 0 0 1px rgba(255,255,255,0.04);
}

/* Dynamic Island notch */
.theme-phone-notch {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 22px;
    background: #000;
    border-radius: 12px;
    z-index: 10;
    border: 1px solid #1a202c;
}

.theme-phone-notch::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0c1220;
    box-shadow: 0 0 0 1.5px #2d3748;
}

/* Iframe: renders at native 414×896, JS scales to fit frame */
.theme-phone-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 414px;
    height: 896px;
    transform-origin: top left;
    /* transform: scale(…) set by JS */
    border: none;
    background: #0f172a;
}

/* Empty state (no venue selected) */
.theme-phone-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    background: #0f172a;
}

.theme-phone-empty .material-symbols-outlined {
    font-size: 40px;
    opacity: 0.25;
}

.theme-phone-empty p {
    font-size: 12px;
    opacity: 0.5;
}

/* ============================================================
   Responsive (stack on narrow)
   ============================================================ */
@media (max-width: 960px) {
    .shell-toolbar {
        width: 56px;
    }
    .toolbar-label { display: none; }
    .shell-panel {
        width: 100%;
        left: 56px;
    }
    .shell-topbar {
        left: 56px;
    }
    .theme-section-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════
   Settings Tab
   ═══════════════════════════════════════════════════ */
.settings-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 24px;
}
.settings-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
}
.settings-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Sections */
.settings-section {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 20px 0;
    background: var(--bg-card);
}
.settings-section legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gold);
    padding: 0 8px;
}
.settings-section legend .material-symbols-outlined {
    font-size: 20px;
}
.settings-section .form-hint {
    margin-bottom: 16px;
}

/* Label grid */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.settings-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.settings-grid label.full-width {
    grid-column: 1 / -1;
}
.settings-grid input,
.settings-grid textarea {
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
}
.settings-grid input:focus,
.settings-grid textarea:focus {
    border-color: var(--gold);
}

/* Days section */
#settings-days-section {
    margin-top: 14px;
}
#settings-days-section label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
#settings-days-section textarea {
    width: 100%;
    margin-top: 6px;
    padding: 8px 12px;
    font-size: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    resize: vertical;
}
#settings-days-section textarea:focus { border-color: var(--gold); }

/* ── Nav Tabs: Icon Grid + Active Bar ── */
.nav-tabs-active {
    margin-bottom: 12px;
}
.nav-tabs-active-bar {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    min-height: 36px;
    padding: 4px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border-subtle);
}
.nav-tabs-active-bar:empty::after {
    content: 'No tabs selected';
    color: var(--text-muted);
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.nav-tab-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px 4px 6px;
    border-radius: 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: grab;
    transition: background 0.15s, border-color 0.15s;
    user-select: none;
}
.nav-tab-pill:hover { background: rgba(255, 255, 255, 0.08); }
.nav-tab-pill.dragging { opacity: 0.3; }
.nav-tab-pill .material-symbols-outlined { font-size: 16px; color: var(--gold); }
.nav-tab-pill .pill-remove {
    margin-left: 4px;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s, color 0.15s;
}
.nav-tab-pill .pill-remove:hover { opacity: 1; color: #ef4444; }
.nav-tabs-counter {
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 4px;
}
.nav-tabs-counter.at-limit { color: var(--gold); font-weight: 600; }
.nav-tabs-counter.over-limit { color: #ef4444; font-weight: 600; }

/* Icon grid for all available tabs */
.settings-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 6px;
}
.tab-grid-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.tab-grid-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-subtle);
}
.tab-grid-btn.active {
    background: rgba(255, 184, 0, 0.1);
    border-color: rgba(255, 184, 0, 0.3);
}
.tab-grid-btn .material-symbols-outlined {
    font-size: 22px;
    color: var(--text-muted);
    transition: color 0.15s;
}
.tab-grid-btn.active .material-symbols-outlined {
    color: var(--gold);
}
.tab-grid-btn .tab-grid-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.2;
}
.tab-grid-btn.active .tab-grid-label {
    color: var(--text-primary);
}
.tab-grid-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Save actions */
.settings-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}
.save-status {
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.3s;
}
.save-status.visible {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════
   Menus Tab
   ═══════════════════════════════════════════════════ */
.menus-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    height: calc(100vh - 56px);
}
.menus-sidebar {
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    overflow-y: auto;
}
.menus-sidebar .sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.menus-sidebar .sidebar-header h2 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}
.menus-poi-list { padding: 8px; }
.poi-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.poi-item:hover { background: var(--bg-elevated); }
.poi-item.active {
    background: var(--gold-alpha);
    color: var(--gold);
    font-weight: 500;
}
.poi-item .material-symbols-outlined { font-size: 20px; }
.menus-content {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.menus-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-subtle);
}
.menus-toolbar h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}
.menus-table-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 24px;
}
.menu-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.menu-thumb {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}
.menu-desc {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.actions-cell { display: flex; gap: 4px; }
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-elevated);
    border-radius: 10px;
    border: 1px solid var(--border-default);
    transition: background 0.2s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}
.toggle-switch input:checked + .toggle-slider {
    background: var(--gold-alpha);
    border-color: var(--gold);
}
.toggle-switch input:checked + .toggle-slider::before {
    background: var(--gold);
    transform: translateX(16px);
}
.modal-card-wide {
    width: 560px;
    max-width: 90vw;
}

/* ═══════════════════════════════════════════════════
   Smart Import
   ═══════════════════════════════════════════════════ */
.import-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.import-controls {
    margin-bottom: 12px;
}
.import-controls label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}
.import-controls select {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 14px;
}
.import-textarea {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
}
.import-textarea::placeholder { color: var(--text-muted); }
.import-preview {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    max-height: 200px;
    overflow-y: auto;
}
.import-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 8px;
}
.import-list { display: flex; flex-direction: column; gap: 4px; }
.import-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    padding: 4px 0;
}
.import-num {
    width: 24px;
    text-align: right;
    color: var(--text-muted);
    font-size: 11px;
}
.import-name { flex: 1; color: var(--text-primary); }
.import-ref {
    font-family: monospace;
    font-size: 11px;
    color: var(--text-muted);
}
.import-error { color: var(--danger); font-size: 13px; }
.toolbar-actions { display: flex; gap: 8px; align-items: center; }

.import-status {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-top: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
}
.import-status-ok { color: var(--success); border-color: var(--success); }
.import-status-error { color: var(--danger); border-color: var(--danger); }

.import-group {
    margin-bottom: 16px;
}
.import-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 6px;
}
.import-group-header .material-symbols-outlined {
    font-size: 18px;
    color: var(--gold);
}
.import-count-badge {
    font-size: 11px;
    background: var(--gold);
    color: var(--bg-primary);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.import-group-items { display: flex; flex-direction: column; gap: 2px; }
.import-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 4px 0;
}
.import-check { accent-color: var(--gold); }
.import-name { flex: 1; color: var(--text-primary); }
.import-detail {
    font-size: 11px;
    color: var(--text-muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.import-detail code {
    font-size: 10px;
    background: var(--bg-primary);
    padding: 1px 4px;
    border-radius: 3px;
}

@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* ============================================================
   Image Upload Modal
   ============================================================ */
.img-drop-zone {
    border: 2px dashed var(--border-default);
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
    position: relative;
}

.img-drop-zone:hover,
.img-drop-zone.img-drag-over {
    border-color: var(--gold);
    background: var(--gold-dim);
}

.img-drop-icon {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.img-drop-zone.img-drag-over .img-drop-icon { color: var(--gold); }

.img-drop-zone p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 4px 0;
}

.img-drop-hint {
    font-size: 12px !important;
    color: var(--text-muted) !important;
}

.img-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* Progress */
.img-progress-area {
    margin: 12px 0;
}

.img-progress-bar-wrap {
    width: 100%;
    height: 6px;
    background: var(--bg-deep);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.img-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), #e6a600);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.img-progress-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* Match Preview */
.img-match-preview {
    margin: 12px 0;
}

.img-match-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.img-skip-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0;
    margin-bottom: 0;
}

.img-skip-label input { accent-color: var(--gold); }

.img-match-table-wrap {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.img-match-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.img-match-table thead th {
    padding: 8px 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 1;
}

.img-match-table tbody td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.img-match-table tbody tr:hover { background: var(--glass-bg-hover); }

.img-row-unmatched { opacity: 0.5; }

.img-thumb {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

.img-filename {
    font-family: monospace;
    font-size: 11px;
    color: var(--text-secondary);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.img-no-match { color: var(--text-muted); font-style: italic; }

.img-tier {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}

.conf-high { color: var(--green); font-weight: 600; }
.conf-med { color: #F59E0B; font-weight: 600; }
.conf-low { color: var(--red); font-weight: 600; }

.img-match-check { accent-color: var(--gold); }

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.toolbar-actions .btn-ghost {
    padding: 6px 10px;
    font-size: 12px;
}

.toolbar-actions .btn-primary {
    padding: 7px 14px;
    font-size: 12px;
}

/* ============================================================
   Settings Panel Styles
   ============================================================ */
.settings-container {
    padding: 20px;
}

.settings-header {
    margin-bottom: 20px;
}

.settings-header h2 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.settings-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.settings-section {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.02);
}

.settings-section legend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0 6px;
}

.settings-section legend .material-symbols-outlined {
    font-size: 16px;
    color: var(--gold);
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Stack to single column when inside the narrow panel */
.panel-content .settings-grid {
    grid-template-columns: 1fr;
}

.settings-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.settings-grid label.full-width {
    grid-column: 1 / -1;
}

.settings-grid input,
.settings-grid textarea {
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.settings-grid input:focus,
.settings-grid textarea:focus {
    border-color: var(--gold);
}

/* (Duplicate tab styles removed — see icon grid styles above) */

/* Event days textarea inside settings */
#settings-days-section {
    margin-top: 12px;
}

#settings-days-section label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 6px;
}

#settings-days-section textarea {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    box-sizing: border-box;
}

#settings-days-section textarea:focus {
    border-color: var(--gold);
}

/* ============================================================
   Topbar expansion when panel is collapsed
   ============================================================ */
.shell-panel.collapsed ~ .shell-topbar,
body:has(.shell-panel.collapsed) .shell-topbar {
    right: 12px;
}

/* ============================================================
   Entity rows — compact, hover-reveal actions
   ============================================================ */
.entity-row { transition: opacity 0.15s; }
.entity-row-inactive { opacity: 0.45; }
.entity-row-inactive:hover { opacity: 0.7; }

.entity-inactive-badge {
    display: inline-block;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94A3B8;
    background: rgba(148, 163, 184, 0.15);
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}

.actions-hover {
    opacity: 0;
    transition: opacity 0.15s;
}
.entity-row:hover .actions-hover { opacity: 1; }

#panel-entities .entity-name {
    font-size: 13px;
    font-weight: 500;
}

.type-badge {
    font-size: 10px;
    padding: 2px 7px;
    white-space: nowrap;
}

/* ============================================================
   VE (Venue Entity) Edit Modal — mirrors venue-ui.css
   Uses --venue-* variables to match the live viewer exactly
   ============================================================ */
.ve-modal {
    --ve-bg: #0a0a0e;
    --ve-surface: rgba(255, 255, 255, 0.04);
    --ve-border: rgba(255, 255, 255, 0.08);
    --ve-text: #e0e0e0;
    --ve-text-dim: #888;
    --ve-text-bright: #fff;
    --ve-accent: #FFB800;
    --ve-radius: 16px;

    width: 420px;
    max-width: 92vw;
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 20px 20px 16px 16px;
    background: var(--ve-bg);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
    font-family: 'Inter', -apple-system, sans-serif;
}

/* Drag handle — matches #venue-modal::before */
.ve-drag-handle {
    width: 36px;
    height: 4px;
    margin: 10px auto 0;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

/* Scrollable body — matches .venue-modal-scroll */
.ve-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    padding: 16px;
    min-height: 0;
}
/* ── Hero Image ── */
.ve-hero {
    position: relative;
    width: 100%;
    height: 200px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    flex-shrink: 0;
}

.ve-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ve-hero-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 6px;
    color: var(--ve-text-dim);
    cursor: pointer;
    transition: color 0.2s;
}
.ve-hero-placeholder:hover { color: var(--ve-accent); }
.ve-hero-placeholder .material-symbols-outlined { font-size: 36px; }
.ve-hero-placeholder span:last-child { font-size: 12px; font-weight: 500; }

/* Edit button (pencil) on hero */
.ve-hero-edit-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.15s, background 0.15s;
}
.ve-hero-edit-btn:hover { background: rgba(0, 0, 0, 0.7); color: #fff; }
.ve-hero-edit-btn .material-symbols-outlined { font-size: 16px; }

/* Hidden file input — full coverage clickable */
.ve-hero-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: -1;
}

/* Upload spinner overlay */
.ve-hero-uploading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 8px;
    color: var(--ve-text-dim);
    font-size: 12px;
    font-weight: 500;
}
.ve-hero-uploading.hidden { display: none; }

.ve-hero-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--ve-border);
    border-top-color: var(--ve-accent);
    border-radius: 50%;
    animation: ve-spin 0.8s linear infinite;
}
@keyframes ve-spin { to { transform: rotate(360deg); } }

/* Drag-over highlight */
.ve-hero-dragover {
    outline: 2px dashed var(--ve-accent);
    outline-offset: -4px;
}
.ve-hero-dragover .ve-hero-placeholder { color: var(--ve-accent); }

/* Title input — matches .venue-modal-scroll h2 */
.ve-title {
    width: 100%;
    font-size: 22px;
    font-weight: 700;
    color: var(--ve-text-bright);
    background: none;
    border: none;
    border-bottom: 1px solid transparent;
    outline: none;
    padding: 0 0 4px;
    margin: 0 0 4px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.ve-title:focus { border-bottom-color: var(--ve-accent); }
.ve-title::placeholder { color: var(--ve-text-dim); }

/* Type row — matches .venue-modal-type */
.ve-type-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.ve-type-select {
    font-size: 12px;
    color: var(--ve-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--ve-surface);
    border: 1px solid var(--ve-border);
    border-radius: 6px;
    padding: 4px 8px;
    outline: none;
    font-family: inherit;
    cursor: pointer;
}
.ve-type-select:focus { border-color: var(--ve-accent); }

.ve-ref-key {
    font-size: 11px;
    color: var(--ve-text-dim);
    background: none;
    border: none;
    border-bottom: 1px dashed var(--ve-border);
    outline: none;
    font-family: 'SF Mono', 'Consolas', monospace;
    padding: 2px 0;
    width: auto;
    flex: 1;
    min-width: 0;
}
.ve-ref-key:focus { border-bottom-color: var(--ve-accent); color: var(--ve-text); }

/* ── Section Cards — matches .venue-modal-section in viewer ── */
.ve-section-card {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
    padding: 14px 16px;
    margin-bottom: 12px;
}

.ve-section-header {
    font-size: 12px;
    font-weight: 700;
    color: var(--ve-accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ve-section-dot {
    display: inline-block;
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: var(--ve-accent);
    flex-shrink: 0;
}

/* Section card inputs */
.ve-section-card input[type="text"],
.ve-section-card input[type="url"],
.ve-section-card textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--ve-surface);
    border: 1px solid var(--ve-border);
    border-radius: 10px;
    color: var(--ve-text);
    font-size: 14px;
    line-height: 1.6;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    resize: vertical;
}
.ve-section-card input:focus,
.ve-section-card textarea:focus { border-color: var(--ve-accent); }

.ve-section-card select {
    width: 100%;
    padding: 10px 12px;
    background: var(--ve-surface);
    border: 1px solid var(--ve-border);
    border-radius: 10px;
    color: var(--ve-text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

/* Details/summary inside section cards */
.ve-section-card .form-section {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
}
.ve-section-card .form-section summary {
    font-size: 12px;
    font-weight: 700;
    color: var(--ve-accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    list-style: none;
    padding: 0;
    margin-bottom: 10px;
}
.ve-section-card .form-section summary::-webkit-details-marker { display: none; }

.ve-section-card .form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.ve-section-card .link-platform-label {
    min-width: 70px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ve-text-dim);
}
.ve-section-card .form-row input {
    flex: 1;
    padding: 8px 10px;
    background: var(--ve-surface);
    border: 1px solid var(--ve-border);
    border-radius: 8px;
    color: var(--ve-text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
}
.ve-section-card .form-row input:focus { border-color: var(--ve-accent); }



/* ── Facts Grid — matches .venue-modal-facts ── */
.ve-facts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ve-fact-card {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--ve-surface);
    border: 1px solid var(--ve-border);
}

.ve-fact-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ve-text-dim);
    margin-bottom: 4px;
}

.ve-fact-value {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--ve-text-bright);
    font-family: inherit;
    outline: none;
    padding: 0;
    transition: border-color 0.2s;
}
.ve-fact-value:focus { border-bottom-color: var(--ve-accent); }
.ve-fact-value::placeholder { color: var(--ve-text-dim); font-weight: 400; }

/* ── Meta row (sort + active) ── */
.ve-meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    margin: 8px 0 12px;
    border-radius: 10px;
    background: var(--ve-surface);
    border: 1px solid var(--ve-border);
}

.ve-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ve-text);
}
.ve-meta-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ve-text-dim);
}
.ve-meta-item input[type="number"] {
    width: 56px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--ve-border);
    border-radius: 6px;
    color: var(--ve-text-bright);
    font-size: 14px;
    font-weight: 600;
    outline: none;
    font-family: inherit;
}
.ve-toggle {
    cursor: pointer;
}
.ve-toggle input[type="checkbox"] {
    accent-color: var(--ve-accent);
}

/* ── Action buttons — matches venue-modal-cta ── */
.ve-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
.ve-btn-ghost {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--ve-border);
    border-radius: 12px;
    background: none;
    color: var(--ve-text-dim);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s, border-color 0.15s;
}
.ve-btn-ghost:hover { color: var(--ve-text-bright); border-color: rgba(255, 255, 255, 0.2); }

.ve-btn-primary {
    flex: 2;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: var(--ve-accent);
    color: #000;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
}
.ve-btn-primary:active { opacity: 0.85; }

