/* The part's traveler builder (views/traveler.js): one bordered card per item (seq, name and badges; what the item holds; the buttons on a
   row of their own), the Area sections holding cards, the add buttons, the pay strip, and the preview of the traveler new jobs get. Items paid together read as one:
   the follower joins the card above with a dashed seam, and paid cards carry the accent edge. Also the dwell tables (part and job). */
.trav-build { margin-top: 18px; } .trav-build h3 { margin: 0 0 4px; } .trav-build > p { margin: 0 0 10px; }
.trav-build [data-banner] .alert { margin-bottom: 10px; }
.trav-build .alert.warn, .trav-item .alert.warn, .modal .alert.warn { border-left-color: var(--warn); background: var(--warn-soft); color: var(--text); }
.trav-rebuild { margin-bottom: 10px; } .trav-rebuild .row { margin-top: 8px; } .trav-item .trav-rebuild { margin: 8px 0 0; }
.trav-items { display: grid; gap: 10px; }
.trav-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); min-width: 0; }
.trav-item.paid { border-left: 3px solid var(--primary); }
.trav-item.k-group, .trav-item.k-tank { border-left: 3px solid var(--tank); }
.trav-item.k-line { border-left: 3px solid var(--warn); }
.trav-item.joined { margin-top: -11px; border-top: 1px dashed var(--primary); border-top-left-radius: 0; border-top-right-radius: 0; }
.trav-item.off { background: var(--surface-2); }
.trav-item-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; }
.trav-item-head .seq { flex: none; min-width: 22px; font-size: 12px; color: var(--text-3); }
.trav-item-head .nm { flex: 1 1 200px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.trav-item-head .tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.trav-sub, .trav-note { margin-top: 4px; overflow-wrap: anywhere; } .trav-notice { margin-bottom: 6px; }
.trav-with { margin: 0 0 8px; }
/* The card's buttons: 44 px targets (move, note, the ⋯ menu); an old process line's "Add in its place" on the left. */
.trav-acts { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.trav-acts .btn.icon { width: 44px; height: 44px; font-size: 16px; } .trav-acts .btn.icon svg { width: 16px; height: 16px; }
.trav-acts .row-menu .menu { top: 46px; min-width: 230px; } .trav-acts .row-menu .menu.up { top: auto; bottom: 46px; }
.trav-acts .row-menu > .btn.sm { height: 44px; }
.menu .menu-label { padding: 6px 10px 2px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); }
.trav-pay { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); min-width: 0; }
.trav-pay.small { padding-top: 6px; color: var(--text-2); }
.trav-pay-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; }
.trav-pay-row .trav-rate { flex: 0 1 260px; min-width: 0; } .trav-pay-row label.field.check { padding-bottom: 6px; } .trav-pay-row > .btn { margin-bottom: 4px; }
.trav-pay > .help { margin-top: 4px; font-size: 12px; color: var(--text-3); }
.trav-nopay { margin-top: 6px; font-weight: 600; }
.trav-payname { margin-top: 8px; max-width: 360px; }
.trav-reasons { margin-top: 8px; } .trav-reasons > .label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; } .trav-reasons .help { font-weight: 400; color: var(--text-3); }
.trav-reasons .chip { min-height: 32px; cursor: pointer; }
.trav-empty { margin: 0 0 10px; } .trav-empty p { margin: 0 0 8px; }
.trav-legacy { margin: 10px 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); } .trav-legacy h4 { margin: 0 0 4px; font-size: 13px; } .trav-legacy p { margin: 6px 0 0; }
.trav-foot { margin: 6px 0 0; }

/* The add buttons under the items: a row on a desktop, two by two on a phone. */
.trav-add { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; } .trav-add .btn { height: 40px; }
.trav-add-help { margin: 6px 0 0; font-size: 12px; color: var(--text-3); }

/* Area sections: a tinted box holding its item cards; the grip drags on a desktop (hidden on touch screens, where ↑ ↓ and Move to do it). */
.trav-sec { border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface-2); min-width: 0; }
.trav-sec.off { border-style: dashed; }
.trav-sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 8px; min-width: 0; }
.trav-sec-head .nm { flex: 1 1 160px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.trav-sec-head .tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.trav-sec-head .btn.icon { width: 44px; height: 44px; font-size: 16px; } .trav-sec-head .btn.icon svg { width: 16px; height: 16px; }
.trav-sec-acts { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.trav-sec-head .row-menu .menu { top: 46px; min-width: 230px; } .trav-sec-head .row-menu .menu.up { top: auto; bottom: 46px; }
.trav-fold svg { transition: transform .15s; } .trav-sec:not(.collapsed) > .trav-sec-head .trav-fold svg { transform: rotate(90deg); }
.trav-sec-body { display: grid; gap: 10px; padding: 0 8px 8px 20px; }
.trav-sec-empty { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 12px; font-size: 13px; color: var(--text-2); background: var(--surface); }
.trav-sec-add .row-menu .menu { left: 0; right: auto; top: 34px; min-width: 230px; } .trav-sec-add .row-menu .menu.up { top: auto; bottom: 34px; }
.trav-grip { cursor: grab; color: var(--text-3); padding: 0 4px; user-select: none; font-size: 16px; line-height: 1; }
.trav-item.dragging, .trav-sec.dragging { opacity: .5; }
.trav-drop-before { box-shadow: 0 -3px 0 var(--link); } .trav-drop-after { box-shadow: 0 3px 0 var(--link); } .trav-drop-into { outline: 2px dashed var(--link); outline-offset: 2px; }
@media (pointer: coarse) { .trav-grip { display: none; } }

/* The part's pay per piece, above the items. */
.trav-paystrip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 10px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); font-size: 13px; }
.trav-paystrip .label { font-weight: 600; color: var(--text-2); } .trav-paystrip .sep { color: var(--text-3); }
.trav-rate-head, .trav-rate-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 140px; gap: 6px; align-items: center; }
.trav-rate-head { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; } .trav-rate-row input { min-width: 0; }

