/* Give each material visualization the available workspace instead of squeezing
   the flow, details and Gantt into competing minimum-height panels. */
.myschedule .workspace-caption #view-description{display:none!important}
body.myschedule[data-surface="materials"]{grid-template-rows:54px minmax(0,1fr) 22px}
.myschedule[data-surface="materials"] .app-header{height:54px}
.myschedule[data-surface="materials"] .workspace main{padding:12px 16px 8px;gap:8px}
.myschedule[data-surface="materials"] .workspace-caption{min-height:44px;padding-bottom:0!important}
.myschedule #materials-view{min-width:0;min-height:0;overflow:hidden;isolation:isolate}
.myschedule #materials-view>.pane-heading{display:none}
.myschedule #materials-view [hidden]{display:none!important}
.myschedule #materials-view .material-lower-tabs{flex:none;flex-wrap:wrap;gap:6px;padding:8px 12px;border-top:0;border-bottom:1px solid var(--line)}
.myschedule #materials-view .material-lower-tabs button{min-height:32px;padding:6px 12px;border-radius:5px}
.myschedule #materials-view .mys-material-toolbar{flex:none;flex-wrap:wrap;gap:10px;padding:10px 12px}
.myschedule #materials-view .mys-material-toolbar>div:first-child{flex:none}
.myschedule #materials-view .mys-material-filter{flex:1;min-width:0}
.myschedule #materials-view .mys-material-filter>summary{display:none;list-style:none;cursor:pointer}
.myschedule #materials-view .mys-material-filter>summary::-webkit-details-marker{display:none}
.myschedule #materials-view .mys-material-filter-fields{display:grid;grid-template-columns:minmax(150px,1fr) minmax(230px,1.4fr);gap:8px;min-width:0}
.myschedule #materials-view .mys-material-toolbar #allocate-materials,
.myschedule #materials-view .mys-material-toolbar [data-editor]{display:none}
.myschedule #materials-view .mys-material-toolbar input,
.myschedule #materials-view .mys-material-toolbar select{width:100%;min-width:0;max-width:none;height:34px}
.myschedule #materials-view .material-explorer{grid-template-columns:minmax(0,1fr) clamp(190px,19vw,240px);height:auto!important;flex:1!important;min-height:0;overflow:hidden}
.myschedule #materials-view .material-canvas{min-width:0;min-height:0;overflow:hidden}
.myschedule #materials-view .explorer-columns{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:16px;min-height:0!important;overflow:auto;scrollbar-gutter:stable}
.myschedule #materials-view .explorer-columns>section{min-width:0}
.myschedule #materials-view .explorer-columns h3{margin:0 0 12px;font-size:10px;letter-spacing:.6px;line-height:1.5;overflow-wrap:anywhere}
.myschedule #materials-view .material-node{padding:10px;margin-bottom:12px;line-height:1.65;min-width:0;overflow-wrap:anywhere}
.myschedule #materials-view .material-node strong{font-size:11px;margin:0 0 7px;padding:0 0 7px}
.myschedule #materials-view .material-node button{min-height:26px;white-space:normal}
.myschedule #materials-view .material-sidebar{display:block;min-width:0;min-height:0;overflow:auto;scrollbar-gutter:stable}
.myschedule #materials-view .mys-material-detail-group{min-width:0;border-bottom:1px solid var(--line)}
.myschedule #materials-view .mys-material-detail-group>.pane-heading{padding:10px 12px;min-height:36px}
.myschedule #materials-view .mys-material-detail-group>div:not(.pane-heading){padding:10px 12px;line-height:1.7;overflow-wrap:anywhere}
.myschedule #material-gantt-slot{flex:1;min-height:0;border-top:0;overflow:hidden;flex-direction:column}
.myschedule #material-gantt-slot>.shared-gantt{display:flex;flex:1;flex-direction:column;min-height:0;width:100%;overflow:hidden}
.myschedule #material-gantt-slot .gantt{flex:1;min-height:0}
.myschedule #material-gantt-slot .board-footer{flex:none}
.myschedule .mys-material-chart-tools{display:flex;align-items:center;flex-wrap:wrap;flex:none;gap:6px;padding:8px 12px;border-bottom:1px solid var(--line)}
.myschedule .mys-material-chart-tools>span{font-size:11px;color:var(--muted);margin-right:auto}
.myschedule .mys-material-chart-tools button{min-height:30px;padding:5px 10px;font-size:11px}
.myschedule #material-gantt-slot .material-plots{display:flex;flex:1;flex-direction:column;width:100%;height:auto;min-height:0;border-top:0}
.myschedule #material-gantt-slot .material-plots>.mini-toolbar{flex:none;flex-wrap:wrap;gap:8px;padding:10px 12px}
.myschedule #material-gantt-slot .material-plots>.mini-toolbar label{display:flex;gap:8px;align-items:center;min-width:0;max-width:100%}
.myschedule #inventory-item{min-width:0;max-width:100%}
.myschedule #inventory-chart{flex:none;height:clamp(100px,22vh,180px);overflow:hidden;padding:8px 12px}
.myschedule #inventory-chart svg{display:block;width:100%;height:100%}
.myschedule #material-gantt-slot .material-plots>.table-scroll{flex:1;min-height:0;overflow:auto}
@media(max-width:1050px){
  .myschedule #materials-view .material-explorer{display:block;overflow:auto}
  .myschedule #materials-view .material-canvas{overflow:visible}
  .myschedule #materials-view .explorer-columns{overflow:visible;flex:none;scrollbar-gutter:auto}
  .myschedule #materials-view .material-sidebar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));max-height:none;overflow:visible;border-left:0;border-top:1px solid var(--line);scrollbar-gutter:auto}
  .myschedule #materials-view .mys-material-detail-group{border-right:1px solid var(--line)}
  .myschedule #unused-supplies{max-height:220px;overflow:auto}
}
@media(max-width:680px){
  .myschedule[data-surface="materials"] .workspace main{padding:10px 10px 8px}
  .myschedule[data-surface="materials"] .workspace-caption{gap:8px}
  .myschedule[data-surface="materials"] .mys-page-actions{width:100%;flex-wrap:wrap;gap:6px}
  .myschedule[data-surface="materials"] .mys-page-actions button{flex:1;min-width:0;padding:7px;font-size:10px;white-space:normal}
  .myschedule #materials-view .material-lower-tabs{padding:8px;gap:4px}
  .myschedule #materials-view .material-lower-tabs button{flex:1;min-width:0;padding:6px;font-size:10px}
  .myschedule #materials-view .mys-material-toolbar{padding:8px;gap:8px}
  .myschedule #materials-view .mys-material-filter>summary{display:flex;align-items:center;justify-content:center;gap:6px;min-height:32px;padding:6px 8px;border:1px solid var(--line);border-radius:5px;background:white;font-size:10px}
  .myschedule #materials-view .mys-material-filter[open]>summary{background:var(--primary-95);color:var(--primary-40)}
  .myschedule #materials-view .mys-material-filter-fields{grid-template-columns:minmax(0,1fr);padding-top:8px}
  .myschedule #materials-view .explorer-columns{grid-template-columns:minmax(0,1fr);padding:12px;gap:16px}
  .myschedule #materials-view .material-connections{display:none}
  .myschedule #materials-view .material-sidebar{grid-template-columns:minmax(0,1fr)}
  .myschedule #materials-view .mys-material-detail-group{border-right:0}
}
