@charset "UTF-8";
:root{--ink:#182126;--muted:#657079;--orange:#d84412;--line:#dce1e2;--paper:#fff;--bg:#f3f5f4;--radius:14px}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.6 "Segoe UI",Arial,sans-serif}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button,.button{display:inline-flex;justify-content:center;align-items:center;gap:8px;border:1px solid transparent;background:var(--orange);color:white;padding:12px 20px;font-weight:650;border-radius:7px;cursor:pointer;line-height:1.4;min-height:46px;text-align:center}button:hover,.button:hover{filter:brightness(.93)}button:disabled{opacity:.6;cursor:wait}.secondary{background:white;border-color:var(--line);color:var(--ink)}.text-button{background:transparent;color:var(--orange);padding:4px 0;min-height:40px}.quiet{background:transparent;border-color:#586068;color:#fff;padding:7px 13px;min-height:36px}.topbar{background:#172026;color:#fff;display:flex;justify-content:space-between;align-items:center;padding:18px max(24px,calc((100vw - 1240px)/2));gap:28px;border-bottom:4px solid var(--orange)}.brand{display:flex;align-items:center;gap:13px;font-size:20px;font-weight:700}.brand img{width:62px;height:48px;object-fit:contain}.brand small{display:block;font-size:9px;letter-spacing:2px;color:#c7ced0;font-weight:500}.topbar nav{display:flex;align-items:center;gap:24px;font-size:14px}.topbar form{margin:0}.topbar a:hover{color:#ff9878}.wrap{max-width:1240px;margin:0 auto;padding:44px 24px 60px}.footer{padding:20px 24px;color:var(--muted);font-size:12px;text-align:center;border-top:1px solid var(--line)}h1,h2,h3{line-height:1.2;letter-spacing:-.025em;margin:0 0 16px}h1{font-size:clamp(30px,3.2vw,44px);font-weight:700}h2{font-size:24px}h3{font-size:18px}p{margin:0 0 20px}small,.hint{font-size:12px;color:var(--muted)}.muted{color:var(--muted);font-weight:400}.eyebrow{display:block;color:#b83b11;font-weight:750;letter-spacing:1.8px;font-size:11px;margin-bottom:12px}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:25px;margin:6px 0 30px}.page-heading p{color:var(--muted);margin:0}.panel{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:30px;margin-bottom:24px;box-shadow:0 3px 8px #17202603}.columns{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:28px}.stat{background:white;border:1px solid var(--line);border-radius:12px;padding:20px 24px;position:relative}.stat span{font-size:13px;color:var(--muted);display:block}.stat strong{display:block;font-size:36px;line-height:1.5}.status-dot{position:absolute;bottom:28px;right:25px;height:10px;width:10px;border-radius:50%;background:#8c98a1}.status-dot.in_progress{background:#d84412}.status-dot.ready{background:#b78b23}.status-dot.signed{background:#168256}.list-header{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:20px}.list-header h2{white-space:nowrap;margin:0}.filters{display:flex;gap:10px;align-items:center;flex:1;justify-content:flex-end}.filters input{max-width:310px}.filters select{width:170px}label{display:block;font-size:13px;font-weight:650;margin-bottom:18px}input,textarea,select{display:block;width:100%;border:1px solid #bcc6cb;border-radius:7px;padding:12px 13px;background:#fff;color:var(--ink);margin-top:7px;min-height:46px}input:focus,textarea:focus,select:focus{outline:2px solid #e87750;outline-offset:2px}textarea{resize:vertical}.filters input,.filters select{margin:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}.job-form{max-width:960px}.job-form h2{margin-top:12px;margin-bottom:24px;padding-bottom:16px;border-bottom:1px solid var(--line)}.job-form h2:not(:first-of-type){margin-top:32px}.section-no{color:var(--orange);font-size:14px;margin-right:12px}.form-bottom{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:24px;padding-top:24px;border-top:1px solid var(--line)}.table-scroll{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left}th{font-size:10px;text-transform:uppercase;letter-spacing:1.2px;color:var(--muted);background:#f5f7f6;padding:14px}td{padding:19px 14px;border-bottom:1px solid #e9ecec;font-size:13px}td small{display:block;margin-top:3px}td strong{font-weight:650}td:nth-child(4){white-space:nowrap}.job-number{font-weight:700;color:#bc3d13;white-space:nowrap}.badge{display:inline-flex;border-radius:100px;padding:5px 11px;background:#edf0f2;color:#52606b;font-size:11px;font-weight:650;white-space:nowrap}.badge.in_progress{background:#fff0e9;color:#ad3813}.badge.ready{background:#fff6dc;color:#83600c}.badge.signed{background:#e5f4ec;color:#1a6b48}.pagination{display:flex;justify-content:flex-end;align-items:center;gap:20px;font-size:12px;color:var(--muted);padding-top:20px}.pagination span{margin-right:auto}.empty{text-align:center;padding:40px 20px}.empty-icon{display:block;margin:0 auto 18px;width:64px;height:64px;background:#fff0e9;color:var(--orange);border-radius:50%;font-size:36px;line-height:64px}.empty p{color:var(--muted)}.notice,.error{padding:15px 18px;border-radius:8px;margin-bottom:24px;background:#e8f5ed;color:#246a44;border:1px solid #c7e6d3}.error{background:#fff0ed;color:#9b3019;border-color:#edc4b9}.error[hidden]{display:none}.back{display:block;color:var(--muted);font-size:13px;margin-bottom:15px}.actions{display:flex;gap:10px;flex-wrap:wrap}.record{padding:36px}.record-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;border-bottom:2px solid var(--orange);padding-bottom:20px}.record-heading h2{margin-bottom:0}.record-heading .badge{flex-shrink:0}.record-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:25px;margin:28px 0}dt{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.7px}dd{margin:5px 0 0;font-weight:650;overflow-wrap:anywhere}.record-section{border-top:1px solid var(--line);padding-top:24px;margin-top:26px}.prose{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8}.photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.photo-grid figure{margin:0;break-inside:avoid}.photo-grid img{width:100%;aspect-ratio:4/3;object-fit:cover;border:1px solid var(--line);border-radius:7px}.photo-grid figcaption{padding-top:8px;font-size:13px;overflow-wrap:anywhere}.photo-grid small{display:block}.signature-image{display:block;width:min(100%,450px);height:auto;border-bottom:1px solid var(--line);margin:15px 0}.record-hash{font-size:9px;overflow-wrap:anywhere;display:block}.draft-label{color:#8b6527;background:#fff8e8;padding:14px 18px;margin:26px 0 0;font-size:12px}.checkbox{display:flex;align-items:flex-start;gap:10px;font-weight:400;margin-top:16px}.checkbox input{width:18px;height:18px;min-height:0;flex-shrink:0;margin-top:4px}canvas{display:block;width:100%;height:auto;aspect-ratio:10/3;background:#fff;border:2px dashed #aab8bd;border-radius:8px;touch-action:none;cursor:crosshair}summary{cursor:pointer;font-weight:650}.team-person{padding:22px 0;border-top:1px solid var(--line)}.team-person p{font-size:12px;color:var(--muted);margin:5px 0 12px}.team-person details{margin-top:12px}.activity{padding:0;list-style:none}.activity li{padding:14px 0;border-bottom:1px solid var(--line);font-size:13px}.activity span{display:block;color:var(--muted);font-size:12px}.auth{max-width:470px;margin:25px auto}.auth h1{font-size:32px}.auth form>button{width:100%;margin:4px 0 18px}.auth p{color:var(--muted)}.login-layout{display:grid;grid-template-columns:1.15fr 1fr;align-items:center;gap:90px;min-height:65vh}.login-intro h1{font-size:clamp(42px,5vw,64px);letter-spacing:-2.5px;line-height:1.07}.login-intro p{font-size:18px;max-width:450px;color:var(--muted);margin:26px 0 34px}.steps{display:grid;gap:12px;font-size:13px;color:#526169;border-top:1px solid var(--line);padding-top:24px;max-width:380px}.login-layout .auth{width:100%;padding:36px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(max-width:1000px){.list-header{align-items:stretch;flex-direction:column}.filters{justify-content:flex-start}.filters input{max-width:none}.record-grid{grid-template-columns:repeat(2,1fr)}.login-layout{gap:30px}.topbar{padding:16px 24px}.topbar nav{gap:14px}.photo-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.topbar{flex-direction:column;align-items:flex-start;gap:16px}.topbar nav{width:100%;flex-wrap:wrap;font-size:12px;gap:16px}.topbar nav form{margin-left:auto}.brand{font-size:18px}.wrap{padding:26px 16px 40px}.page-heading{align-items:flex-start;flex-direction:column;gap:18px}.page-heading>.button{width:100%}h1{font-size:31px}h2{font-size:21px}.panel,.record{padding:20px}.stats{grid-template-columns:1fr 1fr;gap:12px}.stat{padding:16px}.stat strong{font-size:30px}.stat span{font-size:11px}.columns,.form-grid,.login-layout{grid-template-columns:1fr;gap:0}.login-intro{padding-top:12px}.login-intro h1{font-size:43px}.login-intro p{font-size:16px;margin:18px 0}.steps{display:none}.login-layout .auth{padding:24px}.auth{margin:24px auto}.filters{flex-wrap:wrap}.filters input{flex-basis:100%}.filters select{flex:1}.filters button{flex:0}.record-heading{align-items:flex-start;flex-direction:column}.record-heading h2 span{display:block;font-size:15px;margin-top:10px}.record-grid{gap:18px}.record-grid dd{font-size:13px}.photo-grid{gap:12px}.form-bottom{align-items:stretch;flex-direction:column}.actions{width:100%}.actions>*{flex:1}.table-scroll{margin:0 -8px}th,td{padding:14px 10px}td:nth-child(3),th:nth-child(3),td:nth-child(4),th:nth-child(4){display:none}.badge{font-size:10px;padding:4px 7px}.record-hash{font-size:8px}}
@media print{@page{size:A4;margin:16mm}body{background:white;color:#111;font-size:11px}.no-print,.topbar nav,.footer,.notice{display:none!important}.topbar{padding:0 0 12px;background:white;color:#111;border:0}.brand{font-size:17px}.brand small{color:#555}.wrap{padding:0;max-width:none}.panel.record{padding:0;border:0;box-shadow:none}.record h2{font-size:20px}.record-grid{grid-template-columns:repeat(4,1fr);gap:16px}.record-grid dd{font-size:11px}.record-section h3{break-after:avoid}.record-section{margin-top:18px;padding-top:16px}.photo-grid{grid-template-columns:repeat(2,1fr)}.photo-grid img{max-height:220px;object-fit:contain}.signed-block{break-inside:avoid}.signature-image{max-width:340px}.record-hash{font-size:8px}.badge{border:1px solid #999}.record-heading{flex-direction:row}a{color:inherit}}

.photo-preview{margin:16px 0 24px}.photo-preview:empty{display:none}#photo-upload{scroll-margin-top:24px}

.signature-entry{min-width:0;border:1px solid var(--line);padding:18px;border-radius:10px;margin:0 0 24px}.signature-entry legend{font-size:18px;font-weight:700;padding:0 8px}.signature-entry .checkbox{margin-bottom:0}

.role-tag{display:block;font-size:10px;line-height:1.4;color:#e8b49e}.danger{background:#b12626;color:white}.danger-outline{background:white;border-color:#bd4545;color:#a61f1f}.delete-panel{max-width:720px;margin:20px auto}.delete-panel .checkbox{margin:24px 0}

.checklist-row{margin:1rem 0;padding:1rem;border:1px solid #cad3d8;border-radius:12px}.commission-item{margin-top:1rem}.commission-item .photo-grid img{width:100%;max-height:320px;object-fit:contain}.commission-item form{margin:1rem 0}@media print{.no-print{display:none!important}.commission-item{break-inside:auto}.commission-item figure{break-inside:avoid}}

/* Keep selected photos inside the form, including before they are uploaded. */
.photo-preview{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px;max-width:100%;min-width:0}
.photo-preview figure{margin:0;min-width:0;max-width:100%}
.photo-preview img{display:block;width:100%;max-width:100%;height:240px;object-fit:contain;background:#f1f4f5;border-radius:8px}
.photo-preview figcaption,.commission-item figcaption{overflow-wrap:anywhere;font-size:12px}
@media screen and (max-width:700px){.commission-item .photo-grid{grid-template-columns:minmax(0,1fr)}.commission-item .photo-grid img{height:240px;max-height:240px;object-fit:contain}.commission-item .photo-grid figure{min-width:0}}

.photo-open{display:block;width:100%;max-width:100%;min-width:0;padding:0;border:0;background:transparent;cursor:zoom-in}
.photo-grid a:has(img){cursor:zoom-in}
body.photo-viewer-open{overflow:hidden}
.photo-viewer{position:fixed;inset:0;margin:0;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;padding:72px 12px 12px;border:0;background:#10171b;color:#fff;box-sizing:border-box}
.photo-viewer::backdrop{background:#10171b}
.photo-viewer img{display:block;width:100%;height:100%;object-fit:contain}
.photo-viewer-close{position:absolute;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));background:#fff;color:#172026;min-height:44px}
@media print{.photo-viewer{display:none!important}}

/* Compact A4 job-card printing; screen and commissioning layouts stay unchanged. */
@page jobcard{size:A4 portrait;margin:10mm}
@media print{
 body:has(.record){page:jobcard;font-size:10.5px;line-height:1.35}
 body:has(.record) .topbar{padding:0 0 5px;margin:0 0 5px}
 body:has(.record) .brand{font-size:13px;gap:8px}
 body:has(.record) .brand img{width:38px;height:28px}
 body:has(.record) .brand small{font-size:7px;letter-spacing:1px}
 .panel.record{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px 14px;margin:0;padding:0;border:0;border-radius:0;box-shadow:none}
 .record>*{grid-column:1 / -1;min-width:0}
 .record .record-heading{margin:0;padding:0;gap:8px}
 .record h2{font-size:16px;margin:0}
 .record h2 span{display:inline;font-size:12px}
 .record .eyebrow{font-size:8px;margin-bottom:3px;letter-spacing:.7px}
 .record .badge{font-size:8px;padding:3px 6px}
 .record .record-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px 12px;margin:3px 0}
 .record .record-grid dt{font-size:7px;margin:0}
 .record .record-grid dd{font-size:9px;line-height:1.3;margin:0;overflow-wrap:anywhere}
 .record .record-section{margin:0;padding:5px 0 0;border-top:1px solid #ccc}
 .record h3{font-size:10px;margin:0 0 3px}
 .record h4{font-size:9px;margin:4px 0 2px}
 .record p{margin:0 0 4px}
 .record .prose{font-size:10.5px;line-height:1.4;overflow-wrap:anywhere}
 .record .photo-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:3px 0 0}
 .record .photo-grid figure{margin:0;min-width:0;break-inside:avoid}
 .record .photo-grid img{display:block;width:100%;height:40mm;max-height:40mm;object-fit:contain;border-radius:3px}
 .record .photo-grid figcaption{font-size:7px;line-height:1.25;margin:3px 0 0;overflow-wrap:anywhere}
 .record .photo-grid small{font-size:6px}
 .record .signed-block{grid-column:auto;break-inside:avoid;align-self:start}
 .record .signature-image{display:block;width:100%;max-width:65mm;height:17mm;object-fit:contain;object-position:left center;margin:2px 0}
 .record .hint{font-size:7px}
 .record .record-hash{font-size:6px;overflow-wrap:anywhere}
 .record .draft-label{font-size:8px;margin:3px 0}
}

.inventory-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:20px}.inventory-list .panel{min-width:0;overflow-wrap:anywhere}.inventory-movement{border-bottom:1px solid var(--line);padding:12px 0;overflow-wrap:anywhere}.inventory-movement p{margin-bottom:5px}
.pdf-share-dialog{width:calc(100% - 32px);max-width:480px;border:1px solid var(--line);border-radius:14px;padding:24px;color:var(--ink);background:white}.pdf-share-dialog::backdrop{background:#172026aa}.pdf-share-dialog .button,.pdf-share-dialog button{margin:5px 5px 5px 0}@media print{.pdf-share-dialog{display:none!important}}

.job-asset{max-width:220px;white-space:normal;overflow-wrap:anywhere;line-height:1.4}

.project-table td,.project-table th{display:table-cell!important;vertical-align:top;overflow-wrap:anywhere}.project-table table{min-width:560px}.project-table td{max-width:280px}.project-table details{min-width:180px}.project-table details form{margin-top:12px}.topbar nav{flex-wrap:wrap}

.project-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.project-stats a:hover{border-color:var(--orange)}.machine-progress h2{overflow-wrap:anywhere}.progress-number{font-size:36px;color:var(--orange)}progress{display:block;width:100%;height:18px;accent-color:var(--orange);margin:12px 0 20px}@media(max-width:550px){.project-stats{grid-template-columns:1fr}.project-stats .stat{display:flex;align-items:center;justify-content:space-between;gap:12px}.project-stats small{display:none}}

.folder-breadcrumb{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0;overflow-wrap:anywhere}.folder-breadcrumb a{color:var(--orange);text-decoration:underline}.folder-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:16px}.folder-card{display:flex;flex-direction:column;gap:8px;padding:22px;border:1px solid var(--line);border-radius:10px;overflow-wrap:anywhere}.folder-card:hover{border-color:var(--orange);background:#fff8f4}.folder-symbol{font-size:30px}.folder-card strong{font-size:18px}.folder-card small{color:var(--muted)}

.machine-tabs{margin:20px 0}.project-stats{grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:700px){.project-stats{grid-template-columns:1fr 1fr}}@media(max-width:550px){.project-stats{grid-template-columns:1fr}}

.record-tab-group{margin:24px 0}.record-tab-group h3{font-size:14px;margin-bottom:10px}.record-tabs{display:flex;gap:5px;overflow-x:auto;border-bottom:2px solid var(--line);padding:2px 0 0}.record-tab{display:flex;align-items:center;gap:9px;flex-shrink:0;padding:12px 17px;border:1px solid var(--line);border-bottom:0;border-radius:8px 8px 0 0;background:#f5f7f6;font-weight:600;font-size:13px;max-width:320px;overflow-wrap:anywhere}.record-tab span{font-size:11px;background:#e4e9eb;border-radius:12px;padding:1px 7px}.record-tab.active{background:var(--orange);color:white;border-color:var(--orange)}.record-tab.active span{background:#ffffff30}.record-tab:hover{filter:brightness(.96)}.record-tab:focus-visible{outline:2px solid var(--orange);outline-offset:-3px}

.project-chart{display:grid;grid-template-columns:minmax(240px,1fr) minmax(260px,1fr);gap:35px;align-items:center}.machine-pie{display:block;width:min(100%,320px);height:auto;margin:0 auto}.pie-segment{cursor:pointer;stroke:white;stroke-width:2}.pie-segment.not_started{fill:#a9b6bf}.pie-segment.in_progress{fill:#d84412}.pie-segment.complete{fill:#168256}.pie-segment:hover,.pie-segment:focus{filter:brightness(.85);stroke:#172026;stroke-width:3}.pie-empty{fill:#edf0f2}.pie-total circle{fill:white}.pie-total text{text-anchor:middle;fill:#172026;font-family:inherit}.pie-total-number{font-size:34px;font-weight:750}.pie-total-label{font-size:12px}.pie-total:hover circle,.pie-total:focus circle{fill:#fff3ec}.pie-legend{display:flex;flex-direction:column;gap:12px}.chart-total,.chart-status{display:flex;align-items:center;gap:12px;padding:15px;border:1px solid var(--line);border-radius:8px}.chart-total strong,.chart-status strong{margin-left:auto;font-size:24px}.chart-status small{width:48px;text-align:right}.chart-dot{width:14px;height:14px;border-radius:50%;flex-shrink:0}.chart-dot.not_started{background:#a9b6bf}.chart-dot.in_progress{background:#d84412}.chart-dot.complete{background:#168256}.chart-total:hover,.chart-status:hover{border-color:var(--orange)}.chart-outstanding{color:var(--orange);padding:7px 0}.pie-legend .hint{margin:0}@media(max-width:700px){.project-chart{grid-template-columns:1fr;gap:18px}.machine-pie{max-width:270px}}
