
/* FV lines tab final compaction: no section title bar, only goods/services panels. */
html body .vario-erp-document-details-modal .vario-document-lines-split-section>.vario-erp-section-header,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-lines-split-section>.vario-erp-section-header {
    display: none !important;
}

html body .vario-erp-document-details-modal .vario-document-lines-split-section>.vario-erp-section-body,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-lines-split-section>.vario-erp-section-body {
    padding: 6px !important;
}

html body .vario-erp-document-details-modal .vario-document-lines-split-section .vario-document-lines-split,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-lines-split-section .vario-document-lines-split {
    height: min(620px, calc(100dvh - 202px)) !important;
    min-height: 440px !important;
}

html body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel {
    display: grid !important;
    grid-template-rows: 32px minmax(0, auto) !important;
    min-height: 0 !important;
    margin-bottom: 8px !important;
    overflow: hidden !important;
    border: 1px solid #c8d7eb !important;
    border-radius: 8px !important;
    background: #ffffff !important;
}

html body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel>header,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel>header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    min-height: 32px !important;
    padding: 3px 8px !important;
    border-bottom: 1px solid #d7e2f0 !important;
    background: linear-gradient(180deg, #f9fbff 0%, #eef4fb 100%) !important;
}

html body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel tfoot td,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel tfoot td {
    border-top: 1px solid #c8d7eb !important;
    background: #f7faff !important;
    color: #08224f !important;
    font-weight: 950 !important;
}

html body .vario-erp-document-details-modal .vario-document-purchase-allocation-panel,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-purchase-allocation-panel {
    grid-template-rows: 32px minmax(88px, auto) auto !important;
}

html body .vario-erp-document-details-modal .vario-purchase-allocation-status-cell,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-purchase-allocation-status-cell {
    width: 160px !important;
    min-width: 150px !important;
}

html body .vario-erp-document-details-modal .vario-purchase-allocation-editor,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-purchase-allocation-editor {
    display: grid !important;
    grid-template-columns: minmax(170px, 1.1fr) minmax(150px, 0.9fr) minmax(190px, 1.2fr) 88px 64px minmax(150px, 1fr) auto !important;
    align-items: end !important;
    gap: 6px !important;
    padding: 7px 8px !important;
    border-top: 1px solid #d7e2f0 !important;
    background: #f8fbff !important;
}

html body .vario-erp-document-details-modal .vario-purchase-allocation-editor label,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-purchase-allocation-editor label {
    display: grid !important;
    gap: 2px !important;
    margin: 0 !important;
    min-width: 0 !important;
}

html body .vario-erp-document-details-modal .vario-purchase-allocation-editor label>span,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-purchase-allocation-editor label>span {
    color: #12345d !important;
    font: 900 10px/12px Inter, "Segoe UI", Arial, sans-serif !important;
}

html body .vario-erp-document-details-modal .vario-purchase-allocation-editor .wide,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-purchase-allocation-editor .wide {
    min-width: 0 !important;
}

html body .vario-erp-document-details-modal .vario-purchase-allocation-editor-summary,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-purchase-allocation-editor-summary {
    align-self: center !important;
    white-space: nowrap !important;
    color: #526985 !important;
    font: 850 10px/12px Inter, "Segoe UI", Arial, sans-serif !important;
}

html body .vario-erp-document-details-modal .vario-purchase-allocation-editor-summary strong,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-purchase-allocation-editor-summary strong {
    color: #08224f !important;
    font-weight: 950 !important;
}

html body .vario-erp-document-details-modal .vario-purchase-allocation-editor-actions,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-purchase-allocation-editor-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

html body .vario-purchase-allocation-wizard-dialog,
html[data-vario-theme] body .vario-purchase-allocation-wizard-dialog {
    max-width: min(1280px, calc(100vw - 48px)) !important;
}

html body .vario-purchase-allocation-wizard-card,
html[data-vario-theme] body .vario-purchase-allocation-wizard-card {
    height: min(760px, calc(100dvh - 84px)) !important;
}

html body .vario-purchase-allocation-wizard-body,
html[data-vario-theme] body .vario-purchase-allocation-wizard-body {
    min-height: 0 !important;
    overflow: hidden !important;
}

html body .vario-purchase-allocation-wizard-section,
html[data-vario-theme] body .vario-purchase-allocation-wizard-section {
    height: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: 36px minmax(0, 1fr) 34px !important;
}

html body .vario-purchase-allocation-wizard-section>.vario-erp-section-header,
html[data-vario-theme] body .vario-purchase-allocation-wizard-section>.vario-erp-section-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

html body .vario-purchase-allocation-wizard-section>.vario-erp-section-header h6,
html[data-vario-theme] body .vario-purchase-allocation-wizard-section>.vario-erp-section-header h6 {
    margin: 0 !important;
    color: #08224f !important;
    font: 950 12px/14px Inter, "Segoe UI", Arial, sans-serif !important;
}

html body .vario-purchase-allocation-wizard-section>.vario-erp-section-header span,
html[data-vario-theme] body .vario-purchase-allocation-wizard-section>.vario-erp-section-header span {
    color: #526985 !important;
    font: 850 10px/12px Inter, "Segoe UI", Arial, sans-serif !important;
}

html body .vario-purchase-allocation-wizard-grid-wrap,
html[data-vario-theme] body .vario-purchase-allocation-wizard-grid-wrap {
    min-height: 0 !important;
    overflow: auto !important;
}

html body .vario-purchase-allocation-wizard-grid input[type="number"],
html[data-vario-theme] body .vario-purchase-allocation-wizard-grid input[type="number"] {
    width: 110px !important;
    margin-left: auto !important;
}

