/* Field forms: T&M sheets and change orders. Builds on the time clock's tc.css. */
.home-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.home-actions .btn { padding: 1.1rem .6rem; font-size: 1.05rem; display: flex; flex-direction: column; gap: .25rem; align-items: center; }
.home-actions .btn small { font-weight: 500; font-size: .78rem; opacity: .8; }
.btn.dark { background: #16191d; color: #fff; border-color: #16191d; }
.formlist { list-style: none; margin: 0; padding: 0; }
.formlist li { border-top: 1px solid var(--line); }
.formlist li:first-child { border-top: 0; }
.formlist button { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; gap: .7rem; align-items: center; padding: .75rem .2rem; }
.formlist button:focus-visible { outline: 2px solid var(--info); border-radius: 8px; }
.formlist .ft { flex: none; width: 3.1rem; text-align: center; font-weight: 800; font-size: .8rem; padding: .35rem 0; border-radius: 8px; background: var(--bg); }
.formlist .ft.co { color: var(--info); }
.formlist .fx { flex: 1; min-width: 0; }
.formlist .fx b, .formlist .fx small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.formlist .fx small { color: var(--muted); font-size: .82rem; }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; margin: .2rem 0 .6rem; }
.filters button { font: inherit; font-size: .85rem; font-weight: 700; padding: .4rem .8rem; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; }
.filters button.on { background: var(--ink); color: var(--card); border-color: var(--ink); }

.page-head { display: flex; align-items: center; gap: .6rem; }
.page-head h2 { flex: 1; font-size: 1.25rem; }
.sect { margin-top: .3rem; }
.sect h3 { display: flex; justify-content: space-between; align-items: baseline; }
.sect h3 small { color: var(--muted); font-weight: 600; font-size: .8rem; }

