/* Jobs & site module — office screens. Ashtons house style: hairlines, brass ≤10%, graphite buttons. */
.jhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.jhead h1 { font-size: 1.75rem; margin: .15rem 0 0; }
.jhead .sub { color: var(--muted); margin-top: .25rem; font-size: .95rem; }
.jhead .sub .ref { font-family: 'Manrope'; font-size: .8rem; border: 1px solid var(--line); padding: .05rem .4rem; border-radius: 2px; background: #fff; color: var(--ink); }
.jhead .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.btn.brass { background: var(--brass); border-color: var(--brass); color: var(--ink); font-weight: 600; } .btn.brass:hover { background: #b8925a; }
.jlink { color: inherit; text-decoration: none; } .jlink:hover { text-decoration: underline; }

/* KPI row: figures divided by hairlines, not cards */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 0 1.2rem; }
.kpis > div { padding: .8rem 1rem; border-left: 1px solid var(--line); cursor: default; } .kpis > div:first-child { border-left: 0; }
.kpis > div[data-st] { cursor: pointer; } .kpis > div[data-st]:hover { background: #fff; }
.kpis b { display: block; font-family: 'Manrope'; font-size: 2rem; font-weight: 700; line-height: 1.1; }
.kpis span { font-family: 'Manrope'; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.kpis .ok b { color: #2F6B45; } .kpis .warn b { color: var(--brass-deep); } .kpis .danger b { color: #A33A2B; }

/* Status dot & chip */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: .35rem; border: 1px solid rgba(0,0,0,.08); }
.dot.hollow { background: #fff !important; border: 2px solid #6B6F75; }
.chip { display: inline-block; font-family: 'Manrope'; font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: .2rem .5rem; border-radius: 2px; background: var(--limestone); color: var(--ink); white-space: nowrap; }
.chip.ok { background: #E3EDE6; color: #2F6B45; } .chip.warn { background: #F1E7D6; color: var(--brass-deep); } .chip.danger { background: #F4E1DE; color: #A33A2B; } .chip.info { background: #E1E8EE; color: #35576E; }

/* Layout: areas | drawing | door panel */
.jgrid { display: grid; grid-template-columns: 200px minmax(0, 1fr) 320px; gap: 1.2rem; align-items: start; }
.areas h4, .lbl { font-family: 'Manrope'; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 .4rem; padding-bottom: .4rem; border-bottom: 1px solid var(--ink); }
.areas .blk { font-family: 'Manrope'; font-weight: 700; padding: .55rem 0 .3rem; }
.areas a { display: block; padding: .45rem .7rem; color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); cursor: pointer; }
.areas a:hover { color: var(--ink); background: #fff; }
.areas a.on { color: var(--ink); font-weight: 700; background: var(--limestone); border-left: 3px solid var(--brass); }
.dwg { background: #fff; border: 1px solid var(--line); }
.dwg-bar { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .6rem .8rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dwg-bar h3 { margin: 0; font-size: 1rem; } .dwg-bar h3 small { font-weight: 500; color: var(--muted); font-family: 'Instrument Sans'; }
.plan { position: relative; overflow: hidden; background: #FBFAF7; touch-action: none; user-select: none; cursor: grab; height: 560px; }
.plan.adding { cursor: crosshair; }
.plan .stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.plan .stage img { display: block; pointer-events: none; }
.plan .zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 5; }
.plan .zoom button { width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; font-size: 1.1rem; cursor: pointer; border-radius: 2px; }
.pin { position: absolute; width: 26px; height: 34px; margin: -34px 0 0 -13px; cursor: pointer; z-index: 2; }
.pin svg { width: 100%; height: 100%; overflow: visible; filter: none; }
.pin.sel { width: 40px; height: 52px; margin: -52px 0 0 -20px; z-index: 3; }
.pin .lab { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); font-family: 'Manrope'; font-size: 10px; font-weight: 700; background: rgba(255,255,255,.85); padding: 0 3px; white-space: nowrap; display: none; }
.plan.labels .pin .lab, .pin.sel .lab { display: block; }
.pin.dragging { opacity: .7; }
.legend2 { display: flex; gap: 1rem; flex-wrap: wrap; padding: .6rem .8rem; border-top: 1px solid var(--line); font-size: .86rem; }
.legend2 span { cursor: pointer; } .legend2 span.off { opacity: .35; }
.dwg-empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }

.doorpanel { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--brass); padding: 1rem 1.1rem; position: sticky; top: 76px; }
.doorpanel .hd { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.doorpanel h2 { font-size: 1.35rem; margin: 0; }
.doorpanel .loc { color: var(--muted); margin: .4rem 0 .8rem; }
ol.nsteps { list-style: none; padding: 0; margin: 0 0 .9rem; counter-reset: s; }
ol.nsteps li { counter-increment: s; padding: .45rem 0 .45rem 2.1rem; position: relative; border-bottom: 1px solid var(--line); }
ol.nsteps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: .45rem; font-family: 'Manrope'; font-weight: 700; color: var(--brass-deep); }
ol.nsteps li .chip { float: right; margin-left: .5rem; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: .4rem 0 .6rem; }
.thumbs a, .thumbs div { position: relative; display: block; aspect-ratio: 1; background: var(--limestone); overflow: hidden; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs span { position: absolute; left: 4px; bottom: 3px; font-size: .7rem; color: #fff; text-shadow: 0 0 3px #000; }
.photos-lg { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: .4rem 0 1rem; }
.photos-lg a { display: block; position: relative; aspect-ratio: 3/4; background: var(--limestone); overflow: hidden; }
.photos-lg img { width: 100%; height: 100%; object-fit: cover; }
.photos-lg span { position: absolute; left: 8px; bottom: 6px; font-size: .8rem; color: #fff; text-shadow: 0 0 4px #000; }
.btnrow { display: flex; gap: .5rem; flex-wrap: wrap; } .btnrow .btn { flex: 1; justify-content: center; }

/* Review */
.rq { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.rq-list a { display: block; padding: .8rem 1rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); background: transparent; }
.rq-list a:hover { background: #fff; } .rq-list a.on { background: var(--limestone); border-left: 3px solid var(--brass); }
.rq-list .t { display: flex; justify-content: space-between; } .rq-list b { font-family: 'Manrope'; font-size: 1.02rem; } .rq-list small { color: var(--muted); }
.rq-sheet { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--brass); padding: 1.3rem 1.5rem; }
.rq-sheet h2 { font-size: 1.45rem; margin: 0; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }
.kvl { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.kvl b { font-family: 'Manrope'; white-space: nowrap; }
.trail li .who { display: block; color: var(--muted); font-size: .88rem; }
.trail li.wait { font-weight: 700; }
.btn.danger-outline { color: #A33A2B; border-color: #A33A2B; background: #fff; }

/* Planner */
.plan-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 1.2rem; align-items: start; }
table.pl { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; border: 1px solid var(--line); }
table.pl th { background: var(--navy); color: #F3F0EA; text-align: left; padding: .7rem .7rem; font-family: 'Manrope'; font-size: .9rem; font-weight: 600; }
table.pl th:first-child { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; width: 150px; }
table.pl th.today { box-shadow: inset 0 -3px 0 var(--brass); }
table.pl td { border: 1px solid var(--line); vertical-align: top; padding: .4rem; height: 120px; }
table.pl td.who { padding: .7rem; } table.pl td.who b { font-family: 'Manrope'; display: block; } table.pl td.who small { color: var(--muted); }
table.pl td.off { background: var(--limestone); color: var(--muted); font-size: .9rem; }
table.pl td.drop { background: #F6F1E7; outline: 2px dashed var(--brass); outline-offset: -3px; }
.vb { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--ink); padding: .4rem .5rem; margin-bottom: .35rem; font-size: .82rem; cursor: grab; line-height: 1.35; }
.vb b { font-family: 'Manrope'; display: block; font-size: .86rem; } .vb .tm { color: var(--muted); }
.vb.k-install { border-left-color: #35576E; } .vb.k-further { border-left-color: #A33A2B; } .vb.k-noaccess { border-left-color: #6B6F75; } .vb.k-survey, .vb.k-inspection { border-left-color: var(--brass); } .vb.k-variation { border-left-color: #8A6A36; }
.tp-item { padding: .65rem 0; border-bottom: 1px solid var(--line); cursor: grab; }
.tp-item b { font-family: 'Manrope'; display: block; } .tp-item small { color: var(--muted); }
.kleg div { padding: .25rem 0 .25rem .7rem; border-left: 4px solid var(--ink); margin: .35rem 0; }
.mcal { display: grid; grid-template-columns: repeat(7, 1fr); border-left: 1px solid var(--line); border-top: 1px solid var(--line); background: #fff; }
.mcal > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 110px; padding: .3rem; font-size: .8rem; }
.mcal .dh { min-height: 0; background: var(--navy); color: #F3F0EA; font-family: 'Manrope'; padding: .4rem; }
.mcal .other { background: #F8F6F1; color: var(--muted); } .mcal .dn { font-family: 'Manrope'; font-weight: 700; }
.mcal .vb { padding: .2rem .35rem; margin-bottom: .2rem; font-size: .74rem; }

/* User access */
.acc { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.acc-list a { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.acc-list a:hover { background: #fff; } .acc-list a.on { background: var(--limestone); border-left: 3px solid var(--brass); }
.acc-list b { font-family: 'Manrope'; display: block; } .acc-list small { color: var(--muted); }
.acc-list .full { background: var(--navy); color: #fff; font-family: 'Manrope'; font-size: .66rem; letter-spacing: .14em; padding: .25rem .5rem; border-radius: 2px; }
.acc-ed { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--brass); padding: 1.3rem 1.5rem; }
.acc-ed .cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1.4rem; }
.acc-ed .colh { font-family: 'Manrope'; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding-bottom: .4rem; border-bottom: 1px solid var(--ink); margin: 1rem 0 .4rem; }
.acc-ed .check { font-size: .98rem; }
.lockbox { background: var(--limestone); border-left: 3px solid var(--brass); padding: .9rem 1rem; }
.lockbox b { font-family: 'Manrope'; display: block; margin: .2rem 0; }
.summary-line { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .8rem; }
.modgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }

/* Forms builder */
.fb { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem; align-items: start; }
.fb-step { background: #fff; border: 1px solid var(--line); margin-bottom: .8rem; }
.fb-step > .h { display: flex; justify-content: space-between; align-items: center; padding: .55rem .8rem; border-bottom: 1px solid var(--line); background: #FBFAF7; gap: .5rem; }
.fb-f { display: flex; gap: .6rem; align-items: center; padding: .5rem .8rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.fb-f:hover { background: #F8F6F1; } .fb-f.sel { background: var(--limestone); }
.fb-f .ty { font-family: 'Manrope'; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brass-deep); width: 90px; flex: none; }
.fb-f .lb { flex: 1; } .fb-f .fl { color: var(--muted); font-size: .8rem; }
.licence-box { border-left: 3px solid var(--brass); background: #fff; padding: 1rem 1.1rem; margin-top: 1rem; border: 1px solid var(--line); }
.licence-box textarea { font-family: monospace; font-size: .78rem; }

.nav-badge { margin-left: auto; font-family: 'Manrope'; font-size: .72rem; color: var(--brass-light); font-weight: 700; }
.lightbox { position: fixed; inset: 0; background: rgba(18,20,23,.92); z-index: 200; display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 90vh; }
.lightbox .cap { position: absolute; bottom: 14px; color: #F3F0EA; font-size: .9rem; }

@media (max-width: 1200px) { .jgrid { grid-template-columns: 170px minmax(0, 1fr); } .jgrid .doorpanel { grid-column: 1 / -1; position: static; } }
@media (max-width: 1000px) { .rq, .acc, .plan-wrap, .fb { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(3, 1fr); } .acc-ed .cols3, .cols2, .modgrid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .jgrid { grid-template-columns: 1fr; } .plan { height: 420px; } .kpis { grid-template-columns: repeat(2, 1fr); } table.pl { min-width: 760px; } }

/* ---------- Fire door surveys ---------- */
.sv-kpis { grid-template-columns: repeat(6, 1fr); } .kpis .brass b { color: var(--brass-deep); }
.sv-kpis > div[data-f] { cursor: pointer; } .sv-kpis > div[data-f]:hover { background: #fff; }
.sv-foot { margin-top: 1.2rem; }
.sv-due .panel-head b { font-family: 'Manrope'; }
/* S3 entry by hand */
.se-door .se-grid { display: grid; grid-template-columns: 1fr .8fr 1fr 1.8fr 1fr .8fr 1.2fr auto; gap: .8rem; align-items: end; }
.se-door .fld { margin: 0; } .se-door .seg button { padding: .5rem .8rem; }
.se-cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.se-check .eyebrow, .se-defects .eyebrow { padding-bottom: .55rem; border-bottom: 1px solid var(--ink); margin-bottom: .2rem; }
.se-row { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.se-row > i { font-style: normal; font-family: 'Manrope'; font-weight: 700; font-size: 1.05rem; color: var(--brass-deep); }
.se-row > span { font-size: 1rem; }
.se-gaps { display: flex; flex-wrap: wrap; gap: .3rem .8rem; margin-top: .3rem; font-size: .82rem; color: var(--muted); align-items: center; }
.se-gaps input { width: 58px; padding: .2rem .35rem; margin-left: .2rem; }
.se-pfn { border-radius: 2px; border-color: #C9C0B1; } .se-pfn button { min-width: 58px; font-weight: 600; color: var(--ink); }
.se-pfn button.on { background: var(--ink); color: #fff; } .se-pfn button.on.fail { background: #A33A2B; }
.se-row.fail .se-pfn { border-color: #A33A2B; }
.se-check.na, .se-defects.na { opacity: .55; }
.se-defects { border-top: 3px solid var(--brass); }
.se-def { padding: .7rem 0; border-bottom: 1px solid var(--line); } .se-def > b { font-family: 'Manrope'; display: block; margin-bottom: .35rem; }
.se-def textarea { width: 100%; } .se-def-r { display: flex; gap: .5rem; margin-top: .4rem; align-items: center; } .se-def-r select { flex: 1; min-width: 0; } .se-def-r input { width: 64px; }
.se-ph { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; } .se-ph span { position: relative; } .se-ph img { width: 64px; height: 64px; object-fit: cover; display: block; border: 1px solid var(--line); }
.se-ph .icon-btn { position: absolute; top: -6px; right: -6px; background: #fff; border: 1px solid var(--line); border-radius: 50%; width: 20px; height: 20px; font-size: .7rem; padding: 0; }
.se-add { width: 64px; height: 64px; border: 1px dashed #C9C0B1; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--muted); cursor: pointer; }
.se-add input, .linkish input { display: none; }
.se-adddef { width: 100%; justify-content: center; border-style: dashed; margin-top: .8rem; }
.se-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem .9rem; } .se-grid2 .se-wide { grid-column: 1 / -1; }
.se-photos { border-top: 1px solid var(--line); padding-top: .6rem; color: var(--muted); }
.linkish { color: var(--brass-deep); text-decoration: underline; cursor: pointer; background: none; border: 0; padding: 0; font: inherit; }
.se-nav { margin-top: 1rem; }
/* S2 CSV import */
.steps4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin: 0 0 1.2rem; }
.steps4 div { border-top: 2px solid var(--limestone); padding-top: .5rem; font-family: 'Manrope'; font-weight: 600; color: var(--muted); }
.steps4 div.done { border-color: var(--brass); color: var(--brass-deep); } .steps4 div.cur { border-color: var(--ink); color: var(--ink); }
.imp-grid { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 1.4rem; align-items: start; }
.imp-meta { font-family: 'Manrope'; font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding-bottom: .55rem; border-bottom: 1px solid var(--ink); margin-bottom: .8rem; }
.imp-map > div { display: grid; grid-template-columns: minmax(0, 1fr) 1.4rem minmax(0, 1fr); align-items: center; padding: .45rem .3rem; border-bottom: 1px solid var(--line); }
.imp-map > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .imp-map > div i { font-style: normal; color: var(--brass); }
.imp-map > div.un { background: #F6EBD9; } .imp-map select { padding: .25rem .4rem; }
.imp-map { max-height: 520px; overflow: auto; margin-bottom: .6rem; }
.imp-check { border-top: 3px solid var(--brass); }
.imp-rows th { background: var(--limestone); } .imp-rows tr.ready td:last-child { color: #2F6B45; } .imp-rows tr.warning { background: #F6EBD9; } .imp-rows tr.warning td:last-child { color: #8A5A16; }
.imp-rows tr.error { background: #F4E1DE; } .imp-rows tr.error td:last-child, .imp-rows tr.error td:nth-child(2) { color: #A33A2B; }
.imp-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: .9rem; margin-top: .6rem; }
@media (max-width: 1100px) { .se-door .se-grid { grid-template-columns: repeat(3, 1fr); } .se-cols, .imp-grid { grid-template-columns: 1fr; } .sv-kpis { grid-template-columns: repeat(3, 1fr); } }
#svTable td:nth-child(1), #svTable td:nth-child(3), #svTable td:nth-child(5) { white-space: nowrap; }
.imp-map .linkish { text-align: left; } .imp-left #impPName { width: 100%; margin-top: .4rem; }
.panel table.grid input { width: 100%; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 4px; font: inherit; background: #fff; }

/* Modules (super administrator) */
.addon-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .6rem; }
.addon { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .7rem; align-items: start; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--limestone); padding: .75rem .9rem; cursor: pointer; }
.addon.on { border-left-color: var(--brass); } .addon input { margin-top: .2rem; width: 18px; height: 18px; }
.addon b { font-family: 'Manrope'; display: block; } .addon small { color: var(--muted); display: block; line-height: 1.35; margin-top: .15rem; }
.addon:has(input:disabled) { cursor: default; opacity: .75; }
