.company-hero{background:linear-gradient(120deg,#15283e,#1b4678);color:white;border-radius:16px;padding:22px 28px;display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.company-hero h1{margin:8px 0}.company-hero p{margin-bottom:4px}.company-hero a{color:#b7d9ff}.company-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.company-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.company-grid svg{width:100%;height:auto}.company-stats h2{font-size:30px;margin:12px 0}.company-stats h2 small{font-size:13px;font-weight:400}.card small{color:#6d809a}td small{display:block;color:#6d809a;margin-top:5px}.table-wrap{overflow:auto}.company-grid .card{min-width:0}@media(max-width:1000px){.company-grid{grid-template-columns:1fr}.company-hero{display:block}}@media(max-width:700px){.company-stats{grid-template-columns:1fr}}

.card{background:white;border:1px solid #dce4ef;border-radius:10px;padding:22px;margin-bottom:18px}.page-head{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:20px;flex-wrap:wrap}.notice{background:#fff5dd;padding:12px 16px;border-left:3px solid #d9a341}.card table{width:100%;border-collapse:collapse}.card th,.card td{border-bottom:1px solid #e3eaf4;padding:10px;text-align:left;font-size:13px}.card th{background:#f5f8fc;color:#61758e}.card summary{cursor:pointer}

.sub-filter-tools{margin:15px 0 10px}.sub-result-summary{display:flex;gap:20px;flex-wrap:wrap;align-items:center;padding:12px 14px;background:#edf3fc;border-radius:7px;margin-bottom:12px;font-size:13px}.sub-filter-table{max-height:68vh}.sub-filter-table thead{position:sticky;top:0;z-index:1}.sub-filter-table table{min-width:1050px}.sub-sort{border:0;background:transparent;padding:0;white-space:nowrap;text-align:left;font-size:13px;width:100%}.sub-column-filters th{vertical-align:top;padding-top:0}.sub-column-filters input,.sub-column-filters select{display:block;width:100%;font-size:12px;padding:6px;margin:4px 0;min-width:85px}.sub-column-filters th:nth-child(2){min-width:200px}.sub-column-filters th:nth-child(3){min-width:185px}

.sub-filter-tools{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:10px 0}.sub-filter-tools button{padding:7px 11px;font-size:13px;white-space:nowrap}.sub-filter-tools .row{gap:6px}.sub-archive-bar{display:flex;align-items:center;gap:12px;margin:4px 0 14px}.sub-order-list{max-height:58vh;overflow:auto}@media(max-width:1050px){.sub-filter-tools{flex-wrap:wrap}}

.material-grid{max-height:65vh}.material-grid table{min-width:1400px}.material-grid thead{position:sticky;top:0}.material-grid td:not(:first-child){text-align:right}.material-grid:not(.material-summary-view) td:nth-child(12){font-weight:700;background:#f1f6ff;white-space:nowrap}.stock-difference{color:#b3302d;font-weight:700}

#back.ghost,#ledger-back{background:#205cdb;color:#fff;border:1px solid #174bb5;border-radius:9px;padding:12px 20px;font-size:17px;font-weight:700;min-height:46px;box-shadow:0 2px 6px #205cdb25;margin-bottom:10px}#back.ghost:hover,#ledger-back:hover{background:#1348b2}

.detail-return{position:fixed;right:28px;bottom:24px;z-index:20;display:flex;flex-direction:column;gap:5px;align-items:flex-start;background:#205cdb;color:white;border:2px solid white;border-radius:12px;padding:15px 22px;box-shadow:0 5px 20px #123a7055;font-size:17px;max-width:calc(100vw - 40px)}.detail-return small{color:#e2edff;font-size:12px}.detail-return:hover{background:#1348b2}.main:has(.detail-return){padding-bottom:120px}

#material-totals{gap:10px 22px;padding:12px 16px}#material-totals .material-grand-total{font-size:19px;font-weight:800;color:#174bb5;line-height:1.4}#material-totals .material-vendor-total{font-size:17px;font-weight:700;color:#18314e;line-height:1.4}

.material-grid:not(.material-summary-view) :is(th,td):is(:nth-child(6),:nth-child(9)){background:#e9edf2;font-weight:700;color:#20344c}.material-grid:not(.material-summary-view) th:is(:nth-child(6),:nth-child(9)){background:#dce3eb}

.material-grid:not(.material-summary-view) tbody td:first-child{font-size:15px;font-weight:600;min-width:205px}.material-grid:not(.material-summary-view) tbody td:first-child small{display:block;font-size:14px;font-weight:500;color:#405675;line-height:1.5;margin-top:5px}

.material-grid:not(.material-summary-view) tbody td:first-child{min-width:95px;white-space:nowrap}.material-grid:not(.material-summary-view) tbody td:nth-child(2){text-align:left;font-size:14px;font-weight:500;color:#405675;min-width:180px;white-space:nowrap}

#sub-result-body td:nth-child(2) small,#sub-result-body td:nth-child(3) small{display:block;font-size:14px;font-weight:600;color:#304b70;line-height:1.5;margin-top:4px}

.material-grid:not(.material-summary-view) tbody td{padding-top:9px;padding-bottom:9px;vertical-align:middle}.material-status-cell details{margin:0;padding:0}.material-status-cell summary{white-space:nowrap;cursor:pointer;line-height:1.5}.material-status-cell summary .muted{margin-left:5px}.material-status-info{padding-top:6px}.material-status-info small{margin-top:3px}

#main:has(.material-page-head){padding:16px 20px;max-width:none}
.material-page-head{margin-bottom:10px;gap:10px}.material-page-head>div{display:flex;align-items:baseline;gap:16px;flex-wrap:wrap}.material-page-head h1,.material-page-head p{margin:0}.material-page-head button{padding:7px 11px}
.material-main-card{padding:12px 14px}.material-main-card>.row{gap:8px}.material-main-card label{gap:3px}.material-main-card input,.material-main-card select{padding:6px 9px}.material-main-card>p.tiny{margin:4px 0 7px}
#material-summary{padding:4px 10px;margin-bottom:5px;gap:16px;background:transparent}
#material-totals{padding:7px 12px;margin-bottom:8px;gap:8px 20px}
.material-main-card .material-grid{max-height:calc(100vh - 260px);min-height:280px}
@media(max-width:900px){#main:has(.material-page-head){padding:12px}.material-page-head>div{gap:4px}.material-main-card .material-grid{max-height:65vh}}

#main:has(.sub-page-head){padding:16px 20px;max-width:none}
.sub-page-head{margin-bottom:9px;gap:10px}.sub-page-head>div:first-child{display:flex;align-items:baseline;gap:16px;flex-wrap:wrap}.sub-page-head h1,.sub-page-head p{margin:0}.sub-page-head button,.sub-page-tabs button{padding:6px 11px}
.sub-page-tabs{gap:6px;margin-bottom:8px}.sub-main-card{padding:12px 14px;margin-top:0}.sub-main-card label{gap:3px}.sub-main-card>.row{gap:8px}.sub-main-card input,.sub-main-card select{padding:6px 9px}.sub-main-card>p.tiny{margin:4px 0 6px}.sub-main-card .sub-filter-tools{margin:6px 0}.sub-main-card .sub-filter-tools button{padding:5px 9px}.sub-main-card #sub-result-summary{padding:7px 10px;margin-bottom:7px;gap:14px}.sub-main-card .sub-column-filters input,.sub-main-card .sub-column-filters select{padding:4px 7px;margin:3px 0}.sub-main-card .sub-filter-table{max-height:calc(100vh - 255px);min-height:280px}
@media(max-width:900px){#main:has(.sub-page-head){padding:12px}.sub-page-head>div:first-child{gap:4px}.sub-main-card .sub-filter-table{max-height:65vh}}

.request-list-grid{max-height:62vh;margin-bottom:12px}.request-list-grid table{min-width:1050px}.request-list-grid thead{position:sticky;top:0;background:#f5f8fc}.request-list-grid td{padding:8px;font-size:13px}.request-list-grid th{white-space:nowrap}

.accounting-upload{font-size:17px;font-weight:700;padding:12px 20px}

.accounting-return-top{display:flex;justify-content:flex-end;margin-bottom:12px}.accounting-return-fixed{position:fixed;right:28px;bottom:24px;z-index:20;box-shadow:0 4px 14px #123a7040}.main:has(.accounting-return-fixed){padding-bottom:95px}.accounting-history>summary{cursor:pointer;font-size:1.25rem;font-weight:600}.accounting-history>summary span{font-weight:400;margin-left:12px}.accounting-history[open]>summary{margin-bottom:16px}.sidebar .bottom-note{overflow-wrap:anywhere}

.profit-period{margin-bottom:14px;align-items:end}.profit-month h2{margin-bottom:12px}.profit-overview{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:6px 0 16px}.profit-overview>div{border:1px solid #dce4ef;border-radius:8px;background:#f5f8fc;padding:12px}.profit-overview>div:first-child{background:#edf4ff;border-color:#bed2f3}.profit-overview span{display:block;color:#617185;font-size:13px}.profit-overview strong{display:block;font-size:19px;margin-top:5px;font-variant-numeric:tabular-nums}.profit-overview small{font-size:12px;font-weight:400}.profit-accounts>tbody>tr>td{padding:10px 12px}.profit-accounts>tbody>tr>td:nth-child(3){font-weight:600}.profit-accounts summary{cursor:pointer;color:#235ed0}.profit-accounts details table{margin-top:8px}.profit-difference{display:flex;align-items:center;gap:16px;flex-wrap:wrap;background:#edf2fa;padding:12px 16px;margin-top:12px;border-radius:7px}.profit-difference strong{font-size:19px;color:#235ed0}.profit-basis{margin:12px 0 0}@media(max-width:1100px){.profit-overview{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:650px){.profit-overview{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Keep the account overview above the fold. */
#main:has(.profit-page-head){padding:16px 22px}.profit-page-head{margin-bottom:10px;gap:12px}.profit-page-head>div{display:flex;align-items:baseline;gap:16px;flex-wrap:wrap}.profit-page-head h1,.profit-page-head p{margin:0}.profit-page-head .accounting-upload{padding:8px 14px}.profit-period{margin-bottom:10px;align-items:center}.profit-period>label{display:flex;align-items:center;gap:10px}.profit-period select{padding:6px 10px}.profit-month{padding:14px 18px}.profit-month h2{margin-bottom:6px}.profit-overview{margin:4px 0 10px}.profit-overview>div{padding:9px 12px}@media(max-width:650px){#main:has(.profit-page-head){padding:14px}.profit-page-head>div{gap:4px}.profit-month{padding:12px}}

#main:has(.accounting-page-head){padding:16px 22px}.accounting-page-head{margin-bottom:12px;gap:12px}.accounting-page-head>div:first-child{display:flex;align-items:baseline;gap:16px;flex-wrap:wrap}.accounting-page-head h1,.accounting-page-head p{margin:0}.accounting-page-head button{padding:8px 14px}.accounting-ledger-card{padding:12px 16px}.accounting-ledger-filters{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin-bottom:10px}.accounting-ledger-filters>label{display:flex;align-items:center;gap:10px}.accounting-ledger-filters select{padding:6px 10px;width:230px;max-width:100%}.accounting-ledger-filters #accounting-month{width:145px}.accounting-ledger-card>.notice{padding:7px 12px;margin-bottom:10px}@media(max-width:650px){#main:has(.accounting-page-head){padding:14px}.accounting-page-head>div:first-child{gap:4px}.accounting-ledger-card{padding:12px}.accounting-ledger-filters{gap:8px}.accounting-ledger-filters>label{flex-wrap:wrap}}

.profit-flow-chart{overflow-x:auto}.profit-flow-chart svg{display:block;width:100%;height:245px}.profit-flow-chart text{font:13px Segoe UI,Malgun Gothic,sans-serif;fill:#617185}.profit-flow .money,.profit-accounts .money{text-align:right;white-space:nowrap}.profit-flow .flow-result{font-weight:700;color:#235ed0;background:#edf4ff}.profit-flow .flow-result.negative{color:#ba3434;background:#fff1f1}.profit-flow h2{margin-bottom:8px}

.filters>.price-advanced{position:relative;margin:0;padding:10px 12px;flex:0 0 auto;align-self:flex-end}.filters>.price-advanced>summary{white-space:nowrap}.filters>.price-advanced>.row{position:absolute;top:100%;left:0;z-index:30;width:420px;max-width:calc(100vw - 55px);padding:14px;margin-top:6px;background:#fff;border:1px solid #dbe4ef;border-radius:8px;box-shadow:0 6px 20px #17283e22}.filters:has(>.price-advanced){margin-bottom:10px}.filters>.price-advanced .row label{flex:1;min-width:150px}@media(max-width:700px){.filters>.price-advanced>.row{position:static;width:100%;box-shadow:none}.filters>.price-advanced[open]{flex-basis:100%}}

#main:has(.price-page-head){padding:16px 22px}.price-page-head{margin-bottom:10px}.price-page-head>div:first-child{display:flex;align-items:baseline;gap:16px;flex-wrap:wrap}.price-page-head h1{margin:0}.price-page-head button{padding:8px 12px}#main:has(.price-page-head)>.compact-summary{margin:6px 0 10px}#main:has(.price-page-head)>.parts{margin:10px 0 12px;gap:6px}#main:has(.price-page-head)>.parts button{padding:5px 12px}#main:has(.price-page-head)>.filters{gap:10px;margin-bottom:8px}#main:has(.price-page-head)>.filters label{gap:4px}#main:has(.price-page-head)>.filters input,#main:has(.price-page-head)>.filters select{padding:7px 10px}#main:has(.price-page-head)>.price-tools{margin:8px 0;gap:8px}#main:has(.price-page-head)>.price-tools button,#main:has(.price-page-head)>.price-tools select{padding:6px 10px}@media(max-width:700px){#main:has(.price-page-head){padding:14px}.price-page-head>div:first-child{gap:4px}}

#main:has(.price-page-head)>.filters>label>select,#main:has(.price-page-head)>.filters>label>input,#main:has(.price-page-head)>.filters>.price-advanced{height:36px;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;border:1px solid #c9d4e3;border-radius:7px;background:#fff;color:var(--ink);padding:7px 10px}#main:has(.price-page-head)>.filters>.price-advanced>summary{font:inherit;color:inherit;line-height:20px}@media(max-width:700px){#main:has(.price-page-head)>.filters>.price-advanced[open]{height:auto}}

.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.settings-grid>.panel{margin-bottom:0}.settings-personal{grid-column:1/-1}.settings-personal-grid{display:grid;grid-template-columns:2fr 1fr;gap:28px}.settings-personal details{margin-top:12px}.settings-page-head{margin-bottom:14px}.settings-page-head p{margin-bottom:0}@media(max-width:850px){.settings-grid,.settings-personal-grid{grid-template-columns:1fr}}

.account-session-info{display:grid;grid-template-columns:130px 1fr;gap:10px 16px;font-size:14px;margin:16px 0}.account-session-info dt{color:#617185}.account-session-info dd{margin:0;font-weight:600;overflow-wrap:anywhere}

/* Equal-height settings cards on the desktop grid. */
@media(min-width:851px){.settings-grid{grid-auto-rows:1fr;align-items:stretch}.settings-grid>.panel{height:100%;min-width:0}}

.settings-grid{gap:12px}.settings-grid>.panel{padding:16px 18px}.settings-grid h2{margin-bottom:10px}.settings-grid h3{margin-bottom:8px}.settings-grid p{margin-bottom:8px}.settings-grid th,.settings-grid td{padding:8px 10px}.settings-grid button{padding:7px 11px}.settings-grid .backup-box{margin-top:14px;padding:12px}.settings-grid .account-session-info{gap:8px 14px;margin:12px 0}.settings-page-head{margin-bottom:10px}#main:has(.settings-page-head){padding-top:18px;padding-bottom:18px}

.settings-grid>.panel{padding:12px 16px}.settings-grid h2{margin-bottom:8px}.settings-grid th,.settings-grid td{padding:5px 9px}.settings-grid td button{padding:3px 9px}.settings-grid #add-user{margin-top:10px!important;padding:5px 10px}.settings-grid .backup-box{margin-top:10px;padding:10px}.settings-grid .account-session-info{gap:6px 12px;margin:10px 0}.settings-grid .settings-app details{margin-top:8px}

.price-detail-head{gap:12px;margin-bottom:14px}.detail-vendor-price{display:flex;align-items:center;gap:22px;flex-wrap:wrap}.detail-current-price{display:inline-flex;align-items:center;gap:8px;color:#174bb5}.detail-current-price strong{font-size:30px;line-height:1.25;font-variant-numeric:tabular-nums}.detail-current-price>span:not(.tag){font-size:14px}.price-detail-overview{display:grid;grid-template-columns:minmax(280px,2fr) minmax(0,3fr);gap:14px;margin-bottom:16px}.price-detail-overview>.panel{margin:0;padding:16px;min-width:0}.price-detail-info .detail-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 18px;margin:14px 0}.price-detail-info .notice{margin-bottom:0;padding:9px 12px}.price-detail-chart h2{margin-bottom:6px}.price-detail-chart .chart-controls{gap:8px;margin-bottom:6px}.price-detail-chart .chart-controls input,.price-detail-chart .chart-controls select{padding:6px 8px;font-size:12px}.price-detail-chart .chart{height:205px;min-height:0}.price-detail-chart #chart-note{margin:6px 0 0}.price-detail-head #back{padding:8px 14px;min-height:36px;font-size:14px}@media(max-width:1000px){.price-detail-overview{grid-template-columns:1fr}.detail-current-price strong{font-size:26px}}

.price-detail-history{grid-template-columns:minmax(280px,2fr) minmax(0,3fr);gap:14px}.price-detail-history>.panel{min-width:0;padding:16px}.price-detail-history .history-list button{min-width:0;overflow-wrap:anywhere}@media(max-width:1000px){.price-detail-history{grid-template-columns:1fr}}

/* Raw-material order overview */
.raw-guide{display:flex;gap:20px;align-items:center;padding:12px 16px!important;margin-bottom:12px}.raw-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:12px}.raw-summary .panel{padding:12px 16px}.raw-summary strong{display:block;font-size:22px;margin-top:5px}.raw-late{color:#c83030}.raw-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}.raw-form-grid label{display:flex;flex-direction:column;gap:5px}.raw-wide{grid-column:1/-1}@media(max-width:760px){.raw-summary,.raw-form-grid{grid-template-columns:1fr 1fr}.raw-guide{display:block}.raw-guide span{display:block;margin-top:8px}}@media(max-width:480px){.raw-form-grid{grid-template-columns:1fr}}

.raw-line{border:1px solid #d4dff0;border-radius:8px;padding:10px 14px 14px;margin:14px 0}.raw-line legend{font-weight:700;padding:0 8px}.raw-line textarea{font:inherit;border:1px solid #c9d4e3;border-radius:6px;padding:8px;resize:vertical}

#production-stock{margin-top:24px;padding:16px}#production-stock h2{margin:0}.stock-scroll{max-height:520px;overflow:auto}.stock-scroll thead th{position:sticky;top:0;z-index:1;background:#f4f7fc}

/* Compact subcontract identification columns */
.sub-filter-table table{table-layout:fixed}.sub-filter-table th:nth-child(1){width:10%}.sub-filter-table th:nth-child(2){width:18%;min-width:0}.sub-filter-table th:nth-child(3){width:17%;min-width:0}.sub-filter-table th:nth-child(4){width:9%}.sub-filter-table th:nth-child(5){width:10%}.sub-filter-table th:nth-child(6){width:13%}.sub-filter-table th:nth-child(7){width:13%}.sub-filter-table th:nth-child(8){width:10%}.sub-filter-table td{overflow-wrap:anywhere}.sub-column-filters input,.sub-column-filters select{min-width:0;box-sizing:border-box}.request-list-grid table{min-width:1120px}
/* Keep production stock descriptions compact and quantities close by. */
#stock-table table{table-layout:fixed;min-width:880px}
#stock-table th:first-child{width:60px}
#stock-table th:nth-child(2){width:250px}
#stock-table th:last-child{width:140px}
#stock-table td:nth-child(2){white-space:normal;overflow-wrap:anywhere}
#stock-table th,#stock-table td{padding-left:10px;padding-right:10px}

#stock-table table{min-width:980px}#stock-table th:nth-child(2){width:160px}#stock-table th:nth-child(3){width:240px}#stock-table td:nth-child(3){white-space:normal;overflow-wrap:anywhere}
/* Dense production stock rows: show more inventory without shrinking text. */
#stock-table .stock-scroll{max-height:70vh;min-height:420px}
#stock-table td{padding-top:5px;padding-bottom:5px;vertical-align:middle;line-height:1.35}
#stock-table th{padding-top:8px;padding-bottom:8px}
#stock-table td button{padding:4px 9px;min-height:0;line-height:1.3}
#stock-table td .sub:empty{display:none}
#stock-table td .sub{margin-top:2px;line-height:1.3}
@media(max-height:650px){#stock-table .stock-scroll{min-height:280px}}

/* Compact purchasing filters and explicit inventory column widths. */
.raw-filters{max-width:760px}.raw-filters .grow{min-width:200px}
#stock-table table.stock-compact{width:auto;min-width:0;table-layout:fixed}
#stock-table table.stock-compact th{width:auto}
#stock-table table.stock-compact td{white-space:normal;overflow-wrap:anywhere}

/* Keep inventory search and its status filter together. */
#production-stock .filters{justify-content:flex-start}
#production-stock .filters label.grow{flex:0 1 480px;min-width:180px;max-width:100%}


/* Align the inventory scrollbar with the compact table edge. */
#stock-table .stock-scroll{width:fit-content;max-width:100%;box-sizing:border-box}


#stock-table th [data-stock-filter]{display:block;width:100%;min-width:0;box-sizing:border-box;margin-top:5px;padding:3px;font:inherit;font-weight:normal;height:27px}
#stock-filter-reset{display:block;margin-top:5px;padding:3px 7px;font:inherit;font-weight:normal}

#stock-table .stock-scroll{padding-right:12px}


.stock-header-label{display:flex;align-items:center;justify-content:space-between;gap:3px}
#stock-table .stock-column-trigger{padding:0 3px;border:0;background:transparent;min-width:14px;color:#64748b}
#stock-table .stock-column-trigger.active{color:#2159da;background:#e4edff}
.stock-filter-popup{position:fixed;z-index:10000;width:280px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);overflow:auto;box-sizing:border-box;background:white;border:1px solid #ccd7e8;border-radius:8px;box-shadow:0 5px 24px #152b4933;padding:12px;font-size:12px}
.stock-sort-actions{display:grid;margin:8px 0;gap:4px}.stock-filter-popup button{font:inherit;padding:5px 7px}.stock-value-search{width:100%;box-sizing:border-box;padding:7px;border:1px solid #ccd7e8;border-radius:4px}.stock-selection-actions,.stock-popup-actions{display:flex;gap:5px;margin-top:8px}.stock-value-list{height:210px;overflow:auto;margin-top:7px}.stock-value-list label{display:flex;align-items:center;gap:8px;padding:5px 2px;overflow-wrap:anywhere}.stock-value-list input{width:auto;margin:0}.stock-popup-actions{justify-content:flex-end;border-top:1px solid #e0e5ee;padding-top:8px}

#production-stock .stock-heading{justify-content:flex-start;gap:12px;flex-wrap:wrap}#production-stock .stock-sync-time{margin:0;color:#64748b}

/* Place filter actions next to the labels they affect. */
#stock-count{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:5px}
#stock-count #stock-filter-reset{display:inline-block;width:auto;margin:0;padding:3px 8px;line-height:1.3;font-size:12px}
#stock-table .stock-header-label{justify-content:flex-start;gap:5px}
#stock-table .stock-column-trigger{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:19px;height:20px;padding:0;border:1px solid #b8c9e3;border-radius:4px;background:#edf3fc;color:#315b91;font-size:12px;line-height:1}
#stock-table .stock-column-trigger:hover{background:#dce8fc;border-color:#5280cd}
#stock-table .stock-column-trigger.active{background:#245bda;color:white;border-color:#245bda}

/* Equal widths for purchase status selectors. */
.raw-filters #raw-kind,.raw-filters #raw-status{width:120px;box-sizing:border-box}


/* Push registration actions to the modal's upper-right edge. */
#raw-form .raw-register-heading{display:flex;width:100%;align-items:center;gap:8px}
#raw-form .raw-register-heading h2{flex:1 1 auto;margin:0 auto 0 0}
#raw-form .raw-register-heading button{flex:0 0 auto}


#supply-form .supply-form-heading{display:flex;align-items:center;gap:8px;width:100%;margin-bottom:16px}#supply-form .supply-form-heading h2{flex:1;margin:0 auto 0 0}#supply-form .supply-form-heading button{flex:0 0 auto}

/* Material stock confirmation action spacing. */
#material-summary { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-top:18px; margin-bottom:16px; }
#material-confirm-all { margin-right:20px; flex-shrink:0; }

/* Compact, right-aligned stock confirmation toolbar. */
#material-summary { justify-content:flex-end; gap:10px; margin-top:6px; margin-bottom:6px; padding:0; min-height:0; }
#material-confirm-all { margin-right:4px; padding:6px 10px; }

/* Keep confirmation controls on the filter row, without a separate toolbar row. */
.material-main-card > .row:first-child { align-items:flex-end; flex-wrap:wrap; }
.material-main-card > .row:first-child > #material-summary { margin:0 0 0 auto; padding:0; flex:0 0 auto; align-self:flex-end; min-height:32px; }

/* Distinguish stock input actions from downloads and history. */
.material-page-head #material-sync,
.material-page-head #material-receipt,
.material-page-head #material-upload {
 background:#f0f5ff;
 border-color:#cbdaf2;
 color:#263b57;
}
.material-page-head #material-sync:hover,
.material-page-head #material-receipt:hover,
.material-page-head #material-upload:hover {
 background:#e3edff;
 border-color:#adc6eb;
}

/* Keep specification and opening stock compact in the detailed stock table. */
.material-grid:not(.material-summary-view) :is(th,td):nth-child(2){width:170px;min-width:170px;max-width:170px;white-space:normal;overflow-wrap:anywhere;padding-left:10px;padding-right:10px}
.material-grid:not(.material-summary-view) tbody td:nth-child(2){min-width:170px;white-space:normal}
.material-grid:not(.material-summary-view) :is(th,td):nth-child(3){width:108px;min-width:108px;max-width:108px;white-space:nowrap;padding-left:8px;padding-right:8px}

.supply-request-list{width:fit-content;max-width:100%;padding:10px 12px;overflow-x:auto}
.supply-request-list table{width:960px;max-width:100%;table-layout:fixed}
.supply-request-list th,.supply-request-list td{padding:8px 10px;vertical-align:middle}
.supply-request-list th:nth-child(1){width:100px}
.supply-request-list th:nth-child(2){width:100px}
.supply-request-list th:nth-child(3){width:75px}
.supply-request-list th:nth-child(4){width:180px}
.supply-request-list th:nth-child(5){width:300px}
.supply-request-list td button{padding:6px 10px;min-height:30px}
.supply-request-list td strong{display:inline-block;margin-bottom:3px}

/* Supply confirmation: visible checkbox with adjacent label. */
#supply-form .supply-final-confirm{display:flex;align-items:center;gap:12px;width:fit-content;max-width:100%;box-sizing:border-box;margin:16px 0 10px;padding:12px 16px;border:1px solid #b8cae8;border-radius:9px;background:#eef4ff;cursor:pointer;color:#173b71}
#supply-form .supply-final-confirm input[type=checkbox]{appearance:auto;display:block;flex:0 0 22px;width:22px;height:22px;min-width:22px;margin:0;accent-color:#245adb;cursor:pointer}
#supply-form .supply-final-confirm span{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
#supply-form .supply-final-confirm strong{font-size:15px;font-weight:700}
#supply-form .supply-final-confirm small{font-size:12px;color:#a53b36}
#supply-form .supply-final-confirm:has(input:checked){border-color:#245adb;background:#e1ecff}
#supply-form .supply-final-confirm:focus-within{outline:2px solid #245adb;outline-offset:2px}

.supply-request-list:has(th:nth-child(6)) table{width:1130px}.supply-request-list th:nth-child(6){width:165px}.supply-request-list td:nth-child(6){line-height:1.8}

.supply-document-actions{display:grid;grid-template-rows:minmax(20px,auto) 18px 32px;gap:5px;align-items:start}.supply-document-actions>a{line-height:20px}.supply-document-actions>button{justify-self:start;margin:0;height:32px}.supply-request-list td:nth-child(5),.supply-request-list td:nth-child(6){vertical-align:top}

/* Compact price search and tools */
#main:has(.price-page-head)>.filters>label.grow{flex:0 1 340px;min-width:180px;max-width:100%}
#main:has(.price-page-head)>.price-tools{justify-content:flex-start;gap:16px;flex-wrap:wrap}
#main:has(.price-page-head)>.price-tools>.row{margin-left:0;justify-content:flex-start}

button.vendor-danger-delete{color:#b42318;background:#fff1f0;border:1px solid #f1a5a0;font-weight:600;font-size:12px;padding:5px 10px;margin-left:18px;white-space:nowrap}button.vendor-danger-delete:hover{color:white;background:#b42318;border-color:#b42318}.accounting-ledger-card td:last-child .vendor-danger-delete{display:block;margin:10px 0 0 auto}

.vendor-group>summary{position:relative;padding-right:160px}.vendor-group>summary>.vendor-danger-delete{position:absolute;right:16px;top:50%;transform:translateY(-50%);margin:0}.vendor-group>summary>.group-count{position:absolute;right:78px;top:50%;transform:translateY(-50%);float:none;margin:0}

.profit-total{border:1px solid #b9cfee;background:#f8fbff}.profit-total-row{background:#eaf1fc;border-top:2px solid #b9cfee}.profit-total-row th,.profit-total-row td{padding:12px 10px}

.profit-month strong:has(>span[style*="color:#d92d20"]),.profit-total strong:has(>span[style*="color:#d92d20"]){color:#d92d20!important}.profit-month strong:has(>span[style*="color:#d92d20"]) small,.profit-total strong:has(>span[style*="color:#d92d20"]) small{color:inherit!important}

.profit-flow-graphs{display:flex;align-items:stretch;gap:16px}.profit-flow-graphs>.profit-flow-chart{flex:1;min-width:0}.profit-flow-total{flex:0 0 190px;border-left:1px solid #dce4ef}.profit-flow-total svg{display:block;width:100%;height:245px}.profit-flow-total text{font:13px Segoe UI,Malgun Gothic,sans-serif;fill:#617185}.profit-flow-total .total-caption{font-weight:700;fill:#173454}.profit-flow-total .total-scale{font-size:11px}

.profit-accounts .profit-category-cell{padding:0}.profit-category>summary{display:flex;align-items:center;gap:16px;padding:14px 12px;cursor:pointer;background:#f5f8fc}.profit-category>summary:before{content:"▶";font-size:10px;color:#617185}.profit-category[open]>summary:before{content:"▼"}.profit-category>summary>.money{margin-left:auto;white-space:nowrap}.profit-category>table{width:100%}

#production-stock.stock-trend-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(340px,1fr);gap:28px;align-items:start}.stock-trend-left{min-width:0}.stock-trend-panel{min-width:0;border:1px solid #dce5f0;border-radius:12px;padding:20px;background:#f8fbff}.stock-trend-panel h2{margin-bottom:10px!important}.stock-trend-panel select{width:100%}.stock-trend-controls{margin:14px 0;align-items:end}.stock-trend-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}.stock-trend-stats>div{background:white;border:1px solid #dce5f0;border-radius:8px;padding:14px}.stock-trend-stats span{display:block;font-size:12px;color:#617185}.stock-trend-stats strong{display:block;font-size:23px;margin-top:6px}.stock-trend-stats small{font-size:12px;font-weight:400}.stock-trend-svg{width:100%;height:auto}.stock-trend-svg text{font:11px 'Segoe UI','Malgun Gothic',sans-serif;fill:#617185}.stock-trend-values{max-height:230px;overflow:auto;margin-top:10px}@media(max-width:1200px){#production-stock.stock-trend-layout{grid-template-columns:1fr}}

/* Inventory identity links select the matching receipt/issue history. */
#stock-table .stock-trend-link{display:inline;padding:0;margin:0;border:0;border-radius:2px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;line-height:1.5;box-shadow:none}
#stock-table .stock-trend-link-name{font-weight:700}
#stock-table td.stock-spec-cell{min-width:150px}
#stock-table .stock-trend-link-spec{font-size:16px;font-weight:600;white-space:normal;overflow-wrap:normal;word-break:keep-all}
#stock-table .stock-trend-link:hover{color:#245dcc;text-decoration:underline}
#stock-table .stock-trend-link:focus-visible{outline:2px solid #245dcc;outline-offset:3px}
#stock-table tr.stock-trend-selected td{background:#edf4ff}

/* Keep drawing identifiers intact while tightening quantity columns. */
#stock-table table.stock-compact td.stock-drawing-cell,#stock-table .stock-trend-link-drawing{white-space:nowrap;overflow-wrap:normal;word-break:normal}
#stock-table table.stock-compact .stock-quantity-cell{padding-left:5px;padding-right:5px;white-space:nowrap}

/* Compact identity columns and single-line item names. */
#stock-table table.stock-compact .stock-identity-short{padding-left:4px;padding-right:4px;white-space:nowrap;overflow-wrap:normal}
#stock-table table.stock-compact td.stock-name-cell,#stock-table .stock-trend-link-name{white-space:nowrap;overflow-wrap:normal;word-break:normal}

/* Fit the whole inventory overview; only specs and drawings stay on one line. */
#stock-table .stock-scroll{width:100%;padding-right:0}
#stock-table table.stock-compact{width:100%;min-width:0;table-layout:fixed}
#stock-table table.stock-compact th,#stock-table table.stock-compact td{padding-left:3px;padding-right:3px;min-width:0;white-space:normal;overflow-wrap:anywhere}
#stock-table table.stock-compact td.stock-spec-cell{min-width:0}
#stock-table table.stock-compact td.stock-name-cell,#stock-table .stock-trend-link-name{white-space:normal;overflow-wrap:anywhere;word-break:normal}
#stock-table .stock-header-label{white-space:normal;gap:1px;align-items:center}
#stock-table .stock-column-trigger{flex-shrink:0}
#stock-table table.stock-compact td.stock-drawing-cell,#stock-table .stock-trend-link-drawing,#stock-table table.stock-compact td.stock-spec-cell,#stock-table .stock-trend-link-spec{white-space:nowrap;overflow-wrap:normal;word-break:normal}
#stock-table td button[data-stock-row]{max-width:100%;padding:4px 3px;white-space:normal}
#stock-table .stock-trend-link-spec,#stock-table .stock-trend-link-drawing{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis}

/* Prioritize the inventory overview and keep every column heading on one line. */
#production-stock.stock-trend-layout{grid-template-columns:minmax(0,1fr) clamp(300px,24%,380px);gap:20px}
.stock-trend-panel{padding:16px}
#stock-table table.stock-compact thead th{font-size:12px;line-height:1.35;padding:8px 3px;white-space:nowrap;overflow-wrap:normal;word-break:keep-all}
#stock-table .stock-header-label{white-space:nowrap;gap:2px;letter-spacing:-.3px}
#stock-table thead .stock-column-trigger{font-size:10px;line-height:1.2;min-width:12px;padding:0 2px;margin:0}
@media(max-width:1400px){#production-stock.stock-trend-layout{grid-template-columns:1fr}}

#stock-table .stock-trend-link-drawing{font-weight:700}

#stock-table table.stock-compact thead th{font-size:13px}
#stock-table .stock-header-label{letter-spacing:-.4px;gap:1px}

/* Separate item specifications, drawings and lengths in both price views. */
.price-spec-value,.price-drawing-value{color:#245bdb;font-weight:700}
.price-drawing-value,.price-length-value{white-space:nowrap}
.price-spec-value{min-width:100px}

/* Allocate width to item identity instead of short metadata fields. */
table.price-list-table{width:100%;min-width:1050px;table-layout:fixed}
table.price-list-table th,table.price-list-table td{padding:10px 8px;overflow-wrap:anywhere}
table.price-list-table th{white-space:nowrap}
table.price-list-table .price-spec-value{min-width:0}
table.price-list-table .price-drawing-value{white-space:normal;word-break:break-word}
table.price-list-table .price-length-value{white-space:normal}
table.price-list-table .select-all-label{font-size:11px;gap:3px;white-space:normal}
table.price-list-table button.link{text-align:left;white-space:normal;overflow-wrap:anywhere}

/* Compact price metadata with prominent amounts and accessible detail links. */
table.price-list-table{max-width:1400px}
table.price-list-table th,table.price-list-table td{padding-left:6px;padding-right:6px}
table.price-list-table .price-current-amount{font-size:16px;font-weight:700;color:#173f75;background:#f5f8fe;font-variant-numeric:tabular-nums}
table.price-list-table button.price-identity-link{font-weight:700;color:var(--blue);padding:0;margin:0;line-height:1.5}
table.price-list-table button.price-identity-link:hover{text-decoration:underline}
table.price-list-table button.price-identity-link:focus-visible{outline:2px solid var(--blue);outline-offset:3px}

table.price-list-table{width:100%;max-width:none}

table.price-list-table .select-all-label{display:flex;align-items:center;gap:6px;white-space:nowrap;font:inherit;color:inherit}
table.price-list-table input[type=checkbox]{width:20px;height:20px;min-width:20px;flex:0 0 20px;margin:0;vertical-align:middle}

button.primary.price-delete-selected{background:#dc3545;border-color:#dc3545;color:white}button.primary.price-delete-selected:hover{background:#bd2433;border-color:#bd2433}

.business-progress{margin:20px 0 24px;border:1px solid #dce4ef;border-top:4px solid #214e81;padding:24px;background:white;border-radius:12px}
.business-progress h2{margin:0;color:#163450;font-size:22px}
.business-summary{display:grid;grid-template-columns:repeat(4,1fr);margin:22px 0;background:#f5f8fc;border-radius:8px;padding:18px 0}
.business-summary>div{padding:0 24px;border-right:1px solid #dce4ef}.business-summary>div:last-child{border-right:0}
.business-summary span{display:block;color:#60758d;font-size:13px}.business-summary strong{display:block;font-size:28px;color:#173f75;margin-top:4px}.business-summary small{font-size:13px;font-weight:400;margin-left:6px}
.business-progress table{min-width:950px;width:100%}.business-progress td{padding:18px 12px;vertical-align:middle}.business-progress th{padding:12px;white-space:nowrap}.business-progress-column{width:23%;min-width:200px}
.business-progress-meter{min-width:180px}.business-progress-meter>span{display:block;text-align:right;font-size:13px;font-weight:700;color:#245dcc;margin-bottom:7px}.business-track{height:10px;background:#e5ebf3;border-radius:8px;overflow:hidden}.business-track i{display:block;height:100%;background:#3676d8;border-radius:8px}.business-progress-meter.unknown>span{color:#7c8b9b;font-weight:400}.business-progress-meter.unknown .business-track{background:repeating-linear-gradient(135deg,#edf1f6,#edf1f6 5px,#e3e9f1 5px,#e3e9f1 10px)}
@media(max-width:700px){.business-summary{grid-template-columns:repeat(2,1fr);gap:16px}.business-summary>div{padding:0 15px}}

.business-progress .business-registration-date{width:112px;white-space:nowrap;font-variant-numeric:tabular-nums}

.business-toolbar input{width:290px;max-width:100%}.business-progress [hidden]{display:none!important}.business-progress .table-wrap{max-height:480px;overflow:auto}.business-progress thead th{position:sticky;top:0;background:#f5f8fc;z-index:1}

.business-summary .business-count-button{display:block;border:0;background:transparent;padding:0;margin-top:4px;font:inherit;font-size:28px;font-weight:700;color:#173f75;text-align:left;line-height:1.55}
.business-summary .business-count-button:hover{color:#245dcc;text-decoration:underline}.business-summary .business-count-button:focus-visible{outline:2px solid #245dcc;outline-offset:4px}
.business-popup{border:0;padding:0;margin:16px 0}.business-popup .table-wrap{max-height:60vh}

.business-progress .business-status-cell{min-width:78px;width:78px;white-space:nowrap}
.business-progress .business-status-cell .tag,.business-progress .business-due-cell{white-space:nowrap}
.business-popup .business-progress-column{width:21%}
.business-popup .business-title-edit{font-weight:700;text-align:left;line-height:1.6;white-space:normal;padding:0;color:var(--blue)}
.business-popup .business-title-edit:hover{text-decoration:underline}

.business-progress .business-title-edit{font-weight:700;text-align:left;line-height:1.6;white-space:normal;padding:0;color:var(--blue)}
.business-progress .business-title-edit:hover{text-decoration:underline}
.business-progress .business-title-edit:focus-visible{outline:2px solid var(--blue);outline-offset:3px}

/* Compact, explicit ascending/descending controls for the task overview. */
#business-progress .business-sort-label{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
#business-progress .business-sort-arrows{display:inline-flex;flex-direction:column;gap:1px}
#business-progress .business-sort-arrows button{display:flex;align-items:center;justify-content:center;width:22px;height:17px;min-height:0;padding:0;margin:0;border:1px solid transparent;border-radius:3px;background:transparent;color:#8190a6;font-size:10px;line-height:1}
#business-progress .business-sort-arrows button:hover{background:#e3edff;color:#245ed0}
#business-progress .business-sort-arrows button.selected{background:#e3edff;border-color:#bed0f2;color:#245ed0}
#business-progress .business-sort-arrows button:focus-visible{outline:2px solid #245ed0;outline-offset:1px}

/* Keep plain and sortable headings on the same horizontal line. */
#business-progress thead th{vertical-align:middle}
#business-progress .business-sort-label{vertical-align:middle}

#business-overview-open{background:#d8f1ff;border:1px solid #80c9ef;color:#075781;font-weight:700;padding:10px 18px}
#business-overview-open:hover{background:#bfe7ff}
#business-overview{left:2vw;top:5vh;width:96vw;height:88vh;max-width:96vw;max-height:92vh}
#business-overview .project-dialog-body{display:flex;flex-direction:column;gap:12px;overflow:hidden}
#business-overview .overview-tools input{width:360px;max-width:100%}
#business-overview .overview-people{display:flex;flex-wrap:wrap;gap:7px;max-height:120px;overflow:auto;flex-shrink:0}
#business-overview .overview-people button{font-size:13px;padding:7px 12px;border-radius:18px}
#business-overview [aria-pressed=true]{background:#d8efff;border-color:#79bde7;color:#075781;font-weight:700}
#business-overview .overview-table{flex:1;min-height:0;overflow:auto;border:1px solid #dce4ef;border-radius:8px}
#business-overview table{width:100%;min-width:1100px;table-layout:fixed}
#business-overview th{position:sticky;top:0;background:#f1f6fd;z-index:1;vertical-align:middle;white-space:nowrap;padding:10px}
#business-overview td{padding:12px 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;font-size:13px}
#business-overview tr[data-overview-task]{cursor:pointer}
#business-overview tr[data-overview-task]:hover{background:#eef7ff}
#business-overview .overview-task-title{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;text-align:left;font-weight:600}
#business-overview .overview-arrows{display:inline-flex;flex-direction:column;vertical-align:middle;margin-left:5px;gap:1px}
#business-overview .overview-arrows button{width:20px;height:16px;padding:0;line-height:1;font-size:9px;border:1px solid transparent;border-radius:3px;color:#5b7898}
#business-overview p{margin:0}

.accounting-ledger-card td.accounting-delete-cell{vertical-align:middle}.accounting-ledger-card td.accounting-delete-cell .vendor-danger-delete{margin:0 0 0 auto}

/* Plain pointer for task data; hand only on actionable task buttons. */
#business-content tbody tr[data-business-id],#business-content tbody tr[data-business-id] td{cursor:default}
#business-content tbody tr[data-business-id] button,#business-content tbody tr[data-business-id] button *{cursor:pointer}

/* Match period actions to adjacent filter controls. */
.material-main-card #material-period-delete,.material-main-card #material-period-restore{height:32px;min-height:32px;padding:6px 9px;font-size:13px;line-height:18px;margin:0;align-self:flex-end;white-space:nowrap}


.business-sort-toggle{border:0;background:transparent;padding:3px 0;color:inherit;font:inherit;white-space:nowrap;text-align:left}.business-sort-toggle [data-sort-icon]{font-size:10px;color:#7890ad}.business-sort-toggle:hover{color:#245dc0}

/* Distinguish weekly and monthly totals. */
.company-total-row > th,.company-total-row > td{background:#f0f1f3;font-weight:700;}

/* Balance of the exact ledger rows currently displayed. */
.accounting-balance-summary{margin-left:auto;display:grid;gap:3px;padding:10px 16px;background:#f1f3f5;border:1px solid #e2e6ea;border-radius:8px;text-align:right;min-width:240px}.accounting-balance-summary>span:first-child{font-size:13px;color:#52627a}.accounting-balance-summary strong{font-size:22px;font-weight:700;line-height:1.3;font-variant-numeric:tabular-nums;white-space:nowrap}.accounting-balance-summary strong small{font-size:13px;font-weight:400}@media(max-width:650px){.accounting-balance-summary{width:100%;min-width:0;box-sizing:border-box}}

/* Consistent stock rows and confirmation buttons; expanded details may grow. */
.material-grid:not(.material-summary-view) tbody tr{height:52px}
.material-grid:not(.material-summary-view) tbody td{box-sizing:border-box;height:52px;padding-top:6px;padding-bottom:6px;vertical-align:middle}
.material-grid:not(.material-summary-view) tbody button[data-stock-confirm]{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:86px;height:32px;min-height:32px;padding:0 10px;margin:0;font-size:13px;line-height:18px;white-space:nowrap;vertical-align:middle}

/* Separate paid KIV stock without changing data rows. */
.material-grid:not(.material-summary-view) tbody tr.material-paid-divider{height:38px}
.material-grid:not(.material-summary-view) tbody tr.material-paid-divider>th{height:38px;box-sizing:border-box;padding:8px 12px;text-align:left;background:#fff3d6;color:#704b13;font-size:14px;font-weight:700;border-top:2px solid #c69235;border-bottom:1px solid #e6cd97}

/* Keep filter controls separate from the compact guide/action row. */
.material-main-card>.row:first-child{margin-bottom:6px;gap:6px 8px}
.material-context-row{display:flex;align-items:center;justify-content:space-between;gap:6px 16px;flex-wrap:wrap;margin:4px 0 6px}
.material-context-row>p.tiny{flex:1 1 440px;margin:0;line-height:1.5}
.material-context-row>#material-summary{flex:0 1 auto;justify-content:flex-start;gap:8px;margin:0;padding:0;min-height:32px}
.material-context-row>#material-summary>button{height:32px;min-height:32px;padding:0 10px;margin:0;font-size:12px;line-height:18px;white-space:nowrap}
.material-context-row>#material-summary>strong,.material-context-row>#material-summary>span{white-space:nowrap;font-size:12px}
.material-main-card>.notice{margin:0 0 8px;padding:7px 10px;line-height:1.5}

/* Compact supply request page header only; editor and quantity fields unchanged. */
#main:has(>.supply-page-head){padding-top:12px}
#main>.supply-page-head{align-items:center;flex-wrap:wrap;gap:6px 8px;margin:0 0 8px}
.supply-page-head>h1{margin:0;line-height:1.35}
.supply-page-head>button,.supply-page-head>a.button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;height:34px;min-height:34px;padding:0 12px;margin:0;font-size:13px;line-height:18px;white-space:nowrap}
#main>.supply-flow-guide{margin:0 0 4px;line-height:1.5}
#main>.supply-rule-guide{margin:0 0 4px;line-height:1.5}
#main>.supply-sync-guide{margin:0 0 8px;line-height:1.5}
#main>.supply-sync-guide+.supply-week>h3{margin-top:8px!important}

/* Compact subcontract header controls only; quantity table and calculations unchanged. */
#main:has(.sub-page-head){padding-top:12px}
.sub-page-head{margin-bottom:6px;gap:6px 10px}
.sub-page-head>.row,.sub-page-tabs{gap:6px;flex-wrap:wrap}
.sub-page-head button,.sub-page-head a.button,.sub-page-tabs button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;height:32px;min-height:32px;margin:0;padding:0 10px;font-size:13px;line-height:18px;white-space:nowrap}
.sub-page-tabs{margin:0 0 6px}
.sub-main-card{padding:10px 12px}
.sub-main-card>.row:first-child{align-items:flex-end;flex-wrap:wrap;gap:6px 8px;margin:0}
.sub-main-card>.row:first-child>label{margin:0;gap:2px}
.sub-main-card>.row:first-child>label:last-child{min-width:200px}
.sub-main-card>.row:first-child input,.sub-main-card>.row:first-child select{box-sizing:border-box;height:32px;min-height:32px;margin:0;padding:5px 8px;font-size:13px;line-height:20px;max-width:100%}
.sub-main-card>p.tiny{margin:3px 0 4px;line-height:1.5}
.sub-main-card .sub-filter-tools{margin:4px 0;gap:6px 10px}
.sub-main-card .sub-filter-tools button,.sub-main-card #sub-orders button{box-sizing:border-box;height:30px;min-height:30px;padding:0 9px;margin:0;font-size:12px;line-height:18px;white-space:nowrap}
.sub-main-card #sub-orders{gap:6px;flex-wrap:wrap}
.sub-main-card #sub-result-summary{padding:5px 9px;margin-bottom:5px;gap:8px 14px}

/* Overview: aligned summary actions, with more room for task titles. */
#business-overview .overview-title-actions{display:flex;align-items:center;gap:8px;min-width:0}
#business-overview .overview-title-actions .overview-task-title{flex:1;min-width:0}
#business-overview .overview-title-actions .business-summary-open{flex:0 0 44px;width:44px;height:28px;padding:0 6px;white-space:nowrap;font-size:12px}

/* Weekly plan heading and selector share a vertical center. */
.row:has(> #company-week){align-items:center;gap:12px;margin-bottom:12px}
.row:has(> #company-week)>h2{margin:0;line-height:1.4}
.row>#company-week{margin:0;min-height:40px;width:auto;max-width:100%}

.company-plan-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.company-plan-toolbar h2{margin:0;line-height:1.4}
.company-plan-toolbar>label{display:flex;align-items:center;gap:8px;margin:0;font-size:12px;color:#60738d}
.company-plan-toolbar select{width:auto;margin:0;min-height:40px}
.company-plan-toolbar [hidden]{display:none!important}
.company-plan-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0}
.company-plan-totals>div{background:#f3f7fc;border:1px solid #dce5f0;border-radius:8px;padding:14px;display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.company-plan-totals span{font-size:13px;color:#60738d}.company-plan-totals b{color:#194572;margin-left:6px}
.company-plan-week-options{max-height:260px;overflow:auto;padding:10px;border:1px solid #dce5f0}
.company-plan-week-options label{display:flex;align-items:center;gap:8px;margin:6px 0}.company-plan-week-options input{width:auto}
@media(max-width:700px){.company-plan-totals{grid-template-columns:1fr}}

.company-plan-totals>div>strong{font-size:16px}
.company-plan-totals b{font-size:15px}

.company-monthly-table tbody td:nth-child(2),
.company-monthly-table tbody td:nth-child(5),
.company-monthly-table tfoot th,
.company-monthly-table tfoot td{font-weight:700}
