/* Demo textil · estilos propios de los módulos del grupo «ventas» (clases con el prefijo de su módulo).
   pd- = pedidos (sus piezas pd-mk, pd-h4, pd-que y pd-sw también las usan planeación y empaque) · pl- = planeación ·
   em- = empaque y embarques. */

/* ── pedidos ── */
.pd-grid { display: grid; gap: 14px; margin-top: 14px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "at" "li" "cl"; align-items: start; }
.pd-at { grid-area: at; } .pd-li { grid-area: li; } .pd-cl { grid-area: cl; }
@media (min-width: 1100px) { .pd-grid { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); grid-template-areas: "li at" "li cl"; grid-template-rows: auto 1fr; } }
.pd-filtros { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; margin-top: 10px; }
.pd-filtros select.inp { text-overflow: ellipsis; }
.pd-ayuda { margin-top: 10px; }
.pd-lista { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.pd-it { border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; background: var(--surface); display: grid; gap: 8px; cursor: pointer; min-width: 0; transition: border-color .18s var(--ease), background .18s var(--ease), transform .12s var(--ease); }
.pd-it:hover { border-color: var(--line-2); background: var(--surface-2); }
.pd-it:active { transform: scale(.995); }
.pd-it-a { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.pd-it-a b { display: block; font-size: 15px; letter-spacing: -.01em; }
.pd-cli { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-it-b { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); min-width: 0; }
.pd-el { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-sw { width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--line-2); flex: 0 0 auto; display: inline-block; }
.pd-sw.lg { width: 34px; height: 34px; border-radius: 10px; }
.pd-it-c { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pd-seg { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.pd-seg i { display: block; height: 8px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.pd-seg b { display: block; height: 100%; background: var(--acc); opacity: .5; }
.pd-seg i.ok b { opacity: 1; }
.pd-pc { width: 40px; text-align: right; font-size: 12.5px; font-weight: 700; flex: 0 0 auto; }
.pd-it-d { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.pd-it-d b { color: var(--ink-2); font-weight: 650; }
.pd-pl { font-weight: 650; }
.pd-pl.ok { color: var(--ok); } .pd-pl.warn { color: var(--warn); } .pd-pl.bad { color: var(--bad); } .pd-pl.info { color: var(--info); }
@media (min-width: 1100px) {
  .pd-it { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.2fr) minmax(0, 1.25fr); align-items: center; column-gap: 18px; }
  .pd-it-d { grid-column: 1 / -1; }
}
.pd-mas { margin-top: 12px; width: 100%; }
.pd-mas-t { margin-top: 8px; }
.pd-clb { width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0; padding-left: 0; padding-right: 0; color: inherit; }
.pd-clb .t, .pd-clb .d { display: block; }
.pd-clb .barra { margin-top: 7px; }
.pd-clb > .i { color: var(--muted); }
.pd-bad { color: var(--bad); font-weight: 650; }

/* hoja del pedido */
.pd-h-top { gap: 6px; margin-bottom: 12px; }
.pd-que { display: flex; gap: 10px; align-items: flex-start; padding: 12px 13px; border-radius: 13px; background: var(--surface-2); color: var(--ink-2); font-size: 14px; margin-bottom: 14px; }
.pd-que .i { margin-top: 1px; color: var(--ink-2); }
.pd-que.ok { background: var(--ok-soft); } .pd-que.ok .i { color: var(--ok); }
.pd-que.warn { background: var(--warn-soft); } .pd-que.warn .i { color: var(--warn); }
.pd-que.bad { background: var(--bad-soft); } .pd-que.bad .i { color: var(--bad); }
.pd-que.info { background: var(--info-soft); } .pd-que.info .i { color: var(--info); }
.pd-mks { gap: 10px; margin-bottom: 16px; }
.pd-mk { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pd-mk small { font-size: 12px; color: var(--muted); font-weight: 600; }
.pd-mk b { font-size: 18px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-mk b.ok { color: var(--ok); } .pd-mk b.warn { color: var(--warn); } .pd-mk b.bad { color: var(--bad); }
.pd-cols { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .pd-cols { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.pd-h4 { font-size: 13px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pd-et { display: grid; grid-template-columns: 66px minmax(0, 1fr) auto 46px; align-items: center; gap: 8px; padding: 6px 0; font-size: 13.5px; }
.pd-et-t { font-weight: 650; }
.pd-et-x { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.pd-et-v { font-size: 12.5px; font-weight: 700; text-align: right; white-space: nowrap; }
.pd-links { display: flex; flex-direction: column; gap: 8px; }
.pd-ln { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); min-width: 0; transition: background .18s var(--ease), border-color .18s; }
.pd-ln:hover { background: var(--surface-2); border-color: var(--line-2); }
.pd-ln b { display: block; font-size: 14px; }
.pd-ln small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-ln > .i { color: var(--muted); }
.pd-prenda { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pd-prenda b { display: block; font-size: 15px; }
.pd-prenda small { display: block; font-size: 12.5px; color: var(--muted); }
.pd-tallas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.pd-tallas div { background: var(--surface-2); border-radius: 11px; padding: 8px 10px; text-align: center; min-width: 0; }
.pd-tallas small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 650; }
.pd-tallas b { font-size: 15px; }
.pd-fechas .it { padding: 8px 0; font-size: 13.5px; }

/* formulario de pedido nuevo */
.pd-form { margin-top: 14px; gap: 12px; }
.pd-form input[type=date] { min-width: 0; -webkit-appearance: none; appearance: none; }
.pd-tl { margin-top: 14px; }
.pd-tallas-in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pd-ti { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pd-ti span { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.pd-ti .inp { text-align: center; padding: 0 6px; }
.pd-curva { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pd-curva .inp { width: 110px; flex: 0 0 auto; }
.pd-res { margin-top: 14px; padding: 12px 13px; border-radius: 13px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; }
.pd-res-n { font-size: 17px; }
@media (max-width: 720px) { .pd-filtros { grid-template-columns: minmax(0, 1fr); } }

/* ── planeación ── */
.pl-grid { display: grid; gap: 14px; margin-top: 14px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "que" "sin" "gan" "car"; align-items: start; }
.pl-que { grid-area: que; } .pl-sin { grid-area: sin; } .pl-gan { grid-area: gan; } .pl-carga { grid-area: car; }
@media (min-width: 1100px) { .pl-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-areas: "gan que" "car sin"; } }
.pl-carga .tabla th, .pl-carga .tabla td { padding: 8px 6px; }
.pl-carga .tabla th { white-space: normal; }
.pl-lin b { display: block; white-space: nowrap; }
.pl-lin small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pl-cel { display: flex; flex-direction: column; gap: 5px; min-width: 50px; }
.pl-cel b { font-size: 14px; }
.pl-cel.ok b { color: var(--ok); } .pl-cel.bad b { color: var(--bad); }
.pl-cel small { font-size: 11px; color: var(--muted); white-space: nowrap; }
@media (max-width: 720px) { .pl-cel small { display: none; } .pl-lin b { font-size: 13px; } }
.pl-niv { margin: 12px 0 0; }
.pl-c { font-weight: 700; } .pl-c.ok { color: var(--ok); } .pl-c.bad { color: var(--bad); } .pl-c.acc { color: var(--acc); }
.pl-leyenda { margin-bottom: 12px; }
.pl-ley { width: 12px !important; height: 12px !important; border-radius: 3px !important; border-left: 3px solid; }
.pl-ley.en_proceso { background: var(--acc-soft) !important; border-color: var(--acc); }
.pl-ley.programado { background: var(--info-soft) !important; border-color: var(--info); }
.pl-ley.en_riesgo { background: var(--warn-soft) !important; border-color: var(--warn-dot); }
.pl-ley.atrasado { background: var(--bad-soft) !important; border-color: var(--bad); }
.pl-ley.tick { width: 3px !important; border-left: 0; background: var(--bad) !important; }
.pl-gantt { min-width: 0; }
.pl-g-eje, .pl-g-fila { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: center; }
.pl-g-fechas { position: relative; height: 18px; }
.pl-g-fechas span { position: absolute; top: 0; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; padding-left: 3px; white-space: nowrap; }
.pl-g-fila { margin-top: 8px; }
.pl-g-l { height: 36px; border: 0; background: none; font-weight: 750; font-size: 13px; color: var(--ink); padding: 0; text-align: left; }
.pl-g-pista { position: relative; height: 36px; background: var(--surface-2); border-radius: 9px; overflow: hidden; }
.pl-g-sem { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.pl-g-vacia { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.pl-bar { position: absolute; top: 3px; bottom: 3px; min-width: 4px; padding: 0 0 0 4px; border: 0; border-left: 3px solid; border-radius: 6px; font-size: 11px; font-weight: 750; text-align: left; overflow: hidden; white-space: nowrap; box-shadow: inset -2px 0 0 var(--surface); font-variant-numeric: tabular-nums; transition: filter .15s; }
.pl-bar:hover { filter: brightness(.96); }
.pl-bar span { display: block; overflow: hidden; text-overflow: clip; }
.pl-bar.en_proceso, .pl-bar.listo { background: var(--acc-soft); color: var(--acc); border-color: var(--acc); }
.pl-bar.programado { background: var(--info-soft); color: var(--info); border-color: var(--info); }
.pl-bar.en_riesgo { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-dot); }
.pl-bar.atrasado { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.pl-bar.nuevo { background: var(--surface-3); color: var(--ink-2); border-color: var(--line-2); }
.pl-bar.sigue { border-top-right-radius: 0; border-bottom-right-radius: 0; box-shadow: none; }
.pl-tick { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--bad); z-index: 2; pointer-events: none; }
.pl-sw { width: 14px; height: 14px; }
.pl-nota { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.pl-lk { gap: 10px; }
@media (max-width: 720px) { .pl-lk { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pl-lk .pd-mk b { font-size: 15px; } }
.pl-op { display: flex; gap: 12px; align-items: flex-start; padding: 12px 13px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--surface); transition: border-color .18s var(--ease), background .18s var(--ease); }
.pl-op.on { border-color: var(--acc); background: var(--acc-soft); }
.pl-op input { margin-top: 3px; accent-color: var(--acc); width: 18px; height: 18px; flex: 0 0 auto; }
.pl-op-f { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; color: var(--ink-2); margin: 6px 0 4px; }
.pl-como { margin-top: 12px; }

/* ── empaque y embarques ── */
.em-grid { display: grid; gap: 14px; margin-top: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .em-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.em-foco { margin-bottom: 14px; border-color: rgba(var(--acc-rgb), .35); }
.em-foco .g3 { gap: 10px; }
@media (max-width: 720px) { .em-foco .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .em-foco .pd-mk b { font-size: 14px; } }
.em-foco-t { margin-top: 10px; }
.em-foco-b { margin-top: 12px; gap: 8px; }
.em-pe .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.em-pe .barra { margin: 8px 0 6px; }
.em-pe-pie { gap: 6px 10px; }
.em-bad { color: var(--bad); font-weight: 650; }
.em-mas { margin-top: 12px; width: 100%; }
.em-nw { white-space: nowrap; }
.em-ref { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.em-ped b { display: block; } .em-ped small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
@media (max-width: 720px) { .em-ped b, .em-ped small { display: inline; } .em-ped small { margin-left: 6px; } }
.em-sob { margin-top: 10px; }
.em-lock { display: flex; gap: 10px; align-items: flex-start; padding: 12px 13px; border-radius: 13px; background: var(--surface-2); }
.em-lock .i { color: var(--muted); margin-top: 2px; }
.em-calc { margin-top: 14px; padding: 12px 13px; border-radius: 13px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.em-warn { color: var(--warn); display: flex; gap: 6px; align-items: flex-start; }
.em-warn .i { margin-top: 3px; }

/* el número del pedido solo aparece si cabe en su barra */
.pl-bar { container-type: inline-size; }
@container (max-width: 34px) { .pl-bar span { visibility: hidden; } }
