@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/roboto-400.ttf') format('truetype');
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/roboto-500.ttf') format('truetype');
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/roboto-700.ttf') format('truetype');
}

:root {
    --app-shell-header-height: 56px;
    --app-shell-nav-mini-width: 56px;
    --app-shell-nav-open-width: 280px;
    --nav-mini-width: var(--app-shell-nav-mini-width);
    --dialog-width: 320px;
}

* {
    font-family: 'Roboto', Helvetica, sans-serif;
}

button:focus {
    outline: 0 !important;
}

/* ========================================
   SPLITTERS & LAYOUT
   ======================================== */
.app-root,
.app-layout-host,
.app-shell {
    height: 100vh;
    min-height: 0;
}

.app-root {
    background: #f8fafc;
}

.app-layout-host {
    overflow: hidden;
}

.app-auth-checking {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #f8fafc;
}

.app-shell {
    display: flex;
    flex-direction: column;
    color: #0f172a;
}

.app-shell__topbar {
    flex: 0 0 var(--app-shell-header-height);
    height: var(--app-shell-header-height);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 0 10px;
    border-bottom: 1px solid #cbd5e1;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    z-index: 4;
}

.app-shell__brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.app-shell__spacer {
    flex: 1 1 auto;
    min-width: 8px;
}

.app-shell__icon-button.dxbl-btn {
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
}

.app-shell__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.app-shell-drawer {
    height: 100%;
    min-height: 0;
    width: 100%;
}

.app-shell-drawer > .dxbl-drawer-panel {
    border-right: 1px solid #cbd5e1;
    background: #ffffff;
}

.app-shell-drawer > .dxbl-drawer-panel > .dxbl-drawer-panel-body {
    padding: 0;
    overflow-x: hidden;
}

.app-shell__content {
    height: calc(100vh - var(--app-shell-header-height));
    min-height: 0;
    overflow: auto;
    background: #f8fafc;
}

.app-shell[data-shell-display-mode="compact"] .app-shell__content {
    height: calc(100vh - var(--app-shell-header-height));
}

.app-shell[data-shell-display-mode="compact"] .app-shell-drawer.app-shell-drawer--closed > .dxbl-drawer-panel {
    display: none;
}

@media (max-width: 575.98px) {
    html,
    body {
        overflow-x: hidden;
    }

    .app-shell__topbar {
        gap: 6px;
        padding: 0 10px;
    }

    .app-shell__brand svg {
        width: 86px;
    }

    .app-shell__content {
        overflow-x: hidden;
    }

    .app-shell-drawer > .dxbl-drawer-content {
        min-width: 0;
        overflow-x: hidden;
    }

    .diagnostic-recorder-chip .dxbl-btn {
        width: 30px;
        min-width: 30px;
        height: 30px;
        padding: 0;
    }

    .diagnostic-recorder-chip .dxbl-btn > span:not([class*="icon" i]),
    .diagnostic-recorder-chip .dxbl-btn .dxbl-btn-caption,
    .diagnostic-recorder-chip .dxbl-btn .dxbl-btn-text {
        display: none;
    }

    .app-shell-drawer.dxbl-drawer-overlap.app-shell-drawer--closed > .dxbl-drawer-panel {
        display: none;
    }

    .app-shell-drawer.dxbl-drawer-shrink.app-shell-drawer--mini > .dxbl-drawer-panel {
        display: none;
    }

    .app-shell-drawer.dxbl-drawer-shrink.app-shell-drawer--mini > .dxbl-drawer-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

}

.app-shell-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    padding: 8px 6px;
    overflow-x: hidden;
    overflow-y: auto;
}

.app-shell-nav__link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 0 10px 0 calc(10px + var(--app-shell-nav-indent, 0px));
    border-radius: 6px;
    color: #334155;
    font-size: 0.86rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.app-shell-nav__link:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.app-shell-nav__link.active {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

.app-shell-nav__icon {
    flex: 0 0 20px;
    width: 20px;
    text-align: center;
    color: #64748b;
    font-size: 0.88rem;
}

.app-shell-nav__link.active .app-shell-nav__icon {
    color: #1d4ed8;
}

.app-shell-nav__label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-shell-nav[data-nav-state="mini"] .app-shell-nav__label {
    width: 0;
    opacity: 0;
}

.app-shell-nav[data-nav-state="mini"] .app-shell-nav__link {
    justify-content: center;
    gap: 0;
    padding: 0;
}

.app-shell-nav__divider {
    height: 1px;
    margin: 8px 6px;
    background: #e2e8f0;
}

/* ===== Diagnostics recorder — VCR transport =====
   One control that morphs by state: idle record button, then a transport bar
   for recording / paused / report-ready / resumable. Honors reduced-motion. */
.rec-idle {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rec-idle__dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #94a3b8;
    transition: transform 0.15s ease, background 0.15s ease;
}

.rec-idle:hover {
    border-color: rgba(220, 38, 38, 0.45);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.rec-idle:hover .rec-idle__dot {
    transform: scale(1.12);
    background: #dc2626;
}

.rec-idle:focus-visible {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.rec-transport {
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 0 4px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #ffffff;
}

.rec-transport--live {
    background: rgba(220, 38, 38, 0.07);
    border-color: rgba(220, 38, 38, 0.28);
}

.rec-transport--paused {
    background: rgba(245, 158, 11, 0.13);
    border-color: rgba(245, 158, 11, 0.4);
}

.rec-transport--done {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.4);
}

.rec-transport--resume {
    background: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.32);
}

.rec-transport--crash {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.4);
}

.rec-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 24px;
    padding: 0 8px 0 7px;
}

.rec-status__dot {
    position: relative;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #dc2626;
    flex: none;
}

.rec-status--live .rec-status__dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: rec-pulse 1.7s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

.rec-status--paused .rec-status__dot {
    background: #94a3b8;
}

.rec-status__label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.rec-status--live .rec-status__label {
    color: #dc2626;
}

.rec-status--paused .rec-status__label {
    color: #b45309;
}

.rec-status--done .rec-status__label {
    color: #15803d;
}

.rec-status--resume .rec-status__label {
    color: #1d4ed8;
}

