/* ====================================================================
   Golden Layout — Amia Admin Panel Theme Override
   Maps GL's dark theme to the admin panel's dark/gold design tokens.
   Loaded AFTER goldenlayout-base.css and goldenlayout-dark-theme.css.
   ==================================================================== */

/* ── Root background ─────────────────────────────────────────────── */
.lm_goldenlayout {
    background: var(--bg-dark, #1c1b19);
}

/* ── Content area ────────────────────────────────────────────────── */
.lm_content {
    background: var(--bg-card, #26241f);
    border: 1px solid var(--border-subtle, #3e3a30);
}

/* ── Splitters ───────────────────────────────────────────────────── */
.lm_splitter {
    background: var(--border-subtle, #3e3a30);
    opacity: 0.001;
    transition: opacity 200ms ease, background 200ms ease;
}
.lm_splitter:hover,
.lm_splitter.lm_dragging {
    background: var(--accent, #c9a84c);
    opacity: 1;
}

/* ── Header & Tabs ───────────────────────────────────────────────── */
.lm_header {
    height: 28px;
}

.lm_header .lm_tab {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.8rem;
    color: var(--text-secondary, #8a8477);
    background: var(--bg-input, #33302a);
    box-shadow: none;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    margin-right: 2px;
    padding: 4px 12px 3px 12px;
    transition: background 150ms ease, color 150ms ease;
}

.lm_header .lm_tab:hover {
    background: var(--bg-card, #26241f);
    color: var(--text-primary, #d0ccc2);
}

.lm_header .lm_tab.lm_active {
    background: var(--bg-card, #26241f);
    color: var(--text-primary, #d0ccc2);
    border-color: var(--border-subtle, #3e3a30);
    border-bottom: 2px solid var(--accent, #c9a84c);
    box-shadow: none;
    padding-bottom: 2px;
}

.lm_header .lm_tab.lm_active.lm_focused {
    background-color: var(--bg-header, #3a3520);
    border-bottom-color: var(--accent-hover, #ddc06a);
}

/* Tab close button */
.lm_header .lm_tab .lm_close_tab {
    width: 11px;
    height: 11px;
    background-image: url('lib/img/lm_close_white.png');
    background-position: center center;
    background-repeat: no-repeat;
    top: 6px;
    right: 6px;
    opacity: 0.4;
}
.lm_header .lm_tab .lm_close_tab:hover {
    opacity: 1;
}
.lm_header .lm_tab.lm_active .lm_close_tab { opacity: 0.7; }
.lm_header .lm_tab.lm_active .lm_close_tab:hover { opacity: 1; }

/* ── Controls (popout, maximise, close) ──────────────────────────── */
.lm_controls > * {
    position: relative;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0.4;
    transition: opacity 200ms ease;
}
.lm_controls > *:hover { opacity: 1; }
.lm_controls .lm_popout   { background-image: url('lib/img/lm_popout_white.png'); }
.lm_controls .lm_maximise { background-image: url('lib/img/lm_maximise_white.png'); }
.lm_controls .lm_close    { background-image: url('lib/img/lm_close_white.png'); }

.lm_maximised .lm_header {
    background-color: var(--bg-dark, #1c1b19);
}
.lm_maximised .lm_controls .lm_maximise {
    background-image: url('lib/img/lm_minimize_white.png');
}

.lm_header .lm_controls .lm_tabdropdown:before {
    color: var(--text-primary, #d0ccc2);
}

/* ── Drop target indicator ───────────────────────────────────────── */
.lm_dropTargetIndicator {
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
    outline: 2px dashed var(--accent, #c9a84c);
}
.lm_dropTargetIndicator .lm_inner {
    background: var(--accent, #c9a84c);
    opacity: 0.1;
}

/* ── Drag proxy ──────────────────────────────────────────────────── */
.lm_dragProxy .lm_content {
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
}

/* ── Selected stack header ───────────────────────────────────────── */
.lm_selected .lm_header {
    background-color: var(--bg-header, #3a3520);
}

/* ── Tab hover/active override ───────────────────────────────────── */
.lm_tab:hover,
.lm_tab.lm_active {
    background: var(--bg-card, #26241f);
    color: var(--text-primary, #d0ccc2);
}

/* ── Transition indicator ────────────────────────────────────────── */
.lm_transition_indicator {
    background-color: var(--bg-dark, #1c1b19);
    border: 1px dashed var(--border-subtle, #3e3a30);
}

/* ── Pop-in ──────────────────────────────────────────────────────── */
.lm_popin .lm_bg {
    background: var(--bg-dark, #1c1b19);
    opacity: 0.3;
}
.lm_popin .lm_icon {
    background-image: url('lib/img/lm_popin_white.png');
    border-left: 1px solid var(--text-secondary, #8a8477);
    border-top: 1px solid var(--text-secondary, #8a8477);
    opacity: 0.7;
}
.lm_popin:hover .lm_icon { opacity: 1; }

/* ── Side-docked header shadows ──────────────────────────────────── */
.lm_dragProxy.lm_bottom .lm_header .lm_tab,
.lm_stack.lm_bottom .lm_header .lm_tab {
    box-shadow: none;
}

/* ── Interaction editor specific ─────────────────────────────────── */
.interaction-editor__gl-host,
.we-editor__gl-host {
    position: relative;
    width: 100%;
    height: 100%;
}

.interaction-editor__panel,
.we-editor__panel {
    position: absolute;
    overflow: hidden;
    display: none; /* Shown by GL bridge when bound */
}

.interaction-editor__panel--scrollable,
.we-editor__panel--scrollable {
    overflow-y: auto;
    overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════════
   World Engine Editor — Unified Layout
   ═══════════════════════════════════════════════════════════════════ */

.we-editor {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    background: var(--bg-dark, #1c1b19);
    color: var(--text-primary, #d0ccc2);
    overflow: hidden;
}

/* ── Toolbar ─────────────────────────────────────────────────────── */
.we-editor__toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 40px;
    min-height: 40px;
    padding: 0 12px;
    background: var(--bg-header, #3a3520);
    border-bottom: 1px solid var(--border-subtle, #3e3a30);
    z-index: 10;
}

.we-editor__toolbar-brand {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent, #c9a84c);
    white-space: nowrap;
}

.we-editor__endpoint-selector {
    display: flex;
    align-items: center;
    gap: 6px;
}
.we-editor__endpoint-selector label {
    font-size: 0.8rem;
    color: var(--text-secondary, #8a8477);
    margin-bottom: 0;
    white-space: nowrap;
}
.we-editor__endpoint-selector select {
    width: 180px;
    background: var(--bg-input, #33302a);
    border: 1px solid var(--border-subtle, #3e3a30);
    color: var(--text-primary, #d0ccc2);
    font-size: 0.8rem;
}

.we-editor__breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary, #8a8477);
}
.we-editor__breadcrumb-sep {
    opacity: 0.5;
}

.we-editor__toolbar-spacer {
    flex: 1;
}

/* ── Body (activity bar + list + editor) ─────────────────────────── */
.we-editor__body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ── Activity bar ────────────────────────────────────────────────── */
.we-editor__activity-bar {
    display: flex;
    flex-direction: column;
    width: 48px;
    min-width: 48px;
    background: var(--bg-dark, #1c1b19);
    border-right: 1px solid var(--border-subtle, #3e3a30);
    padding-top: 4px;
    overflow-y: auto;
    overflow-x: hidden;
}

.we-editor__activity-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    color: var(--text-secondary, #8a8477);
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    transition: color 150ms ease, background 150ms ease;
}
.we-editor__activity-btn:hover {
    color: var(--text-primary, #d0ccc2);
    background: var(--bg-input, #33302a);
}
.we-editor__activity-btn--active {
    color: var(--accent, #c9a84c);
}
.we-editor__activity-btn--active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    bottom: 25%;
    width: 3px;
    background: var(--accent, #c9a84c);
    border-radius: 0 2px 2px 0;
}

/* ── List panel ──────────────────────────────────────────────────── */
.we-editor__list-panel {
    display: flex;
    flex-direction: column;
    width: 250px;
    min-width: 200px;
    max-width: 350px;
    background: var(--bg-card, #26241f);
    border-right: 1px solid var(--border-subtle, #3e3a30);
    overflow: hidden;
}

.we-editor__list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary, #d0ccc2);
    border-bottom: 1px solid var(--border-subtle, #3e3a30);
}
.we-editor__list-header .btn-link {
    color: var(--text-secondary, #8a8477);
    padding: 0;
    line-height: 1;
}

.we-editor__list-body {
    flex: 1;
    overflow-y: auto;
}

/* ── Editor area ─────────────────────────────────────────────────── */
.we-editor__editor-area {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* ── Tab bar ─────────────────────────────────────────────────────── */
.we-editor__tab-bar {
    display: flex;
    align-items: stretch;
    height: 32px;
    min-height: 32px;
    background: var(--bg-dark, #1c1b19);
    border-bottom: 1px solid var(--border-subtle, #3e3a30);
    overflow-x: auto;
    overflow-y: hidden;
}

.we-editor__tab {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    font-size: 0.8rem;
    color: var(--text-secondary, #8a8477);
    background: var(--bg-input, #33302a);
    border-right: 1px solid var(--border-subtle, #3e3a30);
    cursor: pointer;
    white-space: nowrap;
    transition: color 150ms ease, background 150ms ease;
}
.we-editor__tab:hover {
    color: var(--text-primary, #d0ccc2);
    background: var(--bg-card, #26241f);
}
.we-editor__tab--active {
    color: var(--text-primary, #d0ccc2);
    background: var(--bg-card, #26241f);
    border-bottom: 2px solid var(--accent, #c9a84c);
}
.we-editor__tab-title {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.we-editor__tab-dirty {
    color: var(--accent, #c9a84c);
    font-size: 0.6rem;
    margin-left: 2px;
}
.we-editor__tab-close {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary, #8a8477);
    padding: 0 2px;
    margin-left: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 150ms ease;
}
.we-editor__tab-close:hover {
    opacity: 1;
    color: var(--text-primary, #d0ccc2);
}

/* ── GL host ─────────────────────────────────────────────────────── */
.we-editor__gl-host {
    flex: 1;
    min-height: 0;
}

/* ── Welcome / empty state ───────────────────────────────────────── */
.we-editor__welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    opacity: 0.6;
}
.we-editor__welcome h2 {
    color: var(--accent, #c9a84c);
    margin-bottom: 0.5rem;
}

/* ── List panel search ───────────────────────────────────────────── */
.we-editor__list-search {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-subtle, #3e3a30);
}
.we-editor__list-search input {
    background: var(--bg-input, #33302a);
    border: 1px solid var(--border-subtle, #3e3a30);
    color: var(--text-primary, #d0ccc2);
    font-size: 0.8rem;
}
.we-editor__list-search input::placeholder {
    color: var(--text-secondary, #8a8477);
}
.we-editor__list-search input:focus {
    border-color: var(--accent, #c9a84c);
    box-shadow: 0 0 0 1px var(--accent, #c9a84c);
    outline: none;
}

/* ── List items ──────────────────────────────────────────────────── */
.we-editor__list-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 6px 10px;
    border: none;
    border-bottom: 1px solid var(--border-subtle, #3e3a30);
    background: transparent;
    color: var(--text-primary, #d0ccc2);
    text-align: left;
    cursor: pointer;
    transition: background 150ms ease;
}
.we-editor__list-item:hover {
    background: var(--bg-input, #33302a);
}
.we-editor__list-item-name {
    font-size: 0.82rem;
    line-height: 1.3;
}
.we-editor__list-item-key {
    font-size: 0.7rem;
    color: var(--text-secondary, #8a8477);
    opacity: 0.7;
}

.we-editor__list-load-more {
    display: block;
    width: 100%;
    padding: 8px;
    border: none;
    background: transparent;
    color: var(--accent, #c9a84c);
    font-size: 0.8rem;
    cursor: pointer;
    text-align: center;
    transition: background 150ms ease;
}
.we-editor__list-load-more:hover {
    background: var(--bg-input, #33302a);
}

/* ── Editor content area ─────────────────────────────────────────── */
.we-editor__content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    position: relative;
}

.we-editor__tab-loading,
.we-editor__tab-error {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text-secondary, #8a8477);
    font-size: 0.9rem;
}
.we-editor__tab-error {
    color: var(--text-primary, #d0ccc2);
}

.we-editor__entity-editor {
    padding: 16px 24px;
    max-width: 900px;
    height: 100%;
    overflow-y: auto;
}

/* ── Entity form (property grid) ─────────────────────────────────── */
.we-entity-form {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.we-entity-form__field {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    transition: background 100ms ease;
}
.we-entity-form__field:hover {
    background: var(--bg-input, #33302a);
}

.we-entity-form__field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary, #8a8477);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding-top: 2px;
    margin-bottom: 0;
}

.we-entity-form__field span {
    font-size: 0.85rem;
    color: var(--text-primary, #d0ccc2);
    word-break: break-word;
}

.we-entity-form__content-preview {
    font-size: 0.82rem;
    color: var(--text-primary, #d0ccc2);
    white-space: pre-wrap;
    line-height: 1.5;
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
    background: var(--bg-input, #33302a);
    border-radius: 4px;
    border: 1px solid var(--border-subtle, #3e3a30);
}

/* ═══════════════════════════════════════════════════════════════════
   Region Graph — Golden Layout Integration
   ═══════════════════════════════════════════════════════════════════ */

/* "Open Region Graph" button in list panel */
.we-editor__list-graph-btn {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-subtle, #3e3a30);
}

/* Full graph wrapper — fills the entire editor area */
.we-editor__region-graph-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
}

/* Loading overlay in graph area */
.we-editor__region-graph-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text-secondary, #a09882);
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgba(26, 24, 19, 0.8);
}

/* GL host container — fills remaining space */
.we-editor__region-gl-host {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* GL panel base (positioned by bridge) */
.we-editor__gl-panel {
    position: absolute;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ── Region Graph Panel (Cytoscape + toolbar) ──────────────────── */

.we-rg-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--bg-header, #1c1b19);
    border-bottom: 1px solid var(--border-subtle, #3e3a30);
    flex-shrink: 0;
    min-height: 34px;
    overflow-x: auto;
}

.we-rg-toolbar__group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.we-rg-toolbar__divider {
    width: 1px;
    height: 20px;
    background: var(--border-subtle, #3e3a30);
    flex-shrink: 0;
}

.we-rg-toolbar__legend {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    flex-shrink: 1;
    min-width: 0;
}

.we-rg-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    color: var(--text-secondary, #a09882);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.we-rg-legend-item:hover {
    color: var(--text-primary, #d0ccc2);
}

.we-rg-legend-swatch {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

.we-rg-info-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 3px 10px;
    font-size: 0.75rem;
    color: var(--text-secondary, #a09882);
    background: var(--bg-surface, #201e1a);
    border-bottom: 1px solid var(--border-subtle, #3e3a30);
    flex-shrink: 0;
}

/* Cytoscape container — must have explicit dimensions */
.we-rg-cytoscape {
    flex: 1;
    min-height: 0;
    width: 100%;
    background: #1a1a1a;
}

/* ── Region Properties Panel ──────────────────────────────────── */

.we-rg-props {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-card, #26241f);
    overflow: hidden;
}

.we-rg-props__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle, #3e3a30);
    background: var(--bg-header, #1c1b19);
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #d0ccc2);
}

.we-rg-props__body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
}

.we-rg-props__footer {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid var(--border-subtle, #3e3a30);
    flex-shrink: 0;
    justify-content: flex-end;
}

/* ═══════════════════════════════════════════════════════════════
   Interaction Editor (embedded in World Engine Editor)
   ═══════════════════════════════════════════════════════════════ */

.we-editor__interaction-editor-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Toolbar */
.we-ie-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: var(--bg-card, #1e1b16);
    border-bottom: 1px solid var(--border-subtle, #3e3a30);
    flex-shrink: 0;
    height: 42px;
    min-height: 42px;
}

.we-ie-toolbar__title {
    margin: 0;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.we-ie-toolbar__group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.we-ie-toolbar__divider {
    width: 1px;
    height: 20px;
    background: var(--border-subtle, #3e3a30);
    flex-shrink: 0;
}

/* Layout area — positioned wrapper for GL root + panels */
.we-ie-layout-area {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* GL host container — fills the layout area */
.we-ie-gl-host {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* Loading overlay */
.we-ie-loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text-secondary, #a09882);
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgba(26, 24, 19, 0.8);
}

/* Glyph node palette hover effect (shared with InteractionEditor) */
.glyph-node-entry:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ═══════════════════════════════════════════════════════════════
   Codex Editor — Full panel takeover (mirrors Interaction Editor)
   ═══════════════════════════════════════════════════════════════ */

.we-editor__codex-editor-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Toolbar */
.we-ce-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: var(--bg-card, #1e1b16);
    border-bottom: 1px solid var(--border-subtle, #3e3a30);
    flex-shrink: 0;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    overflow: hidden;
    width: 100%;
}

.we-ce-toolbar__title {
    margin: 0;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.we-ce-toolbar__divider {
    width: 1px;
    height: 20px;
    background: var(--border-subtle, #3e3a30);
    flex-shrink: 0;
}

/* Layout area — positioned wrapper for GL root + panels */
.we-ce-layout-area {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* GL host container — fills the layout area */
.we-ce-gl-host {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* Loading overlay */
.we-ce-loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text-secondary, #a09882);
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgba(26, 24, 19, 0.8);
}

/* ═══════════════════════════════════════════════════════════════════
   Deploy button & dialog
   ═══════════════════════════════════════════════════════════════════ */

.we-editor__toolbar-deploy-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border: 1px solid var(--accent, #c9a84c);
    border-radius: 4px;
    background: transparent;
    color: var(--accent, #c9a84c);
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
    white-space: nowrap;
}
.we-editor__toolbar-deploy-btn:hover:not(:disabled) {
    background: var(--accent, #c9a84c);
    color: var(--bg-dark, #1c1b19);
}
.we-editor__toolbar-deploy-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ── Deploy dialog modal ─────────────────────────────────────────── */

.deploy-dialog__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
}

.deploy-dialog {
    background: var(--bg-card, #26241f);
    border: 1px solid var(--border-subtle, #3e3a30);
    border-radius: 8px;
    width: 480px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.deploy-dialog__header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent, #c9a84c);
    background: var(--bg-header, #3a3520);
    border-bottom: 1px solid var(--border-subtle, #3e3a30);
}

.deploy-dialog__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.deploy-dialog__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.deploy-dialog__field > label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary, #8a8477);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}
.deploy-dialog__value {
    font-size: 0.85rem;
    color: var(--text-primary, #d0ccc2);
}
.deploy-dialog__entity-type {
    background: var(--bg-input, #33302a);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    color: var(--accent, #c9a84c);
    margin-right: 6px;
}
.deploy-dialog__entity-key {
    font-family: monospace;
    color: var(--text-primary, #d0ccc2);
}

.deploy-dialog__dep-list {
    margin: 0;
    padding: 0 0 0 18px;
    font-size: 0.82rem;
    color: var(--text-secondary, #8a8477);
}
.deploy-dialog__dep-list li {
    margin-bottom: 2px;
}

.deploy-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}

.deploy-dialog__inline-error {
    font-size: 0.82rem;
    color: #e06c5a;
    padding: 6px 10px;
    background: rgba(224, 108, 90, 0.1);
    border-radius: 4px;
}

/* ── Deploy results ──────────────────────────────────────────────── */

.deploy-dialog__results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.deploy-dialog__result-banner {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}
.deploy-dialog__result-banner--success {
    background: rgba(76, 175, 80, 0.15);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}
.deploy-dialog__result-banner--error {
    background: rgba(224, 108, 90, 0.15);
    color: #e06c5a;
    border: 1px solid rgba(224, 108, 90, 0.3);
}

.deploy-dialog__section {
    font-size: 0.82rem;
    color: var(--text-primary, #d0ccc2);
}
.deploy-dialog__section strong {
    color: var(--text-secondary, #8a8477);
}

.deploy-dialog__error-list {
    margin: 4px 0 0 18px;
    padding: 0;
    font-size: 0.78rem;
    color: #e06c5a;
}
.deploy-dialog__error-list li {
    margin-bottom: 2px;
}
