/* STRELEC_HF40_WAVE_UI_V1 */

body.cockpit-body {
  height: auto !important;
  min-height: 100dvh !important;
  overflow-y: auto !important;
  padding-bottom: 18px;
  font-size: clamp(13px, .72vw, 30px);
}

.hf25-shell {
  width: 100%;
  max-width: none !important;
  padding: clamp(12px, .8vw, 28px);
}

.hf25-grid {
  grid-template-columns:
    minmax(300px, 21vw)
    minmax(620px, 1fr)
    minmax(340px, 23vw);
  gap: clamp(12px, .72vw, 24px);
}

.hf25-card,
.hf25-kpi {
  border-radius: clamp(11px, .65vw, 22px);
}

.hf25-card-head h2 {
  font-size: clamp(14px, .75vw, 30px);
}

.hf25-eyebrow,
.hf25-kpi span,
.hf25-metric span {
  font-size: clamp(9px, .5vw, 19px);
}

.hf25-kpi strong {
  font-size: clamp(19px, 1vw, 38px);
}

.hf25-card p,
.hf25-card li,
.hf25-card small {
  font-size: clamp(11px, .58vw, 23px);
}

.admin-header,
.admin-container {
  width: 100%;
  max-width: none;
}

.admin-header {
  padding-inline: clamp(14px, 1vw, 36px);
}

.admin-container {
  padding: clamp(12px, .9vw, 32px);
  gap: clamp(11px, .75vw, 26px);
  font-size: clamp(12px, .66vw, 27px);
}

#hf25-scope-banner,
.learning-status-panel,
.ai-panel {
  display: none !important;
}

.admin-panel {
  padding: clamp(14px, .85vw, 30px);
}

.admin-panel h2 {
  font-size: clamp(15px, .82vw, 32px);
}

.admin-table {
  font-size: clamp(11px, .61vw, 24px);
}

.admin-table th {
  font-size: clamp(9px, .5vw, 19px);
}

.admin-table th,
.admin-table td {
  padding: clamp(8px, .48vw, 18px);
}

