:root {
  --nav: #1d2633; --nav-hi: #2b3747; --nav-txt: #c9d2de; --accent: #e8a317; --accent-d: #c98a0b;
  --bg: #f4f5f7; --panel: #fff; --line: #dde1e7; --line2: #eef0f3; --txt: #1f2733; --muted: #6b7686;
  --blue: #2563c9; --blue-l: #e8f0fd; --red: #c62f2f; --green: #1f8a4c; --sel: #fff4d6;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font: 13px/1.4 "Segoe UI", system-ui, sans-serif; color: var(--txt); background: var(--bg); }
#app { display: flex; height: 100vh; }
#nav { width: 176px; background: var(--nav); color: var(--nav-txt); display: flex; flex-direction: column; flex-shrink: 0; user-select: none; }
#nav .brand { padding: 14px 16px 12px; font-weight: 700; font-size: 16px; color: #fff; letter-spacing: .3px; border-bottom: 1px solid #2f3a49; }
#nav .brand b { color: var(--accent); }
#nav .sec { padding: 12px 16px 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: #7f8b9b; }
#nav a { display: flex; align-items: center; gap: 8px; padding: 7px 16px; color: var(--nav-txt); text-decoration: none; cursor: pointer; border-left: 3px solid transparent; }
#nav a:hover { background: var(--nav-hi); }
#nav a.on { background: var(--nav-hi); color: #fff; border-left-color: var(--accent); }
#nav a.dis { opacity: .35; pointer-events: none; }
#nav .k { margin-left: auto; font-size: 10.5px; color: #7f8b9b; }
#nav .foot { margin-top: auto; padding: 10px 16px; font-size: 11px; color: #7f8b9b; border-top: 1px solid #2f3a49; word-break: break-all; }
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#jobbar { background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px; display: flex; align-items: center; gap: 16px; min-height: 46px; }
#jobbar .jt { font-weight: 600; font-size: 15px; }
#jobbar .jm { color: var(--muted); }
#jobbar .tot { margin-left: auto; display: flex; gap: 18px; align-items: center; }
#jobbar .tot div { text-align: right; }
#jobbar .tot small { display: block; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; }
#jobbar .tot b { font-size: 15px; }
#banner:empty { display: none; }
#banner { background: #fff3cd; border-bottom: 1px solid #f0d78a; padding: 7px 16px; display: flex; gap: 12px; align-items: center; }
#banner.err { background: #fde2e2; border-color: #f2b1b1; }
#view { flex: 1; overflow: auto; padding: 14px 16px; }
#view.full { padding: 0; overflow: hidden; display: flex; }

h2 { font-size: 17px; margin: 0 0 10px; font-weight: 600; }
h3 { font-size: 13.5px; margin: 0 0 8px; font-weight: 600; }
.muted { color: var(--muted); }
.r { text-align: right; } .c { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 14px; margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

button, .btn { font: inherit; padding: 5px 12px; border: 1px solid #c5ccd6; background: #fff; border-radius: 4px; cursor: pointer; color: var(--txt); white-space: nowrap; }
button:hover { background: #f0f2f5; }
button.pri { background: var(--accent); border-color: var(--accent-d); color: #1b1300; font-weight: 600; }
button.pri:hover { background: var(--accent-d); }
button.blue { background: var(--blue); border-color: #1d4fa3; color: #fff; }
button.danger { color: var(--red); }
button.sm { padding: 2px 8px; font-size: 12px; }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { font: inherit; padding: 4px 6px; border: 1px solid #c5ccd6; border-radius: 3px; background: #fff; color: var(--txt); }
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc0f5; outline-offset: -1px; border-color: var(--blue); }
input[type=number] { text-align: right; }
textarea { width: 100%; resize: vertical; }
label.f { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); }
label.f input, label.f select, label.f textarea { color: var(--txt); font-size: 13px; }
.form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 14px; }
.form .w2 { grid-column: span 2; } .form .w4 { grid-column: span 4; }

table.t { width: 100%; border-collapse: collapse; background: #fff; }
table.t th { position: sticky; top: 0; background: #eef1f5; text-align: left; font-weight: 600; font-size: 11.5px; padding: 5px 7px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
table.t td { padding: 3px 7px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.t tr:hover td { background: #f8fafc; }
table.t tr.sel td { background: var(--sel); }
table.t tr.grp td { background: #f2f4f7; font-weight: 600; color: #3a4556; }
table.t tfoot td { font-weight: 700; border-top: 2px solid var(--line); background: #fafbfc; }
table.t td input, table.t td select { width: 100%; padding: 2px 5px; border-color: transparent; background: transparent; }
table.t td input:hover, table.t td select:hover { border-color: #c5ccd6; background: #fff; }
table.t td input:focus { background: #fff; }
table.t .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t .code { font-family: Consolas, monospace; font-size: 12px; white-space: nowrap; }
table.t tr.warn td { background: #fff1f1; }
.tblwrap { overflow: auto; border: 1px solid var(--line); border-radius: 4px; background: #fff; }

.pl-sheet .ren { margin-left: 4px; padding: 0 5px; line-height: 16px; font-size: 11px; opacity: 0; }
.pl-sheet:hover .ren, .pl-sheet.on .ren { opacity: 1; }
.area-hint { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 30; background: #fff7ed; border: 1px solid #e8590c; color: #7a2e00; border-radius: 6px; padding: 7px 12px; box-shadow: 0 4px 14px rgba(0,0,0,.15); display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.nbadge { margin-left: 6px; background: #e8590c; color: #fff; border-radius: 9px; font-size: 10px; padding: 0 6px; line-height: 16px; }
.note { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; background: #fff; }
.note.done { opacity: .6; }
.note.done .ntext { text-decoration: line-through; }
.note .ntext { margin-top: 5px; white-space: normal; line-height: 1.45; }
.pill { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; background: #e9edf2; color: #3a4556; }
.pill.lock { background: #fde2e2; color: var(--red); }
.pill.mine { background: #dff3e7; color: var(--green); }
.pill.Won { background: #dff3e7; color: var(--green); } .pill.Lost { background: #f1f1f1; color: #888; } .pill.Submitted { background: var(--blue-l); color: var(--blue); } .pill.Bidding { background: #fff4db; color: #a86b00; } .pill.Approved { background: #e6f4ea; color: #1e7b34; }
.pill.alt { background: #efe7fb; color: #6b3fb5; } .pill.co { background: #fdeee0; color: #b25b0e; }

/* takeoff layout */
.to { display: flex; flex: 1; min-height: 0; min-width: 0; }
.to-left { width: 268px; border-right: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; flex-shrink: 0; }
.to-mid { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.to-right { width: 310px; border-left: 1px solid var(--line); background: #fff; overflow: auto; flex-shrink: 0; padding: 12px; }
.bdlist { border-bottom: 1px solid var(--line); max-height: 34%; overflow: auto; }
.bdlist div { padding: 5px 12px; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.bdlist div:hover { background: #f5f7fa; }
.bdlist div.on { background: var(--blue-l); font-weight: 600; }
.bdlist div .n { margin-left: auto; color: var(--muted); font-size: 11.5px; font-weight: 400; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs div { flex: 1; text-align: center; padding: 7px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs div.on { color: var(--txt); border-bottom-color: var(--accent); font-weight: 600; }
.libsearch { padding: 8px; border-bottom: 1px solid var(--line); }
.libsearch input { width: 100%; }
.tree { flex: 1; overflow: auto; font-size: 12.5px; }
.tree .cat { padding: 5px 10px; font-weight: 600; background: #f5f6f8; cursor: pointer; border-bottom: 1px solid var(--line2); position: sticky; top: 0; }
.tree .sub { padding: 4px 10px 4px 18px; color: #4a5566; cursor: pointer; font-weight: 600; font-size: 12px; }
.tree .it { padding: 3px 10px 3px 28px; cursor: pointer; display: flex; gap: 6px; }
.tree .it:hover { background: #f1f5fb; }
.tree .it.on { background: var(--sel); }
.tree .it .cd { color: var(--muted); font-family: Consolas, monospace; font-size: 11px; min-width: 0; }
.quick { display: flex; gap: 8px; padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.quick input.code { width: 230px; }
.quick input.qty { width: 90px; }
.to-grid { flex: 1; overflow: auto; }
.to-foot { display: flex; gap: 22px; padding: 7px 14px; background: #fff; border-top: 1px solid var(--line); font-size: 12.5px; }
.to-foot b { font-variant-numeric: tabular-nums; }
.pv { font-size: 12px; }
.pv td { padding: 2px 5px !important; }

/* summary */
.recap td { padding: 5px 9px; }
.recap tr.sub td { font-weight: 600; background: #f7f8fa; }
.recap tr.big td { font-size: 16px; font-weight: 700; background: #fff7e3; border-top: 2px solid var(--accent); }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; }
.stat small { color: var(--muted); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.stat b { font-size: 18px; }

/* modal & toast */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 22, 33, .45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: #fff; border-radius: 8px; min-width: 420px; max-width: 92vw; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.modal .mh { padding: 12px 16px; font-weight: 600; font-size: 15px; border-bottom: 1px solid var(--line); }
.modal .mb { padding: 14px 16px; overflow: auto; }
.modal .mf { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
#toasts { position: fixed; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: #1f2733; color: #fff; padding: 9px 14px; border-radius: 5px; box-shadow: 0 4px 14px rgba(0,0,0,.2); max-width: 420px; }
.toast.err { background: var(--red); }

.setup { max-width: 620px; margin: 60px auto; }
.setup .card { padding: 24px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }
.ro input, .ro select, .ro textarea { pointer-events: none; background: #f5f6f8 !important; }
/* locked jobs: text boxes can still be clicked, selected and copied (typing is blocked in core.js) */
.ro input:not([type=checkbox]):not([type=radio]):not([type=file]), .ro textarea { pointer-events: auto; cursor: text; }
.ro .edit-only { display: none !important; }
.ro .ro-ok input, .ro .ro-ok select, .ro .ro-ok textarea { pointer-events: auto; background: #fff !important; }
kbd { font: 11px Consolas, monospace; background: #eef0f3; border: 1px solid #d5d9e0; border-radius: 3px; padding: 0 4px; }
table.t.fixed { table-layout: fixed; }
table.t.fixed td { overflow: hidden; text-overflow: ellipsis; }
.code { font-family: Consolas, "Cascadia Mono", monospace; }
.form > * { min-width: 0; }
label.f input, label.f select, label.f textarea { min-width: 0; width: 100%; }
.tree .it > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree .it .cd { white-space: nowrap; flex-shrink: 0; }
td.acts { white-space: nowrap; }
td.acts { overflow: visible !important; }
.ac-box { position: fixed; z-index: 80; background: #fff; border: 1px solid #b9c2cf; border-radius: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.18); max-height: 420px; overflow: auto; max-width: 640px; }
.ac-h { padding: 4px 10px 3px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f3f5f8; border-top: 1px solid #e3e7ee; }
.ac-h:first-child { border-top: 0; }
.libtag { display: inline-block; font-size: 10px; padding: 0 5px; border-radius: 8px; background: #e8eef8; color: #2a4a7a; margin-left: 4px; }
.libtag.vb { background: #fff2dc; color: #7a4a00; }
.ac-it { display: flex; gap: 8px; padding: 5px 10px; cursor: pointer; align-items: center; }
.ac-it.on, .ac-it:hover { background: var(--blue-l); }
.ac-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-c { color: var(--muted); font: 11px Consolas, monospace; white-space: nowrap; }
/* on-screen takeoff */
.pl-hd { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #f5f6f8; border-bottom: 1px solid var(--line); flex-wrap: wrap; row-gap: 6px; }
.pl-sheets { overflow: auto; flex-shrink: 0; min-height: 80px; }
.pl-sheet { display: flex; gap: 6px; align-items: center; padding: 6px 10px; cursor: pointer; font-size: 12.5px; border-bottom: 1px solid var(--line2); }
.pl-sheet:hover { background: #f5f7fa; } .pl-sheet.on { background: var(--blue-l); font-weight: 600; }
.pl-sheet .nmw { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pl-sheet .nm { white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.pl-sheet .sub { display: flex; gap: 6px; align-items: center; }
.pl-sheet .n { font-size: 11px; color: var(--muted); }
.pl-cond { display: flex; gap: 8px; align-items: center; padding: 6px 10px; cursor: pointer; border-bottom: 1px solid var(--line2); }
.pl-cond:hover { background: #f5f7fa; } .pl-cond.on { background: var(--sel); }
.pl-cond .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.pl-cond .nm small { display: block; color: var(--muted); font-size: 11px; }
.pl-cond .q { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-cond .eye { padding: 0 5px; border-color: transparent; background: transparent; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; border: 2px solid #fff; box-shadow: 0 0 0 1px #c5ccd6; }
.sw.big { width: 22px; height: 22px; margin-top: 4px; }
.pl-colors { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.pl-colors .sw { cursor: pointer; width: 18px; height: 18px; } .pl-colors .sw.on { box-shadow: 0 0 0 2px #111; }
.pl-tools { flex-wrap: wrap; gap: 6px; row-gap: 6px; }
.seg { display: inline-flex; } .seg button { border-radius: 0; margin-left: -1px; } .seg button:first-child { border-radius: 4px 0 0 4px; } .seg button:last-child { border-radius: 0 4px 4px 0; }
.seg button.on { background: #1d2633; color: #fff; border-color: #1d2633; }
.pl-scroll { flex: 1; overflow: auto; background: #5f6670; position: relative; scrollbar-width: thin; }
.pl-stage { position: relative; margin: 20px; flex-shrink: 0; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.4); }
.pl-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pl-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pl-stage[data-tool=select] { cursor: default; } .pl-stage[data-tool=count] { cursor: crosshair; } .pl-stage[data-tool=line], .pl-stage[data-tool=scale], .pl-stage[data-tool=auto] { cursor: crosshair; }
.pl-lbl { font-family: "Segoe UI", Arial, sans-serif; font-weight: 700; paint-order: stroke; }
.pl-name { width: 100%; font-weight: 600; font-size: 14px; border-color: transparent; padding: 2px 4px; margin-left: -4px; }
.pl-name:hover { border-color: #c5ccd6; }
/* assembly components in the takeoff grid */
.exp { cursor: pointer; display: inline-block; width: 14px; color: var(--txt); font-size: 12px; }
tr.comp td { background: #f7f9fc; font-size: 12px; padding-top: 2px; padding-bottom: 2px; }
tr.comp td:nth-child(2) { padding-left: 18px; }
tr.comp-hd td { background: #edf2f9; font-size: 11px; color: var(--muted); font-weight: 600; }
button.del { border-color: transparent; background: transparent; padding: 1px 5px; }
button.del:hover { background: #fde2e2; }
/* show full text: wrap instead of cutting off, and let side panels be resized */
.tree .it { align-items: flex-start; }
.tree .it > span:first-child { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; }
.tree .it .cd { padding-top: 1px; }
table.t.fixed td { overflow-wrap: anywhere; }
.to-left, .to-right { resize: horizontal; overflow: auto; min-width: 220px; max-width: 60vw; }
.to-left { direction: ltr; }
.resizable { resize: horizontal; overflow: auto; min-width: 200px; max-width: 70vw; }
textarea.cell { width: 100%; border-color: transparent; background: transparent; resize: none; field-sizing: content; min-height: 24px; padding: 2px 5px; font: inherit; line-height: 1.35; }
textarea.cell:hover { border-color: #c5ccd6; background: #fff; }
.ldesc { color: var(--muted); font-size: 11.5px; padding: 0 6px 3px; line-height: 1.3; }
/* auto count review */
.rv-grid { --rv: 170px; display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--rv) + 16px), 1fr)); gap: 10px; max-height: 68vh; overflow: auto; padding: 2px; }
.rv { position: relative; border: 2px solid var(--line); border-radius: 6px; cursor: pointer; background: #fff; padding: 6px; text-align: center; opacity: .55; }
.rv img { width: var(--rv); height: var(--rv); display: block; margin: 0 auto; image-rendering: auto; }
.rv.on { border-color: var(--green); opacity: 1; box-shadow: 0 0 0 2px rgba(31,138,76,.2); }
.rv .rv-s { position: absolute; left: 4px; top: 3px; font-size: 12px; background: rgba(255,255,255,.9); padding: 0 3px; border-radius: 3px; color: var(--muted); }
.rv .rv-c { position: absolute; right: 4px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #ccd2da; color: #fff; font-size: 15px; line-height: 24px; }
.rv.on .rv-c { background: var(--green); }
.rv .rv-sh { position: absolute; left: 4px; bottom: 3px; font-size: 10px; background: #1d2633; color: #fff; padding: 0 4px; border-radius: 3px; }
.chk-row { padding: 2px 0; font-size: 12.5px; } .chk-row a { color: var(--blue); cursor: pointer; } .chk-row a:hover { text-decoration: underline; }

/* quantity boxes look like boxes */
table.t td input.qtybox, table.t td input[data-per], table.t td input[data-tot] { border: 1px solid #b9c2cf !important; background: #fff !important; border-radius: 3px; font-weight: 600; }
table.t td input.qtybox:focus, table.t td input[data-per]:focus, table.t td input[data-tot]:focus { border-color: var(--blue) !important; }
table.t td input.qtybox.plan { color: var(--blue); }
table.t td input.qtybox.ovr { color: #b25b0e; border-color: #e8a317 !important; }
.qtynote { font-size: 10.5px; color: var(--muted); text-align: right; }
tr.comp.sup td { background: #f1f8f1; }
/* cloud: people in the job, approvals */
.peer { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 10.5px; font-weight: 700; margin-left: 3px; box-shadow: 0 0 0 2px #fff; }
.peer-tag { display: inline-block; color: #fff; font-size: 10px; font-weight: 700; border-radius: 8px; padding: 1px 5px; margin-right: 5px; vertical-align: 1px; }
.cloudbar { display: flex; align-items: center; gap: 6px; }
.pill.ok { background: #e6f4ea; color: #1e7b34; }
/* job-only price / labor changes in the takeoff */
input.num.ovr { color: #1864ab; font-weight: 700; background: #e7f1ff; border-color: #74a9e8; }
.ovtxt { color: #1864ab; font-weight: 700; }
.compd { display: flex; align-items: center; gap: 6px; }
.compd .cdesc { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.compd .perin { width: 66px; flex: none; }
input.num.cbox { width: 100%; border: 1px solid #cfd6df; border-radius: 4px; padding: 3px 5px; background: #fff; }
input.num.cbox.ovr { color: #1864ab; font-weight: 700; background: #e7f1ff; border-color: #74a9e8; }
.perrow { display: flex; align-items: center; justify-content: flex-end; gap: 2px; font-size: 10.5px; color: var(--muted, #7a8594); margin-top: 2px; white-space: nowrap; }
.perrow input { width: 56px; font-size: 10.5px; padding: 0 3px; border: 1px solid #e1e6ec; border-radius: 3px; background: #fff; text-align: right; }
/* "update ready" bar */
#updbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 900; background: #1f2a37; color: #fff; padding: 9px 12px 9px 16px; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.25); display: flex; align-items: center; gap: 10px; font-size: 13px; max-width: 80vw; }
#updbar .muted { color: #b8c2cf; }
#updbar button.sm:not(.pri) { background: transparent; color: #fff; border-color: #5b6878; }
/* full-sheet crosshair */
.pl-xh { position: fixed; display: none; pointer-events: none; z-index: 5; overflow: hidden; }
.pl-xh-v { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid #111; }
.pl-xh-h { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid #111; }
.pl-xh-o { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 1px solid #111; border-radius: 50%; }
.pl-scroll.xh, .pl-scroll.xh .pl-stage { cursor: none; }
#plXh.on { background: var(--accent, #2563eb); color: #fff; }
.pl-stop { background: #dc2626 !important; color: #fff !important; border-color: #b91c1c !important; font-weight: 600; }
.pl-xhbtn { font-weight: 600; border: 1px solid #94a3b8; }
.pl-done { width: 18px; height: 18px; min-width: 18px; padding: 0; border: 1.5px solid #94a3b8; border-radius: 4px; background: #fff; color: #fff; font-size: 12px; line-height: 15px; font-weight: 700; cursor: pointer; }
.pl-sheet.done .pl-done { background: #16a34a; border-color: #16a34a; }
.pl-sheet.done .nm { color: #15803d; }

/* panel splitters on the takeoff screen */
.pl-vsplit { height: 7px; flex-shrink: 0; cursor: row-resize; background: #e5e7eb; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; }
.pl-vsplit::after { content: ''; position: absolute; left: 50%; top: 2px; width: 34px; margin-left: -17px; height: 1px; border-top: 1px solid #9ca3af; border-bottom: 1px solid #9ca3af; }
.pl-hsplit { width: 6px; flex-shrink: 0; cursor: col-resize; background: #e5e7eb; border-right: 1px solid var(--line); }
.pl-vsplit:hover, .pl-hsplit:hover { background: #cbd5e1; }
.to-left { resize: none !important; }
.to-left { overflow-x: hidden !important; }
.pl-sheet { padding: 5px 10px; }
.to-mid { position: relative; }
.pl-busy { display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: max-content; max-width: 80%; padding: 8px 14px; background: rgba(29,38,51,.88); color: #fff; border-radius: 6px; font-size: 13px; z-index: 6; pointer-events: none; }
.pl-measlist { margin: 6px 0 10px; padding: 8px 10px; background: #ecfeff; border: 1px solid #a5f3fc; border-radius: 6px; font-size: 12.5px; line-height: 1.6; }
.pl-measlist button { margin-top: 4px; }
.pl-cmp { margin: 6px 0 10px; padding: 8px 10px; background: #fff7ed; border: 1px solid #fdba74; border-radius: 6px; font-size: 12.5px; line-height: 1.5; }
.pl-cmp-list a { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 7px; border: 1px solid #fdba74; border-radius: 10px; color: #c2410c; cursor: pointer; font-weight: 600; }
.pl-cmp-list a:hover { background: #ffedd5; }
.fx-types { display: flex; flex-wrap: wrap; gap: 6px; max-height: 160px; overflow: auto; }
.fx-types .pill { font-size: 11.5px; }
.fx-sheets { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; max-height: 220px; overflow: auto; font-size: 12.5px; }
.fx-t td { vertical-align: middle; }
/* vendor quotes: several vendors per package, one used */
.qt .q-grp td { background: #f1f5f9; padding: 7px 10px; font-size: 12.5px; }
.qt .q-add { float: right; cursor: pointer; color: var(--blue); font-size: 12px; }
.qt .q-off td { opacity: .55; }
.qt .q-off td:first-child { opacity: 1; }
.qt .q-low { color: #15803d; font-weight: 700; }
/* specs */
.sp-grid { display: grid; grid-template-columns: minmax(340px, 38%) 1fr; gap: 14px; align-items: start; }
.sp-left { max-height: calc(100vh - 130px); overflow: auto; }
.sp-card { padding: 10px 12px; }
.sp-card h3 { margin: 0 0 6px; font-size: 14px; }
.sp-div { margin: 10px 0 3px; font-weight: 700; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.sp-sec { display: block; padding: 3px 6px; border-radius: 4px; cursor: pointer; font-size: 12.5px; line-height: 1.35; }
.sp-sec:hover, .sp-sec.on { background: #e8f0fe; }
.sp-hit { display: block; padding: 5px 6px; border-radius: 4px; cursor: pointer; font-size: 12px; line-height: 1.35; border-bottom: 1px solid var(--line); }
.sp-hit:hover { background: #f1f5f9; }
.sp-hit mark, .sp-text mark { background: #fde68a; }
.sp-flag summary { cursor: pointer; padding: 4px 0; }
.sp-right { position: sticky; top: 0; max-height: calc(100vh - 130px); overflow: auto; }
.sp-page canvas { border: 1px solid var(--line); background: #fff; }
.sp-text { white-space: pre-wrap; font-size: 12.5px; line-height: 1.45; font-family: inherit; }
.sp-x { margin-left: 4px; color: #b91c1c; cursor: pointer; }

/* bid check */
.bc-n{display:inline-block;min-width:20px;padding:0 6px;border-radius:10px;font-size:12px;font-weight:700;text-align:center;color:#fff;margin:0 2px}
.bc-n.err{background:#d6336c}.bc-n.warn{background:#f08c00}.bc-n.info{background:#868e96}.bc-n.ok{background:#2f9e44}
.bc-sum{display:flex;align-items:center;gap:6px;margin-bottom:6px;flex-wrap:wrap}
.bc-h{margin:14px 0 4px;font-size:13px}
.bc-row{display:flex;gap:8px;align-items:center;padding:6px 8px;border-radius:6px;margin:3px 0;font-size:13px;line-height:1.35}
.bc-row.bc-err{background:#fdecef}.bc-row.bc-warn{background:#fff4e0}.bc-row.bc-info{background:#f3f4f6}

/* count from legend */
.lg-sym{width:44px;height:44px;border:1px solid var(--line);border-radius:4px;background:#fff;image-rendering:auto}
.lg-t td{vertical-align:middle}
.lg-grp{border:1px solid var(--line);border-radius:8px;padding:8px 10px;margin:8px 0}
.lg-n{font-weight:700;min-width:28px;text-align:right;font-size:15px}
.lg-hits{display:flex;flex-wrap:wrap;gap:4px;margin:8px 0 0 54px}
.lg-hit{position:relative;display:inline-flex;align-items:center;gap:4px;border:1px solid var(--line);border-radius:4px;padding:2px;background:#fff;cursor:pointer}
.lg-hit img{width:56px;height:56px;display:block}
.lg-hit input{position:absolute;top:2px;left:2px;width:auto;margin:0}
.lg-hit:has(input:not(:checked)){opacity:.4}
.lg-txt{padding:3px 6px 3px 22px;font-weight:700;font-size:12px}.lg-txt small{font-weight:400;color:var(--muted);margin-left:3px}

/* price change review */
.pr-sum{font-size:14px;margin-bottom:4px;line-height:1.6}
.pr-up{color:#c92a2a}.pr-dn{color:#2b8a3e}.pr-big{color:#d9480f;font-weight:600}
.pr-bigrow td{background:#fff4e6}
.pr-jobs td,.pr-items td{padding:4px 8px}

/* addenda + scope suggestions */
.ad-blk{border:1px solid var(--line);border-radius:8px;padding:10px 12px;margin:0 0 12px}
.ad-sum{margin:6px 0;font-size:13px}
.sd-row{display:flex;gap:8px;align-items:center;padding:5px 6px;border-radius:6px;font-size:13px}
.sd-row:hover{background:var(--hover,#f3f4f6)}.sd-row input{width:auto}.sd-row small{max-width:300px;text-align:right}

/* bid history */
.hi-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin-bottom:10px}
.hi-card{margin:0;padding:12px 14px}.hi-v{font-size:24px;font-weight:700;margin:2px 0}
.pill.hi-won{background:#d3f9d8;color:#2b8a3e}.pill.hi-lost{background:#ffe3e3;color:#c92a2a}
.hi-off{color:#c92a2a;font-weight:700}.hi-warn{color:#e8590c;font-weight:600}.hi-ok{color:#2b8a3e}

.cs-bar{height:12px;border-radius:6px;background:#e9ecef;overflow:hidden}.cs-bar div{height:100%}

/* drawings pop-out window */
body.popout #nav{display:none}
body.popout #app{grid-template-columns:1fr !important}

#plSvg .pl-hdl{cursor:move;pointer-events:all}

/* pop-out: drawing only */
body.popout.plonly #jobbar, body.popout.plonly #banner, body.popout.plonly .to-left, body.popout.plonly .to-right, body.popout.plonly .pl-hsplit { display: none !important; }
body.popout.plonly #plFx, body.popout.plonly #plLeg, body.popout.plonly #plCmp, body.popout.plonly #plPng, body.popout.plonly #plScale { display: none; }
body.popout .pop-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
body.popout:not(.plonly) #ppFs { display: none; }

tr.qt td{color:var(--muted);font-size:12.5px;padding-left:20px !important;border-top:none}

.pill.alt-a{background:#e7f5ff;color:#1864ab;font-size:10px}.pill.alt-d{background:#fff0f6;color:#a61e4d;font-size:10px}
select.q-alt{margin-top:3px;font-size:11.5px;padding:2px 4px}

/* messages / team chat */
.msg-btn{position:relative;margin-left:8px;font-size:15px;font-weight:600;padding:8px 16px;border:1px solid #f5a300;background:#fff8e6;color:#7a5200;border-radius:8px}.msg-btn .mb-ic{font-size:19px;vertical-align:-2px;margin-right:2px}.msg-btn:hover{background:#ffefc2}.msg-btn.has-new{background:#f5a300;color:#111;animation:mbpulse 1.6s ease-in-out infinite}.msg-btn .nbadge{position:absolute;top:-8px;right:-8px;font-size:12px;min-width:20px;height:20px;line-height:20px}@keyframes mbpulse{50%{box-shadow:0 0 0 5px rgba(245,163,0,.25)}}
.msg-on{font-size:12px;color:var(--muted);padding:6px 12px;border-bottom:1px solid var(--line);background:#fbfbfc}.dot-on,.dot-off{display:inline-block;width:8px;height:8px;border-radius:50%;background:#2f9e44;margin-right:4px}.dot-off{background:#bbb}#msgSnd.off{opacity:.6}.msg-hd button{margin-left:4px}
.msg-panel{position:fixed;right:12px;top:58px;bottom:12px;width:380px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.18);z-index:900;display:flex;flex-direction:column}
.msg-hd{display:flex;align-items:center;padding:10px 12px;border-bottom:1px solid var(--line)}
.msg-tabs{display:flex;border-bottom:1px solid var(--line)}.msg-tabs div{flex:1;text-align:center;padding:8px;cursor:pointer;font-size:13px;color:var(--muted)}.msg-tabs div.on{color:#111;font-weight:600;border-bottom:2px solid var(--accent,#f5a300)}
.msg-list{flex:1;overflow:auto;padding:10px;background:#f7f8fa}
.msg{background:#fff;border:1px solid var(--line);border-radius:10px;padding:7px 10px;margin:0 30px 8px 0;font-size:13px}
.msg.mine{margin:0 0 8px 30px;background:#eef6ff;border-color:#cfe3ff}.msg.unread{border-color:#f08c00;box-shadow:0 0 0 2px #fff3e0}
.msg-meta{font-size:11px;color:var(--muted);margin-bottom:3px}.msg-job{display:inline-block;font-size:11.5px;margin-bottom:3px;cursor:pointer;color:#1864ab}
.msg-text{white-space:normal;word-wrap:break-word}.msg .msg-del{float:right;margin-top:-2px;opacity:.5}.msg button{margin-top:5px}
.msg-in{border-top:1px solid var(--line);padding:10px}
#toasts{z-index:1200 !important}

.drop-zone{border:2px dashed #c9ced6;border-radius:12px;padding:28px 20px;text-align:center;background:#fafbfc;transition:.15s}.drop-zone.over{border-color:#f5a300;background:#fff6dd}.drop-zone b{display:block;font-size:16px;margin:6px 0 4px}
.pl-drop{position:relative}.pl-drop::after{content:'Drop PDFs to add them to this job';position:absolute;inset:8px;border:3px dashed #f5a300;border-radius:12px;background:rgba(255,246,221,.85);display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;color:#7a5200;z-index:500;pointer-events:none}
.fd-modal{width:min(1320px,94vw)}.fd-opts{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;margin-bottom:10px;font-size:13px}.fd-opts label{display:flex;gap:5px;align-items:center}.fd-opts select{width:auto}
.fd-t td{vertical-align:middle}.fd-t tr.off{opacity:.45}.fd-t input.need{border-color:#f08c00;background:#fff8e6}.fd-src{font-size:11px;line-height:1.2;margin-top:2px}.fd-res{max-width:360px}.fd-spec{font-size:11.5px;color:#555;margin-top:3px}.fd-t .pill.warn{background:#fff3bf;color:#7a5200}.err-t{color:#c92a2a}

.pl-pg{display:inline-flex;align-items:center;gap:2px;margin-right:6px}.pl-pg button{padding:4px 9px;font-size:13px}.pl-pg #plPgNo{min-width:52px;text-align:center;font-size:12px;color:var(--muted)}

.ho-alts{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;margin-bottom:10px}.ho-t input{padding:3px 6px}
.ac-bar{display:inline-block;width:80px;height:9px;background:#eef0f3;border-radius:5px;overflow:hidden;vertical-align:middle;margin-right:5px}.ac-bar div{height:100%;background:#2f9e44}.ac-bar div.near{background:#f59f00}.ac-bar div.over{background:#e03131}

.hi-card > b{display:block;font-size:22px;margin:2px 0}#hiField .hi-cards{margin-bottom:4px}#hiField .hi-card{border:1px solid var(--line);border-radius:8px}

.pill.Invited{background:#efe9ff;color:#5f3dc4}.pill.No{background:#f1f1f1;color:#888}
.cal{display:grid;grid-template-columns:repeat(7,1fr);border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#fff}
.cal-h{background:#f3f5f8;font-size:12px;font-weight:600;padding:6px 8px;border-bottom:1px solid var(--line)}
.cal-d{min-height:96px;border-right:1px solid var(--line2,#eef0f3);border-bottom:1px solid var(--line2,#eef0f3);padding:4px 5px;font-size:12px;overflow:hidden}.cal-d.out{background:#fafbfc;color:#aaa}.cal-d.today{background:#fff8e6}.cal-d.today .cal-n{color:#c77700;font-weight:700}
.cal-n{font-size:12px;margin-bottom:3px}.cal-e{display:block;padding:2px 5px;margin-bottom:2px;border-radius:4px;background:#fff4db;color:#7a5200;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-left:3px solid #f5a300}
.cal-e.walk,.cal-e.rfi{background:#f1f3f5;color:#495057;border-left-color:#adb5bd}.cal-e.st-Invited{background:#efe9ff;color:#5f3dc4;border-left-color:#7950f2}.cal-e.st-Submitted{background:#e7f5ff;color:#1864ab;border-left-color:#339af0}.cal-e.st-Won,.cal-e.st-Approved{background:#e6f4ea;color:#1e7b34;border-left-color:#2f9e44}.cal-e.st-Lost{background:#f1f1f1;color:#888;border-left-color:#bbb}
.cal-key{display:inline-block;width:10px;height:10px;border-radius:2px;background:#f5a300;vertical-align:middle}
.pp-board{display:grid;grid-template-columns:repeat(5,minmax(180px,1fr));gap:10px;align-items:start;overflow-x:auto}.pp-col{background:#f3f5f8;border-radius:8px;padding:8px}.pp-ch{font-weight:600;font-size:13px;margin-bottom:8px}
.pp-card{display:block;background:#fff;border:1px solid var(--line);border-radius:7px;padding:8px 10px;margin-bottom:7px;color:inherit;text-decoration:none}.pp-card:hover{border-color:#f5a300}
.pp-due{display:inline-block;font-size:11px;padding:1px 6px;border-radius:9px;background:#eef0f3;color:#555}.pp-due.soon{background:#fff3bf;color:#7a5200}.pp-due.today{background:#ffe3e3;color:#c92a2a;font-weight:600}.pp-due.over{background:#f1f1f1;color:#888}
#ppTabs button.on{background:#111;color:#fff}

/* ---------- iPad / touch / narrow windows ---------- */
@media (max-width: 1099px), (pointer: coarse) and (max-width: 1399px) {
  #nav { width: 56px; transition: width .15s; z-index: 950; }
  #nav .bt, #nav .nl, #nav .k, #nav .sec, #nav .foot, #nav .libtag, #nav .nav-ver { display: none; }
  #nav a { justify-content: center; padding: 10px 0; font-size: 18px; position: relative; }
  #nav a .nbadge { position: absolute; top: 2px; right: 4px; }
  #nav .brand { text-align: center; padding: 14px 0 12px; cursor: pointer; font-size: 20px; }
  body.nav-open #nav { position: fixed; left: 0; top: 0; bottom: 0; width: 230px; box-shadow: 4px 0 20px rgba(0,0,0,.35); overflow-y: auto; }
  body.nav-open #nav .bt, body.nav-open #nav .nl, body.nav-open #nav .sec, body.nav-open #nav .foot { display: initial; }
  body.nav-open #nav .sec, body.nav-open #nav .foot { display: block; }
  body.nav-open #nav a { justify-content: flex-start; padding: 9px 16px; font-size: 14px; }
  body.nav-open #nav .brand { text-align: left; padding: 14px 16px 12px; font-size: 16px; }
  .to-left { width: 230px; } .to-right { width: 260px; }
  #jobbar .tot { gap: 10px; flex-wrap: wrap; }
}
@media (max-width: 900px) { .to-right { display: none; } .grid2, .grid3 { grid-template-columns: 1fr !important; } }
.modal { max-width: 96vw; } .modal .mb { overflow: auto; -webkit-overflow-scrolling: touch; }
.modal .mb [style*="width:"] { max-width: 100%; }
html.touch button, html.touch select, html.touch input:not([type=checkbox]):not([type=radio]) { min-height: 34px; }
html.touch button.sm { min-height: 30px; padding-left: 10px; padding-right: 10px; }
html.touch .t td, html.touch .t th { padding-top: 7px; padding-bottom: 7px; }
html.touch #plScroll { touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; }
html.touch #plScroll.no-pan { touch-action: none; }
body { -webkit-tap-highlight-color: transparent; }
/* finish / undo / cancel bar while drawing a run (iPad has no double-click or Enter) */
.pl-draftbar { position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); z-index: 60; display: flex; gap: 8px; background: rgba(17,24,39,.92); padding: 8px 10px; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.pl-draftbar button { font-size: 15px; padding: 8px 16px; border-radius: 8px; border: 0; }
.pl-draftbar .ok { background: #f5a300; color: #111; font-weight: 700; } .pl-draftbar .gh { background: #374151; color: #fff; }
html.touch #plStage { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

.spr{border-left:4px solid #2f9e44;padding:6px 10px;margin:6px 0;background:#f8fbf8;border-radius:4px}.spr.bad{border-left-color:#e03131;background:#fff5f5}.spr .sp-hit{font-size:12px;margin-top:4px}

/* dashboard */
.db-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(380px,1fr));gap:12px;align-items:start}.db-grid .card{margin:0}
.db-grid .t td{padding:5px 6px}.db-est{margin:0 0 10px}.db-bar{height:7px;background:var(--line);border-radius:4px;margin:4px 0 2px;overflow:hidden}.db-bar i{display:block;height:100%;background:var(--accent,#2563eb)}
.db-res{font-size:12px;font-weight:600;padding:1px 7px;border-radius:9px}.db-res.won{background:#dcfce7;color:#166534}.db-res.lost{background:#fee2e2;color:#991b1b}
.hi-card.db-warn{border:1px solid var(--red,#dc2626)}
@media (max-width:820px){.db-grid{grid-template-columns:1fr}}

/* site walk */
.wk-pin{cursor:pointer}.wk-ph{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.wk-th{position:relative}.wk-th img{width:120px;height:90px;object-fit:cover;border-radius:5px;border:1px solid var(--line);cursor:zoom-in}
.wk-th button{position:absolute;top:3px;right:3px;padding:0 6px}
label.btn{display:inline-flex;align-items:center;gap:4px;padding:6px 12px;border:1px solid var(--line);border-radius:6px;background:var(--panel,#fff);cursor:pointer;font-size:13px;user-select:none}
label.btn:hover{border-color:#999}
/* Help & Training */
.hp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; margin-top: 10px; }
.hp-list a { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--txt); text-decoration: none; font-size: 12.5px; line-height: 1.35; }
.hp-list a:hover { background: #f5f7fa; }
.hp-list a.on { border-color: var(--accent); background: #fff8e6; }
.hp-list .hp-n { flex: 0 0 24px; height: 24px; border-radius: 50%; background: #1f2937; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.hp-list a.on .hp-n { background: var(--accent); color: #111; }

.cal-d{cursor:pointer}.cal-d:hover{background:#fbfcfe}.cal-d.sel{box-shadow:inset 0 0 0 2px var(--accent)}.cal-day{margin:0 0 10px}

/* Jobs: status tabs */
.jtabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; border-bottom: 1px solid var(--line); }
.jtab { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 6px 10px; font-weight: 600; color: #475569; }
.jtab:hover { background: #f5f7fa; }
.jtab.on { border-bottom-color: var(--accent); color: #0f172a; }
.jtab-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #e2e8f0; font-size: 11px; color: #334155; margin-left: 2px; }
.jtab.on .jtab-n { background: var(--accent); color: #111; }

.q-name{margin-top:4px;width:100%}

/* Jobs list: a clearly visible selected row */
#jTbl table.t tr.sel td { background: #86efac; color: #052e16; font-weight: 600; border-top: 1px solid #22c55e; border-bottom: 1px solid #22c55e; }
#jTbl table.t tr.sel td:first-child { box-shadow: inset 5px 0 0 #16a34a; }
#jTbl table.t tr.sel td .muted, #jTbl table.t tr.sel td[class*="muted"] { color: #14532d; }

.bc-row.bc-ack{opacity:.55}

/* Auto takeoff */
.ato-sheets{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12.5px}
.ato-t td{vertical-align:middle}
.ato-t tr.ato-shape td{background:#fbfcfe}

.ato-d{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

.ato-wrap{display:grid;grid-template-columns:minmax(560px,46%) 1fr;gap:14px;height:min(74vh,820px)}
.ato-left{display:flex;flex-direction:column;min-height:0}
.ato-scroll{flex:1;min-height:0;overflow:auto;margin-top:8px;border:1px solid var(--line);border-radius:6px}
.ato-t tbody tr{cursor:pointer}
.ato-t tbody tr.ato-sel td{background:#fff4e6!important;box-shadow:inset 0 1px #ffc078,inset 0 -1px #ffc078}
.ato-asm{width:100%;min-width:220px;font-size:12.5px}
.ato-right{display:flex;flex-direction:column;min-height:0}
.ato-pvbar{display:flex;gap:4px;align-items:center;flex-wrap:wrap;margin-bottom:6px}
.ato-pvtabs{display:flex;gap:4px;flex-wrap:wrap}
.ato-pv{position:relative;flex:1;min-height:0;border:1px solid var(--line);border-radius:6px;overflow:hidden;background:#e9edf2}
.ato-pv canvas{position:absolute;inset:0;width:100%;height:100%;cursor:crosshair;touch-action:none}
.ato-pvmsg{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}
.ato-k{display:inline-block;width:10px;height:10px;border-radius:50%;vertical-align:-1px;border:2px solid}
.ato-k.on{border-color:#e8590c;background:rgba(232,89,12,.15)}.ato-k.off{border-color:#8a94a3;border-radius:0}.ato-k.rep{border-color:#5c7cfa;border-style:dashed}

.ato-pop{position:fixed;z-index:80;max-height:300px;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:6px;box-shadow:0 8px 24px rgba(0,0,0,.18);font-size:12.5px}
.ato-po{padding:5px 8px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ato-po:hover,.ato-po.on{background:#fff4e6}
.modal .mb:has(.ato-wrap){position:relative}

.ato-cp{padding:6px 8px;background:var(--bg2,#f4f6f9);border-top:1px solid var(--line);font-size:12.5px}
.ato-ci{padding:4px 8px 4px 16px;font-size:12.5px;cursor:pointer;border-top:1px solid #eef1f5}
.ato-ci:hover,.ato-ci.on{background:#fff4e6}

.ato-pname{position:absolute;z-index:4;width:170px;padding:3px 6px;font-size:12.5px;transform:translate(-50%,-130%);box-shadow:0 4px 14px rgba(0,0,0,.2)}
.ato-k.add{border-color:#0ca678;background:rgba(12,166,120,.15)}
.ato-noscale{background:#fff4e6;border:1px solid #ffa94d;border-radius:6px;padding:8px 10px;font-size:12.5px;margin-bottom:6px}
.ato-move{position:absolute;z-index:5;width:280px;background:#fff;border:1px solid var(--line,#ccc);border-radius:8px;box-shadow:0 6px 24px rgba(0,0,0,.18);padding:6px}
.ato-move .ato-mvl{max-height:210px;overflow:auto;margin-top:4px}
.ato-move .ato-po{padding:4px 6px;border-radius:5px;cursor:pointer;font-size:12.5px}
.ato-move .ato-po:hover{background:var(--hover,rgba(0,0,0,.06))}
.ato-move .ato-po[data-new]{font-weight:600}
.ato-sw{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px;vertical-align:0}
.ato-mvh{font-size:10.5px;text-transform:uppercase;letter-spacing:.04em;color:#868e96;margin:6px 4px 2px}
.ato-tip{position:absolute;z-index:4;pointer-events:none;background:rgba(33,37,41,.92);color:#fff;font-size:11.5px;padding:4px 7px;border-radius:5px;max-width:320px;line-height:1.35}
.ato-allbar{font-size:12px;margin-top:4px}
.ato-move .ato-mvl{max-height:230px}
.ato-det{margin:4px 0;font-size:12.5px}
.ato-det summary{cursor:pointer;padding:3px 0;font-weight:600}
.ato-teach{margin-top:3px;font-size:11.5px;padding:2px 8px}
.modal-bg.ato-popped{position:fixed;inset:0;background:var(--bg,#f4f5f7);padding:0}
.modal-bg.ato-popped .modal{width:100vw !important;max-width:none;height:100vh;max-height:none;border-radius:0;margin:0}
/* the review in its own window: use the whole screen, drawing gets the room */
.modal-bg.ato-popped .ato-wrap{grid-template-columns:minmax(520px,34%) 1fr;height:calc(100vh - 150px)}
.ato-ck{font-size:11.5px;color:#1971c2;margin-top:2px;white-space:normal;line-height:1.3}

/* review: quieter list */
.ato-bar1{gap:6px;align-items:center;flex-wrap:wrap;margin:2px 0 4px}
.ato-set{border:1px solid var(--line);border-radius:6px;padding:8px 10px;margin:4px 0;max-height:38vh;overflow:auto;background:var(--bg2,#f8f9fb)}
.ato-chips{display:flex;gap:5px;flex-wrap:wrap;margin-top:6px}
.ato-chip{font-size:12px;padding:3px 10px;border-radius:14px;border:1px solid var(--line);background:#fff;cursor:pointer}
.ato-chip span{color:#868e96;margin-left:2px}
.ato-chip.on{background:#fff4e6;border-color:#ffa94d;font-weight:600}
.ato-chip.warn span{color:#e03131;font-weight:700}
.ato-t tr.ato-hide{display:none}
.ato-t tr.ato-need td:first-child{box-shadow:inset 3px 0 #e03131}
.ato-t .ato-d{-webkit-line-clamp:2}
.ato-t tbody tr:not(.ato-sel) [data-where]{display:none}
.ato-t .lg-sym{width:34px;height:34px}
.ato-t td{padding-top:5px;padding-bottom:5px}
.ato-step{font-weight:600}
.ato-move .ato-sug{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0}
.ato-move .ato-sug button{font-size:11.5px;padding:2px 8px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ato-selbox{position:absolute;z-index:3;border:1.5px dashed #1971c2;background:rgba(25,113,194,.08);pointer-events:none}

.ato-mr{display:flex;gap:4px;align-items:center;padding:3px 8px;border-top:1px solid #eef1f5;font-size:12.5px}
.ato-mr .ato-mrt{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ato-mr button{font-size:11.5px;padding:1px 7px}
.ato-mr.dec{opacity:.6}
.ato-chips[hidden]{display:none}
.ato-qc{background:#e7f5ff;border:1px solid #a5d8ff;border-radius:6px;padding:6px 10px;font-size:12.5px;margin-top:6px}
.ato-qc[hidden]{display:none}
.msg-sub{display:flex;align-items:center;gap:6px;padding:8px 10px;border-bottom:1px solid var(--line)}
.msg-sub .msg-tn{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}
.msg-ths{padding:0;background:#fff}
.msg-th{padding:9px 12px;border-bottom:1px solid #eef1f5;cursor:pointer}
.msg-th:hover{background:#fff8e6}
.msg-th.unread{background:#fff4e6}
.msg-th .msg-tn{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}
.msg-snip{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.msg-new{flex:1;overflow:auto;padding:10px 12px}
.msg-pp{display:flex;gap:6px;align-items:center;font-size:13px;padding:3px 0}
.msg-addbox{padding:8px 12px;border-bottom:1px solid var(--line);background:#fbfbfc;max-height:40%;overflow:auto}
.msg-addbox[hidden]{display:none}
.msg-sys{text-align:center;font-size:11.5px;color:var(--muted);margin:6px 0;white-space:pre-wrap}

/* review list fits its column: no sideways scrolling */
.ato-tbl{overflow-x:hidden}
.ato-t{table-layout:fixed;width:100%}
.ato-t th:nth-child(1),.ato-t td:nth-child(1){width:26px}
.ato-t th:nth-child(2),.ato-t td:nth-child(2){width:46px}
.ato-t th:nth-child(4),.ato-t td:nth-child(4){width:70px}
.ato-t th:nth-child(5),.ato-t td:nth-child(5){width:40%}
.ato-t .ato-asm{min-width:0;width:100%}
.ato-t td{overflow:hidden;word-wrap:break-word}
.ato-wrap{grid-template-columns:minmax(440px,44%) 1fr}
.ato-ren{border:0;background:none;padding:0 4px;margin-left:2px;cursor:pointer;opacity:0;font-size:12px}
.ato-t tr:hover .ato-ren,.ato-t tr.ato-sel .ato-ren{opacity:.75}
.ato-rin{width:100%;font-size:12.5px;padding:2px 5px}
.ato-grid{position:absolute;inset:0;z-index:6;overflow:auto;background:#e9edf2;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px;padding:10px;align-content:start}
.ato-gc{background:#fff;border:1px solid var(--line);border-radius:6px;padding:4px;cursor:pointer}
.ato-gc:hover{border-color:#ffa94d;box-shadow:0 2px 8px rgba(0,0,0,.12)}
.ato-gc canvas{width:100%;height:auto;display:block}
.ato-gt{font-size:12px;font-weight:600;padding:2px 4px 4px}
.ato-gc{min-width:0}
.ato-gc canvas{max-width:100%}
.ato-wrap{height:min(max(400px,calc(100vh - 250px)),860px)}
.ato-pv .ato-grid canvas{position:static;inset:auto;width:100%;height:auto;cursor:pointer}
.ai-pre{white-space:pre-wrap;font-size:11.5px;max-height:260px;overflow:auto;background:#f8f9fb;border:1px solid var(--line);border-radius:6px;padding:8px}
.sp-files{display:flex;flex-wrap:wrap;gap:6px;margin:-2px 0 10px}.sp-file{display:inline-flex;align-items:center;gap:6px;background:#fff;border:1px solid var(--line);border-radius:6px;padding:3px 4px 3px 8px;font-size:12.5px}.sp-file button{font-size:11px;padding:1px 6px}

.pdot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px;vertical-align:middle;flex:none;box-shadow:0 0 0 1.5px #fff}.pdot.on{background:#2f9e44}.pdot.off{background:#e03131}
.msg-on{display:flex;flex-wrap:wrap;gap:4px 12px}.msg-who{white-space:nowrap}

.fr-ed input[type=number]{border:1px solid #cfd4dc;border-radius:5px;padding:3px 6px;background:#fff}
#nav .nav-out{margin-top:8px;width:100%;background:#2a3442;color:#dfe5ee;border:1px solid #3b4757;border-radius:6px;padding:5px 8px;font-size:12px;cursor:pointer;text-align:left}#nav .nav-out:hover{background:#c92a2a;border-color:#c92a2a;color:#fff}
.pc-t td{vertical-align:top}.pc-act{white-space:nowrap}.pc-act .sm{margin-right:4px}.pill.pc-none{background:#fde8e8;color:#a61b1b}
#nav .nav-ver{font-size:11px;font-weight:500;color:#8b97a8;vertical-align:middle;margin-left:2px}
.pl-bd{display:flex;align-items:center;gap:6px;padding:4px 10px 6px;font-size:12px}.pl-bd select{flex:1;min-width:0;font-size:12px;padding:2px 4px}
.cal-e.st-In,.cal-e.st-Complete{background:#e6f4ea;color:#1e7b34;border-left-color:#2f9e44}
#jobbar .jt{display:flex;align-items:center;gap:6px;user-select:text}#jobbar .jt-n{user-select:text;cursor:text}#jobbar .jt-cp{padding:0 5px;font-size:12px;opacity:.55;border:0;background:none}#jobbar .jt-cp:hover{opacity:1;background:#eef2f7}
.st-sel{font-size:12px;padding:2px 4px;border-radius:10px;border:1px solid #d5dbe3;background:#f4f6f9;cursor:pointer;max-width:130px}.st-sel.st-Won,.st-sel.st-In-progress,.st-sel.st-Complete,.st-sel.st-Approved{background:#dff3e7;color:#1e7b34;border-color:#b7e1c4}.st-sel.st-Lost,.st-sel.st-No-bid,.st-sel.st-Cancelled{background:#f1f1f1;color:#777}.st-sel.st-Submitted{background:#e7f0fb;color:#1864ab;border-color:#c5dbf3}.st-sel.st-Bidding{background:#fff4db;color:#a86b00;border-color:#f1dcaa}.st-sel.st-Invited{background:#efe9ff;color:#5f3dc4;border-color:#d8ccff}

/* 🛟 support tickets */
.sup-pre{white-space:pre-wrap;font-size:11px;max-height:160px;overflow:auto;background:var(--bg2,#f4f4f5);padding:8px;border-radius:6px}
.sup-list{max-height:220px;overflow:auto;display:flex;flex-direction:column;gap:6px}
.sup-t{border:1px solid var(--line,#ddd);border-left:4px solid #e8a317;border-radius:6px;padding:6px 8px;font-size:12px}
.sup-t.done{border-left-color:#16a34a}
.sup-d{margin-top:2px;white-space:pre-wrap}
.sup-f{margin-top:4px;color:#15803d}

.jt-ask{margin-left:6px;white-space:nowrap}
.ask-ideas{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.ask-ideas button{font-size:11px}

/* 🗂️ panel directories */
.pd-wrap{display:grid;grid-template-columns:230px 1fr;gap:12px;align-items:start}
.pd-side .pd-list{display:flex;flex-direction:column;gap:4px;max-height:50vh;overflow:auto}
.pd-it{padding:6px 8px;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;border:1px solid transparent}
.pd-it:hover{background:#f4f6f9}.pd-it.on{background:#fff6dd;border-color:#f5a300}
.pd-it .muted{font-size:11px}
.pd-head{gap:10px;align-items:flex-end;margin-bottom:8px;flex-wrap:wrap}
.pd-grid td{padding:2px 4px}.pd-grid input.pd-d{width:100%;text-transform:uppercase}
.pd-grid select{width:52px}.pd-n{text-align:center;font-weight:600;background:#f4f6f9}
.pd-cov{font-size:12px;padding-left:10px !important}

/* ---------- iPad: everything reachable ---------- */
#nav { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
@media (max-width: 1399px) {
  /* job bar: the name stays on one line (tap 📋 to copy it), the totals and buttons wrap under it instead of running off the screen */
  #jobbar { flex-wrap: wrap; row-gap: 6px; padding: 6px 12px; }
  #jbT { min-width: 0; max-width: 100%; }
  #jobbar .jt { min-width: 0; }
  #jobbar .jt-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 36vw; display: inline-block; vertical-align: bottom; }
  #jobbar .jm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
  #jobbar .tot { flex-wrap: wrap; gap: 10px; row-gap: 6px; justify-content: flex-end; }
  .msg-btn { font-size: 0; padding: 6px 10px; margin-left: 4px; }
  .msg-btn .mb-ic { font-size: 19px; margin: 0; }
  .msg-btn .nbadge { font-size: 11px; }
  /* side panels narrower so the takeoff table and the drawing get the room */
  .to-left { width: 220px; min-width: 200px; }
  .to-right { width: 250px; min-width: 220px; }
  /* drawing tools wrap onto a second row instead of disappearing off the right edge */
  .pl-tools .seg { flex-wrap: wrap; max-width: 100%; }
  .pl-tools { row-gap: 6px; }
}
@media (max-width: 1099px) { #jobbar .jt-n { max-width: 30vw; } }
/* On-Screen Takeoff: ⛶ hides the side panels so the drawing fills the screen */
.to.pl-wide > .to-left, .to.pl-wide > .to-right { display: none; }
html.touch .pl-tools button, html.touch #plTool button { min-height: 36px; }
html.touch #nav a { padding-top: 11px; padding-bottom: 11px; }

/* tablets: the less-used drawing tools sit behind ⋯ More */
.pl-more-btn { display: none; }
@media (max-width: 1399px) {
  .pl-more-btn { display: inline-block; }
  .pl-tools:not(.more-open) .pl-x { display: none !important; }
}

/* jobs list: change orders / alternates on the original job */
.job-x{font-size:10px;cursor:pointer;margin-left:4px;white-space:nowrap}
.job-co{background:#fff3bf;color:#7c5a00}.job-alt{background:#e7f0ff;color:#1d4ed8}
.job-x:hover{filter:brightness(.94);text-decoration:underline}

/* alternates: owner's decision */
.alt-acc{font-size:12px;padding:3px 4px}.alt-acc-y{background:#dcfce7;color:#166534;font-weight:600}.alt-acc-n{background:#f3f4f6;color:#6b7280}

/* 🏗️ design */
.ds-card{max-width:1250px;margin-bottom:12px}.ds-card h3{margin:0 0 8px}
.ds-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px}
.ds-tbl{overflow-x:auto;margin-top:8px}.ds-tbl input,.ds-tbl select{width:100%;min-width:60px}.ds-tbl td{padding:3px 5px}
.ds-n{width:64px !important;min-width:52px !important;text-align:right}.ds-fc{font-size:10px;white-space:nowrap}
.ds-dev{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:6px 14px}.ds-dev b{display:inline-block;min-width:34px;text-align:right;margin-right:4px}
.ds-tot td{background:#f6f8fb}
.ds-pnl{border:1px solid var(--line,#ddd);border-radius:8px;margin-top:6px}.ds-pnl-h{padding:8px 10px;cursor:pointer}.ds-pnl-h:hover{background:#f6f8fb}
.ds-pnl .ds-sch{display:none;margin:0}.ds-pnl.open .ds-sch{display:table}.ds-sch td{font-size:12px;padding:2px 5px}.ds-sch td.n{width:28px;text-align:center;background:#f4f6f9;font-weight:600}
.ds-warn{border-left:4px solid #e8a317}.ds-warn ul{margin:0;padding-left:18px}

/* 📜 version history */
.nav-ver{cursor:pointer}.nav-ver:hover{text-decoration:underline}
.cl-list{max-height:62vh;overflow:auto}.cl-v{border-bottom:1px solid var(--line,#e5e7eb);padding:6px 2px}.cl-v.cur{background:#fff8e6}
.cl-v ul{margin:4px 0 2px;padding-left:20px}.cl-v li{margin:2px 0;font-size:13px}

/* 🖊 design drawing */
.dd-top{gap:8px;margin-bottom:6px;flex-wrap:wrap}.dd-tools{gap:8px;margin-bottom:6px;flex-wrap:wrap}.dd-tools .seg button.on{background:#1f2937;color:#fff}
.dd-wrap{display:grid;grid-template-columns:1fr 260px;gap:10px;height:calc(100vh - 190px)}.dd-scroll{overflow:auto;background:#e5e7eb;border-radius:8px;padding:10px}
.dd-stage{background:#fff;box-shadow:0 1px 6px rgba(0,0,0,.2);margin:auto}.dd-stage[data-tool=add],.dd-stage[data-tool=room]{cursor:crosshair}.dd-stage [data-di]{cursor:move}
.dd-sel>*{stroke:#f5a300 !important}.dd-side{overflow:auto;background:#fff;border:1px solid var(--line,#ddd);border-radius:8px;padding:10px;font-size:13px}.dd-un{padding-left:16px;margin:4px 0}
@media (max-width:1099px){.dd-wrap{grid-template-columns:1fr}.dd-side{max-height:200px}}

body.nojobpg #banner { display: none !important; }

/* takeoff side panel: hidden while nothing is selected or picked */
.to-right.to-empty { display: none !important; }

/* on-screen takeoff: the sheet's facts and tools above the drawing */
.pl-sheetbar { display: flex; align-items: center; gap: 10px; padding: 4px 10px; border-bottom: 1px solid var(--line); background: #fff; font-size: 12.5px; flex-wrap: wrap; }
.pl-sheetbar button.sm { padding: 2px 8px; }
/* drawing upload progress bar (uploadbar.js) */
#upbar:not(.on) { display: none; }
#upbar { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 2px 6px rgba(0,0,0,.06); position: relative; z-index: 5; }
#upbar .up-run { padding: 8px 16px 0; }
#upbar .up-run + .up-run { border-top: 1px solid var(--line2); }
#upbar .up-head { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
#upbar .up-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#upbar .up-btns { display: flex; gap: 6px; }
#upbar .up-btns button { padding: 3px 10px; font-size: 12.5px; }
#upbar .up-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 6px 0 6px; }
#upbar .up-step { font-size: 12px; min-width: 0; color: var(--muted); }
#upbar .up-st { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#upbar .up-step.run .up-st, #upbar .up-step.ok .up-st { color: var(--txt); font-weight: 600; }
#upbar .up-ic { display: inline-block; width: 16px; }
#upbar .up-step.ok .up-ic { color: var(--green); }
#upbar .up-step.warn .up-ic { color: #d9480f; }
#upbar .up-step.fail .up-ic { color: var(--red); }
#upbar .up-cnt { font-weight: 400; color: var(--muted); }
#upbar .up-mini { height: 4px; background: var(--line2); border-radius: 2px; overflow: hidden; margin: 3px 0 2px; }
#upbar .up-mini > div { height: 100%; background: var(--blue); transition: width .3s; }
#upbar .up-step.ok .up-mini > div { background: var(--green); }
#upbar .up-step.warn .up-mini > div { background: #f08c00; }
#upbar .up-step.skip .up-mini > div { background: #c5ccd6; }
#upbar .up-step.fail .up-mini > div { background: var(--red); }
#upbar .up-note { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 14px; }
#upbar .up-bar { height: 3px; margin: 0 -16px; background: var(--line2); }
#upbar .up-bar > div { height: 100%; background: var(--accent); transition: width .4s; }
#upbar .up-run.done { background: #ebfbee; }
#upbar .up-run.done .up-bar > div { background: var(--green); }
#upbar .up-run.fail { background: #fff5f5; }
#upbar .up-run.fail .up-bar > div { background: var(--red); }
#upbar .up-move { font-weight: 600; color: var(--green); }
#upbar .up-spin { display: inline-block; width: 10px; height: 10px; border: 2px solid #c5d6f5; border-top-color: var(--blue); border-radius: 50%; animation: upspin .8s linear infinite; vertical-align: -1px; }
@keyframes upspin { to { transform: rotate(360deg); } }
@media (max-width: 900px) { #upbar .up-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pp-prev .mh { display: flex; align-items: center; gap: 6px; }
.pp-prev .docx-wrapper { background: transparent !important; padding: 0 !important; }
.pp-prev section.docx { box-shadow: 0 2px 10px rgba(0,0,0,.35); margin: 0 auto 14px !important; }
.stg-cell{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:3px;cursor:pointer;min-width:130px;max-width:250px;padding:2px 16px 2px 4px;border:1px solid transparent;border-radius:8px}.stg-cell:hover{border-color:var(--line)}
.stg-caret{position:absolute;right:4px;top:50%;transform:translateY(-50%);font-size:10px;color:var(--muted)}
.stg-tag{display:inline-block;font-size:10.5px;line-height:1.45;padding:0 6px;border-radius:9px;border:1px solid #d5dbe3;background:#f4f6f9;color:#555;white-space:nowrap}
.stg-tag.stg-0{background:#fff4db;color:#a86b00;border-color:#f1dcaa}.stg-tag.stg-1{background:#ffe8e8;color:#c92a2a;border-color:#f5c2c2}.stg-tag.stg-2{background:#dff3e7;color:#1e7b34;border-color:#b7e1c4}.stg-tag.stg-3{background:#e7f0fb;color:#1864ab;border-color:#c5dbf3}
.stg-pop{position:absolute;z-index:3000;background:var(--panel);border:1px solid var(--line);border-radius:8px;box-shadow:0 6px 20px rgba(0,0,0,.18);padding:6px;min-width:200px}
.stg-opt{display:flex;align-items:center;gap:8px;padding:4px 6px;border-radius:6px;cursor:pointer}.stg-opt:hover{background:var(--line2)}.stg-opt input{width:auto;margin:0}
.stg-foot{display:flex;justify-content:space-between;gap:6px;border-top:1px solid var(--line2);margin-top:4px;padding-top:6px}

/* job bar split into base bid / alternates / change orders */
#jobbar .jb-parts { display: flex; gap: 6px; overflow-x: auto; max-width: 62vw; }
#jobbar .jb-part { text-align: right; padding: 2px 9px; border-radius: 6px; border: 1px solid var(--line, #e3e6eb); min-width: 92px; white-space: nowrap; }
#jobbar .jb-part small { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
#jobbar .jb-part .jb-mh { display: block; font-size: 11px; color: var(--muted); }
#jobbar .jb-part b { font-size: 14px; }
#jobbar .jb-part.base b { color: var(--green); }
#jobbar .jb-part.alt { background: rgba(25, 113, 194, .07); }
#jobbar .jb-part.co { background: rgba(232, 89, 12, .07); }
#jobbar .jb-part.sum { border-style: dashed; }

/* takeoff: hours before the job's labor factors, under the factored hours */
.lf-base { font-size: 10.5px; color: var(--muted); line-height: 1.1; font-weight: 400; }

/* 🆕 library record added recently and not checked yet */
.pill.newrec { background: #fff4e6; color: #d9480f; border: 1px solid #ffc078; cursor: pointer; font-weight: 600; }

/* ---------- Service: schedule board, work orders, customers (service.js) ---------- */
.svc-top { margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.svc-lbl { margin-left: 4px; }
.svc-seg { display: inline-flex; } .svc-seg button { border-radius: 0; } .svc-seg button:first-child { border-radius: 4px 0 0 4px; } .svc-seg button:last-child { border-radius: 0 4px 4px 0; margin-left: -1px; }
.svc-seg button.on { background: var(--blue); border-color: #1d4fa3; color: #fff; }
.svc-now { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.svc-nowc { border: 1px solid var(--line); border-left: 4px solid #9aa5b4; border-radius: 6px; padding: 7px 9px; background: #fff; cursor: default; }
.svc-nowc[data-wo], .svc-nowc[data-blk] { cursor: pointer; }
.svc-nowc.on_site { border-left-color: #1f8a4c; } .svc-nowc.en_route { border-left-color: #d97706; } .svc-nowc.proj { border-left-color: #2563c9; }
.svc-nowc.off { border-left-color: #9aa5b4; background: #f6f7f9; } .svc-nowc.sched { border-left-color: #7c4dcc; } .svc-nowc.free { border-left-color: #1f8a4c; }
.svc-what { margin-top: 2px; } .svc-where { font-size: 11.5px; }
.svc-st { display: inline-block; padding: 0 7px; border-radius: 9px; font-size: 11px; background: #e9edf2; color: #3a4556; white-space: nowrap; }
.svc-st.on_site, .svc-st.free, .svc-st.st-completed { background: #dff3e7; color: #1f8a4c; } .svc-st.en_route, .svc-st.st-en_route { background: #fdf0d8; color: #a35b00; }
.svc-st.proj, .svc-st.st-dispatched { background: #e8f0fd; color: #2563c9; } .svc-st.sched, .svc-st.st-scheduled { background: #efe7fb; color: #6b3fb5; }
.svc-st.st-on_site { background: #dff3e7; color: #1f8a4c; } .svc-st.st-on_hold { background: #fde2e2; color: #c62f2f; } .svc-st.st-new { background: #fff4db; color: #a86b00; }
.svc-st.st-accepted { background: #dff3e7; color: #1f8a4c; } .svc-st.st-opened { background: #e3effd; color: #1d5fbf; }
.svc-chip.wo.st-dispatched.acc { border-left-color: #1f8a4c; }
.svc-st.st-invoiced, .svc-st.st-canceled, .svc-st.off { background: #f1f1f1; color: #777; }
.svc-pri { font-size: 11px; color: var(--muted); } .svc-pri.high { color: #b45309; font-weight: 600; } .svc-pri.emergency { color: #fff; background: #c62f2f; padding: 0 6px; border-radius: 9px; font-weight: 600; }
.svc-main { display: flex; gap: 12px; align-items: flex-start; }
.svc-boardwrap { flex: 1; min-width: 0; overflow: auto; padding: 0; }
.svc-side { width: 250px; flex-shrink: 0; max-height: 72vh; overflow: auto; }
.svc-wk { display: grid; grid-template-columns: 150px repeat(7, minmax(112px, 1fr)); border-bottom: 1px solid var(--line2); min-width: 940px; }
.svc-wkh { position: sticky; top: 0; background: #eef1f5; z-index: 2; font-size: 12px; }
.svc-wkh > div { padding: 6px 8px; border-left: 1px solid var(--line2); } .svc-wkh > div.today { background: var(--blue-l); color: var(--blue); }
.svc-who { padding: 6px 8px; position: sticky; left: 0; background: #fff; z-index: 1; border-right: 1px solid var(--line); }
.svc-cell { min-height: 64px; padding: 3px; border-left: 1px solid var(--line2); cursor: copy; }
.svc-cell.today { background: #f7faff; } .svc-cell.wkend { background: #fafafa; } .svc-cell.off { background: repeating-linear-gradient(45deg, #f4f5f7, #f4f5f7 6px, #eceef2 6px, #eceef2 12px); }
.svc-cell.drop { outline: 2px dashed var(--blue); outline-offset: -3px; background: var(--blue-l); }
.svc-chip { border: 1px solid var(--line); border-left: 3px solid #7c4dcc; border-radius: 4px; background: #fff; padding: 3px 6px; margin-bottom: 3px; font-size: 11.5px; line-height: 1.3; cursor: pointer; overflow: hidden; }
.svc-chip:hover { box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.svc-chip .svc-ct { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-chip.wo.st-new, .svc-chip.wo.st-scheduled { border-left-color: #7c4dcc; } .svc-chip.wo.st-dispatched { border-left-color: #2563c9; }
.svc-chip.wo.st-en_route { border-left-color: #d97706; background: #fffaf0; } .svc-chip.wo.st-on_site { border-left-color: #1f8a4c; background: #f3fbf6; }
.svc-chip.wo.st-on_hold { border-left-color: #c62f2f; } .svc-chip.wo.st-completed, .svc-chip.wo.st-invoiced { border-left-color: #9aa5b4; opacity: .7; }
.svc-chip.wo.pr-emergency { box-shadow: inset 0 0 0 1px #c62f2f; }
.svc-chip.blk.k-project { border-left-color: #2563c9; background: #eef4fe; } .svc-chip.blk.k-time_off { border-left-color: #9aa5b4; background: #f1f2f4; color: #555; }
.svc-chip.blk.k-shop, .svc-chip.blk.k-training { border-left-color: #0e7c86; background: #e9f6f7; } .svc-chip.blk.k-other { border-left-color: #888; }
.svc-side .svc-chip { margin-bottom: 6px; }
.svc-legend { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; } .svc-legend .svc-chip { display: inline-block; margin: 0; cursor: default; }
.svc-day { display: grid; grid-template-columns: 150px 1fr; border-bottom: 1px solid var(--line2); min-width: 900px; }
.svc-dayh { position: sticky; top: 0; background: #eef1f5; z-index: 2; height: 26px; font-size: 11.5px; }
.svc-tl { position: relative; min-height: 56px; }
.svc-dayh .svc-tl span { position: absolute; top: 5px; transform: translateX(-50%); color: var(--muted); white-space: nowrap; }
.svc-dayh .svc-tl span:first-child { transform: none; }
.svc-tl i { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line2); }
.svc-nowline { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--red); z-index: 1; }
.svc-bar { position: absolute; top: 4px; bottom: 4px; padding: 0 1px; } .svc-bar .svc-chip { height: 100%; box-sizing: border-box; margin: 0; }
.svc-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.svc-pick { border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; background: #fff; cursor: pointer; min-width: 170px; }
.svc-pick.busy { border-color: #e8b04b; background: #fffaf0; } .svc-busy { font-size: 11px; color: #a35b00; margin-top: 2px; }
.svc-wowin { max-height: 74vh; overflow: auto; padding-right: 4px; }
.svc-fp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.svc-fp h3 { margin: 0 0 4px; font-size: 13px; }
.svc-photos { display: flex; flex-wrap: wrap; gap: 6px; } .svc-photos img { width: 84px; height: 84px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.svc-act { max-height: 180px; overflow: auto; border: 1px solid var(--line2); border-radius: 4px; padding: 6px 8px; background: #fafbfc; font-size: 12px; }
.svc-act > div { padding: 2px 0; } .svc-act > div.note { font-weight: 600; } .svc-act > div.note .muted { font-weight: 400; }
table.svc-ed input { width: 100%; box-sizing: border-box; }
table.svc-wot tbody tr { cursor: pointer; }
.svc-area { margin-right: 8px; white-space: nowrap; font-size: 12px; color: var(--txt); display: inline-flex; align-items: center; gap: 3px; }
.svc-area input[type=checkbox], .svc-pick input, .svc-picks input { width: auto; margin: 0; }
/* sent → opened → accepted */
.svc-ack { display: inline-block; min-width: 14px; margin-right: 3px; font-size: 11px; text-align: center; }
.svc-ack.ok { color: #1f8a4c; font-weight: 700; } .svc-ack.seen { color: #2563c9; } .svc-ack.sent { color: #9aa5b4; }
.svc-ackl { font-size: 11px; color: var(--muted); margin-top: 2px; }
@media (max-width: 1100px) { .svc-main { flex-direction: column; } .svc-side { width: auto; max-height: none; } }
.ok-t { color: var(--green); }

/* website brand: Studebaker Electric Connect */
.brand .brand-sec { display: inline-block; vertical-align: middle; font-size: 13px; line-height: 1.15; }
.brand .brand-sec b { font-size: 16px; }
#nav.nav-off { display: none; }
