:root {
  --bg: #F5F5F7; --card: #FFFFFF; --line: #E2E2E6; --line2: #EFEFF2; --fill: #ECECEF;
  --text: #18181A; --text2: #66666D; --text3: #8B8B92;
  --accent: #C64F1A; --accent-dk: #A63D10; --accent-tint: #FFF0E8;
  --good: #176C45; --good-bg: #E8F5ED; --bad: #B33429; --bad-bg: #FCEBEA; --bad-line: #F0C2BD;
  --warn: #855300; --warn-bg: #FBF1DE; --away: #355A84; --away-bg: #E9F0F8;
  --r: 16px; --r-sm: 11px; --shadow: 0 1px 2px rgba(0,0,0,.045), 0 8px 24px rgba(0,0,0,.035);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(194,65,12,.35); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--text2); }
.small { font-size: 14px; }
.tnum { font-variant-numeric: tabular-nums; }
.hide { display: none !important; }

/* Shell */
.shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.topbar { flex: none; display: flex; align-items: center; gap: 16px; min-height: 68px; padding: 8px 22px; padding-top: max(8px, env(safe-area-inset-top)); background: rgba(255,255,255,.94); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--line); box-shadow: 0 1px 8px rgba(0,0,0,.025); }
.brand-wordmark { color: var(--accent); font-size: 21px; line-height: 1; font-weight: 800; letter-spacing: 1.1px; padding-right: 16px; border-right: 1px solid var(--line); flex: none; }
.brand { flex: none; display: flex; align-items: center; padding-right: 14px; border-right: 1px solid var(--line); }
.brand img { height: 48px; width: auto; display: block; }
.topbar .title { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.topbar .title > div { min-width: 0; }
.topbar h1 { font-size: 17px; font-weight: 600; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub { font-size: 13px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.iconbtn { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.iconbtn:hover { background: var(--fill); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 15px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.pill.saved { background: var(--good-bg); color: var(--good); }
.pill.connection.online { background: #E8F2FF; color: #245A9A; }
.pill.connection.offline { background: var(--warn-bg); color: var(--warn); }
.body { flex: 1; min-height: 0; display: flex; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 11px; font-weight: 600; font-size: 15px; white-space: nowrap; transition: background .15s ease, transform .15s ease, box-shadow .15s ease; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dk); box-shadow: 0 5px 14px rgba(198,79,26,.2); transform: translateY(-1px); }
.btn.primary:disabled { background: var(--line); color: var(--text2); cursor: not-allowed; }
.btn.ghost { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: var(--fill); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn.danger { color: var(--bad); }
.linkbtn { color: var(--accent); font-weight: 600; font-size: 14px; }

/* Home */
.home { flex: 1; overflow: auto; padding: 32px 24px 64px; }
.wrap { max-width: 960px; margin: 0 auto; }
.beta-intro { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; padding: 26px; background: var(--card); color: var(--text); border-radius: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.beta-intro > div:first-child { max-width: 610px; }
.beta-intro h2 { font-size: 28px; letter-spacing: -.5px; margin: 5px 0 6px; }
.beta-intro p { color: var(--text2); }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.beta-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.beta-intro .btn.ghost { background: var(--fill); box-shadow: none; color: var(--text); }
.beta-intro .btn.ghost:hover { background: #E3E3E7; }
.filebtn { cursor: pointer; }
.filebtn input { display: none; }
.workflow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 26px; }
.workflow > div { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 14px; padding: 13px; box-shadow: var(--shadow); min-width: 0; }
.workflow b { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-tint); color: var(--accent); flex: none; }
.workflow span { color: var(--text2); font-size: 13px; min-width: 0; }
.workflow strong { display: block; color: var(--text); font-size: 14px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.hero h2 { font-size: 34px; font-weight: 700; letter-spacing: -.8px; }
.hero p { color: var(--text2); margin-top: 4px; }
.group-title { font-size: 13px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--text2); margin: 28px 4px 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.vcard { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 12px; text-align: left; transition: box-shadow .15s ease, transform .15s ease; }
.vcard:hover { box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 28px rgba(0,0,0,.07); transform: translateY(-1px); }
.vcard h3 { font-size: 19px; font-weight: 650; letter-spacing: -.3px; }
.vcard .meta { font-size: 13px; color: var(--text2); }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.bar.done > i { background: var(--good); }
.empty { background: var(--card); border-radius: var(--r); padding: 40px 24px; text-align: center; color: var(--text2); box-shadow: var(--shadow); }

/* New visit */
.form { display: flex; flex-direction: column; gap: 28px; }
.step h3 { font-size: 13px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--text2); margin: 0 4px 10px; }
.ranges { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.rcard { background: var(--card); border-radius: var(--r); padding: 18px; text-align: left; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; min-height: 112px; }
.rcard b { font-size: 22px; font-weight: 700; letter-spacing: -.5px; }
.rcard.on { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-tint); }
.syslist { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.sysrow { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--line2); }
.sysrow:last-child { border-bottom: 0; }
.check { width: 24px; height: 24px; border-radius: 7px; box-shadow: inset 0 0 0 1.5px #C7C7CC; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.check.on { background: var(--accent); box-shadow: none; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text2); }
.input, .textarea { width: 100%; border: 0; border-radius: var(--r-sm); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); padding: 0 12px; height: 46px; font-size: 16px; }
.textarea { height: auto; min-height: 96px; padding: 12px; line-height: 1.45; resize: vertical; }
.input.soft, .textarea.soft { background: var(--bg); box-shadow: none; }
.input:focus, .textarea:focus { box-shadow: inset 0 0 0 2px rgba(198,79,26,.48); outline: 0; }

/* Visit layout */
.nav { width: 256px; flex: none; overflow: auto; padding: 18px 10px; border-right: 1px solid var(--line); background: #EFEFF2; display: flex; flex-direction: column; gap: 3px; }
.nav .label { font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--text2); padding: 4px 12px 8px; }
.navitem { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left; }
.navitem:hover { background: var(--fill); }
.navitem.on { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.navitem .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.navitem .nm { font-size: 15px; font-weight: 500; }
.navitem.on .nm { font-weight: 650; }
.navitem .ct { font-size: 13px; color: var(--text2); white-space: nowrap; }
.navitem .bar { height: 4px; }
.navsep { height: 1px; background: var(--line); margin: 10px 12px; }
.subnav { display: flex; flex-direction: column; gap: 1px; margin: 4px 0 8px; }
.subitem { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 6px 12px 6px 22px; border-radius: 10px; text-align: left; font-size: 14px; color: var(--text); }
.subitem:hover { background: var(--fill); }
.subitem.on { color: var(--accent); font-weight: 650; background: #FFE9DD; }
.subitem .ct { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text2); font-weight: 500; white-space: nowrap; }
.fdot { width: 8px; height: 8px; border-radius: 4px; background: var(--bad); display: inline-block; }

.col { overflow: auto; min-width: 0; }
.list { width: 360px; flex: none; background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.listhead { padding: 16px 16px 10px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line2); }
.listhead h2 { font-size: 21px; font-weight: 700; letter-spacing: -.4px; }
.serial-guidance { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--accent-tint); color: var(--ink); }
.serial-guidance strong, .serial-label { color: var(--accent); font-size: 13px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.serial-guidance span { color: var(--muted); font-size: 14px; line-height: 1.35; }
.serial-notes-field { padding-top: 4px; }
.serial-notes-summary { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.serial-notes-summary h3 { font-size: 17px; }
.serial-note-list { display: grid; gap: 8px; }
.serial-note-list > div { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 2px 12px; padding: 12px; border-radius: 12px; background: var(--bg); }
.serial-note-list p { grid-column: 1 / -1; margin-top: 4px; white-space: pre-wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 16px; background: var(--fill); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip.on { background: var(--text); color: #fff; }
.chip .n { opacity: .65; font-variant-numeric: tabular-nums; }
.seg { display: flex; padding: 2px; background: var(--fill); border-radius: 11px; }
.seg button { flex: 1; height: 34px; border-radius: 9px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.seg button.on { background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,.1); font-weight: 600; }
.seg.lg button { height: 44px; font-size: 15px; }
.rows { flex: 1; overflow: auto; padding: 6px 8px 24px; }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 52px; padding: 0 10px; border-radius: 12px; text-align: left; }
.srow:hover { background: var(--bg); }
.srow.on { background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent); }
.srow .sn { font-size: 16px; font-variant-numeric: tabular-nums; }
.srow.on .sn { font-weight: 650; }
.typehead { font-size: 12px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--text2); padding: 14px 10px 6px; }

.badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.b-pass { background: var(--good-bg); color: var(--good); }
.b-fault { background: var(--bad-bg); color: var(--bad); }
.b-monitor { background: var(--warn-bg); color: var(--warn); }
.b-away { background: var(--away-bg); color: var(--away); }
.b-todo { box-shadow: inset 0 0 0 1px #AEAEB2; color: var(--text2); font-weight: 500; }
.b-na { background: var(--fill); color: var(--text2); }

.detail { flex: 1; min-width: 0; overflow: auto; padding: 26px 32px 52px; display: flex; flex-direction: column; gap: 20px; background: #F7F7F8; }
.dhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.dhead h2 { font-size: 30px; font-weight: 700; letter-spacing: -.7px; font-variant-numeric: tabular-nums; }
.card { background: var(--card); border-radius: 17px; box-shadow: var(--shadow); }
.card.pad { padding: 16px; }
.qlabel { font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 8px; }
.tests .t { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 16px; border-bottom: 1px solid var(--line2); }
.tests .t:last-child { border-bottom: 0; }
.yn { display: flex; gap: 4px; flex: none; }
.yn button { min-width: 64px; height: 36px; padding: 0 12px; border-radius: 9px; background: var(--fill); font-size: 14px; }
.yn button.y.on { background: var(--good); color: #fff; font-weight: 600; }
.yn button.n.on { background: var(--bad); color: #fff; font-weight: 600; }
.yn button.na.on { background: var(--text2); color: #fff; font-weight: 600; }
.faultbox { padding: 18px; border-radius: 17px; background: var(--card); box-shadow: inset 3px 0 0 var(--bad), var(--shadow); display: flex; flex-direction: column; gap: 13px; }
.faultbox.away { box-shadow: inset 0 0 0 1.5px #C9D5E6; }
.faultbox .ttl { font-size: 13px; font-weight: 600; color: var(--bad); }
.faultbox.away .ttl { color: var(--away); }
.opts { display: flex; gap: 6px; flex-wrap: wrap; }
.opt { height: 36px; padding: 0 14px; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); background: var(--card); font-size: 14px; }
.opt.on { background: var(--text); color: #fff; box-shadow: none; font-weight: 600; }
.opt.on.bad { background: var(--bad); }
.opt.on.good { background: var(--good); }
.opt.on.warn { background: var(--warn); }
.photos { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ph { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #3A3A3C; }
.phwrap { position: relative; }
.phwrap button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 11px; background: #1D1D1F; color: #fff; font-size: 13px; line-height: 22px; }
.addph { width: 64px; height: 64px; border-radius: 10px; box-shadow: inset 0 0 0 1.5px #C7C7CC; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.addph input { display: none; }

/* Checklist */
.cl { flex: 1; min-width: 0; overflow: auto; padding: 26px 32px 64px; background: #F7F7F8; }
.clhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.clhead h2 { font-size: 28px; font-weight: 700; letter-spacing: -.6px; }
.secchips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.task { border-bottom: 1px solid var(--line2); }
.task:last-child { border-bottom: 0; }
.task .tr { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 16px; }
.task .no { width: 28px; flex: none; font-size: 13px; color: var(--text2); font-variant-numeric: tabular-nums; }
.task .tx { flex: 1; font-size: 15px; }
.task.fault { background: #FFF8F7; }
.task .fx { padding: 0 16px 16px 58px; display: flex; flex-direction: column; gap: 14px; }
.lanes { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
.lane { height: 38px; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--line); background: var(--card); font-size: 14px; font-variant-numeric: tabular-nums; }
.lane.on { background: var(--accent); color: #fff; box-shadow: none; font-weight: 600; }
.serials { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 12px; border-radius: 15px; background: var(--fill); font-size: 13px; font-variant-numeric: tabular-nums; }
.tag button { width: 22px; height: 22px; border-radius: 11px; color: var(--text2); }
.notes { display: flex; flex-direction: column; gap: 16px; max-width: 820px; }

/* Review */
.review { flex: 1; overflow: auto; padding: 28px 32px 64px; background: #F7F7F8; }
.review .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 20px; align-items: start; }
.chk { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 8px 18px; border-bottom: 1px solid var(--line2); }
.chk:last-child { border-bottom: 0; }
.dot { width: 26px; height: 26px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.dot.ok { background: var(--good-bg); }
.dot.bad { background: var(--bad-bg); }
.sig { width: 100%; height: 160px; border-radius: 12px; background: var(--bg); touch-action: none; display: block; }
.stat { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.stat > div { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 14px; }
.stat b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #1D1D1F; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 50; }

/* Report screen */
.reportview { flex: 1; min-height: 0; display: flex; padding: 16px; background: #E9E9ED; }
.pdfwrap { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.pdfframe { flex: 1; width: 100%; min-height: 70vh; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.pdfhint { text-align: center; }
.pdfhint a, .offpath a { color: var(--accent); }
.pdfwait { margin: auto; display: flex; align-items: center; gap: 10px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.busy { position: fixed; inset: 0; background: rgba(245,245,247,.6); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 60; }
.busy > div { display: flex; align-items: center; gap: 12px; background: var(--card); padding: 16px 20px; border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.12); font-weight: 500; }

/* Beta 0.6: sync */
.pill.saved.pending { background: var(--warn-bg); color: var(--warn); }
.pill.saved.offline { background: #EEF0F3; color: var(--text2); }
.pill.saved.err { background: var(--bad-bg); color: var(--bad); }
.lastchange { color: var(--text3); }
.teamnote { display: flex; align-items: center; gap: 8px; color: var(--text2); font-size: 14px; margin: 18px 4px 0; }

/* Beta 0.6: sign-in */
.gatewrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(1200px 600px at 50% -10%, #FFF3EA, var(--bg)); }
.gatecard { width: 100%; max-width: 440px; background: var(--card); border-radius: 24px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 24px 60px rgba(0,0,0,.08); padding: 36px 32px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.gatecard h1 { font-size: 28px; font-weight: 700; letter-spacing: -.6px; }
.gatelogo { height: 64px; width: auto; margin-bottom: 8px; }
.gatebusy { display: flex; align-items: center; gap: 10px; color: var(--text2); }
.gatewarn { color: var(--warn); font-size: 14px; }
.btn.lg { height: 52px; font-size: 16px; padding: 0 24px; width: 100%; margin-top: 6px; }
.userpill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 4px; border-radius: 18px; background: var(--fill); font-size: 14px; font-weight: 500; }
.userpill:hover { background: #E3E3E7; }
.userpill .avatar { width: 28px; height: 28px; border-radius: 14px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 900px) { .fbbtn span { display: none; } .fbbtn { padding: 0 10px; } .userpill .un { display: none; } .userpill { padding-right: 4px; } }

/* Beta 0.5 additions */
.signoff { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--good); font-weight: 500; }
.signcard { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 14px; background: var(--good-bg); }
.signcard .sc-name { font-size: 19px; font-weight: 650; letter-spacing: -.3px; color: var(--text); }
.signcard img { height: 56px; width: auto; align-self: flex-start; margin-top: 6px; mix-blend-mode: multiply; }
.vhist { display: flex; flex-direction: column; gap: 6px; }
.vh-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: var(--bg); }
.vh-v { width: 34px; height: 26px; border-radius: 8px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 650; flex: none; }
.vh-main { display: flex; flex-direction: column; min-width: 0; }
.vh-main b { font-weight: 600; font-size: 15px; }
.corrnote { padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: 14px; }
.vrow { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2366666D' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.sitepick { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.searchbox { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line2); color: var(--text2); }
.searchbox .input { box-shadow: none; background: var(--bg); height: 42px; }
.sitelist { max-height: 52vh; overflow: auto; padding: 4px 8px 10px; }
.sl-state { position: sticky; top: 0; z-index: 1; background: rgba(255,255,255,.96); font-size: 12px; font-weight: 650; letter-spacing: .6px; text-transform: uppercase; color: var(--text2); padding: 12px 10px 6px; }
.sl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 8px 10px; border-radius: 12px; text-align: left; }
.sl-row:hover { background: var(--bg); }
.sl-row.on { background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent); }
.sl-name { display: flex; flex-direction: column; min-width: 0; }
.sl-name b { font-size: 16px; font-weight: 600; }
.sl-codes { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.sl-codes i { font-style: normal; font-size: 11.5px; font-weight: 600; letter-spacing: .3px; padding: 3px 7px; border-radius: 6px; background: var(--fill); color: var(--text2); }
.sl-empty { padding: 20px 10px; }
.step-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 10px; }
.step-head h3 { margin-bottom: 0; }
.searchbox.solo { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); border: 0; margin-bottom: 6px; padding: 6px 6px 6px 14px; }
.sitegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.sg-state { grid-column: 1 / -1; font-size: 12px; font-weight: 650; letter-spacing: .6px; text-transform: uppercase; color: var(--text2); margin: 12px 4px 0; }
.sg-state:first-child { margin-top: 2px; }
.stile { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; text-align: left; display: flex; flex-direction: column; gap: 8px; transition: box-shadow .15s ease, transform .15s ease; }
.stile:hover { box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 24px rgba(0,0,0,.07); transform: translateY(-1px); }
.stile b { font-size: 15.5px; font-weight: 650; letter-spacing: -.2px; }
.stile .sl-codes { justify-content: flex-start; }
.stile.on { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow); background: var(--accent-tint); }
.sitecard { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--card); border-radius: var(--r); box-shadow: inset 0 0 0 2px var(--accent), var(--shadow); padding: 18px 20px; }
.sitecard b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.5px; margin: 2px 0; }
.sysrow-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sysrow-main b { font-weight: 600; }
.sysnote { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; color: var(--warn); margin-top: 3px; }
.sysnote svg { flex: none; margin-top: 2px; }
.techpick { display: flex; flex-direction: column; gap: 12px; }
.chip.tech { height: 38px; padding: 0 14px; font-size: 14px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.techchip { display: inline-flex; align-items: center; }
.techchip.local .chip.tech { border-radius: 19px 0 0 19px; padding-right: 10px; }
.forget { height: 38px; width: 34px; border-radius: 0 19px 19px 0; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); color: var(--text2); font-size: 18px; line-height: 1; margin-left: -1px; }
.forget:hover { background: var(--bad-bg); color: var(--bad); }
.techchip.local .chip.tech.on + .forget { background: var(--accent-dk); color: #fff; box-shadow: none; }
.chip.tech.on { background: var(--accent); color: #fff; box-shadow: none; font-weight: 600; }
.addtech { display: flex; gap: 8px; max-width: 460px; }
.addtech .input { height: 40px; }
.subhead { font-size: 11px; font-weight: 650; letter-spacing: .6px; text-transform: uppercase; color: var(--text3); padding: 10px 12px 4px 22px; }
.subitem.add { justify-content: flex-start; gap: 8px; color: var(--accent); font-weight: 600; margin-top: 4px; }
.lh-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lh-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lh-actions .btn { flex: 1; }
.bulkbar { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: var(--accent-tint); }
.bulkbar .ttl { font-weight: 650; font-size: 14px; }
.bulkbar .input { background: var(--card); height: 42px; }
.bulk-actions { display: flex; gap: 8px; justify-content: flex-end; }
.addedtag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-left: 8px; border-radius: 6px; background: #EFEAFB; color: #5B3FA6; font-size: 11.5px; font-weight: 650; vertical-align: 2px; }
.addedtag.lg { height: 24px; margin: 8px 0 0; font-size: 12.5px; }
.draftnote { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: 14px; margin-bottom: 14px; }
.draftnote svg { flex: none; margin-top: 3px; }
.lane-group { margin: 6px 0 4px; }
.serial-in { height: 38px; width: 200px; }
.fx-out { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.fx-action { flex: 1; min-width: 240px; }
.fx-action .qlabel { display: block; }
.fb-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: rgba(24,24,26,.32); display: flex; align-items: center; justify-content: center; padding: 20px; }
.sheet { width: 100%; max-width: 600px; max-height: calc(100dvh - 40px); overflow: auto; background: var(--card); border-radius: 22px; box-shadow: 0 24px 64px rgba(0,0,0,.22); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sheet-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -.4px; }
.sheet-err { color: var(--bad); font-size: 14px; font-weight: 500; min-height: 1px; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 10px; }
.fields.two { grid-template-columns: 1fr 1fr; }
.card-h { padding: 16px 18px 4px; }
.card-h h3, .side h3 { font-size: 17px; font-weight: 600; }
.chk { flex-wrap: wrap; }
.chk-main { flex: 1 1 220px; min-width: 0; }
.chk-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.side { display: flex; flex-direction: column; gap: 12px; }
.sidesep { height: 1px; background: var(--line2); margin: 4px 0; }
.checkline { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); }
.checkline input { width: 20px; height: 20px; accent-color: var(--accent); }
.offpath { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.offpath .linkbtn { display: inline-flex; align-items: center; gap: 6px; }
.row-between { display: flex; justify-content: space-between; }
.review .stat { margin-bottom: 20px; }
.stat span { display: block; }

/* Responsive */
@media (max-width: 1100px) { .list { width: 300px; } .nav { width: 220px; } }
@media (max-width: 900px) {
  .top-actions .connection { display: none; }
  .beta-intro { align-items: flex-start; flex-direction: column; }
  .beta-actions { justify-content: flex-start; }
  .workflow { grid-template-columns: repeat(2, 1fr); }
  .body { flex-direction: column; overflow: auto; }
  .nav { width: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; gap: 4px; }
  .nav .label, .navsep { display: none; }
  .navitem { width: auto; flex: 1 1 150px; }
  .subnav { order: 10; flex-basis: 100%; flex-direction: row; overflow-x: auto; gap: 6px; margin: 4px 0 0; padding-bottom: 2px; }
  .subitem { width: auto; flex: none; padding: 6px 12px; background: var(--fill); border-radius: 18px; }
  .subitem.on { background: var(--text); color: #fff; }
  .list { width: auto; max-height: 45vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .detail, .cl, .review { padding: 16px; overflow: visible; }
  .task .fx { padding-left: 16px; }
  .stat { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .reportview { padding: 8px; }
}
@media (max-width: 560px) {
  .fields.two { grid-template-columns: 1fr; }
  .sheet-bg { align-items: flex-end; padding: 0; }
  .sheet { border-radius: 22px 22px 0 0; max-height: 92dvh; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .sitegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chk { flex-wrap: wrap; }
  .chk-actions { width: 100%; justify-content: flex-start; padding-left: 40px; }
  .topbar .top-actions .btn.ghost { padding: 0 10px; }
  .home { padding: 18px 12px 48px; }
  .topbar { padding-left: 12px; padding-right: 12px; }
  .brand { padding-right: 10px; }
  .brand img { height: 40px; }
  .topbar { gap: 10px; }
  .topbar h1 { max-width: 150px; }
  .topbar .pill.saved { display: none; }
  .topbar .btn { padding: 0 13px; }
  .beta-intro { padding: 19px; border-radius: 16px; }
  .beta-intro h2 { font-size: 24px; }
  .workflow { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .seg.lg { display: grid; grid-template-columns: repeat(2, 1fr); }
  .dhead { align-items: flex-start; }
  .dhead h2 { font-size: 24px; overflow-wrap: anywhere; }
  .task .tr { align-items: flex-start; flex-wrap: wrap; }
  .task .yn { margin-left: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}


/* ===== Beta 0.7: visit overview and guided working screens ===== */
.ring { --p: 0; --c: var(--accent); position: relative; display: inline-block; flex: none; width: 26px; height: 26px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), #DCDCE1 0); }
.ring::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--rbg, #EFEFF2); }
.ring.done { --c: var(--good); }
.ring.lg { width: 84px; height: 84px; --rbg: var(--card); background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--fill) 0); }
.ring.lg::after { inset: 8px; }
.navitem.on .ring.sm { --rbg: var(--card); }
.sbar { display: flex; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.sbar i { display: block; height: 100%; }
.sbar .g { background: var(--good); } .sbar .r { background: var(--bad); } .sbar .a { background: var(--away); }

/* nav */
.nav { gap: 2px; }
.navitem.ovw .nm { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.navitem.ovw { margin-bottom: 8px; }
.navitem.sysn { flex-direction: row; align-items: center; gap: 11px; }
.sysn-t { display: flex; flex-direction: column; min-width: 0; }
.sysn-t .nm { font-size: 14.5px; font-weight: 650; letter-spacing: .1px; }
.sysn-t .ct { font-size: 12.5px; color: var(--text3); }
.navfoot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.subitem { padding-left: 14px; }
.subitem.ok .ct { color: var(--good); }
.subitem.muted2 { color: var(--text2); }
.subhead { padding-left: 14px; }

/* overview */
.ovw-page { padding: 30px 28px 64px; }
.ov-wrap { max-width: 1120px; }
.ovw-page .eyebrow { color: var(--text3); }
.ov-title { font-size: 34px; font-weight: 700; letter-spacing: -.8px; margin: 4px 0 6px; }
.ov-lede { font-size: 17px; color: var(--text2); max-width: 760px; margin-bottom: 22px; }
.ov-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; align-items: stretch; }
.ov-grid.one { grid-template-columns: minmax(0, 720px); }
.ov-card { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.ov-h { position: relative; display: flex; align-items: center; gap: 16px; }
.ov-rn { position: absolute; left: 0; top: 0; width: 84px; height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ov-rn b { font-size: 21px; letter-spacing: -.5px; }
.ov-rn small { font-size: 11.5px; color: var(--text3); margin-top: 3px; }
.ov-ht h3 { font-size: 19px; font-weight: 650; letter-spacing: -.3px; }
.ov-ht p { font-size: 14px; color: var(--text2); margin-top: 3px; }
.ov-rows { display: flex; flex-direction: column; flex: 1; }
.ov-rh { font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--text3); margin: 10px 0 2px; }
.ov-rh:first-child { margin-top: 0; }
.ov-r { display: grid; grid-template-columns: minmax(120px, 170px) 1fr 70px; align-items: center; gap: 12px; min-height: 38px; padding: 0 8px; margin: 0 -8px; border-radius: 10px; text-align: left; font-size: 14.5px; }
.ov-r:hover { background: var(--bg); }
.ov-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-c { text-align: right; color: var(--text2); font-size: 13.5px; white-space: nowrap; }
.ov-r.done .ov-c { color: var(--good); font-weight: 600; }
.ov-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--accent-tint); border-radius: 15px; padding: 12px 12px 12px 16px; }
.ov-next b { display: block; font-size: 15px; }
.ov-next span { font-size: 13px; color: #7A4A2E; }
.ov-next.done { background: var(--good-bg); }
.ov-next.done span { color: var(--good); }
.ov-lower { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; margin-top: 18px; align-items: start; }
.ov-box { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 20px 22px; }
.ov-box h4 { margin: 0 0 6px; font-size: 16px; font-weight: 650; }
.ov-todo { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; border-top: 1px solid var(--line2); font-size: 15px; text-align: left; cursor: default; }
.ov-todo[data-act] { cursor: pointer; }
.ov-todo:first-of-type { border-top: 0; }
.ov-todo .c { width: 24px; height: 24px; border-radius: 12px; box-shadow: inset 0 0 0 2px #D0D0D6; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.ov-todo.ok .c { background: var(--good); box-shadow: none; }
.ov-todo .m { margin-left: auto; font-size: 13px; color: var(--text3); }
.ov-att { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 50px; padding: 6px 0; border-top: 1px solid var(--line2); text-align: left; }
.ov-att:first-of-type { border-top: 0; }
.ov-att-t { min-width: 0; }
.ov-att-t b { font-weight: 650; font-variant-numeric: tabular-nums; }
.ov-att-x { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-empty { padding: 6px 0 4px; }
.ov-foot { display: flex; justify-content: flex-end; margin-top: 22px; }

/* equipment list */
.list { width: 340px; }
.lh-say { font-size: 13.5px; color: var(--text2); line-height: 1.4; margin-top: -4px; }
.legend { display: flex; gap: 4px; flex-wrap: wrap; margin: -2px -6px 0; }
.lg-i { font-size: 13px; color: var(--text2); padding: 3px 6px; border-radius: 7px; white-space: nowrap; }
.lg-i:hover { background: var(--bg); }
.lg-i.on { background: var(--text); color: #fff; }
.lg-i.on b { color: #fff !important; }
.lg-i b { font-weight: 700; color: var(--text); }
.lg-i b.g { color: var(--good); } .lg-i b.r { color: var(--bad); } .lg-i b.a { color: var(--away); }
.lh-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 11px; background: var(--bg); color: var(--text3); }
.lh-search input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; font-size: 15px; height: 100%; color: var(--text); }
.lh-search:focus-within { box-shadow: inset 0 0 0 2px rgba(198,79,26,.4); }
.rows { padding: 0 0 24px; }
.lgrp { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--text3); padding: 12px 16px 5px; background: #FAFAFB; border-bottom: 1px solid var(--line2); }
.srow { border-radius: 0; min-height: 50px; padding: 0 16px; gap: 12px; justify-content: flex-start; border-bottom: 1px solid var(--line2); }
.srow .ic { width: 20px; height: 20px; border-radius: 10px; flex: none; box-shadow: inset 0 0 0 2px #CFCFD5; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 800; }
.srow .ic svg { width: 11px; height: 11px; }
.srow .ic.g { background: var(--good); box-shadow: none; } .srow .ic.r { background: var(--bad); box-shadow: none; } .srow .ic.a { background: var(--away); box-shadow: none; }
.srow .stx { margin-left: auto; font-size: 13px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48%; }
.srow .stx.r { color: var(--bad); } .srow .stx.a { color: var(--away); }

/* unit detail and checklist: scroll area + footer */
.detail.unit, .cl { padding: 0; gap: 0; overflow: hidden; display: flex; flex-direction: column; }
.dscroll { flex: 1; min-height: 0; overflow: auto; padding: 22px 28px 28px; }
.cl .dscroll { padding: 24px 32px 32px; }
.dfoot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 28px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.dfoot .nx { font-size: 14px; color: var(--text2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dfoot .nx b { color: var(--text); font-variant-numeric: tabular-nums; }
.btn.xl { height: 52px; padding: 0 22px 0 26px; font-size: 16.5px; border-radius: 14px; gap: 6px; }
.detail.unit .dhead { margin-bottom: 16px; }
.dpos { text-align: right; }
.blk { display: block; width: 100%; background: var(--card); border-radius: 17px; box-shadow: var(--shadow); padding: 15px 16px; margin-bottom: 12px; text-align: left; }
.q { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 650; margin-bottom: 10px; }
.q .num { width: 22px; height: 22px; border-radius: 11px; background: var(--text); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.q .num.ok { background: var(--good); }
.q .num svg { width: 12px; height: 12px; }
.q em { font-style: normal; font-weight: 500; font-size: 13px; color: var(--text3); margin-left: auto; text-align: right; }
.blk.off .tgrid { opacity: .45; }
.seg.where { background: none; padding: 0; gap: 6px; }
.seg.where button { background: var(--bg); border-radius: 11px; font-weight: 500; }
.seg.where button.on { box-shadow: none; color: #fff; font-weight: 650; }
.seg.where button.on.g { background: var(--good); }
.seg.where button.on.a { background: var(--away); }
.locrow { display: flex; align-items: center; gap: 10px; margin-top: 8px; height: 44px; padding: 0 12px; border-radius: 11px; background: var(--bg); color: var(--text2); }
.locrow:focus-within { box-shadow: inset 0 0 0 2px rgba(198,79,26,.4); }
.input.bare { flex: 1; min-width: 0; height: 100%; padding: 0; background: none; box-shadow: none !important; color: var(--text); }
.locrow .muted { white-space: nowrap; color: var(--text3); }
.tgrid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
.tgrid.one { grid-template-columns: 1fr; }
.tgrid .t { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; border-bottom: 1px solid var(--line2); font-size: 14.5px; }
.tgrid .yn button { min-width: 54px; }
.fbx { margin-top: 12px; padding: 13px 14px; border-radius: 13px; background: var(--bad-bg); display: flex; flex-direction: column; gap: 10px; }
.fbx .ttl { font-size: 14px; font-weight: 650; color: var(--bad); }
.fbx .opt { background: var(--card); box-shadow: none; }
.fbx .textarea { min-height: 64px; box-shadow: none; }
.blk .textarea.soft { min-height: 64px; margin-bottom: 10px; }
.addrow { display: flex; align-items: center; gap: 10px; color: var(--accent); font-weight: 600; font-size: 15px; }
.addrow .muted { margin-left: 4px; font-weight: 400; color: var(--text3); }
.faultbox.away { margin-bottom: 12px; }
.muted3 { color: var(--text3); }
.cl .clhead { margin-bottom: 12px; align-items: flex-end; }
.cl .clhead p { margin-top: 4px; font-size: 14.5px; }
.cl .clhead .eyebrow { font-size: 12px; }
.tasks { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.tasks .task { background: var(--card); border-radius: 15px; box-shadow: var(--shadow); border: 0; }
.tasks .task.fault { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--bad-line), var(--shadow); }
.ofn { background: var(--bg); border-radius: 10px; padding: 2px; gap: 2px; }
.ofn button { background: none; min-width: 56px; }
.ofn button:not(.on) { color: var(--text2); }
.task .fx .opts .opt { height: 34px; }

@media (max-width: 1100px) { .list { width: 300px; } .ov-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .list { width: auto; flex: none; }
  .detail.unit, .cl { overflow: visible; flex: none; }
  .dscroll { overflow: visible; padding: 16px; }
  .cl .dscroll { padding: 16px; }
  .dfoot { position: sticky; bottom: 0; padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .ov-lower { grid-template-columns: 1fr; }
  .ovw-page { padding: 20px 16px 48px; }
  .navitem.ovw { margin-bottom: 0; flex: 1 1 100%; }
  .navfoot { margin-top: 0; padding-top: 0; border-top: 0; }
  .lgrp { position: static; }
}
@media (max-width: 560px) {
  .tgrid { grid-template-columns: 1fr; }
  .ov-title { font-size: 28px; }
  .ov-grid { grid-template-columns: 1fr; }
  .ov-r { grid-template-columns: minmax(96px, 1fr) 70px 58px; }
  .dfoot .nx { display: none; }
  .dfoot .btn.xl { flex: 1; }
  .q em { display: none; }
  .seg.where { display: grid; grid-template-columns: 1fr 1fr; }
}