.rec-status--crash .rec-status__label {
    color: #b91c1c;
}

.rec-status__time {
    font-family: 'Roboto Mono', 'Consolas', monospace;
    font-weight: 600;
    font-size: 0.82rem;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.rec-status__icon {
    font-size: 0.8rem;
}

.rec-status--done .rec-status__icon {
    color: #15803d;
}

.rec-status--resume .rec-status__icon {
    color: #1d4ed8;
}

.rec-status--crash .rec-status__icon {
    color: #b91c1c;
}

.rec-divider {
    width: 1px;
    height: 18px;
    margin: 0 3px;
    background: #cbd5e1;
    flex: none;
}

.rec-transport--live .rec-divider {
    background: rgba(220, 38, 38, 0.28);
}

.rec-btn {
    width: 26px;
    height: 26px;
    flex: none;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #475569;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.rec-btn:hover {
    background: rgba(15, 23, 42, 0.07);
    color: #0f172a;
}

.rec-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

.rec-btn--primary {
    color: #2563eb;
}

.rec-btn--primary:hover {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.rec-btn--stop:hover,
.rec-btn--danger:hover {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}

.rec-btn__dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #94a3b8;
    transition: background 0.12s ease;
}

.rec-btn--new:hover .rec-btn__dot {
    background: #dc2626;
}

@keyframes rec-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5);
    }

    70% {
        box-shadow: 0 0 0 7px rgba(220, 38, 38, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .rec-status--live .rec-status__dot::after {
        animation: none;
    }
}

.about-dialog {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px;
    color: #334155;
}

.about-dialog__title {
    margin: 6px 0 0;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
}

.about-dialog__version,
.about-dialog__copyright {
    color: #475569;
    font-size: 0.88rem;
}

.about-dialog__rights {
    color: #64748b;
    font-size: 0.78rem;
}

.about-dialog__divider {
    width: 100%;
    height: 1px;
    margin: 6px 0;
    background: #e2e8f0;
}

.changelog-container {
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
}

.app-error-boundary {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: #f8fafc;
}

.app-error-boundary__panel {
    width: min(640px, 100%);
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.app-error-boundary__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.app-error-boundary__header h1 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.app-error-boundary__icon {
    font-size: 1rem;
}

.app-error-boundary__body {
    display: grid;
    gap: 12px;
    padding: 16px;
    color: #334155;
    font-size: 0.9rem;
    line-height: 1.45;
}

.app-error-boundary__body p {
    margin: 0;
}

.app-error-boundary__message {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #0f172a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
}

.app-error-boundary__info,
.app-error-boundary__ready {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.84rem;
}

.app-error-boundary__info {
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: rgba(37, 99, 235, 0.08);
    color: #1e3a8a;
}

.app-error-boundary__ready {
    border: 1px solid rgba(22, 101, 52, 0.2);
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
}

.app-error-boundary__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.not-found-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: #f8fafc;
}

.not-found-shell__content {
    display: grid;
    justify-items: center;
    gap: 18px;
    width: min(560px, 100%);
    text-align: center;
}

.not-found-shell__mark {
    width: min(420px, 80vw);
    height: auto;
}

.not-found-shell h1 {
    margin: 0;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 600;
}

.not-found-shell__home {
    min-width: 120px;
}

.compact-splitter .dxbl-splitter-pane-content {
    padding: 4px !important;
}

.compact-splitter .dxbl-splitter-separator {
    flex-basis: 6px !important;
}

/* ========================================
   NAVIGATION TREE
   ======================================== */
.navigation-tree {
    height: 100% !important;
}

.navigation-tree .dxbl-treeview-item {
    padding: 0 !important;
    border-radius: 0;
    margin: 0;
    min-height: unset !important;
    background-color: transparent !important;
    transition: background-color 0.15s ease;
}

.navigation-tree .dxbl-treeview-item-content {
    padding: 1px 4px !important;
    min-height: 20px !important;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    text-align: left;
    background-color: transparent !important;
}

.navigation-tree .dxbl-treeview-node {
    padding: 0 !important;
    margin: 0 !important;
    background-color: transparent !important;
}

.navigation-tree .workplace-vnext-nav-node {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    width: 100%;
    min-height: 24px;
    box-sizing: border-box;
    text-align: left;
}

.navigation-tree .workplace-vnext-nav-select {
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    flex: 1 1 auto;
    width: 100%;
    min-height: 20px;
    line-height: 1.2;
    padding: 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.navigation-tree .dxbl-treeview-item:hover {
    background-color: transparent !important;
}

.navigation-tree .dxbl-treeview-item-selected {
    background-color: transparent !important;
}

.navigation-tree .nav-node-version {
    font-size: 0.75rem;
    line-height: 1;
    align-self: center;
}

.navigation-tree .mud-chip {
    margin: 0 !important;
}

.workplace-vnext-nav-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    margin-left: auto;
}

.workplace-vnext-version-flyout {
    pointer-events: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.workplace-vnext-version-flyout .dxbl-flyout-body {
    padding: 0 !important;
}

/* ========================================
   TABLES
   ======================================== */
.value-streams-table .mud-table-container {
    overflow-y: auto !important;
}

.value-streams-table .mud-table-row:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

.value-streams-table .mud-table-row.mud-selected {
    background-color: rgba(var(--mud-palette-primary-rgb), 0.08) !important;
}

.value-streams-table.mud-table-striped tbody tr:nth-of-type(odd) {
    background-color: transparent;
}

.value-streams-table > div:first-child > table > thead > tr > th:first-child {
    width: 32px;
}

/* ========================================
   VALUE STREAMS GRID (DxGrid)
   ======================================== */
.value-streams-grid {
    height: 100%;
}

.value-streams-grid .dxbl-grid-table {
    font-size: 0.875rem;
}

/* Striped rows - apply to cells */
.value-streams-grid .dxbl-grid-table tbody tr:nth-of-type(odd) td {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Hover effect - apply to cells */
.value-streams-grid .dxbl-grid-table tbody tr:hover td {
    background-color: rgba(0, 0, 0, 0.04);
}

/* Dense padding for cells */
.value-streams-grid .dxbl-grid-table td,
.value-streams-grid .dxbl-grid-table th {
    padding: 2px 6px;
}

/* Edit cell padding */
.value-streams-grid .dxbl-grid-edit-cell {
    padding: 2px 4px;
}

/* Header styling */
.value-streams-grid .dxbl-grid-table th {
    font-weight: 500;
    background-color: #f8fafc;
}

/* ========================================
   WORKPLACE GRID (DxGrid)
   ======================================== */
.workplace-grid {
    height: 100%;
}

.workplace-grid .dxbl-grid-table {
    font-size: 0.875rem;
}

/* Hover effect */
.workplace-grid .dxbl-grid-table tbody tr:hover td {
    background-color: rgba(0, 0, 0, 0.04);
}

/* Dense padding for cells - let DxGrid calculate row height for virtual scrolling */
.workplace-grid .dxbl-grid-table td,
.workplace-grid .dxbl-grid-table th {
    padding: 2px 6px;
}

/* Header styling */
.workplace-grid .dxbl-grid-table th {
    font-weight: 500;
    background-color: #f8fafc;
}

.workplace-grid .workplace-vnext-table-range-selected {
    background-color: rgba(25, 118, 210, 0.18);
    box-shadow: inset 0 0 0 1px rgba(25, 118, 210, 0.55);
}

.workbench-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    background: #ffffff;
}

.pane-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 8px 10px;
    border-bottom: 1px solid #cbd5e1;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

/* Table layout utilities (from content.css) */
.tbl {
    display: table;
    width: 100%;
}

.tbl-row {
    display: table-row;
}

.tbl-col {
    display: table-cell;
    vertical-align: middle;
}

/* ========================================
   FORM INPUTS
   ======================================== */
.formula-input .mud-input-slot {
    padding: 0 !important;
    min-height: unset !important;
    font-size: 0.875rem !important;
}

.formula-input .mud-input-control {
    margin: 0 !important;
}

.formula-input .mud-input {
    margin: 0 !important;
}

.formula-input .mud-input-root {
    padding: 0 !important;
}

.formula-input input {
    padding: 4px 0 !important;
}

.alias-input {
    max-width: 100px;
}

.alias-input .mud-input-slot {
    padding: 2px 6px !important;
    font-size: 0.8rem !important;
}

.alias-input .mud-input-control {
    margin-top: 0 !important;
}

/* ========================================
   UTILITIES
   ======================================== */
.configuration-route-entry-surface {
    scroll-margin-top: calc(var(--app-shell-header-height) + 16px);
}

.item-container {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.divider {
    margin: 12px 8px;
    border-color: rgba(0, 0, 0, 0.33);
}

.workplace-content-mode-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 96px;
    min-height: 28px;
    padding: 2px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #64748b;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    flex: 0 0 auto;
}

.workplace-content-mode-switch__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    color: #64748b;
    white-space: nowrap;
}

.workplace-content-mode-switch__label--active {
    color: #0f172a;
}

.workplace-content-mode-switch__input {
    flex: 0 0 38px;
    min-width: 38px;
}

.workplace-chart-interpolation-switch {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    color: #64748b;
    white-space: nowrap;
}

.workplace-chart-interpolation-switch__label {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    color: #64748b;
}

.workplace-chart-interpolation-switch__label--active {
    color: #0f172a;
}

.workplace-chart-interpolation-switch__input {
    flex: 0 0 38px;
    min-width: 38px;
}

/* ========================================
   OVERLAY DIALOG (for DevExpress compatibility)
   ======================================== */
.overlay-dialog {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    border-radius: 4px;
}

.overlay-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.overlay-dialog-content {
    flex: 1;
    overflow: auto;
    padding: 24px;
}

.overlay-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 24px 16px;
}