.traders-panel,
.ai-panel,
.events-panel,
.ops-panel {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.table-scroll {
  max-height: min(52dvh, 720px);
}

.hf40-wave-sell-dock {
  position: fixed;
  contain: layout paint style;
  z-index: 110;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: minmax(230px, .72fr) minmax(420px, 1.55fr) minmax(230px, .7fr) minmax(270px, .82fr);
  align-items: stretch;
  gap: 12px;
  min-height: 122px;
  padding: 10px clamp(12px, 1vw, 30px);
  border-top: 1px solid rgba(116, 218, 255, .34);
  background:
    linear-gradient(90deg, rgba(5, 21, 29, .98), rgba(4, 12, 20, .98) 52%, rgba(28, 8, 15, .98));
  box-shadow: 0 -16px 46px rgba(0, 0, 0, .58);
  backdrop-filter: blur(18px);
}

.hf40-wave-sell-dock[data-phase="REVERSAL"] {
  border-top-color: rgba(255, 92, 119, .84);
  box-shadow: 0 -14px 52px rgba(190, 28, 60, .22);
}

.hf40-wave-state,
.hf40-wave-chart,
.hf40-wave-facts {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(125, 192, 219, .16);
  border-radius: 10px;
  background: rgba(1, 8, 13, .58);
}

.hf40-wave-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hf40-wave-kicker {
  color: #7899aa;
  font: 800 clamp(9px, .48vw, 18px)/1.2 var(--mono);
  letter-spacing: .1em;
}

.hf40-wave-state strong {
  margin-top: 5px;
  color: #61e2b1;
  font: 950 clamp(18px, 1.05vw, 40px)/1 var(--mono);
}

.hf40-wave-state small {
  margin-top: 7px;
  overflow: hidden;
  color: #a9c0cb;
  font-size: clamp(10px, .54vw, 21px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hf40-wave-chart {
  contain: layout paint;
  display: grid;
  grid-template-rows: auto 1fr;
}

.hf40-wave-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font: 850 clamp(10px, .56vw, 21px) var(--mono);
}

.hf40-wave-buy-label { color: #5ce2b0; }
.hf40-wave-sell-label { color: #ff7185; }
.hf40-candle-label {
  color: #6f8c9b;
  font-size: clamp(8px, .43vw, 16px);
  letter-spacing: .08em;
  text-align: center;
}

.hf40-wave-svg {
  width: 100%;
  height: 62px;
  overflow: visible;
}

.hf40-wave-grid-line {
  stroke: rgba(127, 168, 190, .12);
  stroke-width: 1;
}

.hf40-flow-candle.buy .hf40-candle-body { fill: #46dca3; stroke: #8cf0ca; }
.hf40-flow-candle.sell .hf40-candle-body { fill: #ee4f69; stroke: #ff9bab; }
.hf40-buy-pressure { stroke: #58e2ad; stroke-width: 1.5; }
.hf40-sell-pressure { stroke: #ff637c; stroke-width: 1.5; }
.hf40-candle-body { stroke-width: .8; }
.hf40-flow-candle.latest .hf40-buy-pressure,
.hf40-flow-candle.latest .hf40-sell-pressure { stroke-width: 2.3; }
.hf40-flow-candle.latest .hf40-candle-body { stroke-width: 1.5; }

.hf40-wave-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.hf40-wave-facts div {
  min-width: 0;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(10, 28, 38, .64);
}

.hf40-wave-facts span {
  display: block;
  color: #7994a3;
  font: 750 clamp(8px, .43vw, 17px) var(--mono);
}

.hf40-wave-facts strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font: 900 clamp(11px, .62vw, 24px) var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hf40-persistent-sell {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 98px;
  overflow: hidden;
  border: 1px solid rgba(255, 113, 133, .72);
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(160deg, #d12e50, #7d152c 72%);
  box-shadow: 0 12px 30px rgba(173, 28, 57, .3);
  cursor: pointer;
}

.hf40-persistent-sell:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.hf40-persistent-sell:disabled {
  border-color: rgba(132, 154, 167, .22);
  color: #82949e;
  background: #111c23;
  box-shadow: none;
  cursor: not-allowed;
}

.hf40-persistent-sell > span,
.hf40-persistent-sell > small {
  position: relative;
  z-index: 2;
  display: block;
}

.hf40-persistent-sell > span {
  font: 950 clamp(19px, 1.25vw, 46px)/1 var(--mono);
  letter-spacing: .08em;
}

.hf40-persistent-sell > small {
  margin-top: 8px;
  font: 800 clamp(9px, .48vw, 18px) var(--mono);
}

.hf40-button-wave {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 48px;
  opacity: .48;
  pointer-events: none;
}

.hf40-admin-wave-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(210px, .65fr) minmax(420px, 1.8fr) repeat(3, minmax(130px, .45fr));
  gap: 10px;
  align-items: center;
  padding: clamp(13px, .8vw, 28px);
  border: 1px solid rgba(92, 213, 232, .28);
  border-radius: 13px;
  background: linear-gradient(100deg, rgba(5, 24, 35, .94), rgba(4, 13, 21, .94));
}

.hf40-admin-wave-strip > div {
  min-width: 0;
}

.hf40-admin-wave-strip span {
  display: block;
  color: #7f9baa;
  font: 750 clamp(9px, .48vw, 19px) var(--mono);
}

.hf40-admin-wave-strip strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font: 900 clamp(14px, .78vw, 30px) var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hf40-admin-wave-strip .hf40-wave-svg {
  height: 68px;
}

.hf40-admin-candles > span {
  margin-bottom: 2px;
  color: #6f8c9b;
  font-size: clamp(8px, .43vw, 16px);
  letter-spacing: .08em;
  text-align: center;
}

@media (max-width: 1380px) {
  body.cockpit-body { padding-bottom: 190px; }
  .hf40-wave-sell-dock {
    grid-template-columns: minmax(210px, .7fr) minmax(430px, 1.4fr) minmax(260px, .7fr);
  }
  .hf40-wave-facts { display: none; }
}

@media (max-width: 1100px) {
  body.cockpit-body { padding-bottom: 250px; }
  .hf25-grid { grid-template-columns: 1fr 1.35fr; }
  .hf25-column:last-child { grid-column: 1 / -1; }
  .hf40-wave-sell-dock {
    grid-template-columns: minmax(190px, .65fr) 1.35fr;
  }
  .hf40-persistent-sell { grid-column: 1 / -1; min-height: 66px; }
  .hf40-admin-wave-strip { grid-template-columns: 1fr 2fr 1fr; }
  .hf40-admin-wave-strip > :nth-last-child(-n+2) { display: none; }
}

@media (max-width: 760px) {
  body.cockpit-body { padding-bottom: 286px; }
  .hf25-grid { grid-template-columns: 1fr; }
  .hf40-wave-sell-dock { grid-template-columns: 1fr; }
  .hf40-wave-state { display: none; }
  .hf40-wave-chart { min-height: 92px; }
  .hf40-admin-wave-strip { grid-template-columns: 1fr; }
}

/* HF39.1: keep frequently refreshed cockpit cards in their own paint boxes. */
.hf25-kpi,
.hf25-feed,
.hf25-capital {
  contain: layout paint style;
  overflow-anchor: none;
}

/* STRELEC_UI_COMPACT_AFTER_NETWORKS_V1 */
body.cockpit-body { padding-bottom: 18px !important; }
.hf40-wave-sell-dock { display: none !important; }
.hf25-kpis { align-items: stretch; grid-auto-rows: 62px; gap: 8px !important; }
.hf25-kpi {
  height: 62px;
  min-height: 62px;
  box-sizing: border-box;
  padding: 7px 10px !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.hf25-kpi span { line-height: 1.05; }
.hf25-kpi strong { margin-top: 2px !important; line-height: 1.05; }
.hf25-kpi small { display: block; margin-top: 2px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hf25-shell { padding-top: 8px !important; }
.hf25-grid { margin-top: 8px !important; }
@media(max-width:820px){
  .hf25-kpis { grid-auto-rows: 58px; gap: 6px !important; }
  .hf25-kpi { height: 58px; min-height: 58px; padding: 6px 9px !important; }
}
