/* panels module styles — Engineering grid, one row per engineering number (js/panels.js). Uses the variables from css/app.css only;
   work-cell colours come from UI.areaColor (inline). Dark mode follows the variables. */
.eg .mt-wrap{max-height:72vh}
.eg table.mt{width:auto;min-width:100%}
.eg table.mt thead th{background:var(--paper)}
.eg table.mt td{border-bottom:1px solid var(--rule)}
/* two-row sticky header: work-cell groups on top (28px), field names underneath */
.eg table.mt thead tr.eg-groups th{top:0;height:28px;padding:0 6px;text-transform:none;letter-spacing:0;cursor:default;z-index:4;border-bottom:0;vertical-align:bottom}
.eg table.mt thead tr.eg-groups th:hover{background:var(--paper);color:var(--ink)}
.eg .eg-gwrap{height:28px;display:flex;flex-direction:column;justify-content:flex-end}
.eg .eg-gname{font-size:12px;font-weight:700;line-height:16px;padding:0 2px 4px;color:var(--ink);white-space:nowrap}
.eg .eg-gname .dot{width:9px;height:9px;margin-right:6px}
.eg .eg-gbar{display:block;height:3px;border-radius:2px 2px 0 0}
.eg .eg-gbar-neutral{background:var(--rule)}
.eg table.mt thead tr.eg-fields th{top:28px;z-index:3;border-bottom:1px solid var(--rule)}
.eg table.mt th.eg-f{cursor:default} .eg table.mt th.eg-f:hover{background:var(--paper);color:var(--ink2)}
.eg table.mt th[data-sort]{cursor:pointer} .eg table.mt th[data-sort]:hover{background:var(--hover);color:var(--ink)} .eg table.mt th.sorted{color:var(--indigo)}
/* group separators */
.eg table.mt th.eg-gs,.eg table.mt td.eg-gs{border-left:1px solid var(--rule)}
/* sticky first columns (checkbox + Job) */
.eg table.mt .eg-selcell{position:sticky;left:0;width:30px;min-width:30px;z-index:1;background:var(--paper)}
.eg table.mt .eg-job{position:sticky;left:30px;min-width:236px;max-width:290px;z-index:1;background:var(--paper);box-shadow:1px 0 0 var(--rule-hi,var(--rule))}
.eg table.mt thead tr.eg-fields th.eg-selcell,.eg table.mt thead tr.eg-fields th.eg-job{z-index:5}
/* Job cell: caret · Eng # (menu) · WO count · quick save (dirty rows only) / account / revision chips */
.eg .eg-jtop{display:flex;align-items:center;gap:6px;min-width:0}
.eg .eg-caret{flex:none;width:26px;height:26px;border:0;background:none;border-radius:4px;color:var(--ink3);cursor:pointer;font-size:12px;line-height:26px;padding:0;transition:transform .12s}
.eg .eg-caret:hover{background:var(--hover);color:var(--ink)} .eg .eg-caret.open{transform:rotate(90deg);color:var(--link,var(--indigo))}
.eg a.eg-eng{font-weight:800;font-size:13.5px;color:var(--ink);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:4px;padding:0 3px;margin-left:-3px}
.eg a.eg-eng:hover{color:var(--link,var(--indigo));background:var(--indigo-l)}
.eg .eg-nwo{flex:none;font-size:11px;font-variant-numeric:tabular-nums;font-weight:500;color:var(--ink2);background:var(--grey-l);border-radius:9px;padding:0 7px;line-height:17px;cursor:default}
.eg .eg-noteic{flex:none;border:0;background:none;color:var(--link,var(--indigo));cursor:pointer;font-size:12px;padding:0 2px;border-radius:4px} .eg .eg-noteic:hover{background:var(--indigo-l)}
.eg .eg-qsave{display:none;margin-left:auto;flex:none}
.eg tr.eg-dirty .eg-qsave{display:inline-block}
.eg table.mt td.eg-job .sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:24px}
.eg .eg-revs{display:flex;flex-wrap:wrap;gap:3px;margin-top:3px;padding-left:24px}
.eg-rev{display:inline-block;font-family:var(--font);font-variant-numeric:tabular-nums;font-size:11.5px;font-weight:500;line-height:16px;padding:0 5px;border-radius:4px;background:var(--grey-l);color:var(--ink2);white-space:nowrap}
.eg-rev i{font-style:normal;color:var(--ink3)}
.eg-rev.bad{background:var(--red-l);color:var(--red-t,var(--red));font-weight:700}
/* status columns */
.eg td.eg-eng .mt-status-sel{min-width:0;width:auto;max-width:120px;height:22px;padding:1px 8px;font-size:11.5px;font-weight:600;border-radius:4px}
.eg td.eg-eng .mt-status-sel:disabled{opacity:.55;cursor:wait}
.eg td.eg-plan{white-space:nowrap}
.eg-pchip{display:inline-block;font-size:11px;font-weight:700;line-height:17px;padding:0 6px;border-radius:4px;margin-right:3px;white-space:nowrap}
.eg td.eg-tpl{white-space:nowrap} .eg td.eg-tpl .pill{font-size:11px} .eg .eg-chg{margin-left:3px}
/* row tints: amber = no standard saved for the Eng #, green = unsaved edits */
.eg table.mt tr.eg-monday td{background:var(--eg-unrel,var(--amber-l))}
.eg table.mt tr.eg-dirty td{background:var(--green-l)}
.eg table.mt tr.eg-busy td{opacity:.7}
/* sub-rows: the Eng #'s open work orders */
.eg table.mt tr.eg-sub td{background:var(--paper2);border-bottom:1px dashed var(--rule)}
.eg table.mt tr.eg-sub:hover td{background:var(--hover)}
.eg .eg-sjob{display:flex;align-items:center;gap:6px;min-width:0;padding-left:10px}
.eg .eg-tree{flex:none;width:10px;height:10px;border-left:1.5px solid var(--ink3);border-bottom:1.5px solid var(--ink3);border-radius:0 0 0 3px;margin-top:-6px;opacity:.7}
.eg a.eg-woname{font-weight:600;font-size:12.5px;color:var(--ink);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.eg a.eg-woname:hover{color:var(--link,var(--indigo));text-decoration:underline}
.eg .eg-sjob .btn{margin-left:auto;flex:none}
.eg tr.eg-sub td.eg-job .sub{padding-left:26px}
.eg-reptag{flex:none;font-size:11px;font-weight:600;color:var(--link,var(--indigo));background:var(--indigo-l);border-radius:4px;padding:0 5px;line-height:15px}
.eg tr.eg-sub .mt-status{min-width:0;padding:3px 8px;font-size:11px}
.eg td.eg-subrest{padding:0!important}
.eg .eg-subinfo{position:sticky;left:266px;display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap;padding:4px 10px;font-size:11.5px;color:var(--ink2);max-width:760px}
/* dense cells and inputs */
.eg .mt-wrap.dense table.mt td{padding:3px 6px}
.eg table.mt td.eg-c{text-align:center;white-space:nowrap} .eg table.mt th.eg-c{text-align:center} .eg table.mt td.eg-due{white-space:nowrap}
.eg td input[type=number]{width:56px;height:24px;padding:2px 4px;font-size:12px;border-radius:5px}
.eg td input[type=number]::placeholder{color:var(--ink3);opacity:1;font-style:italic}
.eg td select{height:24px;padding:1px 3px;font-size:12px;border-radius:5px;max-width:96px}
.eg td input[type=checkbox]{width:14px;height:14px;vertical-align:-2px}
.eg td.eg-act{white-space:nowrap} .eg td.eg-act .btn{margin-right:4px} .eg td.eg-act .btn:last-child{margin-right:0}
.eg .eg-note{margin:2px 0 4px;font-size:13px;color:var(--ink2)}
/* totals row (sticky bottom; the label stays in view when scrolling right) */
.eg table.mt tfoot tr.eg-total td{z-index:2}
.eg table.mt tfoot tr.eg-total td.eg-totlbl{left:0;z-index:3;white-space:nowrap}
.eg .eg-totunc{color:var(--amber-t,var(--amber));text-transform:none;letter-spacing:0}
/* planning-status count pills (click to filter) */
.eg-spills{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin:0 0 6px}
.eg-spill{display:inline-flex;align-items:center;gap:7px;background:none;border:1px solid transparent;border-radius:8px;padding:3px 8px 3px 3px;cursor:pointer;font:inherit}
.eg-spill:hover{background:var(--hover);border-color:var(--rule)}
.eg-spill.on{background:var(--hover);border-color:var(--ink)}
.eg-spill.dim{opacity:.5}
.eg-spill .mt-status{min-width:0;padding:3px 9px;font-size:11.5px}
.eg-spn{font-size:12.5px;font-weight:600;color:var(--ink2);min-width:14px;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
/* Eng # menu */
.eg-menu{position:absolute;z-index:75;background:var(--paper);border:1px solid var(--rule);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.18);padding:6px;min-width:250px;display:flex;flex-direction:column;gap:2px}
.eg-menu-t{font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--ink3);padding:4px 10px 6px;border-bottom:1px solid var(--rule);margin-bottom:2px;white-space:nowrap}
.eg-menu button{text-align:left;background:none;border:0;border-radius:7px;padding:7px 10px;font:inherit;font-size:13px;color:var(--ink);cursor:pointer}
.eg-menu button:hover{background:var(--hover)}
.eg-menu button span{display:block;font-size:11px;color:var(--ink3);font-weight:500}
/* Engineering details modal */
.egd{width:min(1080px,90vw)}
.egd-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-right:24px} .egd-head h3{margin:0} .egd-head h3 .muted{font-weight:500}
.egd-build{margin:8px 0 4px;font-size:13.5px;line-height:1.5;color:var(--ink)}
.egd-hint{margin:0 0 10px}
.egd-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:10px;margin:10px 0 4px}
.egd-card{border:1px solid var(--rule);border-radius:10px;padding:10px 12px;background:var(--paper2)}
.egd-card h4,.egd-h{margin:0 0 6px;font-size:11.5px}
.egd-h{margin:16px 0 6px}
.egd-dl{display:grid;grid-template-columns:auto 1fr;gap:3px 12px;margin:0;font-size:12.5px}
.egd-dl dt{color:var(--ink3);font-weight:600} .egd-dl dd{margin:0;color:var(--ink);min-width:0}
.egd-revwos{display:inline-flex;flex-wrap:wrap;gap:3px;vertical-align:middle}
.egd-wos{max-height:260px} .egd-wos table.mt th{position:sticky;top:0} .egd-wos .mt-status{min-width:0;padding:3px 8px;font-size:11px;display:inline-block}
.egd-notes{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:10px}
.egd-note{border:1px solid var(--rule);border-left:4px solid var(--nc,var(--indigo));border-radius:10px;padding:8px 12px 10px;background:var(--paper)}
.egd-nh{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px;font-size:12.5px} .egd-nh .faint{font-family:var(--mono);font-size:11px}
.egd-ne{padding:6px 0;border-top:1px solid var(--rule)} .egd-ne:first-of-type{border-top:0}
.egd-nfrom{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:3px}
.egd-nfrom a{font-size:11px;font-weight:600;font-family:var(--mono);color:var(--ink2);background:var(--grey-l);border-radius:4px;padding:0 5px;text-decoration:none;line-height:16px}
.egd-nfrom a:hover{color:var(--link,var(--indigo));background:var(--indigo-l)}
.egd-ntext{font-size:12.5px;white-space:pre-wrap;color:var(--ink);line-height:1.45}
.egd textarea{width:100%;font:inherit;font-size:13px}
.egd-prefill{color:var(--amber-t,#8a5200);background:var(--amber-l);border-radius:6px;padding:4px 8px;display:inline-block}
[data-theme=dark] .egd-prefill{color:var(--amber-t,var(--amber))}
/* round 5: monday-style layout — search, ⋮ Columns (show / hide, pin, collapse), collapsible sections, pinned columns, read-only monday cells */
.eg .eg-search input{min-width:300px;height:32px;padding:4px 10px 4px 30px;border-radius:8px;background:var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239a9aab' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 10px center}
.eg table.mt thead tr.eg-groups th.eg-gtog{cursor:pointer} .eg table.mt thead tr.eg-groups th.eg-gtog:hover{background:var(--hover)}
.eg .eg-gcar{display:inline-block;width:12px;color:var(--ink3);font-size:10px}
.eg table.mt th.eg-coll .eg-gname{color:var(--ink2)}
.eg table.mt th.eg-stubh{cursor:pointer;font-size:11px;color:var(--ink3);text-transform:none;letter-spacing:0} .eg table.mt td.eg-stubc{min-width:44px;font-family:var(--mono);font-size:11px;background-image:repeating-linear-gradient(135deg,transparent 0 6px,var(--rule2) 6px 7px)}
.eg table.mt .eg-pzc{position:sticky;z-index:1;background:var(--paper)}
.eg table.mt thead tr.eg-fields th.eg-pzc{z-index:5}
.eg table.mt thead tr.eg-groups th.eg-gpin0{position:sticky;left:0;z-index:6;background:var(--paper)}
.eg table.mt thead tr.eg-groups th.eg-gpin{position:sticky;z-index:6;background:var(--paper)}
.eg table.mt tfoot tr.eg-total td.eg-selcell{position:sticky;left:0;z-index:3}
.eg table.mt tfoot tr.eg-total td.eg-job{left:30px;z-index:3}
.eg-ro{display:inline-block;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;font-size:11.5px;color:var(--ink2);background:var(--grey-l);border-radius:4px;padding:1px 6px;line-height:17px}
.eg-ro.eg-rodiff{box-shadow:inset 0 0 0 1px var(--amber)} .eg-ro.eg-robad{background:var(--amber-l);color:var(--amber-t,#8a5200);font-weight:700} .eg-ro.eg-rook{background:var(--green-l);color:var(--green-t,#0a6b43)}
[data-theme=dark] .eg-ro.eg-robad{color:var(--amber-t,var(--amber))} [data-theme=dark] .eg-ro.eg-rook{color:var(--green-t,var(--green))}
.eg table.mt th.eg-roh{color:var(--ink3)}
.eg .eg-emenu{flex:none;border:0;background:none;color:var(--ink3);cursor:pointer;font-size:12px;min-width:26px;height:26px;padding:0 4px;border-radius:4px;line-height:26px} .eg .eg-emenu:hover{background:var(--hover);color:var(--ink)}
.eg th.eg-acth{text-align:right}
.egc{width:320px;max-height:70vh;padding:10px 12px}
.egc .egc-q{height:30px;width:100%}
.egc .egc-list{overflow:auto;max-height:52vh;display:flex;flex-direction:column;gap:8px;padding-right:4px}
.egc .egc-sh{display:flex;align-items:center;gap:6px;font-size:12px;padding:2px 0;border-bottom:1px solid var(--rule)} .egc .egc-sh .dot{width:8px;height:8px;border-radius:50%;display:inline-block}
.egc .egc-lnk{border:0;background:none;color:var(--link,var(--indigo));font-size:11px;cursor:pointer;padding:0 3px} .egc .egc-sh .egc-lnk:first-of-type{margin-left:auto}
.egc .egc-row{display:flex;align-items:center;justify-content:space-between;padding:1px 0 1px 14px} .egc .egc-row label{font-size:12.5px}
.egc .egc-pin{border:0;background:none;cursor:pointer;font-size:11px;opacity:.25;filter:grayscale(1);padding:0 4px;border-radius:4px} .egc .egc-pin:hover{opacity:.7;background:var(--hover)} .egc .egc-pin.on{opacity:1;filter:none}
/* Dawg Walk (tokens from css/theme-dawgwalk.css; Classic never sets these, so it keeps --amber-l rows and the #9D99B9 monday sections).
   Not-released rows: a quiet warm tint (most rows are amber until masters are released) plus a 3 px amber edge, like the Dashboard's row edges.
   Read-only monday sections: the neutral ink3 instead of lavender. */
:root[data-skin="dawgwalk"]{--eg-unrel:color-mix(in srgb,var(--amber-l) 55%,var(--paper));--eg-neutral:var(--ink3)}
:root[data-skin="dawgwalk"] .eg table.mt tr.eg-monday td.eg-selcell{box-shadow:inset 3px 0 0 var(--amber)}
/* Dawg Walk dark: native scrollbars, checkboxes and select pop-ups follow the dark surfaces */
:root[data-skin="dawgwalk"][data-theme="dark"] .eg,:root[data-skin="dawgwalk"][data-theme="dark"] .eg-menu,:root[data-skin="dawgwalk"][data-theme="dark"] .egc,:root[data-skin="dawgwalk"][data-theme="dark"] .egd{color-scheme:dark}
/* Dawg Walk: a status filter with no work orders reads as a neutral outline at full contrast (ink2 on the page, 6:1+) instead of a 50% faded pill */
:root[data-skin="dawgwalk"] .eg-spill.dim{opacity:1}
:root[data-skin="dawgwalk"] .eg-spill.dim .mt-status{background:transparent!important;color:var(--ink2)!important;box-shadow:inset 0 0 0 1px var(--rule-hi)}
/* round 6 (R1): "N placeholders" chip next to the master pill (Q9) */
.eg td.eg-tpl .eg-ph{margin-left:4px}
/* bulk buttons wrap as one group; Release / Released buttons */
.eg .eg-bulk{display:inline-flex;gap:8px;flex:none;margin-left:auto}
@media (max-width:1100px){.eg .eg-search input{min-width:220px}}
.eg td.eg-act .btn.eg-reld{opacity:.75;cursor:default}
/* round 10 (U6): one Save per row, shown only on rows with unsaved edits (the sticky one in the Eng # cell and the one at the row end);
   numbers in the body font; the one-line banner with colour keys; the "How this page works" section; the lock for started work orders */
.eg td.eg-act .eg-dsave{display:none} .eg tr.eg-dirty td.eg-act .eg-dsave{display:inline-block}
.eg table.mt td.n,.eg table.mt td.eg-due,.eg .eg-num{font-family:inherit;font-variant-numeric:tabular-nums}
.eg table.mt td.n{text-align:right}
.eg .eg-key{display:inline-block;padding:0 6px;border-radius:4px;font-weight:600;color:var(--ink)} .eg .eg-key.amber{background:var(--eg-unrel,var(--amber-l))} .eg .eg-key.green{background:var(--green-l)}
.eg .eg-howto{margin:0 0 8px;font-size:13px} .eg .eg-howto>summary{cursor:pointer;color:var(--link,var(--indigo));font-weight:600;font-size:12.5px}
.eg .eg-howto p,.eg .eg-steps{margin:6px 0;color:var(--ink2);line-height:1.5;max-width:980px} .eg .eg-steps{padding-left:20px}
.eg .eg-shown{font-size:12px;color:var(--ink3);white-space:nowrap}
.eg .eg-unc{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;font-size:13px}
.eg .eg-lock{flex:none;font-size:12px;cursor:help}
.eg .eg-qsave{white-space:nowrap}
/* round 10: the Eng status (monday) cell is a compact pill, not a full-width block */
.eg td.eg-eng .mst-sel{display:inline-block;min-width:0;vertical-align:middle}
.eg td.eg-eng .mst,.eg table.mt td.eg-eng .mst.mst-md{display:inline-block;width:auto;min-width:64px;max-width:130px;height:22px;line-height:22px;padding:0 10px;font-size:11.5px;font-weight:600}
/* the Eng # cell's Save sits on its own line (dirty rows only) so the Eng # is never cut */
.eg .eg-qrow{display:none;padding:4px 0 0 24px} .eg tr.eg-dirty .eg-qrow{display:block}
.eg .eg-qrow .eg-qsave{display:inline-block;margin:0}
/* R11 (A7): the Library on FLEXGRID (js/flexgrid.js) — the old grid's cells, tints and buttons inside .fg-t.eg-fgt */
.eg-fgmode .eg-fgbar{margin:6px 0}
.eg-fgmode .fg-t.eg-fgt td{height:38px}
.eg-fgmode .fg-t.eg-fgt tr.eg-monday td{background:var(--eg-unrel,var(--amber-l))}
.eg-fgmode .fg-t.eg-fgt tr.eg-dirty td{background:var(--green-l)}
.eg-fgmode .fg-t.eg-fgt tr.eg-busy td{opacity:.7}
.eg-fgmode .fg-t.eg-fgt tr.fg-r:hover td{background:var(--hover)}
.eg-fgmode .fg-t.eg-fgt td.eg-c{text-align:center}
.eg-fgmode .fg-t.eg-fgt td.eg-c input[type=number]{width:100%;max-width:70px;height:26px;padding:2px 4px;font-size:var(--fs-12);text-align:right;box-sizing:border-box}
.eg-fgmode .fg-t.eg-fgt td.eg-c input[type=text]{width:100%!important;max-width:104px}
.eg-fgmode .fg-t.eg-fgt td.eg-c select{height:26px;font-size:var(--fs-12);padding:1px 4px;max-width:86px}
.eg-fgmode .fg-t.eg-fgt td.eg-c input[type=checkbox]{width:15px;height:15px;margin:0}
.eg-fgmode .eg-fgjob .eg-jtop{display:flex;align-items:center;gap:6px;min-width:0}
.eg-fgmode .eg-fgjob .psel{flex:none;margin:0;width:15px;height:15px}
.eg-fgmode .eg-fgjob a.eg-eng{min-width:0;overflow:hidden;text-overflow:ellipsis}
.eg-fgmode .eg-fgwos{display:inline-flex;align-items:center;gap:4px;min-width:0;overflow:hidden}
.eg-fgmode .eg-fgwos .eg-nwo{flex:none}
.eg-fgmode .eg-fgwo{flex:none;font-size:var(--fs-12);font-weight:600;color:var(--ink);text-decoration:none;border:1px solid var(--rule);border-radius:999px;padding:0 7px;line-height:18px;background:var(--paper);white-space:nowrap;font-family:inherit;cursor:pointer}
.eg-fgmode .eg-fgwo:hover{color:var(--link,var(--indigo));border-color:var(--link,var(--indigo))}
.eg-fgmode .eg-fgwo.more{color:var(--ink2);border-style:dashed}
.eg-fgmode .eg-fgrevs{display:inline-flex;flex-wrap:nowrap;gap:3px;margin:0;padding:0}
.eg-fgmode .eg-plan,.eg-fgmode .eg-tpl{display:inline-flex;align-items:center;gap:3px;white-space:nowrap}
.eg-fgmode .eg-tpl .pill{font-size:var(--fs-11)}
.eg-fgmode .eg-eng .mt-status-sel{min-width:0;width:auto;max-width:124px;height:22px;padding:1px 8px;font-size:var(--fs-12);font-weight:600;border-radius:4px}
.eg-fgmode td.eg-act{white-space:nowrap} .eg-fgmode td.eg-act .btn{margin-right:4px}
.eg-fgmode td.eg-act .eg-dsave{display:none} .eg-fgmode tr.eg-dirty td.eg-act .eg-dsave{display:inline-block}
.eg-fgmode .eg-fggh{margin-left:6px}