/* A polishing step's operations and a tank group's stations: numbered rows. */
.trav-oplist, .trav-stations { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 2px; }
.trav-oplist li, .trav-stations li { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; min-width: 0; font-size: 13px; }
.trav-oplist .num, .trav-stations .num { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.trav-oplist li { flex-wrap: nowrap; } .trav-oplist .op-name { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; } .trav-oplist li.off .op-name { text-decoration: line-through; color: var(--text-3); }
.trav-oplist .op-acts { display: inline-flex; gap: 2px; } .trav-oplist .op-acts .btn.icon { width: 44px; height: 44px; }
.trav-stations li { padding: 2px 0; } .trav-stations .st-name { flex: 0 1 auto; min-width: 0; } .trav-stations .st-dwell { flex: 1 1 160px; min-width: 0; color: var(--text-2); }
.trav-stations .st-dwell b { color: var(--text); }

/* A Tank item's compact editor: Dwell and Step name side by side, More settings beside them. */
.trav-tank-edit { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; margin-top: 8px; }
.trav-tank-edit .field { flex: 0 1 220px; min-width: 0; margin: 0; } .trav-tank-edit > .btn { margin-top: 20px; }
.trav-tank-edit .help.bad { color: var(--bad); }

/* The pickers: a list of rows to tap. */
.trav-picks { display: grid; gap: 4px; max-height: 50vh; overflow-y: auto; }
.trav-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 8px 12px; min-height: 44px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.trav-pick[hidden] { display: none; }
.trav-pick:hover, .trav-pick:focus-visible { border-color: var(--primary); background: var(--primary-soft); }

/* Add polishing step: the operations as buttons, numbered in the order tapped. */
.trav-dlg-label { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.trav-op-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
.trav-op-pick { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.trav-op-pick .num { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px dashed var(--border-strong); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.trav-op-pick[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); } .trav-op-pick[aria-pressed="true"] .num { border: 0; background: var(--primary); color: #fff; }
.trav-newpay { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.trav-newpay[hidden] { display: none; } .trav-newpay .field { flex: 1 1 140px; margin: 0; } .trav-newpay .btn { height: 36px; }

/* Dwell times for this part / this job: a row per station; the temperature, current density and voltage columns show under More. */
.trav-dwell { display: grid; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.trav-dwell-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 6px 10px; border-top: 1px solid var(--border); }
.trav-dwell.more .trav-dwell-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .9fr) 80px 80px; }
.trav-dwell-row:first-child { border-top: 0; } .trav-dwell-row.head { background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--text-2); }
.trav-dwell-row .m { display: none; } .trav-dwell.more .trav-dwell-row .m { display: block; }
.trav-dwell-row label { margin: 0; min-width: 0; } .trav-dwell-row input { width: 100%; min-width: 0; } .trav-dwell-row .lbl { display: none; }
.trav-dwell-row .tk { min-width: 0; overflow-wrap: anywhere; } .trav-dwell-row .tk b { color: var(--text-3); margin-right: 4px; }

/* A sample's page: where it stands, above its fields. */
.sample-banner.info { border-left-color: var(--info); background: var(--info-soft); color: var(--text); } .sample-banner .badge { margin-left: 2px; }

/* The traveler new jobs would get: a row per step under segment headings, the paid and added steps tagged, the rest muted; an Area
   section's steps under its area, ruled at the left. */
.pay-trav { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); } .pay-trav h4 { margin: 0 0 2px; font-size: 14px; } .pay-trav > p { margin: 0 0 8px; }
.pay-trav > .alert { margin-bottom: 10px; }
.pay-trav-steps { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.pay-trav-seg { padding: 4px 10px; background: var(--surface-2); border-top: 1px solid var(--border); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-2); }
.pay-trav-seg .badge { text-transform: none; letter-spacing: 0; margin-left: 6px; }
.pay-trav-step { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 5px 10px; border-top: 1px solid var(--border); font-size: 13px; min-width: 0; }
.pay-trav-steps > :first-child { border-top: 0; }
.pay-trav-step .seq { flex: 0 0 28px; font-size: 12px; color: var(--text-3); } .pay-trav-step .nm { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.pay-trav-step .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; min-width: 0; } .pay-trav-step .badge { white-space: normal; overflow-wrap: anywhere; }
.pay-trav-step.muted .nm { color: var(--text-2); }
.pay-trav-area { padding: 8px 10px 2px; border-top: 1px solid var(--border); font-size: 13px; } .pay-trav-steps > .pay-trav-area:first-child { border-top: 0; }
.pay-trav-sec { border-left: 2px solid var(--border-strong); margin: 4px 0 6px 10px; } .pay-trav-sec > :first-child { border-top: 0; }
.pay-trav-wc { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-3); }

