/* View switch: shared date controls, one aligned group of action buttons. */
[hidden]{display:none!important}
.date-card.market-enabled{grid-template-columns:minmax(460px,570px) minmax(0,1fr)!important}
.date-card.market-enabled .date-control{max-width:none!important}
.date-stepper{display:flex!important;gap:8px!important;align-items:center!important}
.date-navigation{display:grid;grid-template-columns:26px minmax(125px,1fr) 26px;gap:4px;flex:1;min-width:185px}
.date-mode-actions{display:flex;align-items:center;gap:5px;flex-shrink:0}
.date-mode-actions button{height:34px!important;min-height:34px!important;white-space:nowrap;box-shadow:none!important}
.view-button{padding:0 9px;border:1px solid var(--line);border-radius:5px;background:var(--panel2);color:var(--muted);font-size:.65rem;letter-spacing:.025em}
.view-button[aria-pressed="true"]{background:var(--navy3);color:white;border-color:var(--navy3)}
:root[data-theme="dark"] .view-button[aria-pressed="true"]{background:#125078;border-color:#387394;color:#eef8ff}
.view-button:hover{transform:none;filter:none;border-color:var(--line2)}
.view-button:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.view-button:disabled{opacity:.65;cursor:wait}
.neg-kpis{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:12px}
.neg-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:14px}
.neg-layout .panel,.neg-chart-row .panel{min-width:0}
#negotiationView .panel-head{gap:10px}#negotiationView .table-wrap{max-height:380px}
#negotiationView .num{font-variant-numeric:tabular-nums}
.neg-note{font-size:.7rem;color:var(--muted);margin:10px 0 0;line-height:1.6}
.neg-message{padding:12px;border:1px solid var(--line);background:var(--soft);border-radius:5px;color:var(--muted);font-size:.8rem;margin-bottom:12px}
#negSeriesValues{margin-top:12px;font-size:.75rem;color:var(--muted)}#negSeriesValues summary{cursor:pointer;margin-bottom:10px}
@media(max-width:1050px){.date-card.market-enabled{grid-template-columns:1fr!important;gap:10px!important}.date-card.market-enabled .date-control{margin:0!important;padding-right:0!important}.date-control::after{display:none!important}.neg-layout{grid-template-columns:1fr}}
@media(max-width:760px){.date-stepper{flex-wrap:wrap!important;gap:7px!important}.date-navigation{flex:1 0 100%;grid-template-columns:32px minmax(0,1fr) 32px;min-width:0}.date-mode-actions{width:100%;gap:6px}.date-mode-actions .view-button{flex:1;padding:0 8px;font-size:.67rem}.date-mode-actions .date-today{width:48px}.neg-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.neg-layout .tools{flex-wrap:wrap}#negCurrency{min-width:0;width:100%}}
@media(max-width:760px){.date-card.market-enabled .date-control{padding:10px 11px!important}}

/* Share the accounting cards, chart controls and typography. */
.neg-quick{display:flex!important;flex-wrap:wrap;gap:5px}
.neg-card:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.neg-card-tooltip{position:fixed;z-index:100;max-width:min(300px,calc(100vw - 24px));padding:10px 13px;border:1px solid var(--tooltip-border);border-radius:7px;background:var(--tooltip-bg);color:#fff;font-size:.76rem;line-height:1.5;box-shadow:0 8px 25px rgba(0,0,0,.22);pointer-events:none}
.neg-chart-row>.panel>.panel-head{min-height:88px;align-items:center}
.neg-chart-row .panel-title{flex:1 1 160px}
.neg-chart-row .tools{flex:1 1 260px}
#negVariationTabs{width:auto;flex-wrap:nowrap}
#negVariationTabs .tab{white-space:nowrap}
#trendOther,#trendCcy,#negCurrency{box-sizing:border-box!important;height:30px!important;min-height:30px!important;max-height:30px!important;line-height:normal!important;padding:3px 28px 3px 9px!important;font-size:.74rem!important;align-self:center;border-radius:5px!important}
#negCurrency{width:138px;min-width:0}
#trendOther option,#trendCcy option,#negCurrency option{font-size:inherit;line-height:normal}
@media(max-width:760px){
  #trendOther,#trendCcy,#negCurrency{height:34px!important;min-height:34px!important;max-height:34px!important;font-size:16px!important;padding-block:3px!important}
  #negCurrency{width:100%}.neg-quick{width:100%;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))}
  .neg-quick .pair-btn{padding-inline:6px;min-width:0}.neg-chart-row .panel-title,.neg-chart-row .tools{flex:initial;width:100%}
  .neg-chart-row>.panel>.panel-head{min-height:0;align-items:flex-start}
}

/* Compact negotiation headers and mobile controls. */
.neg-label-short,#negCurrencyMobile{display:none!important}
#negotiationView .neg-trend-head{flex-direction:column;align-items:stretch;gap:8px;min-height:0}
#negotiationView .neg-trend-head .panel-title{flex:initial;width:100%}
#negotiationView .neg-trend-head .tools{flex:initial;width:100%;flex-wrap:nowrap;justify-content:flex-start;gap:6px}
#negQuick{flex:0 0 auto;flex-wrap:nowrap}
#negCurrency{flex:0 1 128px;width:128px}
#negRanges{flex:0 0 auto;flex-wrap:nowrap;margin-left:auto;width:auto}
#negRanges .tab{white-space:nowrap}
#negotiationView .neg-spread-head{flex-direction:row!important;flex-wrap:nowrap;align-items:center;min-height:0}
#negotiationView .neg-spread-head .panel-title{flex:1 1 auto;width:auto;min-width:0}
.neg-spread-head .panel-title>div{min-width:0}
#negVariationTabs{flex:0 0 auto;display:flex;flex-direction:row;flex-wrap:nowrap;width:auto}
#negLegend{display:flex;flex-wrap:wrap;gap:6px}
#negLegend .legend-pill{min-width:0;white-space:nowrap}
@media(max-width:760px){
  .neg-card .neg-label-long{display:none!important}.neg-card .neg-label-short{display:inline!important}
  .neg-card .kpi-top{gap:4px}.neg-card .kpi-top>span{min-width:0}.neg-card .delta{flex-shrink:0}
  #negQuick,#negCurrency{display:none!important}
  #negCurrencyMobile{display:block!important;width:100%;height:34px!important;min-height:34px!important;max-height:34px!important;padding:3px 28px 3px 9px!important;line-height:normal!important;font-size:16px!important;border-radius:5px!important}
  #negotiationView .neg-trend-head .tools{flex-wrap:wrap}
  #negRanges{width:100%;margin-left:0;display:flex}
  #negRanges .tab{flex:1}
  #negLegend{gap:4px}
  #negLegend .legend-pill{padding:5px;font-size:.61rem;gap:3px}
  #negLegend .legend-dot{width:6px;height:6px;flex-shrink:0}
  #negVariationTabs{gap:4px}#negVariationTabs .tab{padding:5px 6px;font-size:.65rem;min-height:30px}
  .neg-spread-head h2{font-size:.8rem}.neg-spread-head .panel-title{gap:5px}
}

/* Laptop and tablet: title and chart controls share one header row. */
@media(min-width:761px){
  #negotiationView .neg-trend-head{flex-direction:row;flex-wrap:nowrap;align-items:center;gap:10px}
  #negotiationView .neg-trend-head .panel-title{flex:1 1 160px;width:auto;min-width:0}
  #negotiationView .neg-trend-head .panel-title>div{min-width:0}
  #negotiationView .neg-trend-head .tools{flex:0 0 auto;width:auto;flex-wrap:nowrap;justify-content:flex-end}
}