/* ========================================
   ADMIN EDITOR (AU03 structured config editors)
   ======================================== */

/* --- Layout --- */
.admin-editor-list-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bs-tertiary-bg);
}

.admin-editor-detail-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bs-body-bg);
}

.admin-editor-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid var(--bs-border-color);
    gap: 8px;
}

.admin-editor-panel-body {
    flex: 1;
    overflow: auto;
    padding: 12px;
}

.admin-editor-panel-body--detail {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.admin-editor-detail-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-editor-band {
    flex: 0 0 auto;
}

.admin-editor-band--surface,
.admin-editor-section--surface {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg);
    background: var(--bs-tertiary-bg);
    padding: 12px;
}

.admin-editor-main-region {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-editor-master-detail {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 12px;
    min-height: 280px;
}

.admin-editor-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-editor-section--grow {
    flex: 1;
    min-height: 220px;
}

.admin-editor-scroll-region {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
}

/* --- Text --- */
.admin-editor-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bs-emphasis-color);
}

.admin-editor-subtitle {
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
}

.admin-editor-row-primary {
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.admin-editor-row-secondary {
    font-size: 0.8rem;
    color: var(--bs-tertiary-color);
}

/* --- Status pills --- */
.admin-editor-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-editor-pill {
    padding: 6px 12px;
    border-radius: var(--bs-border-radius-pill);
    font-size: 0.85rem;
}

.admin-editor-pill--sm {
    padding: 3px 8px;
    font-size: 0.75rem;
}

.admin-editor-pill--primary {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
}

.admin-editor-pill--success {
    background: var(--bs-success-bg-subtle);
    color: var(--bs-success-text-emphasis);
}

.admin-editor-pill--info {
    background: var(--bs-info-bg-subtle);
    color: var(--bs-info-text-emphasis);
}

.admin-editor-pill--warning {
    background: var(--bs-warning-bg-subtle);
    color: var(--bs-warning-text-emphasis);
}

.admin-editor-pill--danger {
    background: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
}

.admin-editor-pill--secondary {
    background: var(--bs-secondary-bg-subtle);
    color: var(--bs-secondary-text-emphasis);
}

/* --- Feedback states --- */
.admin-editor-loading {
    padding: 24px;
    border-radius: var(--bs-border-radius-lg);
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
}

.admin-editor-error {
    padding: 24px;
    border-radius: var(--bs-border-radius-lg);
    background: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
}

.admin-editor-validation {
    padding: 16px;
    border-radius: var(--bs-border-radius-lg);
    background: var(--bs-warning-bg-subtle);
    color: var(--bs-warning-text-emphasis);
    margin: 0;
}

.admin-editor-validation ul {
    margin: 0;
    padding-left: 18px;
}

.admin-editor-validation-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.admin-editor-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    border-radius: var(--bs-border-radius-lg);
    background: var(--bs-tertiary-bg);
    color: var(--bs-tertiary-color);
}

