/* Shared compact presentation. Existing data, controls, and permission checks stay in their modules. */
body.compact-ui{--compact-control:28px;--compact-row:30px;--compact-label:100px;font-size:12px}
body.compact-ui.platform-space #page-title{font-size:20px;line-height:1.4}
body.compact-ui.platform-space #filters :is(.search,button[type=submit],button[name=filter-submit],#simple-filter-reset),
body.compact-ui.platform-space #filters #platform-extra-filters>summary{height:28px;min-height:28px;padding:3px 7px;font-size:12px}
body.compact-ui.platform-space #filters .search{display:flex;align-items:center;flex-direction:row;padding:0 6px}
body.compact-ui.platform-space #filters .simple-category{min-height:28px;padding:3px 7px}
body.compact-ui .full-filter-options label{flex-direction:row;justify-content:flex-start;align-items:center}
body.compact-ui.platform-space{--ps-header-height:48px;--ps-context-height:34px;--ps-sidebar-width:166px;font-size:12px}
body.compact-ui button{min-height:28px;padding:3px 8px;font-size:12px;border-radius:4px}
body.compact-ui :is(#workspace,dialog,.dialog,.login-panel,main,.content) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select){height:var(--compact-control);min-height:var(--compact-control);padding:3px 6px;font-size:12px;line-height:1.5;min-width:0}
body.compact-ui :is(#workspace,dialog,.dialog,.login-panel,main,.content) textarea{height:40px;min-height:40px;padding:3px 6px;font-size:12px;line-height:1.5;resize:vertical}
body.compact-ui :is(input[type=checkbox],input[type=radio]){width:14px;height:14px;min-height:0;padding:0;flex:0 0 14px;vertical-align:middle}
body.compact-ui :is(h1,.heading h1){font-size:20px;line-height:1.4;letter-spacing:0}
body.compact-ui h2{font-size:14px;line-height:1.5}
body.compact-ui h3{font-size:13px;line-height:1.5}
body.compact-ui :is(.page-heading,.heading,.settings-toolbar,.ads-page-heading){min-height:30px;gap:7px;margin:0 0 7px;align-items:center;flex-wrap:wrap}
body.compact-ui :is(.heading-copy,.heading-actions,.ads-page-heading>div){display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
body.compact-ui :is(.heading-copy p,.heading p,.ads-page-heading p){margin:0;font-size:11px;line-height:1.5}
body.compact-ui :is(.topbar,.workspace-header){height:48px;min-height:48px;padding:0 12px;gap:12px}
body.compact-ui :is(.brand,.workspace-brand){font-size:16px;gap:7px;min-width:0}
body.compact-ui :is(.brand-mark,.brand-image-frame){width:28px;height:28px;border-radius:5px}
body.compact-ui .brand-image-frame>img{width:38px;height:38px;left:-4.9px;top:-5.1px}
body.compact-ui #platform-top-nav{gap:3px;min-height:0}
body.compact-ui #platform-top-nav :is(button,a){font-size:13px;min-height:46px;padding:0 9px;gap:5px}
body.compact-ui #platform-top-nav :is(img,.platform-logo){width:21px;height:21px;flex-basis:21px}
body.compact-ui :is(.top-meta,.workspace-return){font-size:11px;gap:8px}
body.compact-ui #platform-context{min-height:34px;padding:0 12px;gap:12px}
body.compact-ui :is(.platform-context-title,.platform-context-links){min-height:33px;gap:8px;font-size:12px}
body.compact-ui .platform-context-links :is(button,a){min-height:28px;font-size:12px;padding:3px 8px}
body.compact-ui #main-content{padding:8px 12px 0}
body.compact-ui :is(main,.content){padding:8px 12px;min-width:0}
body.compact-ui :is(.sidebar,#simple-order-sidebar){padding:9px 7px}
body.compact-ui :is(.sidebar button,.sidebar a,.platform-heading){min-height:30px;padding:4px 7px;gap:6px;font-size:12px}
body.compact-ui :is(.platform-shop-list button,.platform-shop-item){min-height:28px;padding:3px 7px;font-size:11px}
body.compact-ui :is(.platform-heading .platform-logo,.sidebar .platform-logo){width:21px;height:21px;flex-basis:21px}
body.compact-ui :is(.filters,.dw-filters,.debug-income-toolbar,.ads-period-controls,.receipt-filters){gap:4px;align-items:center;flex-wrap:wrap;margin-bottom:6px}
body.compact-ui .filters :is(button,.primary),body.compact-ui .ads-period-controls>button{height:28px;min-height:28px;padding:3px 8px}
body.compact-ui :is(.search,.search-field){height:28px;min-height:28px;padding:0 6px;gap:5px}
body.compact-ui :is(.search,.search-field) input{height:26px;min-height:26px;padding:0;font-size:12px}
body.compact-ui :is(.search img,.search-field img){width:15px;height:15px}
body.compact-ui :is(.filters label,.ads-period-controls label){gap:4px;font-size:11px}
body.compact-ui :is(.bi-presets,.xianyu-ads-span-switch){padding:0;gap:0;min-height:28px}
body.compact-ui :is(.bi-presets label,.bi-presets span,.xianyu-ads-span-switch button){min-height:28px;padding:3px 8px;font-size:11px;line-height:20px}
body.compact-ui :is(.steps,.tabs,.receipt-status-tabs,.status-filter-line,.simple-category-list){min-height:28px;margin-bottom:5px}
body.compact-ui :is(.step,.tab,.status-chip){min-height:28px;padding:3px 8px;font-size:12px;gap:5px}
body.compact-ui .step-content{gap:1px}
body.compact-ui .step strong{font-size:16px}
body.compact-ui .step .step-number{width:20px;height:20px;font-size:11px}
body.compact-ui :is(.list-context,.status-filter-summary,.source-scope-note,.receipt-rule,.bi-xianyu-note,.ads-archive-note){font-size:11px;line-height:1.5;margin:4px 0}
body.compact-ui :is(.sync-banner,.source-sync-panel,.selection-bar,.selection){min-height:26px;padding:4px 7px;gap:6px;margin-bottom:5px;font-size:11px}
body.compact-ui :is(.pager,.pagination,.ads-history-pagination){padding:7px 2px;min-height:34px;gap:7px;font-size:11px}
body.compact-ui :is(.pager>div,.page-buttons,.ads-history-pagination>div){gap:6px}
body.compact-ui :is(.pager button,.pagination button,.ads-history-pagination button){min-height:25px;padding:2px 6px;font-size:11px}
body.compact-ui #page-label{padding:3px 6px;font-size:11px}
body.compact-ui :is(.empty,.dw-empty){min-height:0;padding:24px 12px}
body.compact-ui :is(.empty p,.dw-empty p){margin:6px 0;font-size:12px}
/* All tabular views use the same row rhythm; explicit expanded records remain readable. */
body.compact-ui :is(#workspace,.content,dialog,.dialog) table{font-size:12px;line-height:18px}
body.compact-ui :is(#workspace,.content,dialog,.dialog) th{height:28px;padding:3px 7px;font-size:11px;line-height:18px}
body.compact-ui :is(#workspace,.content,dialog,.dialog) td{height:30px;padding:1px 7px;font-size:12px;line-height:18px;vertical-align:middle;font-variant-numeric:tabular-nums}
body.compact-ui :is(#workspace,.content,dialog,.dialog) td button{min-height:24px;height:24px;padding:1px 5px;font-size:11px;line-height:18px}
body.compact-ui :is(.order-table .row-actions,.decisionActions){height:26px;gap:4px;flex-wrap:nowrap}
body.compact-ui :is(.platform-order-identity,.settlement-order) .platform-logo{width:21px;height:21px;flex-basis:21px;border-radius:4px}
body.compact-ui .platform-order-identity>div{gap:5px}
body.compact-ui .platform-order-identity>div>span{flex-direction:row;align-items:baseline;gap:6px}
body.compact-ui .platform-order-identity :is(strong,small){display:inline;font-size:12px;line-height:18px;white-space:nowrap}
body.compact-ui .platform-order-identity small{font-size:11px}
body.compact-ui :is(.order-table,.bindings-table,.staff-table,.receipt-table,.ads-history table,.tablewrap table) :is(th,td){padding-top:1px;padding-bottom:1px}
body.compact-ui :is(.order-table td,.tablewrap td,.receipt-table td){white-space:nowrap}
body.compact-ui :is(.badge,.source-status){min-width:0;font-size:11px;padding:1px 5px;line-height:18px}
body.compact-ui .order-table button.sku-name{font-size:12px;line-height:18px;padding:1px 0}
/* Compact summaries carry labels and values on one baseline rather than tall cards. */
body.compact-ui :is(.bi-kpis,.receipt-kpis,.profit-kpis,.debug-kpis,.ads-period-summary){gap:0;padding:0;min-height:52px;margin-bottom:7px}
body.compact-ui :is(.bi-kpis,.receipt-kpis,.profit-kpis,.debug-kpis)>section,
body.compact-ui #xianyu-ads-panel .ads-period-summary>div{display:flex;align-items:baseline;justify-content:center;flex-wrap:wrap;gap:4px 6px;min-height:52px;padding:5px 9px}
body.compact-ui :is(.bi-kpis,.receipt-kpis,.profit-kpis,.debug-kpis) :is(span,small),
body.compact-ui #xianyu-ads-panel .ads-period-summary :is(span,small){font-size:11px;line-height:1.4;margin:0}
body.compact-ui :is(.bi-kpis,.receipt-kpis,.profit-kpis,.debug-kpis) strong,
body.compact-ui #xianyu-ads-panel .ads-period-summary strong{font-size:18px;line-height:1.3;margin:0;letter-spacing:0}
body.compact-ui #xianyu-receivable-kpis>section{display:grid;grid-template-columns:minmax(0,1fr) auto;align-content:start;justify-content:stretch;gap:3px 5px;padding:6px 8px}
body.compact-ui #xianyu-receivable-kpis>section>small{grid-column:1/-1}
body.compact-ui #xianyu-receivable-kpis .receivable-kpi-details{grid-column:1/-1;display:grid;gap:2px;margin:3px 0 0;padding:0}
body.compact-ui #xianyu-receivable-kpis .receivable-kpi-details>div{display:flex;align-items:baseline;justify-content:space-between;gap:5px;padding:0;min-width:0}
body.compact-ui #xianyu-receivable-kpis .receivable-kpi-details :is(dt,dd){margin:0;font-size:11px;line-height:1.5;min-width:0;overflow-wrap:anywhere}
body.compact-ui #xianyu-receivable-kpis .receivable-kpi-details dd{text-align:right}
body.compact-ui #xianyu-receivable-kpis .receivable-kpi-foot{grid-column:1/-1;margin:3px 0 0;font-size:11px;line-height:1.5}
body.compact-ui :is(.bi-block,.debug-card,.profit-card){padding:8px 10px;margin-bottom:7px;border-radius:4px}
body.compact-ui :is(.bi-block-title,.debug-card-title,.profit-card-title){gap:7px;margin-bottom:6px}
body.compact-ui :is(.bi-block-title,.debug-card-title,.profit-card-title) :is(h2,h3){font-size:13px}
body.compact-ui :is(.bi-block-title,.debug-card-title,.profit-card-title) p{font-size:11px;margin:0}
body.compact-ui :is(.bi-bottom-grid,.debug-bottom-grid,.debug-main-grid,.profit-work-grid){gap:8px}
body.compact-ui #xianyu-ads-panel{padding-bottom:8px}
body.compact-ui #xianyu-ads-panel :is(.ads-period-toolbar,.ads-history-heading){padding:4px 8px;margin:0}
body.compact-ui #xianyu-ads-panel :is(.ads-overview-heading,.ads-coverage){padding:5px 8px;gap:6px}
body.compact-ui #xianyu-ads-panel .xianyu-ads-trend{margin:7px 0;padding:7px 9px 5px;border-radius:4px}
body.compact-ui #xianyu-ads-panel .xianyu-ads-trend-head{margin-bottom:5px}
body.compact-ui #xianyu-ads-panel .xianyu-ads-chart-box{height:174px;min-height:160px}
body.compact-ui #xianyu-ads-panel .xianyu-ads-chart-note{margin:4px 0 0;font-size:11px}
body.compact-ui #xianyu-ads-panel :is(.ads-history h2,.xianyu-ads-trend h2){font-size:13px}
body.compact-ui #xianyu-ads-panel .ads-history-tools{gap:5px}
body.compact-ui #xianyu-ads-panel :is(.ads-history-tools button,.xianyu-ads-metric-switch button,.xianyu-ads-span-switch button){height:28px;min-height:28px;padding:3px 8px}
/* Debug hall, tasks, and personnel share the same spacing and typography. */
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-workspace{grid-template-columns:166px minmax(0,1fr)}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-sidebar{padding:11px 7px;height:calc(100dvh - var(--ps-header-height,48px))}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-sidebar-title{font-size:13px;margin:0 7px 10px}
body.compact-ui.debug-workbench-open #debug-workbench-panel :is(.dw-nav button,.dw-sidebar-footer button){min-height:32px;padding:4px 7px;gap:7px;font-size:12px;white-space:nowrap}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-sidebar-footer{padding-top:9px;margin-top:12px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-nav-icon{width:18px;height:18px;flex-basis:18px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-nav-icon img{width:18px;height:18px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-main{padding:9px 12px;max-width:none}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-heading{flex-direction:row;align-items:center;gap:7px;margin-bottom:7px;flex-wrap:wrap}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-heading>div:first-child{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-heading h1{font-size:20px;line-height:1.4;margin:0}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-heading p{font-size:11px;line-height:1.5;margin:0}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-heading-actions{gap:4px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-heading-actions button{min-height:28px;padding:3px 8px;font-size:12px}
body.compact-ui.debug-workbench-open #debug-workbench-panel :is(.dw-summary,.dw-summary-strip){min-height:52px;padding:4px 0;margin:0 0 7px;gap:0}
body.compact-ui.debug-workbench-open #debug-workbench-panel :is(.dw-summary,.dw-summary-strip) section{display:flex;align-items:baseline;justify-content:center;flex-wrap:wrap;gap:4px 6px;padding:4px 8px;min-height:42px}
body.compact-ui.debug-workbench-open #debug-workbench-panel :is(.dw-summary,.dw-summary-strip) :is(span,small){font-size:11px;line-height:1.4;margin:0}
body.compact-ui.debug-workbench-open #debug-workbench-panel :is(.dw-summary,.dw-summary-strip) strong,
body.compact-ui.debug-workbench-open #debug-workbench-panel :is(.dw-summary,.dw-summary-strip) .dw-duration-stat strong{font-size:18px;line-height:1.4;margin:0}
body.compact-ui.debug-workbench-open #debug-workbench-panel :is(.dw-filters,.dw-record-search){gap:4px;margin:0 0 6px;align-items:center}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-filters label{font-size:11px;gap:3px;line-height:1.4}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-filters :is(input,select,button),
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-record-search :is(input,button){height:28px;min-height:28px;font-size:12px;padding:3px 6px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-filters input[type=date]{width:125px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-filters select{min-width:110px;max-width:170px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-date-separator{align-self:center;padding-bottom:0;font-size:11px}
body.compact-ui.debug-workbench-open #debug-workbench-panel :is(.dw-scope-note,.dw-footnote,.dw-update-status){font-size:11px;line-height:1.5;margin:4px 0}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-table-scroll :is(th,td){padding:1px 7px;font-size:12px;line-height:18px;height:30px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-table-scroll th{height:28px;font-size:11px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-table-scroll td small{display:inline;font-size:11px;line-height:18px;margin:0 0 0 5px;white-space:nowrap}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-order-title{gap:5px;min-width:0}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-order-title>div{display:flex;align-items:baseline;gap:5px;min-width:0}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-order-title :is(strong,small){font-size:12px;line-height:18px;margin:0;white-space:nowrap}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-order-title small{font-size:11px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-table-scroll :is(.platform-logo,img.dw-product-thumb,.dw-product-thumb img){width:22px;height:22px;flex:0 0 22px;object-fit:contain}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-product-thumb:not(img){flex-basis:22px}
body.compact-ui.debug-workbench-open #debug-workbench-panel :is(.dw-pool-title,.dw-product-copy){line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-pool-actions{flex-direction:row;align-items:center;gap:5px;white-space:nowrap}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-pool-actions button{min-height:24px;padding:1px 5px;font-size:11px;white-space:nowrap}
body.compact-ui.debug-workbench-open #debug-workbench-panel :is(.dw-status,.dw-running-time){font-size:11px;line-height:18px;padding:0 5px;white-space:nowrap}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-pagination{min-height:34px;padding:5px 8px;gap:6px;font-size:11px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-pagination button{min-height:25px;padding:2px 6px;font-size:11px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-people-layout{grid-template-columns:156px minmax(0,1fr);gap:8px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-list{min-height:0;max-height:calc(100dvh - 150px)}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-list-heading{padding:7px 8px;gap:5px;font-size:12px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-list-heading :is(h2,h3){font-size:12px}
body.compact-ui.debug-workbench-open #debug-workbench-panel #dw-person-search{width:calc(100% - 12px);height:28px;min-height:28px;margin:5px 6px;padding:3px 6px;font-size:11px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-option{min-height:44px;padding:5px 7px;gap:6px;font-size:12px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-avatar{width:26px;height:28px;flex-basis:26px;font-size:15px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-option-copy strong{font-size:12px;line-height:18px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-option-copy small{font-size:11px;line-height:15px;margin:1px 0 0}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-head{padding:7px 9px;gap:7px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-head>div:first-child{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px 8px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-head h2{font-size:16px;line-height:1.4;margin:0}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-head :is(p,small){font-size:11px;line-height:1.5;margin:0}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-stat-group{grid-template-columns:76px minmax(0,1fr);min-height:38px;margin:0 9px;padding:6px 0;gap:8px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-stat-group h3{font-size:12px;line-height:1.5}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-stat-group dl>div{display:flex;align-items:baseline;gap:3px 5px;flex-wrap:wrap;padding:0 7px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-stat-group dt{font-size:11px;line-height:1.5;margin:0}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-stat-group dd{font-size:16px;line-height:1.4;margin:0}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-stat-group small{display:inline;font-size:11px;line-height:1.5;margin:0}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent{padding:7px 9px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent h3{font-size:13px;line-height:1.5}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-heading p{font-size:11px;line-height:1.5;margin:2px 0 0}
body.compact-ui.debug-workbench-open #debug-workbench-panel :is(.dw-person-note,.dw-recent-scope){padding:5px 9px;margin:0;font-size:11px;line-height:1.5}
body.compact-ui.debug-workbench-open #debug-workbench-panel :is(.dw-person-recent-heading,.dw-person-detail-heading){padding:7px 9px;gap:6px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-record-totals{padding:7px 0;margin:0 9px;gap:8px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-record-totals>div{flex-direction:row;align-items:baseline;gap:5px;min-width:0}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-record-totals strong{font-size:18px;line-height:1.4}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-record-totals :is(p,span){font-size:11px;line-height:1.5}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-record-equation{font-size:12px;line-height:1.5}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-record-statuses{gap:3px;margin:5px 0}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-record-statuses button{min-height:27px;padding:3px 6px;font-size:11px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table td:last-child>button{display:inline-flex;margin:0 3px 0 0;min-height:24px;height:24px;padding:1px 5px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table td:nth-child(2)>.dw-status{display:inline-flex;margin:0 0 0 5px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table{min-width:1390px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table :is(th,td):nth-child(1){width:500px;max-width:none}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table :is(th,td):nth-child(2){width:180px;max-width:none}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table :is(th,td):nth-child(3){width:180px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table :is(th,td):nth-child(4){width:150px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table :is(th,td):nth-child(5){width:180px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table :is(th,td):nth-child(6){width:200px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-record-expanded td{height:auto;padding:8px;white-space:normal;overflow:visible}
/* Every native or module dialog has compact fields and a stable action footer. */
body.compact-ui :is(dialog,.dialog){font-size:12px;border-radius:5px;max-width:calc(100vw - 24px)}
body.compact-ui dialog:not(.order-drawer):not(.dw-dialog){padding:10px 12px;width:min(640px,calc(100vw - 24px))}
body.compact-ui :is(dialog form,.dialog form){gap:6px}
body.compact-ui :is(.form-grid,.dw-form-grid){grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px}
body.compact-ui :is(dialog,.dialog,.login-panel,form) label.compact-field{display:grid;grid-template-columns:var(--compact-label) minmax(0,1fr);align-items:center;gap:5px;min-width:0;min-height:28px;margin:0;font-size:11px;line-height:1.45}
body.compact-ui label.compact-field>.compact-label{min-width:0;overflow-wrap:anywhere;color:var(--muted,var(--ink))}
body.compact-ui label.compact-field>.compact-help{grid-column:2/-1;min-width:0;margin:0;line-height:1.5;overflow-wrap:anywhere}
body.compact-ui label.compact-field:has(textarea){align-items:start}
body.compact-ui label.compact-field:has(textarea)>.compact-label{padding-top:4px}
body.compact-ui :is(dialog,.dialog,form) :is(label.compact-field>input,label.compact-field>select,label.compact-field>textarea){width:100%;max-width:100%;min-width:0}
body.compact-ui :is(.dialog-heading,.drawerhead){padding:5px 0;min-height:34px;margin:0 0 6px;gap:7px}
body.compact-ui :is(.dialog-heading,.drawerhead) :is(h2,h3){font-size:14px;line-height:1.5;margin:0}
body.compact-ui :is(.drawerhead p,.dialog-heading p){font-size:11px;line-height:1.5;margin:1px 0 0}
body.compact-ui :is(.dialog-actions,.drawerfooter){min-height:35px;padding:5px 0;gap:5px;margin:6px 0 0;font-size:11px}
body.compact-ui :is(.dialog-actions,.drawerfooter) button{min-height:28px;padding:3px 8px;font-size:12px}
body.compact-ui .dialogbody{padding:8px 10px;gap:6px}
body.compact-ui .dialogbody>label.compact-field{margin-bottom:6px}
body.compact-ui .dw-dialog{width:min(640px,calc(100vw - 24px));height:fit-content;padding:0;border-radius:5px}
body.compact-ui .dw-dialog :is(.dw-dialog-heading,.dw-dialog-footer){padding:5px 10px;gap:6px;min-height:36px}
body.compact-ui .dw-dialog .dw-dialog-heading h2{font-size:14px;line-height:1.5}
body.compact-ui .dw-dialog .dw-dialog-body{padding:8px 10px}
body.compact-ui .dw-dialog .dw-dialog-footer button{min-height:28px;padding:3px 8px;font-size:12px}
body.compact-ui .dw-dialog :is(.dw-form-note,.dw-dialog-context,.dw-preview){padding:5px 7px;margin:5px 0;font-size:11px;line-height:1.5}
body.compact-ui .dw-dialog .dw-form-note{padding:0}
body.compact-ui .dw-dialog .dw-detail-grid{gap:6px 12px;margin:0 0 6px}
body.compact-ui .dw-dialog .dw-detail-grid dt{display:inline;margin:0 6px 0 0;font-size:11px}
body.compact-ui .dw-dialog .dw-detail-grid dd{display:inline;margin:0;font-size:12px;line-height:1.5}
body.compact-ui .dw-dialog :is(.dw-detail-title,.dw-detail-source){font-size:12px;line-height:1.5;margin-bottom:6px}
body.compact-ui .dw-dialog :is(.dw-note-block,.dw-events){padding-top:7px;margin:7px 0}
body.compact-ui .dw-dialog :is(.dw-note-block h3,.dw-events h3){margin-bottom:5px;font-size:12px}
body.compact-ui .dw-dialog .dw-events article{padding:5px 0}
body.compact-ui .dw-dialog .dw-plan-list{margin-top:5px}
body.compact-ui .dw-dialog .dw-plan-list article{padding:7px 0;gap:7px}
body.compact-ui .dw-dialog .dw-plan-list small{margin-top:3px;line-height:1.5}
body.compact-ui #dw-manual-form label:has(>[name=relatedMode]){grid-column:auto}
body.compact-ui .order-drawer{padding:10px 12px}
body.compact-ui .detail-section{padding:8px 0}
body.compact-ui .detail-section h3{margin-bottom:6px;font-size:12px}
body.compact-ui .detail-meta{gap:6px;font-size:12px}
body.compact-ui .event-list li{padding:5px 0;font-size:11px;line-height:1.5}
body.compact-ui .settings-toolbar{margin:5px 0 8px}
body.compact-ui .settings-actions{padding:8px 7px;gap:7px}
body.compact-ui .settings-panel h2{font-size:15px}
body.compact-ui fieldset{padding:6px 8px;gap:7px}
body.compact-ui legend{font-size:11px}
body.compact-ui .check-list{gap:5px 10px}
body.compact-ui .login-panel{margin:40px auto;width:380px;max-width:calc(100vw - 32px)}
body.compact-ui .login-panel form{gap:8px;margin-top:12px}
/* The separate goods settlement route follows the same compact shell. */
body.compact-ui .layout{min-height:calc(100vh - 82px)}
body.compact-ui .layout>.sidebar{width:166px;min-height:calc(100vh - 82px)}
body.compact-ui .balance{padding:8px 10px;gap:12px;margin-bottom:8px;min-height:52px}
body.compact-ui .balance-main{padding:0 10px 0 0}
body.compact-ui .balance-main{display:flex;align-items:baseline;gap:4px 7px;flex-wrap:wrap;min-width:0}
body.compact-ui .balance-main>strong{font-size:22px;line-height:1.3}
body.compact-ui .balance-main>span{font-size:12px;line-height:1.5}
body.compact-ui .balance-main button{min-height:24px;padding:1px 5px;font-size:11px}
body.compact-ui .equation{display:flex;align-items:center;flex-wrap:wrap;gap:6px 9px}
body.compact-ui .equation>div{display:flex;align-items:baseline;gap:4px;flex-wrap:wrap;min-width:0}
body.compact-ui .equation .equation-sign{font-size:16px}
body.compact-ui .equation strong{font-size:17px}
body.compact-ui :is(.equation span,.equation small,.all-ledger-label){font-size:11px}
body.compact-ui :is(.qualification,.toolbar){font-size:11px;margin-bottom:6px;line-height:1.5}
body.compact-ui .panel-heading{margin-bottom:6px;gap:7px}
body.compact-ui .panel-heading h2{font-size:14px}
body.compact-ui .panel-heading p{font-size:11px;margin:1px 0}
body.compact-ui :is(.ledger-preview,.ledger-note){padding:6px 8px;font-size:11px;margin:6px 0;line-height:1.5}
body.compact-ui .ledger-preview strong{font-size:16px}
@media(min-width:651px){
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-record-search{max-width:310px}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-hall-table{min-width:1360px}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-hall-table th:last-child{width:310px}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table td:first-child>.dw-order-title{display:inline-flex;vertical-align:middle;max-width:290px;height:24px}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-record-product{display:inline-flex;max-width:260px;vertical-align:middle;margin:0 0 0 6px}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-record-product strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:18px}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table .dw-product-cell{gap:5px}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table .dw-task-title{display:inline;margin:0 0 0 5px;white-space:nowrap;line-height:18px}
}
@media(max-width:1000px){
 body.compact-ui :is(.topbar,.workspace-header){gap:7px;padding-inline:8px;flex-wrap:wrap;height:auto}
 body.compact-ui #platform-top-nav :is(button,a){font-size:12px;padding-inline:6px}
 body.compact-ui :is(.bi-kpis,.receipt-kpis,.profit-kpis,.debug-kpis){grid-template-columns:repeat(2,minmax(0,1fr))}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-people-layout{grid-template-columns:140px minmax(0,1fr)}
}
@media(max-width:650px){
 body.compact-ui.platform-space{--ps-header-height:94px;--ps-sidebar-width:166px}
 body.compact-ui :is(.topbar,.workspace-header){min-height:48px;padding:4px 8px 0}
 body.compact-ui :is(.top-meta,.workspace-return){font-size:11px}
 body.compact-ui #platform-top-nav{min-height:44px;flex-basis:100%;order:3;gap:2px}
 body.compact-ui #platform-top-nav :is(button,a){min-height:44px;padding-inline:6px;font-size:11px}
 body.compact-ui :is(.page-heading,.heading,.ads-page-heading){gap:6px;align-items:flex-start}
 body.compact-ui :is(.heading-copy,.heading-actions,.ads-page-heading>div){gap:5px}
 body.compact-ui :is(main,.content,#main-content){padding:7px 8px}
 body.compact-ui :is(.form-grid,.dw-form-grid){grid-template-columns:minmax(0,1fr);gap:7px}
 body.compact-ui :is(dialog,.dialog,.login-panel,form) label.compact-field{grid-template-columns:minmax(0,1fr);gap:3px}
 body.compact-ui label.compact-field>.compact-help{grid-column:1/-1}
 body.compact-ui label.compact-field:has(textarea)>.compact-label{padding-top:0}
 body.compact-ui :is(dialog,.dialog){max-width:calc(100vw - 16px)}
 body.compact-ui dialog:not(.order-drawer):not(.dw-dialog){width:calc(100vw - 16px);padding:8px 10px}
 body.compact-ui .dw-dialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);height:fit-content}
 body.compact-ui :is(.dialog-actions,.drawerfooter){flex-wrap:wrap}
 body.compact-ui .drawerfooter>div{margin-left:auto}
 body.compact-ui .layout>.sidebar{width:100%;min-height:0}
 body.compact-ui .balance{grid-template-columns:minmax(0,1fr);gap:8px}
 body.compact-ui .balance-main{padding:0 0 7px}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-workspace{grid-template-columns:minmax(0,1fr)}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-sidebar{height:auto;position:static;display:flex;flex-direction:row;align-items:center;gap:5px;padding:5px 7px}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-sidebar-title{display:none}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-nav{display:flex;flex-direction:row;gap:3px;flex:1;min-width:0;overflow-x:auto}
 body.compact-ui.debug-workbench-open #debug-workbench-panel :is(.dw-nav button,.dw-sidebar-footer button){width:auto;padding:5px 7px;white-space:nowrap;font-size:11px}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-sidebar-footer{margin:0;padding:0 0 0 5px;max-width:none;flex:0 0 auto}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-main{padding:7px 8px}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-heading{align-items:flex-start;gap:6px}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-people-layout{grid-template-columns:minmax(0,1fr);gap:7px}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-list{max-height:none}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-options{display:flex;overflow-x:auto;flex:none}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-option{flex:0 0 auto;width:auto;max-width:190px;border-right:1px solid var(--dw-line)}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-stat-group dl{grid-template-columns:minmax(0,1fr)}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-stat-group dl:has(>div:nth-child(4)){grid-template-columns:repeat(2,minmax(0,1fr))}
 body.compact-ui.debug-workbench-open #debug-workbench-panel #dw-task-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-filters input[type=date]{width:100%;min-width:0}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-filters input[type=search]{width:100%;min-width:0}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-filters select{min-width:0;max-width:100%}
 body.compact-ui.debug-workbench-open #debug-workbench-panel :is(.dw-summary,.dw-summary-strip){display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 body.compact-ui.debug-workbench-open #debug-workbench-panel :is(.dw-summary,.dw-summary-strip) section{min-width:0;border:0;padding:5px}
}
@media(max-width:650px),(pointer:coarse){
 body.compact-ui.platform-space #filters :is(.search,button[type=submit],button[name=filter-submit],#simple-filter-reset),
 body.compact-ui.platform-space #filters #platform-extra-filters>summary{min-height:44px;height:44px;font-size:16px}
 body.compact-ui{--compact-control:44px;--compact-row:48px}
 body.compact-ui button,
 body.compact-ui :is(#workspace,.content,dialog,.dialog) td button,
 body.compact-ui.debug-workbench-open #debug-workbench-panel :is(.dw-heading-actions button,.dw-filters button,.dw-record-search button,.dw-record-statuses button,.dw-pagination button,.dw-pool-actions button,.dw-person-recent-table td:last-child>button),
 body.compact-ui #xianyu-ads-panel :is(.ads-history-tools button,.xianyu-ads-metric-switch button,.xianyu-ads-span-switch button),
 body.compact-ui .dw-dialog .dw-dialog-footer button{min-height:44px;height:auto;padding:6px 8px}
 body.compact-ui :is(#workspace,dialog,.dialog,.login-panel,main,.content) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select),
 body.compact-ui.debug-workbench-open #debug-workbench-panel :is(.dw-filters input,.dw-filters select,.dw-record-search input,#dw-person-search){min-height:44px;height:44px;font-size:16px}
 body.compact-ui :is(#workspace,dialog,.dialog,.login-panel,main,.content) textarea{height:60px;min-height:60px;font-size:16px}
 body.compact-ui :is(.search,.search-field){height:44px;min-height:44px}
 body.compact-ui :is(.search,.search-field) input{height:42px;min-height:42px;font-size:16px}
 body.compact-ui :is(.check,.dw-check,label:has(>input[type=checkbox]),label:has(>input[type=radio])){min-height:44px}
 body.compact-ui :is(#workspace,.content,dialog,.dialog) td,
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-table-scroll td{height:48px;min-height:48px}
 body.compact-ui :is(.order-table .row-actions,.decisionActions){height:44px}
}

/* Give identity and supporting information separate, bounded reading lines. */
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table{min-width:1200px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table :is(th,td):nth-child(1){width:460px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table :is(th,td):nth-child(2){width:160px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table :is(th,td):nth-child(3){width:150px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table :is(th,td):nth-child(4){width:130px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table :is(th,td):nth-child(5){width:160px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table :is(th,td):nth-child(6){width:140px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table tbody tr[data-dw-record-row]>td{height:44px;padding:3px 7px;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table .dw-record-summary{display:flex;flex-direction:column;gap:2px;min-width:0;max-width:100%;overflow:hidden}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table :is(.dw-record-primary,.dw-record-secondary){display:flex;align-items:center;gap:6px;min-width:0;max-width:100%;height:17px;overflow:hidden;white-space:nowrap}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table .dw-record-primary .platform-logo{width:18px;height:18px;flex:0 0 18px;margin:0;border-radius:3px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table :is(.dw-record-number,.dw-record-shop,.dw-record-title,.dw-record-context){display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:17px;margin:0}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table .dw-record-number{flex:0 1 auto;max-width:270px;font-size:12px;font-weight:600}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table .dw-record-shop{flex:0 1 105px;font-size:11px;color:var(--dw-muted)}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table .dw-record-id{flex:0 0 auto;font-size:11px;line-height:17px;color:var(--dw-muted);margin-left:auto}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table .dw-record-title{flex:1 1 180px;font-size:12px;font-weight:400}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table .dw-record-context{flex:0 1 160px;font-size:11px;color:var(--dw-muted)}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table tbody tr[data-dw-record-row]>td>small{display:block;max-width:100%;margin:1px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:16px;color:var(--dw-muted)}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table tbody tr[data-dw-record-row]>td:nth-child(2)>strong{display:inline-block;max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table tbody tr[data-dw-record-row]>td:nth-child(2)>.dw-status{vertical-align:middle;margin:0 0 0 5px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table tbody tr[data-dw-record-row]>td:nth-child(3)>strong{display:block;line-height:17px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table tbody tr[data-dw-record-row]>td>time{display:block;font-size:11px;line-height:17px}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table .dw-record-expanded :is(p,span,li){overflow-wrap:anywhere;white-space:normal}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table :is(thead th:last-child,tbody tr[data-dw-record-row]>td:last-child){position:sticky;right:0;z-index:1;background:var(--surface);border-left:1px solid var(--dw-line)}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table thead th:last-child{z-index:2;background:var(--table-head)}
/* The same text boundaries protect the hall, task list, and main order list. */
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-order-title>div{min-width:0;overflow:hidden}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-order-title strong{flex:0 0 auto;min-width:0;max-width:min(250px,100%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-order-title small{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.compact-ui.platform-space .platform-order-identity>div{min-width:0;overflow:hidden}
body.compact-ui.platform-space .platform-order-identity>div>strong{flex:0 0 auto;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis}
body.compact-ui.platform-space .platform-order-identity>div>span{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
body.compact-ui .xianyu-receivable-table .xianyu-receivable-trade-state{display:block;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:18px}
@media(max-width:650px),(pointer:coarse){
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table tbody tr[data-dw-record-row]>td{height:52px;padding:4px 7px}
 body.compact-ui.debug-workbench-open #debug-workbench-panel .dw-person-recent-table td:last-child>button{min-height:44px;height:44px}
}
