/* PowerBuilder layout reconstruction: real PBU control relationships, projected to CSS.
   Designer geometry is observed; runtime theme/DPI and database visibility remain variable. */
.pb-restored{--font-body:"Microsoft YaHei","微软雅黑","SimSun",sans-serif;--font-number:"Consolas","Microsoft YaHei",monospace;--color-page:#e9edf1;--color-paper:#fff;--color-sidebar:#edf3f9;--color-sidebar-muted:#243d54;--color-sidebar-line:#c3cfdb;--color-sidebar-hover:#d6e7f6;--color-text:#20272d;--color-heading:#172f48;--color-muted:#52677b;--color-border:#bdcad7;--color-line:#dbe2ea;--color-accent:#24669e;--color-accent-dark:#1b507e;--color-accent-soft:#e4f0fb;--color-selected:#d9ebfc;--color-focus:#276eaf;--color-shade:#eef3f8;--legacy-strip:#dde6ef;--legacy-grid-header:#e7edf4;--legacy-input-border:#aebdcc;--legacy-divider:#a0b4c7;--legacy-caption:#cbdceb;--legacy-title:#e0eaf4;--legacy-field-label:#eff3f7;--legacy-readonly:#f1f2f3;--radius:1px;--shadow:0 4px 20px var(--color-shadow);font-size:12px}
.pb-restored button,.pb-restored input,.pb-restored select,.pb-restored textarea{font-size:12px}
.pb-restored .button{border-radius:2px;padding:5px 10px;min-height:28px;line-height:1.3;box-shadow:none;white-space:nowrap}
.pb-restored .button.small{padding:3px 9px;min-height:26px;font-size:12px}
.pb-restored .icon-button{width:27px;height:27px;border-radius:1px}
.pb-restored .icon{width:15px;height:15px}
.pb-restored .brand,.pb-restored .workspace-label,.pb-restored .sidebar-bottom,.pb-restored .page-heading,.pb-restored .summary-strip{display:none}
.pb-restored .sidebar{left:calc(100vw * 9 / 4740);top:83px;width:calc(100vw * 800 / 4740);flex-basis:calc(100vw * 800 / 4740);bottom:27px;padding:0;background:var(--color-paper);border:1px solid var(--color-border);color:var(--color-text);z-index:5;overflow:auto}
.pb-restored .main-shell{margin-left:calc(100vw * 827 / 4740);width:calc(100% - 100vw * 827 / 4740)}
.pb-restored .topbar{height:34px;padding:0 10px;background:var(--legacy-title);border-bottom:1px solid var(--color-border);position:fixed;left:0;right:0;top:0;z-index:6}
.pb-restored .breadcrumb{font-size:12px;color:var(--color-heading)}
.pb-restored .topbar-right{gap:8px}.pb-restored .user-avatar{width:24px;height:24px;font-size:11px}.pb-restored .environment-tag{font-size:10px;border:0;background:none}
.pb-restored main{padding:0 4px 0 0;margin-top:83px;min-width:0}
.legacy-library-toolbar{height:49px;position:fixed;top:34px;left:0;right:0;display:flex;gap:4px;align-items:center;padding:5px 10px;border-bottom:1px solid var(--color-border);background:var(--color-shade);z-index:6}
.legacy-library-toolbar .toolbar-label{font-size:13px;font-weight:600;margin-right:14px}
.legacy-library-toolbar .button{border-color:transparent;background:transparent;min-height:32px}.legacy-library-toolbar .button:hover{background:var(--color-selected);border-color:var(--color-border)}
.pb-restored .library-panel{border-radius:0;border:1px solid var(--color-border);box-shadow:none;margin:0}
.pb-restored .panel-tabs{min-height:30px;padding:0 7px;gap:15px;background:var(--color-shade);border-bottom:1px solid var(--color-border)}
.pb-restored .panel-tab{font-size:12px;padding:7px 0 5px}.pb-restored .panel-caption{font-size:11px}
.pb-restored .filterbar{padding:5px;gap:5px;flex-wrap:wrap;border-bottom:1px solid var(--color-border)}
.pb-restored .filterbar .search-field{height:28px;flex:1;min-width:150px;max-width:350px;border-radius:1px}
.pb-restored .filterbar select{height:28px;min-width:92px;border-radius:1px;padding:3px 5px}
.pb-restored .filter-actions{gap:4px;margin-left:auto}.pb-restored .check-label{font-size:12px;gap:4px}
.pb-restored .library-content{display:block}.pb-restored .preview-panel{display:none}.pb-restored .table-section{width:100%;min-width:0}
.pb-restored .product-table{font-size:12px;min-width:1000px;table-layout:auto}.pb-restored .product-table th{padding:4px 6px;height:29px;background:var(--legacy-grid-header);font-weight:400;border-right:1px solid var(--color-border);color:var(--color-heading)}
.pb-restored .product-table td{padding:4px 6px;height:30px;border-right:1px solid var(--color-line);border-bottom:1px solid var(--color-line);vertical-align:middle}
.pb-restored .product-table tbody tr:nth-child(even){background:var(--color-shade)}.pb-restored .product-table tbody tr.selected{background:var(--color-selected)}
.pb-restored .product-cell{gap:4px;min-width:150px}.pb-restored .product-art{display:none}.pb-restored .product-cell strong{font-size:12px;font-weight:400}.pb-restored .product-cell .product-code{display:inline;font-size:11px;margin-left:5px}.pb-restored .product-kind{display:none}
.pb-restored .badge{font-size:11px;padding:1px 5px;border-radius:1px}.pb-restored .table-scroll{min-height:0;max-height:calc(100vh - 230px);overflow:auto}.pb-restored .table-footer{height:27px;padding:4px 7px;font-size:11px;background:var(--color-shade)}
.pb-restored .page-footer{position:fixed;left:0;right:0;bottom:0;height:27px;margin:0;padding:5px 9px;border-top:1px solid var(--color-border);background:var(--color-shade);font-size:10px;z-index:6}
.legacy-tree-caption{padding:6px 8px;border-bottom:1px solid var(--color-border);background:var(--legacy-grid-header);font-weight:600}
.legacy-tree{padding:7px 4px;min-height:calc(100vw * 1750 / 4740);max-height:55vh}.legacy-tree button{display:flex;gap:4px;align-items:center;width:100%;padding:5px 7px;min-height:28px;border:0;background:transparent;text-align:left;color:var(--color-text);white-space:nowrap;font-size:12px}.legacy-tree button:hover,.legacy-tree button.active{background:var(--color-selected)}.legacy-tree button.child{padding-left:27px}
.legacy-query{border-top:1px solid var(--color-border);padding:7px}.legacy-query label{display:block;margin:5px 0}.legacy-query button{width:100%;margin:2px 0;text-align:left}.legacy-query details{margin-top:8px}.legacy-query summary{padding:5px;cursor:pointer}
.pb-restored .editor-dialog{width:min(1220px,calc(100vw - 20px));max-width:calc(100vw - 12px);height:min(920px,calc(100dvh - 20px));max-height:calc(100dvh - 12px);padding:0;border:1px solid var(--legacy-divider);border-radius:2px;overflow:clip}
.pb-restored #editor-content{display:flex;flex-direction:column;height:100%;min-height:0;background:var(--color-page)}
.pb-restored .dialog-header{padding:6px 9px;min-height:35px;border-bottom:1px solid var(--color-border);background:var(--legacy-title);gap:8px}
.pb-restored .dialog-header h2{font-size:13px;font-weight:500;line-height:1.3}.pb-restored .dialog-header p{font-size:11px;margin:3px 0 0}
.pb-restored .editor-toolbar{padding:5px 7px;gap:4px;min-height:43px;flex-wrap:nowrap;background:var(--color-shade);border-bottom:1px solid var(--color-border);overflow-x:auto;flex-shrink:0}
.legacy-options{position:relative;white-space:nowrap}.legacy-options summary{cursor:pointer;padding:4px 7px}.legacy-options[open] label{position:fixed;z-index:10;right:35px;padding:10px;background:var(--color-paper);border:1px solid var(--color-border)}
.legacy-master{display:grid;grid-template-columns:minmax(0,1fr) 148px;min-height:178px;flex-shrink:0;background:var(--color-paper);border-bottom:1px solid var(--color-border);padding:5px 7px;gap:7px}
.legacy-master-form{min-width:0}.legacy-master-fields{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px 6px}
.legacy-master .field,.legacy-field{display:flex;gap:3px;align-items:center;min-width:0;font-size:12px;margin:0}
.legacy-master .field>span,.legacy-field>span{min-width:55px;flex:0 0 auto;white-space:nowrap;color:var(--color-text);font-size:12px}
.legacy-master .field.double{grid-column:span 2}.legacy-master .field input,.legacy-master .field select,.legacy-field input,.legacy-field select{height:25px;min-height:25px;min-width:0;max-width:100%;width:100%;padding:2px 4px;border:1px solid var(--legacy-input-border);border-radius:0;background:var(--color-paper);color:var(--color-text)}
.legacy-master .field textarea,.legacy-field textarea{width:100%;min-width:0;min-height:62px;padding:4px;border:1px solid var(--legacy-input-border);border-radius:0}
.legacy-master input:disabled,.legacy-master select:disabled,.legacy-field input:disabled,.legacy-field select:disabled,.legacy-field textarea:disabled{background:var(--legacy-readonly);opacity:1;color:var(--color-muted)}
.legacy-master-flags{display:flex;align-items:center;flex-wrap:wrap;gap:9px;padding:6px 0 0;font-size:11px}.legacy-master-flags>label,.legacy-master-flags>.legacy-field{display:flex;align-items:center;gap:3px;white-space:nowrap}.legacy-master-flags input[type=checkbox],.legacy-field input[type=checkbox]{width:14px;height:14px;min-height:14px;flex:0 0 14px;padding:0;margin:0}
.legacy-master-flags>.legacy-field>span{min-width:0;font-size:11px}
.legacy-size{display:flex;gap:3px;align-items:center;min-width:0;grid-column:span 2}.legacy-size>span{white-space:nowrap;min-width:90px}.legacy-size label{display:flex;gap:2px;align-items:center;min-width:0}.legacy-size label>span{font-size:10px}.legacy-size input{width:100%;min-width:0;height:25px;padding:2px;border:1px solid var(--legacy-input-border);border-radius:0}
.legacy-master-picture{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0}.legacy-master-picture img{width:136px;height:112px;object-fit:contain;border:1px solid var(--color-border)}.legacy-no-picture{width:136px;height:112px;border:1px solid var(--color-border);background:var(--color-shade);display:grid;place-items:center;color:var(--color-muted)}
.legacy-coordinate-master{background:var(--color-paper);border-bottom:1px solid var(--legacy-divider);flex-shrink:0;overflow:auto;max-height:230px}
.source-master-canvas{position:relative;width:100%;min-width:980px;aspect-ratio:4663/700;font-size:12px;background:var(--color-paper)}
.source-label,.source-value,.source-control,.source-picture,.source-list-image{position:absolute;display:flex;align-items:center;min-width:0;overflow:clip;white-space:nowrap;line-height:1.2;font-size:12px}
.source-label{justify-content:flex-end;padding-right:2px;color:var(--color-text)}.source-value{padding-left:3px;color:var(--color-text)}
.source-control>input,.source-control>select{height:100%;min-height:0;width:100%;padding:0 3px;border:1px solid var(--legacy-input-border);border-radius:0;font-size:12px;line-height:1.1;background:var(--color-paper);color:var(--color-text)}
.source-control>input[readonly],.source-control>input:disabled,.source-control>select:disabled{background:var(--legacy-readonly);color:var(--color-muted);opacity:1}.source-control>input[type=checkbox]{width:14px;height:14px;min-height:14px;padding:0;flex:0 0 14px}
.source-checkbox{display:flex;align-items:center;gap:2px;width:100%;font-size:11px}.source-checkbox input{width:13px;height:13px;margin:0;padding:0;min-height:13px;flex:0 0 13px}
.source-picture{border:1px solid var(--color-border);padding:0;justify-content:center;background:var(--color-shade);color:var(--color-muted);cursor:pointer}.source-picture img,.source-list-image img,.source-list-image svg{height:100%;width:100%;object-fit:contain}
.pb-restored .source-card-list{min-width:980px}.pb-restored .source-card-list thead{display:none}.pb-restored .source-card-list td{padding:0;height:auto;border-right:0}.source-list-card{width:100%;min-width:980px;aspect-ratio:3913/320;position:relative;min-height:80px}.source-list-edit{position:absolute;right:6px;bottom:2px;font-size:10px}.source-list-image{border:1px solid var(--color-line);background:var(--color-paper)}
.pb-restored .editor-tabs{display:flex;gap:0;padding:3px 5px 0;flex-wrap:nowrap;overflow-x:auto;background:var(--color-page);border-bottom:1px solid var(--legacy-divider);min-height:29px;flex-shrink:0}
.pb-restored .editor-tab{white-space:nowrap;font-size:12px;padding:5px 10px;border:1px solid var(--color-border);border-bottom:0;border-radius:2px 2px 0 0;margin-right:2px;background:var(--legacy-strip);color:var(--color-text);min-height:28px}
.pb-restored .editor-tab.active{background:var(--color-paper);color:var(--color-accent);box-shadow:none;border-color:var(--legacy-divider)}.pb-restored .editor-tab[hidden]{display:none}
.pb-restored .editor-body{flex:1;min-height:0;overflow:auto;padding:7px;background:var(--color-paper)}
.pb-restored .editor-footer{min-height:37px;padding:4px 8px;border-top:1px solid var(--color-border);gap:7px;flex-shrink:0;background:var(--color-page);font-size:11px}.pb-restored .editor-footer>span:first-child{flex:1}.pb-restored .editor-footer strong{font-size:13px;margin:0 4px}
.pb-restored .review-bar{padding:3px 5px;margin-bottom:6px;min-height:27px;font-size:11px;background:var(--color-shade);border-radius:0}
.pb-restored .section-title{margin:2px 0 6px;gap:5px}.pb-restored .section-title h3{font-size:12px;font-weight:500}.pb-restored .section-title p{font-size:10px;margin:2px 0}
.pb-restored .bom-table{font-size:12px}.pb-restored .bom-table th,.pb-restored .bom-table td{padding:3px 4px;border-right:1px solid var(--color-line);border-bottom:1px solid var(--color-border)}.pb-restored .bom-table th{background:var(--legacy-grid-header);height:27px;font-weight:400}.pb-restored .bom-table input,.pb-restored .bom-table select{height:25px;padding:2px 3px;border:1px solid var(--legacy-input-border);border-radius:0;font-size:12px}.pb-restored .bom-table input[type=checkbox]{height:14px;width:14px;min-height:14px}
.pb-restored .bom-note{font-size:10px;margin-top:6px}.pb-restored .editor-body>.table-scroll{max-height:none;overflow:auto}.pb-restored .utility-table{min-width:580px;font-size:12px}.pb-restored .utility-table th,.pb-restored .utility-table td{padding:5px 6px;border-right:1px solid var(--color-line)}
.legacy-subheading{display:flex;align-items:center;gap:7px;min-height:29px;padding:2px 4px;margin-bottom:5px;background:var(--color-shade);border-bottom:1px solid var(--color-border);font-size:12px}.legacy-subheading>span:first-child{flex:1}
.legacy-profile-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 8px;padding:4px}.legacy-profile-grid>.wide,.legacy-profile-grid>.full{grid-column:1/-1}
.pb-restored fieldset{border:1px solid var(--color-border);border-radius:0;padding:7px;margin:0 0 6px;min-width:0}.pb-restored legend{font-size:12px;padding:0 5px;color:var(--color-heading)}
.legacy-pack-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:8px}.legacy-pack-layout .legacy-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.legacy-pack-description .legacy-field{display:block;margin-bottom:8px}.legacy-pack-description .legacy-field>span{display:block;margin-bottom:4px}.legacy-pack-description .legacy-field textarea{min-height:96px}
.legacy-size-table{width:100%;border-collapse:collapse;font-size:12px}.legacy-size-table th,.legacy-size-table td{padding:4px;border:1px solid var(--color-line);text-align:center}.legacy-size-table th{background:var(--legacy-grid-header);font-weight:400}.legacy-size-table input{width:100%;max-width:100px;height:25px;border:1px solid var(--legacy-input-border);padding:2px 3px}
.legacy-cost-layout{display:grid;grid-template-columns:minmax(0,2.3fr) minmax(220px,1fr);gap:7px}.legacy-price-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.legacy-field output{display:block;width:100%;min-width:0;border:1px solid var(--color-border);padding:3px 5px;min-height:25px;background:var(--legacy-readonly);font-family:var(--font-number)}
.legacy-help{font-size:11px;color:var(--color-muted);line-height:1.7;margin:6px 0}.legacy-cost-summary table{width:100%;border-collapse:collapse;font-size:12px}.legacy-cost-summary td{padding:7px 4px;border-bottom:1px solid var(--color-line)}.legacy-cost-summary .cost-sum{font-weight:600;background:var(--color-shade)}
.legacy-inline-form{display:flex;gap:4px;flex-wrap:wrap;margin-top:6px}.legacy-inline-form input{flex:1;width:110px;min-width:90px;height:26px;border:1px solid var(--legacy-input-border);padding:3px 4px}
.legacy-before{background:var(--color-shade)}.legacy-after{color:var(--color-red);background:var(--color-paper)}
.utility-table pre{white-space:pre-wrap;min-width:170px;margin:0;font:inherit;line-height:1.7}.configuration-grid input:not([type=checkbox]),.configuration-grid select{width:100%;min-width:70px;border:1px solid var(--legacy-input-border);height:26px;padding:2px 4px}.configuration-grid select{min-width:150px}
.source-incomplete .source-value[data-source-element=hh],.source-incomplete .source-value[data-source-element=pm]{color:var(--color-red)}.pb-restored .source-detail-grid{table-layout:fixed}.pb-restored .source-detail-grid input:not([type=checkbox]),.pb-restored .source-detail-grid select{width:100%;min-width:0;max-width:100%;height:25px;border:1px solid var(--legacy-input-border);font-size:12px;padding:1px 3px}.pb-restored .source-detail-grid th{white-space:pre-line}.pb-restored .source-detail-grid td{overflow:hidden}.pb-restored .source-detail-grid td:last-child{white-space:normal}
.pb-restored .utility-body input[type=checkbox]{width:14px;height:14px;min-height:14px;padding:0;margin:0;flex:0 0 14px}
.production-toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.production-toolbar label{display:flex;align-items:center;gap:5px;font-size:12px}.production-toolbar input{width:80px;height:25px;border:1px solid var(--legacy-input-border)}.production-grid input:not([type=checkbox]),.production-grid select{width:100%;min-width:65px;height:26px;padding:2px 4px;border:1px solid var(--legacy-input-border);font-size:12px}.production-grid input[type=checkbox]{width:14px;height:14px;margin:0}.production-grid td small{display:block}.production-grid th{white-space:nowrap}
.legacy-structure-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:7px;min-height:280px}.legacy-structure-tree{border:1px solid var(--color-border);padding:5px}.legacy-structure-tree button{display:block;width:100%;padding:6px;border:0;background:transparent;text-align:left}.legacy-structure-tree button:hover{background:var(--color-selected)}#structure-detail table{width:100%;border-collapse:collapse}#structure-detail td{padding:5px;border:1px solid var(--color-line)}
.legacy-nested-tabs{display:flex;overflow-x:auto;padding:3px 0;gap:2px}.legacy-nested-tabs button{white-space:nowrap;background:var(--legacy-strip);padding:5px 9px;border:1px solid var(--color-border);border-radius:0;color:var(--color-text)}.legacy-nested-tabs button.active{background:var(--color-paper);color:var(--color-accent)}
.legacy-production-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.legacy-copy-fields{display:flex;gap:8px;margin-bottom:12px}.legacy-copy-fields label{flex:1}.legacy-copy-fields input{width:100%;display:block;margin-top:5px;border:1px solid var(--legacy-input-border);height:28px;padding:3px 5px}
.pb-restored .utility-dialog{border-radius:2px;border:1px solid var(--legacy-divider)}.pb-restored .utility-body{padding:10px}.pb-restored .utility-footer{padding:6px 9px;background:var(--color-page)}
@media(max-width:1000px){.legacy-master-fields{grid-template-columns:repeat(4,minmax(0,1fr))}.legacy-master{grid-template-columns:minmax(0,1fr) 110px}.legacy-master-picture img,.legacy-no-picture{width:104px;height:94px}.legacy-master .field>span,.legacy-field>span{font-size:11px;min-width:50px}.legacy-cost-layout{grid-template-columns:minmax(0,1fr)}.legacy-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:768px){.pb-restored .sidebar{position:static;display:block;width:100%;height:auto;max-height:170px;overflow:auto;flex-basis:auto;margin-top:83px}.pb-restored .app-shell{display:block}.pb-restored .main-shell{margin:0;width:100%}.pb-restored main{margin-top:0;padding:0}.legacy-tree{display:flex;min-height:0;overflow:auto;gap:3px;padding:3px}.legacy-tree button{width:auto;flex-shrink:0;padding:5px 7px}.legacy-tree button.child{padding-left:7px}.legacy-tree-caption,.legacy-query{display:none}.legacy-library-toolbar{overflow:auto;white-space:nowrap;gap:2px;padding:4px}.legacy-library-toolbar .toolbar-label{display:none}.pb-restored .filter-actions{width:auto}.pb-restored .filterbar{gap:4px}.pb-restored .table-scroll{max-height:calc(100dvh - 280px)}.pb-restored .editor-dialog{height:calc(100dvh - 8px);width:calc(100vw - 8px);max-height:calc(100dvh - 8px);max-width:calc(100vw - 8px)}.legacy-master{grid-template-columns:minmax(0,1fr);max-height:260px;overflow:auto;min-height:200px}.legacy-master-picture{display:none}.legacy-master-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.legacy-master .field.double{grid-column:span 2}.legacy-master-fields .legacy-size{grid-column:span 2}.legacy-master .field>span{min-width:56px}.legacy-master-flags{gap:7px}.legacy-pack-layout,.legacy-cost-layout,.legacy-production-grid,.legacy-structure-layout{grid-template-columns:minmax(0,1fr)}.legacy-structure-tree{min-height:80px}.legacy-profile-grid,.legacy-pack-layout .legacy-profile-grid{grid-template-columns:minmax(0,1fr)}.legacy-price-fields{grid-template-columns:minmax(0,1fr)}.pb-restored .editor-tabs{min-height:31px}.pb-restored .editor-tab{font-size:11px;padding:5px 8px}.pb-restored .editor-footer{flex-wrap:nowrap;gap:4px;font-size:10px}.pb-restored .editor-footer .button{padding:4px 7px;font-size:11px}.legacy-copy-fields{flex-direction:column}.pb-restored .page-footer{position:static;height:auto;min-height:27px;flex-wrap:wrap}.pb-restored .product-table{min-width:850px}}