.admin-editor-empty--fill {
    flex: 1;
    min-height: 0;
}

.admin-editor-empty--compact {
    min-height: 140px;
}

/* --- Selectable row cards (field schema, default TS set) --- */
.admin-editor-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-editor-form-layout {
    width: 100%;
}

.admin-editor-selectable-row {
    text-align: left;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
    border-radius: var(--bs-border-radius-lg);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    width: 100%;
}

.admin-editor-selectable-row--selected {
    border-color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
}

.admin-editor-selectable-row-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.admin-editor-selectable-row-title {
    font-weight: 700;
    color: var(--bs-emphasis-color);
}

.admin-editor-selectable-row-meta {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
}

.admin-editor-selectable-row-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}

.admin-editor-selectable-row-pills--left {
    justify-content: flex-start;
}

.admin-editor-selectable-row-footer {
    font-size: 0.82rem;
    color: var(--bs-secondary-color);
}

/* --- Actions bar --- */
.admin-editor-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* --- Follow-up queue (collapsible, grouped) --- */
.admin-editor-follow-up-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.admin-editor-follow-up-chevron {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
    transition: transform 0.2s ease;
    display: inline-block;
}

.admin-editor-follow-up-chevron--open {
    transform: rotate(90deg);
}

.admin-editor-follow-up-list {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    padding-right: 4px;
}

.admin-editor-follow-up-group {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-body-bg);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-editor-follow-up-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.admin-editor-follow-up-item {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    align-items: baseline;
    padding: 2px 0;
    border-top: 1px solid var(--bs-border-color-translucent);
    font-size: 0.82rem;
}

.admin-editor-follow-up-item:first-child {
    border-top: none;
}

.admin-editor-follow-up-item-message {
    color: var(--bs-body-color);
}

@media (max-width: 991.98px) {
    .admin-editor-panel-header {
        flex-direction: column;
        align-items: stretch;
    }
}

.metadata-workbench {
    height: calc(100vh - var(--app-shell-header-height));
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: #f8fafc;
}

.metadata-workbench,
.metadata-workbench * {
    scrollbar-color: #94a3b8 #f1f5f9;
    scrollbar-width: thin;
}

.metadata-workbench *::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.metadata-workbench *::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.metadata-workbench *::-webkit-scrollbar-thumb {
    border: 2px solid #f1f5f9;
    border-radius: 999px;
    background: #94a3b8;
}

.metadata-workbench__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    min-height: 48px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.metadata-workbench__header h1 {
    margin: 0;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.2;
}

.metadata-workbench__header p {
    margin: 2px 0 0;
    color: #64748b;
    font-size: 0.78rem;
}

.metadata-workbench__error {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--bs-danger-border-subtle);
    background: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
    padding: 8px 10px 8px 12px;
    margin-bottom: 12px;
    border-radius: 6px;
}

.metadata-workbench__error--sticky {
    position: sticky;
    top: 0;
    z-index: 4;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.metadata-workbench__error--warning {
    border-color: var(--bs-warning-border-subtle);
    background: var(--bs-warning-bg-subtle);
    color: var(--bs-warning-text-emphasis);
}

.metadata-workbench__error-dismiss.dxbl-btn {
    flex: 0 0 auto;
}

.metadata-workbench__error-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.metadata-workbench__error-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.metadata-workbench__error-copy strong {
    font-size: 0.84rem;
    line-height: 1.2;
}

.metadata-workbench__error-copy span {
    font-size: 0.82rem;
    line-height: 1.25;
}

.metadata-workbench__layout {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(520px, 42vw);
    gap: 12px;
    min-height: 0;
    flex: 1 1 auto;
}

.metadata-workbench__splitter {
    min-height: 0;
    flex: 1 1 auto;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

.metadata-workbench__splitter .dxbl-splitter-separator {
    background: #f8fafc;
}

.metadata-workbench__splitter .dxbl-splitter-resize-handle-image {
    width: 2px;
    min-width: 2px;
    height: 32px;
    border-radius: 999px;
    background-color: #94a3b8 !important;
    background-image: none !important;
}

.metadata-workbench__startup {
    flex: 1 1 auto;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.metadata-workbench__splitter--workspace {
    border: 0;
    border-radius: 0;
    background: transparent;
}

.metadata-workbench__splitter-pane--workspace {
    padding: 6px;
    background: #f8fafc;
}

.metadata-workbench__workspace {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
}

.metadata-workbench__switching-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(248, 250, 252, 0.72);
    backdrop-filter: blur(1px);
    color: #64748b;
    pointer-events: all;
}

.metadata-workbench__switching-copy {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 24px;
    text-align: center;
}

.metadata-workbench__switching-copy strong {
    color: var(--bs-body-color);
    font-size: 1rem;
}

.metadata-workbench__splitter-pane {
    display: flex;
    min-height: 0;
    padding: 6px;
    background: #f8fafc;
}

.metadata-workbench__splitter-pane--detail {
    background: #ffffff;
}

.metadata-workbench__splitter--workspace .metadata-workbench__splitter-pane {
    padding: 0;
    background: transparent;
}

.metadata-workbench__splitter--workspace .dxbl-splitter-pane-content {
    padding: 0 4px !important;
}

.metadata-workbench__families,
.metadata-workbench__list,
.metadata-workbench__drawer,
.metadata-workbench__actions {
    display: flex;
    flex-direction: column;
}

.metadata-workbench__families {
    min-height: 0;
}

.metadata-workbench__family,
.metadata-workbench__row {
    border: 1px solid transparent;
    background: transparent;
    color: var(--bs-body-color);
    border-radius: 4px;
    text-align: left;
    padding: 8px 10px;
}

.metadata-workbench__family {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    gap: 8px;
    min-height: 44px;
    cursor: pointer;
}

.metadata-workbench__family--selected {
    background: #eff6ff;
    border-color: #bfdbfe;
    box-shadow: inset 3px 0 0 var(--bs-primary);
}

.metadata-workbench__family span {
    display: grid;
    min-width: 0;
}

.metadata-workbench__family small,
.metadata-workbench__family em {
    color: var(--bs-secondary-color);
    font-size: 0.72rem;
    font-style: normal;
}

.metadata-workbench__center {
    min-width: 0;
    min-height: 0;
    width: 100%;
}

.metadata-workbench__grid-toolbar,
.metadata-workbench__section-toolbar {
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    flex: 0 0 auto;
}

.metadata-workbench__section-toolbar--collapsible {
    justify-content: flex-start;
    padding: 6px 8px;
}

.metadata-workbench__section-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
    border: 0;
    border-radius: 5px;
    padding: 2px 4px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.metadata-workbench__section-toggle:hover {
    background: rgba(37, 99, 235, 0.06);
}

.metadata-workbench__section-toggle:hover .metadata-workbench__section-chevron,
.metadata-workbench__section-toggle:focus-visible .metadata-workbench__section-chevron {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.metadata-workbench__section-toggle:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.45);
    outline-offset: 2px;
    border-radius: 6px;
}

.metadata-workbench__section-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    min-width: 20px;
    height: 20px;
    border: 1px solid transparent;
    border-radius: 5px;
    color: #64748b;
    font-size: 0.68rem;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.metadata-workbench__section-title {
    display: grid;
    gap: 2px;
    min-width: 0;
    justify-items: start;
    text-align: left;
}

.metadata-workbench__section-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.metadata-workbench__grid-toolbar {
    min-height: 42px;
}

.metadata-workbench__center .metadata-workbench__grid-toolbar {
    align-content: flex-start;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 4px 8px;
    min-height: 72px;
    padding: 6px 10px;
}

.metadata-workbench__grid-toolbar-title,
.metadata-workbench__section-toolbar > div:not(.metadata-workbench__section-actions) {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 0 0 auto;
}

.metadata-workbench__center .metadata-workbench__grid-toolbar-title {
    flex: 1 1 100%;
}

.metadata-workbench__grid-toolbar-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 260px;
    flex: 1 1 340px;
}

