/* Module sites (plan, prod): tabs, cards, tables, dialogs, labels. Loaded after styles.css */
main.wide { max-width: 1400px; }
.bar .right { display: flex; align-items: center; gap: 10px; }
.who-chip { display: inline-flex; align-items: center; gap: 2px; font: 500 14px var(--body); color: #fff; }
.brand a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; }

/* Tabs: a drawing-sheet strip */
.tabs { display: flex; gap: 0; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px; border-bottom: 2px solid var(--ink); scrollbar-width: none; }
.tabs button { flex: none; min-height: 46px; padding: 10px 16px; font: 600 16px var(--head); letter-spacing: .02em; color: var(--ink-2);
  background: none; border: 0; border-bottom: 4px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--blue); }
.tabs .cnt { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 10px; background: var(--safety); color: #1d2b36; font: 700 12px/20px var(--body); text-align: center; }
.tabs .cnt:empty { display: none; }

/* Toolbar */
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.tools input[type=search], .tools select, .field { min-height: 44px; padding: 8px 12px; font: 400 16px var(--body); color: var(--ink);
  background: var(--sheet); border: 1px solid var(--line); border-radius: 4px; }
.tools input[type=search] { flex: 1 1 220px; display: inline-block; width: auto; margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 4px; cursor: pointer;
  font: 600 15px var(--head); letter-spacing: .02em; border: 1px solid var(--line); background: var(--sheet); color: var(--ink); text-decoration: none; }
.btn.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.go { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.warn { border-color: var(--err); color: var(--err); }
.btn.sm { min-height: 36px; padding: 4px 10px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; }
.seg.small button { padding: 7px 10px; font-size: 13px; }

/* Cards list (phones) / table (wide) */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.card { position: relative; padding: 12px 14px; background: var(--sheet); border: 1px solid var(--line); border-radius: 6px; }
.card.tap { cursor: pointer; }
.card.tap:hover { border-color: var(--blue); }
.card .t1 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.card .t1 b { font: 600 17px/1.25 var(--head); }
.card .t2 { font-size: 14px; color: var(--ink-2); }
.card .kv { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 14px; }
.card .kv span { color: var(--ink-2); }
.card .kv b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.card.flag-reorder::before, .card.flag-below-safety::before, .card.late::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; border-radius: 6px 0 0 6px; }
.card.flag-reorder::before { background: var(--safety); }
.card.flag-below-safety::before, .card.late::before { background: repeating-linear-gradient(-45deg, var(--safety) 0 6px, var(--ink) 6px 12px); }
.tag { display: inline-block; font: 600 12px/1.4 var(--body); padding: 1px 7px; border-radius: 3px; background: var(--blue-soft); color: var(--blue); white-space: nowrap; }
.tag.y { background: #fdf0c2; color: #6b4e00; }
.tag.r { background: #f8dcd9; color: var(--err); }
.tag.g { background: #dcefe3; color: var(--ok); }
.tag.k { background: var(--hair); color: var(--ink-2); }
@media (prefers-color-scheme: dark) { .tag.y { background: var(--safety); color: #1d2b36; } .tag.r { background: #4a1f1c; color: #ffb4ab; } .tag.g { background: #1c3a28; color: #8fd3a5; } }

.tbl-wrap { overflow-x: auto; background: var(--sheet); border: 1px solid var(--line); border-radius: 6px; }
.tbl-wrap table { min-width: 640px; }
.tbl-wrap th { position: sticky; top: 0; background: var(--sheet); }
.tbl-wrap tr.tap { cursor: pointer; } .tbl-wrap tr.tap:hover td { background: var(--blue-soft); }
td.wrap { white-space: normal; min-width: 200px; }
.only-wide { display: none; }
@media (min-width: 900px) { .only-wide { display: block; } .only-narrow { display: none; } }

/* Progress */
.pbar { display: inline-flex; align-items: center; gap: 8px; min-width: 120px; }
.pbar progress { flex: 1; height: 10px; appearance: none; -webkit-appearance: none; border: 1px solid var(--ink); border-radius: 0; background: var(--sheet); }
.pbar progress::-webkit-progress-bar { background: var(--sheet); }
.pbar progress::-webkit-progress-value { background: var(--blue); }
.pbar progress::-moz-progress-bar { background: var(--blue); }
.pbar.done progress::-webkit-progress-value { background: var(--ok); } .pbar.done progress::-moz-progress-bar { background: var(--ok); }
.pbar b { font: 700 15px var(--head); font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }

/* Stage tracker */
.stages { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 12px 0 16px; border: 2px solid var(--ink); background: var(--ink); gap: 2px; }
.stages li { list-style: none; background: var(--sheet); padding: 8px 6px; text-align: center; font: 600 13px/1.2 var(--head); color: var(--ink-2); }
.stages li.on { background: var(--blue); color: #fff; }
.stages li.now { background: var(--sheet); color: var(--blue); box-shadow: inset 0 -4px 0 var(--blue); }
.stages { padding: 0; }

/* Dashboard plates grid */
.plates { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 18px; }
.plate .pbar { width: 100%; margin-top: 8px; }
.plate dl.four { grid-template-columns: repeat(3, 1fr); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--ink); border: 2px solid var(--ink); margin-bottom: 18px; }
.kpis a, .kpis div { display: block; padding: 10px 12px; background: var(--sheet); color: var(--ink); text-decoration: none; }
.kpis span { display: block; font: 500 12px var(--body); color: var(--ink-2); }
.kpis b { display: block; font: 700 28px/1.1 var(--head); color: var(--blue); font-variant-numeric: tabular-nums; }
.kpis b.y { color: #a0521a; }
h3.sec { font: 600 18px var(--head); margin: 18px 0 8px; }

/* Dialogs */
dialog.dlg { border: 2px solid var(--ink); border-radius: 6px; padding: 0; width: min(640px, calc(100vw - 16px)); max-height: 94vh; background: var(--sheet); color: var(--ink); }
dialog.dlg::backdrop { background: rgba(29, 43, 54, .55); }
dialog.dlg form, dialog.dlg .body { padding: 18px 20px 20px; }
dialog.dlg h2 { margin-bottom: 4px; }
dialog.dlg .acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
@media (max-width: 480px) { .grid3 { grid-template-columns: 1fr 1fr; } }
label.yl input, label.yl select { background: #fffbe6; border-color: #e4cf7a; }
@media (prefers-color-scheme: dark) { label.yl input, label.yl select { background: #2d2a1a; border-color: #6b5d1f; } }
select, textarea { display: block; width: 100%; margin-top: 4px; padding: 11px 12px; font: 400 16px var(--body); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 4px; }
textarea { min-height: 80px; resize: vertical; }

/* Job page */
.jobhead { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--ink); border: 2px solid var(--ink); }
.jobhead .cell { background: var(--sheet); padding: 8px 10px; }
.jobhead span { display: block; font: 500 12px var(--body); color: var(--ink-2); }
.jobhead b { font: 600 17px/1.25 var(--head); }
@media (min-width: 640px) { .jobhead { grid-template-columns: 2fr 2fr 1fr 1fr; } }
.box { background: var(--sheet); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; margin-top: 14px; }
.box > h3 { font: 600 18px var(--head); margin: 0 0 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ops { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: op; }
.ops li { display: grid; grid-template-columns: 34px 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--hair); }
.ops .no { width: 30px; height: 30px; border: 2px solid var(--ink); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 700 13px var(--head); }
.ops li.done .no { background: var(--ok); border-color: var(--ok); color: #fff; }
.ops li.cur .no { background: var(--blue); border-color: var(--blue); color: #fff; }
.ops .nm b { font: 600 15px/1.2 var(--head); display: block; }
.ops .nm span { font-size: 13px; color: var(--ink-2); }
.photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.photos figure { margin: 0; position: relative; }
.photos img { width: 96px; height: 96px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); display: block; }
.photos button { position: absolute; top: 2px; right: 2px; min-height: 0; padding: 2px 6px; font-size: 12px; }
.log { font-size: 13px; color: var(--ink-2); margin: 0; padding-left: 18px; }
.empty { padding: 18px; text-align: center; color: var(--ink-2); background: var(--sheet); border: 1px dashed var(--line); border-radius: 6px; }

/* Stations */
.stgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.st { padding: 10px 12px; background: var(--sheet); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; text-align: left; font: inherit; color: inherit; min-height: 96px; }
.st:hover { border-color: var(--blue); }
.st .id { font: 700 13px var(--head); color: var(--blue); }
.st b { display: block; font: 600 16px/1.2 var(--head); }
.st .q { font: 700 26px/1 var(--head); margin-top: 6px; }
.st .q small { font: 500 12px var(--body); color: var(--ink-2); }
.st.busy { border-color: var(--blue); box-shadow: inset 0 3px 0 var(--blue); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 6px;
  background: var(--ink); color: #fff; font: 500 15px var(--body); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.toast.err { background: var(--err); }

/* Printing: only the print area */
#printArea { display: none; }
@media print {
  .printing body > *:not(#printArea) { display: none !important; }
  .printing #printArea { display: block; }
  @page { margin: 8mm; }
}
.lbl { display: inline-grid; grid-template-columns: auto 1fr; gap: 6px 10px; width: 95mm; height: 60mm; padding: 4mm; margin: 0 2mm 3mm 0; border: 1.5px solid #000;
  color: #000; font: 500 11pt/1.25 Arial, sans-serif; page-break-inside: avoid; vertical-align: top; overflow: hidden; }
.lbl .h { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; border-bottom: 1.5px solid #000; padding-bottom: 2mm; font-weight: 700; }
.lbl .h img { height: 7mm; width: auto; }
.lbl .big { font: 700 15pt/1.15 Arial, sans-serif; }
.lbl dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0 6px; font-size: 10pt; }
.lbl dt { color: #333; } .lbl dd { margin: 0; font-weight: 700; }
.slip { color: #000; font: 400 11pt/1.4 Arial, sans-serif; }
.slip h1 { font: 700 18pt Arial, sans-serif; margin: 0 0 4mm; }
.slip table { width: 100%; border-collapse: collapse; margin: 3mm 0; }
.slip td, .slip th { border: 1px solid #000; padding: 2mm; text-align: left; font-size: 10pt; color: #000; }
.slip .sig { display: flex; justify-content: space-between; margin-top: 18mm; }
div.kv { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 4px; }
div.kv span { color: var(--ink-2); } div.kv b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.pick.inline { min-height: 0; padding: 0; border: 0; background: none; }
.tools select, .tools .field, .tools input.field { display: inline-block; width: auto; margin: 0; flex: 0 1 auto; }
.tools #planG, .tools #shortItem { flex: 1 1 220px; max-width: 420px; }
.tools .field[type=number] { width: 110px; }

/* dispatch documents checklist */
.doclist{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:6px 14px;margin:6px 0 10px}
.docrow{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid #e3e8ec;padding:4px 0;margin:0}
.docrow>span{flex:1;font-size:14px}
.docrow select{width:auto;min-width:130px}
.docrow input.sets{width:64px;display:inline-block;margin-left:6px;padding:4px 6px}
.slip ol{margin:4px 0 10px 20px}
.slip small{color:#4d5d6b}

/* delete / cancel questions (askChecks) */
.dlg fieldset.qs { border: 1px solid var(--line, #c9d1d8); border-radius: 8px; padding: 8px 10px; margin: 8px 0; display: grid; gap: 4px; }
.dlg fieldset.qs legend { font-weight: 600; padding: 0 4px; }
.dlg .warnbox { border-left: 4px solid #c8811a; background: rgba(200, 129, 26, .08); }
.dlg .warnbox ul { margin: 4px 0 4px 18px; padding: 0; }

/* Thermal label printer: one label per page (100x75 tray label, 100x50 box sticker). Chrome named pages. (restored 15 Oct) */
@page t75 { size: 100mm 75mm; margin: 0; }
@page t50 { size: 100mm 50mm; margin: 0; }
#printArea.t75 .lbl, #printArea.t50 .lbl { display: grid; box-sizing: border-box; width: 100mm; margin: 0; border: 0; break-after: page; }
#printArea.t75 .lbl { page: t75; height: 75mm; padding: 4mm 5mm; }
#printArea.t50 .lbl { page: t50; height: 50mm; padding: 2.5mm 4mm; gap: 2px 8px; }
#printArea.t50 .lbl .h { padding-bottom: 1mm; } #printArea.t50 .lbl .h img { height: 5mm; }
#printArea.t50 .lbl svg { width: 27mm; height: 27mm; }
#printArea.t50 .lbl .big { font-size: 12pt; } #printArea.t50 .lbl dl { font-size: 8.5pt; }
.tag.del { background: var(--err); color: #fff; }
select.field.lblmode { display: inline-block; width: auto; min-height: 0; margin: 0 0 0 8px; padding: 3px 6px; font-size: 13px; vertical-align: middle; }

/* A4 sticker sheet, Avery L7165 / J8165 size: 2 x 4 labels of 99.1 x 67.7 mm, top margin 13.1 mm, left 4.65 mm, column pitch 101.6 mm (16 Oct) */
@page a4lbl { size: 210mm 297mm; margin: 0; }
#printArea.a4 .a4sheet { page: a4lbl; position: relative; width: 210mm; height: 296mm; overflow: hidden; break-after: page; }
#printArea.a4 .a4sheet:last-child { break-after: auto; }
#printArea.a4 .a4sheet .lbl { position: absolute; display: grid; box-sizing: border-box; width: 99.1mm; height: 67.7mm; margin: 0; padding: 4mm 5mm; border: 0; overflow: hidden; }
#printArea.a4 .a4sheet .lbl svg { width: var(--qr, 30mm); height: var(--qr, 30mm); }
#printArea.a4.guides .a4sheet .lbl { outline: 0.2mm dashed #888; outline-offset: -0.1mm; }
#printArea.a4 .lbl .big { font-size: 13pt; } #printArea.a4 .lbl dl { font-size: 9pt; }
.lblbanner { display: block; margin: 0 0 10px; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 6px; font: 600 15px var(--head); color: var(--ink); text-decoration: none;
  background: repeating-linear-gradient(-45deg, var(--safety) 0 10px, #fff3 10px 20px); }
.lblbanner.part { background: var(--sheet); border-style: dashed; font-weight: 500; }
.sheetmap { display: grid; grid-template-columns: repeat(2, 64px); gap: 4px; margin: 8px 0; }
.sheetmap span { height: var(--cellh, 40px); border: 1px solid var(--line); border-radius: 3px; display: grid; place-items: center; font: 600 13px var(--head); color: var(--ink-2); }
.sheetmap .used { background: var(--hair); color: transparent; }
.sheetmap .q { background: var(--blue-soft); color: var(--blue); border-color: var(--blue); }
.grid4 { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 0 10px; }
@media (max-width: 600px) { .grid4 { grid-template-columns: 1fr 1fr; } .grid4 > :first-child { grid-column: 1 / -1; } }
.nowrap { white-space: nowrap; }
.tbl-wrap tr.late td:first-child { box-shadow: inset 5px 0 0 var(--safety); }
dialog.dlg.wide { width: min(940px, calc(100vw - 16px)); }
.tbl-wrap td.n { white-space: nowrap; }
.lblbar { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 8px 0; }
.lblbar label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.lblbar select.field, #tab-labels select.field { display: inline-block; width: auto; min-height: 0; padding: 4px 8px; }
#lblQueue .card, #lblDone .card, #lblAdd .card { padding: 8px 12px; }
.lblbar label.pick input[type=checkbox] { width: auto; min-height: 0; margin: 0; }
.plines { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }
#tab-orders .only-wide[hidden], #ordCards[hidden] { display: none; }
.tbl-wrap tr.sub td { background: var(--paper, #f6f6f3); color: var(--ink-2); border-top: 0; }

/* job plan (prod. job page) - stacked, readable on a phone (no wide table) */
ul.plan { list-style: none; margin: 8px 0; padding: 0; }
ul.plan > li { border-top: 1px solid var(--hair); padding: 8px 2px; }
ul.plan.sub { margin: 4px 0 0 14px; border-left: 2px solid var(--hair); padding-left: 8px; }
ul.plan.sub > li { padding: 5px 0; border-top: 0; }
.pl-h { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.pl-n { overflow-wrap: anywhere; }
.pl-a { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 4px; }
.pl-a input.rate { width: 96px; padding: 3px 6px; }
.box2 { border: 1px solid var(--line); border-radius: 6px; padding: 10px; margin-top: 10px; }
.box2 h4 { margin: 0 0 6px; }

/* Batch Card progress colours (Paresh 16-Oct-2026): light yellow = started / part done, green = done, grey = skipped */
.stages li.part { background: #fff3c4; color: #6b4e00; box-shadow: inset 0 -4px 0 var(--safety); }
.stages li small { font-weight: 600; }
.ops li.part .no { background: #fff3c4; border-color: #c99a00; color: #6b4e00; }
.ops li.part { background: linear-gradient(90deg, #fffbe8, transparent 60%); }
.ops li.done { background: linear-gradient(90deg, #eaf6ee, transparent 60%); }
.ops li.skip { opacity: .55; } .ops li.skip .nm b { text-decoration: line-through; }
.ops li.skip .no { border-style: dashed; }
.card.bc-part { border-left: 5px solid #e8c34a; } .card.bc-done { border-left: 5px solid var(--ok); }
.stepacts { display: inline-flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 4px; }
.lnk { background: none; border: 0; padding: 2px 0; color: var(--blue); font: 600 13px var(--body); cursor: pointer; text-decoration: underline; }
.lnk[disabled] { color: var(--ink-2); opacity: .4; cursor: default; text-decoration: none; }
/* 18-Oct-2026 (Paresh): step move buttons were thin arrows, hard to see - now real buttons */
.mvbtn { display: inline-flex; align-items: center; gap: 4px; min-width: 64px; min-height: 30px; padding: 4px 10px; border: 2px solid var(--blue); border-radius: 6px;
  background: #fff; color: var(--blue); font: 700 14px var(--body); cursor: pointer; line-height: 1; }
.mvbtn:hover:not([disabled]) { background: var(--blue); color: #fff; }
.mvbtn[disabled] { border-color: #ccc; color: #bbb; cursor: default; }
.stepacts { align-items: center; }
.asgform, .addstep form { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 6px; padding: 8px; margin-top: 6px; }
@media (prefers-color-scheme: dark) {
  .stages li.part { background: #4a3d0a; color: #ffe08a; }
  .ops li.part .no { background: #4a3d0a; color: #ffe08a; }
  .ops li.part { background: linear-gradient(90deg, #3a3210, transparent 60%); }
  .ops li.done { background: linear-gradient(90deg, #1c3a28, transparent 60%); }
}
details.consume { margin: 6px 0 10px; } details.consume summary { cursor: pointer; }
.asmph { margin-top: 10px; } .asmph h4 { margin: 0 0 6px; }
.asmph figcaption { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-top: 2px; }
.silines { margin: 10px 0; } .silines h4 { margin: 0 0 4px; }
.siline .siitem { flex: 1 1 260px; min-width: 0; }
.siline.dev { background: #fffbe8; } .siline.notused .siitem { text-decoration: line-through; opacity: .6; }
.devmark { color: #6b4e00; font-weight: 600; }
@media (prefers-color-scheme: dark) { .siline.dev { background: #3a3210; } .devmark { color: #ffe08a; } }
.jwbtns { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.atv { color: #6b4e00; } @media (prefers-color-scheme: dark) { .atv { color: #ffe08a; } }
.jwlog div { padding: 1px 0; }

/* type-ahead picker (Tally ledgers on Batch Card steps) */
.tp-box { position: relative; }
.tp-list { position: absolute; z-index: 30; left: 0; right: 0; top: 2px; max-height: 280px; overflow-y: auto; margin: 0; padding: 4px 0; list-style: none;
  background: #fff; border: 1px solid var(--line, #c9d3e3); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.tp-list li { padding: 7px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.tp-list li span { font-size: .78em; color: #667; }
.tp-list li.top b::before { content: "★ "; color: #c99a00; }
.tp-list li.sel, .tp-list li:hover { background: #eef3fb; }
.tp-list li.none { color: #778; cursor: default; }
.tp-hint { display: block; color: #8a5a00; min-height: 0; }

/* ---- 18-Oct-2026: progress bars by state, open-PO chips, earlier-PO references, orders on hold ---- */
.pbar { flex-wrap: wrap; }
.pbar progress::-webkit-progress-value { background: var(--bar, var(--blue)); } .pbar progress::-moz-progress-bar { background: var(--bar, var(--blue)); }
.pbar.run { --bar: #2f6fb3; } .pbar.done { --bar: #2e8b57; } .pbar.risk { --bar: #e0a100; } .pbar.late { --bar: #c8372d; } .pbar.idle { --bar: #9aa5b1; } .pbar.hold { --bar: #e88fb4; }
.pbar .eta { flex-basis: 100%; font-size: 11.5px; color: var(--ink-2); }
.pbar.risk .eta { color: #8a6200; font-weight: 600; } .pbar.late .eta { color: var(--err); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--ink-2); margin: 6px 0; }
.legend i { display: inline-block; width: 14px; height: 8px; margin-right: 4px; vertical-align: middle; border: 1px solid var(--ink); }
.tag.b { background: var(--blue-soft); color: var(--blue); }
.tag.hold { background: #fbe1ec; color: #8c1d4f; }
.onpo { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 2px 0; } .onpo a.tag { text-decoration: none; }
.refs { margin: 6px 0; padding: 6px 8px; border-left: 3px solid var(--blue); background: var(--sheet); }
.refs table { margin: 4px 0; } .refs td, .refs th { padding: 3px 6px; }
/* order on hold: light pink wherever its lines / jobs are shown; internal work may go on */
.held, tr.held td, li.held, .card.held { background: #fde7ef !important; }
@media (prefers-color-scheme: dark) { .held, tr.held td, li.held, .card.held { background: #4a2333 !important; } .tag.hold { background: #6b2a45; color: #ffd0e2; } }
.legend i.lg.run { background: #2f6fb3; } .legend i.lg.done { background: #2e8b57; } .legend i.lg.risk { background: #e0a100; } .legend i.lg.late { background: #c8372d; } .legend i.lg.hold { background: #e88fb4; } .legend i.lg.idle { background: #9aa5b1; }
.btn.hold { border-color: #c2457a; color: #8c1d4f; } .btn.wa { border-color: #1f9d55; color: #13703c; }
.acts.left { justify-content: flex-start; margin: 6px 0; }
dialog.dlg.wide { max-width: 860px; width: calc(100vw - 32px); }
input.w-num { width: 100px; }
.bc-row.hi { outline: 3px solid var(--safety, #f2c200); }
/* ---- ERP Academy (learning cards, floating Learn button, cues) 18-Oct-2026 ---- */
.ac-fab { position: fixed; right: 16px; bottom: 16px; z-index: 60; font: 700 14px var(--body); padding: 10px 16px; border-radius: 22px; border: 2px solid var(--ink); background: var(--safety, #f2c200); color: #1d2b36; box-shadow: 0 3px 10px rgba(0,0,0,.25); cursor: pointer; }
.ac-fab .ac-cap { font-size: 11px; }
.ac-fab.ac-nudge { animation: acpulse 1.2s ease-in-out 5; }
@keyframes acpulse { 50% { transform: scale(1.12); } }
.ac-panel { position: fixed; right: 16px; bottom: 72px; z-index: 61; width: min(420px, calc(100vw - 32px)); max-height: min(72vh, 680px); display: flex; flex-direction: column; background: var(--sheet, #fff); color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.ac-panel header { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: var(--ink); color: var(--sheet, #fff); }
.ac-panel .ac-x { background: none; border: 0; color: inherit; font-size: 22px; cursor: pointer; line-height: 1; }
.ac-panel .seg { margin: 8px 12px 0; }
.ac-panel .ac-body { overflow: auto; padding: 8px 12px; }
.ac-panel progress { width: 100%; }
.ac-panel footer { padding: 6px 12px 10px; border-top: 1px solid var(--hair); }
.ac-card { border: 1px solid var(--hair); border-left: 4px solid var(--blue); padding: 8px 10px; margin: 8px 0; }
.ac-card.ok { border-left-color: #2e8b57; }
.ac-card h3 { margin: 0 0 4px; font-size: 15px; }
.ac-card ol { margin: 0 0 4px 18px; padding: 0; font-size: 13.5px; } .ac-card li { margin: 3px 0; }
.ac-tip { font-size: 12.5px; background: #fdf0c2; color: #6b4e00; padding: 4px 6px; margin: 4px 0; }
.ac-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.ac-hl { outline: 3px solid #f2c200 !important; outline-offset: 2px; animation: acpulse 1.2s ease-in-out 3; }
.ac-bubble { position: absolute; left: var(--x); top: var(--y); z-index: 62; max-width: 230px; background: #1d2b36; color: #fff; font: 600 13px var(--body); padding: 6px 9px; border-radius: 4px; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.ac-bubble.fixed { position: fixed; right: 16px; bottom: 72px; left: auto; top: auto; }
@media print { .ac-fab, .ac-panel, .ac-bubble { display: none !important; } }
.ac-panel .seg button { padding: 6px 10px; line-height: 1.25; }

/* 18-Oct-2026 job-work challan (JWO / JWI) - A4, one copy per page */
.jwc { break-after: page; padding: 2mm 0; }
.jwc .jwh { display: flex; justify-content: space-between; gap: 6mm; border-bottom: 2px solid #000; padding-bottom: 3mm; margin-bottom: 3mm; }
.jwc .jwh img { height: 12mm; display: block; margin-bottom: 1mm; }
.jwc .jwco { font-size: 14pt; }
.jwc .jwno { text-align: right; min-width: 70mm; }
.jwc .jwno h1 { margin: 1mm 0; font-size: 16pt; }
.jwc .jwno table { margin: 2mm 0 0 auto; width: auto; }
.jwc .copy { display: inline-block; border: 1px solid #000; padding: 1mm 3mm; font-size: 9pt; font-weight: 700; }
.jwc .sig { gap: 6mm; } .jwc .sig span { flex: 1; border-top: 1px solid #000; padding-top: 2mm; font-size: 9pt; }

/* 18-Oct-2026 BOM dialog: remove line + new part on the line */
.eiline .eigd { display: flex; gap: 6px; align-items: center; } .eiline .eigd select { flex: 1; }
.eiline .eirm { min-width: 36px; border-color: var(--red, #b42318); color: var(--red, #b42318); }
.eiline .einew { background: #f6f8fb; border: 1px dashed #b9c4d3; border-radius: 6px; padding: 8px; }
.eiline { border-bottom: 1px solid #e6e9ee; padding-bottom: 6px; margin-bottom: 6px; }

/* Sticker sizes (18-Oct-2026): any A4 sheet (shared) or thermal roll size (per device); content shrinks with the sticker.
   Positions/sizes come from app.js through el.style (CSSOM) - the CSP blocks style="" written as HTML. */
#printArea.tx .lbl { display: grid; box-sizing: border-box; margin: 0; border: 0; break-after: page; }
#printArea.tx .lbl:last-child { break-after: auto; }
#printArea .lbl.fit { grid-template-columns: var(--qr) 1fr; align-content: start; overflow: hidden; }
#printArea .lbl.fit svg { width: var(--qr); height: var(--qr); display: block; }
#printArea .lbl.fit > div:last-child { min-width: 0; }
#printArea .lbl.fit:not(.sz-l) dd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#printArea .lbl.fit.sz-l { padding: 4mm 5mm; gap: 2mm 3mm; }
#printArea .lbl.fit.sz-l .big { font-size: 13pt; } #printArea .lbl.fit.sz-l dl { font-size: 9pt; }
#printArea .lbl.fit.sz-m { padding: 2.5mm 3.5mm; gap: 1.5mm 2.5mm; }
#printArea .lbl.fit.sz-m .h { padding-bottom: 1mm; font-size: 9pt; } #printArea .lbl.fit.sz-m .h img { height: 5mm; }
#printArea .lbl.fit.sz-m .big { font-size: 11pt; } #printArea .lbl.fit.sz-m dl { font-size: 8pt; }
#printArea .lbl.fit.sz-s { padding: 1.5mm 2.5mm; gap: 1mm 2mm; }
#printArea .lbl.fit.sz-s .h { padding-bottom: 0.6mm; border-bottom-width: 0.8px; font-size: 7.5pt; } #printArea .lbl.fit.sz-s .h img { height: 3.6mm; }
#printArea .lbl.fit.sz-s .big { font-size: 9pt; line-height: 1.1; } #printArea .lbl.fit.sz-s dl { font-size: 7pt; line-height: 1.15; }
#printArea .lbl.fit.sz-xs { padding: 1.5mm 2mm; gap: 0 1.5mm; align-content: center; }
#printArea .lbl.fit.sz-xs .big { font-size: 8pt; line-height: 1.05; } #printArea .lbl.fit.sz-xs .sub, #printArea .lbl.fit.sz-xs dl { font-size: 6.5pt; line-height: 1.1; }
#printArea .lbl.fit .big { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lblcustom { margin: 8px 0; } .lblcustom > p { margin: 0 0 6px; }
.lblgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 10px; }
@media (max-width: 600px) { .lblgrid { grid-template-columns: 1fr 1fr; } }
#tab-labels #lblFmt { max-width: 100%; }

/* Photo studio (18-Oct-2026): angle tiles on Batch Cards and assembly, completion selfie, medals */
.studio { margin: 12px 0 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.studio.nudge { border-color: var(--orange, #f57c00); box-shadow: 0 0 0 3px rgba(245, 124, 0, .12); }
.studio-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.studio-h b { display: inline-flex; align-items: center; gap: 8px; font: 700 16px var(--head); }
.studio-h .shot-i { width: 24px; height: 24px; color: var(--orange, #f57c00); }
.medal { font: 700 12px var(--head); padding: 3px 10px; border-radius: 999px; background: var(--hair); color: var(--ink-2); }
.medal.bronze { background: #f3dfcf; color: #7a4a22; } .medal.silver { background: #e3e8ee; color: #3d4b5c; }
.medal.gold { background: linear-gradient(135deg, #ffd76a, #f5a300); color: #4a3000; box-shadow: 0 2px 8px rgba(245, 163, 0, .4); }
.studio-bar { height: 7px; margin: 10px 0 4px; border-radius: 999px; background: var(--hair); overflow: hidden; }
.studio-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sky, #467ff7), var(--orange, #f57c00)); transition: width .3s; }
.studio-p { margin: 0 0 10px; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.shot { position: relative; margin: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 1 / 1; }
.shot.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 8px; cursor: pointer;
  border: 2px dashed var(--line); background: var(--sheet); color: var(--ink-2); transition: border-color .15s, transform .15s; }
.shot.empty:hover, .shot.empty:focus-within { border-color: var(--orange, #f57c00); color: var(--ink); transform: translateY(-2px); }
.shot.empty .shot-i { width: 38px; height: 38px; color: var(--sky, #467ff7); }
.shot.empty b { font: 700 13.5px/1.2 var(--head); color: var(--ink); }
.shot.empty span { font-size: 11.5px; line-height: 1.2; }
.shot.empty.selfie { border-color: var(--crimson, #cc3366); background: linear-gradient(160deg, rgba(204, 51, 102, .07), var(--sheet)); }
.shot.empty.selfie .shot-i { color: var(--crimson, #cc3366); }
.shot.empty input, .more-shots input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.shot.has img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot.has figcaption { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 4px; padding: 5px 6px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .7)); color: #fff; font: 600 11.5px var(--head); }
.shot.has figcaption span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot.has .shot-i { width: 16px; height: 16px; }
.shot.has .lnk { color: #fff; min-height: 0; padding: 2px 4px; }
.more-shots { position: relative; display: inline-flex; align-items: center; min-height: 40px; margin-top: 10px; padding: 6px 14px; border: 1px solid var(--line);
  border-radius: 999px; font: 600 13.5px var(--head); color: var(--blue); cursor: pointer; background: var(--sheet); }
details.studio-pre { margin: 10px 0 6px; }
details.studio-pre > summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 40px; font: 600 14px var(--head); color: var(--ink-2); }
details.studio-pre .shot-i { width: 22px; height: 22px; color: var(--orange, #f57c00); }
dialog.snapdlg { border: 0; padding: 0; border-radius: 18px; width: min(640px, calc(100vw - 20px)); max-height: 94vh; background: var(--sheet); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
dialog.snapdlg::backdrop { background: rgba(14, 29, 61, .6); }
.snap-in { padding: 18px 20px 16px; }
.snap-in h2 { font: 800 26px/1.1 var(--head); margin: 0; }
.snap-sub { font: 600 15px var(--head); color: var(--orange-d, #c25f00); margin: 4px 0 8px; }
.snap-in .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
@media (max-width: 480px) { .shots { grid-template-columns: repeat(3, 1fr); gap: 6px; } .shot.empty span { display: none; } .shot.empty .shot-i { width: 30px; height: 30px; } }

/* New ledgers (19-Oct-2026) */
input.up { text-transform: uppercase; }
.nl-check { margin: 8px 0; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--line); font-size: 14px; }
.nl-check.ok { border-color: var(--ok); background: #eef8f1; }
.nl-check.bad { border-color: var(--err); background: #fdf1ef; }
.nl-check ul { margin: 4px 0 0; padding-left: 4px; list-style: none; }
.nl-check li.bad { color: var(--err); font-weight: 600; }
@media (prefers-color-scheme: dark) { .nl-check.ok { background: #1c3a28; } .nl-check.bad { background: #3a1d1b; } }
.nl-co { display: inline-flex; align-items: center; gap: 6px; margin: 8px 14px 0 0; font-weight: 500; }
.nl-co input, .nl-portal input { width: auto; min-height: 0; margin: 0; }
.nl-portal { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-weight: 500; }
.nl-why { margin: 0 0 6px; padding-left: 18px; color: var(--ink-2); }
fieldset.nl-f { border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px 10px; margin: 10px 0 0; }
fieldset.nl-f legend { font: 600 14px var(--head); padding: 0 6px; }
input.nl-link { font-size: 13px; }
.join-wrap { max-width: 760px; margin: 0 auto; padding: 16px; }
