/* REEL-01 3b — lengths & pieces: the piece label line, the pieces register / card and «سلامة الأطوال». Loaded after app.css. */

/* piece label: the length (prominent), the warehouse and the reel tag under the barcode — the reel's physical identity */
.bl-piece{display:flex;justify-content:center;align-items:baseline;gap:1.2mm;white-space:nowrap;overflow:hidden;font-size:.86em;line-height:1.1}
.bl-piece .bl-len{font-size:1.25em;font-weight:800;font-variant-numeric:tabular-nums}
.bl-piece .bl-wh,.bl-piece .bl-reel{font-weight:600;overflow:hidden;text-overflow:ellipsis}
.bl-piece .bl-reel{border:0.2mm solid #000;border-radius:0.6mm;padding:0 0.7mm}

/* a whole-piece line in a stock document: the code under the item name */
.piece-code{display:inline-block;font-variant-numeric:tabular-nums;font-weight:700;direction:ltr;unicode-bidi:isolate;
  background:var(--surface-3);border:1px solid var(--border);border-radius:6px;padding:0 6px;font-size:var(--fs-sm)}
.piece-entry{display:flex;flex-wrap:wrap;align-items:end;gap:var(--s2);margin:0 0 var(--s2)}
.piece-entry label{display:flex;flex-direction:column;gap:2px;margin:0;font-size:var(--fs-sm);font-weight:600}
.piece-entry .inp{min-width:0;width:180px;max-width:100%}
.piece-entry .muted{flex:1 1 220px;font-size:var(--fs-sm)}

/* the register's filters wrap on a phone; the table scrolls inside its own box, never the page */
.piece-filters{display:flex;flex-wrap:wrap;gap:var(--s2);align-items:end;margin:0 0 var(--s3)}
.piece-filters label{display:flex;flex-direction:column;gap:2px;margin:0;font-size:var(--fs-sm);font-weight:600;min-width:0}
.piece-filters .inp{min-width:0;max-width:100%}
.piece-filters .num-range{display:flex;gap:4px;align-items:center}
.piece-filters .num-range .inp{width:84px}
.piece-filters .lk-wrap,.piece-filters .pf-item{width:240px;max-width:100%}
.piece-status{white-space:nowrap}
.piece-status.s3,.piece-status.s4{color:var(--muted)}
.piece-timeline td.delta-minus{color:var(--danger,#b42318)}
.piece-timeline td.delta-plus{color:var(--ok,#067647)}
.integrity-ok{color:var(--ok,#067647);font-weight:700}
.integrity-bad{color:var(--danger,#b42318);font-weight:700}
tr.integrity-row-bad td{background:color-mix(in srgb,var(--danger,#b42318) 7%,transparent)}
@media (max-width:560px){
  .piece-filters label{flex:1 1 140px}
  .piece-filters .lk-wrap,.piece-filters .pf-item{width:100%}
  .piece-entry .inp{width:100%}
}
