/* Structure, wording and control order follow the current WPF views. */
:root { font-family: 'Segoe UI Variable Text', 'Segoe UI', Carlito, Arial, sans-serif; --blue: #246be8; --line: #e3e6ec; --nav: #f1f3f6; background: #f7f8fa; color: #2e3540; }
@font-face {
    font-family: 'Erste Fluent Icons';
    src: url('fonts/fluent-system-icons-wpf-ui-4.3.0.ttf') format('truetype');
    font-style: normal;
    font-weight: normal;
    font-display: block;
}
.nav-icon {
    font-family: 'Erste Fluent Icons';
    font-style: normal;
    font-weight: normal;
    font-size: 22px;
    line-height: 1;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
button, .button-link, .file-button { min-height: 30px; padding: 5px 11px; background: #e8eaed; border-color: #d3d8df; border-radius: 5px; font-size: 13px; }
input, select { min-height: 30px; padding: 5px 7px; }
h1 { font-size: 24px; letter-spacing: normal; }
h2 { font-size: 18px; }
h3 { font-size: 13px; font-weight: 600; }
.app-shell { grid-template-columns: 224px minmax(0,1fr); height: 100dvh; min-height: 0; overflow: hidden; }
.app-shell.collapsed { grid-template-columns: 72px minmax(0,1fr); }
.app-shell:has(.shell-log-dock) { grid-template-columns: 224px minmax(320px,1fr) minmax(320px,38vw); }
.app-shell.collapsed:has(.shell-log-dock) { grid-template-columns: 72px minmax(320px,1fr) minmax(320px,38vw); }
.app-shell.standalone { grid-template-columns: minmax(0,1fr); }
.standalone > .sidebar, .standalone .topbar { display: none; }
.sidebar { padding: 8px; position: static; min-height: 0; height: 100%; }
.brand { height: 60px; margin-bottom: 16px; padding: 0 6px; flex-shrink: 0; }
.brand img { width: 120px; }
.sidebar-toggle { width: 30px; height: 28px; min-height: 28px; padding: 0; }
nav { padding: 0; }
nav a { font-size: 14px; padding: 7px 10px; margin: 1px 0; min-height: 34px; gap: 8px; }
.nav-caption { margin: 8px 10px 3px; font-size: 12px; font-weight: 600; }
.nav-entry { display: grid; grid-template-columns: 25px minmax(0,1fr); }
.nav-entry > a:not(.nav-popout) { grid-column: 2; grid-row: 1; padding-right: 10px; }
.nav-entry:not(:has(.nav-popout)) > a { grid-column: 1 / -1; }
.nav-entry > a.nav-popout { position: static; grid-column: 1; grid-row: 1; width: 24px; height: 30px; min-height: 30px; padding: 0; margin: 1px 2px 1px 0; font-size: 17px; align-self: center; display: flex; justify-content: center; }
.collapsed .nav-entry > a.nav-popout { display: none; }
.collapsed .nav-entry > a:not(.nav-popout) { grid-column: 1 / -1; padding: 8px 0; justify-content: center; }
.collapsed .brand { justify-content: center; padding: 0; }
.collapsed .sidebar-toggle { margin: 0; }
.sidebar-footer { padding: 6px 6px 0; border-top: 0; }
.sidebar-footer .environment { align-self: flex-start; margin: 0 0 5px; font-size: 12px; padding: 2px 6px; letter-spacing: 0; font-weight: 600; }
.sidebar-footer .user-name { font-size: 11px; margin: 0 0 5px; }
.sidebar-footer .app-version { display: block; font-size: 11px; color: #64748b; margin: 0 0 6px; }
.collapsed .app-version { display: none; }
.collapsed .sidebar-footer .environment { display: none; }
.workspace { padding: 12px 16px; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
.topbar { height: auto; min-height: 30px; margin: 0 0 6px; padding: 0; border: 0; background: transparent; color: #2e3540; flex-shrink: 0; }
.topbar h1 { font-size: 20px; margin: 0; }
.topbar button { height: 28px; min-height: 28px; padding: 3px 8px; font-size: 12px; background: #fff; }
.topbar button.active { background: #e8effd; border-color: var(--blue); }
.page-content { padding: 0; min-height: 0; flex: 1; display: flex; flex-direction: column; }
.page-content > * { flex-shrink: 0; }
.panel { box-shadow: none; border-radius: 12px; }
.home-workspaces > h2 { margin: 0 0 14px; }
.home-workspaces .shortcut { display: flex; align-items: center; gap: 20px; padding: 22px; color: inherit; text-decoration: none; }
.home-workspaces .shortcut h2 { font-size: 17px; }
.home-workspaces .shortcut p { margin: 5px 0 0; color: var(--muted); }
.maintenance-shortcut { margin-bottom: 14px; padding: 24px !important; }
.home-workspace-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.reporting-placeholder { padding: 28px; }
.reporting-placeholder > .nav-icon { width: 32px; height: 32px; font-size: 32px; margin-bottom: 18px; color: var(--blue); }
.reporting-placeholder h2 { font-size: 20px; }
.reporting-placeholder p { margin-top: 10px; color: var(--muted); }
.login-card { width: 440px; padding: 36px; border-radius: 12px; }
.login-card .login-logo { width: 140px; margin: 0 0 28px; }
.login-card h1 { font-size: 28px; margin-bottom: 0; }
.login-card h1 { margin-top: 0; }
.login-card form { margin-top: 12px; gap: 0; }
.login-card label { padding-bottom: 8px; }
.login-card .remember-login { padding-bottom: 0; }
.login-card input:not([type=checkbox]), .login-card select { width: 100%; min-height: 38px; }
.login-card label { margin-top: 18px; }
.login-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 26px; }
.login-actions button { min-height: 40px; margin: 0; }
.login-status { margin-top: 16px; font-size: 13px; color: var(--muted); }
.login-status:empty { margin: 0; }
.process-tabs { margin: 0 0 4px; gap: 4px; }
.process-tabs button { padding: 7px 14px; min-height: 36px; font-size: 12px; border: 0; background: transparent; }
.process-tabs button.active { background: #e8effd; box-shadow: none; border-radius: 6px; }
.process-tabs button.complete { color: #15803d; }
.billing-run-heading { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); padding: 6px; border-radius: 8px; margin-bottom: 4px; }
.billing-run-heading strong { font-size: 14px; margin-right: 10px; white-space: nowrap; }
.billing-run-heading > input { width: 130px; height: 28px; min-height: 28px; font-size: 12px; }
.billing-run-heading > select { flex: 1; min-width: 0; height: 28px; min-height: 28px; font-size: 12px; }
.billing-run-heading > button { height: 28px; min-height: 28px; font-size: 12px; }
.billing-tab-content { padding: 8px; background: #fff; flex: 1; min-height: 220px; overflow: auto; }
.import-preparation { margin: 8px; }
.import-preparation > h2 { font-size: 18px; }
.import-preparation > p { margin: 6px 0 12px; }
.import-preparation .source-file-picker { display: flex; gap: 8px; margin-bottom: 10px; }
.source-file-picker > input { flex: 1; }
.import-preparation hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0 14px; }
.import-preparation > select { width: 100%; display: block; margin: 8px 0 0; }
.price-list-label { display: block; margin: 12px 0 4px; }
.import-preparation .price-list-label + select { margin-top: 0; }
.import-preparation .process-path { margin-top: 16px; }
.section-command-heading, .maintenance-heading, .exchange-toolbar, .exchange-scope, .runs-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.section-command-heading h2 { margin: 0; }
.dqm-actions { margin: 8px 0 6px; }
.dqm-layout { display: flex; gap: 8px; min-width: 0; }
.dqm-check-list { width: 280px; flex-shrink: 0; overflow: auto; }
.dqm-layout > div:last-child { min-width: 0; flex: 1; }
.dqm-check-list details { padding: 8px; background: #f1f5f9; margin-bottom: 8px; border-radius: 5px; }
.dqm-check-list summary { cursor: pointer; }
.dqm-check-list summary strong, .dqm-check-list small { display: block; }
.dqm-check-list small { margin-top: 3px; font-size: 11px; }
.dqm-check-list details.active { border-left: 3px solid var(--blue); }
.blocking-check { color: #b45309; }
.billing-state { padding: 8px 5px; border: 1px solid #dfe5eb; border-radius: 6px; margin-bottom: 5px; }
.billing-state button { min-height: 28px; padding: 4px 8px; }
.results-tabs { margin-top: 0; }
.completion-summary { color: #596579; font-size: 12px; margin-bottom: 5px; }
.completion-actions { margin: 0 0 5px; }
.page-info { border: 1px solid #dbe1e8; border-radius: 5px; background: #f5f7f9; margin-top: 6px; }
.page-info summary { padding: 5px 10px; font-size: 11px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-info summary strong { margin-right: 10px; }
.page-info-body { padding: 3px 10px 8px; max-height: 280px; overflow: auto; resize: vertical; font-size: 12px; }
.page-info-body > p { white-space: pre-wrap; }
.workflow-footer { margin-top: 7px; align-items: center; }
.workflow-footer .spinner { width: 18px; height: 18px; margin-right: auto; }
.web-explorer { border: 0; border-radius: 0; margin: 0; overflow: visible; }
.explorer-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin-bottom: 3px; }
.explorer-toolbar button { min-height: 28px; padding: 4px 9px; font-size: 12px; }
.explorer-search { display: block; padding: 0; margin: 0; }
.explorer-search input { width: 185px; min-width: 140px; height: 28px; min-height: 28px; padding: 4px 7px; }
.explorer-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.explorer-presets span { margin-right: 4px; font-size: 11px; }
.explorer-presets button { font-size: 11px; padding: 3px 8px; min-height: 25px; }
.explorer-presets button.active { color: var(--blue); background: #e8effd; border-color: var(--blue); }
.explorer-body { display: grid; grid-template-columns: minmax(0,1fr); min-width: 0; }
.explorer-body.with-info { grid-template-columns: minmax(0,1fr) 320px; gap: 8px; }
.explorer-info { border: 1px solid #d9e1ea; padding: 10px; border-radius: 5px; background: #fff; min-width: 0; max-height: 65dvh; overflow: auto; }
.explorer-info > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.explorer-info > header button { min-height: 24px; padding: 2px 6px; }
.explorer-info > select, .explorer-info > input { display: block; width: 100%; margin-top: 6px; }
.explorer-info > p { margin: 10px 0; font-size: 11px; color: var(--muted); }
.explorer-info .actions { margin: 6px 0 0; flex-wrap: wrap; }
.explorer-info .actions button { font-size: 12px; }
.explorer-info .web-explorer { margin-top: 8px; }
.explorer-info .explorer-scroll { height: 280px; }
.explorer-scroll { border: 1px solid var(--line); height: 420px; }
.shared-grid td { height: var(--grid-row-height,26px); }
.shared-grid td > input:not([type=checkbox]) { height: var(--grid-input-height,25px); min-height: 0; }
.shared-grid td > span { min-height: var(--grid-input-height,25px); padding-top: 3px; padding-bottom: 3px; }
.explorer-footer { border: 0; padding: 4px 0 0; }
.popup-shield { position: fixed; inset: 0; z-index: 90; }
.anchored-popup { position: fixed; right: auto; max-width: 360px; }
.filter-dialog { width: 360px; padding: 14px; border: 1px solid #dce2ea; border-radius: 8px; box-shadow: 0 6px 24px #17334d22; }
.filter-dialog .select-all { display: flex; align-items: center; gap: 6px; }
.filter-dialog .filter-values { height: 240px; }
.context-menu { z-index: 95; }
.grid-checkbox, .shared-grid td > input[type=checkbox] { width: 20px; min-width: 20px; height: 20px; padding: 0; margin: 3px auto; display: block; accent-color: var(--blue); }
.maintenance-page { padding: 20px; min-height: 0; flex: 1; }
.maintenance-heading { margin-bottom: 16px; }
.maintenance-split { display: flex; gap: 0; min-height: 360px; min-width: 0; }
.catalog { width: 300px; min-width: 150px; flex-shrink: 0; padding: 0; resize: none; overflow: auto; border: 0; background: #fff; display: flex; flex-direction: column; }
.catalog-tree { flex: 1; padding: 0; }
.catalog summary { display: flex; align-items: center; gap: 8px; font-weight: 600; padding: 4px; }
.catalog .nav-icon { width: 17px; height: 17px; }
.catalog .nav-icon, .configuration-tree .nav-icon { font-size: 17px; width: 17px; height: 17px; }
.catalog .tree-summary, .configuration-tree .tree-summary {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
}
.tree-summary::-webkit-details-marker { display: none; }
.tree-summary > .nav-icon { margin-right: 8px; }
.tree-summary > .nav-icon.tree-chevron {
    width: 16px;
    height: 16px;
    font-size: 12px;
    margin: 0 4px 0 0;
    transform-origin: center;
}
details[open] > .tree-summary > .tree-chevron { transform: rotate(90deg); }
.catalog details > .table-link { padding-left: 24px; }
.catalog .table-link { background: transparent; }
.catalog .table-link:hover { background: #edf2f9; }
.catalog .table-link.active { background: #e8f0fd; }
.catalog details > details { margin-left: 20px; }
.configuration-tree details > label { margin-left: 24px; }
.catalog-note { font-size: 12px; margin: 10px 4px 0; padding: 0; }
.table-panel { min-width: 0; flex: 1; padding: 0; background: #fff; }
.maintenance-table-title { margin: 0 0 12px; font-size: 18px; }
.table-toolbar { margin-bottom: 8px; gap: 8px; align-items: center; display: flex; flex-wrap: wrap; }
.table-toolbar .sql-search { display: flex; align-items: center; padding: 0; flex: 1 1 320px; gap: 6px; }
.table-toolbar .sql-search label { margin-right: 2px; white-space: nowrap; }
.table-toolbar .sql-search input { width: 100%; min-width: 100px; }
.table-toolbar > .actions { flex-shrink: 0; }
.layout-divider { width: 16px; flex-shrink: 0; cursor: col-resize; touch-action: none; background: linear-gradient(to right,#e3e6ec 2px,transparent 2px); }
.layout-divider:hover, .layout-divider.dragging { background: linear-gradient(to right,var(--blue) 2px,transparent 2px); }
.table-browser .catalog { width: 270px; }
.table-browser .catalog h2 { font-size: 17px; margin-bottom: 10px; }
.table-browser .catalog > input { margin-bottom: 8px; }
.table-browser-controls { margin-bottom: 12px; }
.table-browser-controls select { width: 135px; }
.configuration-dialog { width: min(800px,94vw); height: auto; max-height: 90dvh; }
.configuration-dialog > h2 { margin-bottom: 12px; }
.config-search { display: flex; gap: 8px; margin: 0 0 12px; }
.config-search input { flex: 1; }
.configuration-tree { height: 400px; flex: none; padding: 8px; border: 1px solid var(--line); }
.configuration-save { display: flex; justify-content: flex-end; margin-top: 12px; }
.configuration-dialog > footer { border-top: 1px solid var(--line); padding-top: 12px; }
.exchange-heading { margin-bottom: 12px; }
.exchange-heading h1 { margin: 0; }
.exchange-heading p { margin: 6px 0 0; color: var(--muted); }
.exchange-toolbar { margin-bottom: 10px; }
.exchange-toolbar select { flex: 1; min-width: 300px; }
.exchange-files { background: #fff; border: 1px solid var(--line); flex: 1; overflow: auto; min-height: 200px; }
.exchange-grid { width: 100%; border-collapse: collapse; }
.exchange-grid th { text-align: left; padding: 7px 5px; background: #f1f3f6; font-weight: 600; border-bottom: 1px solid var(--line); }
.exchange-grid th:nth-child(2) { width: 80px; }
.exchange-grid th:nth-child(3) { width: 145px; }
.exchange-grid th:nth-child(4) { width: 340px; }
.exchange-grid td { padding: 5px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.exchange-grid small { display: block; margin-top: 4px; font-size: 11px; }
.exchange-grid tr.selected { background: #e8effd; }
.exchange-grid .row-actions { flex-wrap: nowrap; gap: 4px; }
.row-actions button { font-size: 11px; padding: 4px 7px; }
.success-text { color: #14733b; font-weight: 600; }
.exchange-progress { margin: 10px 0 8px; }
.exchange-scope p { margin: 0; }
.exchange-scope small { font-size: 11px; }
.exchange-detail-dialog { width: min(1250px,95vw); max-width: none; height: min(760px,94dvh); padding: 18px; overflow: auto; }
.exchange-detail-dialog > header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.exchange-detail-dialog > header > button { background: transparent; border: 0; }
.exchange-detail-dialog > .actions { margin-bottom: 10px; }
.exchange-detail-dialog .explorer-scroll { height: 260px; }
.exchange-detail-dialog > .process-tabs + .web-explorer .explorer-scroll { height: 180px; }
.runs-heading { margin-bottom: 12px; }
.runs-heading p { color: var(--muted); margin: 5px 0 0; }
.runs-toolbar { margin-bottom: 10px; }
.runs-toolbar > input { flex: 1; }
.runs-table .explorer-scroll { height: 180px; }
.run-selection-summary { margin: 10px 0; }
.run-detail-fields { padding: 12px; overflow: auto; }
.run-detail-fields > p { color: var(--muted); }
.run-detail-fields dl { display: grid; grid-template-columns: 225px 1fr; gap: 7px 14px; }
.run-detail-fields dt { color: var(--muted); }
.run-detail-fields dd { margin: 0; }
.shell-log-dock { min-height: 0; padding: 12px 12px 12px 0; display: grid; grid-template-columns: minmax(0,1fr); gap: 6px; }
.shell-log-dock.both-logs { grid-template-columns: 1fr 1fr; }
.shell-log-panel { background: #f6f8fb; border: 1px solid #dfe6ef; border-radius: 6px; padding: 12px; min-width: 0; overflow: auto; }
.shell-log-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.shell-log-panel > header button { font-size: 12px; }
.log-scope { display: flex; align-items: center; gap: 6px; margin: 9px 0 4px; }
.log-scope-label { font-size: 12px; color: var(--muted); }
.process-log-entries article { padding: 9px 0; border-bottom: 1px solid #e2e8f0; }
.process-log-entries time { display: block; font-size: 11px; color: var(--muted); }
.process-log-entries strong { display: block; font-size: 12px; margin: 3px 0; }
.process-log-entries p { font: 11px Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.shell-log-panel .explorer-scroll { height: 32dvh; }
.error-details-dialog { width: min(840px,94vw); max-width: none; padding: 24px 28px; }
.error-details-dialog h2 { font-size: 22px; margin-bottom: 20px; }
.error-details-text { height: 340px; font: 12px Consolas, monospace; background: #fff; }
.error-details-dialog footer > span { margin-right: auto; font-size: 12px; color: var(--muted); }
@media (max-width: 900px) {
    .home-workspace-row { grid-template-columns: 1fr; }
    .explorer-body.with-info { grid-template-columns: minmax(0,1fr) 260px; }
    .billing-run-heading { flex-wrap: wrap; }
    .billing-run-heading > select { flex-basis: 50%; }
}