.metadata-workbench__center .metadata-workbench__grid-toolbar-controls {
    flex: 1 1 100%;
    min-width: 0;
}

.metadata-workbench__center .metadata-workbench__search {
    min-width: 0;
}

.metadata-workbench__pane-label {
    color: #1d4ed8;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.metadata-workbench__section-count {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
}

.metadata-workbench__uri-builder .metadata-workbench__section-count {
    display: block;
    max-width: min(100%, 56ch);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
}

.metadata-workbench__search {
    width: 100%;
    flex: 1 1 260px;
    min-width: 180px;
}

.metadata-workbench__icon-button.dxbl-btn {
    min-width: 30px;
    width: 30px;
    height: 30px;
    padding: 0;
}

.metadata-workbench__family-nav-grid,
.metadata-workbench__section-grid,
.metadata-workbench__family-nav-grid .dxbl-grid,
.metadata-workbench__section-grid .dxbl-grid {
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
}

.metadata-workbench__family-nav-grid {
    border: 0;
}

.metadata-workbench__family-nav-grid thead {
    display: none;
}

.metadata-workbench__family-nav-grid .dxbl-grid-focused-row td,
.metadata-workbench__family-nav-grid .dxbl-grid-selected-row td {
    background: transparent;
}

.metadata-workbench__grid-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    color: #0f172a;
}

.metadata-workbench__status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.metadata-workbench__status--active {
    background: rgba(34, 197, 94, 0.14);
    color: #166534;
}

.metadata-workbench__status--draft,
.metadata-workbench__status--dirty,
.metadata-workbench__status--pending {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
}

.metadata-workbench__status--retired {
    background: #f1f5f9;
    color: #64748b;
}

.metadata-workbench__status--system {
    gap: 4px;
    background: #eef2ff;
    color: #3730a3;
}

.metadata-workbench__item-list {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    overflow: auto;
    padding: 0;
}

.metadata-workbench__item-list-entry {
    appearance: none;
    display: grid;
    align-content: center;
    justify-items: stretch;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    width: 100%;
    min-height: 50px;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    padding: 7px 10px;
    background: #ffffff;
    color: var(--bs-body-color);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.metadata-workbench__item-list-entry:hover,
.metadata-workbench__item-list-entry:focus-visible {
    background: #eff6ff;
    outline: none;
}

.metadata-workbench__item-list-entry--selected {
    background: #dbeafe;
    box-shadow: inset 3px 0 0 var(--bs-primary);
}

.metadata-workbench__item-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    justify-self: stretch;
    min-width: 0;
    width: 100%;
}

.metadata-workbench__item-list-row .metadata-workbench__status {
    flex: 0 0 auto;
}

