.calculation-start{max-width:1180px}.customer-card,.workflow-stage{overflow:hidden;border:1px solid #d4e2e5!important;border-radius:22px!important;background:#fff;box-shadow:0 10px 30px rgba(20,58,67,.055)!important;transition:border-color .18s ease,box-shadow .18s ease}.customer-card:hover,.workflow-stage:hover{border-color:#bdd4d9!important}.customer-card{padding:0!important}.clean-section-head{position:relative;display:flex!important;min-height:126px;align-items:center!important;margin:0!important;padding:28px 104px 28px 36px!important;border-bottom:1px solid #dbe7e9;cursor:pointer;outline:none}.clean-section-head:focus-visible{box-shadow:inset 0 0 0 3px rgba(0,174,202,.22)}.clean-section-head .section-heading-group{align-items:center;gap:20px}.clean-section-head .step-number{display:grid;width:46px;height:46px;flex:0 0 46px;place-items:center;border-radius:50%!important;background:#08adc0!important;color:#fff;font-size:16px;font-weight:900}.clean-section-head h2{margin:0 0 6px;font-size:25px}.clean-section-head p{font-size:15px;line-height:1.4}.clean-section-head h2,.clean-section-head b{color:#17313a}.clean-section-head .linked-chip{margin-left:auto;margin-right:16px;padding:9px 14px;font-size:11px;white-space:nowrap}.section-toggle{position:absolute;right:34px;top:50%;display:grid!important;width:44px!important;height:44px;margin:0!important;padding:0!important;place-items:center;transform:translateY(-50%);border:1px solid #d2e1e4!important;border-radius:50%!important;background:#f7fbfc!important;color:#31515a!important;box-shadow:none!important}.section-toggle span{width:10px;height:10px;border-right:2.5px solid currentColor;border-bottom:2.5px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform .2s ease}.section-collapsed .section-toggle span{transform:translateY(2px) rotate(-135deg)}.clean-section-body{display:block;padding:0 36px 34px}.section-collapsed>.clean-section-head{border-bottom-color:transparent}.section-collapsed>.clean-section-body{display:none}.customer-card>.clean-section-body:before{content:'';display:block;height:1px;margin:0 0 28px;background:#dbe7e9}.point-two-card>.clean-section-body{background:#f5fafb;padding-bottom:40px}.point-two-card .job-data{margin:0 0 22px;padding:24px;border:1px solid #d4e2e5;border-radius:18px;background:#fff}.point-two-card .dynamic-config{margin-top:0;padding-top:0;border-top:0}.point-two-card .dynamic-config-head{padding:5px 2px 14px}.point-two-card .article-route-card,.point-two-card .techniques-panel,.point-two-card .customer-supply-panel{background:#fff;border-radius:18px}.workflow-stage{border-radius:18px!important;box-shadow:none!important}.workflow-stage>.clean-section-head{min-height:94px;padding:20px 82px 20px 24px!important;background:#fff!important}.workflow-stage>.clean-section-head>span,.point-two-result-head>span{display:grid;width:48px;height:38px;flex:0 0 48px;place-items:center;border-radius:12px!important;background:#e4f7f9!important;color:#087d8e;font-size:13px;font-weight:900}.workflow-stage>.clean-section-head>div{gap:4px}.workflow-stage>.clean-section-head b{font-size:17px}.workflow-stage>.clean-section-head small{font-size:11px;line-height:1.35}.workflow-stage>.clean-section-body{padding:0 24px 24px}.workflow-stage>.clean-section-body:before{content:'';display:block;height:1px;margin:0 0 22px;background:#dbe7e9}.workflow-stage .section-toggle{right:22px;width:38px!important;height:38px!important}.workflow-stage.section-collapsed{border-left-color:#d4e2e5!important}.point-two-result-head{display:flex;align-items:center;gap:14px;margin:22px 0 0;padding:20px 24px;border:1px solid #d4e2e5;border-bottom:0;border-radius:18px 18px 0 0;background:#fff}.point-two-result-head>div{display:flex;flex-direction:column;gap:3px}.point-two-result-head b{font-size:17px}.point-two-result-head small{color:#6a7e86;font-size:11px}.point-two-result-head+.quote-engine{margin-top:0!important;border-radius:0 0 18px 18px!important}.section-collapsed .linked-chip{opacity:.82}.customer-card input,.customer-card select,.customer-card textarea,.workflow-stage input,.workflow-stage select,.workflow-stage textarea{border-color:#b9d9e6!important;border-radius:10px!important;background:#eaf6ff!important;box-shadow:none!important}.customer-card input[readonly],.customer-card textarea[readonly]{background:#f6f9fa!important}.customer-card input:focus,.customer-card select:focus,.customer-card textarea:focus,.workflow-stage input:focus,.workflow-stage select:focus,.workflow-stage textarea:focus{border-color:#58bcd1!important;box-shadow:0 0 0 3px rgba(0,174,202,.12)!important;outline:none}.workflow-stage-grid{padding:0!important;gap:16px!important}
@media(max-width:760px){.clean-section-head{min-height:96px;padding:20px 64px 20px 18px!important}.clean-section-head .section-heading-group{gap:12px}.clean-section-head .step-number,.workflow-stage>.clean-section-head>span{width:38px;height:38px;flex-basis:38px;font-size:13px}.clean-section-head h2{font-size:19px}.clean-section-head p{font-size:12px}.clean-section-head .linked-chip{display:none}.section-toggle{right:16px;width:38px!important;height:38px!important}.clean-section-body{padding:0 18px 22px}.workflow-stage>.clean-section-head{min-height:92px;padding:18px 58px 18px 16px!important}.workflow-stage>.clean-section-head b{font-size:16px}.workflow-stage>.clean-section-head small{font-size:10px}.workflow-stage .section-toggle{right:14px}.workflow-stage>.clean-section-body{padding:0 16px 20px}}
.calculation-start>.dynamic-config{display:contents}.dynamic-config>.dynamic-config-head,.dynamic-config>.article-route-card{display:none}.dynamic-fields{display:contents!important}.sequence-card{margin:0 0 24px!important}.sequence-card.empty-stage{display:none!important}.techniques-panel,.customer-supply-panel{padding:0!important}.techniques-panel .clean-section-body,.customer-supply-panel .clean-section-body{padding:0 36px 34px}.result-card .clean-section-body{padding:0 20px 30px}.result-card .quote-engine{margin-top:0!important}.workflow-stage-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px!important;padding:0!important}.workflow-stage-grid>.imposition-workbench,.workflow-stage-grid>fieldset,.workflow-stage-grid .wide,.workflow-stage-grid .span-2,.workflow-stage-grid .span-3{grid-column:1/-1}
.sequence-placeholder-note{padding:0 36px 30px;color:#6a7e86;font-size:14px}.sequence-placeholder.section-collapsed .sequence-placeholder-note{display:none}.result-card:has(.quote-engine.hidden)>.clean-section-body{display:none}
.workflow-stage>.clean-section-head{min-height:126px!important;padding:28px 104px 28px 36px!important}.workflow-stage>.clean-section-head .section-heading-group{display:flex!important;align-items:center!important;gap:20px!important}.workflow-stage>.clean-section-head .step-number{display:grid!important;width:46px!important;height:46px!important;flex:0 0 46px!important;place-items:center!important;border-radius:50%!important;background:#08adc0!important;color:#fff!important;font-size:16px!important}.workflow-stage>.clean-section-head h2{margin:0 0 6px!important;font-size:25px!important}.workflow-stage>.clean-section-head p{font-size:15px!important;line-height:1.4!important}.workflow-stage>.clean-section-head .linked-chip{display:inline-flex!important;width:auto!important;height:auto!important;flex:0 0 auto!important;border-radius:999px!important;background:#e4f8f1!important;color:#187052!important}.customer-card:has(#jobArticle) .job-data{grid-template-columns:minmax(170px,.45fr) minmax(300px,1.25fr) minmax(170px,.45fr)!important}.job-data .iw-job-models{display:flex!important;flex-direction:column;gap:7px;color:#4d626a;font-size:12px;font-weight:750}.job-data .iw-job-models input{width:100%;padding:12px 13px}

/* Uniformiza as etapas 5–10 com os cartões 1–4 e impede regras antigas
   do workflow de empilharem o número por cima do título. */
.workflow-stage{border-left:1px solid #d4e2e5!important;border-radius:22px!important;box-shadow:0 10px 30px rgba(20,58,67,.055)!important}
.workflow-stage>.clean-section-head{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:0!important;
}
.workflow-stage>.clean-section-head>.section-heading-group{
  display:flex!important;
  flex:1 1 auto!important;
  min-width:0!important;
  flex-direction:row!important;
  align-items:center!important;
  gap:20px!important;
}
.workflow-stage>.clean-section-head>.section-heading-group>div{
  display:block!important;
  min-width:0!important;
}
.workflow-stage>.clean-section-head>.linked-chip{
  margin-left:22px!important;
  margin-right:16px!important;
  padding:9px 14px!important;
  white-space:nowrap!important;
}

/* Os fieldsets foram movidos para a respetiva etapa; mantêm aqui a grelha
   de duas colunas que tinham dentro do motor de imposição. */
.workflow-stage-grid>fieldset{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:start!important;
  gap:16px 18px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
.workflow-stage-grid>fieldset>legend{grid-column:1/-1!important;margin:0 0 2px!important}
.workflow-stage-grid>fieldset>label,
.workflow-stage-grid>fieldset>.available-employees{min-width:0!important}
.workflow-stage-grid>fieldset>label.wide,
.workflow-stage-grid>fieldset>.wide,
.workflow-stage-grid>fieldset>.material-picker,
.workflow-stage-grid>fieldset>.available-employees.wide{grid-column:1/-1!important}

@media(max-width:760px){
  .workflow-stage>.clean-section-head>.section-heading-group{gap:12px!important}
  .workflow-stage-grid>fieldset{grid-template-columns:1fr!important}
  .workflow-stage-grid>fieldset>legend,
  .workflow-stage-grid>fieldset>label.wide,
  .workflow-stage-grid>fieldset>.wide,
  .workflow-stage-grid>fieldset>.material-picker,
  .workflow-stage-grid>fieldset>.available-employees.wide{grid-column:auto!important}
}

/* Regra global dos campos da Folha de Cálculo: todas as caixas têm a mesma
   presença visual e os textos auxiliares deixam de tocar no campo seguinte. */
.calculation-start label:not(.technique-option):not(.customer-supply-grid label){
  display:flex!important;
  min-width:0!important;
  flex-direction:column!important;
  gap:8px!important;
  margin:0!important;
  line-height:1.28!important;
}
.calculation-start input:not([type="checkbox"]):not([type="radio"]),
.calculation-start select{
  width:100%!important;
  height:64px!important;
  min-height:64px!important;
  max-height:64px!important;
  padding:0 16px!important;
  line-height:1.35!important;
  box-sizing:border-box!important;
}
.calculation-start textarea{
  width:100%!important;
  min-height:96px!important;
  padding:13px 14px!important;
  line-height:1.45!important;
}
.workflow-stage-grid>fieldset{
  row-gap:22px!important;
}
.workflow-stage-grid>fieldset+fieldset{
  margin-top:12px!important;
}
.calculation-start label>small,
.calculation-start label>.field-cost,
.calculation-start label>.quote-field-error-message{
  display:block!important;
  margin:2px 0 4px!important;
  line-height:1.42!important;
}
.calculation-start [aria-invalid="true"]{
  border-color:#d83a3a!important;
  box-shadow:0 0 0 3px rgba(216,58,58,.10)!important;
}
.calculation-start .quote-group-error-message{
  grid-column:1/-1!important;
  margin:-2px 0 4px!important;
  padding:11px 14px!important;
  border-left:4px solid #d83a3a!important;
  border-radius:7px!important;
  background:#fff3f3!important;
  color:#a92323!important;
  font-size:11px!important;
  font-weight:750!important;
  line-height:1.4!important;
}
.calculation-start .workflow-dispatch .workflow-stage-grid{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:18px!important;
}
.calculation-start .dispatch-subgroup{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;
  margin:0!important;
  padding:22px!important;
  border:1px solid #cddde1!important;
  border-radius:14px!important;
  background:#f8fbfc!important;
}
.calculation-start .dispatch-subgroup>legend{
  padding:0 10px!important;
  color:var(--teal-dark)!important;
  font-size:14px!important;
  font-weight:850!important;
}
.calculation-start .dispatch-subgroup>.span-2,
.calculation-start .dispatch-subgroup>.available-employees{
  grid-column:1/-1!important;
}
@media(max-width:760px){
  .calculation-start .dispatch-subgroup{grid-template-columns:1fr!important;padding:16px!important}
  .calculation-start .dispatch-subgroup>*{grid-column:1!important}
}
.calculation-start .available-employees{
  min-height:96px!important;
  margin-top:2px!important;
  padding:16px 18px!important;
  line-height:1.42!important;
}

/* Hierarquia visual única: as molduras pertencem às etapas principais.
   Dentro delas, cada grupo é identificado apenas por um título turquesa. */
.calculation-start .imposition-workbench-fields fieldset,
.calculation-start .workflow-stage-grid>fieldset{
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  padding:0!important;
}
.calculation-start .imposition-workbench-fields legend,
.calculation-start .workflow-stage-grid>fieldset>legend{
  display:inline-flex!important;
  width:max-content!important;
  max-width:100%!important;
  align-items:center!important;
  margin:0 0 20px!important;
  padding:10px 16px!important;
  border:0!important;
  border-radius:999px!important;
  background:#dff5f7!important;
  color:#087d8e!important;
  font-size:13px!important;
  font-weight:900!important;
  line-height:1.2!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}

/* Os campos antigos que alimentam o motor continuam no DOM para manter todas
   as ligações e a gravação, mas nunca devem voltar a aparecer na interface.
   Esta regra tem de ficar depois da uniformização global dos labels. */
.calculation-start .hidden,
.calculation-start .imposition-managed-source{
  display:none!important;
}