html body .vario-purchase-allocation-wizard-grid select,
html[data-vario-theme] body .vario-purchase-allocation-wizard-grid select {
    min-width: 190px !important;
    height: 26px !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    color: #08224f !important;
    font: 850 11px/14px Inter, "Segoe UI", Arial, sans-serif !important;
}

html body .vario-purchase-allocation-wizard-grid input[type="text"],
html[data-vario-theme] body .vario-purchase-allocation-wizard-grid input[type="text"] {
    min-width: 180px !important;
}

html body .vario-purchase-allocation-wizard-row-actions,
html[data-vario-theme] body .vario-purchase-allocation-wizard-row-actions {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
}

html body .vario-purchase-allocation-wizard-summary,
html[data-vario-theme] body .vario-purchase-allocation-wizard-summary {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 14px !important;
    min-height: 34px !important;
    padding: 4px 8px !important;
    border-top: 1px solid #c8d7eb !important;
    background: #f7faff !important;
    color: #526985 !important;
    font: 850 10px/12px Inter, "Segoe UI", Arial, sans-serif !important;
}

html body .vario-purchase-allocation-wizard-summary strong,
html[data-vario-theme] body .vario-purchase-allocation-wizard-summary strong {
    color: #08224f !important;
    font-weight: 950 !important;
}

html body .vario-purchase-allocation-wizard-summary .danger,
html[data-vario-theme] body .vario-purchase-allocation-wizard-summary .danger {
    color: #b42318 !important;
    font-weight: 950 !important;
}

html body .vario-purchase-allocation-wizard-warning,
html[data-vario-theme] body .vario-purchase-allocation-wizard-warning {
    display: block !important;
    margin-top: 2px !important;
    color: #9a5b00 !important;
    font: 850 9px/11px Inter, "Segoe UI", Arial, sans-serif !important;
}

html body .vario-purchase-allocation-wizard-status,
html[data-vario-theme] body .vario-purchase-allocation-wizard-status {
    color: #526985 !important;
    font: 850 11px/14px Inter, "Segoe UI", Arial, sans-serif !important;
}

html body .vario-purchase-allocation-wizard-row-disabled,
html[data-vario-theme] body .vario-purchase-allocation-wizard-row-disabled {
    color: #7d8da3 !important;
    background: #f7f9fc !important;
}

@media (max-width: 1280px) {

    html body .vario-erp-document-details-modal .vario-purchase-allocation-editor,
    html[data-vario-theme] body .vario-erp-document-details-modal .vario-purchase-allocation-editor {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    html body .vario-erp-document-details-modal .vario-purchase-allocation-editor-actions,
    html[data-vario-theme] body .vario-erp-document-details-modal .vario-purchase-allocation-editor-actions {
        justify-content: flex-start !important;
    }
}

@media (max-width: 720px) {
    html body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel,
    html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel {
        grid-template-rows: auto minmax(0, auto) !important;
    }

    html body .vario-erp-document-details-modal .vario-document-purchase-allocation-panel,
    html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-purchase-allocation-panel {
        grid-template-rows: auto minmax(88px, auto) auto !important;
    }

    html body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel>header,
    html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel>header {
        align-items: stretch !important;
        flex-wrap: wrap !important;
        min-height: 0 !important;
        height: auto !important;
        row-gap: 4px !important;
    }

    html body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel>header .vario-document-lines-panel-title,
    html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel>header .vario-document-lines-panel-title {
        flex: 1 1 100% !important;
        min-width: 0 !important;
    }

    html body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel>header .vario-document-inline-actions,
    html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel>header .vario-document-inline-actions {
        position: relative !important;
        z-index: 1 !important;
        flex: 1 1 100% !important;
        flex-wrap: wrap !important;
        justify-content: flex-end !important;
        gap: 4px !important;
    }

    html body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel>header .vario-document-inline-actions .btn,
    html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel>header .vario-document-inline-actions .btn {
        padding-inline: 7px !important;
    }
}

html body .vario-erp-document-details-modal .vario-document-lines-panel-title,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-lines-panel-title {
    display: flex !important;
    align-items: baseline !important;
    gap: 8px !important;
    min-width: 0 !important;
    white-space: nowrap !important;
}

html body .vario-erp-document-details-modal .vario-document-lines-panel-title h3,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-lines-panel-title h3 {
    flex: 0 0 auto !important;
}

html body .vario-erp-document-details-modal .vario-document-lines-panel-title span,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-lines-panel-title span {
    flex: 0 0 auto !important;
    color: #526985 !important;
    font: 850 10px/12px Inter, "Segoe UI", Arial, sans-serif !important;
}

html body .vario-erp-document-details-modal .vario-win-document-tabs button,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-win-document-tabs button {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

html body .vario-erp-document-details-modal .vario-win-document-tabs button:focus,
html body .vario-erp-document-details-modal .vario-win-document-tabs button:focus-visible,
html body .vario-erp-document-details-modal .vario-win-document-tabs button:active,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-win-document-tabs button:focus,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-win-document-tabs button:focus-visible,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-win-document-tabs button:active {
    outline: none !important;
    box-shadow: none !important;
}

html body .vario-erp-document-details-modal .vario-win-document-tabs button.active:focus,
html body .vario-erp-document-details-modal .vario-win-document-tabs button.active:focus-visible,
html body .vario-erp-document-details-modal .vario-win-document-tabs button.active:active,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-win-document-tabs button.active:focus,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-win-document-tabs button.active:focus-visible,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-win-document-tabs button.active:active {
    border-bottom-color: #1263f1 !important;
    background: #f5f9ff !important;
    color: #1263f1 !important;
    box-shadow: none !important;
}
