@font-face { font-family: 'Outfit'; src: url(fonts/outfit-latin-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Oswald'; src: url(fonts/oswald-latin-wght-normal.woff2) format('woff2'); font-weight: 200 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
    --ink: #16202A; --ink-2: #3B4651; --ink-3: #6A747E; --ink-4: #98A0A8;
    --paper: #F3F0E9; --paper-2: #EAE6DC; --card: #FFFFFF; --line: #E1DCD0; --line-2: #D2CCBE;
    --heat: #E2602A; --heat-d: #C44E1D; --heat-s: #FCE6DA;
    --cool: #2C6E9B; --cool-l: #3B86BA; --cool-s: #DDEAF4;
    --ok: #2E7A52; --ok-s: #DCEFE3;
    --warn: #B97C06; --warn-s: #FBEFCF;
    --bad: #BE3B2A; --bad-s: #F9DFDA;
    --sans: 'Outfit', system-ui, sans-serif;
    --cond: 'Oswald', 'Arial Narrow', sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --r: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 400 15px/1.4 var(--sans); color: var(--ink); background: #0F161D; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2.5px solid var(--cool-l); outline-offset: 2px; border-radius: 6px; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.mono { font-family: var(--mono); font-size: .92em; }
.lbl { font: 500 11px/1.2 var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.lbl .ic { width: 14px; height: 14px; }
.lg-heat { fill: var(--heat); } .lg-cool { fill: var(--cool-l); }

/* ---------- stage (desktop presentation) ---------- */
.stage { position: fixed; inset: 0; background:
    radial-gradient(1200px 700px at 78% 40%, rgba(59, 134, 186, .16), transparent 60%),
    radial-gradient(800px 600px at 8% 90%, rgba(226, 96, 42, .14), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 32px),
    #0F161D; color: #E9EDF0; }
.stage-copy { position: absolute; left: clamp(28px, 4.2vw, 72px); top: 50%; transform: translateY(-50%); width: min(340px, 27vw); }
.stage-brand { display: flex; align-items: center; gap: 10px; font: 500 21px/1 var(--cond); letter-spacing: .02em; text-transform: uppercase; }
.stage-brand b { font-weight: 300; color: #9FB4C4; }
.stage-brand .logo { width: 34px; height: 34px; color: #fff; }
.stage-kicker { margin: 34px 0 10px; font: 500 12px/1 var(--cond); letter-spacing: .14em; text-transform: uppercase; color: var(--heat); }
.stage-title { margin: 0; font: 500 clamp(28px, 2.6vw, 38px)/1.08 var(--cond); letter-spacing: -.005em; text-transform: none; }
.stage-text { margin: 16px 0 0; color: #AEB9C2; font-size: 15.5px; line-height: 1.55; }
.stage-points { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 8px; }
.stage-points li { position: relative; padding-left: 22px; color: #D3DAE0; font-size: 14px; }
.stage-points li::before { content: ''; position: absolute; left: 2px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(90deg, var(--heat) 50%, var(--cool-l) 50%); }
.stage-link { display: inline-flex; gap: 6px; margin-top: 28px; color: #fff; font-weight: 500; text-decoration: none; padding: 10px 16px; border: 1px solid rgba(255,255,255,.22); border-radius: 99px; font-size: 14px; }
.stage-link:hover { border-color: var(--heat); background: rgba(226, 96, 42, .12); }
.ribbon { position: fixed; left: 18px; bottom: 16px; z-index: 50; font: 500 11px/1 var(--sans); letter-spacing: .04em; color: rgba(233, 237, 240, .75); text-decoration: none; padding: 6px 10px; border: 1px solid rgba(233, 237, 240, .22); border-radius: 99px; background: rgba(15, 22, 29, .5); }
.ribbon:hover { color: #fff; border-color: var(--heat); }

.device { position: fixed; top: 50%; right: clamp(28px, 3.6vw, 64px); transform: translateY(-50%); width: min(1040px, calc(100vw - 470px)); height: min(740px, calc(100vh - 56px)); padding: 14px; border-radius: 30px; background: #1C232A; box-shadow: 0 50px 100px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.07) inset, 0 0 0 3px #0B1015; }
.device-cam { position: absolute; left: 6px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: #3A444E; }
.device .app { border-radius: 18px; }

/* ---------- app shell ---------- */
.app { container: app / inline-size; position: relative; height: 100%; overflow: hidden; background: var(--paper); isolation: isolate; }
.shell { display: flex; height: 100%; }
.rail { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100%; }
#view { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
#view:focus { outline: none; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 10px; background: var(--paper); border-bottom: 1px solid var(--line); }
.top-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-logo .logo { width: 28px; height: 28px; display: block; }
.tt { display: flex; flex-direction: column; min-width: 0; }
.tt-k { font: 500 10.5px/1.2 var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-t { font: 500 19px/1.15 var(--cond); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.backbtn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); flex-shrink: 0; }
.view-job ~ * {}
.top-r { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.syncchip { display: none; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 99px; font-size: 12.5px; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); }
.syncchip .ic { width: 16px; height: 16px; color: var(--ok); }
.syncchip.off .ic { color: var(--warn); }
.syncchip.pulse .ic { animation: pulse .7s ease; }
@keyframes pulse { 40% { transform: scale(1.35); } }
.net { display: inline-flex; align-items: center; gap: 7px; padding: 5px 5px 5px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); background: var(--card); }
.net .knob { width: 30px; height: 18px; border-radius: 99px; background: var(--ok); position: relative; transition: background .2s; }
.net .knob::after { content: ''; position: absolute; top: 2px; left: 14px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.net.on .ic { color: var(--ok); }
.net.off { background: var(--warn-s); border-color: #EBD49A; }
.net.off .ic { color: var(--warn); }
.net.off .knob { background: var(--ink-4); }
.net.off .knob::after { left: 2px; }
.net-l { display: none; }

.netbar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; font-size: 13px; line-height: 1.3; }
.netbar[hidden] { display: none; }
.netbar.offline { background: var(--ink); color: #E8ECEF; }
.netbar.offline .ic { color: #F2B544; }
.netbar.offline b { color: #fff; font-weight: 600; }
.netbar > span:first-of-type { flex: 1; min-width: 0; }
.netbar button { flex-shrink: 0; font-size: 12.5px; font-weight: 600; color: #fff; padding: 5px 10px; border-radius: 99px; border: 1px solid rgba(255,255,255,.3); }
.netbar.syncing { background: var(--cool); color: #fff; }
.nb-bar { width: 70px; height: 6px; border-radius: 9px; background: rgba(255,255,255,.25); overflow: hidden; flex-shrink: 0; }
.nb-bar i { display: block; height: 100%; background: #fff; transition: width .4s; }
.nb-n { font-family: var(--mono); font-size: 12px; flex-shrink: 0; }
.rot { animation: rot 1.1s linear infinite; }
@keyframes rot { to { transform: rotate(-360deg); } }

.tabs { display: flex; border-top: 1px solid var(--line); background: var(--card); padding: 4px 6px calc(6px + env(safe-area-inset-bottom)); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 4px; font-size: 11.5px; font-weight: 500; color: var(--ink-3); position: relative; border-radius: 10px; }
.tab .ic { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"] .ic { color: var(--heat); }
.badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--heat); color: #fff; font: 600 11px/18px var(--sans); text-align: center; }
.badge.inline { position: static; display: inline-block; margin-left: 6px; vertical-align: 2px; }

/* ---------- common ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.card-h { margin: 0 0 10px; font: 500 13px/1.2 var(--cond); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.card-hrow { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-hrow .card-h { margin: 0; flex: 1; }
.sec-h { margin: 0 0 8px; font: 500 13px/1.2 var(--cond); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; line-height: 1.1; border: 1px solid transparent; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.small { padding: 7px 11px; font-size: 13px; }
.btn.big { padding: 13px 18px; font-size: 15px; }
.btn.primary { background: var(--heat); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--heat-d); }
.btn.primary:disabled { background: var(--line-2); color: var(--ink-3); }
.btn.ghost { background: var(--card); border-color: var(--line-2); color: var(--ink); }
.btn.ghost:hover { border-color: var(--ink-3); }
.btn .ic { width: 17px; height: 17px; }
.chip { display: inline-block; font: 500 10.5px/1 var(--cond); letter-spacing: .09em; text-transform: uppercase; padding: 4px 7px 3px; border-radius: 5px; }
.t-service { background: var(--cool-s); color: #1F557A; }
.t-repair { background: var(--heat-s); color: #A3401A; }
.t-install { background: #E6E0F2; color: #4E3E7C; }
.t-inspection { background: #E7EBDD; color: #4A5A2B; }
.jr-st { font-size: 12px; font-weight: 500; color: var(--ink-3); display: inline-flex; align-items: center; gap: 5px; }
.jr-st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }
.st-onsite { color: var(--heat-d); } .st-onsite::before { background: var(--heat); box-shadow: 0 0 0 3px var(--heat-s); }
.st-travel { color: var(--cool); } .st-travel::before { background: var(--cool); }
.st-done { color: var(--ok); } .st-done::before { background: var(--ok); }
.empty { color: var(--ink-3); font-size: 13.5px; padding: 10px 2px; list-style: none; }

/* ---------- today ---------- */
.today { padding: 12px 12px 18px; display: grid; gap: 12px; }
.daycard { background: var(--ink); color: #fff; border-radius: var(--r); padding: 14px; display: grid; gap: 12px; }
.dc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dc-stats div { display: flex; flex-direction: column; }
.dc-stats b { font: 500 22px/1 var(--cond); }
.dc-stats span { font-size: 11.5px; color: #9EABB6; margin-top: 3px; }
.dc-next { display: flex; align-items: center; gap: 10px; text-align: left; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 10px 12px; color: #fff; }
.dc-next:hover { background: rgba(255,255,255,.12); }
.dc-k { font: 500 10.5px/1 var(--cond); letter-spacing: .1em; text-transform: uppercase; color: #F49A6E; flex-shrink: 0; }
.dc-c { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-next.all { color: #BFE5CF; font-weight: 500; justify-content: flex-start; }

.mapcard { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #E9E4D6; }
.map { display: block; width: 100%; height: auto; aspect-ratio: 600 / 440; }
.m-land { fill: #ECE7DA; } .m-grid { stroke: rgba(22, 32, 42, .045); stroke-width: 1; }
.m-sea { fill: #CFDDE6; } .m-coast { fill: none; stroke: #B3C7D4; stroke-width: 2; }
.m-forest { fill-opacity: 1; } .m-pine { fill: #B9C6A6; }
.m-hill { fill: #E3DDCB; }
.m-river { fill: none; stroke: #A9C4D6; stroke-width: 3.5; stroke-linecap: round; }
.m-road { fill: none; stroke: #FFFFFF; stroke-width: 4; stroke-linecap: round; }
.m-road.big { stroke: #F7E6C7; stroke-width: 7; }
.m-lbl text { font: 500 11px var(--sans); fill: #6D7178; }
.m-lbl .m-town.big { font: 600 15px var(--cond); letter-spacing: .06em; text-transform: uppercase; fill: #3B4651; }
.m-lbl .m-small { font-size: 9.5px; }
.m-lbl .m-it { font-style: italic; fill: #7F8A6C; }
.m-lbl .m-riv { fill: #6F95AE; }
.m-lbl .m-sea-l { font: 500 10px var(--cond); letter-spacing: .3em; text-transform: uppercase; fill: #8EA9BB; }
.m-lbl .m-shield { font: 700 9px var(--mono); fill: #8A6A2E; }
.route-bg { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; opacity: .8; }
.leg { fill: none; stroke: var(--heat); stroke-width: 3; stroke-dasharray: 7 6; stroke-linecap: round; }
.leg.done { stroke: var(--ink); stroke-dasharray: none; }
.depot rect { fill: var(--ink); } .depot path { fill: #fff; }
.m-depot { font: 600 10px var(--cond); letter-spacing: .08em; text-transform: uppercase; fill: var(--ink-2); }
.pin { cursor: pointer; }
.pin-body { fill: var(--card); stroke: var(--ink); stroke-width: 2; transition: transform .15s; }
.pin-n { font: 600 12px var(--sans); text-anchor: middle; fill: var(--ink); }
.pin.onsite .pin-body { fill: var(--heat); stroke: #fff; }
.pin.onsite .pin-n { fill: #fff; }
.pin.done .pin-body { fill: var(--ok); stroke: #fff; }
.pin-ck { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pin.sel .pin-body, .pin.hov .pin-body { stroke-width: 3; }
.pin.hov, .pin:hover { filter: drop-shadow(0 3px 4px rgba(0,0,0,.25)); }
.pin-ring { fill: var(--heat); opacity: .25; transform-origin: 0 -14px; animation: ring 2s ease-out infinite; }
@keyframes ring { from { transform: translateY(-14px) scale(.6); opacity: .45; } to { transform: translateY(-14px) scale(1.6); opacity: 0; } }
.van circle:first-child { fill: var(--cool); stroke: #fff; stroke-width: 2.5; } .van-c { fill: #fff; }
.m-lbl text { paint-order: stroke; stroke: #ECE7DA; stroke-width: 3px; stroke-linejoin: round; }
.m-scale { position: absolute; right: 14px; bottom: 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; font: 500 10px var(--mono); color: #6D7178; }
.m-scale i { display: block; height: 6px; border: 1.5px solid #6D7178; border-top: 0; }
.m-north { position: absolute; right: 12px; top: 12px; width: 30px; height: 30px; }
.m-north svg { width: 100%; height: 100%; display: block; }
.m-north circle { fill: rgba(255,255,255,.85); stroke: #C9C2B1; } .m-north path { fill: var(--ink-2); }
.map-key { position: absolute; left: 10px; top: 10px; display: flex; gap: 10px; font-size: 11.5px; background: rgba(255,255,255,.88); padding: 6px 9px; border-radius: 8px; color: var(--ink-2); }
.map-key span { display: inline-flex; align-items: center; gap: 6px; }
.map-key i { width: 16px; height: 0; border-top: 3px dashed var(--heat); }
.map-key i.k-done { border-top-style: solid; border-color: var(--ink); }

.jobs { list-style: none; margin: 0; padding: 0; }
.leg-l { display: flex; align-items: center; gap: 8px; padding: 6px 0 6px 13px; font-size: 12px; color: var(--ink-3); }
.leg-l .ic { width: 15px; height: 15px; }
.leg-l::before { content: ''; position: absolute; }
.jobrow { width: 100%; display: grid; grid-template-columns: 30px 46px 1fr 18px; gap: 10px; align-items: start; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 10px 12px 12px; transition: border-color .15s, box-shadow .15s; }
.jobrow:hover { border-color: var(--line-2); box-shadow: 0 2px 10px rgba(22,32,42,.06); }
.jobrow.sel { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.jobrow.onsite { border-left: 4px solid var(--heat); padding-left: 9px; }
.jobrow.done { background: #F7F9F6; }
.jobrow.done .jr-c, .jobrow.done .jr-t { color: var(--ink-3); }
.jr-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; border: 2px solid var(--ink); }
.jobrow.onsite .jr-n { background: var(--heat); border-color: var(--heat); color: #fff; }
.jobrow.done .jr-n { background: var(--ok); border-color: var(--ok); color: #fff; }
.jr-n .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.jr-time { display: flex; flex-direction: column; font-family: var(--mono); font-size: 12px; color: var(--ink-3); padding-top: 2px; }
.jr-time b { font-size: 14px; color: var(--ink); font-weight: 600; }
.jr-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jr-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.jr-c { font-weight: 600; font-size: 15.5px; line-height: 1.25; }
.jr-t { font-size: 13.5px; color: var(--ink-2); }
.jr-a { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.jr-a .ic { width: 13px; height: 13px; }
.jr-go { color: var(--ink-4); align-self: center; }

/* ---------- job ---------- */
.jobwrap { padding: 12px 12px 0; }
.jobgrid { display: grid; gap: 12px; }
.col { display: grid; gap: 12px; align-content: start; }
.donebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--ok-s); color: #1E5638; border: 1px solid #BFDFCB; border-radius: var(--r); padding: 10px 12px; margin-bottom: 12px; font-size: 13.5px; }
.donebar > span { flex: 1; min-width: 180px; }
.donebar .btn { background: var(--ok); color: #fff; }
.jh-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jh-win { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.jh-win .ic { width: 14px; height: 14px; }
.jh-t { margin: 10px 0 4px; font: 500 22px/1.15 var(--cond); }
.jh-a { margin: 0; display: flex; gap: 6px; align-items: center; color: var(--ink-2); font-size: 14px; }
.jh-a .ic { width: 15px; height: 15px; color: var(--heat); }
.jh-who { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.jh-who b { display: block; font-weight: 600; margin-top: 2px; }
.jh-who .btn { text-decoration: none; font-family: var(--mono); font-weight: 500; font-size: 12.5px; }
.jh-note { margin: 12px 0 0; display: flex; gap: 8px; background: var(--warn-s); color: #6E4C05; padding: 9px 10px; border-radius: 9px; font-size: 13.5px; }
.jh-note .ic { width: 16px; height: 16px; color: var(--warn); margin-top: 1px; }
.equip dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px 12px; }
.equip dl .wide { grid-column: span 3; }
.equip dt { font: 500 10.5px/1.2 var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.equip dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; }
.tm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tm { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.tm b { display: block; margin-top: 4px; font: 500 22px/1 var(--mono); letter-spacing: -.02em; color: var(--ink-2); }
.tm.run { border-color: var(--heat); background: var(--heat-s); }
.tm.run b { color: var(--heat-d); }
.tm.run .lbl::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--heat); margin-left: auto; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.tm-btns { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tm-btns .btn { flex: 1; }
.prog { width: 90px; height: 7px; border-radius: 9px; background: var(--paper-2); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--ok); transition: width .3s; }
.prog-n { font: 500 12.5px var(--mono); color: var(--ink-2); }
.cklist, .ptlist { list-style: none; margin: 0; padding: 0; }
.ck { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.ck:first-child { border-top: 0; padding-top: 2px; }
.ck-box { flex: 1; display: flex; gap: 11px; text-align: left; align-items: flex-start; padding: 4px 2px; border-radius: 8px; min-width: 0; }
.ck-b { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line-2); display: grid; place-items: center; flex-shrink: 0; transition: background .15s, border-color .15s; background: #fff; }
.ck-b .ic { width: 15px; height: 15px; stroke-width: 2.8; color: #fff; opacity: 0; }
.ck.on .ck-b { background: var(--ok); border-color: var(--ok); }
.ck.on .ck-b .ic { opacity: 1; }
.ck-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ck-l { font-size: 14.5px; line-height: 1.3; }
.ck.on .ck-l { color: var(--ink-2); }
.ck-r { font: 500 11.5px/1.3 var(--mono); color: var(--cool); }
.ph { width: 72px; height: 54px; flex-shrink: 0; border-radius: 8px; border: 1.5px dashed var(--line-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink-3); font-size: 11px; font-weight: 500; overflow: hidden; background: var(--paper); }
.ph:hover:not(:disabled) { border-color: var(--heat); color: var(--heat-d); }
.ph.has { border: 0; padding: 0; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.ph .photo { width: 100%; height: 100%; display: block; }
.part { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.part:first-child { border-top: 0; padding-top: 2px; }
.pt-sku { font: 600 11.5px var(--mono); color: var(--cool); background: var(--cool-s); padding: 3px 6px; border-radius: 5px; }
.pt-n { font-size: 14px; min-width: 0; }
.pt-q { font: 600 14px var(--mono); }
.pt-x { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-3); }
.pt-x:hover { background: var(--bad-s); color: var(--bad); }
.pt-x .ic { width: 15px; height: 15px; }
textarea { width: 100%; resize: vertical; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; background: var(--paper); font-size: 14px; }
textarea:focus { outline: 2px solid var(--cool-l); outline-offset: 0; border-color: transparent; }
.jobfoot { position: sticky; bottom: 0; margin: 12px -12px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: rgba(243, 240, 233, .94); border-top: 1px solid var(--line); backdrop-filter: blur(6px); }
.jf-hint { font-size: 13px; color: var(--ink-3); }
.jobfoot .btn { flex-shrink: 0; }

/* ---------- stock ---------- */
.stock { padding: 12px 12px 18px; display: grid; gap: 12px; align-content: start; }
.stockhead { background: var(--ink); color: #fff; border-radius: var(--r); padding: 14px; display: grid; gap: 14px; }
.sh-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sh-stats div { display: flex; flex-direction: column; }
.sh-stats b { font: 500 22px/1 var(--cond); }
.sh-stats span { font-size: 11.5px; color: #9EABB6; margin-top: 3px; }
.sh-stats .warn b { color: #F6B25A; }
.sh-btns { display: flex; gap: 8px; }
.sh-btns .btn { flex: 1; }
.sh-btns .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.28); }
.infobar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--cool-s); color: #1F4E70; border-radius: 10px; padding: 9px 12px; font-size: 13.5px; }
.infobar > span:first-of-type { flex: 1; }
.ib-st { font-size: 12px; font-weight: 600; }
.usedline { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.usedline .ic { width: 15px; height: 15px; color: var(--heat); }
.slist { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.srow, .crow { display: grid; grid-template-columns: 34px 1fr auto; grid-template-areas: "bin main q" "bin lvl st"; gap: 4px 10px; align-items: center; padding: 11px 12px; border-top: 1px solid var(--line); }
.srow:first-child, .crow:first-child { border-top: 0; }
.s-bin { grid-area: bin; align-self: start; font: 600 12px var(--mono); color: var(--ink-2); background: var(--paper-2); border-radius: 6px; padding: 5px 0; text-align: center; }
.s-main { grid-area: main; display: flex; flex-direction: column; min-width: 0; }
.s-n { font-size: 14.5px; font-weight: 500; line-height: 1.25; }
.s-sku { font: 500 11.5px/1.4 var(--mono); color: var(--ink-3); }
.s-sku em { font-style: normal; color: var(--heat-d); }
.s-lvl { grid-area: lvl; display: flex; align-items: center; gap: 8px; }
.lvl { position: relative; width: 90px; height: 6px; border-radius: 9px; background: var(--paper-2); }
.lvl i { display: block; height: 100%; border-radius: 9px; background: var(--ok); }
.lvl b { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--ink-3); }
.s-mm { font-size: 11.5px; color: var(--ink-3); }
.s-q { grid-area: q; font: 500 24px/1 var(--cond); text-align: right; }
.s-st { grid-area: st; font-size: 11.5px; font-weight: 600; text-align: right; color: var(--ok); }
.srow.min .lvl i { background: var(--warn); } .srow.min .s-st { color: var(--warn); }
.srow.low, .srow.out { background: #FFF8F3; }
.srow.low .lvl i, .srow.out .lvl i { background: var(--bad); } .srow.low .s-st, .srow.out .s-st { color: var(--bad); } .srow.low .s-q { color: var(--bad); }

.counthead { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.counthead p { margin: 0; font-size: 13.5px; color: var(--ink-2); max-width: 520px; }
.crow { grid-template-columns: 34px 1fr auto auto; grid-template-areas: "bin main d step"; }
.c-d { grid-area: d; }
.c-d b { font: 600 13px var(--mono); padding: 4px 7px; border-radius: 6px; background: var(--warn); color: #fff; }
.crow .stepper { grid-area: step; }
.crow.diff { background: var(--warn-s); box-shadow: inset 4px 0 0 var(--warn); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; overflow: hidden; }
.stepper button { width: 38px; height: 38px; display: grid; place-items: center; color: var(--ink); }
.stepper button:hover:not(:disabled) { background: var(--paper); }
.stepper button:disabled { color: var(--line-2); }
.stepper output { min-width: 32px; text-align: center; font: 600 16px var(--mono); }
.countfoot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; margin: 0 -12px -18px; background: rgba(243, 240, 233, .95); border-top: 1px solid var(--line); backdrop-filter: blur(6px); }
.cf-s { font-size: 13.5px; color: var(--ink-2); }

/* ---------- sync ---------- */
.syncv { padding: 12px 12px 18px; display: grid; gap: 12px; align-content: start; max-width: 760px; }
.syncstate { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ss-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ok-s); color: var(--ok); }
.syncstate.off .ss-ic { background: var(--warn-s); color: var(--warn); }
.ss-ic .ic { width: 24px; height: 24px; }
.ss-t { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.ss-t span { font-size: 13.5px; color: var(--ink-2); }
.qlist { list-style: none; margin: 0; padding: 0; }
.qi { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; animation: in .3s ease; }
.qi:first-child { border-top: 0; }
.qi .ic { width: 16px; height: 16px; }
.qi.ok .ic { color: var(--ok); } .qi.wait .ic { color: var(--warn); }
.qi-t { font: 500 11.5px var(--mono); color: var(--ink-3); }
@keyframes in { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- sheets ---------- */
.scrim { position: absolute; inset: 0; background: rgba(15, 22, 29, .45); opacity: 0; transition: opacity .22s; z-index: 20; }
.scrim.open { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 94%; overflow-y: auto; background: var(--paper); border-radius: 18px 18px 0 0; padding: 0 16px 16px; z-index: 21; transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 -10px 40px rgba(0,0,0,.2); }
.sheet.open { transform: none; }
.sh-h { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 0 12px; background: var(--paper); }
.sh-k { font: 500 10.5px/1.2 var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.sh-h h2 { margin: 2px 0 0; font: 500 21px/1.15 var(--cond); }
.iconbtn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); flex-shrink: 0; }
.sh-p { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); }
.sh-foot { position: sticky; bottom: -16px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 0 16px; margin-bottom: -16px; background: var(--paper); border-top: 1px solid var(--line); margin-top: 14px; }

.viewfinder { position: relative; border-radius: 14px; overflow: hidden; background: #0C1115; aspect-ratio: 4 / 3; max-height: 46vh; width: 100%; margin: 0 auto; }
.vf-img, .vf-scene { position: absolute; inset: 0; display: grid; place-items: center; }
.vf-img .photo { width: 100%; height: 100%; filter: saturate(.9) brightness(.92); }
.vf-grid { position: absolute; inset: 0; background: linear-gradient(90deg, transparent calc(33.3% - .5px), rgba(255,255,255,.3) 33.3%, transparent calc(33.3% + .5px), transparent calc(66.6% - .5px), rgba(255,255,255,.3) 66.6%, transparent calc(66.6% + .5px)), linear-gradient(0deg, transparent calc(33.3% - .5px), rgba(255,255,255,.3) 33.3%, transparent calc(33.3% + .5px), transparent calc(66.6% - .5px), rgba(255,255,255,.3) 66.6%, transparent calc(66.6% + .5px)); }
.vf-focus { position: absolute; left: 50%; top: 50%; width: 70px; height: 70px; margin: -35px 0 0 -35px; border: 1.5px solid #F2C14E; border-radius: 4px; animation: focus 1.4s ease 1; }
@keyframes focus { 0% { transform: scale(1.4); opacity: 0; } 30% { opacity: 1; } 60% { transform: scale(.92); } 100% { transform: scale(1); } }
.vf-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.vf-flash.go { animation: flash .38s ease; }
@keyframes flash { 10% { opacity: .95; } 100% { opacity: 0; } }
.cam-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 16px 0 4px; }
.cam-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.cam-meta.r { justify-content: flex-end; text-align: right; }
.cam-meta .ic { width: 14px; height: 14px; }
.shutter { width: 66px; height: 66px; border-radius: 50%; border: 4px solid var(--ink); display: grid; place-items: center; }
.shutter i { width: 50px; height: 50px; border-radius: 50%; background: var(--heat); transition: transform .1s; }
.shutter:active i { transform: scale(.88); }

.vf-scene { background: radial-gradient(circle at 50% 45%, #4A4F52, #1E2326 70%); }
.partbox { width: 62%; max-width: 300px; filter: drop-shadow(0 18px 20px rgba(0,0,0,.45)); }
.vf-frame { position: absolute; left: 22%; right: 22%; top: 24%; bottom: 24%; }
.vf-frame i { position: absolute; width: 26px; height: 26px; border: 3px solid #fff; transition: border-color .2s; }
.vf-frame i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.vf-frame i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.vf-frame i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.vf-frame i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.vf-laser { position: absolute; left: 20%; right: 20%; top: 50%; height: 2px; background: #FF4B2B; box-shadow: 0 0 12px 2px rgba(255, 75, 43, .75); animation: laser 1.1s ease-in-out infinite alternate; }
@keyframes laser { from { transform: translateY(-58px); } to { transform: translateY(58px); } }
.vf-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); font-size: 12.5px; color: #fff; background: rgba(0,0,0,.55); padding: 5px 11px; border-radius: 99px; white-space: nowrap; font-family: var(--sans); }
.viewfinder.hit .vf-laser { display: none; }
.viewfinder.hit .vf-frame i { border-color: #43D68B; }
.viewfinder.hit .vf-hint { background: #1F8A55; font-family: var(--mono); letter-spacing: .06em; }
.viewfinder.hit .vf-frame { animation: lock .3s ease; }
@keyframes lock { 50% { transform: scale(.94); } }
.scanres { min-height: 150px; padding-top: 14px; }
.sr-wait { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 14px; padding: 12px 2px; }
.sr-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 4px; animation: in .25s ease; }
.sr-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.sr-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-size: 13px; font-weight: 600; }
.sr-ok .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.sr-bin { font: 600 12px var(--mono); background: var(--paper-2); padding: 4px 8px; border-radius: 6px; }
.sr-n { font-size: 17px; font-weight: 600; }
.sr-sku { font: 500 12px var(--mono); color: var(--ink-3); }
.sr-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.sr-row .btn.primary { margin-left: auto; }

.signsum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.signsum b { display: block; font-size: 14px; font-weight: 600; margin-top: 3px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-top: 14px; }
.field input { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; background: #fff; font-size: 15px; }
.sigpad { position: relative; margin-top: 12px; height: 190px; border-radius: var(--r); background: #fff; border: 1px solid var(--line-2); overflow: hidden; }
#sig { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; z-index: 1; }
.sig-line { position: absolute; left: 34px; right: 20px; bottom: 44px; border-bottom: 1.5px solid var(--line-2); }
.sig-x { position: absolute; left: 16px; bottom: 44px; font-size: 18px; color: var(--ink-4); }
.sig-ph { position: absolute; left: 0; right: 0; top: 42%; text-align: center; font: 500 13px var(--cond); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-4); pointer-events: none; transition: opacity .2s; }
.sig-ph.gone { opacity: 0; }
.sig-legal { font-size: 12px; color: var(--ink-3); margin: 10px 0 0; }

.reportsheet { background: var(--paper-2); }
.reportsheet .sh-h, .reportsheet .sh-foot { background: var(--paper-2); }
.paper { background: #fff; border-radius: 4px; box-shadow: 0 2px 12px rgba(22,32,42,.12); padding: 22px 20px; font-size: 13px; color: #1E2830; }
.pp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 14px; border-bottom: 3px solid var(--ink); flex-wrap: wrap; }
.pp-brand { display: flex; gap: 10px; align-items: center; }
.pp-brand .logo { width: 34px; height: 34px; flex-shrink: 0; }
.pp-brand b { display: block; font: 600 16px var(--cond); letter-spacing: .04em; text-transform: uppercase; }
.pp-brand span { font-size: 11px; color: var(--ink-3); }
.pp-no { text-align: right; display: flex; flex-direction: column; font-size: 11px; color: var(--ink-3); }
.pp-no b { font: 600 15px var(--mono); color: var(--ink); }
.pp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pp-grid div { display: flex; flex-direction: column; gap: 2px; }
.pp-grid b { font-weight: 600; }
.pp-grid span:not(.lbl) { font-size: 12px; color: var(--ink-2); }
.paper h4 { margin: 14px 0 6px; font: 500 11.5px var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.pp-checks { list-style: none; margin: 0; padding: 0; columns: 2 220px; column-gap: 18px; }
.pp-checks li { display: flex; gap: 6px; padding: 3px 0; break-inside: avoid; }
.pp-checks .ic { width: 14px; height: 14px; color: var(--ok); stroke-width: 2.6; margin-top: 2px; }
.pp-checks em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--cool); }
.pp-t { width: 100%; border-collapse: collapse; }
.pp-t td { padding: 5px 0; border-bottom: 1px solid var(--line); }
.pp-t td.mono { color: var(--cool); width: 90px; }
.pp-t td.r { text-align: right; font-family: var(--mono); }
.pp-p { margin: 0; line-height: 1.5; }
.pp-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.pp-photos figure { margin: 0; }
.pp-photos .photo { width: 100%; height: auto; aspect-ratio: 4 / 3; display: block; border-radius: 3px; }
.pp-photos figcaption { font-size: 10.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.3; }
.pp-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pp-sig { display: flex; flex-direction: column; }
.pp-sig img { width: 200px; height: 70px; object-fit: contain; object-position: left center; border-bottom: 1px solid var(--ink-3); }
.pp-sig span { font-size: 11.5px; color: var(--ink-2); margin-top: 4px; }
.pp-next { text-align: right; }
.pp-next .lbl { justify-content: flex-end; }
.pp-next b { font-size: 14px; }
.rp-st { margin-right: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.rp-st .ic { width: 15px; height: 15px; color: var(--ok); }

.rqlist { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.rqlist li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 11px 12px; border-top: 1px solid var(--line); }
.rqlist li:first-child { border-top: 0; }
.rqlist li.empty { display: block; }
.rqlist li { grid-template-areas: "bin main step"; }
.rqlist .stepper { grid-area: step; }
.rq-extra { margin-top: 12px; }
.rq-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chipbtn { display: inline-flex; align-items: center; gap: 4px; font: 500 12px var(--mono); padding: 6px 9px; border-radius: 8px; border: 1px dashed var(--line-2); background: #fff; }
.chipbtn .ic { width: 13px; height: 13px; }
.chipbtn:hover { border-color: var(--heat); color: var(--heat-d); }
.rq-del { border: 0; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.rq-del legend { margin-bottom: 6px; }
.rq-del label { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.rq-del label:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.rq-del input { accent-color: var(--heat); margin-top: 3px; }
.rq-del span { display: flex; flex-direction: column; }
.rq-del em { font-style: normal; font-size: 12.5px; color: var(--ink-3); }
.rq-tot { margin-right: auto; font-size: 13px; color: var(--ink-2); }
.rq-done { text-align: center; padding: 18px 10px 6px; }
.rq-ic { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; }
.rq-ic .ic { width: 28px; height: 28px; stroke-width: 2.6; }
.rq-done b { font: 600 18px var(--mono); }
.rq-done p { margin: 8px auto 0; max-width: 360px; color: var(--ink-2); font-size: 14px; }
.rq-done .rq-when { font-weight: 600; color: var(--ink); }

.toast { position: absolute; left: 50%; bottom: 84px; width: max-content; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; z-index: 40; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.toast .ic { width: 16px; height: 16px; color: #7FD9A6; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- tablet layout (container) ---------- */
@container app (min-width: 680px) {
    .rail { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 84px; flex-shrink: 0; background: var(--ink); padding: 16px 0 14px; }
    .rail-logo { margin-bottom: 14px; }
    .rail-logo .logo { width: 36px; height: 36px; display: block; }
    .rail-btn { position: relative; width: 70px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0 8px; border-radius: 12px; color: #93A1AD; font-size: 11.5px; font-weight: 500; }
    .rail-btn .ic { width: 22px; height: 22px; }
    .rail-btn:hover { color: #fff; background: rgba(255,255,255,.05); }
    .rail-btn[aria-current="page"] { color: #fff; background: rgba(255,255,255,.1); }
    .rail-btn[aria-current="page"] .ic { color: #F48A58; }
    .rail-btn .badge { top: 4px; left: auto; right: 10px; }
    .rail-gap { flex: 1; }
    .rail-me { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--heat), var(--cool)); color: #fff; font-weight: 600; font-size: 14px; }
    .tabs { display: none; }
    .top-logo { display: none; }
    .top { padding: 14px 20px 12px; }
    .tt-t { font-size: 22px; }
    .syncchip { display: inline-flex; }
    .net-l { display: inline; }
    .netbar { padding: 9px 20px; }
    .toast { bottom: 24px; }

    .view-today { overflow: hidden !important; }
    .today { height: 100%; padding: 16px 20px 16px; grid-template-columns: minmax(330px, 370px) 1fr; grid-template-rows: auto 1fr; grid-template-areas: "day map" "list map"; gap: 14px 16px; min-height: 0; }
    .daycard { grid-area: day; }
    .mapcard { grid-area: map; min-height: 0; display: flex; }
    .map { height: 100%; width: 100%; aspect-ratio: auto; }
    .joblist { grid-area: list; overflow-y: auto; min-height: 0; margin-right: -8px; padding-right: 8px; scrollbar-width: thin; }
    .jobrow { padding: 11px 10px 11px 11px; }
    .jr-c { font-size: 15px; }
    .map-key { left: 12px; top: 12px; }

    .jobwrap { padding: 16px 20px 0; }
    .jobgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; align-items: start; }
    .col { gap: 14px; }
    .jobfoot { margin: 14px -20px 0; padding: 12px 20px; }

    .stock { padding: 16px 20px 18px; }
    .stockhead { grid-template-columns: 1fr auto; align-items: center; }
    .sh-stats { grid-template-columns: repeat(4, auto); gap: 28px; justify-content: start; }
    .sh-btns .btn { flex: 0 0 auto; }
    .srow { grid-template-columns: 44px minmax(0, 1fr) 190px 60px 84px; grid-template-areas: "bin main lvl q st"; padding: 10px 16px; }
    .s-bin { align-self: center; }
    .crow { grid-template-columns: 44px minmax(0, 1fr) 60px auto; padding: 8px 16px; }
    .countfoot { margin: 0 -20px -18px; padding: 12px 20px; }
    .syncv { padding: 16px 20px; }

    .sheet { left: 50%; top: 50%; bottom: auto; right: auto; width: min(620px, calc(100% - 48px)); max-height: calc(100% - 40px); border-radius: 18px; transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .2s; padding: 0 22px 18px; }
    .sheet.open { transform: translate(-50%, -50%); opacity: 1; }
    .sh-foot { bottom: -18px; margin-bottom: -18px; padding-bottom: 18px; }
    .reportsheet { width: min(700px, calc(100% - 48px)); }
    .scansheet, .camsheet { width: min(560px, calc(100% - 48px)); }
    .sigpad { height: 210px; }
}
@container app (min-width: 980px) {
    .today { grid-template-columns: 380px 1fr; }
}

/* ---------- viewport presentation ---------- */
@media (max-width: 1239px) {
    .stage-copy { display: none; }
    .device { right: auto; left: 50%; transform: translate(-50%, -50%); width: min(1040px, calc(100vw - 48px)); height: min(760px, calc(100vh - 48px)); }
}
@media (max-width: 759px) {
    body { background: var(--paper); }
    .toast { bottom: auto; top: 10px; transform: translate(-50%, -20px); }
    .toast.show { transform: translate(-50%, 0); }
    .stage { background: none; pointer-events: none; z-index: 60; }
    .ribbon { pointer-events: auto; left: auto; right: 0; top: 58%; bottom: auto; transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl; border-radius: 0 6px 6px 0; padding: 8px 3px; font-size: 9px; background: rgba(22, 32, 42, .6); color: rgba(255,255,255,.92); border: 0; }
    .device { position: static; transform: none; width: auto; height: 100dvh; padding: 0; border-radius: 0; background: none; box-shadow: none; }
    .device-cam { display: none; }
    .device .app { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .vf-laser { display: none; }
}
