
.order-filters{display:grid;grid-template-columns:minmax(220px,1fr) 240px auto;gap:12px;margin:18px 0}.order-table{display:grid;grid-template-columns:1.3fr 1.2fr 1fr .8fr .8fr auto;gap:14px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line)}.order-head{font-size:.78rem;font-weight:800}.order-table strong small{display:block;font-weight:400;margin-top:4px}.order-state{font-weight:750}.order-empty{padding:24px 0}.order-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:18px 0}.order-summary-grid article{padding:16px;border:1px solid var(--line);border-radius:14px}.order-summary-grid small,.order-summary-grid strong{display:block}.order-item{display:grid;grid-template-columns:1fr auto auto;gap:18px;padding:14px 0;border-bottom:1px solid var(--line)}.order-item small{display:block}.order-total{display:flex;justify-content:flex-end;gap:30px;padding-top:18px;font-size:1.15rem}.order-event{padding:12px 0;border-bottom:1px solid var(--line)}.order-event span{margin-left:12px}.order-create-form{display:grid;gap:12px}.order-create-form label{display:grid;gap:6px}.order-create-form input,.order-create-form textarea{width:100%;box-sizing:border-box}
@media(max-width:900px){.order-table{grid-template-columns:1fr 1fr}.order-head{display:none}.order-summary-grid{grid-template-columns:1fr 1fr}.order-filters{grid-template-columns:1fr}}
@media(max-width:560px){.order-table,.order-summary-grid{grid-template-columns:1fr}.order-item{grid-template-columns:1fr}.order-total{justify-content:space-between}}

