/* Coffee Rush STA v10.5.4 · cierre de Planificación
   Ajustes finales de legibilidad y accesibilidad sin alterar lógica económica,
   simulación, backend, sesiones ni persistencia. */

/* 1) Cabecera estable: los cuatro KPI se comportan como una sola banda. */
body[data-interface-phase="planning"] .app-status{
  display:grid;
  grid-template-columns:repeat(4,minmax(82px,1fr));
  gap:7px;
  flex-wrap:nowrap;
  justify-content:stretch;
  min-width:370px;
}
body[data-interface-phase="planning"] .app-status>div{
  min-width:0;
  width:auto;
  padding:7px 9px;
}
body[data-interface-phase="planning"] .app-status span,
body[data-interface-phase="planning"] .app-status strong{white-space:nowrap}

/* 2) Contexto: ninguna frase útil queda truncada. */
body[data-interface-phase="planning"] .v105-briefing .scenario-box{
  min-height:106px;
  align-content:start;
}
body[data-interface-phase="planning"] .v105-briefing .scenario-box strong{
  font-size:11.5px;
  line-height:1.24;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
}
body[data-interface-phase="planning"] .v105-briefing .scenario-box p{
  margin-top:4px;
  font-size:10px;
  line-height:1.35;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  overflow-wrap:break-word;
}

/* 3) Decisiones: cifra elegida + control son la información dominante. */
body[data-interface-phase="planning"] .v105-decisions-panel .decision-card{
  padding:10px 11px;
  row-gap:6px;
}
body[data-interface-phase="planning"] .v105-decisions-panel .decision-title strong{
  font-size:13px;
  line-height:1.2;
}
body[data-interface-phase="planning"] .v105-decisions-panel .compact-field select{
  min-height:40px;
  padding:7px 9px;
  font-size:11.5px;
}
body[data-interface-phase="planning"] .v105-decisions-panel input[type="range"],
body[data-interface-phase="planning"] .v105-purchases-panel input[type="range"]{
  appearance:none;
  -webkit-appearance:none;
  min-height:34px;
  height:34px;
  background:transparent;
  cursor:pointer;
  touch-action:pan-y;
}
body[data-interface-phase="planning"] .v105-decisions-panel input[type="range"]::-webkit-slider-runnable-track,
body[data-interface-phase="planning"] .v105-purchases-panel input[type="range"]::-webkit-slider-runnable-track{
  height:7px;
  border-radius:999px;
  background:linear-gradient(90deg,#0b6da9,#0b6da9) center/100% 7px no-repeat;
}
body[data-interface-phase="planning"] .v105-decisions-panel input[type="range"]::-webkit-slider-thumb,
body[data-interface-phase="planning"] .v105-purchases-panel input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:21px;
  height:21px;
  margin-top:-7px;
  border:3px solid #fff;
  border-radius:50%;
  background:#0b6da9;
  box-shadow:0 1px 5px rgba(15,54,84,.24);
}
body[data-interface-phase="planning"] .v105-decisions-panel input[type="range"]::-moz-range-track,
body[data-interface-phase="planning"] .v105-purchases-panel input[type="range"]::-moz-range-track{
  height:7px;
  border:0;
  border-radius:999px;
  background:#0b6da9;
}
body[data-interface-phase="planning"] .v105-decisions-panel input[type="range"]::-moz-range-thumb,
body[data-interface-phase="planning"] .v105-purchases-panel input[type="range"]::-moz-range-thumb{
  width:17px;
  height:17px;
  border:3px solid #fff;
  border-radius:50%;
  background:#0b6da9;
  box-shadow:0 1px 5px rgba(15,54,84,.24);
}
body[data-interface-phase="planning"] .v105-decisions-panel .scale,
body[data-interface-phase="planning"] .v105-decisions-panel .decision-help{
  font-size:9.5px;
  line-height:1.35;
}
body[data-interface-phase="planning"] .v105-decisions-panel .decision-impact span{
  font-size:9px;
  padding:3px 6px;
}

/* 4) Cafetería: banner específico de Planificación, sin recortar personas. */
body[data-interface-phase="planning"] .v105-scene-stage{
  height:clamp(112px,9vw,142px);
  min-height:112px;
  aspect-ratio:auto;
  background:#f5eee5;
}
body[data-interface-phase="planning"] .v105-scene-art{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}
body[data-interface-phase="planning"] .v105-market-strip .market-pill{
  min-height:50px;
  padding:7px 9px;
}
body[data-interface-phase="planning"] .v105-market-strip .market-pill>span{font-size:8px}
body[data-interface-phase="planning"] .v105-market-strip .market-pill strong{font-size:10.5px}

/* 5) Inventario: diferencia explícita entre stock y decisión de compra. */
body[data-interface-phase="planning"] .inventory-subheading,
body[data-interface-phase="planning"] .purchase-subheading{
  margin:9px 0 6px;
  color:#5f768a;
  font-size:9px;
  font-weight:900;
  letter-spacing:.055em;
  text-transform:uppercase;
}
body[data-interface-phase="planning"] .inventory-subheading{margin-top:4px}
body[data-interface-phase="planning"] .purchase-subheading{
  padding-top:8px;
  border-top:1px solid #e5edf2;
}
body[data-interface-phase="planning"] .v105-purchases-panel .inventory-card{
  min-height:82px;
  background:#f7fafc;
}
body[data-interface-phase="planning"] .v105-purchases-panel .inventory-card .name{font-size:9px}
body[data-interface-phase="planning"] .v105-purchases-panel .inventory-card .amount{font-size:13px}
body[data-interface-phase="planning"] .v105-purchases-panel .inventory-card .note{font-size:8.5px;line-height:1.25}
body[data-interface-phase="planning"] .v105-purchases-panel .purchase-row{
  min-height:72px;
  padding:7px 8px;
  background:#fff;
  border-color:#dce7ee;
}
body[data-interface-phase="planning"] .v105-purchases-panel .purchase-row b{font-size:10px}
body[data-interface-phase="planning"] .v105-purchases-panel .purchase-row small{font-size:8.5px}
body[data-interface-phase="planning"] .v105-purchases-panel .purchase-row strong{font-size:10px}

/* 6) El pie institucional no aporta información operativa durante Planificación. */
body[data-interface-phase="planning"] .app-footer{display:none}

@media(max-width:1380px){
  body[data-interface-phase="planning"] .app-status{
    grid-template-columns:repeat(4,minmax(80px,1fr));
    min-width:350px;
  }
  body[data-interface-phase="planning"] .v105-scene-stage{height:122px}
}

@media(max-width:1080px){
  body[data-interface-phase="planning"] .app-status{
    width:100%;
    max-width:620px;
    grid-template-columns:repeat(4,minmax(0,1fr));
    min-width:0;
  }
  body[data-interface-phase="planning"] .v105-scene-stage{height:120px}
}

@media(max-width:760px){
  body[data-interface-phase="planning"] .app-status{
    max-width:none;
    grid-template-columns:1fr 1fr;
  }
  body[data-interface-phase="planning"] .v105-scene-stage{height:108px;min-height:108px}
  body[data-interface-phase="planning"] .v105-briefing .scenario-box{min-height:0}
}

@media(max-width:480px){
  body[data-interface-phase="planning"] .v105-scene-stage{height:96px;min-height:96px}
}
