constructelligence's picture
Update code: real-machine G-code adapter, commissioning gate, machine_job runner, pump watchdog firmware, twin completion gate, realism and masking modules (card and weights unchanged)
4eecd03 verified
Raw History Blame Contribute Delete
15.9 kB
/* Zones, notes, job information, and the switch-style layer toggles. Loaded after style.css. */
:root { --note: #5e5ce6; }
.sw-note { background: var(--note); }
/* ---- layer chips become switches: the colour dot, the name, and a real on/off track */
.chip { padding: 5px 7px 5px 10px; gap: 8px; }
.chip::after { content: ""; flex: none; width: 30px; height: 18px; border-radius: 999px; margin-left: 2px;
background-color: var(--fill); background-image: radial-gradient(circle at 50% 50%, #fff 7px, transparent 7.6px);
background-repeat: no-repeat; background-size: 18px 18px; background-position: 0 50%;
box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .12); transition: background-color .2s ease, background-position .2s cubic-bezier(.3, .7, .3, 1); }
.chip:has(input:checked)::after { background-color: var(--paint); background-position: 100% 50%; }
.chip:has(input:checked) { box-shadow: inset 0 0 0 1px var(--line-strong); }
.chip:active::after { background-size: 21px 18px; }
.chip .sw { box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 0%, transparent); }
/* ---- toolbar: one calm glass strip */
.toolbar { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 4; }
.zonebar { gap: 8px; padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--line-strong); }
.zonebar .seg button { display: inline-flex; align-items: center; gap: 6px; }
.zonebar .seg button:disabled { opacity: .35; cursor: not-allowed; }
.zonebar .seg .sw { width: 8px; height: 8px; }
/* ---- zones on the photo */
#zones-svg { z-index: 3; pointer-events: none; }
#zones-svg .zone { pointer-events: auto; cursor: pointer; }
.stage.drawing #zones-svg .zone { pointer-events: none; }
.stage.zoning #zones-svg { pointer-events: auto; cursor: crosshair; }
.stage.zoning #zones-svg .zone, .stage.zoning #zones-svg .handle { pointer-events: none; }
#zones-svg .zone-shape { fill-opacity: .16; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: fill-opacity .15s; }
#zones-svg .zone-keepout .zone-shape { stroke-dasharray: 7 4; }
#zones-svg .zone-note .zone-shape { stroke-dasharray: 2 4; stroke-linecap: round; }
#zones-svg .zone:hover .zone-shape { fill-opacity: .26; }
#zones-svg .zone.sel .zone-shape { fill-opacity: .3; stroke-width: 3; }
#zones-svg .zone-shape.draft { fill-opacity: .12; stroke-dasharray: 5 4; }
#zones-svg .zone-label { fill: #fff; font-weight: 700; paint-order: stroke; stroke: rgba(0, 0, 0, .7); stroke-width: 3.5px; stroke-linejoin: round; pointer-events: none;
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; }
#zones-svg .pin-dot { stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
#zones-svg .pin-num { fill: #fff; font-weight: 700; pointer-events: none; font-family: -apple-system, system-ui, sans-serif; }
#zones-svg .handle { fill: #fff; stroke: var(--paths); stroke-width: 2.5; cursor: grab; pointer-events: all; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4)); vector-effect: non-scaling-stroke; }
#zones-svg .handle:active { cursor: grabbing; }
/* ---- the zone list */
.zone-empty { padding: 12px 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.zone-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.zone-item { background: var(--surface); border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--shadow-sm); cursor: pointer;
transition: box-shadow .15s, background .15s; }
.zone-item:hover { box-shadow: var(--shadow-md); }
.zone-item.sel { box-shadow: inset 0 0 0 1.5px var(--accent), var(--shadow-sm); background: var(--accent-soft); }
.zone-item.dim { opacity: .55; }
.zone-row { display: flex; align-items: center; gap: 8px; }
.zdot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.zlabel { flex: 1; min-width: 0; border: 0; background: transparent; font-weight: 600; font-size: 14px; padding: 3px 4px; border-radius: 6px; }
.zlabel:focus { outline: none; background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.zbtn { border: 0; background: var(--fill); color: var(--muted); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 11px; line-height: 1; }
.zbtn:hover { background: var(--accent-soft); color: var(--accent); }
.zbtn.danger:hover { background: var(--bad-bg); color: var(--bad); }
.zone-meta { margin: 2px 0 6px 19px; }
.ztext { width: 100%; resize: vertical; border: 0; border-radius: 8px; background: var(--fill); padding: 7px 9px; font-size: 13px; min-height: 36px; }
.ztext:focus { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.ztext:placeholder-shown { min-height: 34px; }
.info-card { display: grid; gap: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.info-card label { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: start; gap: 8px; padding: 9px 14px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.info-card label:first-child { border-top: 0; }
.info-card .field { margin: 0; padding: 2px 4px; border: 0; background: transparent; color: var(--text); text-align: right; }
.info-card .field:focus { box-shadow: none; background: var(--fill); border-radius: 6px; }
.info-card textarea.field { text-align: left; resize: vertical; }
@media (prefers-reduced-motion: reduce) { .chip::after, .zone-item, #zones-svg .zone-shape { transition: none !important; } }
/* ---- corrections: detections you can click, undo/redo, hold-to-compare */
.sw-window { background: #0a84ff; } .sw-door { background: #ff9f0a; } .sw-fixture { background: #ff2d95; } .sw-wall { background: #30b0c7; } .sw-det { background: #8e8e93; }
.zonebar { flex-basis: 100%; flex-wrap: wrap; border-left: 0; padding: 10px 0 0; margin: 0; border-top: 1px solid var(--line); row-gap: 8px; }
.zb-label { margin-left: 4px; }
.zb-tail { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.zb-btn { padding: 5px 11px !important; font-size: 14px; min-width: 34px; }
.zb-btn.wide { font-size: 12.5px; }
.det-chip { padding-right: 10px; }
.det-chip::after { display: none; }
.det-chip:has(input:checked)::before { content: ""; }
#zones-svg .det { pointer-events: auto; cursor: pointer; }
.stage.drawing #zones-svg .det, .stage.zoning #zones-svg .det { pointer-events: none; }
#zones-svg .det-shape { fill-opacity: .0; stroke-width: 2; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; transition: fill-opacity .15s; }
#zones-svg .det:hover .det-shape { fill-opacity: .22; stroke-dasharray: none; }
#zones-svg .det.sel .det-shape { fill-opacity: .3; stroke-dasharray: none; stroke-width: 3; }
.stage.compare .layer { opacity: 0 !important; }
.stage.compare img.layer.edge { opacity: 0 !important; }
.det-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-md), inset 0 0 0 1.5px var(--accent); padding: 12px 14px; margin-bottom: 10px; }
.det-head { display: flex; align-items: center; gap: 8px; }
.det-head .zbtn { margin-left: auto; }
.det-card p { margin: 6px 0 10px; }
.det-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.det-actions .ghost { padding: 6px 12px; font-size: 12.5px; }
.zb-fix { display: inline-flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.zb-label { white-space: nowrap; margin-left: 0; }
.zonebar .seg.kinds { flex-wrap: nowrap; }
/* ---- floor overlay (off by default) */
.sw-floor { background: #b07d4f; }
.floor-note { padding: 8px 20px 0; text-align: center; max-width: 880px; margin: 0 auto; }
svg.floor-line { pointer-events: none; }
svg.floor-line .fl-halo { stroke: rgba(255, 255, 255, .85); stroke-width: 5; vector-effect: non-scaling-stroke; }
svg.floor-line .fl-line { stroke: #b07d4f; stroke-width: 2.5; stroke-dasharray: 10 6; vector-effect: non-scaling-stroke; }
/* ---- drone twin panel (dronetwin.js) */
.sw-dtwin { background: #34c759; }
.dtwin-layer { opacity: .55; image-rendering: pixelated; }
.dt-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 12px 14px; display: grid; gap: 10px; }
.dt-setup { display: grid; gap: 8px; font-size: 13px; }
.dt-setup > label { display: grid; gap: 4px; color: var(--muted); }
.dt-row { display: flex; gap: 6px; }
.dt-row .field { margin: 0; padding: 6px 8px; min-width: 0; }
.dt-row .field.narrow { max-width: 64px; }
.dt-check { display: flex !important; gap: 8px; align-items: center; color: var(--text) !important; }
.dt-verdict { border-radius: 10px; padding: 9px 12px; background: var(--fill); display: grid; gap: 2px; }
.dt-verdict.ok { background: var(--ok-bg); color: var(--ok); } .dt-verdict.warn { background: var(--warn-bg); color: var(--warn); } .dt-verdict.bad { background: var(--bad-bg); color: var(--bad); }
.dt-verdict span { font-size: 12.5px; opacity: .9; }
.dt-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 13px; }
.dt-dl dt { color: var(--muted); } .dt-dl dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.dt-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.dt-actions .ghost { padding: 6px 12px; font-size: 12.5px; }
@media (max-width: 480px) { .zb-fix, .zonebar .seg.kinds { flex-wrap: wrap; max-width: 100%; } .zb-tail { margin-left: 0; flex-wrap: wrap; } }
.dt-history { background: var(--fill); border-radius: 10px; padding: 8px 10px 6px; display: grid; gap: 4px; }
.dt-hist-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.dt-hist-head strong { color: var(--text); font-variant-numeric: tabular-nums; }
.dt-spark { width: 100%; height: 46px; overflow: visible; }
.dt-spark .ln { fill: none; stroke: #34c759; stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.dt-spark .goal { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; opacity: .5; vector-effect: non-scaling-stroke; }
.dt-spark circle.sortie, .dt-legend i.sortie { fill: #34c759; background: #34c759; }
.dt-spark circle.obs, .dt-legend i.obs { fill: #0a84ff; background: #0a84ff; }
.dt-spark circle { stroke: var(--surface); stroke-width: 1.5; }
.dt-legend { display: flex; gap: 12px; } .dt-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.dt-next-toggle { font-size: 12.5px; padding: 0 4px; }
.dt-next { font-size: 13px; display: grid; gap: 6px; }
.dt-gate { border-radius: 8px; padding: 6px 10px; font-size: 12.5px; } .dt-gate.ok { background: var(--ok-bg); color: var(--ok); } .dt-gate.bad { background: var(--bad-bg); color: var(--bad); }
.dt-missing { margin: 8px 0 0; padding-left: 18px; color: var(--muted); } .dt-missing li { margin: 2px 0; }
svg.dtwin-next { pointer-events: none; }
svg.dtwin-next .halo { fill: none; stroke: rgba(0, 0, 0, .45); stroke-width: 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
svg.dtwin-next .pass { fill: none; stroke: #ff9f0a; stroke-width: 2.5; stroke-dasharray: 9 5; stroke-linecap: round; vector-effect: non-scaling-stroke; animation: dt-march 1.2s linear infinite; }
svg.dtwin-next .end { fill: #ff9f0a; } svg.dtwin-next .start { fill: none; stroke: #fff; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
@keyframes dt-march { to { stroke-dashoffset: -14; } }
@media (prefers-reduced-motion: reduce) { svg.dtwin-next .pass { animation: none; } }
.dt-actions label.button { display: inline-flex; align-items: center; border-radius: 999px; background: var(--fill); color: var(--accent); cursor: pointer; font-weight: 500; }
.dt-actions label.button:hover { background: var(--accent-soft); } .dt-actions label.button:active { transform: scale(.98); }
.dt-next-head { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; }
.dt-action { margin: 8px 0 10px; font-size: 12.5px; color: var(--muted); }
.dt-action b { color: var(--text); }
.dt-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0 0 10px; }
.dt-chip { display: flex; flex-direction: column; gap: 1px; padding: 6px 9px; border-radius: var(--radius-sm); background: var(--fill); }
.dt-chip small { font-size: 10.5px; color: var(--muted); }
.dt-chip b { font-size: 14px; font-variant-numeric: tabular-nums; }
.dt-chip i { font-style: normal; font-size: 10.5px; color: var(--muted); }
.dt-chip.ok b { color: var(--ok); } .dt-chip.warn b { color: var(--warn); } .dt-chip.bad b { color: var(--bad); }
.dt-spray { display: grid; gap: 4px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--fill); margin: 0 0 10px; }
.dt-spray-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.dt-spray-head b { font-variant-numeric: tabular-nums; }
.dt-spray-bar { height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .18); overflow: hidden; }
.dt-spray-bar i { display: block; height: 100%; border-radius: 3px; background: var(--ok); }
.dt-spray-bar i.warn { background: var(--warn); } .dt-spray-bar i.bad { background: var(--bad); }
.dt-why { font-size: 12.5px; } .dt-why summary { cursor: pointer; color: var(--muted); }
.dt-why .dt-missing { margin-top: 6px; }
svg.dtwin-next marker path { fill: #ff9f0a; }
svg.dtwin-next .pump { fill: #34c759; stroke: var(--surface); stroke-width: 1; vector-effect: non-scaling-stroke; }
svg.dtwin-next .pass { pointer-events: stroke; }
.dt-diag { margin: 8px 0 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn);
font-size: 12.5px; line-height: 1.35; }
svg.dtwin-next .pass:hover { stroke-width: 3.5; animation: none; }
.dt-whatif, .dt-passes { font-size: 12.5px; }
.dt-whatif summary, .dt-passes summary { cursor: pointer; color: var(--muted); }
.dt-whatif label { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; margin: 8px 0 4px; }
.dt-whatif input[type="range"] { grid-column: 1 / -1; width: 100%; }
.dt-whatif b { font-variant-numeric: tabular-nums; }
.dt-wi-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.dt-wi-chip { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--fill); }
.dt-wi-chip small { font-size: 10px; color: var(--muted); } .dt-wi-chip b { font-size: 13px; font-variant-numeric: tabular-nums; }
.dt-wi-chip.ok b { color: var(--ok); } .dt-wi-chip.warn b { color: var(--warn); } .dt-wi-chip.bad b { color: var(--bad); }
.dt-passrows { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; max-height: 220px; overflow: auto; }
.dt-passrow button { width: 100%; display: grid; grid-template-columns: auto auto auto minmax(0, 1fr); gap: 8px; align-items: baseline;
padding: 5px 8px; border: 0; border-radius: 8px; background: var(--fill); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.dt-passrow button:hover { background: var(--line); }
.dt-passrow button.on { outline: 2px solid var(--bad); outline-offset: 1px; }
.dt-passrow b { font-variant-numeric: tabular-nums; }
.dt-passrow span { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-passrow.flagged button { background: var(--bad-bg); color: var(--bad); }
.dt-passrow.flagged span { color: var(--bad); opacity: .8; }
svg.dtwin-marks { pointer-events: none; }
svg.dtwin-marks .mark { stroke: #ff453a; stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
svg.dtwin-marks .markdot { fill: #ff453a; stroke: var(--surface); stroke-width: 1.5; vector-effect: non-scaling-stroke; }