/* line-item rows (labor, material, equipment) */
.lines { display: flex; flex-direction: column; gap: .5rem; }
.line { display: grid; gap: .4rem; align-items: end; padding: .6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); position: relative; }
.line.labor { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr) 4.4rem 4.4rem; }
.line.mat { grid-template-columns: 4.6rem 4.8rem minmax(0, 1fr); }
.line.eq { grid-template-columns: minmax(0, 1fr) 5.2rem; }
.line label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.line input, .line select { padding: .55rem .5rem; }
.line input[type=number] { text-align: right; font-variant-numeric: tabular-nums; }
.line .rm { position: absolute; top: -9px; right: -9px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.addline { margin-top: .5rem; }
.totals { display: flex; justify-content: flex-end; gap: 1.2rem; font-size: .9rem; color: var(--muted); margin-top: .4rem; font-variant-numeric: tabular-nums; }
.totals b { color: var(--ink); }
@media (max-width: 460px) {
  .line.labor { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .line.labor label.hr { grid-column: span 1; }
}

.sticky-bar { position: sticky; bottom: 0; z-index: 4; background: linear-gradient(transparent, var(--bg) 30%); padding: 1rem 0 calc(.6rem + env(safe-area-inset-bottom)); display: flex; gap: .6rem; }
.sticky-bar .btn { flex: 1; }

/* signature */
.sign-summary { font-size: .92rem; }
.sign-summary dt { font-weight: 700; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; margin-top: .55rem; }
.sign-summary dd { margin: .1rem 0 0; white-space: pre-wrap; }
.sigbox { -webkit-user-select: none; user-select: none; position: relative; border: 2px dashed var(--line); border-radius: 12px; background: #fff; touch-action: none; height: 190px; margin-top: .3rem; }
.sigbox canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 10px; cursor: crosshair; }
.sigbox .sigline { position: absolute; left: 16px; right: 16px; bottom: 42px; border-bottom: 1px solid #b5bcc4; pointer-events: none; }
.sigbox .sigx { position: absolute; left: 18px; bottom: 46px; color: #9aa4ae; font-weight: 700; pointer-events: none; }
.sigbox .sighint { position: absolute; inset: auto 0 12px; text-align: center; color: #9aa4ae; font-size: .8rem; pointer-events: none; }
.sigbox.done .sighint { display: none; }
.signed-block { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.signed-block img { height: 70px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.locked { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); border-radius: 12px; padding: .7rem .9rem; font-weight: 600; }
.view dl { margin: 0; }
.view dt { font-weight: 700; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; margin-top: .7rem; }
.view dd { margin: .15rem 0 0; white-space: pre-wrap; }
.mini { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: .3rem; }
.mini th, .mini td { padding: .4rem .3rem; border-bottom: 1px solid var(--line); text-align: left; }
.mini th { font-size: .72rem; color: var(--muted); text-transform: uppercase; }
.mini td.n, .mini th.n { text-align: right; font-variant-numeric: tabular-nums; }
.office-box { border: 2px solid var(--info); }
.line input, .line select { font-size: 16px; }
.kind-opts { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.kind-opt { display: flex; gap: .55rem; align-items: flex-start; padding: .75rem; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--card); }
.kind-opt input { width: 22px; height: 22px; flex: none; margin: 0; }
.kind-opt b { display: block; } .kind-opt small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.kind-opt:has(input:checked) { border-color: var(--ink); }
@media (max-width: 400px) { .kind-opts { grid-template-columns: 1fr; } }
.formlist .kc { color: var(--info); font-weight: 700; } .formlist .kp { color: var(--warn); font-weight: 700; }
.kind-opts.reasons { grid-template-columns: 1fr; margin-bottom: .2rem; }

/* ---- Plan & photo markups ---- */
.home-actions .wide-btn { grid-column: 1 / -1; }
.photo-btns { display: flex; gap: .5rem; }
.photo-btns .btn { flex: 1; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; margin-top: .6rem; }
.mk-card { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: .2rem; border: 1px solid var(--line); border-radius: 10px; padding: .4rem; background: var(--card); }
.mk-card:focus-visible { outline: 2px solid var(--info); }
.mk-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: #ccc; }
.mk-card b { font-size: .9rem; line-height: 1.2; }
.mk-card small { font-size: .75rem; color: var(--muted); }
.mk-wrap { position: fixed; inset: 0; display: flex; flex-direction: column; background: #2b3036; z-index: 20; }
.mk-top { display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; padding-top: max(.5rem, env(safe-area-inset-top)); background: var(--card); color: var(--ink); }
.mk-top b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.mk-top .btn { width: auto; }
#mk-canvas { flex: 1; width: 100%; min-height: 0; touch-action: none; display: block; }
.mk-bar { background: var(--card); padding: .4rem .5rem; padding-bottom: max(.4rem, env(safe-area-inset-bottom)); }
.mk-tools { display: flex; gap: .3rem; overflow-x: auto; padding: .15rem 0; align-items: center; }
.mk-tools button { flex: none; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; padding: .5rem .65rem; font: inherit; font-size: .88rem; font-weight: 600; }
.mk-tools button.on { background: var(--ink); color: var(--card); border-color: var(--ink); }
.mk-tools .sw { width: 34px; height: 34px; padding: 0; border-radius: 50%; background: var(--c); border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.mk-tools .sw.on { background: var(--c); box-shadow: 0 0 0 3px var(--ink); }
.mk-tools .sep { width: 1px; height: 24px; background: var(--line); margin: 0 .2rem; flex: none; }
.mk-hint { margin: .2rem 0 0; font-size: .72rem; color: var(--muted); }

/* ---- Job breakdowns ---- */
.job-card { all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; background: var(--card); border-radius: var(--radius); padding: 1rem; margin-bottom: .8rem; box-shadow: var(--shadow); border: 1px solid var(--line); }
.job-card:focus-visible { outline: 2px solid var(--info); }
.hbar { margin: .7rem 0; }
.hbar-top { display: flex; justify-content: space-between; gap: .5rem; font-size: .9rem; }
.hbar-top span { color: var(--muted); font-variant-numeric: tabular-nums; }
.hbar-track { height: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; margin: .3rem 0 .2rem; }
.hbar-fill { height: 100%; background: var(--go); border-radius: 7px 0 0 7px; }
.hbar.near .hbar-fill { background: var(--warn); }
.hbar.over .hbar-fill { background: var(--stop); }
.hbar small { color: var(--muted); font-size: .78rem; }
.hbar.over small b { color: var(--stop); }
.bid-sum { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .6rem; }
.bid-sum > div, .scope-grid > div { display: flex; flex-direction: column; gap: .1rem; background: var(--bg); border-radius: 10px; padding: .55rem .65rem; }
.bid-sum small, .scope-grid small { color: var(--muted); font-size: .72rem; font-weight: 600; }
.bid-sum span, .scope-grid span { font-size: .8rem; color: var(--muted); }
.scope { border-top: 1px solid var(--line); padding: .75rem 0; }
.scope-top { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.scope-top input { width: 24px; height: 24px; flex: none; margin-top: .05rem; accent-color: var(--go); }
.scope-top small.done-by { display: block; color: var(--go); font-weight: 600; font-size: .78rem; }
.scope.is-done .scope-top b, .scope.is-done .scope-top span { text-decoration-color: var(--muted); }
.scope.is-done .scope-grid { opacity: .55; }
.scope-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .5rem 0 0 2.1rem; }
.ptable { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.ptable th, .ptable td { text-align: right; padding: .35rem .3rem; border-bottom: 1px solid var(--line); }
.ptable th:first-child, .ptable td:first-child { text-align: left; }
.ptable th { font-size: .75rem; color: var(--muted); }
.mini-list { max-height: 30vh; overflow: auto; padding-left: 1.1rem; font-size: .85rem; margin: .4rem 0 .8rem; }
@media (max-width: 380px) { .scope-grid { grid-template-columns: 1fr; } }
.md { color: var(--muted); font-weight: 500; }
.hbar small { display: block; }
.ptable .md { font-size: .72rem; }
.sbox .crew-line { color: var(--ink); font-size: .85rem; margin-top: .15rem; }
.sbox .crew-line b { font-weight: 700; }
.crew-list { list-style: none; padding: 0; margin: .25rem 0 0; font-size: .78rem; color: var(--muted); }
.crew-list li { padding: .1rem 0; border-top: 1px dashed var(--line); }
.crew-list em { font-style: normal; display: block; font-size: .72rem; }

/* ---- Other field forms ---- */
.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .4rem; }
.doc-btn { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: .15rem; padding: .7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.doc-btn:focus-visible { outline: 2px solid var(--info); }
.doc-btn b { font-size: .95rem; line-height: 1.2; }
.doc-btn small { font-size: .74rem; color: var(--muted); line-height: 1.25; }
.doc-btn .ft { align-self: flex-start; font-weight: 800; font-size: .7rem; padding: .15rem .4rem; border-radius: 6px; background: var(--card); border: 1px solid var(--line); }
.formlist .ft.dt { color: var(--warn); }
.dgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .7rem; }
.dgrid .dfield:has(textarea) { grid-column: 1 / -1; }
.dfield[hidden] { display: none; }
small.opt { font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; font-size: .72rem; }
.dlines { display: flex; flex-direction: column; gap: .7rem; margin-bottom: .6rem; }
.dline { display: grid; gap: .4rem; align-items: end; padding: .6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); position: relative; }
.dline label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.dline input, .dline select { padding: .55rem .45rem; font-size: 16px; min-width: 0; }
.dline .rm { position: absolute; top: -9px; right: -9px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; }
@media (max-width: 480px) { .dline { grid-template-columns: 1fr 1fr !important; } .dline label:last-of-type { grid-column: 1 / -1; } .dgrid { grid-template-columns: 1fr; } }
.cgroup { margin-top: .9rem; }
.cgroup h4 { margin: 0 0 .3rem; font-size: .85rem; }
.citem { display: grid; grid-template-columns: 1fr auto; gap: .35rem .6rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--line); }
.citem .ctext { font-size: .92rem; }
.citem .cfix { grid-column: 1 / -1; border-color: var(--stop); }
.citem.is-no .ctext { color: var(--stop); font-weight: 600; }
.yn { display: flex; gap: .25rem; }
.yn label { position: relative; cursor: pointer; }
.yn input { position: absolute; opacity: 0; inset: 0; }
.yn span { display: block; min-width: 2.6rem; text-align: center; padding: .45rem .35rem; border: 1.5px solid var(--line); border-radius: 8px; font-weight: 700; font-size: .82rem; background: var(--card); }
.yn input:checked + span { background: var(--ink); color: var(--card); border-color: var(--ink); }
.yn input[value="No"]:checked + span { background: var(--stop); border-color: var(--stop); color: #fff; }
.yn input:focus-visible + span { outline: 2px solid var(--info); }
@media (max-width: 420px) { .citem { grid-template-columns: 1fr; } }
.crew-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.crew-pick label { display: flex; gap: .5rem; align-items: center; padding: .55rem .6rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--card); }
.crew-pick input { width: 20px; height: 20px; accent-color: var(--go); flex: none; }
.crew-pick label:has(input:checked) { border-color: var(--go); }
.sigslot { display: flex; gap: .7rem; align-items: center; padding: .65rem 0; border-top: 1px solid var(--line); }
.sigslot > div { flex: 1; display: flex; flex-direction: column; }
.sigslot img { height: 40px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 2px; }
.sigslot .btn { width: auto; }
.ok-txt { color: var(--go); font-weight: 600; font-size: .78rem; }
.link.danger { color: var(--stop); align-self: center; }

/* ---- Job cost (office) ---- */
.jobcost .contract { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .6rem 0; }
.jobcost .contract.ohp { grid-template-columns: 1fr 1fr; }
.jobcost .contract > div { background: var(--bg); border-radius: 10px; padding: .55rem .6rem; display: flex; flex-direction: column; gap: .1rem; }
.jobcost .contract small { font-size: .7rem; color: var(--muted); font-weight: 600; }
.jobcost .contract b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.jobcost .contract span { font-size: .75rem; color: var(--muted); }
.jobcost .neg { color: var(--stop); }
.ctable { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
.ctable th { font-size: .7rem; color: var(--muted); text-align: right; padding: .3rem .25rem; }
.ctable td { padding: .45rem .25rem; border-top: 1px solid var(--line); text-align: right; vertical-align: top; }
.ctable td:first-child, .ctable th:first-child { text-align: left; }
.ctable td:first-child small { display: block; color: var(--muted); font-size: .72rem; }
.ctable tr.tot td { font-weight: 800; border-top: 2px solid var(--ink); }
.cbar { height: 5px; background: var(--bg); border-radius: 3px; margin-top: .3rem; overflow: hidden; max-width: 9rem; }
.cbar i { display: block; height: 100%; background: var(--go); }
.cbar.near i { background: var(--warn); }
.cbar.over i { background: var(--stop); }
.feed { list-style: none; padding: 0; margin: .4rem 0 0; font-size: .86rem; }
.feed li { display: grid; grid-template-columns: 3.4rem 1fr auto auto; gap: .5rem; align-items: center; padding: .4rem 0; border-top: 1px solid var(--line); }
.feed .fk { font-size: .68rem; font-weight: 800; text-align: center; background: var(--bg); border-radius: 6px; padding: .15rem 0; }
.feed small { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.feed .link { color: var(--muted); font-size: 1rem; padding: 0 .2rem; }
details.split { margin: .6rem 0; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; }
details.split summary, #rates-box summary { cursor: pointer; font-weight: 600; }
input.wage { width: 6.5rem; text-align: right; padding: .45rem .5rem; }
table.budget td.n { text-align: right; }
@media (max-width: 420px) { .jobcost .contract { grid-template-columns: 1fr 1fr; } }
.card-cost { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .4rem; padding-top: .6rem; border-top: 1px solid var(--line); font-size: .85rem; font-variant-numeric: tabular-nums; }
.card-cost .neg { color: var(--stop); }
.card-cost .tap { flex-basis: 100%; color: var(--info); font-weight: 600; font-size: .8rem; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; margin-top: .6rem; }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
.kpi { background: var(--bg); border-radius: 10px; padding: .55rem .6rem; display: flex; flex-direction: column; gap: .1rem; border-left: 4px solid var(--line); }
.kpi small { font-size: .68rem; font-weight: 700; color: var(--muted); }
.kpi b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .72rem; color: var(--muted); line-height: 1.3; }
.kpi.ok { border-left-color: var(--go); }
.kpi.warn { border-left-color: var(--warn); }
.kpi.bad { border-left-color: var(--stop); }
.kpi.bad b { color: var(--stop); }
.kbar { display: block; height: 4px; background: var(--card); border-radius: 2px; margin-top: .3rem; overflow: hidden; }
.kbar em { display: block; height: 100%; background: var(--ink); }
.kpi.ok .kbar em { background: var(--go); } .kpi.warn .kbar em { background: var(--warn); } .kpi.bad .kbar em { background: var(--stop); }
.kpi-alert { margin: .5rem 0 0; font-size: .8rem; font-weight: 600; color: var(--stop); }
.job-card .tap { display: block; margin-top: .5rem; color: var(--info); font-weight: 600; font-size: .8rem; }
.mk-grid-tools { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; }
.mk-grid-tools button { padding: .55rem .2rem; }
.mk-lbl { font-size: .75rem; font-weight: 700; color: var(--muted); margin-right: .2rem; }
.mk-tools [data-size] { min-width: 2.6rem; }

/* ---- Job folders ---- */
.job-info dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem .8rem; margin: 0; font-size: .9rem; }
.job-info dt { color: var(--muted); font-weight: 600; }
.job-info dd { margin: 0; }
.mini-stats { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .6rem; font-size: .85rem; color: var(--muted); }
.mini-stats b { color: var(--ink); }
.folders { display: flex; flex-direction: column; gap: .45rem; }
.folder { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: .7rem; padding: .75rem .85rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.folder:focus-visible { outline: 2px solid var(--info); }
.folder.on { border-color: var(--ink); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.folder .fic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; color: var(--fc); background: color-mix(in srgb, var(--fc) 13%, white); }
.folder .fic svg { width: 22px; height: 22px; }
.folder .fx { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.folder .fx b { font-size: .95rem; }
.folder .fx small { font-size: .75rem; color: var(--muted); }
.folder .fcount { min-width: 1.8rem; text-align: center; font-weight: 800; font-size: .8rem; background: var(--bg); border-radius: 999px; padding: .15rem .4rem; }
.fbody { margin-top: -.45rem; padding: .7rem; background: var(--card); border: 1px solid var(--ink); border-top: 0; border-radius: 0 0 12px 12px; }
.fbody .formlist li { display: flex; align-items: center; }
.fbody .formlist li > button[data-jf] { flex: 1; min-width: 0; }
.fbody .rmf { width: auto; flex: none; border: 0; background: transparent; color: var(--muted); font-size: 1.3rem; cursor: pointer; padding: .3rem .5rem; }
.fbody label.btn { margin-top: .6rem; }

/* ---- Office ---- */
.office-btn { background: var(--ink) !important; color: var(--card) !important; }
.office-grid { display: grid; grid-template-columns: 1fr; gap: .6rem; }
@media (min-width: 640px) { .office-grid { grid-template-columns: 1fr 1fr; } }
.office-tile { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: .25rem; padding: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.office-tile:focus-visible { outline: 2px solid var(--info); }
.office-tile b { font-size: 1.05rem; }
.office-tile small { color: var(--muted); font-size: .82rem; }
.office-tile.off { cursor: default; opacity: .55; box-shadow: none; }
.office-tile .soon { font-size: .7rem; font-weight: 700; color: var(--muted); margin-top: .3rem; }
.office-tile .ostat { font-size: .85rem; font-variant-numeric: tabular-nums; }
.kind-opts.two { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .7rem; }
.cor-bar .btn { flex: 1; }
.center-row { justify-content: center; margin-top: .4rem; }
.hist { list-style: none; padding: 0; margin: 0; font-size: .85rem; }
.hist li { padding: .4rem 0; border-top: 1px solid var(--line); }
.rmsrc { margin-left: auto; color: var(--muted); font-size: 1.2rem; padding: 0 .4rem; cursor: pointer; }
.neg { color: var(--stop); }
.subs { display: grid; grid-template-columns: 1fr; gap: .3rem; margin-bottom: .6rem; }
@media (min-width: 560px) { .subs { grid-template-columns: 1fr 1fr; } }
.sub { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: .4rem; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; background: var(--bg); }
.sub b { font-size: .75rem; color: var(--muted); }
.sub i { margin-left: auto; font-style: normal; font-weight: 800; font-size: .75rem; }
.sub.on { border-color: var(--ink); background: var(--card); font-weight: 600; }
.sub:focus-visible { outline: 2px solid var(--info); }
.subh { margin: .4rem 0; font-size: .95rem; }
.setlbl { margin: .6rem 0 .1rem; font-size: .75rem; font-weight: 800; color: var(--muted); }
.sov { display: flex; flex-direction: column; }
.sovrow { display: grid; grid-template-columns: 1fr 5rem 5.5rem; gap: .5rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--line); }
.sovrow.co { background: color-mix(in srgb, var(--info) 6%, transparent); }
.sovrow .sd { font-size: .88rem; min-width: 0; }
.sovrow .sd small { display: block; color: var(--muted); font-size: .74rem; }
.sovrow .sp { display: flex; align-items: center; gap: .2rem; }
.sovrow .sp input { width: 100%; text-align: right; padding: .45rem .4rem; font-size: 16px; }
.sovrow .sa { text-align: right; font-variant-numeric: tabular-nums; font-size: .88rem; font-weight: 700; }
.sovrow .sa small { display: block; font-weight: 400; color: var(--muted); font-size: .7rem; }
.info-card { background: color-mix(in srgb, var(--info) 10%, var(--card)); color: var(--ink); }
.waivers { margin: 0; padding-left: 1.1rem; font-size: .9rem; }
.waivers li { margin: .3rem 0; }
details.colog { margin: .6rem 0; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; }
details.colog summary { cursor: pointer; }
/* waivers + billing record */
.waivers { list-style: none; padding: 0; margin: 0; }
.waivers li.wv { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--line, #ddd); }
.waivers li.wv.done b::after { content: ' ✓'; color: #2e7d32; }
.tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -.2rem; }
table.rec { min-width: 620px; font-size: .86rem; }
table.rec th { text-align: left; font-size: .76rem; white-space: nowrap; }
table.rec td { vertical-align: top; }
table.rec tr[data-pa] { cursor: pointer; }
table.rec tr.rej td { opacity: .55; text-decoration: line-through; }
table.rec tr.rej td:nth-child(3) { text-decoration: none; }
table.rec tr.empty td { color: #888; }
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card[open] > summary { margin-bottom: .5rem; }
ul.flags { list-style: none; padding: 0; margin: 0 0 .8rem; }
ul.flags li { padding: .45rem .6rem; border-radius: 8px; margin-bottom: .3rem; background: #f3f5f7; font-size: .92rem; }
ul.flags li.warn { background: #fff4dc; }
ul.flags li.bad { background: #fde7e5; color: #8a1c12; }
.kpi.bad b { color: #b3261e; }
.ostat.neg { color: #b3261e; }
.ostat.warn { color: #8a5a00; }
/* office dashboard + job hub */
select.yr { width: auto; padding: .3rem .5rem; }
ul.flags.tap li { cursor: pointer; display: flex; justify-content: space-between; gap: .5rem; }
.go-arrow { color: #999; font-weight: 700; }
ul.joblist { list-style: none; margin: 0; padding: 0; }
ul.joblist li button { width: 100%; display: flex; align-items: center; gap: .6rem; text-align: left; background: none; border: 0; border-bottom: 1px solid #e6e6e6; padding: .7rem .1rem; font: inherit; color: inherit; cursor: pointer; }
ul.joblist .fx { flex: 1; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
ul.joblist .kbar { display: block; height: 5px; background: #e8eaed; border-radius: 3px; overflow: hidden; }
ul.joblist .kbar em { display: block; height: 100%; background: #2e7d32; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; }
.tool-grid button { text-align: left; padding: .7rem; border: 1px solid #ddd; border-radius: 10px; background: #fff; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: .2rem; }
.tool-grid button:disabled { opacity: .5; cursor: default; }
.tool-grid small, .jobnav small { color: #666; font-size: .78rem; }
nav.jobnav { display: flex; gap: .45rem; overflow-x: auto; padding: .1rem 0 .8rem; -webkit-overflow-scrolling: touch; }
nav.jobnav button { flex: 0 0 auto; text-align: left; padding: .55rem .75rem; border: 1px solid #ddd; border-radius: 10px; background: #fff; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: .1rem; }

/* billing folder */
.bsum { border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; margin-bottom: .8rem; background: #fafbfc; }
.bsum-k { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .5rem 0; font-size: .85rem; color: var(--muted); }
.bsum-k b { color: var(--ink); margin-left: .2rem; }
.bsum-k .neg b { color: #b3261e; }
li.parow { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.fbody .formlist li.parow > button[data-jf] { flex: 1 1 18rem; }
.paq { display: flex; gap: .3rem; padding: 0 .3rem .4rem 0; }
table.rec tr[data-pa] { cursor: pointer; }

/* desktop: office and job pages use the width */
@media (min-width: 900px) {
  .wrap.wide { padding: 1.25rem 1.5rem; }
  .wrap.wide .kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  main.office-dash { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  main.office-dash > .page-head, main.office-dash > .full { grid-column: 1 / -1; }
  .wrap.wide .tool-grid { grid-template-columns: repeat(6, 1fr); }
  .wrap.wide .folders .fbody { padding: 1rem 1.2rem; }
  .wrap.wide .subs { grid-template-columns: repeat(4, 1fr); }
  .wrap.wide .sov .sovrow { grid-template-columns: 1fr 9rem 9rem; }
  .wrap.wide table.rec { font-size: .92rem; }
  .wrap.wide .office-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1200px) { .wrap.wide .scope-grid { grid-template-columns: 1fr 1fr; } }
.paq .btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: .3rem .65rem; width: auto; font-weight: 600; font-size: .82rem; cursor: pointer; }
.paq .btn:hover { border-color: var(--ink); }
li.parow > button:first-child { min-width: 0; width: auto; }
@media (max-width: 700px) { .fbody .formlist li.parow > button[data-jf] { flex: 1 1 100%; } li.parow .paq { padding: 0 0 .6rem 3.2rem; } }
/* project % complete */
.pbar { display: block; height: 8px; background: #e8eaed; border-radius: 5px; overflow: hidden; }
.pbar em { display: block; height: 100%; background: var(--go, #2e7d32); border-radius: 5px; transition: width .2s; }
.pbar.big { height: 14px; margin-top: .35rem; }
.pbar.billed em { background: #2f6fb0; }
.pstatus { margin: .2rem 0 .6rem; }
.dualbar { display: flex; flex-direction: column; gap: 3px; }
.dualbar .pbar { height: 5px; }
.warn-t { color: #8a5a00; } .ok-t { color: #2e7d32; }
.pctrow { display: flex; align-items: center; gap: .5rem; margin: .5rem 0 .3rem; }
.pstep { all: unset; box-sizing: border-box; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; font-size: 1.3rem; font-weight: 700; cursor: pointer; background: #fff; flex: none; }
.pstep:disabled { opacity: .35; cursor: default; }
.pctmid { flex: 1; min-width: 0; }
.pticks { display: grid; grid-template-columns: repeat(11, 1fr); margin-top: 2px; }
.pticks button { all: unset; cursor: pointer; text-align: center; font-size: .66rem; color: var(--muted); height: 18px; border-left: 1px solid #ddd; }
.pticks button:first-child { border-left: 0; }
.pticks button.on { color: var(--ink); font-weight: 800; }
.pval { width: 3rem; text-align: right; font-size: 1rem; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-top: .6rem; }
.tabs button { all: unset; box-sizing: border-box; cursor: pointer; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; font-size: .92rem; }
.tabs button small { display: block; font-weight: 400; font-size: .74rem; color: var(--muted); }
.tabs button.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.tabs button.on small { color: #ddd; }
.formlist .fx small.ctl { white-space: normal; color: var(--ink); font-size: .8rem; margin-top: .1rem; }
tr.added td { color: #2e7d32; font-size: .85rem; }
.docgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
@media (min-width: 900px) { .docgrid { grid-template-columns: repeat(4, 1fr); } }
.docgrid .btn { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: .7rem .8rem; text-align: left; height: auto; }
.docgrid .btn small { font-weight: 400; font-size: .76rem; opacity: .8; }
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; margin-bottom: .4rem; }
.seg3 label { position: relative; }
.seg3 input { position: absolute; opacity: 0; }
.seg3 span { display: block; text-align: center; padding: .55rem .3rem; border: 1px solid var(--line); border-radius: 9px; font-weight: 600; font-size: .86rem; cursor: pointer; }
.seg3 input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg3 input:focus-visible + span { outline: 2px solid #2f6fb0; }
.contract.oh2 { margin-top: .5rem; }
@media (min-width: 700px) { .contract.oh2 { grid-template-columns: repeat(3, 1fr); } }

.totals-thin { padding-top: .7rem; padding-bottom: .5rem; }
.tt-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-bottom: .5rem; }
.tt-head h3 { margin: 0; }
.tt-head .filters { margin: 0; }
.kpis.slim .kpi { padding: .45rem .6rem; }
.kpis.slim .kpi b { font-size: 1.05rem; }
.kpis.slim .kpi span { font-size: .72rem; }
details.howfig summary { cursor: pointer; font-size: .78rem; color: var(--muted); margin-top: .35rem; }
ul.flags.tap li { align-items: center; }
ul.flags .attbtn { flex: none; white-space: nowrap; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .3rem .6rem; font-weight: 700; font-size: .8rem; cursor: pointer; }
ul.flags li.bad .attbtn { border-color: #e5a29b; }
/* one row of job tabs */
nav.jobtabs { display: flex; gap: .35rem; overflow-x: auto; padding: .1rem 0 .8rem; -webkit-overflow-scrolling: touch; align-items: stretch; }
nav.jobtabs > button { flex: 0 0 auto; text-align: left; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: .05rem; }
nav.jobtabs > button small { color: var(--muted); font-size: .72rem; }
nav.jobtabs > button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
nav.jobtabs > button.on small { color: #ddd; }
.jt-more { position: relative; flex: none; }
.jt-more summary { list-style: none; cursor: pointer; height: 100%; min-height: 44px; display: grid; place-items: center; padding: 0 .9rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 800; font-size: 1.2rem; }
.jt-more summary::-webkit-details-marker { display: none; }
.jt-more[open] > div { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.12); padding: .3rem; min-width: 12rem; }
.jt-more[open] > div button { all: unset; box-sizing: border-box; display: block; width: 100%; padding: .6rem .7rem; cursor: pointer; border-radius: 8px; font-weight: 600; }
.jt-more[open] > div button:hover { background: #f3f5f7; }
nav.jobtabs > button.jt-dots { font-weight: 800; font-size: 1.2rem; padding: .5rem .9rem; justify-content: center; }
.fgroup + .fgroup { margin-top: .9rem; }
.fgroup h4 { margin: 0 0 .4rem; font-size: .8rem; color: var(--muted); font-weight: 700; }
/* COR status strip */
.corstrip { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .55rem .7rem; margin-bottom: .8rem; }
.corstrip > i { color: #bbb; font-style: normal; font-weight: 700; }
.corstrip .cs { display: flex; flex-direction: column; padding: .3rem .55rem; border-radius: 8px; background: #f3f5f7; min-width: 5.5rem; }
.corstrip .cs b { font-size: .82rem; }
.corstrip .cs small { font-size: .72rem; color: var(--muted); }
.corstrip .cs.done { background: #e6f3e8; } .corstrip .cs.done b::before { content: '✓ '; color: #2e7d32; }
.corstrip .cs.now { background: #fff4dc; outline: 2px solid #e8b44c; }
.corstrip .cs.skip { opacity: .55; }
.corstrip .cs-next { margin-left: auto; display: flex; align-items: center; gap: .4rem; }
@media (max-width: 700px) { .corstrip .cs-next { margin-left: 0; width: 100%; } .corstrip .cs { min-width: 0; } }
table.pl tr.pl-row { cursor: pointer; }
table.pl tr.pl-row.open td:first-child span { display: inline-block; transform: rotate(90deg); }
table.pl tr.pl-detail td { background: #fafbfc; }
.pl-parts { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: .82rem; color: var(--muted); }
.pl-parts b { color: var(--ink); }
table.pl { min-width: 0; }
@media (max-width: 700px) { table.pl .hide-sm { display: none; } }
/* time off + schedule */
.seg3.seg2 { grid-template-columns: 1fr 1fr; }
.sbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.sbar .filters { margin: 0; }
h4.swk { margin: .8rem 0 .4rem; font-size: .85rem; color: var(--muted); }
.sgrid { display: grid; grid-template-columns: 1fr; gap: .4rem; }
@media (min-width: 900px) { .sgrid { grid-template-columns: repeat(6, 1fr); } }
.sday { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .45rem; min-height: 5.5rem; display: flex; flex-direction: column; gap: .3rem; }
.sday.today { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.sday.past { opacity: .6; }
.sdh { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; }
.sadd { all: unset; cursor: pointer; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-weight: 800; border: 1px solid var(--line); }
.sadd:hover { border-color: var(--ink); }
.sitem { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: .05rem; padding: .35rem .45rem; border-radius: 7px; border-left: 4px solid var(--ac); background: color-mix(in srgb, var(--ac) 9%, white); font-size: .8rem; }
.sitem b { font-size: .82rem; line-height: 1.2; }
.sitem small { color: var(--muted); font-size: .72rem; line-height: 1.25; }
.sitem small.crew { color: var(--ink); }
.sitem i { font-style: normal; font-size: .66rem; color: var(--ac); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.soff { font-size: .74rem; padding: .2rem .45rem; border-radius: 6px; background: #f3f5f7; color: var(--muted); }
.sempty { text-align: center; }
.crewpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .3rem; margin-bottom: .5rem; }
.crewpick label { display: flex; align-items: center; gap: .4rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; cursor: pointer; }
.crewpick input:checked + span { font-weight: 700; }
h4.pk-h { margin: .8rem 0 .4rem; font-size: .82rem; color: var(--muted); }
.pk-list { display: flex; flex-direction: column; gap: .3rem; }
.pk-list button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: .4rem; align-items: baseline; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 9px; font-size: .88rem; }
.pk-list button small { margin-left: auto; color: var(--muted); font-size: .75rem; }
.pk-list button:hover { border-color: var(--ink); }

/* ---------- Job overview ---------- */
.ov-open { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; text-align: left; margin-bottom: .8rem; padding: .8rem 1rem; }
.ov-open small { font-weight: 400; opacity: .85; }
.ov-hero { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; border-top: 4px solid #2e7d32; }
.ov-id { flex: 1 1 320px; min-width: 0; }
.ov-id h3 { margin: 0 0 .2rem; font-size: 1.35rem; }
.ov-money { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.ov-money span { background: #f3f5f7; border-radius: 8px; padding: .35rem .6rem; font-size: .82rem; color: #4a5058; display: flex; flex-direction: column; }
.ov-money span b { font-size: 1rem; color: #16191d; }
.ov-money span.neg b, .ov-money b.neg { color: #b3261e; }
.ok-t { color: #2e7d32 !important; } .warn-t { color: #b26a00 !important; font-weight: 700; }
.ov-donuts { display: flex; gap: 1rem; flex-wrap: wrap; }
.donut { display: flex; flex-direction: column; align-items: center; width: 104px; text-align: center; }
.donut svg { width: 92px; height: 92px; }
.donut circle:last-of-type { transition: stroke-dasharray .6s ease; }
.donut b { font-size: .85rem; } .donut small { font-size: .72rem; color: #6b7280; }
.ov-grid { display: grid; grid-template-columns: 1fr; gap: .9rem; }
.ov-grid > .card { margin: 0; }
.ov > .card, .ov > .ov-grid { margin-bottom: .9rem; }
@media (min-width: 900px) { .ov-grid { grid-template-columns: 1.4fr 1fr; } }
.ov-todo .flags li { cursor: pointer; }
.ovh { display: grid; grid-template-columns: minmax(7.5rem, auto) 1fr; gap: .15rem .6rem; align-items: center; margin: .45rem 0; font-size: .88rem; }
.ovh span:not(.ovbar) { text-align: right; color: #4a5058; }
.ovh .ovbar { grid-column: 1 / -1; }
.ovbar { display: block; height: 10px; background: #e8eaed; border-radius: 6px; overflow: hidden; }
.ovbar em { display: block; height: 100%; background: #2f6fb0; border-radius: 6px; }
.ovbar.near em { background: #c4842b; } .ovbar.over em { background: #b3261e; }
.ovbar.billed em { background: #6a4fa3; } .ovbar.paid em { background: #2e7d32; }
.ovpeople { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .6rem; }
.ovpeople span { background: #f3f5f7; border-radius: 20px; padding: .2rem .55rem; font-size: .8rem; }
.ovsc td.ovdone { min-width: 140px; } .ovsc td.ovdone .pbar { display: inline-block; width: 90px; vertical-align: middle; margin-right: .4rem; }
.ovpipe { display: flex; align-items: stretch; gap: .25rem; overflow-x: auto; padding-bottom: .3rem; }
.ovpipe .ps { flex: 1 0 118px; background: #f3f5f7; border-radius: 10px; padding: .55rem .6rem; display: flex; flex-direction: column; gap: .1rem; border-top: 4px solid #cfd4da; }
.ovpipe .ps.has { border-top-color: #2f6fb0; background: #eef4fb; }
.ovpipe .ps.review { border-top-color: #c4842b; background: #fdf4e7; }
.ovpipe .ps b { font-size: .8rem; } .ovpipe .ps i { font-style: normal; font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.ovpipe .ps small { font-size: .72rem; color: #4a5058; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ovpipe .parr { align-self: center; color: #9aa1a9; font-size: 1.2rem; }
.ovsd-more { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .6rem 0 .2rem; font-size: .85rem; color: #4a5058; }
.ovrfi { list-style: none; padding: 0; margin: .5rem 0; }
.ovrfi li { padding: .4rem 0; border-top: 1px solid #eceef1; font-size: .88rem; }
.ovrfi li[data-cor] { cursor: pointer; }
.ovbill { display: flex; align-items: flex-end; gap: .35rem; height: 110px; padding: .3rem 0; border-bottom: 1px solid #e3e6ea; margin-bottom: .4rem; overflow-x: auto; }
.ovbill .bcol { flex: 0 0 34px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .15rem; }
.ovbill .bcol i { display: block; width: 22px; background: #6a4fa3; border-radius: 4px 4px 0 0; }
.ovbill .bcol small { font-size: .65rem; color: #6b7280; }
.ovco { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.ovco > div { background: #f3f5f7; border-radius: 8px; padding: .45rem .55rem; display: flex; flex-direction: column; }
.ovco > div.warn { background: #fdf4e7; } .ovco > div.ok { background: #e9f4ea; }
.ovco b { font-size: 1.3rem; } .ovco span { font-size: .8rem; color: #4a5058; }
.ovcost { display: grid; grid-template-columns: 1fr; gap: 0 1.2rem; }
@media (min-width: 900px) { .ovcost { grid-template-columns: 1fr 1fr; } }
.ovact { list-style: none; padding: 0; margin: .3rem 0 .6rem; }
.ovact li { display: grid; grid-template-columns: 5.5rem 1fr; gap: .5rem; padding: .3rem 0; border-top: 1px solid #eceef1; font-size: .85rem; }
.ovact li > small { color: #6b7280; }
@media (prefers-reduced-motion: reduce) { .donut circle:last-of-type { transition: none; } }
.ovkeys { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; margin: .3rem 0 .6rem; }
@media (min-width: 700px) { .ovkeys { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .ovkeys { grid-template-columns: repeat(6, 1fr); } }
.ovkeys > div { background: #f3f5f7; border-radius: 8px; padding: .5rem .65rem; display: flex; flex-direction: column; border-left: 4px solid #6a4fa3; }
.ovkeys > div.bad { background: #fdecea; border-left-color: #b3261e; } .ovkeys > div.bad b { color: #b3261e; }
.ovkeys small { font-size: .75rem; color: #4a5058; } .ovkeys b { font-size: 1.15rem; } .ovkeys span { font-size: .74rem; color: #6b7280; }
.ovpa tbody tr { cursor: pointer; } .ovpa tbody tr:hover { background: #f6f7f9; }
.ovpa tr.rej td { color: #9aa1a9; } .ovpa tr.rej b { color: #9aa1a9; }
.ovpa td { vertical-align: top; }
a.brand { color: inherit; text-decoration: none; }
/* Crew task plan */
.tbid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-top: .6rem; }
@media (min-width: 800px) { .tbid { grid-template-columns: repeat(6, 1fr); } }
.tbid > div { background: #eef4fb; border-radius: 8px; padding: .45rem .6rem; display: flex; flex-direction: column; }
.tbid small { font-size: .74rem; color: #4a5058; } .tbid b { font-size: 1.2rem; }
.tbid-l { margin: .6rem 0 0; padding-left: 1.1rem; font-size: .88rem; }
.ticks .tgroup { margin-bottom: .5rem; } .ticks h4 { margin: .4rem 0 .25rem; font-size: .85rem; }
.ticks .textra { display: inline-flex; gap: .3rem; margin: .2rem .5rem 0 0; font-size: .88rem; }
/* Job setup from award files */
.suslots { display: grid; grid-template-columns: 1fr; gap: .45rem; margin-top: .7rem; }
@media (min-width: 700px) { .suslots { grid-template-columns: 1fr 1fr; } }
.suslot { display: flex; flex-direction: column; gap: .1rem; border: 2px dashed #cfd4da; border-radius: 10px; padding: .6rem .75rem; cursor: pointer; background: #fafbfc; }
.suslot.has { border-style: solid; border-color: #2e7d32; background: #eef7ef; }
.suslot.bad { border-color: #b3261e; background: #fdecea; }
.suslot span { font-size: .88rem; word-break: break-all; } .suslot small { font-size: .74rem; color: #6b7280; }
.sufound { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; }
.sufound li.ok { color: #2e7d32; font-weight: 600; } .sufound li.miss { color: #8a6d00; } .sufound li small { color: #6b7280; font-weight: 400; }
.sutab input { width: 100%; min-width: 3.5rem; padding: .3rem .35rem; font-size: .85rem; }
.sutab td:nth-child(2) input { min-width: 12rem; }
.sudet { margin-top: .6rem; } .sudet ul { max-height: 260px; overflow: auto; }
.ovscope { display: grid; grid-template-columns: 1fr; gap: .2rem 1.2rem; }
@media (min-width: 900px) { .ovscope { grid-template-columns: 1fr 1fr; } }
.ovscope h4 { margin: .5rem 0 .2rem; font-size: .9rem; } .ovscope ul { margin: 0; padding-left: 1.1rem; font-size: .86rem; }
li.lh { list-style: none; margin-left: -1rem; margin-top: .3rem; }
.sutab td:first-child input { min-width: 5.6rem; } .sutab td:nth-child(5) input { min-width: 6rem; }
.gcgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .7rem; }
.gcgrid .wide2 { grid-column: 1 / -1; }
@media (min-width: 800px) { .gcgrid { grid-template-columns: 1fr 1fr 1fr; } .gcgrid .wide2 { grid-column: span 3; } }
.ov-contacts { margin: .3rem 0 0; font-size: .9rem; } .ov-contacts .dot { margin: 0 .45rem; color: #9aa1a9; }
.ov-contacts a, .job-info a { color: #2f6fb0; }
/* Shop drawings */
.wrap-gap { flex-wrap: wrap; gap: .5rem; }
.sdpkg h3 { font-size: 1.1rem; }
.sdtl { margin: .7rem 0; padding-left: 1.2rem; font-size: .9rem; } .sdtl li { margin: .3rem 0; } .sdtl li.rel { color: #2e7d32; }
.sdh { margin: 1rem 0 .3rem; font-size: .92rem; }
.sdall { margin-top: .7rem; font-size: .9rem; }
li.sdf { display: flex; align-items: center; gap: .5rem; } li.sdf .sdf-open { flex: 1; } li.sdf > .btn { margin-right: .4rem; flex: none; }
.sdu-files { list-style: none; padding: 0; margin: .5rem 0; } .sdu-files li { display: flex; gap: .5rem; align-items: center; padding: .3rem 0; border-top: 1px solid #eceef1; font-size: .85rem; }
.sdu-files li span { flex: 1; word-break: break-all; } .sdu-files select { width: auto; max-width: 48%; }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; } .chips .chip { cursor: pointer; border: 0; }
.formlist li.sdf > button.btn { width: auto !important; flex: 0 0 auto; padding: .45rem .9rem; margin: 0 .5rem 0 0; }
.sdtiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; margin-bottom: .7rem; }
@media (min-width: 800px) { .sdtiles { grid-template-columns: repeat(5, 1fr); } }
.sdtiles > div { background: #f3f5f7; border-radius: 8px; padding: .5rem .65rem; display: flex; flex-direction: column; border-left: 4px solid #cfd4da; }
.sdtiles > div.warn { background: #fdf4e7; border-left-color: #c4842b; } .sdtiles > div.bad { background: #fdecea; border-left-color: #b3261e; } .sdtiles > div.ok { background: #e9f4ea; border-left-color: #2e7d32; }
.sdtiles small { font-size: .75rem; color: #4a5058; } .sdtiles b { font-size: 1.4rem; }
.sdct tbody tr { cursor: pointer; } .sdct tbody tr:hover { background: #f6f7f9; } .sdct td { vertical-align: top; }
.sdpkg { scroll-margin-top: 80px; }
.waivers li.warnrow { background: #fff4e0; border-radius: 8px; padding: .5rem .6rem; }
.otnote { background: #fff4e0; color: #7a4a00; border-radius: 8px; padding: .5rem .7rem; margin: .6rem 0; font-size: .9rem; }
.bad-card { background: #ffe9e9; border-color: transparent; color: #8a1c1c; }

/* Job kind picker on job setup */
.kindpick{display:grid;grid-template-columns:1fr 1fr;gap:.6rem}
.kindpick button{font:inherit;text-align:left;padding:.8rem .9rem;border:2px solid var(--line,#d9dde2);border-radius:12px;background:#fff;cursor:pointer;display:flex;flex-direction:column;gap:.25rem}
.kindpick button small{color:var(--muted,#5d6670);font-size:.82rem;line-height:1.35}
.kindpick button.on{border-color:var(--go,#1f8a4c);background:#f1f8f4}
.kindpick button:focus-visible{outline:3px solid #1f8a4c55;outline-offset:2px}
@media(max-width:560px){.kindpick{grid-template-columns:1fr}}

/* Delete button waiting for the second tap */
.btn.armed{background:#c92a2a;color:#fff;border-color:#c92a2a}

/* Markup template picker */
.tpl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:.5rem;margin:.6rem 0}
.tpl{font:inherit;background:#fff;border:1px solid var(--line,#d9dde2);border-radius:10px;padding:.35rem;display:flex;flex-direction:column;gap:.3rem;cursor:pointer;text-align:center}
.tpl img{width:100%;aspect-ratio:4/3;object-fit:contain;border-radius:6px;background:#fff}
.tpl b{font-size:.85rem}
.tpl:hover,.tpl:focus-visible{border-color:var(--go,#1f8a4c);outline:none}

/* Custom WPS coverage check */
.wps-ok{border-left:5px solid #1f8a4c;padding-left:.8rem}.wps-ok h3{color:#1f8a4c}
.wps-warn{border-left:5px solid #c47f00;padding-left:.8rem}.wps-warn h3{color:#8a5a00}

/* Quality check at 100% */
.qcrow{display:flex;justify-content:space-between;align-items:center;gap:.6rem;padding:.45rem 0;border-bottom:1px solid var(--line,#e3e6ea)}
.qcrow span:first-child{flex:1;line-height:1.3}
.qcpick{display:flex;gap:.6rem;white-space:nowrap}.qcpick label{display:flex;align-items:center;gap:.25rem}

/* Employee files */
.plain-checks{list-style:none;padding:0;margin:.4rem 0;display:flex;flex-direction:column;gap:.35rem}
.plain-checks li{display:flex;justify-content:space-between;gap:.6rem;align-items:center;flex-wrap:wrap}
.plain-checks label{display:flex;gap:.5rem;align-items:center}
ul.plain{list-style:none;padding:0;margin:.4rem 0;display:flex;flex-direction:column;gap:.5rem}
.pnote{border-left:4px solid var(--line,#d9dde2);padding:.3rem 0 .3rem .7rem}

.kpi small em{font-style:normal;font-weight:400;opacity:.75;display:block;font-size:.85em}