/* Amps per square foot (views/jobs.js). Job page: the amps for the pieces in hand under a plating step, and how owed rework moved; the
   step edit's read-only stage list. Printed traveler: a small Amps table under each plating step (Stage | A/ft² | For | per rack | lot),
   kept whole on one sheet with its step. */
.op .amps-line { margin-top: 2px; font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; } .op .amps-line .warn { color: var(--warn); }
.rework-moves { margin-top: 2px; overflow-wrap: anywhere; }
.amp-stage-box { margin-top: 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); overflow-wrap: anywhere; }
.amp-stage-box .label { text-transform: uppercase; letter-spacing: .03em; font-size: 11px; font-weight: 700; }
.run-stages { margin: 0 0 8px; color: var(--text-2); overflow-wrap: anywhere; }
.doc .trav-amps { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; break-inside: avoid; page-break-inside: avoid; }
.doc .trav-amps > .label { flex: none; margin: 2px 0 0; } .doc .trav-amps > div { min-width: 0; }
/* The form's footer goes with the sign-off boxes: a reprint never ends on a page holding only the footer line. */
.doc.traveler > .doc-foot { break-before: avoid; page-break-before: avoid; }
.doc table.amps-table { width: auto; max-width: 100%; margin: 0; border-collapse: collapse; }
.doc table.amps-table th, .doc table.amps-table td { font-size: 9.5px; line-height: 1.2; padding: 1px 5px; border: 1px solid #000; vertical-align: top; }
.doc table.amps-table th { font-weight: 700; text-transform: none; color: #000; letter-spacing: 0; }
.doc table.amps-table td { white-space: nowrap; } .doc table.amps-table .num { text-align: right; }
.doc table.amps-table th .sub { display: block; font-weight: 400; white-space: nowrap; }
.doc .amps-note { font-size: 9.5px; font-style: italic; margin-top: 2px; color: #000; } /* the screen note is amber; the paper is black */
.doc td.no-entry .trav-amps table.amps-table td { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

@media (max-width: 600px) {
  .trav-item { padding: 10px; } .trav-acts .btn.icon { flex: 1 1 0; width: auto; } .trav-acts .row-menu { flex: 1 1 0; } .trav-acts .row-menu > .btn { width: 100%; justify-content: center; }
  .trav-acts .spacer { display: none; } .trav-acts .row-menu:has(> .btn.sm) { flex: 1 1 100%; }
  .trav-pay-row .trav-rate { flex: 1 1 100%; } .trav-reasons .chip { min-height: 40px; padding: 0 14px; } .trav-payname { max-width: none; }
  .trav-add { display: grid; grid-template-columns: 1fr 1fr; } .trav-add .btn { width: 100%; height: auto; min-height: 44px; justify-content: center; white-space: normal; text-align: center; }
  .trav-tank-edit .field { flex: 1 1 100%; } .trav-tank-edit > .btn { margin-top: 0; }
  .trav-rate-head { display: none; } .trav-rate-row { grid-template-columns: minmax(0, 1fr) 96px; } .trav-rate-row > :nth-child(3) { grid-column: 1 / -1; justify-self: start; }
  .trav-op-picks { grid-template-columns: 1fr 1fr; }
  /* Dwell tables stack: one block per station, every box labelled. */
  .trav-dwell-row.head { display: none; } .trav-dwell-row, .trav-dwell.more .trav-dwell-row { grid-template-columns: 1fr 1fr; }
  .trav-dwell-row .tk, .trav-dwell-row .def { grid-column: 1 / -1; } .trav-dwell-row .lbl { display: block; font-size: 11px; color: var(--text-3); }
  .trav-dwell-row .dw { grid-column: 1 / -1; } .trav-dwell-row .def .lbl { display: inline; font-size: inherit; }
  .pay-trav-step .seq { flex-basis: 24px; } .pay-trav-step .tags { margin-left: 32px; }
  .trav-sec-body { padding-left: 8px; } .trav-sec-head { padding: 4px 6px; } .trav-sec-acts { margin-left: 0; flex: 1 1 100%; justify-content: flex-end; }
  .trav-sec-acts .btn.icon { flex: 1 1 0; width: auto; } .trav-sec-acts .row-menu { flex: 1 1 0; } .trav-sec-acts .row-menu > .btn { width: 100%; justify-content: center; }
}
