.bde-host {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    min-width: 0;
    width: 100%;
    gap: 0.5rem;
    overflow: hidden;
}

.bde-ribbon-filters {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px 12px;
    width: 100%;
    min-width: 0;
}

.bde-ribbon-filter {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 0 0 auto;
}

.bde-ribbon-filter--checkbox {
    padding-top: 1px;
}

.bde-ribbon-filter__label {
    font-size: 12px;
    color: #374151;
    line-height: 1.2;
    white-space: nowrap;
    flex: 0 0 auto;
}

.bde-ribbon-filter__editor--date {
    width: 132px;
    min-width: 132px;
}

.bde-ribbon-filters--data-area {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    min-width: 0;
}

.bde-workspace {
    display: flex;
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.bde-workspace-layout {
    display: flex;
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.bde-panel--fill {
    flex: 1 1 0;
    height: 0;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
}

/* Area below the panel title — grid host must match this box exactly. */
.bde-panel__content {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bde-panel__content > .bde-panel__body,
.bde-panel__content > .bde-panel__body--tree,
.bde-panel__content > .bde-order-tree-panel {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    min-width: 0;
    width: 100%;
}

.bde-panel__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

/* CrudPage / raw DxGrid inside BDE splitter panes: bounded height for virtual scroll. */
.bde-orders-crud.bde-panel__body,
.bde-operations-crud.bde-panel__body,
.bde-operation-parts-crud.bde-panel__body,
.bde-resources-crud.bde-panel__body {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
}

.bde-orders-crud .center-crud-page,
.bde-operations-crud .center-crud-page,
.bde-operation-parts-crud .center-crud-page {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    height: 0;
    min-height: 0;
}

.bde-orders-crud > .bde-grid-wrap,
.bde-operations-crud > .bde-grid-wrap,
.bde-operation-parts-crud > .bde-grid-wrap,
.bde-resources-crud > .bde-grid-wrap {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
}

.bde-orders-crud .center-crud-grid-wrap,
.bde-operations-crud .center-crud-grid-wrap,
.bde-operation-parts-crud .center-crud-grid-wrap,
.bde-grid-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.bde-grid-wrap--loading {
    pointer-events: none;
}

.bde-grid-wrap__loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
}

.bde-orders-crud .dxbl-grid,
.bde-operations-crud .dxbl-grid,
.bde-operation-parts-crud .dxbl-grid,
.bde-grid-wrap .dxbl-grid,
.bde-grid-wrap .dxbl-treelist {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    width: 100%;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden;
}

.bde-orders-crud .dxbl-grid-filter-row,
.bde-orders-crud .dxbl-grid-filter-panel,
.bde-operations-crud .dxbl-grid-filter-row,
.bde-operations-crud .dxbl-grid-filter-panel,
.bde-operation-parts-crud .dxbl-grid-filter-row,
.bde-operation-parts-crud .dxbl-grid-filter-panel,
.bde-grid-wrap .dxbl-grid-filter-row,
.bde-grid-wrap .dxbl-grid-filter-panel,
.bde-grid-wrap .dxbl-grid-footer {
    flex: 0 0 auto;
}

.bde-orders-crud .dxbl-grid-table-wrapper,
.bde-operations-crud .dxbl-grid-table-wrapper,
.bde-operation-parts-crud .dxbl-grid-table-wrapper,
.bde-grid-wrap .dxbl-grid-table-wrapper {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

.bde-orders-crud .center-crud-grid,
.bde-operations-crud .center-crud-grid,
.bde-operation-parts-crud .center-crud-grid,
.bde-grid-wrap .bde-grid,
.bde-grid-wrap .bde-tree,
.bde-grid-wrap .center-crud-grid {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
}

.bde-order-operations-tab .center-crud-grid {
    height: 100%;
    min-height: 0;
}

.bde-side-column {
    flex: 1 1 0;
    min-height: 0;
    max-height: 100%;
    height: 100%;
    overflow: hidden;
}

.bde-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    border: 1px solid var(--gnt-border-color, #d0d0d0);
    border-radius: 4px;
    background: var(--gnt-surface, #fff);
}

.bde-panel__title {
    flex: 0 0 auto;
    padding: 0.35rem 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--gnt-border-color, #d0d0d0);
    background: var(--gnt-panel-header, #f4f4f4);
}

.bde-side-column .dxbl-tabs {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.bde-side-column .dxbl-tabs-content {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

.bde-side-panel {
    padding: 0.75rem;
    display: grid;
    gap: 0.5rem;
    min-height: 0;
}

.bde-side-panel--scroll {
    height: 100%;
    overflow: auto;
}

.bde-side-panel--fill {
    height: 100%;
    min-height: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.bde-article-documents-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.bde-article-documents-split {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
}

.bde-article-documents-panel__preview {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    border-top: 1px solid var(--gnt-border-color, #d0d0d0);
    background: var(--gnt-surface, #fff);
}

.bde-article-documents-panel__preview-title {
    flex: 0 0 auto;
    padding: 0.35rem 0.6rem;
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--gnt-border-color, #d0d0d0);
    background: var(--gnt-panel-header, #f4f4f4);
}

.bde-article-documents-inline-preview {
    flex: 1 1 0;
    min-height: 0;
    overflow: auto;
}

.article-documents-preview--inline {
    height: 100%;
    min-height: 120px;
}

.article-documents-preview--inline .article-documents-preview__frame {
    width: 100%;
    height: 100%;
    min-height: 120px;
    border: 0;
}

.bde-field {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.35rem;
    font-size: 0.9rem;
}

.bde-field__label {
    color: var(--gnt-text-muted, #666);
}

.bde-empty,
.bde-loading,
.bde-error {
    padding: 0.75rem;
    font-size: 0.9rem;
}

.bde-error {
    color: #b00020;
}

.bde-type--gestartet { color: #1565c0; }
.bde-type--beendet { color: #2e7d32; }
.bde-type--unterbrochen { color: #c62828; }
.bde-type--geplant { color: #6a1b9a; }
.bde-type--neu { color: #00838f; }

.bde-grid-status-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 100%;
    min-height: 1.25rem;
}

.bde-grid-status-cell--end {
    justify-content: flex-end;
    width: 100%;
}

.bde-grid-status-cell__dot {
    flex: 0 0 auto;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.bde-grid-status-cell__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bde-dialog-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bde-dialog-list__item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.25rem;
    border: none;
    background: transparent;
    cursor: pointer;
}

.bde-dialog-list__item:hover {
    background: #f4f4f4;
}

.bde-documents-list__link {
    border: none;
    background: transparent;
    padding: 0;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.bde-documents-list__link:hover {
    text-decoration: underline;
}

.bde-documents-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bde-documents-list li {
    padding: 0.35rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.bde-barcode__value {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 1rem;
    text-align: center;
    border: 1px dashed #ccc;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.bde-barcode__hint,
.bde-corrections-hint,
.bde-workplans-hint {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.75rem;
}

.bde-login-grid {
    max-height: 320px;
}

.bde-panel__body--tree {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.bde-order-details-tab__order-number {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.bde-order-tree-panel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: 100%;
    min-height: 0;
}

.bde-order-tree-panel__options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.bde-order-tree-panel__search-row,
.bde-order-tree-panel__sort-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.bde-order-tree-panel__search-field {
    flex: 0 0 180px;
    min-width: 140px;
}

.bde-order-tree-panel__search-input {
    flex: 1 1 200px;
    min-width: 160px;
}

.bde-order-tree-panel__sort-label {
    font-size: 0.875rem;
    white-space: nowrap;
}

.bde-order-tree-panel__sort-field {
    flex: 0 0 220px;
    min-width: 180px;
}

.bde-order-tree-panel__tree-host {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bde-order-tree-panel__tree-host .dxbl-treelist,
.bde-order-tree-panel__tree-host .bde-order-tree {
    width: 100%;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
}

/* Desktop Baumansicht parity: arrow cursor on tree nodes, not pointer/hand. */
.bde-order-tree .dxbl-treelist-row,
.bde-order-tree .dxbl-treelist-cell {
    cursor: default;
}

.bde-order-tree .dxbl-grid-expand-btn {
    cursor: pointer;
}

.bde-order-tree-panel__loading,
.bde-order-tree-panel__empty {
    padding: 1rem;
    color: #666;
}

/* PDM tree chrome parity for order pickers and compact tree hosts. */
.bde-order-tree-panel--pdm {
    gap: 0;
    background: #fff;
}

.bde-order-tree-panel--pdm .bde-order-tree-panel__options,
.bde-order-tree-panel--pdm .bde-order-tree-panel__search-row,
.bde-order-tree-panel--pdm .bde-order-tree-panel__sort-row {
    flex: 0 0 auto;
    padding: 0.25rem 0.3rem;
    background: #f0f0f0;
    border-bottom: 1px solid #d0d0d0;
}

.bde-order-tree-panel--pdm .bde-order-tree-panel__options {
    padding-bottom: 0.15rem;
    gap: 0.75rem;
}

.bde-order-tree-panel--pdm .bde-order-tree-panel__sort-row {
    padding-top: 0.15rem;
}

.bde-order-tree-panel--pdm .bde-order-tree-panel__tree-host {
    flex: 1 1 0;
    min-height: 0;
}

.bde-order-tree-panel--pdm .bde-order-tree-panel__tree-host .dxbl-treelist,
.bde-order-tree-panel--pdm .bde-order-tree-panel__tree-host .bde-order-tree--pdm {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    --dxbl-grid-expand-btn-padding-y: 0;
    --dxbl-grid-expand-btn-padding-x: 0;
    --dxbl-grid-focus-bg: #f4f4f4;
    --dxbl-grid-focus-color: #404040;
    --dxbl-grid-selection-focus-dark-bg: #f4f4f4;
    --dxbl-grid-selection-focus-dark-color: #404040;
}

.bde-order-tree--pdm .dxbl-grid-expand-btn,
.bde-order-tree--pdm .dxbl-grid-tree-node-expand-button {
    visibility: visible;
    width: auto;
    min-width: 1rem;
    color: #404040;
    opacity: 1;
}

.bde-order-tree--pdm .dxbl-grid-tree-node-expand-button,
.bde-order-tree--pdm .dxbl-grid-tree-node-expand-button-placeholder {
    box-sizing: border-box;
    width: 20px;
    min-width: 20px;
    max-width: 20px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bde-order-tree--pdm.center-crud-grid .dxbl-grid .dxbl-grid-table > tbody > tr.dxbl-grid-focused-row > td,
.bde-order-tree--pdm.center-crud-grid .dxbl-grid .dxbl-grid-table > tbody > tr.dxbl-grid-selected-row > td,
.bde-order-tree--pdm.center-crud-grid .dxbl-grid .dxbl-grid-table > tbody > tr.dxbl-grid-focused-row.dxbl-grid-selected-row > td,
.bde-order-tree--pdm.center-crud-grid .dxbl-grid .dxbl-grid-table > tbody > tr.dxbl-grid-focused-row.dxbl-grid-selected-row:not(.dxbl-grid-touch-selection):not(.dxbl-grid-touch-selection-edge) > td {
    background-color: #f4f4f4 !important;
    color: #404040 !important;
}

.bde-order-tree--pdm.center-crud-grid .dxbl-grid .dxbl-grid-table > tbody > tr.dxbl-grid-focused-row > td *,
.bde-order-tree--pdm.center-crud-grid .dxbl-grid .dxbl-grid-table > tbody > tr.dxbl-grid-selected-row > td *,
.bde-order-tree--pdm.center-crud-grid .dxbl-grid .dxbl-grid-table > tbody > tr.dxbl-grid-focused-row.dxbl-grid-selected-row > td * {
    color: #404040 !important;
}

.bde-order-tree--pdm.center-crud-grid tr.dxbl-grid-focused-row .dxbl-grid-tree-node-expand-button,
.bde-order-tree--pdm.center-crud-grid tr.dxbl-grid-selected-row .dxbl-grid-tree-node-expand-button,
.bde-order-tree--pdm.center-crud-grid tr.dxbl-grid-focused-row.dxbl-grid-selected-row .dxbl-grid-tree-node-expand-button,
.bde-order-tree--pdm.center-crud-grid tr.dxbl-grid-focused-row .dxbl-grid-expand-btn,
.bde-order-tree--pdm.center-crud-grid tr.dxbl-grid-selected-row .dxbl-grid-expand-btn,
.bde-order-tree--pdm.center-crud-grid tr.dxbl-grid-focused-row.dxbl-grid-selected-row .dxbl-grid-expand-btn {
    color: #404040 !important;
    opacity: 1 !important;
}

.bde-order-tree--pdm .bde-order-tree__header-cell,
.bde-order-tree--pdm .dxbl-treelist-header,
.bde-order-tree--pdm .dx-treelist-headers {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.bde-order-tree__row--focused > td {
    outline: 1px dotted #808080;
    outline-offset: -1px;
    background: #f4f4f4;
}

.bde-order-tree--pdm .dxbl-treelist-cell {
    font-size: 0.8125rem;
    color: #404040;
}

.bde-order-tree-pick-dialog {
    height: 100%;
    min-height: 0;
}

.crud-pick-dialog-popup.bde-order-tree-pick-dialog-popup .dxbl-popup-content,
.crud-pick-dialog-popup.bde-order-tree-pick-dialog-popup .bde-order-tree-pick-dialog-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    height: 100%;
}

.crud-pick-dialog-popup.bde-order-tree-pick-dialog-popup .bde-order-tree-pick-dialog-body {
    flex: 1 1 auto;
    padding: 8px;
}

.crud-pick-dialog-popup .bde-employee-pick-dialog-body {
    flex: 1 1 auto;
    padding: 0;
}

.bde-employee-pick-dialog {
    height: 540px;
}

.bde-order-details-tab__get-number {
    flex: 0 0 auto;
    font-weight: 600;
    padding-inline: 0.35rem;
}

.bde-order-details-tab__columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
    align-items: start;
}

@media (max-width: 960px) {
    .bde-order-details-tab__columns {
        grid-template-columns: 1fr;
    }
}

.bde-order-details-tab__section {
    margin-bottom: 1rem;
}

.bde-order-details-tab__section-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #555;
    margin: 0 0 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e0e0e0;
}

.bde-order-details-tab__picker-field {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.bde-order-details-tab__picker-field .dxbs-textbox,
.bde-order-details-tab__picker-field .dxbl-text-edit {
    flex: 1 1 auto;
    min-width: 0;
}

.bde-order-details-tab__pick-button {
    flex: 0 0 auto;
    min-width: 2rem;
}

.bde-order-details-tab__hint,
.bde-order-details-tab__char-counter {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.bde-order-details-tab__hint--warning {
    color: #b45309;
}

.bde-order-details-tab__progress-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.bde-order-details-tab__progress-bar {
    height: 8px;
    background: #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
}

.bde-order-details-tab__progress-fill {
    height: 100%;
    background: var(--bs-primary, #0d6efd);
    transition: width 0.2s ease;
}

.bde-order-operations-tab__toolbar,
.bde-order-attributes-tab__actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.bde-grid-duration-value {
    display: block;
    width: 100%;
    text-align: right;
    white-space: nowrap;
}

.bde-grid-duration-cell {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 20px;
    overflow: hidden;
}

.bde-grid-duration-cell__bar {
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    max-width: 100%;
    background: linear-gradient(90deg, #b91c3c 0%, #7f1d1d 100%);
    border-radius: 2px;
    opacity: 0.9;
}

.bde-grid-duration-cell__bar--planned {
    background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
    opacity: 0.85;
}

.bde-grid-duration-cell--planned {
    padding-left: 2px;
}

.bde-grid-duration-cell__icon {
    position: absolute;
    left: 2px;
    z-index: 2;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.bde-grid-duration-cell__icon--ahead {
    border-bottom: 7px solid #16a34a;
    top: 50%;
    transform: translateY(-65%);
}

.bde-grid-duration-cell__icon--behind {
    border-top: 7px solid #dc2626;
    top: 50%;
    transform: translateY(-35%);
}

.bde-grid-duration-cell--planned:has(.bde-grid-duration-cell__icon) {
    padding-left: 14px;
}

.bde-grid-duration-cell__text {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0 4px;
    text-align: right;
    white-space: nowrap;
}

.bde-grid-progress-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    min-height: 20px;
    overflow: hidden;
}

.bde-grid-progress-cell__bar {
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    max-width: 100%;
    background: linear-gradient(90deg, #8db4e2 0%, #5b9bd5 100%);
    border-radius: 1px;
    opacity: 0.95;
}

.bde-grid-progress-cell__text {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0 4px;
    text-align: right;
    white-space: nowrap;
}

.bde-order-operations-tab__hint {
    margin-top: 0.75rem;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.45;
}

.bde-delete-dialog__message {
    margin: 0;
}

.bde-correction-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bde-correction-form__row {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 0.5rem;
    align-items: center;
}

.bde-correction-form__row label {
    font-weight: 600;
    font-size: 0.85rem;
}

.bde-correction-form__picker {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.bde-correction-form__picker .dxbl-text-edit {
    flex: 1 1 auto;
}

.bde-correction-form__error {
    margin: 0;
    color: #b00020;
    font-size: 0.85rem;
}

.bde-order-details-tab__progress-slider {
    width: 100%;
    margin: 0.35rem 0 0.5rem;
}

.bde-order-details-tab__progress-slider:disabled {
    opacity: 0.6;
}

.bde-order-details-tab__progress-row {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.bde-order-details-tab__progress-timestamp-label {
    font-weight: 600;
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .bde-correction-form__row {
        grid-template-columns: 1fr;
    }
}

/* MesOne order tree — fill panel height + horizontal inset (parity with BDE tree). */
.mesone-order-workspace-layout {
    height: 100%;
    min-height: 0;
}

.mesone-order-workspace-layout .mesone-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.mesone-order-workspace-layout .mesone-panel__content--fill {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.mesone-order-workspace-layout .mesone-panel__content--fill > .mesone-order-tree-panel {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 4px 12px 8px;
}

.mesone-order-tree-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
}

.mesone-order-tree-panel__options,
.mesone-order-tree-panel__search-row,
.mesone-order-tree-panel__sort-row {
    flex: 0 0 auto;
}

.mesone-order-tree-panel__tree-host {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mesone-order-tree-panel__tree-wrap {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
}

.mesone-order-tree-panel__tree-host .dxbl-treelist,
.mesone-order-tree-panel__tree-host .mesone-order-tree,
.mesone-order-tree-panel__tree-host .bde-order-tree {
    width: 100%;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
}

.mesone-order-tree-panel__loading,
.mesone-order-tree-panel__empty {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 16px;
    color: var(--gnt-text-secondary, #666);
    text-align: center;
}

/* Arbeitsgang edit dialog + full-page editor (desktop parity layout). */
.bde-ag-editor-host {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    width: 100%;
    padding: 12px 16px;
    overflow: auto;
    box-sizing: border-box;
}

.bde-ag-editor-host__shell {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
}

.bde-ag-editor-host .bde-ag-edit-dialog,
.bde-ag-editor-host .bde-ag-edit-dialog__grid {
    width: 100%;
}

.bde-ag-edit-dialog {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 2px 0;
}

.bde-ag-edit-dialog__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
        "order time"
        "other progress"
        "comment comment";
    gap: 12px 16px;
    align-items: start;
}

.bde-ag-edit-dialog__panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.bde-ag-edit-dialog__panel--order { grid-area: order; }
.bde-ag-edit-dialog__panel--time { grid-area: time; }
.bde-ag-edit-dialog__panel--other { grid-area: other; }
.bde-ag-edit-dialog__panel--comment { grid-area: comment; }
.bde-ag-edit-dialog__panel--progress { grid-area: progress; }

.bde-ag-edit-dialog__section-title {
    margin: 0;
    padding: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #4b5563;
    border-bottom: 1px solid #e5e7eb;
}

.bde-ag-edit-dialog__fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bde-ag-edit-dialog__field {
    display: grid;
    grid-template-columns: minmax(7.5rem, 9.5rem) 1fr;
    align-items: center;
    gap: 8px 12px;
    min-width: 0;
}

.bde-ag-edit-dialog__field-label {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    line-height: 1.3;
}

.bde-ag-edit-dialog__field--checkbox {
    align-items: start;
}

.bde-ag-edit-dialog__field--checkbox > * {
    grid-column: 2;
}

.bde-ag-edit-dialog__priority-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.bde-ag-edit-dialog__hint {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

.bde-ag-edit-dialog__field .dxbl-text-edit,
.bde-ag-edit-dialog__field .dxbl-spin-edit,
.bde-ag-edit-dialog__field .dxbl-date-edit {
    width: 100%;
    min-width: 0;
}

.bde-ag-edit-dialog__durations {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bde-ag-edit-dialog__total-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.bde-ag-edit-dialog__total-summary-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #6b7280;
}

.bde-ag-edit-dialog__total-display {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem 0.35rem;
    padding: 4px 0;
}

.bde-ag-edit-dialog__total-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1d4ed8;
    line-height: 1.2;
}

.bde-ag-edit-dialog__panel--progress .bde-progress-value-panel {
    --bde-progress-bar-width: 72px;
}

.bde-ag-edit-dialog__panel--progress .bde-progress-value-panel__body {
    align-items: start;
}

.bde-ag-edit-dialog__panel--progress .bde-progress-value-panel__visual {
    min-height: 96px;
    height: 96px;
}

.bde-ag-edit-dialog__panel--progress .bde-progress-value-panel__fields {
    width: 100%;
    max-width: 100%;
}

.bde-ag-edit-dialog__total-unit {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.2;
    margin-right: 0.65rem;
}

.bde-ag-edit-dialog__total-unit:last-child {
    margin-right: 0;
}

.bde-ag-edit-dialog__comment {
    min-height: 6rem;
    width: 100%;
}

.bde-ag-edit-dialog__comment textarea,
.bde-ag-edit-dialog__comment .dxbl-memo {
    min-height: 6rem;
}

.bde-duration-input-row {
    display: grid;
    grid-template-columns: minmax(7.5rem, 9rem) 1fr;
    align-items: center;
    gap: 8px 12px;
    min-width: 0;
}

.bde-duration-input-row__name {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    line-height: 1.3;
}

.bde-duration-input-row__parts {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    min-width: 0;
}

.bde-duration-input-row__spin {
    width: 4.25rem;
    min-width: 4.25rem;
    max-width: 4.25rem;
    flex: 0 0 auto;
}

.bde-duration-input-row .bde-duration-input-row__spin {
    width: 4.25rem;
    min-width: 4.25rem;
    max-width: 4.25rem;
}

.bde-duration-input-row .bde-duration-input-row__spin .dxbl-spin-edit {
    width: 100%;
}

.bde-duration-input-row__unit {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    min-width: 0.85rem;
    margin-right: 2px;
}

.bde-duration-input-row__sep {
    color: #9ca3af;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    padding: 0 1px;
}

.bde-duration-input-row__sep--comma {
    margin-right: 2px;
}

@media (max-width: 900px) {
    .bde-ag-edit-dialog__grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "order"
            "time"
            "other"
            "progress"
            "comment";
    }
}

/* GNT Diagnose-Tool shell ribbon: flat borderless action buttons */
.page-toolbar-host .page-toolbar--bde-diagnostics .page-toolbar__ribbon-compact-btn,
.page-toolbar-host .page-toolbar--bde-diagnostics .page-toolbar__ribbon-large-btn,
.page-toolbar-host .page-toolbar--bde-diagnostics .page-toolbar__ribbon-toggle-btn {
    border: none;
    box-shadow: none;
    background: transparent;
}

.page-toolbar-host .page-toolbar--bde-diagnostics .page-toolbar__ribbon-compact-btn {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    color: #1f2937;
    cursor: pointer;
}

.page-toolbar-host .page-toolbar--bde-diagnostics .page-toolbar__ribbon-compact-btn .gnt-gi {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.page-toolbar-host .page-toolbar--bde-diagnostics .page-toolbar__ribbon-compact-caption {
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.page-toolbar-host .page-toolbar--bde-diagnostics .page-toolbar__ribbon-compact-btn:hover:not(:disabled),
.page-toolbar-host .page-toolbar--bde-diagnostics .page-toolbar__ribbon-large-btn:hover:not(:disabled),
.page-toolbar-host .page-toolbar--bde-diagnostics .page-toolbar__ribbon-toggle-btn:hover:not(:disabled) {
    border: none;
    background: #f3f4f6;
}

.page-toolbar-host .page-toolbar--bde-diagnostics .page-toolbar__ribbon-action--begin-group {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
}

.bde-operation-symbol-badges {
    display: flex;
    align-items: center;
    gap: 2px;
    min-height: 20px;
}

.bde-operation-symbol-badges--wrap {
    flex-wrap: wrap;
    align-content: flex-start;
}

.bde-operation-symbol-badges__icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    object-fit: contain;
}

.bde-grid--operation-symbols .dxbl-grid-data-row {
    min-height: 64px;
}

.bde-operation-symbol-legend {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.bde-operation-symbol-legend__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.bde-operation-symbol-legend__items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.35rem 1rem;
    margin-top: 0.5rem;
}

.bde-operation-symbol-legend__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 12px;
    color: #374151;
}

.bde-operation-symbol-legend__item--runtime {
    color: #6b7280;
}

.bde-operation-symbol-legend__note {
    margin-top: 0.5rem;
    font-size: 11px;
    color: #6b7280;
}

.bde-operation-parts-crud__legend-toolbar {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.bde-operation-parts-crud__legend-toolbar .bde-operation-symbol-legend {
    flex: 1 1 auto;
    margin-bottom: 0;
}