.metadata-workbench__item-list-name {
    min-width: 0;
    overflow: hidden;
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metadata-workbench__item-list-detail {
    display: block;
    justify-self: stretch;
    width: 100%;
    overflow: hidden;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metadata-workbench__drawer {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.metadata-workbench__drawer h2 {
    margin: 0;
    font-size: 1.1rem;
}

.metadata-workbench__drawer p {
    margin: 4px 0 0;
    color: var(--bs-secondary-color);
    line-height: 1.25;
}

.metadata-workbench__drawer-header {
    box-sizing: border-box;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 72px;
    gap: 12px;
    height: 72px;
    min-height: 72px;
    max-height: 72px;
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 2;
}

.metadata-workbench__drawer-header-tools {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.metadata-workbench__header-icon-button {
    display: inline-flex;
}

.metadata-workbench__header-tooltip {
    font-size: 0.82rem;
    line-height: 1.35;
}

.metadata-workbench__drawer-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.metadata-workbench__drawer-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 8px 12px 16px;
    gap: 8px;
}

.metadata-workbench__lifecycle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 5px 0 7px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.metadata-workbench__lifecycle-primary,
.metadata-workbench__lifecycle-facts {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
}

.metadata-workbench__lifecycle-primary strong,
.metadata-workbench__lifecycle-facts span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metadata-workbench__lifecycle-facts {
    flex-wrap: wrap;
    justify-content: flex-end;
    color: var(--workplace-text-muted);
    font-size: 0.82rem;
}

.metadata-workbench__detail-tabs {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.metadata-workbench__detail-tabs > .dxbl-tabs-tablist {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    flex: 0 0 36px;
    min-height: 36px;
    margin: 0;
    padding: 0;
}

.metadata-workbench__detail-tabs > .dxbl-tabs-tablist .dxbl-scroll-viewer-content,
.metadata-workbench__detail-tabs [role="tablist"] {
    display: flex;
    align-items: stretch;
    height: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0;
}

.metadata-workbench__detail-tabs .dxbl-tabs-item,
.metadata-workbench__detail-tabs [role="tab"] {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    height: 36px;
    min-height: 36px;
    margin-top: 0;
    margin-bottom: 0;
    padding-block: 0;
}

.metadata-workbench__detail-tabs > .dxbl-tabs-content-panel {
    position: absolute;
    top: 36px;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    padding: 0;
}

.metadata-workbench__detail-tabs .dxbl-tabs-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    padding: 0;
}

.metadata-workbench__definition-tab,
.metadata-workbench__tab-surface {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.metadata-workbench__definition-tab {
    overflow: auto;
}

.metadata-workbench__tab-surface {
    gap: 10px;
}

.metadata-workbench__tab-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex: 0 0 auto;
    padding: 8px 10px 0;
}

.metadata-workbench__tab-toolbar-title {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
}

.metadata-workbench__version-grid,
.metadata-workbench__usage-grid,
.metadata-workbench__version-grid .dxbl-grid,
.metadata-workbench__usage-grid .dxbl-grid {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.metadata-publish-dialog {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: min(680px, 78vh);
    min-height: 0;
}

.metadata-publish-dialog__section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid var(--workplace-border);
    border-radius: 6px;
    padding: 12px;
    background: var(--workplace-surface);
}

.metadata-publish-dialog__section p {
    margin: 0;
    color: var(--workplace-text-muted);
}

.metadata-publish-dialog__validation-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 18px;
    color: var(--bs-danger-text-emphasis);
}

.metadata-publish-dialog__stale {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--bs-warning-border-subtle);
    border-radius: 6px;
    background: var(--bs-warning-bg-subtle);
    color: var(--workplace-text);
}

.metadata-publish-dialog__stale span {
    color: var(--workplace-text-muted);
}

.metadata-publish-dialog__error {
    padding: 10px 12px;
    border: 1px solid var(--bs-danger-border-subtle);
    border-radius: 6px;
    background: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
}

.metadata-publish-dialog__section--grid {
    min-height: 280px;
}

.metadata-publish-dialog__grid,
.metadata-publish-dialog__grid .dxbl-grid {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.metadata-publish-dialog__status-pill {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 22px;
    padding: 2px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.metadata-publish-dialog__status-pill--danger {
    border-color: var(--bs-danger-border-subtle);
    background: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
}

.metadata-publish-dialog__status-pill--caution {
    border-color: var(--bs-warning-border-subtle);
    background: var(--bs-warning-bg-subtle);
    color: var(--bs-warning-text-emphasis);
}

.metadata-publish-dialog__status-pill--info {
    border-color: var(--bs-info-border-subtle);
    background: var(--bs-info-bg-subtle);
    color: var(--bs-info-text-emphasis);
}

.metadata-publish-dialog__status-pill--neutral {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #475569;
}

.metadata-workbench__empty-detail {
    display: grid;
    gap: 8px;
    padding: 18px;
}

.metadata-workbench__grid-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 10px 12px;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 500;
}

.metadata-workbench__actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

.metadata-workbench__lifecycle-actions {
    gap: 6px;
}

.metadata-workbench__workflow-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.82rem;
    font-weight: 600;
}

.metadata-workbench__input {
    width: 100%;
    min-height: 32px;
    border: 1px solid var(--bs-border-color);
    border-radius: 4px;
    padding: 5px 8px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
}

.metadata-workbench__editor-section {
    width: 100%;
    max-width: 100%;
    margin-bottom: 10px;
    min-height: 0;
}

.metadata-workbench__editor-section.workbench-panel {
    height: auto;
    flex: 0 0 auto;
    overflow: visible;
}

.metadata-workbench__collapsible-section[data-collapsed="true"] {
    min-height: 0;
}

.metadata-workbench__collapsible-body {
    min-height: 0;
}

.metadata-workbench__editor-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.metadata-workbench__uri-builder-body {
    display: grid;
    gap: 5px;
    padding: 6px 8px 8px;
}

.metadata-workbench__uri-segment-rail,
.metadata-workbench__uri-pool {
    display: flex;
    align-items: stretch;
    gap: 6px;
    min-width: 0;
}

.metadata-workbench__uri-segment-rail {
    flex-wrap: wrap;
}

.metadata-workbench__uri-segment {
    display: grid;
    grid-template-columns: auto minmax(112px, 1fr);
    align-items: center;
    min-height: 32px;
    min-width: 168px;
    max-width: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 6px;
    background: #ffffff;
    overflow: hidden;
}

.metadata-workbench__uri-segment--empty {
    min-width: 156px;
}

.metadata-workbench__uri-dragging {
    opacity: 0.56;
}

.metadata-workbench__uri-drop-target {
    outline: 2px solid rgba(37, 99, 235, 0.42);
    outline-offset: 1px;
}

.metadata-workbench__uri-segment-header {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    align-self: stretch;
    padding: 3px 4px;
    border-right: 1px solid #e2e8f0;
    background: #f8fafc;
}

.metadata-workbench__uri-segment-handle,
.metadata-workbench__uri-chip-grip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    touch-action: none;
}

.metadata-workbench__uri-segment-handle {
    width: 18px;
    height: 24px;
    cursor: grab;
}

.metadata-workbench__uri-segment-handle:not([data-uri-drag-kind]),
.metadata-workbench__uri-chip-grip:not([data-uri-drag-kind]) {
    cursor: default;
    opacity: 0.45;
}