.accepted-quotes-card{margin-bottom:18px}.accepted-quote-row{border-top:1px solid var(--line);padding:4px 0}.accepted-quote-row summary{display:grid;grid-template-columns:1fr 1.2fr .8fr .9fr auto;gap:14px;align-items:center;padding:14px 0;cursor:pointer}.accepted-quote-row .order-create-form{padding:14px 0 20px}.customer-acceptance-confirmation{border:1px solid var(--line);border-radius:16px;padding:20px;margin-top:18px}
@media(max-width:900px){.accepted-quote-row summary{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.accepted-quote-row summary{grid-template-columns:1fr}}

.order-management-form{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:end}.order-management-form label{display:grid;gap:6px}.order-status-actions{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:18px}.order-status-actions form{display:grid;gap:10px}.btn-danger{border-color:#b42318;color:#b42318}.customer-instruction{padding:12px 0;border-top:1px solid var(--line)}.public-order-hero{padding:28px 0}.public-order-state{display:inline-block;padding:7px 11px;border:1px solid var(--line);border-radius:999px;font-weight:800}@media(max-width:760px){.order-management-form,.order-status-actions{grid-template-columns:1fr}}

.order-management-card{overflow:hidden}.order-flow{display:grid;grid-template-columns:repeat(5,1fr);margin:24px 0 30px}.order-flow-step{position:relative;text-align:center;padding-top:25px;font-size:.82rem}.order-flow-step:before{content:"";position:absolute;top:8px;left:0;right:0;height:3px;background:var(--line)}.order-flow-step:first-child:before{left:50%}.order-flow-step:last-child:before{right:50%}.order-flow-step>span{position:absolute;top:2px;left:50%;width:15px;height:15px;transform:translateX(-50%);border-radius:50%;border:3px solid var(--line);background:#fff;z-index:1}.order-flow-step.done:before,.order-flow-step.current:before{background:currentColor}.order-flow-step.done>span,.order-flow-step.current>span{border-color:currentColor}.order-management-section{padding:24px 0;border-top:1px solid var(--line)}.order-section-heading{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:18px}.order-section-heading>div{display:flex;align-items:center;gap:10px}.order-section-heading h3{margin:0}.order-section-heading p{margin:2px 0 0;max-width:470px}.order-section-number{display:inline-grid;place-items:center;width:28px;height:28px;border:1px solid var(--line);border-radius:50%;font-weight:800}.current-delivery,.current-order-state{display:inline-flex;flex-direction:column;gap:3px;padding:11px 14px;border:1px solid var(--line);border-radius:12px;margin-bottom:16px}.delivery-update-form{display:grid;grid-template-columns:minmax(210px,.8fr) minmax(260px,1.2fr) auto;gap:12px;align-items:end}.delivery-update-form label,.status-update-form label,.cancel-order-details label{display:grid;gap:6px}.status-update-form{display:grid;grid-template-columns:minmax(260px,1fr) auto;gap:12px;align-items:end}.cancel-order-details{max-width:650px}.cancel-order-details summary{cursor:pointer;display:inline-block;border:1px solid #b42318;color:#b42318;border-radius:9px;padding:9px 14px;font-weight:750}.cancel-order-details[open] summary{margin-bottom:16px}.cancel-order-details form{display:grid;gap:12px;padding:16px;border:1px solid var(--line);border-radius:12px}.cancel-order-details textarea{width:100%;box-sizing:border-box}@media(max-width:800px){.order-section-heading{display:block}.delivery-update-form,.status-update-form{grid-template-columns:1fr}.order-flow-step b{font-size:.72rem}}

/* Sprint 15.7.2.1 — fecha/hora comercial */
.order-table.order-head>span:nth-child(5),.order-table:not(.order-head)>span:nth-child(5){text-align:center;justify-self:center;white-space:nowrap}
.rfq-row.head>span:nth-child(4),.rfq-row:not(.head)>span:nth-child(4){text-align:center;justify-self:center;white-space:nowrap}

/* Sprint 15.9.1 */
.production-order-card{border-left:4px solid currentColor}.production-order-card.muted{opacity:.78}.production-order-title{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.production-status{display:inline-flex;padding:7px 11px;border:1px solid var(--line);border-radius:999px;font-weight:800}.production-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0}.production-summary>div{display:flex;flex-direction:column;gap:4px;padding:12px;border:1px solid var(--line);border-radius:12px}.production-item{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:8px 20px;padding:14px 0;border-top:1px solid var(--line)}.production-item>div:first-child{display:flex;flex-direction:column}.production-specs{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px 16px;font-size:.9rem}.production-instructions{margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}@media(max-width:800px){.production-summary{grid-template-columns:1fr 1fr}.production-order-title{display:block}}@media(max-width:520px){.production-summary{grid-template-columns:1fr}}

/* Sprint 15.9.2 */
.production-management{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:22px 0}.production-panel{padding:16px;border:1px solid var(--line);border-radius:14px}.production-panel h3{margin-top:0}.production-panel form{display:grid;gap:10px}.production-panel label{display:grid;gap:5px}.production-panel input,.production-panel textarea{width:100%;box-sizing:border-box}.production-cancel-form{margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}.production-complete{padding:12px;border:1px solid var(--line);border-radius:10px;font-weight:800}.production-history{margin-top:22px;border-top:1px solid var(--line);padding-top:16px}.production-event{display:grid;grid-template-columns:1fr auto;gap:3px 14px;padding:10px 0;border-bottom:1px solid var(--line)}.production-event small,.production-event p{grid-column:1/-1;margin:0}@media(max-width:900px){.production-management{grid-template-columns:1fr}}

/* Sprint 15.9.3 */
.quality-actions{display:grid;gap:16px}.quality-actions form+form{padding-top:14px;border-top:1px solid var(--line)}
.quality-summary{margin:20px 0;padding:16px;border:1px solid var(--line);border-radius:14px}.quality-summary>div{display:flex;justify-content:space-between;gap:12px;padding:6px 0}.quality-summary p{margin-bottom:0}


/* Sprint 15.9.5.3 — línea de tiempo ejecutiva refinada */
.order-progress-card{overflow:hidden}
.executive-timeline{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:0;
  margin-top:24px;
  padding:8px 10px 12px;
}
.executive-timeline .order-progress-step{
  min-width:0;
  text-align:center;
  padding:0;
  opacity:1;
}
.executive-timeline .order-progress-track{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
}
.executive-timeline .order-progress-dot{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  margin:0;
  box-sizing:border-box;
  border:3px solid currentColor;
  border-radius:50%;
  background:#fff;
  font-size:20px;
  font-weight:900;
  line-height:1;
}
.executive-timeline .order-progress-line{
  position:absolute;
  z-index:1;
  top:50%;
  left:calc(50% + 17px);
  width:calc(100% - 34px);
  height:4px;
  transform:translateY(-50%);
  border-radius:999px;
  background:currentColor;
  opacity:.18;
}
.executive-timeline .order-progress-line.is-active{opacity:1}
.executive-timeline .is-completed .order-progress-dot{
  background:#fff;
  color:#000;
}
.executive-timeline .is-current .order-progress-dot{
  background:#fff;
  box-shadow:0 0 0 5px color-mix(in srgb,currentColor 14%,transparent);
}
.executive-timeline .is-current .order-progress-dot::after{
  content:"";
  width:13px;
  height:13px;
  border-radius:50%;
  background:currentColor;
}
.executive-timeline .is-pending{opacity:.38}
.executive-timeline .is-pending .order-progress-dot{background:#fff}
.executive-timeline strong{
  display:block;
  max-width:135px;
  margin:8px auto 0;
  font-size:.84rem;
  line-height:1.22;
  font-weight:650;
}
.delivery-form{display:grid;gap:14px;max-width:720px}
.delivery-form label{display:grid;gap:6px}
.delivery-form textarea{resize:vertical}
.delivery-complete{display:grid;gap:6px}

@media(max-width:800px){
  .executive-timeline{
    display:block;
    padding:4px 4px 4px 12px;
  }
  .executive-timeline .order-progress-step{
    position:relative;
    display:grid;
    grid-template-columns:46px 1fr;
    align-items:start;
    min-height:68px;
    text-align:left;
  }
  .executive-timeline .order-progress-track{
    min-height:42px;
    justify-content:flex-start;
  }
  .executive-timeline .order-progress-line{
    top:32px;
    left:15px;
    width:4px;
    height:calc(100% + 36px);
    transform:none;
  }
  .executive-timeline strong{
    max-width:none;
    margin:9px 0 0 5px;
    font-size:.92rem;
  }
}

/* Sprint 15.9.6 */
.production-readonly{display:grid;gap:6px;padding:12px 0}.production-readonly small{opacity:.7}.production-readonly p{margin:0}

/* Sprint 15.10 — seguimiento ejecutivo para cliente */
.public-tracking-card{overflow:hidden}.public-section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:24px}.public-section-heading h2{margin:.2rem 0 0}
.public-order-timeline{display:grid;grid-template-columns:repeat(6,1fr);position:relative;margin:26px 0 18px}.public-order-timeline:before{content:"";position:absolute;left:8.333%;right:8.333%;top:18px;height:3px;background:var(--line);z-index:0}
.public-order-step{position:relative;text-align:center;z-index:1}.public-order-step:after{content:"";position:absolute;top:18px;left:50%;width:100%;height:3px;background:transparent;z-index:-1}.public-order-step.is-completed:after{background:#111}.public-order-step:last-child:after{display:none}
.public-order-node{width:38px;height:38px;border:2px solid #111;border-radius:50%;margin:0 auto 10px;background:#fff;display:grid;place-items:center;font-weight:900;color:#000}.public-order-step.is-pending .public-order-node{border-color:var(--line);color:transparent}.public-order-step.is-current .public-order-node{box-shadow:inset 0 0 0 9px #fff;background:#111}
.public-order-step-label{font-size:.82rem;font-weight:800;line-height:1.2}.public-order-step.is-pending .public-order-step-label{opacity:.48}.public-status-copy{margin:20px 0 0;padding-top:18px;border-top:1px solid var(--line)}
.public-order-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.public-order-summary div,.public-delivery-grid div{display:grid;gap:5px}.public-order-summary small,.public-delivery-card small{opacity:.65}.public-delivery-card{border-width:2px}.public-delivery-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}.public-delivery-notes{margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}
.public-history-row{display:flex;justify-content:space-between;gap:24px;padding:14px 0;border-top:1px solid var(--line)}.public-history-row:first-of-type{border-top:0}.public-history-row p{margin:.35rem 0 0}.public-history-row time{white-space:nowrap;font-size:.9rem;opacity:.72}
@media(max-width:760px){.public-section-heading{align-items:flex-start;flex-direction:column}.public-order-timeline{grid-template-columns:1fr;gap:0;margin-top:18px}.public-order-timeline:before{left:18px;right:auto;top:19px;bottom:19px;width:3px;height:auto}.public-order-step{display:grid;grid-template-columns:38px 1fr;text-align:left;align-items:center;gap:12px;padding-bottom:14px}.public-order-step:after{left:18px;top:38px;width:3px;height:100%}.public-order-node{margin:0}.public-order-summary,.public-delivery-grid{grid-template-columns:1fr}.public-history-row{display:grid;gap:5px}}

/* Sprint 15.10.1 — conexión visible entre nodos */
.public-order-timeline:before{background:#d9dde3!important}
.public-order-step.is-completed:after{background:#111!important}

/* Sprint 15.10.3 */
.public-order-timeline{position:relative!important;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;align-items:start}
.public-order-timeline::before{content:""!important;position:absolute!important;left:8.333333%!important;right:8.333333%!important;top:22px!important;height:3px!important;background:#d9dde3!important;border-radius:999px!important;z-index:0!important}
.public-order-step{position:relative!important;z-index:1!important}
@media(max-width:760px){.public-order-timeline{display:flex!important;flex-direction:column!important;gap:18px}.public-order-timeline::before{left:21px!important;right:auto!important;top:22px!important;bottom:22px!important;width:3px!important;height:auto!important}}

/* Sprint 15.10.5 — timeline cliente: selectores reales y color por etapa */
.public-order-timeline .public-order-node{position:relative!important;z-index:2!important;transition:background .2s ease,border-color .2s ease,color .2s ease}
.public-order-timeline .public-order-step:nth-child(1):is(.is-completed,.is-current) .public-order-node{background:#18bdf2!important;border-color:#18bdf2!important}
.public-order-timeline .public-order-step:nth-child(2):is(.is-completed,.is-current) .public-order-node{background:#3157ff!important;border-color:#3157ff!important}
.public-order-timeline .public-order-step:nth-child(3):is(.is-completed,.is-current) .public-order-node{background:#ff0067!important;border-color:#ff0067!important}
.public-order-timeline .public-order-step:nth-child(4):is(.is-completed,.is-current) .public-order-node{background:#9b51e0!important;border-color:#9b51e0!important}
.public-order-timeline .public-order-step:nth-child(5):is(.is-completed,.is-current) .public-order-node{background:#ffd400!important;border-color:#ffd400!important}
.public-order-timeline .public-order-step:nth-child(6):is(.is-completed,.is-current) .public-order-node{background:#25c26e!important;border-color:#25c26e!important}
.public-order-timeline .public-order-step.is-completed .public-order-node{color:#fff!important;box-shadow:0 0 0 4px rgba(255,255,255,.08)!important}
.public-order-timeline .public-order-step:nth-child(5).is-completed .public-order-node{color:#111!important}
.public-order-timeline .public-order-step.is-current .public-order-node{color:transparent!important;box-shadow:inset 0 0 0 9px #fff!important}
/* Cada tramo adopta el color de la etapa destino cuando ésta ya fue alcanzada. */
.public-order-timeline .public-order-step:nth-child(1).is-completed:after{background:#3157ff!important}
.public-order-timeline .public-order-step:nth-child(2).is-completed:after{background:#ff0067!important}
.public-order-timeline .public-order-step:nth-child(3).is-completed:after{background:#9b51e0!important}
.public-order-timeline .public-order-step:nth-child(4).is-completed:after{background:#ffd400!important}
.public-order-timeline .public-order-step:nth-child(5).is-completed:after{background:#25c26e!important}


/* Sprint 15.10.6 — seguimiento empresarial con lenguaje cromático Kromika */
.executive-timeline .order-progress-step:nth-child(1):is(.is-completed,.is-current){color:#18bdf2}
.executive-timeline .order-progress-step:nth-child(2):is(.is-completed,.is-current){color:#3157ff}
.executive-timeline .order-progress-step:nth-child(3):is(.is-completed,.is-current){color:#ff0067}
.executive-timeline .order-progress-step:nth-child(4):is(.is-completed,.is-current){color:#9b51e0}
.executive-timeline .order-progress-step:nth-child(5):is(.is-completed,.is-current){color:#ffd400}
.executive-timeline .order-progress-step:nth-child(6):is(.is-completed,.is-current){color:#25c26e}

/* Círculos alcanzados: relleno por etapa y palomita contrastante. */
.executive-timeline .order-progress-step:is(.is-completed,.is-current) .order-progress-dot{
  border-color:currentColor!important;
}
.executive-timeline .order-progress-step.is-completed .order-progress-dot{
  background:currentColor!important;
  box-shadow:0 0 0 4px color-mix(in srgb,currentColor 13%,transparent)!important;
}
/* La palomita es un elemento interno para no heredar el color del fondo. */
.executive-timeline .order-progress-step.is-completed .order-progress-dot{
  font-size:0!important;
}
.executive-timeline .order-progress-step.is-completed .order-progress-dot::before{
  content:"✓";
  color:#fff;
  font-size:20px;
  font-weight:900;
  line-height:1;
}
.executive-timeline .order-progress-step:nth-child(5).is-completed .order-progress-dot::before{
  color:#111;
}

/* Estado actual: aro de color con centro visible, sin alterar la lógica existente. */
.executive-timeline .order-progress-step.is-current .order-progress-dot{
  background:#fff!important;
  box-shadow:0 0 0 5px color-mix(in srgb,currentColor 15%,transparent)!important;
}
.executive-timeline .order-progress-step.is-current .order-progress-dot::after{
  background:currentColor!important;
}

/* Tramos activos: transición cromática hacia la siguiente etapa. */
.executive-timeline .order-progress-step:nth-child(1) .order-progress-line.is-active{
  background:linear-gradient(90deg,#18bdf2,#3157ff)!important;
}
.executive-timeline .order-progress-step:nth-child(2) .order-progress-line.is-active{
  background:linear-gradient(90deg,#3157ff,#ff0067)!important;
}
.executive-timeline .order-progress-step:nth-child(3) .order-progress-line.is-active{
  background:linear-gradient(90deg,#ff0067,#9b51e0)!important;
}
.executive-timeline .order-progress-step:nth-child(4) .order-progress-line.is-active{
  background:linear-gradient(90deg,#9b51e0,#ffd400)!important;
}
.executive-timeline .order-progress-step:nth-child(5) .order-progress-line.is-active{
  background:linear-gradient(90deg,#ffd400,#25c26e)!important;
}

/* Tramos todavía no alcanzados permanecen neutros. */
.executive-timeline .order-progress-line:not(.is-active){
  background:#d9dde3!important;
  opacity:.55!important;
}

/* Etiqueta del hito alcanzado conserva legibilidad; pendiente sigue neutro. */
.executive-timeline .order-progress-step:is(.is-completed,.is-current) > strong{
  color:currentColor;
}
.executive-timeline .order-progress-step.is-pending{
  color:inherit;
  opacity:.38;
}

/* En móvil el gradiente sigue la dirección vertical. */
@media(max-width:800px){
  .executive-timeline .order-progress-step:nth-child(1) .order-progress-line.is-active{background:linear-gradient(180deg,#18bdf2,#3157ff)!important}
  .executive-timeline .order-progress-step:nth-child(2) .order-progress-line.is-active{background:linear-gradient(180deg,#3157ff,#ff0067)!important}
  .executive-timeline .order-progress-step:nth-child(3) .order-progress-line.is-active{background:linear-gradient(180deg,#ff0067,#9b51e0)!important}
  .executive-timeline .order-progress-step:nth-child(4) .order-progress-line.is-active{background:linear-gradient(180deg,#9b51e0,#ffd400)!important}
  .executive-timeline .order-progress-step:nth-child(5) .order-progress-line.is-active{background:linear-gradient(180deg,#ffd400,#25c26e)!important}
}

/* Sprint 15.10.7 — círculos empresariales con color explícito.
   No dependemos de currentColor porque estilos heredados del punto pueden resolverlo a negro. */
.executive-timeline .order-progress-step:nth-child(1):is(.is-completed,.is-current) .order-progress-dot{
  background:#18bdf2!important;border-color:#18bdf2!important;color:#fff!important;
}
.executive-timeline .order-progress-step:nth-child(2):is(.is-completed,.is-current) .order-progress-dot{
  background:#3157ff!important;border-color:#3157ff!important;color:#fff!important;
}
.executive-timeline .order-progress-step:nth-child(3):is(.is-completed,.is-current) .order-progress-dot{
  background:#ff0067!important;border-color:#ff0067!important;color:#fff!important;
}
.executive-timeline .order-progress-step:nth-child(4):is(.is-completed,.is-current) .order-progress-dot{
  background:#9b51e0!important;border-color:#9b51e0!important;color:#fff!important;
}
.executive-timeline .order-progress-step:nth-child(5):is(.is-completed,.is-current) .order-progress-dot{
  background:#ffd400!important;border-color:#ffd400!important;color:#fff!important;
}
.executive-timeline .order-progress-step:nth-child(6):is(.is-completed,.is-current) .order-progress-dot{
  background:#25c26e!important;border-color:#25c26e!important;color:#fff!important;
}

/* Palomita siempre blanca, incluido Listo para entrega. */
.executive-timeline .order-progress-step.is-completed .order-progress-dot::before{
  content:"✓"!important;
  color:#fff!important;
  font-size:20px!important;
  font-weight:900!important;
  line-height:1!important;
  position:relative!important;
  z-index:3!important;
}
/* Neutraliza expresamente la regla amarilla anterior de 15.10.6. */
.executive-timeline .order-progress-step:nth-child(5).is-completed .order-progress-dot::before{
  color:#fff!important;
}

/* Estado actual conserva el color de su etapa, con aro exterior sutil. */
.executive-timeline .order-progress-step:is(.is-completed,.is-current) .order-progress-dot{
  box-shadow:0 0 0 4px rgba(255,255,255,.10)!important;
}
