
/* V437J - Demand analysis charts + action center */
.v437j-action-center,
.v437j-chart-section{
  margin-top:12px;
  padding:14px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--card);
}
.v437j-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.v437j-section-head>div>span{
  display:block;
  margin-bottom:3px;
  font-size:8.5px;
  font-weight:800;
  letter-spacing:.08em;
  color:var(--muted-foreground);
}
.v437j-section-head h3{
  margin:0;
  font-size:13px;
  line-height:1.25;
}
.v437j-section-head>small{
  max-width:420px;
  font-size:9px;
  line-height:1.4;
  color:var(--muted-foreground);
  text-align:right;
}
.v437j-action-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
}
.v437j-action-grid article{
  position:relative;
  overflow:hidden;
  min-height:104px;
  padding:11px;
  border:1px solid var(--border);
  border-radius:9px;
  background:var(--background);
}
.v437j-action-grid article:after{
  content:"";
  position:absolute;
  left:0;right:0;bottom:0;
  height:3px;
}
.v437j-action-grid article.danger:after{background:#dc2626}
.v437j-action-grid article.warning:after{background:#f59e0b}
.v437j-action-grid article.growth:after{background:#16a34a}
.v437j-action-grid article.slow:after{background:#64748b}
.v437j-action-grid article.customer:after{background:#7c3aed}
.v437j-action-grid b{
  display:block;
  font-size:21px;
  line-height:1;
  font-weight:850;
  font-variant-numeric:tabular-nums;
}
.v437j-action-grid span{
  display:block;
  margin-top:8px;
  font-size:9.5px;
  line-height:1.3;
  font-weight:700;
}
.v437j-action-grid small{
  display:block;
  margin-top:5px;
  font-size:8px;
  line-height:1.35;
  color:var(--muted-foreground);
}

.v437j-chart-hero-grid{
  display:grid;
  grid-template-columns:minmax(0,2.25fr) minmax(260px,.75fr);
  gap:10px;
}
.v437j-chart-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:10px;
}
.v437j-chart-card,
.v437j-forecast-card{
  min-width:0;
  padding:12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--background);
}
.v437j-chart-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  min-height:42px;
  margin-bottom:5px;
}
.v437j-chart-head h4{
  margin:0;
  font-size:11px;
  line-height:1.3;
}
.v437j-chart-head p{
  margin:3px 0 0;
  font-size:8.5px;
  line-height:1.35;
  color:var(--muted-foreground);
}
.v437j-legend{
  display:flex;
  align-items:center;
  gap:8px;
  flex:none;
}
.v437j-legend span{
  display:flex;
  align-items:center;
  gap:4px;
  font-size:8px;
  color:var(--muted-foreground);
}
.v437j-legend i{
  width:13px;
  height:3px;
  border-radius:99px;
}
.v437j-legend i.actual{background:#2563eb}
.v437j-legend i.forecast{background:#8b5cf6}

.v437j-forecast-card{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.v437j-forecast-card>span{
  font-size:8.5px;
  font-weight:800;
  letter-spacing:.08em;
  color:var(--muted-foreground);
}
.v437j-forecast-card>div:not(.v437j-confidence){
  padding:8px 0;
  border-bottom:1px solid var(--border);
}
.v437j-forecast-card>div:not(.v437j-confidence) small{
  display:block;
  font-size:8.5px;
  color:var(--muted-foreground);
}
.v437j-forecast-card>div:not(.v437j-confidence) strong{
  display:block;
  margin-top:3px;
  font-size:16px;
  line-height:1.2;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}
.v437j-confidence{
  margin-top:auto;
  padding-top:4px;
}
.v437j-confidence>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.v437j-confidence span,
.v437j-confidence>b{
  font-size:8.5px;
}
.v437j-confidence>b{
  font-weight:800;
}
.v437j-confidence>i{
  display:block;
  height:6px;
  margin-top:6px;
  border-radius:999px;
  overflow:hidden;
  background:var(--muted);
}
.v437j-confidence>i>b{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#2563eb,#8b5cf6);
}
.v437j-confidence>small{
  display:block;
  margin-top:5px;
  font-size:7.8px;
  color:var(--muted-foreground);
}

@media(max-width:1200px){
  .v437j-action-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .v437j-chart-hero-grid{
    grid-template-columns:1.6fr .8fr;
  }
}
@media(max-width:900px){
  .v437j-action-grid{
    grid-template-columns:1fr 1fr;
  }
  .v437j-chart-hero-grid,
  .v437j-chart-grid{
    grid-template-columns:1fr;
  }
  .v437j-forecast-card{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:8px;
  }
  .v437j-forecast-card>span,
  .v437j-confidence{
    grid-column:1/-1;
  }
  .v437j-forecast-card>div:not(.v437j-confidence){
    border:1px solid var(--border);
    border-radius:8px;
    padding:9px;
  }
}
@media(max-width:640px){
  .v437j-action-center,
  .v437j-chart-section{
    margin-top:9px;
    padding:10px;
    border-radius:10px;
  }
  .v437j-section-head{
    align-items:flex-start;
    flex-direction:column;
    gap:4px;
  }
  .v437j-section-head>small{
    text-align:left;
    font-size:8px;
  }
  .v437j-action-grid{
    grid-template-columns:1fr 1fr;
    gap:7px;
  }
  .v437j-action-grid article{
    min-height:92px;
    padding:9px;
  }
  .v437j-action-grid b{
    font-size:17px;
  }
  .v437j-action-grid span{
    font-size:8.4px;
  }
  .v437j-action-grid small{
    font-size:7.3px;
  }
  .v437j-chart-card,
  .v437j-forecast-card{
    padding:9px;
    border-radius:9px;
  }
  .v437j-chart-head{
    min-height:auto;
    margin-bottom:2px;
  }
  .v437j-chart-head h4{font-size:9.5px}
  .v437j-chart-head p{font-size:7.7px}
  .v437j-legend{display:none}
  .v437j-chart-card .recharts-responsive-container{
    height:225px!important;
    min-height:225px!important;
  }
  .v437j-chart-card.wide .recharts-responsive-container{
    height:235px!important;
    min-height:235px!important;
  }
  .v437j-forecast-card{
    grid-template-columns:1fr 1fr;
  }
  .v437j-forecast-card>div:not(.v437j-confidence):nth-of-type(3){
    grid-column:1/-1;
  }
  .v437j-forecast-card>div:not(.v437j-confidence) strong{
    font-size:13px;
  }
}
@media(max-width:390px){
  .v437j-action-grid{
    grid-template-columns:1fr;
  }
  .v437j-forecast-card{
    grid-template-columns:1fr;
  }
  .v437j-forecast-card>div:not(.v437j-confidence){
    grid-column:auto!important;
  }
}
