/* 0582: one worksheet, persistent controls, explicit per-work compositions. */
#modal.b582-dialog{width:calc(100vw - 20px)!important;max-width:1880px!important;height:calc(100dvh - 20px);max-height:calc(100dvh - 20px)}
#modal.b582-dialog .modal-body{padding:10px 12px!important}
#modal.b582-dialog .modal-header,#modal.b582-dialog .modal-footer{padding:10px 14px!important}
.b582-editor .b575-meta{margin-bottom:7px;padding:6px 10px}
.b582-editor .b575-summary,.b582-workspace .b575-summary{position:static;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));min-height:98px;padding:0!important}
.b582-editor .b575-summary>div,.b582-workspace .b575-summary>div{padding:8px 10px;min-height:98px;height:auto}
.b582-editor .b575-summary strong,.b582-workspace .b575-summary strong{font-size:clamp(15px,1.25vw,22px);white-space:normal;overflow-wrap:anywhere;line-height:1.45}
.b582-editor .b575-summary.is-pending{background:#f6f9fb}
.b582-editor .b575-caption{margin:4px 0 8px;font-size:11px;line-height:1.45}
.b582-editor .b575-scroll{max-height:calc(100dvh - 285px);min-height:180px;scrollbar-gutter:auto}
.b582-editor .b575-table,.b582-workspace .b575-table{min-width:1190px;width:100%;table-layout:fixed;font-size:10.5px}
.b582-editor .b575-table th,.b582-editor .b575-table td,.b582-workspace .b575-table th,.b582-workspace .b575-table td{padding:5px 5px!important;max-width:none}
.b582-editor .b575-table .b575-index,.b582-workspace .b575-table .b575-index{width:25px}
.b582-editor .b575-table .b575-name,.b582-workspace .b575-table .b575-name{width:215px;min-width:0;overflow:visible!important;white-space:normal!important}
.b582-editor .b575-table .b575-name .b575-service-link,.b582-workspace .b575-table .b575-name .b575-service-link{width:100%;height:auto!important;max-height:none!important;overflow:visible!important;white-space:normal!important;text-overflow:clip!important;overflow-wrap:anywhere;line-height:1.35;min-height:26px!important;font-size:11px!important}
.b582-editor .b575-table .b575-name small,.b582-workspace .b575-table .b575-name small{font-size:9px;line-height:1.3;margin-top:3px}
.b582-editor .b575-table .b575-group,.b582-workspace .b575-table .b575-group{width:94px}
.b582-editor .b575-table .b575-quantity,.b582-workspace .b575-table .b575-quantity{width:67px}
.b582-editor .b575-table .b575-unit,.b582-workspace .b575-table .b575-unit{width:52px}
.b582-editor .b575-table .b575-detail-col{width:65px}
.b582-workspace .b575-table .b575-detail-col{width:48px}
.b582-editor .b575-number,.b582-workspace .b575-number{font-size:10px;letter-spacing:-.015em;overflow:visible!important;text-overflow:clip!important}
.b582-editor .b575-number small,.b582-workspace .b575-number small{font-size:8px;white-space:normal;line-height:1.2;margin-top:3px;letter-spacing:0}
.b582-editor .b575-table input[name=s_quantity],.b582-editor .b575-table select[name=s_unit]{background:#fff;border:1px solid #dce7ed!important;min-height:32px!important;height:32px;max-width:100%;padding:4px!important;font-size:11px!important}
.b582-editor .b575-table [name=s_group]{background:transparent;height:auto;min-height:32px!important;font-size:10px!important}
.b582-editor .b575-table .b575-stage,.b582-workspace .b575-table .b575-stage{white-space:normal;overflow-wrap:anywhere;overflow:visible;max-height:none}
.b582-editor .b582-line-actions>.btn{display:block;width:100%;min-height:25px;font-size:9px!important;line-height:1.2;padding:4px 3px!important;margin:2px 0;white-space:nowrap}
.b582-delete{color:#92383c!important;border-color:#e9cdd0!important;background:#fffafa!important}
.b582-editor [data-expanded]>tr:first-child>td{background:#edf7f8!important}
.b582-editor [data-expanded] .b575-service-link{color:#084957!important}
.b582-editor [data-expanded] .b575-service-link::before{content:'▾ ';color:#087b88}
.b582-editor [data-b528-line]:not([data-expanded]) .b575-service-link::before{content:'▸ ';color:#72939b}
.b582-editor [data-b575-detail]>td{padding:14px 16px!important}
.b582-service-detail{max-width:100%;min-width:0;color:#28465a}
.b582-detail-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.b582-detail-heading span{font-size:9px;letter-spacing:.12em;color:#0d7281;font-weight:700}
.b582-detail-heading h4{font-size:15px;line-height:1.4;margin:4px 0}
.b582-detail-heading p{font-size:11px;color:#60798b;margin:2px 0}
.b582-detail-heading>.btn{flex-shrink:0;font-size:12px;min-height:36px;padding:8px 12px}
.b582-editor .budget528-grid.b582-line-fields{max-width:none;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px 16px}
.b582-editor .b582-line-fields input{height:36px;min-height:36px!important;font-size:12px!important}
.b582-cpu-field>div{display:flex;align-items:center;gap:12px;min-height:36px;border:1px solid #cbdfe5;background:#fff;border-radius:6px;padding:5px 8px}
.b582-cpu-field>div>span{flex:1;min-width:0;overflow-wrap:anywhere;font-size:11px;line-height:1.4}
.b582-cpu-field small{display:block;color:#6c8290;font-size:10px}
.b582-cpu-field .btn{min-height:30px;flex-shrink:0;font-size:11px;padding:5px 8px}
.b582-unit-note{font-size:11px;color:#586f80;margin:10px 0 7px}
.b582-service-detail>[data-unit-reason]{display:block;max-width:650px;font-size:11px}
.b582-service-detail>[data-unit-reason][hidden]{display:none!important}
.b582-service-detail>[data-unit-reason] input{display:block;width:100%;min-height:34px!important;background:#fff;border:1px solid #cedfe6!important}
.b582-service-detail .test580-reason{display:none!important}
.b582-conversion{font-size:11px;margin:8px 0 14px;color:#567386}
.b582-conversion summary{cursor:pointer;padding:5px 0}
.b582-conversion label{display:block;max-width:320px;margin:7px 0}
.b582-conversion input{display:block;background:#fff;border:1px solid #c9dbe4!important;width:100%;height:34px;min-height:34px!important;margin-top:4px}
.b582-conversion p{max-width:700px;line-height:1.4;margin:5px 0}
.b582-breakdown{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;border:1px solid #d6e5e9;border-radius:8px;background:#fff;margin:12px 0;overflow:hidden}
.b582-breakdown>div{min-height:86px;box-sizing:border-box;padding:9px 10px;border-right:1px solid #e4ecef;min-width:0}
.b582-breakdown>div:last-child{border:0}
.b582-breakdown span{font-size:10px;color:#5c7789;display:block}
.b582-breakdown strong{font-size:15px;display:block;font-variant-numeric:tabular-nums;margin:3px 0;overflow-wrap:anywhere}
.b582-breakdown small{font-size:9px;color:#648090;line-height:1.4;display:block;overflow-wrap:anywhere}
.b582-composition-preview{max-width:100%;overflow:auto;border:1px solid #d6e3e9;border-radius:7px;background:#fff}
.b582-composition-preview table{min-width:780px;table-layout:fixed;width:100%;border-collapse:collapse;font-size:10px}
.b582-composition-preview th{position:static!important;height:auto!important;background:#eaf2f5!important;text-align:left;font-size:10px!important;white-space:normal}
.b582-composition-preview td{position:static!important;text-align:right;font-variant-numeric:tabular-nums;white-space:normal!important;height:auto!important;background:#fff!important;font-size:10px}
.b582-composition-preview th:first-child{width:25%}
.b582-composition-preview td:nth-child(-n+3){text-align:left}
.b582-composition-preview td small{display:block;color:#688393;font-size:9px}
.b582-composition-empty,.b582-calculation-note{font-size:12px;color:#6b7e89;padding:8px 0}
.b582-detail-order{display:flex;align-items:center;gap:8px;justify-content:flex-end;margin-top:12px;font-size:11px;color:#6a8291}
.b582-detail-order .btn{font-size:11px;min-height:32px;padding:6px 9px}
.b582-editor .b575-table tfoot th,.b582-workspace .b575-table tfoot th{background:#dcecef;color:#234b59;text-align:left;padding:10px 9px!important}
.b582-editor .b575-table tfoot td,.b582-workspace .b575-table tfoot td{font-size:10px;font-weight:650;padding:9px 5px!important;white-space:nowrap;font-variant-numeric:tabular-nums}
.b582-editor .b575-table tfoot small,.b582-workspace .b575-table tfoot small{display:block;font-size:8px;font-weight:400;white-space:normal}
.b582-editor .b575-table tfoot [data-b575-foot],.b582-workspace .b575-table tfoot [data-b575-foot]{font-weight:400;font-size:9px;white-space:normal}
.b582-workspace{padding:12px}
.b582-workspace .ct577-heading{margin-bottom:8px}
.b582-workspace .ct577-heading h2{font-size:20px}
.b582-workspace .ct577-caption{font-size:11px}
.b582-workspace .ct577-scroll{scrollbar-gutter:auto;max-height:65dvh}
.b582-workspace .ct577-table td:last-child>.btn{font-size:9px;min-height:28px;padding:4px}
.b582-wide-dialog{display:none;box-sizing:border-box;padding:0;width:calc(100vw - 16px);max-width:1920px;height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);margin:auto;border:1px solid #b6d0da;border-radius:10px;background:#fff;overflow:auto;color:#203d50}
.b582-wide-dialog[open]{display:block}
.b582-wide-dialog::backdrop{background:#193548a8}
.b582-wide-dialog>.b582-workspace{min-height:100%;border:0;border-radius:0;padding:12px}
.b582-wide-dialog .ct577-scroll{max-height:calc(100dvh - 330px)}
.b582-cpu-picker .b574-search{position:sticky;top:-16px;padding:10px 0;margin:0;background:#fff;z-index:3}
.b582-cpu-picker [data-results][aria-busy=true]{opacity:.65}
.b582-cpu-picker .b574-candidate:has(input:checked){background:#eaf7f6;box-shadow:inset 3px 0 #168580}
.b582-cpu-picker .b574-candidate input{width:19px!important;height:19px!important;accent-color:#087c84}
.b582-cpu-picker .b574-candidate b{line-height:1.4;white-space:normal;overflow-wrap:anywhere}
.b582-cpu-picker>footer>[data-count]{font-size:11px;line-height:1.4;max-width:55%}
.budget574-dialog.b582-local-dialog{width:min(1440px,calc(100vw - 20px));max-width:calc(100vw - 16px);max-height:calc(100dvh - 20px)}
.b582-local-dialog .b574-fields:has([data-meta]){grid-template-columns:minmax(0,2fr) minmax(0,1.2fr) 145px 170px}
.b582-local-dialog .b574-fields>label{font-size:11px}
.b582-local-dialog .b574-fields input,.b582-local-dialog .b574-fields select{min-height:34px;height:34px;font-size:12px}
.b582-local-scroll{max-height:52dvh;overflow:auto;border:1px solid #cddfe7;border-radius:8px;scrollbar-gutter:auto}
.b582-local-table{width:100%;min-width:1080px;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:11px}
.b582-local-table th{position:sticky;top:0;z-index:2;text-align:left;background:#e5f0f3;font-size:10px;line-height:1.3;border-bottom:1px solid #cddfe6;padding:9px 6px}
.b582-local-table th:first-child{width:215px}
.b582-local-table th:nth-child(2){width:95px}
.b582-local-table th:nth-child(3){width:112px}
.b582-local-table th:nth-child(4){width:58px}
.b582-local-table th:last-child{width:58px}
.b582-local-table td{border-right:1px solid #e6eef1;border-bottom:1px solid #dbe7ec;padding:7px 5px;text-align:right;vertical-align:middle;min-width:0;font-variant-numeric:tabular-nums;white-space:normal;overflow:visible!important;max-width:none}
.b582-local-table td:nth-child(-n+3){text-align:left}
.b582-local-table .b574-input-link{display:block}
.b582-local-table .b574-input-link>span{display:block;font-size:11px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}
.b582-local-table .b574-input-link .btn{border:0;background:transparent;color:#08778a;padding:3px 0;min-height:24px;font-size:9px;text-decoration:underline}
.b582-local-table input,.b582-local-table select{width:100%;padding:5px!important;height:33px!important;min-height:33px!important;font-size:11px!important;border:1px solid #d9e5eb!important;background:#fff;border-radius:5px}
.b582-local-table input[inputmode=decimal]{text-align:right}
.b582-local-table .btn{font-size:9px;min-height:30px;padding:4px}
.b582-local-table .b582-component-cost{font-weight:650;font-size:10px;white-space:nowrap}
.b582-component-extra>td{background:#f5f9fa;text-align:left!important;padding:4px 8px!important}
.b582-component-extra summary{font-size:9px;color:#5c7c8e;cursor:pointer;padding:3px 0}
.b582-local-table .b574-component-fields{max-width:1000px;padding:9px 0;grid-template-columns:repeat(3,minmax(0,1fr))!important;text-align:left}
.b582-local-table .b574-component-fields label{font-size:10px}
.b582-local-preview{display:flex;align-items:center;justify-content:space-between;gap:20px;background:#eaf5f4;border:1px solid #cce1df;padding:10px 14px;border-radius:8px;min-height:75px}
.b582-local-preview>div{min-width:210px}
.b582-local-preview span,.b582-local-preview small{display:block;color:#526f7b;font-size:10px}
.b582-local-preview strong{display:block;font-size:23px;color:#14665e;font-variant-numeric:tabular-nums;line-height:1.4}
.b582-local-preview p{font-size:11px;line-height:1.5;max-width:550px;margin:0;color:#456775}
.b582-local-dialog :is(input,select,button):focus-visible,.b582-editor :is(input,select,button):focus-visible,.b582-cpu-picker :is(input,button):focus-visible{outline:2px solid #087b89!important;outline-offset:2px}
@media(min-width:1550px){.b582-editor .b575-table,.b582-workspace .b575-table{font-size:12px}.b582-editor .b575-number,.b582-workspace .b575-number{font-size:12px;letter-spacing:0}.b582-editor .b575-table .b575-name,.b582-workspace .b575-table .b575-name{width:255px}.b582-editor .b575-table .b575-group,.b582-workspace .b575-table .b575-group{width:105px}.b582-editor .b575-table .b575-name .b575-service-link,.b582-workspace .b575-table .b575-name .b575-service-link{font-size:12px!important}.b582-editor .b575-table tfoot td,.b582-workspace .b575-table tfoot td{font-size:12px}.b582-editor .b575-table th,.b582-workspace .b575-table th{font-size:11px}}
@media(min-width:761px) and (max-width:1100px){
 .b582-editor .b575-summary,.b582-workspace .b575-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
 #modal.b582-dialog{width:100vw!important;max-width:100vw!important;height:100dvh;max-height:100dvh;margin:0;border-radius:0}
 #modal.b582-dialog .modal-body{padding:10px!important}
 .b582-editor .b575-summary,.b582-workspace .b575-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
 .b582-editor .b575-summary>div,.b582-workspace .b575-summary>div{padding:8px;min-height:76px}
 .b582-editor .b575-summary strong,.b582-workspace .b575-summary strong{font-size:17px}
 .b582-editor .b575-scroll{max-height:60dvh;min-height:180px}
 #modal.b582-dialog .test580-notice{flex-wrap:wrap}
 .b582-editor .b575-table,.b582-workspace .b575-table{min-width:1310px}
 .b582-editor .b575-table .b575-name,.b582-workspace .b575-table .b575-name{width:185px}
 .b582-editor .b575-table input[name=s_quantity],.b582-editor .b575-table select[name=s_unit]{height:44px;min-height:44px!important;font-size:16px!important}
 .b582-editor .b575-table .b575-name .b575-service-link,.b582-workspace .b575-table .b575-name .b575-service-link{min-height:44px!important}
 .b582-editor .b582-line-actions>.btn{min-height:38px;padding:8px 3px!important;font-size:10px!important}
 .b582-editor .budget528-grid.b582-line-fields{grid-template-columns:1fr;max-width:calc(100vw - 58px)}
 .b582-service-detail{max-width:calc(100vw - 58px)}
 .b582-detail-heading{align-items:stretch;flex-direction:column;gap:8px}
 .b582-detail-heading>.btn{min-height:44px}
 .b582-cpu-field>div{flex-wrap:wrap}.b582-cpu-field .btn{min-height:44px}
 .b582-breakdown{grid-template-columns:repeat(2,minmax(0,1fr))}
 .b582-breakdown>div{padding:8px;min-height:73px}.b582-breakdown strong{font-size:14px}
 .b582-conversion input{min-height:44px!important;font-size:16px!important}
 .b582-composition-preview{max-height:380px}
 .b582-wide-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;margin:0}
 .b582-wide-dialog>.b582-workspace{padding:10px}
 .b582-wide-dialog .ct577-scroll{max-height:60dvh}
 .budget574-dialog.b582-local-dialog{width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;margin:0;border-radius:0}
 .b582-local-dialog .b574-fields:has([data-meta]){grid-template-columns:1fr 1fr}
 .b582-local-dialog .b574-fields input,.b582-local-dialog .b574-fields select{min-height:44px;height:44px;font-size:16px}
 .b582-local-table{min-width:1200px}
 .b582-local-table input,.b582-local-table select{min-height:44px!important;height:44px!important;font-size:16px!important}
 .b582-local-table .b574-input-link .btn,.b582-local-table .btn{min-height:44px;font-size:11px}
 .b582-local-preview{display:block}.b582-local-preview p{margin-top:8px}
 .b582-cpu-picker .b574-search{top:-12px}.b582-cpu-picker>footer>[data-count]{flex-basis:100%;max-width:none}
 .b582-cpu-picker .b574-candidate input{width:22px!important;height:22px!important}
}

.b582-editor .b575-stage,.b582-workspace .b575-stage{font-size:9px;overflow-wrap:normal;word-break:normal;padding:4px}
.b582-editor .b575-table textarea[name=s_group]{width:100%;box-sizing:border-box;resize:vertical;border:0;border-radius:5px;line-height:1.4;font-size:9px!important;min-height:38px!important;padding:5px 4px!important;overflow:auto;color:inherit}
.b582-local-dialog .b582-local-table .btn{font-size:9px!important;min-height:30px!important;padding:4px!important;max-width:100%}
.b582-local-dialog .b582-local-table th:last-child{width:66px}