.metadata-workbench__uri-segment-index {
    min-width: 18px;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
}

.metadata-workbench__uri-chip-list {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 30px;
    min-width: 0;
    padding: 3px 5px;
}

.metadata-workbench__uri-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    min-height: 24px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 1px 3px 1px 6px;
    background: #f8fbff;
    color: #0f172a;
    font-size: 0.78rem;
    line-height: 1.2;
    cursor: grab;
}

.metadata-workbench__uri-chip--available {
    background: #ffffff;
}

.metadata-workbench__uri-chip-name {
    min-width: 0;
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.metadata-workbench__uri-policy-target {
    display: inline-flex;
    align-items: center;
}

.metadata-workbench__uri-policy-button.dxbl-btn {
    min-width: 22px;
    width: 22px;
    min-height: 22px;
    height: 22px;
    padding: 0;
}

.metadata-workbench__uri-policy-button .dxbl-image {
    width: 12px;
    height: 12px;
    font-size: 0.72rem;
}

.metadata-workbench__uri-policy-button--Error .dxbl-image {
    color: #92400e;
}

.metadata-workbench__uri-policy-button--Omit .dxbl-image {
    color: #475569;
}

.metadata-workbench__uri-policy-button--RenderEmpty .dxbl-image {
    color: #2563eb;
}

.metadata-workbench__uri-policy-flyout {
    color: #334155;
    font-size: 0.78rem;
    line-height: 1.35;
}

.metadata-workbench__uri-policy-flyout-body {
    display: grid;
    gap: 7px;
    min-width: 210px;
}

.metadata-workbench__uri-policy-flyout-title {
    color: #0f172a;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.metadata-workbench__uri-policy-current {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #0f172a;
    font-weight: 600;
}

.metadata-workbench__uri-policy-cycle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #64748b;
}

.metadata-workbench__uri-policy-step {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 1px 6px;
    background: #ffffff;
}

.metadata-workbench__uri-policy-step--active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
}

.metadata-workbench__uri-policy-note {
    color: #64748b;
    font-size: 0.72rem;
}

.metadata-workbench__uri-chip > .dxbl-btn {
    min-width: 22px;
    width: 22px;
    min-height: 22px;
    height: 22px;
    padding: 0;
}

.metadata-workbench__uri-separator {
    color: #94a3b8;
    font-size: 0.76rem;
    font-weight: 700;
}

.metadata-workbench__uri-empty {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 500;
}

.metadata-workbench__uri-pool {
    flex-wrap: wrap;
    align-items: center;
    min-height: 30px;
    padding: 4px 5px;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
}

.metadata-workbench__uri-pool-label {
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.metadata-workbench__row-command {
    min-height: 30px;
    border: 1px solid var(--bs-border-color);
    border-radius: 4px;
    padding: 4px 10px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
}

.metadata-workbench__form-frame {
    padding: 8px 12px 10px;
}

.metadata-workbench__form-frame--compact {
    padding: 6px 12px 8px;
}

.metadata-workbench__form {
    margin: 0;
    padding: 0;
}

.metadata-workbench__form--compact .metadata-workbench__form-item {
    margin-bottom: 2px;
}

.metadata-workbench__form .metadata-workbench__form-item {
    margin-bottom: 4px;
}

.metadata-workbench__form .metadata-workbench__field-editor {
    min-height: 30px;
    display: flex;
    align-items: center;
}

.metadata-workbench__field-caption {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.metadata-workbench__field-lock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    min-width: 18px;
    height: 18px;
    border-radius: 4px;
    color: #3730a3;
    background: #eef2ff;
    font-size: 0.65rem;
}

.metadata-workbench__form .metadata-workbench__field-editor--boolean {
    min-height: 26px;
}

.metadata-workbench__form .metadata-workbench__form-item--boolean-group {
    margin-top: 2px;
}

.metadata-workbench__boolean-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    min-height: 30px;
}

.metadata-workbench__usage-inline,
.metadata-workbench__usage-badges--inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    min-height: 30px;
}

.metadata-workbench__usage-inline .dxbl-checkbox {
    min-height: 22px;
}

.metadata-workbench__usage-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
}

.metadata-workbench__form .metadata-workbench__field-editor--boolean .dxbl-checkbox {
    min-height: 22px;
}

.metadata-workbench__readonly-context {
    display: grid;
    gap: 3px;
    padding: 12px 14px 14px;
    color: var(--bs-body-color);
}

.metadata-workbench__readonly-context span {
    font-size: 0.82rem;
    color: var(--bs-secondary-color);
}

.metadata-workbench__readonly-context strong {
    font-size: 0.95rem;
    font-weight: 600;
}

.metadata-workbench__row-actions {
    display: flex;
    gap: 2px;
    justify-content: flex-end;
    align-items: center;
}

.metadata-workbench__row-actions .dxbl-btn {
    min-width: 28px;
}

.metadata-workbench__system-required-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    min-width: 24px;
    height: 24px;
    border-radius: 4px;
    color: #3730a3;
    background: #eef2ff;
    font-size: 0.72rem;
}

.metadata-workbench__command-header {
    display: block;
    min-height: 1px;
}

.metadata-workbench__editor-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.metadata-workbench__editor-row label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.82rem;
    color: var(--bs-secondary-color);
}

.metadata-workbench__editor-child-rows {
    margin-top: 8px;
    min-height: 0;
}

.metadata-workbench__editor-child-rows h4 {
    font-size: 0.86rem;
    margin: 0;
}

.metadata-workbench__editor-child-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    gap: 8px;
    align-items: end;
    margin-top: 8px;
}

.metadata-workbench__section-grid {
    width: 100%;
    min-height: 160px;
}

.metadata-workbench__section-grid--child {
    min-height: 96px;
}

.metadata-workbench__section-grid--compact {
    min-height: 0;
}

.json-field-grid {
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
    overflow: hidden;
}

