.inventory-danger{background:#ffe4e8;color:#8e1730}.inventory-warning{background:#fff4ce;color:#644600}.inventory-badge{display:inline-block;padding:5px 8px;border-radius:6px;font-weight:700;margin:2px}.inventory-badge.danger{background:#ffd0d8;color:#8e1730}.inventory-badge.warning{background:#ffeaa0;color:#644600}#inv-preview{padding:12px}#inv-error{color:#9b2038}#inv-rules input{max-width:180px}

.task-row.inventory-danger{background:#ffe4e8}.task-row.inventory-warning{background:#fff4ce}.task-header .title small{display:block;margin-top:5px}
.panel:has(#inv-filter) table{min-width:1120px}.panel:has(#inv-filter) th:nth-child(2){min-width:230px}.panel:has(#inv-filter) th:nth-child(3){min-width:145px}.panel:has(#inv-filter) th:nth-child(4){min-width:100px}.panel:has(#inv-filter) th:nth-child(5){min-width:220px}.panel:has(#inv-filter) th:nth-child(6){min-width:190px}.panel:has(#inv-filter) th:nth-child(7){min-width:135px}
.inventory-drop{border:2px dashed #8eb5cd;background:#f1f7fc;border-radius:9px;padding:18px 22px;margin:14px 0;display:flex;align-items:center;gap:15px;flex-wrap:wrap;transition:background .15s,border-color .15s}.inventory-drop small{width:100%;color:var(--muted)}.inventory-drop.dragging{background:#dcecf8;border-color:#286387}.panel:has(#inv-filter) table{min-width:1380px}.panel:has(#inv-filter) th:nth-child(2){min-width:230px}.panel:has(#inv-filter) th:nth-child(3),.panel:has(#inv-filter) th:nth-child(4),.panel:has(#inv-filter) th:nth-child(5){min-width:115px}.panel:has(#inv-filter) th:nth-child(7){min-width:200px}
.panel:has(#inv-drop)>p:first-of-type{margin:0;padding:20px 24px 12px;line-height:1.85;overflow-wrap:anywhere}.panel:has(#inv-drop)>.toolbar{padding:0 24px;margin:12px 0}.panel:has(#inv-drop)>.inventory-drop{margin:16px 24px;padding:22px 26px}.panel:has(#inv-drop)>#inv-error{margin:12px 24px}.panel:has(#inv-drop)>#inv-preview{padding:14px 24px 22px}.panel:has(#inv-drop) #inv-source-text{width:100%;font-size:13px;line-height:1.6;white-space:pre;overflow:auto}.panel:has(#inv-drop) #inv-reparse{margin:10px 0 16px}
.panel:has(#inv-rules)>h2{padding:18px 24px 4px}.panel:has(#inv-rules)>#inv-rules{padding:0 24px;margin:8px 0}.panel:has(#inv-rules)>p{padding:8px 24px 20px;margin:0;line-height:1.8;overflow-wrap:anywhere}
.panel:has(#inv-filter)>.toolbar{padding:0 24px;margin:18px 0 22px;gap:18px}.panel:has(#inv-filter)>.callout{margin:18px 24px;padding:20px 24px}.panel:has(#inv-filter)>p{margin:16px 24px 20px;line-height:1.8;overflow-wrap:anywhere}.panel:has(#inv-filter)>.table-wrap{margin:0 24px 20px}.panel:has(#inv-filter)>details{margin:0 24px 22px}
.inventory-import-confirm{display:flex;align-items:center;gap:10px;margin:18px 0 8px;padding:14px 16px;border:1px solid #b8cddc;border-radius:8px;background:#f3f8fb;font-weight:700}.inventory-import-confirm input{width:22px;height:22px;flex:none}.inventory-import-error{color:#9b2038;font-weight:700}.panel:has(#inv-candidates) #inv-apply:disabled{opacity:.45;cursor:not-allowed;filter:grayscale(.45)}.panel:has(#inv-candidates) .inventory-warning{margin:14px 0;padding:14px 16px;border-left:4px solid #b57900;background:#fff4ce;color:#604600;line-height:1.7}
.panel:has(#inv-filter) td.inventory-category{white-space:nowrap;writing-mode:horizontal-tb;min-width:100px}
.panel:has(#inv-filter) th:nth-child(6),.panel:has(#inv-filter) td:nth-child(6){min-width:125px;width:125px}
.panel:has(#inv-filter) th:nth-child(7){min-width:155px}
.panel:has(#inv-filter) th:nth-child(8),.panel:has(#inv-filter) td.inventory-source{min-width:150px;max-width:210px}
.panel:has(#inv-filter) td.inventory-source{white-space:normal;line-height:1.5}
.inventory-source-toggle{display:block;margin:5px 0;padding:4px 8px;font-size:.9em}
.inventory-source-details{display:block;overflow-wrap:anywhere;margin:4px 0}
.inventory-source-details[hidden]{display:none!important}
.panel:has(#inv-filter) td.inventory-source{display:flex;flex-direction:column;align-items:flex-start}
.panel:has(#inv-filter) td.inventory-source>span:first-child{order:2}
.panel:has(#inv-filter) td.inventory-source>.inventory-source-toggle{order:1}
.panel:has(#inv-filter) td.inventory-source>.inventory-source-details{order:3}
.inventory-source small{display:block;white-space:nowrap}
.inventory-warning-list{display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.inventory-warning-list .inventory-badge{display:block;margin:0;white-space:normal}
.inventory-warning-list .inventory-note{overflow-wrap:anywhere}
.panel:has(#inv-filter) td:nth-child(5)>small{display:block}
.panel:has(#inv-filter) th:nth-child(3),.panel:has(#inv-filter) td:nth-child(3){min-width:220px}
.panel:has(#inv-filter) th:nth-child(4),.panel:has(#inv-filter) td:nth-child(4),.panel:has(#inv-filter) th:nth-child(5),.panel:has(#inv-filter) td:nth-child(5){min-width:115px}
.panel:has(#inv-filter) td.inventory-source{display:table-cell;position:relative;vertical-align:top}
.panel:has(#inv-filter) td.inventory-source>span:first-child{display:block;order:initial;margin-top:58px}
.panel:has(#inv-filter) td.inventory-source>.inventory-source-toggle{position:absolute;top:8px;left:0;order:initial;margin:0}
.panel:has(#inv-filter) td.inventory-source>.inventory-source-details{order:initial}
.panel:has(#inv-filter) td:nth-child(9)>small::before{content:"・"}
.panel:has(#inv-filter) td:nth-child(9)>small{display:block;margin-top:6px;line-height:1.6;text-align:left}
.material-usage-panel>#material-stocktake-drop{margin:18px 32px 24px;padding:28px 34px;gap:18px;line-height:1.65}
.material-usage-panel .panel-head{align-items:center;gap:16px;flex-wrap:wrap}.material-usage-panel .stocktake-date-control{display:grid;gap:6px;min-width:190px;color:var(--muted);font-size:.9rem;font-weight:600}.material-usage-panel .stocktake-date-control input{width:100%;min-height:42px}.material-usage-panel .store-switch{display:flex;gap:10px;padding:16px 24px}.material-usage-panel .store-switch button{flex:1;min-height:48px}.material-usage-panel>p{margin:0;padding:12px 24px 18px;line-height:1.8;overflow-wrap:anywhere}
.material-usage-panel>#material-stocktake-drop small{margin-top:2px;line-height:1.7}
.panel>p:not(.panel-head){margin:14px 24px;line-height:1.8;overflow-wrap:anywhere}
.panel>h3{margin:22px 24px 10px}
.panel>form,.panel>.toolbar{margin:14px 24px}
.panel>.table-wrap{margin:0 24px 20px}
.panel>details{margin:0 24px 18px}
.material-stocktake-candidates{margin:18px 32px 22px;padding:22px 26px;border:1px solid #d1e0e9;border-radius:9px;background:#fff}
.material-stocktake-candidates h4{margin:0 0 10px;line-height:1.6;overflow-wrap:anywhere}
.material-stocktake-candidates>p{margin:8px 0 14px;line-height:1.8;overflow-wrap:anywhere}
.material-stocktake-candidates .table-wrap{margin:14px 0 18px}
.material-usage-panel>#material-stocktake-form{margin:18px 24px 22px;padding:18px;border:1px solid #d1e0e9;border-radius:9px;background:#fff}
.material-usage-panel>#material-stocktake-form>.table-wrap{margin:0 0 16px}
.material-usage-panel>details{margin-inline:24px}
@media(max-width:700px){.material-usage-panel>#material-stocktake-drop{margin:14px 14px 20px;padding:20px;gap:14px}.material-usage-panel .store-switch{padding:12px 14px;flex-direction:column}.material-usage-panel .stocktake-date-control{width:100%}.material-usage-panel>#material-stocktake-form{margin:14px 16px 18px;padding:14px}}
@media(max-width:700px){.panel>p:not(.panel-head){margin:12px 16px}.panel>h3{margin:18px 16px 8px}.panel>form,.panel>.toolbar{margin:12px 16px}.panel>.table-wrap{margin-inline:16px}.panel>details{margin-inline:16px}.material-stocktake-candidates{margin:14px 14px 18px;padding:18px}.material-usage-panel>#material-stocktake-form{margin:14px 16px 18px}.material-usage-panel>details{margin-inline:16px}}
@media(min-width:1200px){.panel:has(#inv-filter)>.table-wrap{overflow-x:hidden}.panel:has(#inv-filter) table{width:100%;min-width:0!important;table-layout:fixed}.panel:has(#inv-filter) th,.panel:has(#inv-filter) td{min-width:0!important;padding:8px 6px;white-space:normal;overflow-wrap:anywhere}.panel:has(#inv-filter) th:nth-child(1),.panel:has(#inv-filter) td:nth-child(1){width:8%}.panel:has(#inv-filter) th:nth-child(2),.panel:has(#inv-filter) td:nth-child(2){width:17.5%}.panel:has(#inv-filter) th:nth-child(3),.panel:has(#inv-filter) td:nth-child(3),.panel:has(#inv-filter) th:nth-child(4),.panel:has(#inv-filter) td:nth-child(4){width:9%}.panel:has(#inv-filter) th:nth-child(5),.panel:has(#inv-filter) td:nth-child(5){width:76px;font-size:.9em}.panel:has(#inv-filter) th:nth-child(6),.panel:has(#inv-filter) td:nth-child(6){width:9%}.panel:has(#inv-filter) th:nth-child(7),.panel:has(#inv-filter) td:nth-child(7){width:15%}.panel:has(#inv-filter) th:nth-child(8),.panel:has(#inv-filter) td:nth-child(8){width:14%}.panel:has(#inv-filter) th:nth-child(9),.panel:has(#inv-filter) td:nth-child(9){width:10%}.panel:has(#inv-filter) td.inventory-source{display:table-cell;max-width:none}.panel:has(#inv-filter) td.inventory-source>span:first-child{overflow-wrap:anywhere}}
@media(min-width:1200px){.panel:has(#inv-filter) td:nth-child(9) button{min-height:38px;padding:6px 8px;font-size:13px;white-space:nowrap}.panel:has(#inv-filter) td:nth-child(9)>small{font-size:11px}}
 .material-stocktake-toolbar{align-items:end;gap:16px}.material-stocktake-toolbar label{display:grid;gap:6px;min-width:220px}.material-stocktake-import-body{padding:18px 24px 22px}.material-stocktake-import-body>#material-stocktake-drop{margin:0;padding:24px 28px;gap:16px;line-height:1.7}.material-stocktake-import-body>#material-stocktake-drop small{line-height:1.7}.material-stocktake-import-body>[role=status]{margin:14px 0 0}.material-stocktake-candidates .panel-head{padding:14px 24px}.material-stocktake-candidates>p{margin:0;padding:12px 24px 16px}.material-stocktake-ledger>p{margin:0;padding:12px 24px;line-height:1.8}.material-stocktake-ledger form{margin:8px 24px 20px}.material-stocktake-ledger form>.table-wrap{margin-bottom:14px}.material-stocktake-ledger form>.toolbar{margin:0}.material-stocktake-history details{margin:8px 24px;padding:10px 4px;border-bottom:1px solid #d1e0e9}.material-stocktake-history details p{line-height:1.8;overflow-wrap:anywhere}@media(max-width:700px){.material-stocktake-toolbar{align-items:stretch}.material-stocktake-toolbar label{min-width:0}.material-stocktake-import-body{padding:16px}.material-stocktake-import-body>#material-stocktake-drop{padding:20px}.material-stocktake-candidates .panel-head{padding:12px 16px}.material-stocktake-candidates>p{padding:10px 16px 14px}.material-stocktake-ledger form{margin:8px 16px 18px}.material-stocktake-ledger>p{padding:10px 16px}.material-stocktake-history details{margin-inline:16px}}.fax-intro{padding:16px 24px 20px}.fax-settings{display:flex;align-items:end;gap:14px;flex-wrap:wrap;padding:18px 24px 22px}.fax-settings label{min-width:220px}.fax-settings>span{flex:1 1 360px;padding-bottom:10px}.fax-settings output{display:block;padding:12px;border:1px solid #b8cddc;border-radius:6px;background:#f1f6f9;min-height:48px}.fax-table{min-width:900px}.fax-table td{vertical-align:middle}.fax-table td button{padding:8px 12px;min-height:40px}.fax-table .danger{color:#a53535}@media(max-width:700px){.fax-intro{padding:12px 16px 16px}.fax-settings{padding:14px 16px 18px}.fax-settings label{min-width:100%}.fax-settings>span{flex-basis:100%}}
 .product-register-toolbar{margin:0 0 16px}
