/* Piezas nuevas de BTMS Frigo sobre la base visual de la gestión (tema Cupertino).
   Usan sólo los tokens de la app: --brand, --ink*, --surface*, --ok/--warn/--bad… */

.num-xl { font-size: 40px; font-weight: 650; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1; }
.num-l { font-size: 30px; font-weight: 620; letter-spacing: -.028em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.unidad { font-size: .5em; font-weight: 550; color: var(--ink-3); letter-spacing: 0; margin-left: 3px; }
.eyebrow { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.delta { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.saludo { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 18px; }
.saludo h2 { font-size: 21px; font-weight: 650; letter-spacing: -.02em; }
.saludo .muted { font-size: 13.5px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* Tarjeta con número grande */
.hero { display: flex; flex-direction: column; gap: 10px; min-height: 164px; }
.hero .pie { margin-top: auto; font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.hero .pie svg { width: 15px; height: 15px; flex: none; }
.hero-fila { display: flex; align-items: center; gap: 16px; }

/* Anillo de progreso */
.anillo { --p: 0; --t: 8px; width: 84px; height: 84px; flex: none; border-radius: 50%; position: relative;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--fill-2, var(--surface-2)) 0); }
.anillo::before { content: ''; position: absolute; inset: var(--t); border-radius: 50%; background: var(--surface); }
.anillo b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* Barra de progreso con marca de objetivo */
.prog { position: relative; height: 8px; border-radius: 99px; background: var(--fill, var(--surface-2)); overflow: hidden; }
.prog > i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--brand); }
.prog.ok > i { background: var(--ok); } .prog.warn > i { background: var(--warn-icon, var(--warn)); } .prog.bad > i { background: var(--bad); }
.prog.fina { height: 5px; }

/* Línea de faena: una fila por tropa */
.tropa-fila { display: grid; grid-template-columns: 64px minmax(0, 1fr) 150px 72px; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tropa-fila:last-child { border-bottom: 0; }
.tropa-n { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 15px; }
.tropa-n small { display: block; font-weight: 500; color: var(--ink-3); font-size: 11.5px; }
.tropa-q { text-align: right; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.tropa-fila .t { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tropa-fila .s { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.tropa-fila.en-curso { background: linear-gradient(90deg, var(--brand-soft), transparent 70%); margin: 0 -20px; padding: 12px 20px; border-radius: 0; }
.vivo { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ok); }
.vivo::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: latido 1.8s infinite; }
@keyframes latido { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .vivo::before { animation: none; } }

/* Cámaras en miniatura */
.cam-mini { display: grid; grid-template-columns: minmax(0,1fr) 64px; gap: 4px 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cam-mini:last-child { border-bottom: 0; }
.cam-mini .t { font-size: 13.5px; font-weight: 560; display: flex; justify-content: space-between; gap: 8px; }
.cam-mini .t span { color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.temp { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13.5px; text-align: right; }
.temp.alta { color: var(--bad); }
.temp.frio { color: var(--info); }

/* Lista de avisos */
.aviso { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.aviso:last-child { border-bottom: 0; }
.aviso .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--fill, var(--surface-2)); color: var(--ink-2); }
.aviso .ico svg { width: 16px; height: 16px; }
.aviso.bad .ico { background: var(--bad-soft); color: var(--bad); }
.aviso.warn .ico { background: var(--warn-soft); color: var(--warn); }
.aviso.info .ico { background: var(--info-soft); color: var(--info); }
.aviso .t { font-weight: 560; font-size: 14px; }
.aviso .s { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.aviso .cta { margin-left: auto; align-self: center; flex: none; }

/* Grillas propias */
.g-tablero { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .g-tablero { grid-template-columns: 1fr; } }
.dato-par { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0; }
.dato-par > div { padding: 2px 16px; border-left: 1px solid var(--line); }
.dato-par > div:first-child { border-left: 0; padding-left: 0; }
.dato-par .v { font-size: 20px; font-weight: 620; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.dato-par .s { font-size: 12.5px; color: var(--ink-3); }

.spark { width: 100%; height: 36px; display: block; }
.spark path.l { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark path.a { fill: var(--brand-soft); opacity: .8; }
.spark line { stroke: var(--line-strong); stroke-dasharray: 3 3; }

.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.card-h .muted { font-size: 13px; }
.enlace { font-size: 13.5px; font-weight: 550; }

/* Teléfono */
@media (max-width: 767px) {
  .num-xl { font-size: 34px; }
  .tropa-fila { grid-template-columns: 48px minmax(0,1fr) 56px; row-gap: 8px; }
  .tropa-fila .tropa-q { grid-row: 1; grid-column: 3; }
  .tropa-fila .prog-col { grid-row: 2; grid-column: 2 / 4; }
  .grid.g4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid.g4 > .hero:first-child, .grid.g4 > .hero:nth-child(4) { grid-column: 1 / 3; }
  .hero { min-height: 0; gap: 8px; }
  .hero .num-xl { font-size: 30px; }
  .anillo { width: 64px; height: 64px; --t: 7px; }
  .anillo b { font-size: 14px; }
  .hero .pie { font-size: 12.5px; align-items: flex-start; }
  .card-h { flex-wrap: wrap; }
  .kpi .v { font-size: 22px; }
  html[data-tema] .grid.g4 > .kpi:nth-child(4):last-child { grid-column: 1 / -1; }  /* 1 + 2 + 1: sin huecos */
  .buscador .campo .muted { display: none; }
  .buscador .btn { padding: 0 14px; }
  .planta-h .estado { white-space: nowrap; }
  .metricas { grid-template-columns: 1fr 1fr; }
  .tropa-fila.en-curso { margin: 0 -16px; padding: 12px 16px; }
  .dato-par { grid-template-columns: 1fr; gap: 10px; }
  .dato-par > div { border-left: 0; padding: 0; }
}

/* ---------- Tablero B: el grupo de un vistazo ---------- */
.titular { font-size: 34px; font-weight: 700; letter-spacing: -.035em; line-height: 1.12; margin: 6px 0 6px; max-width: 900px; }
.titular em { font-style: normal; color: var(--brand); }
.bajada { font-size: 15px; color: var(--ink-2); max-width: 760px; margin-bottom: 22px; }
.seg { display: inline-flex; background: var(--fill); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; font: inherit; font-size: 13px; padding: 5px 13px; border-radius: 8px; color: var(--ink); cursor: pointer; }
.seg button.on { background: var(--seg-on, #fff); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); font-weight: 550; }
.planta { display: flex; flex-direction: column; gap: 16px; }
.planta-h { display: flex; align-items: center; gap: 12px; }
.planta-h .ini { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-weight: 650; font-size: 13px; }
.planta-h .ini.b { background: #2f6f5e; }
.planta-h b { font-size: 16px; letter-spacing: -.01em; display: block; }
.planta-h small { color: var(--ink-3); font-size: 12.5px; }
.planta-h .estado { margin-left: auto; }
.metricas { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.metricas .v { font-size: 22px; font-weight: 620; letter-spacing: -.022em; font-variant-numeric: tabular-nums; }
.metricas .l { font-size: 12px; color: var(--ink-3); font-weight: 550; }
.metricas .s { font-size: 12px; color: var(--ink-3); }
.franja { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; }
.franja > div { padding: 4px 20px; border-left: 1px solid var(--line); }
.franja > div:first-child { border-left: 0; padding-left: 0; }
.franja .v { font-size: 24px; font-weight: 640; letter-spacing: -.025em; font-variant-numeric: tabular-nums; margin-top: 6px; }
.franja .s { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.viaje { display: grid; grid-template-columns: 22px minmax(0,1fr) minmax(0, 2fr) 90px; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.viaje:last-child { border-bottom: 0; }
.viaje .band { font-size: 18px; line-height: 1; }
.viaje .t { font-weight: 560; font-size: 14px; }
.viaje .s { font-size: 12.5px; color: var(--ink-3); }
.ruta { position: relative; height: 4px; border-radius: 99px; background: var(--fill); }
.ruta > i { position: absolute; inset: 0 auto 0 0; background: var(--brand); border-radius: 99px; }
.ruta > b { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.ruta-l { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.viaje .temp-v { text-align: right; }
@media (max-width: 1100px) { .metricas, .franja { grid-template-columns: repeat(2, minmax(0,1fr)); row-gap: 14px; } .franja > div:nth-child(3) { border-left: 0; padding-left: 0; } }
@media (max-width: 767px) {
  .titular { font-size: 26px; }
  .viaje { grid-template-columns: 22px minmax(0,1fr) auto; row-gap: 10px; }
  .viaje .temp-v { grid-row: 1; grid-column: 3; }
  .viaje .ruta-col { grid-row: 2; grid-column: 2 / 4; }
}

/* ---------- Trazar ---------- */
.buscador { display: flex; gap: 10px; align-items: center; }
.buscador .campo { flex: 1; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); font-size: 16px; }
.buscador .campo svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.buscador .campo b { font-family: var(--mono); font-weight: 600; letter-spacing: .02em; }
.buscador .btn { height: 46px; padding: 0 18px; }
.g-traza { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 16px; }
@media (max-width: 1100px) { .g-traza { grid-template-columns: 1fr; } }
.pieza { display: flex; gap: 16px; align-items: center; }
.pieza .foto { width: 56px; height: 56px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.pieza .foto svg { width: 26px; height: 26px; }
.pieza h2 { font-size: 20px; letter-spacing: -.02em; }
.pieza .s { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.linea-t { position: relative; margin-top: 18px; padding-left: 4px; }
.paso { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 14px; padding-bottom: 20px; }
.paso:last-child { padding-bottom: 0; }
.paso::before { content: ''; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--line-strong); }
.paso:last-child::before { display: none; }
.paso .nodo { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: 0 0 0 1.5px var(--line-strong) inset; color: var(--brand); position: relative; z-index: 1; }
.paso .nodo svg { width: 17px; height: 17px; }
.paso.fin .nodo { background: var(--brand); color: var(--brand-ink); box-shadow: none; }
.paso .et { font-size: 11.5px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.paso .t { font-weight: 600; font-size: 15px; margin-top: 1px; }
.paso .s { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.paso .cuando { font-size: 12.5px; color: var(--ink-3); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 2px; }
.paso .chips { margin-top: 6px; }
.impacto { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin: 10px 0 16px; }
.impacto .v { font-size: 24px; font-weight: 640; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.impacto .l { font-size: 12.5px; color: var(--ink-3); }
html[data-tema] .btn.peligro { background: var(--bad); color: #fff; }
html[data-tema] .btn.peligro:hover { filter: brightness(1.06); background: var(--bad); }
.btn svg { width: 16px; height: 16px; }
.attach svg { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.btn.ancho { width: 100%; justify-content: center; height: 42px; }

/* B: mapa en columnas */
.recall-bar { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 16px; background: var(--bad-soft); color: var(--bad); margin-bottom: 16px; }
.recall-bar svg { width: 22px; height: 22px; flex: none; }
.recall-bar b { color: var(--ink); font-size: 15px; display: block; }
.recall-bar span { color: var(--ink-2); font-size: 13px; }
.recall-bar .btn { margin-left: auto; }
.cols { display: grid; grid-template-columns: minmax(0, .9fr) 28px minmax(0, 1fr) 28px minmax(0, 1.25fr); gap: 0; align-items: stretch; }
.col-h { font-size: 12px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 10px 4px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.flecha { display: grid; place-items: center; color: var(--ink-3); }
.flecha svg { width: 18px; height: 18px; }
.nodo-c { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 13px 15px; }
.nodo-c .et { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.nodo-c .t { font-weight: 600; font-size: 14.5px; margin-top: 1px; }
.nodo-c .s { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.nodo-c .kg { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; float: right; color: var(--ink); }
.nodo-c.bloq { box-shadow: 0 0 0 1.5px var(--bad) inset, var(--shadow); }
.nodo-c.fuera { box-shadow: 0 0 0 1.5px var(--warn-icon, var(--warn)) inset, var(--shadow); }
.nodo-c .acc { display: flex; gap: 6px; margin-top: 10px; }
.nodo-c .acc .btn { height: 28px; font-size: 12.5px; padding: 0 11px; }
.estado-av { font-size: 12px; font-weight: 600; display: inline-flex; gap: 5px; align-items: center; margin-top: 6px; }
.estado-av.ok { color: var(--ok); } .estado-av.pend { color: var(--warn); }
.cadena-mini { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.cadena-mini i { font-style: normal; color: var(--ink-3); }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } .flecha { transform: rotate(90deg); height: 28px; } }
@media (max-width: 767px) {
  .paso { grid-template-columns: 36px minmax(0,1fr); }
  .paso .cuando { grid-column: 2; text-align: left; padding: 0; }
  .recall-bar { flex-wrap: wrap; }
  .recall-bar .btn { margin-left: 38px; }
}

/* ---------- Cámaras ---------- */
.filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filtro { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; background: var(--fill); font-size: 13px; color: var(--ink); }
.filtro.on { background: var(--brand); color: var(--brand-ink); }
.filtro b { font-weight: 600; }
.camaras { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.cam { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.cam.alerta { box-shadow: 0 0 0 1.5px var(--bad) inset, var(--shadow); }
.cam-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cam-h b { font-size: 16px; letter-spacing: -.01em; display: block; }
.cam-h small { color: var(--ink-3); font-size: 12.5px; }
.cam-temp { text-align: right; }
.cam-temp .v { font-size: 26px; font-weight: 640; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.cam-temp .r { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; white-space: nowrap; }
.cam.alerta .cam-temp .v { color: var(--bad); }
.cam.frio .cam-temp .v { color: var(--info); }
.cam svg.traza { width: 100%; height: 38px; display: block; }
.traza .banda { fill: var(--ok-soft); }
.traza .l { fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.cam.alerta .traza .l { stroke: var(--bad); }
.ocup { display: flex; align-items: baseline; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.ocup b { font-variant-numeric: tabular-nums; }
.duenos { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: var(--fill); gap: 2px; }
.duenos i { display: block; height: 100%; }
.leyenda { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); margin-top: 7px; }
.leyenda span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; background: var(--c); vertical-align: 0; }
.cam-pie { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto; }
.cam-pie b { display: block; color: var(--ink); font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums; margin-top: 1px; }
.cam-pie .bad, .cam-pie .bad b { color: var(--bad); }
.cam-pie .warn b { color: var(--warn); }
.cam.tercero { background: linear-gradient(var(--surface), var(--surface)) padding-box; }
.cam .sello { position: absolute; top: 0; right: 0; }

/* B: lista + detalle */
.g-cam { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .g-cam { grid-template-columns: 1fr; } }
.lista-cam { padding: 6px; }
.lc { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.lc + .lc { margin-top: 2px; }
.lc:hover { background: var(--fill); }
.lc.on { background: var(--brand); color: var(--brand-ink); }
.lc.on .s, .lc.on .temp { color: inherit; opacity: .85; }
.lc .t { font-weight: 560; font-size: 14px; }
.lc .s { font-size: 12px; color: var(--ink-3); grid-column: 1; }
.lc .temp { grid-row: 1 / 3; grid-column: 2; align-self: center; }
.lc.grp-t { display: block; font-size: 11.5px; font-weight: 650; color: var(--ink-3); padding: 12px 12px 4px; cursor: default; }
.lc.grp-t:hover { background: none; }
.lista-cam a.lc { color: var(--ink); text-decoration: none; }
.lista-cam a.lc.on { color: var(--brand-ink); }
.lc.on.alerta .temp::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff6b61; margin-right: 6px; vertical-align: 1px; }
.det-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.det-h h2 { font-size: 22px; letter-spacing: -.02em; }
.grafico-t { width: 100%; height: 150px; display: block; margin-top: 8px; }
.grafico-t .banda { fill: var(--ok-soft); }
.grafico-t .lim { stroke: var(--ok); stroke-dasharray: 4 4; stroke-width: 1; opacity: .6; }
.grafico-t .l { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; }
.grafico-t .pico { fill: none; stroke: var(--bad); stroke-width: 2.2; stroke-linejoin: round; }
.grafico-t text { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.grafico-t .ev { fill: var(--bad); }
.tbl .sub td { background: var(--fill); font-size: 12px; font-weight: 650; color: var(--ink-3); padding-top: 8px; padding-bottom: 8px; }
.tbl td .mini { font-size: 12px; color: var(--ink-3); display: block; }

/* Dólar del día en el inicio */
.chip-dolar { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip-dolar b { color: var(--ink); font-weight: 600; }
.chip-dolar i { width: 1px; height: 12px; background: var(--line); margin: 0 4px; }

/* ---------------------------------------------------------------- embarques en viaje (mapa) */
.mapa-card { position: relative; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 4%, var(--surface)), var(--surface)); }
.mapa { display: block; width: 100%; height: auto; }
.mapa .grilla { fill: none; stroke: color-mix(in srgb, var(--ink) 6%, transparent); stroke-width: .6; }
.mapa .tierra { fill: color-mix(in srgb, var(--ink) 9%, var(--surface)); stroke: var(--surface); stroke-width: .6; stroke-linejoin: round; }
.mapa .orig { fill: var(--ink-2); }
.mapa .ruta { cursor: pointer; transition: opacity .2s; }
.mapa .ruta.apagada { opacity: .28; }
.mapa .ruta path { fill: none; stroke-linecap: round; }
.mapa .ruta .hecha { stroke: var(--brand); stroke-width: 2.4; }
.mapa .ruta .falta { stroke: var(--brand); stroke-width: 1.6; stroke-dasharray: 2 5; opacity: .55; }
.mapa .ruta.sel .hecha { stroke-width: 3.2; }
.mapa .ruta .dest { fill: var(--surface); stroke: var(--brand); stroke-width: 2; }
.mapa .ruta .barco { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.mapa .ruta .pulso { fill: var(--brand); opacity: .35; transform-box: fill-box; transform-origin: center; }
.mapa .ruta.mal .barco, .mapa .ruta.mal .pulso { fill: var(--bad); }
.mapa .ruta.mal .hecha { stroke: var(--bad); }
.mapa text { font: 600 11px var(--font); fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 3.5px; stroke-linejoin: round; }
.mapa .lugar { font-weight: 500; fill: var(--ink-3); font-size: 10.5px; }
@media (prefers-reduced-motion: no-preference) {
  .mapa .ruta .pulso { animation: mapa-pulso 2.4s ease-out infinite; }
  @keyframes mapa-pulso { 0% { transform: scale(1); opacity: .45; } 100% { transform: scale(3.2); opacity: 0; } }
}
.mapa-nota { position: absolute; top: 14px; left: 18px; }
.mapa-ley { display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 18px 14px; color: var(--ink-3); border-top: 1px solid var(--line); }
.mapa-ley span { display: inline-flex; align-items: center; gap: 7px; }
.mapa-ley i { display: inline-block; width: 18px; height: 0; border-top: 2.4px solid var(--brand); }
.mapa-ley .l-falta { border-top: 2px dotted var(--brand); opacity: .7; }
.mapa-ley .l-barco { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }

.emb-lista { display: flex; flex-direction: column; }
.emb { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 34px minmax(0, 1.3fr) minmax(0, 1.4fr) minmax(0, 1fr) 190px; gap: 18px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); cursor: pointer; }
.emb:hover { background: var(--surface-2); }
.emb.sel { background: color-mix(in srgb, var(--brand) 6%, var(--surface)); box-shadow: inset 3px 0 0 var(--brand); }
.emb:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.emb-band { font-size: 22px; line-height: 1; }
.emb-txt b, .emb-pos b { display: block; font-weight: 600; font-size: 14.5px; }
.emb small { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.emb-txt small, .emb-pos small { display: block; }
.emb-bar { display: block; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.emb-bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.emb-temp { display: grid; grid-template-columns: 80px auto; column-gap: 12px; align-items: center; justify-items: end; }
.emb-temp b { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--info, var(--brand)); }
.emb.mal .emb-temp b { color: var(--bad); }
.emb-temp small { grid-column: 1 / -1; margin-top: 2px; }
.emb-spark { width: 80px; height: 28px; grid-row: span 1; }
.emb-spark polyline { fill: none; stroke: var(--ink-2); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.emb-spark .banda { fill: color-mix(in srgb, var(--ok) 14%, transparent); }
@media (max-width: 900px) {
  .emb { grid-template-columns: 30px minmax(0, 1fr) auto; row-gap: 10px; }
  .emb-prog { grid-column: 2 / -1; }
  .emb-pos { grid-column: 2 / 3; }
  .emb-temp { grid-column: 3; grid-row: 1; }
  .emb-spark { display: none; }
  .mapa text { font-size: 15px; }
}

/* ---------------------------------------------------------------- stock de la planta */
.ex-filtros { flex-wrap: wrap; gap: 8px; }
.ex-tabla td { vertical-align: middle; }
.ex-tabla td small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.ex-fila { cursor: pointer; }
.ex-fila.on { background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.ex-bar { width: 110px; height: 5px; border-radius: 5px; background: color-mix(in srgb, #7c5cc4 55%, var(--line)); overflow: hidden; }
.ex-bar i { display: block; height: 100%; background: var(--brand); }
.ex-donde, .ex-merc { display: flex; flex-wrap: wrap; gap: 5px; }
.ex-donde span { font-size: 12px; background: var(--surface-2); border-radius: 7px; padding: 3px 8px; color: var(--ink-2); white-space: nowrap; }
.ex-donde b { color: var(--ink); font-weight: 600; margin-left: 2px; }
.ex-merc span { font-size: 11px; font-weight: 650; letter-spacing: .03em; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; color: var(--ink-2); }
.ex-det td { background: var(--surface-2); padding: 14px 18px !important; }
.ex-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.ex-u { display: block; background: var(--surface); border-radius: 10px; padding: 9px 11px; color: inherit; text-decoration: none; border: 1px solid var(--line); }
.ex-u:hover { border-color: var(--brand); }
.ex-u b { display: block; font-size: 13px; font-variant-numeric: tabular-nums; }
.ex-u span { display: block; font-size: 12.5px; color: var(--ink-2); }
.ex-u small { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.ex-u.bloq { border-color: var(--bad); }
@media (max-width: 900px) { .ex-tabla th:nth-child(4), .ex-tabla td:nth-child(4), .ex-tabla th:nth-child(7), .ex-tabla td:nth-child(7) { display: none; } }

/* Con el asistente abierto el inicio pierde 400px: los indicadores van de a dos y
   la línea de faena y las cámaras, una debajo de la otra (mismo umbral que app.css) */
@media (max-width: 1799px) {
  .con-asis .main .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .con-asis .g-tablero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1499px) {
  .con-asis .main .grid.g2 { grid-template-columns: minmax(0, 1fr); }
  .con-asis .emb { grid-template-columns: 30px minmax(0, 1fr) auto; row-gap: 10px; }
  .con-asis .emb-prog { grid-column: 2 / -1; }
  .con-asis .emb-temp { grid-column: 3; grid-row: 1; }
  .con-asis .emb-spark { display: none; }
}

/* ---------------------------------------------------------------- hacienda: compra y recepción */
.ha-form { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 22px; align-items: start; }
.ha-resumen { position: sticky; top: 0; background: var(--surface-2); border-radius: 14px; padding: 16px 18px; }
.ha-resumen h3 { margin: 0 0 10px; font-size: 12px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.ha-resumen .dl { font-size: 13.5px; }
.ha-resumen .tot { font-weight: 650; color: var(--ink); border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.ha-resumen dt small { color: var(--ink-3); font-weight: 400; }
.ha-puesto { margin: 14px 0 6px; background: var(--surface); border-radius: 12px; padding: 12px 14px; }
.ha-puesto small { display: block; font-size: 12px; color: var(--ink-3); }
.ha-puesto b { display: block; font-size: 22px; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ha-puesto span { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.ha-tropa-nueva { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.ha-tropa-nueva b { font-size: 34px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ha-tropa-nueva span { color: var(--ink-2); }
.ha-seg { flex-wrap: wrap; align-self: flex-start; }
.ha-link { font-weight: 500; font-size: 12px; margin-left: 2px; }
.ha-liq .check { font-weight: 500; }
.ha-liq-num { margin-top: 8px; max-width: 320px; }
.ha-caravanas summary { cursor: pointer; font-size: 13px; color: var(--brand); font-weight: 500; padding: 4px 0; }
.ha-caravanas textarea { margin-top: 8px; }

.ha-llegan { display: flex; flex-direction: column; }
.ha-llega { display: grid; grid-template-columns: 96px minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); cursor: pointer; }
.ha-llega:hover { background: var(--surface-2); }
.ha-canal { font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); border-radius: 7px; padding: 4px 8px; justify-self: start; }
.ha-quien b, .ha-cant b { display: block; font-size: 14.5px; font-weight: 600; }
.ha-quien small, .ha-cant small { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.ha-tabla tbody tr { cursor: pointer; }
.ha-tabla td small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.ha-tabla .ha-dif { color: var(--warn); }
.ha-tabla tfoot td { font-weight: 600; border-top: 1px solid var(--line); }
.ha-anulada td { opacity: .45; text-decoration: line-through; }
.ok-t { color: var(--ok); font-weight: 600; }

.ha-det-quien { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.ha-det-quien small { display: block; font-size: 12px; color: var(--ink-3); }
.ha-det-quien b { display: block; font-size: 15px; margin-top: 2px; }
.ha-det-quien span { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.ha-tropas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 8px; }
.ha-tropa { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: inherit; text-decoration: none; }
.ha-tropa:hover { border-color: var(--brand); }
.ha-tropa b { display: block; font-size: 14px; }
.ha-tropa span, .ha-tropa small { display: block; font-size: 12.5px; color: var(--ink-2); }
.ha-tropa small { color: var(--ink-3); }
@media (max-width: 900px) {
  .ha-form { grid-template-columns: minmax(0, 1fr); }
  .ha-resumen { position: static; }
  .ha-llega { grid-template-columns: minmax(0, 1fr) auto; }
  .ha-canal { display: none; }
  .ha-cant { grid-column: 1 / 2; }
  .ha-det-quien { grid-template-columns: minmax(0, 1fr); }
}
.ha-tabla td.first, .ha-tabla td.first small { white-space: nowrap; }
.ha-tabla .badge { white-space: nowrap; }

/* ---------------------------------------------------------------- programa de faena */
.fa-top { flex-wrap: wrap; }
.fa-dia b { min-width: 150px; }
.fa-dia b span { color: var(--ink-3); font-weight: 500; margin-left: 4px; }
.fa-lista { list-style: none; margin: 0; padding: 0; }
.fa-fila { display: grid; grid-template-columns: 30px minmax(0, 1fr) 96px 250px 124px 104px; gap: 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.fa-fila.viva { background: color-mix(in srgb, var(--ok) 5%, var(--surface)); }
.fa-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 12.5px; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fa-fila.viva .fa-n { background: var(--ok); color: #fff; }
.fa-fila.lista .fa-n { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.fa-fila b { display: block; font-size: 14.5px; font-weight: 600; }
.fa-fila small { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.fa-quien b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fa-quien b span { font-weight: 500; color: var(--ink-2); }
.fa-quien small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fa-serv { color: #7c5cc4; font-weight: 600; }
.fa-cab { display: flex; flex-direction: column; align-items: flex-end; }
.fa-cab input { width: 72px; text-align: right; font-weight: 600; font-size: 15px; padding: 6px 8px; }
.fa-cab b { font-size: 16px; font-variant-numeric: tabular-nums; }
.fa-tipo { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.fa-eq { width: 100%; }
.fa-seg button { padding: 4px 9px; font-size: 12.5px; }
.fa-eq { font-size: 12.5px; padding: 4px 8px; max-width: 190px; }
.fa-hora b { font-variant-numeric: tabular-nums; }
.fa-bar { height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; }
.fa-bar i { display: block; height: 100%; background: var(--ok); border-radius: 5px; }
.fa-dif { color: var(--warn); font-weight: 600; }
.fa-acc { display: flex; gap: 2px; justify-content: flex-end; }
.fa-vacio { padding: 36px 20px; }
.fa-dlista { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.fa-dlista .fa-d { border-right: 1px solid var(--line); }
.fa-d { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.fa-d > div { flex: 1; min-width: 0; }
.fa-d b { display: block; font-size: 14px; font-weight: 600; }
.fa-d small { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
@media (max-width: 1100px) {
  .fa-fila { grid-template-columns: 30px minmax(0, 1fr) auto; row-gap: 10px; }
  .fa-quien { grid-column: 2; }
  .fa-cab { grid-column: 3; grid-row: 1; }
  .fa-tipo { grid-column: 2 / -1; grid-row: 2; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .fa-eq { width: auto; }
  .fa-hora { grid-column: 2; grid-row: 3; }
  .fa-acc { grid-column: 3; grid-row: 3; }
}
@media (max-width: 1499px) {
  .con-asis .fa-fila { grid-template-columns: 30px minmax(0, 1fr) auto; row-gap: 10px; }
  .con-asis .fa-quien { grid-column: 2; }
  .con-asis .fa-cab { grid-column: 3; grid-row: 1; }
  .con-asis .fa-tipo { grid-column: 2 / -1; grid-row: 2; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .con-asis .fa-eq { width: auto; }
  .con-asis .fa-hora { grid-column: 2; grid-row: 3; }
  .con-asis .fa-acc { grid-column: 3; grid-row: 3; }
}

/* ---------------------------------------------------------------- desposte */
.de-lote { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 44px minmax(0, 1.3fr) minmax(0, 1fr) 110px minmax(0, 1fr) 104px; gap: 18px; align-items: center; width: 100%; padding: 14px 20px; border-top: 1px solid var(--line); cursor: pointer; }
.de-lote:hover { background: var(--surface-2); }
.de-lote:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.de-lote.mal { box-shadow: inset 3px 0 0 var(--warn); }
.de-n { height: 32px; min-width: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); font-weight: 650; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.de-n.vivo { background: var(--brand); color: #fff; }
.de-n.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.de-lote b { display: block; font-size: 14.5px; font-weight: 600; }
.de-lote small { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.de-quien b, .de-quien small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.de-ang { color: #9a6200; }
.de-av .fa-bar i { background: var(--brand); }
.de-rb { position: relative; display: block; height: 6px; border-radius: 6px; background: var(--line); }
.de-rb i { display: block; height: 100%; border-radius: 6px; background: var(--ink-3); }
.de-rb i.ok { background: var(--ok); } .de-rb i.bajo { background: var(--warn); }
.de-rb em { position: absolute; top: -3px; width: 2px; height: 12px; border-radius: 2px; background: var(--ink); transform: translateX(-1px); }
.de-est { justify-self: end; }
.de-bal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.de-bal > div { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.de-bal small { display: block; font-size: 12px; color: var(--ink-3); }
.de-bal b { display: block; font-size: 21px; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.de-bal span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.de-bal .ok b { color: var(--ok); } .de-bal .bajo b { color: var(--warn); }
.de-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, .8fr); gap: 22px; align-items: start; }
.de-cols h3 { margin: 0 0 10px; font-size: 12px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.de-cols h3 span { color: var(--ink); letter-spacing: 0; }
.de-scan, .de-caja { display: flex; gap: 6px; margin-bottom: 8px; }
.de-scan input { flex: 1; min-width: 0; }
.de-caja select { flex: 1; min-width: 0; }
.de-caja input { width: 70px; text-align: right; }
.de-mas { margin-bottom: 8px; }
.de-list { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow: auto; }
.de-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.de-list li span { color: var(--ink-3); }
.de-list em { font-style: normal; font-variant-numeric: tabular-nums; }
.de-cortes { width: 100%; border-collapse: collapse; font-size: 13px; }
.de-cortes th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 12px; padding: 4px 0 6px; }
.de-cortes td { padding: 7px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.de-cortes .num { text-align: right; }
.de-dif { color: var(--warn); font-weight: 600; }
.de-mermas { display: flex; flex-direction: column; gap: 8px; }
.de-mermas label { display: grid; grid-template-columns: minmax(0, 1fr) 84px 52px; align-items: center; gap: 8px; font-size: 13.5px; }
.de-mermas input { text-align: right; }
.de-mermas em { font-style: normal; font-size: 12px; color: var(--ink-3); text-align: right; }
@media (max-width: 1100px) {
  .de-lote { grid-template-columns: 44px minmax(0, 1fr) auto; row-gap: 8px; }
  .de-av, .de-rinde { grid-column: 2 / -1; }
  .de-cajas { display: none; }
  .de-est { grid-row: 1; grid-column: 3; }
  .de-cols { grid-template-columns: minmax(0, 1fr); }
  .de-bal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1499px) {
  .con-asis .de-lote { grid-template-columns: 44px minmax(0, 1fr) auto; row-gap: 8px; }
  .con-asis .de-av, .con-asis .de-rinde { grid-column: 2 / -1; }
  .con-asis .de-cajas { display: none; }
  .con-asis .de-est { grid-row: 1; grid-column: 3; }
}

/* ---------------------------------------------------------------- rendimientos */
.rd-flujo { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: end; gap: 10px; padding: 8px 4px 0; }
.rd-paso { display: flex; flex-direction: column; align-items: center; text-align: center; }
.rd-bar { width: 100%; max-width: 150px; height: 170px; display: flex; align-items: flex-end; background: var(--surface-2); border-radius: 12px; overflow: hidden; }
.rd-bar i { display: block; width: 100%; background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 75%, #fff), var(--brand)); border-radius: 10px 10px 12px 12px; }
.rd-paso b { font-size: 22px; letter-spacing: -.02em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.rd-paso span { font-size: 13.5px; font-weight: 600; margin-top: 2px; }
.rd-paso small { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.rd-pierde { align-self: center; display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 110px; padding-bottom: 60px; }
.rd-pierde span { font-size: 14px; font-weight: 650; color: #b4441f; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rd-pierde small { font-size: 11.5px; color: var(--ink-3); line-height: 1.3; margin-top: 2px; }
.rd-pierde::before { content: '→'; color: var(--ink-3); font-size: 18px; margin-bottom: 4px; }
.rd-tabla td small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.rd-tabla tbody tr[data-tropa] { cursor: pointer; }
.rd-tabla tfoot td { font-weight: 650; border-top: 1px solid var(--line); }
.rd-tabla td.first { max-width: 240px; }
.rd-tabla td.first b { white-space: nowrap; }
.rd-tabla td small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-mal { color: #b4441f; }
.card-h .seg { margin-left: auto; }
@media (max-width: 900px) {
  .rd-flujo { grid-template-columns: 1fr 1fr; row-gap: 16px; }
  .rd-pierde { display: none; }
  .rd-bar { height: 110px; }
}
.rd-tabla th, .rd-tabla td { padding-left: 9px; padding-right: 9px; font-size: 13.5px; }
.rd-tabla th { font-size: 12px; white-space: nowrap; }
.rd-tabla th:first-child, .rd-tabla td:first-child { padding-left: 20px; }
.rd-tabla th:last-child, .rd-tabla td:last-child { padding-right: 20px; }

/* ---------------------------------------------------------------- expedición */
.xp-ped { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 44px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .9fr) 108px; gap: 18px; align-items: center; width: 100%; padding: 14px 20px; border-top: 1px solid var(--line); cursor: pointer; }
.xp-ped:hover { background: var(--surface-2); }
.xp-ped:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.xp-ped.corto { box-shadow: inset 3px 0 0 var(--warn); }
.xp-ped.anul { opacity: .5; }
.xp-ped b { display: block; font-size: 14.5px; font-weight: 600; }
.xp-ped small { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.xp-quien b, .xp-quien small, .xp-stock small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-quien .badge { font-size: 11px; vertical-align: 1px; margin-left: 4px; }
.de-n.mal { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.xp-stock b { font-size: 13.5px; }
.xp-ok { color: var(--ok); }
.xp-falta { color: var(--warn); }
.xp-rev { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.xp-rv { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 20px; border-top: 1px solid var(--line); cursor: pointer; }
.xp-rv:hover { background: var(--surface-2); }
.xp-rv > span:first-child { flex: 1; min-width: 0; }
.xp-rv b { display: block; font-size: 14.5px; font-weight: 600; }
.xp-rv small { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* el pedido abierto */
.xp-pasos { list-style: none; margin: 2px 0 18px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.xp-pasos li { position: relative; padding-top: 22px; text-align: center; }
.xp-pasos li::before { content: ''; position: absolute; top: 6px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.xp-pasos li:first-child::before { display: none; }
.xp-pasos li.hecho::before, .xp-pasos li.ahora::before { background: var(--ok); }
.xp-pasos i { position: absolute; top: 0; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); box-sizing: border-box; z-index: 1; }
.xp-pasos li.hecho i { background: var(--ok); border-color: var(--ok); }
.xp-pasos li.ahora i { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.xp-pasos b { display: block; font-size: 13px; font-weight: 600; }
.xp-pasos li:not(.hecho):not(.ahora) b { color: var(--ink-3); font-weight: 500; }
.xp-pasos small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; min-height: 1.3em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.xp-dato { margin: 0 0 14px; font-size: 13.5px; color: var(--ink-2); }
.xp-tab { margin-bottom: 18px; }
.xp-tab tfoot td { font-weight: 600; border-top: 1.5px solid var(--ink-3); padding-top: 8px; }
.xp-chip { display: inline-block; font-size: 10.5px; font-weight: 650; letter-spacing: .04em; padding: 1px 6px; border-radius: 5px; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); vertical-align: 1px; margin-left: 4px; }
.xp-chip.ang { background: #fdf1dc; color: #9a6200; }
.xp-prep { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
.xp-prep h3, .xp-hojas h3 { margin: 0 0 10px; font-size: 12px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.xp-carg li { grid-template-columns: minmax(0, 1fr) auto auto 22px; align-items: center; }
.xp-x { all: unset; cursor: pointer; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--ink-3); font-size: 16px; }
.xp-x:hover { background: var(--surface-2); color: var(--bad); }
.xp-hoja { border-top: 1px solid var(--line); padding: 10px 0 6px; }
.xp-hoja > b { display: flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.xp-hoja > b span { margin-left: auto; font-weight: 500; font-size: 12.5px; color: var(--ink-3); }
.xp-lugar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 36px; gap: 10px; padding: 3px 0; font-size: 12.5px; align-items: baseline; }
.xp-lugar small { color: var(--ink-2); font-weight: 600; font-size: 12px; }
.xp-lugar span { color: var(--ink-3); font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 11.5px; line-height: 1.5; }
.xp-lugar span em { font-family: inherit; font-style: normal; }
.xp-lugar > em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.xp-lugar.falta small, .xp-lugar.falta > em { color: var(--warn); }
.xp-lugar.falta span { font-family: inherit; font-size: 12.5px; }
.xp-bal { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.xp-bal span a { color: var(--brand); }
.xp-salida { margin-top: 14px; }
.xp-its { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.xp-it { display: grid; grid-template-columns: minmax(0, 1.5fr) 150px minmax(0, 1fr) minmax(0, .9fr) 100px 32px; gap: 8px; align-items: start; }
.xp-its:not(:has(input[data-k="precio_kg"])) .xp-it { grid-template-columns: minmax(0, 1.5fr) 150px minmax(0, 1fr) minmax(0, .9fr) 32px; }
.xp-it-h { font-size: 12px; color: var(--ink-3); align-items: end; }
.xp-cant input { width: 100%; text-align: right; }
.xp-cant small { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 3px; text-align: right; }
.xp-it input[data-k="precio_kg"] { text-align: right; }
@media (max-width: 1100px) {
  .xp-ped { grid-template-columns: 44px minmax(0, 1fr) auto; row-gap: 8px; }
  .xp-ped .de-av { grid-column: 2 / -1; }
  .xp-stock { grid-column: 2 / -1; grid-row: 3; }
  .xp-ped .de-est { grid-row: 1; grid-column: 3; }
  .xp-prep { grid-template-columns: minmax(0, 1fr); }
  .xp-bal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1499px) {
  .con-asis .xp-ped { grid-template-columns: 44px minmax(0, 1fr) auto; row-gap: 8px; }
  .con-asis .xp-ped .de-av { grid-column: 2 / -1; }
  .con-asis .xp-stock { grid-column: 2 / -1; grid-row: 3; }
  .con-asis .xp-ped .de-est { grid-row: 1; grid-column: 3; }
}
@media (max-width: 640px) {
  .xp-pasos small { display: none; }
  .xp-it { grid-template-columns: minmax(0, 1fr) 110px 32px !important; }
  .xp-it > select[data-k="mercado"], .xp-it > select[data-k="certificacion"], .xp-it > input[data-k="precio_kg"] { grid-column: 1 / -1; }
  .xp-it-h { display: none !important; }
  .xp-lugar { grid-template-columns: 84px minmax(0, 1fr) 30px; }
}
@media (max-width: 640px) { .xp-it [data-quitar] { grid-column: 3; grid-row: 1; } }
.de-av .fa-bar { display: block; }
.de-n.act { background: var(--brand); color: #fff; }
.xp-der { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) {
  .xp-tab .xp-pr, .xp-cerrar { display: none; }
  .xp-pasos b { font-size: 12px; }
  .xp-lugar span { font-size: 11px; }
}
.xp-its + [data-mas] { align-self: flex-start; }
@media (max-width: 640px) { .xp-sub { display: none; } }

/* ---------------------------------------------------------------- servicios a terceros */
.tc-h { align-items: flex-start; gap: 16px; }
.tc-h h2 { margin: 0; }
.tc-h .small { display: block; margin-top: 3px; }
.tc-acc { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.tc-ct { all: unset; cursor: pointer; color: var(--brand); border-bottom: 1px dotted currentColor; }
.tc-ct:hover { border-bottom-style: solid; }
.tc-tab { width: 100%; }
.tc-tab th, .tc-tab td { padding-left: 20px; }
.tc-tab th:last-child, .tc-tab td:last-child { padding-right: 20px; }
.tc-tab th { padding-top: 10px; }
.tc-est { text-align: right; white-space: nowrap; }
.tc-est a.badge { text-decoration: none; }
.tc-mal td { color: var(--bad); }
.tc-mal td .badge { color: inherit; }
@media (max-width: 760px) {
  .tc-h { flex-direction: column; }
  .tc-acc { margin-left: 0; justify-content: flex-start; }
  .tc-tab th:nth-child(2), .tc-tab td:nth-child(2), .tc-tab th:nth-child(5), .tc-tab td:nth-child(5) { display: none; }
  .tc-tab th, .tc-tab td { padding-left: 12px; font-size: 12.5px; }
}

/* ---------------------------------------------------------------- portal del tercero */
.pt-prev { display: flex; align-items: center; gap: 14px; }
.pt-prev > div { flex: 1; }
.pt-head h2 { margin: 0; font-size: 30px; letter-spacing: -.025em; font-weight: 650; }
.pt-head p { margin: 4px 0 0; color: var(--ink-3); font-size: 15px; }
.pt-tab { width: 100%; }
.pt-tab th, .pt-tab td { padding-left: 20px; }
.pt-tab th:last-child, .pt-tab td:last-child { padding-right: 20px; }
.pt-tab th { padding-top: 10px; }
.pt-tab tr[data-tropa] { cursor: pointer; }
.pt-tab tr[data-tropa]:hover td { background: var(--surface-2); }
.pt-list { list-style: none; margin: 0; padding: 0; }
.pt-list li { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--line); }
.pt-list li > span { flex: 1; min-width: 0; }
.pt-list b { display: block; font-size: 14px; font-weight: 600; }
.pt-list small { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.pt-list em { font-style: normal; font-variant-numeric: tabular-nums; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.pt-bar { display: block; margin-top: 7px; max-width: 260px; }
.pt-bar i { background: var(--brand); }
.pt-dos { align-items: start; }
.pt-prox { display: flex; gap: 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.pt-prox b { font-size: 13px; white-space: nowrap; }
.pt-prox span { flex: 1; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.pt-prox em { font-style: normal; font-weight: 650; font-size: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pt-prox em small { font-weight: 400; font-size: 12px; color: var(--ink-3); }
.pt-tip { margin: -6px 0 12px; line-height: 1.6; }
.pt-rom { max-height: 420px; overflow: auto; }
.pt-rom thead th { position: sticky; top: 0; background: var(--surface); }
@media (max-width: 760px) {
  .pt-tab th:nth-child(4), .pt-tab td:nth-child(4), .pt-tab th:nth-child(6), .pt-tab td:nth-child(6), .pt-tab th:nth-child(8), .pt-tab td:nth-child(8) { display: none; }
  .pt-tab th, .pt-tab td { padding-left: 12px; font-size: 12.5px; }
  .pt-prox { flex-wrap: wrap; }
  .pt-prev { flex-direction: column; align-items: stretch; }
}
.tc-tab .tc-est { text-align: right; }
.pt-list em small { display: block; text-align: right; font-weight: 400; margin-top: 1px; }
.pt-rom th, .pt-rom td { padding-right: 12px; }
.pt-rom th:nth-child(n+6), .pt-rom td:nth-child(n+6) { padding-left: 22px; }
@media (max-width: 640px) {
  .pt .card-h .small, .tc-card .tc-h .small .tc-ct { display: none; }
  .pt-rom th:nth-child(2), .pt-rom td:nth-child(2), .pt-rom th:nth-child(3), .pt-rom td:nth-child(3) { display: none; }
}

/* ---------------------------------------------------------------- cheques de papel */
.badge.ch-papel { background: #f3ecdf; color: #7a5a1e; font-size: 10.5px; vertical-align: 1px; }
.ch-alta { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }
.ch-caras { display: flex; flex-direction: column; gap: 12px; }
.ch-cara { all: unset; box-sizing: border-box; cursor: pointer; aspect-ratio: 2.3 / 1; border: 1.5px dashed var(--line-2, var(--line)); border-radius: 12px; display: grid; place-items: center; text-align: center;
  background: var(--surface-2) center / cover no-repeat; color: var(--ink-2); transition: border-color .15s; }
.ch-cara:hover { border-color: var(--brand); color: var(--brand); }
.ch-cara span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; }
.ch-cara b { font-size: 13.5px; font-weight: 600; }
.ch-cara small { font-size: 11.5px; color: var(--ink-3); }
.ch-cara.con { border-style: solid; border-color: var(--line); }
.ch-cara.con span { opacity: 0; }
.ch-cara:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ch-marcas { display: flex; gap: 22px; flex-wrap: wrap; }
.ch-fotos { margin-bottom: 14px; }
@media (max-width: 760px) {
  .ch-alta { grid-template-columns: minmax(0, 1fr); }
  .ch-caras { flex-direction: row; }
  .ch-cara { flex: 1; }
}
.form .f.ch-marcas { flex-direction: row; align-items: center; }
.ch-otros { display: flex; flex-direction: column; gap: 10px; }
.ch-otros .btn { flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 16px; height: auto; text-align: left; }
.ch-fotos { margin-top: 8px; }
