#metals-page{min-width:0}
#metals-page .heading-actions{display:flex!important;gap:4px!important}
#metals-page .metals-controls,#metals-page .metals-range-controls{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;margin:2px 0!important;padding:0!important}
#metals-page .metals-control-group{display:flex;align-items:center;flex-wrap:nowrap;gap:5px;min-width:0}
#metals-page .metals-controls label,#metals-page .date-range label{display:flex!important;flex-direction:row!important;align-items:center;gap:4px!important;font:11px Arial;white-space:nowrap;margin:0!important;max-width:none!important}
#metals-page select,#metals-page input[type=date],#metals-page .metals-controls button,#metals-page .metals-range-controls button,#metals-page .terminal-menu>summary{box-sizing:border-box!important;height:26px!important;min-height:26px!important;max-height:26px!important;margin:0!important;padding:2px 6px!important;line-height:20px!important;font-size:11px!important}
#metals-page select,#metals-page input[type=date]{background:#151515;color:#ffb34d;border:1px solid #555;font-family:Consolas,monospace}
#metals-page #metals-mode{width:164px}#metals-page #metals-frequency{width:120px}
#metals-page .terminal-menu{margin:0!important;z-index:15;flex-shrink:1;min-width:0}
#metals-page .terminal-menu>summary{width:285px;min-width:0!important;max-width:100%;gap:6px}
#metals-product-caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#metals-page .terminal-menu-panel{min-width:320px;padding:4px!important}
#metals-page .metals-product{display:flex;align-items:center;gap:6px;padding:5px 6px;cursor:pointer;font:11px Arial;white-space:nowrap}
#metals-page .metals-product:hover{background:#2b2b2b}#metals-page .metals-product input{accent-color:#ff9100}
#metals-page .metals-swatch{height:8px;width:8px;flex-shrink:0;display:inline-block}
#metals-page .metals-picker-actions{display:flex;gap:6px;padding:3px 6px;border-bottom:1px solid #444}
#metals-page .fx-switch{height:26px;padding:0;border:0;border-radius:0;gap:3px;background:transparent}
#metals-page .fx-switch button{min-width:55px}
#metals-page .period-buttons{display:flex;flex-wrap:nowrap;gap:3px;margin:0!important}
#metals-page .date-range{display:flex!important;align-items:center;flex-wrap:nowrap!important;gap:4px!important;padding:0!important;margin:0!important}
#metals-page .date-range input{width:128px;min-width:0}
#metals-page .metals-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin:2px 0}
#metals-page .chart-card{min-width:0;padding:3px 4px!important;margin:0!important}
#metals-page .metals-plot{height:350px;min-width:0}
#metals-page .metals-note{font:10px/1.25 Arial;color:#aeb9c1;margin:3px 0}
#metals-page .chart-heading{padding:2px 5px!important;margin:0 0 2px!important}
#metals-page .chart-heading h2{font-size:13px!important}
#metals-page .metals-export-tools{display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin:1px 0}
#metals-page .metals-export-tools button,#metals-page .metals-export-tools select{height:22px!important;min-height:22px!important;max-height:22px!important;font-size:10px!important;padding:1px 5px!important}
#metals-page .metals-status{font:10px/1.2 Arial;color:#aeb9c1;margin:3px 0}
#metals-page .metals-detail{margin-top:4px;font:11px Arial}
#metals-page .metals-table-scroll{max-height:380px;overflow:auto}#metals-page .sunflower-table{width:100%;font-size:11px}
#metals-sources-dialog{max-width:740px}#metals-sources-dialog a{color:#ffb34d}
#metals-sources-dialog td,#metals-sources-dialog th{padding:4px 6px;text-align:left}
#metals-page .metals-empty{padding:6px;color:#ffb34d;font-size:11px}
@media(max-width:1000px){#metals-page .metals-grid{grid-template-columns:1fr}}
@media(max-width:600px){#metals-page .metals-controls{gap:4px}#metals-page .metals-control-group{width:100%}#metals-page #metals-mode{width:126px}#metals-page .terminal-menu{flex:1}#metals-page .terminal-menu>summary{width:100%}#metals-page .terminal-menu-panel{min-width:280px;max-width:85vw}#metals-page .metals-plot{height:310px}#metals-page .metals-product{white-space:normal}#metals-page .heading-actions button{font-size:10px!important}#metals-page .date-range input{width:122px}}

#metals-page .metals-export-tools,#metals-page .chart-tools{display:inline-flex;align-items:center;vertical-align:middle;width:auto;margin:1px 3px 1px 0!important;padding:0!important;gap:4px!important;min-height:22px!important}
#metals-page .chart-tools label{display:inline-flex;flex-direction:row;align-items:center;gap:4px;font:10px Arial}
#metals-page .chart-tools select,#metals-page .metals-export-tools select{width:auto!important;min-width:0;max-width:140px;height:22px!important;min-height:22px!important;padding:1px 4px!important}


/* The graph header owns its date fields on the left and selectors on the right. */
#metals-page .market-product-grid {gap:6px;align-items:stretch}
#metals-page :is(.market-product-grid,.steel-basket-grid) .chart-card {
 box-sizing:border-box;
 min-width:0;
 padding:6px 7px!important;
}
#metals-page .chart-card :is(.chart-heading,.commodity-card-title,.md-card-heading,.steel-market-card-heading),
#metals-page .chart-card > :is(h2,h3) {
 box-sizing:border-box;
 display:flex;
 align-items:center;
 min-height:31px;
 margin:0 0 4px!important;
}
#metals-page .chart-card .chart-unified-top {
 display:flex;
 align-items:center;
 gap:4px;
 min-height:32px;
}
#metals-page .chart-unified-top > .chart-action-controls {
 margin-left:auto;
 justify-content:flex-end;
 flex:1 0 auto;
 flex-wrap:nowrap;
 gap:4px;
}
#metals-page .chart-unified-top .chart-tools {margin:0!important}
#metals-page .chart-unified-top .chart-tools > label:has(select[aria-label="Таймфрейм графика"]) {
 display:inline-flex!important;
}
#metals-page .chart-unified-top :is(select,input[type=date]) {
 box-sizing:border-box!important;
 height:26px!important;
 min-height:26px!important;
 max-height:26px!important;
}
#metals-page .chart-unified-top .chart-tools select {min-width:64px}
#metals-page .chart-unified-top input[type=date] {width:102px}
#metals-page .commodity-card-title .commodity-frequency {display:none}
#metals-page :is(.metals-plot,.commodity-plot,.steel-basket-plot,.md-plot,.steel-market-plot) {
 min-width:0;
 width:100%;
 max-width:100%;
}
#metals-page [data-metals-plot] {height:350px!important}