.json-field-grid__toolbar {
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.json-field-grid__grid {
    border: 0;
}

.json-field-grid__readonly {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #64748b;
    font-size: 0.75rem;
    white-space: nowrap;
}

.json-field-grid__validation {
    padding: 6px 10px;
    border-bottom: 1px solid #fee2e2;
    background: #fff7f7;
    color: #991b1b;
    font-size: 0.78rem;
}

.json-field-grid__field-issues {
    margin-top: 3px;
    color: #991b1b;
    font-size: 0.72rem;
    line-height: 1.25;
    white-space: normal;
}

.metadata-workbench__value-list-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 0;
}

.metadata-workbench__value-list-section.workbench-panel {
    flex: 1 1 auto;
    min-height: 420px;
    overflow: hidden;
}

.metadata-workbench__value-list-section.workbench-panel[data-collapsed="true"] {
    flex: 0 0 auto;
    min-height: 0;
}

.metadata-workbench__value-list-section .metadata-workbench__collapsible-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.metadata-workbench__value-list-items {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    padding: 10px;
}

.metadata-workbench__value-list-grid {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
}

.metadata-workbench__value-list-grid .dxbl-scroll-viewer {
    flex: 1 1 auto;
    min-height: 0;
}

.metadata-workbench__value-list-cell {
    min-width: 0;
}

.metadata-workbench__value-list-cell--list-value {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr);
    gap: 6px;
}

.metadata-workbench__validation-items {
    display: grid;
    grid-template-columns: minmax(480px, 1fr) minmax(360px, 0.52fr);
    gap: 10px;
    min-height: 300px;
    padding: 10px;
}

.metadata-workbench__validation-master {
    min-width: 0;
    min-height: 0;
}

.metadata-workbench__validation-grid {
    height: 100%;
    min-height: 280px;
}

.metadata-workbench__validation-detail.workbench-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 280px;
    height: 100%;
    overflow: hidden;
}

.metadata-workbench__validation-detail.workbench-panel[data-collapsed="true"] {
    align-self: start;
    height: auto;
    min-height: 0;
}

.metadata-workbench__validation-detail-body {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 0;
    overflow: auto;
    padding: 10px;
}

.metadata-workbench__validation-help {
    display: grid;
    gap: 4px;
    margin: 10px 12px 12px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.84rem;
}

.metadata-workbench__validation-help strong {
    color: #0f172a;
    font-size: 0.9rem;
}

.metadata-workbench__validation-constraint {
    margin-top: 10px;
    overflow: visible;
}

.metadata-workbench__validation-constraint-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px 12px;
    padding: 10px 12px 12px;
}

.metadata-workbench__validation-constraint-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.metadata-workbench__validation-constraint-label {
    color: #1e293b;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.1;
}

.metadata-workbench__validation-constraint-hint {
    color: #64748b;
    font-size: 0.74rem;
    line-height: 1.25;
}

.metadata-workbench__binding-constraints.workbench-panel {
    min-width: 0;
    overflow: visible;
}

.metadata-workbench__binding-constraint-grid {
    min-height: 154px;
}

.metadata-workbench__constraint-rule-button {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    color: #0f172a;
    font: inherit;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
}

.metadata-workbench__constraint-rule-button:hover,
.metadata-workbench__constraint-rule-button:focus-visible {
    color: #0f766e;
    text-decoration: underline;
    outline: none;
}

.metadata-workbench__constraint-rule-button:disabled {
    color: #475569;
    cursor: default;
    text-decoration: none;
}

.metadata-workbench__constraint-flyout {
    box-sizing: border-box;
    max-width: min(620px, calc(100vw - 32px));
    padding: 0;
}

.metadata-workbench__constraint-flyout-body {
    display: grid;
    box-sizing: border-box;
    gap: 12px;
    width: 100%;
    padding: 16px 18px 18px;
}

.metadata-workbench__constraint-flyout-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.metadata-workbench__constraint-flyout-title {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.metadata-workbench__constraint-flyout-title strong {
    color: #0f172a;
    font-size: 0.92rem;
}

.metadata-workbench__constraint-flyout-title span {
    color: #475569;
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metadata-workbench__constraint-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.metadata-workbench__constraint-editor-grid--rule {
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.metadata-workbench__constraint-editor-field {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.metadata-workbench__constraint-fixed-value {
    display: flex;
    align-items: center;
    min-height: 32px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    background: #f8fafc;
    color: #334155;
    padding: 5px 9px;
    font-size: 0.85rem;
    line-height: 1.2;
}

.metadata-workbench__constraint-editor-field--wide {
    grid-column: 1 / -1;
}

.metadata-workbench__constraint-editor-label {
    color: #334155;
    font-size: 0.74rem;
    font-weight: 700;
}

.metadata-workbench__constraint-editor-hint {
    color: #64748b;
    font-size: 0.75rem;
}

.metadata-workbench__severity-pill {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.metadata-workbench__severity-pill--error {
    background: #fef2f2;
    color: #991b1b;
}

.metadata-workbench__severity-pill--warning {
    background: #fffbeb;
    color: #92400e;
}

.metadata-workbench__row-detail-cell {
    padding: 0 !important;
}

.metadata-workbench__row-detail {
    display: grid;
    gap: 8px;
    padding: 4px 6px 6px;
    background: #f8fafc;
}

.metadata-workbench__row-detail .metadata-workbench__editor-child-rows {
    margin-top: 0;
}

.metadata-workbench-confirmation {
    display: grid;
    gap: 12px;
    width: 100%;
    max-width: min(420px, 84vw);
}

.metadata-workbench-confirmation__risk-panel {
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px solid #fdba74;
    border-radius: 14px;
    background: #fff7ed;
    color: #9a3412;
    line-height: 1.5;
}

.metadata-workbench-confirmation__risk-panel p {
    margin: 0;
}

.metadata-workbench-confirmation__note {
    color: #475569;
    line-height: 1.5;
}

.metadata-workbench-confirmation__footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    flex-wrap: nowrap;
}

@media (max-width: 991.98px) {
    .metadata-workbench__layout {
        grid-template-columns: 1fr;
    }

    .metadata-workbench__row {
        grid-template-columns: 1fr;
    }

    .metadata-workbench__splitter {
        min-height: 920px;
    }

    .metadata-workbench__validation-items {
        grid-template-columns: 1fr;
    }
}
