/* Seguimiento de pedidos (Beta) — usa también .entw-* de entregas.css */
.seg-beta { background: #f1ecfb; border-left: 4px solid #6d3fc4; color: #4b2a8a; border-radius: 8px; padding: 9px 14px; font-size: 12.5px; margin-bottom: 14px; }
.seg-ley { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 8px 18px; font-size: 11.5px; color: #6f6a62; border-bottom: 1px solid #f1eee6; }
.seg-ley span { display: inline-flex; align-items: center; gap: 6px; }
.seg-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.seg-dot.s-v, .seg-sem.s-v { --s: #2f7a45; } .seg-dot.s-a, .seg-sem.s-a { --s: #c27a1a; }
.seg-dot.s-r, .seg-sem.s-r { --s: #b0303f; } .seg-dot.s-g, .seg-sem.s-g { --s: #9a948a; }
.seg-dot { background: var(--s); }

.seg-lista { display: flex; flex-direction: column; }
.seg-fila { border-bottom: 1px solid #f1eee6; border-left: 4px solid transparent; cursor: pointer; }
.seg-fila.sem-r { border-left-color: #b0303f; } .seg-fila.sem-a { border-left-color: #c27a1a; }
.seg-fila.sem-v { border-left-color: #2f7a45; } .seg-fila.sem-g { border-left-color: #d6d1c6; }
.seg-fila:hover { background: #fcfbf8; }
.seg-fila.on { background: #faf9f5; }
.seg-cab { display: grid; grid-template-columns: minmax(220px, 290px) 1fr 18px; gap: 16px; align-items: center; padding: 12px 16px 10px; }
.seg-id { min-width: 0; line-height: 1.35; }
.seg-sem { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--s);
  background: color-mix(in srgb, var(--s) 12%, #fff); border-radius: 20px; padding: 2px 9px; margin-bottom: 4px; }
.seg-nro { font-weight: 700; font-size: 14px; color: #2a2722; overflow-wrap: anywhere; }
.seg-cli { font-size: 12.5px; color: #4a463e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg-ct { font-size: 11.5px; color: #6f6a62; }
.seg-fe { display: block; font-size: 11.5px; color: #4a463e; margin-top: 2px; }
.seg-fe.muted, .muted { color: #7a746b; }
.seg-chev { color: #b8b2a6; transition: transform .15s; }
.seg-fila.on .seg-chev { transform: rotate(90deg); }

/* Etapas */
.seg-pasos { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; position: relative; }
.seg-paso { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; min-width: 0; padding: 0 2px; }
.seg-paso::before { content: ''; position: absolute; top: 12px; left: -50%; right: 50%; height: 3px; background: #e9e5dc; z-index: 0; }
.seg-paso:first-child::before { display: none; }
.seg-paso.t-ok::before { background: #8cc39c; }
.seg-paso.t-par::before { background: linear-gradient(90deg, #8cc39c, #edc488); }
.seg-ic { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; background: #fff; border: 2px solid #ddd8cd; color: #b8b2a6; }
.seg-paso.ok .seg-ic { background: #2f7a45; border-color: #2f7a45; color: #fff; }
.seg-paso.parcial .seg-ic { background: #fff4e3; border-color: #c27a1a; color: #c27a1a; }
.seg-paso.alerta .seg-ic { background: #b0303f; border-color: #b0303f; color: #fff; }
.seg-paso.na .seg-ic { border-style: dashed; }
.seg-pl { font-size: 11px; font-weight: 700; color: #4a463e; margin-top: 4px; text-transform: uppercase; letter-spacing: .03em; }
.seg-pv { font-size: 11px; color: #6f6a62; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; font-variant-numeric: tabular-nums; }
.seg-paso.parcial .seg-pv { color: #a0620f; } .seg-paso.alerta .seg-pv { color: #b0303f; font-weight: 600; }

.seg-als { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.seg-al { font-size: 11.5px; border-radius: 6px; padding: 3px 9px; }
.seg-al.r { background: #fbe9eb; color: #8c2232; } .seg-al.a { background: #fdf1df; color: #85540e; } .seg-al.i { background: #e8f0fa; color: #1f4e86; }

/* Detalle */
.seg-det { padding: 4px 16px 16px; cursor: default; }
.seg-t { font-size: 12.5px; background: #fff; border: 1px solid #ece8df; border-radius: 8px; }
.seg-t td, .seg-t th { padding: 7px 10px; }
.seg-t tfoot td { font-weight: 700; border-top: 1px solid #e5e1d8; background: #faf9f5; }
.seg-bar { display: inline-block; width: 70px; height: 6px; background: #ece8df; border-radius: 4px; overflow: hidden; vertical-align: middle; }
.seg-bar i { display: block; height: 100%; background: #2f7a45; }
.seg-bp { font-size: 11px; margin-left: 6px; color: #4a463e; }
.seg-datos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; margin-top: 12px; }
.seg-datos div { display: flex; flex-direction: column; font-size: 12.5px; }
.seg-datos span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #6f6a62; font-weight: 700; }
.seg-datos b { font-weight: 600; color: #2a2722; }
.seg-acc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

@media (max-width: 900px) {
  .seg-cab { grid-template-columns: 1fr 18px; }
  .seg-pasos { grid-column: 1 / -1; grid-row: 2; }
  .seg-pl { font-size: 11px; }
  .seg-pv { font-size: 11px; }
}

/* Última novedad del pedido */
.seg-nov { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 10px; margin: 0 16px 10px; padding: 7px 12px;
  background: #f7f5f0; border-radius: 8px; font-size: 12.5px; border-left: 3px solid #b8b2a6; }
.seg-nov.quieto { background: #fdf3e4; border-left-color: #c27a1a; }
.seg-nov-l { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #6f6a62; }
.seg-nov-h { font-weight: 700; color: #2a2722; white-space: nowrap; }
.seg-nov-a { font-size: 11px; font-weight: 700; color: #1f4e86; background: #e8f0fa; border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.seg-nov-t { color: #2a2722; flex: 1 1 260px; min-width: 0; }
.seg-nov-u { color: #6f6a62; white-space: nowrap; } .seg-nov-u b { color: #4a463e; font-weight: 600; }
.seg-nov-q { font-size: 11px; font-weight: 700; color: #a0620f; white-space: nowrap; }

/* Historial (detalle) */
.seg-hist { margin-top: 14px; border: 1px solid #ece8df; border-radius: 8px; background: #fff; max-height: 360px; overflow: auto; }
.seg-hist-t { position: sticky; top: 0; background: #faf9f5; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #6f6a62;
  font-weight: 700; padding: 8px 12px; border-bottom: 1px solid #ece8df; }
.seg-hist-i { display: grid; grid-template-columns: 118px auto 1fr auto; gap: 10px; align-items: baseline; padding: 6px 12px; border-bottom: 1px solid #f4f2ec; font-size: 12.5px; }
.seg-hist-i:last-child { border-bottom: 0; }
.seg-hist-f { font-size: 11.5px; color: #6f6a62; }
.seg-hist-d { color: #2a2722; min-width: 0; overflow-wrap: anywhere; }
.seg-hist-u { font-size: 11.5px; color: #4a463e; white-space: nowrap; }
@media (max-width: 900px) {
  .seg-hist-i { grid-template-columns: 1fr auto; }
  .seg-hist-d { grid-column: 1 / -1; }
  .seg-hist-u { grid-column: 1 / -1; }
}

/* Siete pestañas: el buscador baja de línea antes que apretarlas */
.seg .entw-bar-top { flex-wrap: wrap; }
.seg .entw-tab { white-space: nowrap; }
.seg .entw-busca { flex: 1 1 240px; min-width: 200px; }

/* Estado actual según los formularios */
.seg-est { margin: 0 16px 10px; padding: 8px 12px; border-radius: 8px; background: #f7f5f0; border-left: 3px solid var(--tc, #b8b2a6); font-size: 12.5px; }
.seg-est.t-v { --tc: #2f7a45; background: #f2f8f3; } .seg-est.t-b { --tc: #1f4e86; background: #eef3fa; }
.seg-est.t-a { --tc: #c27a1a; background: #fdf5e8; } .seg-est.t-r { --tc: #b0303f; background: #fbedef; }
.seg-est-1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 10px; }
.seg-est-e { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--tc, #8a8478); white-space: nowrap; }
.seg-est-t { font-weight: 600; color: #2a2722; flex: 1 1 300px; min-width: 0; }
.seg-est-f { margin-top: 3px; color: #4a463e; font-size: 12px; }
.seg-est-x { margin-top: 3px; color: #85540e; font-size: 12px; }
.seg-est-x::before { content: '↳ '; color: #b8b2a6; }

/* Quien pide menos movimiento en su sistema: sin animaciones ni transiciones */
@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}
