:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#173449;background:#f2f5f5;font-size:16px}*{box-sizing:border-box}body{margin:0}header{background:#102f42;color:#fff;padding:32px max(22px,calc((100% - 920px)/2)) 30px;border-bottom:5px solid #64c4b5}.brand{font-size:12px;letter-spacing:2px;font-weight:700}.brand span{color:#a9cccf;font-size:10px;margin-left:16px;letter-spacing:1px}h1{font-family:Georgia,serif;font-size:38px;margin:16px 0 6px;font-weight:400}header p{color:#c6dadd;margin:0}main{max-width:964px;margin:0 auto;padding:24px 22px 60px}h2{font-size:23px;margin:12px 0 20px}h3{margin:0 0 12px;font-size:18px}button,input,select,textarea{font:inherit}button{background:#116d70;color:white;border:0;border-radius:9px;padding:12px 17px;min-height:46px;cursor:pointer;font-weight:600}button:disabled{opacity:.5;cursor:wait}.secondary{background:#e9eeee;color:#24434e}label{display:block;font-size:13px;font-weight:600;margin-bottom:15px}input,select,textarea{display:block;width:100%;padding:12px;border:1px solid #b7c9cf;border-radius:8px;margin-top:6px;background:white;color:#173449;font-size:16px;min-height:46px}textarea{min-height:80px;resize:vertical}input:focus,select:focus,textarea:focus,button:focus-visible{outline:3px solid #75cbbb;outline-offset:2px}.panel,.record{background:#fff;border:1px solid #dce5e7;border-radius:13px;padding:22px;margin-bottom:16px}.heading{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:18px}.heading h2{margin:0}.filters{display:flex;gap:14px}.grow{flex:1}.filters label:last-child{min-width:220px}.muted{color:#526d78;font-size:14px;line-height:1.5}nav{display:flex;gap:6px;overflow:auto;margin-bottom:28px;border-bottom:1px solid #d3dfe1;padding-bottom:12px}nav button{background:transparent;color:#526d78;white-space:nowrap}nav .active{background:#d9efea;color:#165c56}.record h3{margin:12px 0;line-height:1.45}.record p{white-space:pre-wrap;line-height:1.55;margin:10px 0}.meta{display:flex;gap:10px;flex-wrap:wrap;color:#52717d;font-size:13px}.badge{background:#edf3f4;padding:5px 9px;border-radius:5px}.record details{margin-top:16px;border-top:1px solid #edf1f2;padding-top:15px}summary{cursor:pointer;font-weight:600}.record strong{font-size:13px;color:#526d78;display:block}dialog{border:0;border-radius:16px;width:min(640px,calc(100% - 24px));max-height:92dvh;padding:24px;color:#173449}dialog::backdrop{background:#102f4280}#message{color:#a13726;white-space:pre-wrap}#editorError{color:#a13726}#login{max-width:480px;margin:24px auto}[hidden]{display:none!important}.audit{border-bottom:1px solid #e0e9eb;padding:10px 0;font-size:14px}@media(max-width:600px){header{padding:24px 20px}main{padding:20px 14px 45px}.filters{display:block}.heading{align-items:flex-start}.heading h2{font-size:21px}.panel,.record{padding:18px}nav{gap:0}nav button{padding:11px}h1{font-size:34px}}

.record details button+button{margin-left:10px}button.danger{color:#a13726;background:#fff0ed}

fieldset{border:1px solid #dce5e7;border-radius:9px;margin:0 0 18px;padding:12px}
.check-option{display:flex;align-items:center;gap:8px;margin:6px 0}
.check-option input{width:auto;min-height:0;margin:0}
.usage-row,.stock-form,.report-filters{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}
.usage-row label,.stock-form label{margin-bottom:0}
.usage-row label:first-child{flex:1;min-width:150px}
.usage-row label:nth-child(2),.stock-form label{max-width:140px}
.usage-row{margin-bottom:10px}
.stock-form{margin-top:12px}
.report-filters label{flex:1;min-width:150px}
#reportPreview{background:white;border:1px solid #dce5e7;border-radius:13px;padding:28px}
#reportPreview:empty{display:none}
.report-title{border-bottom:3px solid #116d70;padding-bottom:12px;margin-bottom:16px}
.report-title h2{font-family:Georgia,serif;font-size:30px;margin:8px 0}
.report-title p{margin:5px 0}
.report-eyebrow,.report-meta{font-weight:700;color:#116d70;font-size:13px}
.report-eyebrow{letter-spacing:1.4px}
.report-entry{border-bottom:1px solid #dce5e7;padding:10px 0 14px}
.report-entry h3{margin:5px 0}
.report-entry p{margin:4px 0;white-space:pre-wrap;overflow-wrap:anywhere}
@page{margin:0.65in}
@media print{
  body.printing-report{background:white;color:#152c36;font-size:10pt}
  body.printing-report>header,body.printing-report>dialog,
  body.printing-report main>*:not(#workspace),body.printing-report #workspace>*:not(#reports),
  body.printing-report #reports>*:not(#reportPreview){display:none!important}
  body.printing-report main,body.printing-report #reportPreview{max-width:none;margin:0;padding:0;border:0}
  .report-entry{break-inside:avoid}
  .report-entry h3,.report-meta{break-after:avoid}
  .report-entry p{orphans:2;widows:2}
  .report-title{break-after:avoid}
}

.photo{margin:10px 0}
.photo img{display:block;max-width:100%;max-height:420px;border-radius:8px}
#photoViewer{width:min(1200px,calc(100vw - 16px));height:calc(100vh - 24px);height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);max-width:calc(100vw - 16px);padding:16px;overflow:hidden}
#photoViewer[open]{display:flex;flex-direction:column;gap:12px}
#photoViewer::backdrop{background:rgba(6,23,34,.85)}
.photo-viewer-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}
.photo-viewer-heading h2{margin:0;font-size:20px}
.photo-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex-shrink:0}
#photoZoomLabel{min-width:80px;text-align:center;font-size:14px}
#photoViewport{flex:1;min-height:0;overflow:auto;background:#132a37;border-radius:8px;touch-action:pan-x pan-y pinch-zoom;overscroll-behavior:contain}
#photoViewerImage{display:block;max-width:none;max-height:none;margin:12px auto;object-fit:contain}
#photoViewerImage[hidden]{display:none}
#photoViewerMessage:empty{display:none}
#photoViewerMessage{margin:0;color:#a13726}
#createPartError{color:#a13726}
#createPartForm>fieldset{min-width:0}
.photo-viewer-help{margin:0;font-size:13px;color:#526d78;flex-shrink:0}
#taskEditError{color:#a13726}

.job-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
.report-statuses{display:flex;gap:16px;flex-wrap:wrap}
.usage-row{border-bottom:1px solid #dce5e7;padding:12px 0;align-items:end}
.usage-row label{flex:1;min-width:110px}
.usage-row label:first-child,.usage-row label:last-of-type{min-width:190px;max-width:none;flex:2}
@media(max-width:600px){.filters{display:block}.usage-row{display:grid;grid-template-columns:1fr 1fr}.usage-row label:first-child,.usage-row label:last-of-type{grid-column:1/-1;min-width:0}.job-actions button{flex:1}}
