/* OwlWorks JPPL 4.1.1 — Guided Operations UX
   This layer intentionally overrides the compact 4.0 presentation while
   retaining the established OWL brand tokens and backend control model. */

:root{
  --focus-ring:0 0 0 4px rgba(0,123,131,.20);
  --surface-raised:#ffffff;
  --surface-subtle:#f7fafb;
  --surface-accent:#edf7f7;
  --text-soft:#557084;
  --warning-soft:#fff7e7;
  --danger-soft:#fff1f0;
  --success-soft:#edf9f2;
}

html{scroll-behavior:smooth}
body{font-size:15px;line-height:1.45}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{
  outline:3px solid rgba(0,123,131,.48);outline-offset:2px
}
.small{font-size:13px}.field label{font-size:12px;line-height:1.35}.input{min-height:46px;font-size:14px}
textarea.input{min-height:112px}.btn{min-height:44px;font-size:14px}.btn-sm{min-height:38px;font-size:12.5px}
.page-context{font-size:12px}.page-head p{font-size:14px}.notice{font-size:14px}.table{font-size:13.5px}.table th{font-size:11px}.table td{padding:12px 11px}
.detail label{font-size:10.5px}.detail div{font-size:14px}.prose{font-size:14px}.summary-item{font-size:13.5px}.badge{font-size:10.5px;letter-spacing:.25px;text-transform:none;padding:5px 9px}

.btn svg,.record-back svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.record-back svg{width:20px;height:20px}
/* Consistent navigation icons */
.nav-btn{min-height:44px;font-size:14px}.nav-icon{width:22px;height:22px;display:grid;place-items:center;flex:none}.nav-icon svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nav-section-label{padding:14px 11px 5px;color:#769bac;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:1px}

/* Header search */
.topbar-title{display:flex;align-items:center;gap:10px;min-width:210px}
.global-search{position:relative;flex:1;max-width:580px;min-width:220px}
.global-search input{width:100%;height:42px;border:1px solid #cbd8df;background:#f6f9fa;border-radius:10px;padding:8px 42px 8px 39px;color:var(--ink);outline:none;font-size:13.5px}
.global-search input:focus{background:#fff;border-color:var(--teal);box-shadow:var(--focus-ring)}
.global-search-icon{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:#6f8797;font-size:21px;line-height:1;pointer-events:none}
.global-search-results{position:absolute;left:0;right:0;top:48px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 18px 50px rgba(12,41,64,.20);overflow:hidden;z-index:90;max-height:min(65vh,500px);overflow-y:auto}
.search-result{width:100%;border:0;border-bottom:1px solid #e8edef;background:#fff;padding:12px 14px;text-align:left;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;color:var(--ink)}
.search-result:last-child{border-bottom:0}.search-result:hover,.search-result[aria-selected="true"]{background:#f0f8f8}.search-result-type{width:34px;height:34px;border-radius:9px;background:#edf3f6;color:var(--navy);display:grid;place-items:center;font-weight:850;font-size:11px}.search-result-main b{display:block;color:var(--navy);font-size:13.5px}.search-result-main span{display:block;color:var(--muted);font-size:12px;margin-top:2px}.search-result-ref{font-size:11.5px;color:var(--teal);font-weight:800}.search-empty{padding:22px;text-align:center;color:var(--muted);font-size:13px}
.help-button{white-space:nowrap}

/* Dashboard */
.welcome-strip{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px;padding:18px 20px;border-radius:13px;color:#fff;background:linear-gradient(125deg,var(--navy),#11566c)}
.welcome-strip h1{font-size:26px;margin:0 0 5px}.welcome-strip p{margin:0;color:#d7e8ef;font-size:14px}.system-health{display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:12px;padding:7px 10px;border-radius:50px;background:rgba(255,255,255,.12)}.system-health i{width:8px;height:8px;border-radius:50%;background:#77dfa4}.system-health.bad i{background:#ff8178}
.action-dashboard{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.75fr);gap:16px;align-items:start}
.action-queue{display:grid;gap:10px;padding:14px}
.task-card{border:1px solid #dbe5ea;border-left:5px solid var(--teal);border-radius:10px;background:#fff;padding:14px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;box-shadow:0 2px 8px rgba(12,41,64,.035)}
.task-card.high{border-left-color:var(--warn)}.task-card.critical{border-left-color:var(--bad);background:#fffbfa}.task-card.low{border-left-color:#8397a5}.task-ref{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:var(--muted)}.task-ref b{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--navy);font-size:12.5px}.task-card h3{margin:5px 0 2px;font-size:15px;color:var(--navy)}.task-card p{margin:0;color:var(--text-soft);font-size:13px;line-height:1.45}.task-meta{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px;color:var(--muted);font-size:12px}.task-action{min-width:160px}.task-action .btn{width:100%}
.quick-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metric-card{border:1px solid var(--line);background:#fff;border-radius:10px;padding:14px;text-align:left;min-height:95px;transition:.15s;box-shadow:0 2px 8px rgba(12,41,64,.03)}button.metric-card{cursor:pointer}.metric-card:hover{border-color:#9fc7ca;transform:translateY(-1px)}.metric-card strong{display:block;font-size:26px;color:var(--navy);line-height:1}.metric-card span{display:block;margin-top:7px;color:var(--muted);font-size:12.5px}.metric-card em{display:block;margin-top:4px;color:var(--teal);font-size:11.5px;font-style:normal;font-weight:750}
.quick-actions{display:grid;gap:8px}.quick-actions .btn{width:100%;justify-content:flex-start}.queue-count{min-width:25px;height:25px;display:grid;place-items:center;border-radius:50%;background:#e9f4f4;color:var(--teal);font-size:12px;font-weight:850}
.activity-list{display:grid}.activity-item{display:grid;grid-template-columns:56px minmax(0,1fr);gap:10px;padding:10px 0;border-bottom:1px solid #e8edef}.activity-item:last-child{border-bottom:0}.activity-time{font-size:12px;color:var(--muted)}.activity-copy{font-size:13px}.activity-copy b{color:var(--navy)}

/* Page filters, pagination and responsive records */
.filter-bar{display:grid;grid-template-columns:minmax(230px,1fr) repeat(2,minmax(160px,220px)) auto;gap:9px;align-items:end;margin-bottom:14px}.filter-bar .field{margin:0}.filter-actions{display:flex;gap:8px}.result-meta{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid #e6ecef;color:var(--muted);font-size:12.5px;background:#fbfcfd}.pagination{display:flex;align-items:center;justify-content:flex-end;gap:7px;padding:13px 14px;border-top:1px solid #e6ecef;background:#fbfcfd}.pagination span{font-size:12.5px;color:var(--muted);min-width:130px;text-align:center}.record-cards{display:none}.record-card{border-bottom:1px solid #e5ebee;padding:14px;background:#fff}.record-card:last-child{border-bottom:0}.record-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.record-card-ref{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:850;color:var(--navy);font-size:13px}.record-card h3{font-size:15px;margin:8px 0 3px;color:var(--navy)}.record-card p{margin:0;color:var(--muted);font-size:13px;line-height:1.45}.record-card-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}.record-card-meta div{background:#f6f9fa;border-radius:7px;padding:8px}.record-card-meta label{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.55px;color:var(--muted);font-weight:800}.record-card-meta span{display:block;font-size:13px;margin-top:2px;color:var(--ink)}

/* Full-page record details */
.record-page{max-width:1280px;margin:0 auto}.record-back{display:inline-flex;align-items:center;gap:7px;border:0;background:transparent;color:var(--teal);font-weight:800;padding:0;margin:0 0 14px}.record-hero{background:#fff;border:1px solid var(--line);border-radius:13px;padding:20px;box-shadow:0 4px 16px rgba(12,41,64,.04);margin-bottom:16px}.record-hero-top{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.record-reference{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--teal);font-size:13px;font-weight:850}.record-hero h1{font-size:26px;color:var(--navy);margin:5px 0}.record-hero p{margin:0;color:var(--muted);max-width:850px}.record-amount{text-align:right}.record-amount label{display:block;text-transform:uppercase;color:var(--muted);font-size:10.5px;font-weight:800;letter-spacing:.6px}.record-amount strong{font-size:23px;color:var(--navy)}
.record-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:16px;padding-top:16px;border-top:1px solid #e5ebee}.record-actions .primary-action{margin-right:auto}.more-actions{position:relative}.more-actions summary{list-style:none}.more-actions summary::-webkit-details-marker{display:none}.more-actions-menu{position:absolute;right:0;top:48px;min-width:220px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 14px 40px rgba(12,41,64,.16);padding:6px;z-index:20}.more-actions-menu .btn{width:100%;justify-content:flex-start;margin:2px 0}
.next-action-card{border:1px solid #b8dcde;background:var(--surface-accent);border-radius:12px;padding:16px;margin-bottom:16px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center}.next-action-card.warning{border-color:#efd2a0;background:var(--warning-soft)}.next-action-card.danger{border-color:#efc3bf;background:var(--danger-soft)}.next-action-card.neutral{border-color:#d9e2e7;background:#f7fafb}.next-action-card label{font-size:10.5px;text-transform:uppercase;letter-spacing:.7px;font-weight:850;color:var(--muted)}.next-action-card h2{font-size:18px;margin:4px 0 2px;color:var(--navy)}.next-action-card p{margin:0;color:var(--text-soft);font-size:13.5px}.next-action-card .btn{min-width:185px}
.blocker-list{display:grid;gap:9px;margin-bottom:16px}.blocker-card{border-left:5px solid var(--warn);background:#fff9ed;border-radius:9px;padding:13px 14px}.blocker-card b{display:block;color:#754600}.blocker-card span{display:block;margin-top:3px;color:#6d5a3d;font-size:13px}.blocker-card .resolution{color:var(--teal);font-weight:700;margin-top:6px}
.workflow{display:grid;grid-template-columns:repeat(var(--stage-count,7),minmax(95px,1fr));gap:0;margin:16px 0 20px;overflow-x:auto;padding-bottom:4px}.workflow-stage{position:relative;text-align:center;min-width:100px;padding:0 4px}.workflow-stage:before{content:"";position:absolute;top:13px;left:0;right:0;height:3px;background:#dbe4e8}.workflow-stage:first-child:before{left:50%}.workflow-stage:last-child:before{right:50%}.workflow-dot{position:relative;z-index:1;width:28px;height:28px;margin:0 auto 7px;border-radius:50%;display:grid;place-items:center;background:#e4ebef;color:#6d8190;font-size:11px;font-weight:850;border:3px solid #fff;box-shadow:0 0 0 1px #cbd7dd}.workflow-stage.done:before,.workflow-stage.active:before{background:var(--teal)}.workflow-stage.done .workflow-dot{background:var(--teal);color:#fff;box-shadow:0 0 0 1px var(--teal)}.workflow-stage.active .workflow-dot{background:#fff;color:var(--teal);box-shadow:0 0 0 3px rgba(0,123,131,.25),0 0 0 1px var(--teal)}.workflow-stage.blocked .workflow-dot{background:#fff2dd;color:var(--warn);box-shadow:0 0 0 1px var(--warn)}.workflow-stage span{font-size:11px;line-height:1.25;color:var(--muted);display:block}.workflow-stage.active span,.workflow-stage.done span{color:var(--navy);font-weight:800}
.record-tabs{display:flex;gap:4px;overflow:auto;border-bottom:1px solid var(--line);margin:0 0 16px;position:sticky;top:66px;background:#f3f6f8;z-index:15;padding-top:4px}.record-tab{border:0;background:transparent;padding:12px 13px;border-bottom:3px solid transparent;font-size:13px;font-weight:800;color:var(--muted);white-space:nowrap}.record-tab.active{border-color:var(--teal);color:var(--teal)}.record-section{scroll-margin-top:130px}.record-section-title{font-size:16px;color:var(--navy);margin:0}.evidence-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px}.evidence-photo{border:1px solid var(--line);border-radius:9px;overflow:hidden;background:#eef3f5}.evidence-photo img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover}.evidence-photo figcaption{padding:8px;font-size:12px;color:var(--muted)}

/* Wizard */
.wizard-shell{max-width:1100px;margin:0 auto}.wizard-head{background:#fff;border:1px solid var(--line);border-radius:13px 13px 0 0;padding:18px 20px}.wizard-head-top{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.wizard-head h1{font-size:24px;color:var(--navy);margin:0}.wizard-head p{margin:5px 0 0;color:var(--muted);font-size:13.5px}.wizard-progress{display:grid;grid-template-columns:repeat(var(--wizard-steps,4),1fr);margin-top:18px}.wizard-step{position:relative;text-align:center;font-size:11.5px;color:var(--muted);padding-top:34px}.wizard-step:before{content:"";position:absolute;top:13px;left:0;right:0;height:3px;background:#dce5e9}.wizard-step:first-child:before{left:50%}.wizard-step:last-child:before{right:50%}.wizard-step i{position:absolute;top:0;left:50%;transform:translateX(-50%);width:29px;height:29px;border-radius:50%;display:grid;place-items:center;background:#e5ecef;color:#6f8290;font-style:normal;font-weight:850;z-index:1;border:3px solid #fff;box-shadow:0 0 0 1px #cbd7dd}.wizard-step.done:before,.wizard-step.active:before{background:var(--teal)}.wizard-step.done i{background:var(--teal);color:#fff;box-shadow:0 0 0 1px var(--teal)}.wizard-step.active i{background:#fff;color:var(--teal);box-shadow:0 0 0 3px rgba(0,123,131,.2),0 0 0 1px var(--teal)}.wizard-step.active{color:var(--navy);font-weight:800}
.wizard-body{background:#fff;border-left:1px solid var(--line);border-right:1px solid var(--line);padding:22px 20px;min-height:410px}.wizard-body h2{font-size:19px;margin:0 0 6px;color:var(--navy)}.wizard-body>.wizard-intro{margin:0 0 18px;color:var(--muted);font-size:13.5px}.wizard-foot{position:sticky;bottom:0;background:#f8fafb;border:1px solid var(--line);border-radius:0 0 13px 13px;padding:13px 18px;display:flex;justify-content:space-between;align-items:center;gap:10px;z-index:25;box-shadow:0 -8px 20px rgba(12,41,64,.05)}.wizard-foot-actions{display:flex;gap:8px;flex-wrap:wrap}.save-state{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:6px}.save-state:before{content:"";width:8px;height:8px;border-radius:50%;background:var(--good)}
.field-help{display:block;color:var(--muted);font-size:12px;margin-top:5px;line-height:1.4}.field-error{display:none;color:var(--bad);font-size:12px;margin-top:5px;font-weight:700}.field.invalid .input,.input.invalid{border-color:var(--bad);background:#fffafa}.field.invalid .field-error{display:block}.error-summary{border:1px solid #efc3bf;border-left:5px solid var(--bad);background:#fff4f3;border-radius:9px;padding:12px 14px;margin-bottom:16px;color:#7e2d28}.error-summary b{display:block;margin-bottom:5px}.error-summary ul{margin:0;padding-left:20px}
.choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.choice-card{position:relative}.choice-card input{position:absolute;opacity:0;pointer-events:none}.choice-card label{display:block;border:1px solid #cad7de;border-radius:10px;padding:14px 15px;min-height:112px;background:#fff;cursor:pointer;transition:.15s}.choice-card label:hover{border-color:#84b9bd;background:#fbfefe}.choice-card input:checked+label{border-color:var(--teal);box-shadow:var(--focus-ring);background:#f1f9f9}.choice-card label b{display:block;color:var(--navy);font-size:14px;margin-bottom:4px}.choice-card label span{display:block;color:var(--muted);font-size:12.5px;line-height:1.45}.choice-card label small{display:block;margin-top:6px;color:var(--teal);font-weight:750}
.review-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.review-card{border:1px solid var(--line);border-radius:10px;padding:14px;background:#fbfcfd}.review-card.full{grid-column:1/-1}.review-card label{display:block;font-size:10.5px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);font-weight:800}.review-card strong,.review-card p{display:block;margin:5px 0 0;color:var(--navy);font-size:14px}.review-card p{white-space:pre-wrap;font-weight:400;line-height:1.5}.outcome-card{border:1px solid #d6e4e7;border-radius:10px;padding:15px;background:#f5fafb;margin-top:15px}.outcome-card.warning{background:#fff8ec;border-color:#efd7ae}.outcome-card h3{margin:0 0 4px;color:var(--navy);font-size:16px}.outcome-card p{margin:0;color:var(--text-soft);font-size:13.5px}
.material-picker{position:relative}.material-suggestions{position:absolute;z-index:15;left:0;right:0;top:48px;background:#fff;border:1px solid var(--line);border-radius:9px;box-shadow:0 12px 32px rgba(12,41,64,.14);max-height:260px;overflow:auto}.material-option{display:block;width:100%;border:0;border-bottom:1px solid #e8edef;background:#fff;padding:10px;text-align:left}.material-option:hover{background:#f1f8f8}.material-option b{display:block;color:var(--navy);font-size:13px}.material-option span{display:block;color:var(--muted);font-size:11.5px;margin-top:2px}.material-lines{display:grid;gap:10px;margin-top:12px}.material-line-card{border:1px solid var(--line);border-radius:10px;padding:13px;background:#fff}.material-line-top{display:grid;grid-template-columns:minmax(0,1.7fr) 110px minmax(200px,.7fr) 40px;gap:9px;align-items:start}.material-line-copy b{display:block;color:var(--navy);font-size:13.5px}.material-line-copy span{display:block;color:var(--muted);font-size:11.5px;margin-top:3px}.material-line-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:10px}.commercial-summary{display:flex;justify-content:flex-end;gap:30px;padding:12px 2px;font-size:13px}.commercial-summary b{color:var(--navy);font-size:16px}
.photo-uploader{border:2px dashed #adc3ce;border-radius:12px;padding:20px;text-align:center;background:#f9fbfc}.photo-uploader input{display:none}.photo-uploader p{margin:7px 0;color:var(--muted);font-size:12.5px}.photo-categories{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.photo-category{border:1px solid var(--line);border-radius:10px;padding:12px}.photo-category h3{margin:0 0 8px;color:var(--navy);font-size:14px}

/* Approval workspace */
.approval-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px}.approval-summary button{border:1px solid var(--line);border-radius:10px;background:#fff;padding:13px;text-align:left}.approval-summary button.active{border-color:var(--teal);box-shadow:var(--focus-ring);background:#f4fafa}.approval-summary strong{display:block;font-size:22px;color:var(--navy)}.approval-summary span{display:block;color:var(--muted);font-size:12px;margin-top:4px}.approval-list{display:grid;gap:11px}.approval-card{border:1px solid var(--line);border-radius:11px;background:#fff;padding:15px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:15px;align-items:center}.approval-card h3{font-size:15.5px;color:var(--navy);margin:5px 0 3px}.approval-card p{margin:0;color:var(--muted);font-size:13px}.approval-card-meta{display:flex;gap:14px;flex-wrap:wrap;margin-top:9px;font-size:12px;color:var(--text-soft)}.approval-card-actions{display:flex;gap:8px;min-width:190px;justify-content:flex-end}

/* Help and onboarding */
.help-guide{display:grid;gap:10px;counter-reset:guide}.help-step{counter-increment:guide;display:grid;grid-template-columns:36px minmax(0,1fr);gap:10px;align-items:start;padding:11px;border:1px solid var(--line);border-radius:9px;background:#fbfcfd}.help-step:before{content:counter(guide);width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--teal);color:#fff;font-weight:850}.help-step b{display:block;color:var(--navy);font-size:13.5px}.help-step span{display:block;color:var(--muted);font-size:12.5px;margin-top:2px}.glossary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:15px}.glossary div{padding:10px;background:#f5f8f9;border-radius:8px}.glossary b{display:block;color:var(--navy);font-size:12.5px}.glossary span{font-size:12px;color:var(--muted)}

/* Accessible modal refinements */
.modal-backdrop{align-items:center}.modal{max-height:94vh}.modal.xl{width:min(1380px,calc(100vw - 32px))}.modal-body{font-size:14px}.modal-close{min-width:44px;min-height:44px;border-radius:8px}.modal-close:hover{background:#e9f0f3}.modal-foot{position:sticky;bottom:0}.modal [data-autofocus]{scroll-margin-top:20px}

/* Mobile bottom navigation */
.mobile-bottom-nav{position:fixed;left:0;right:0;bottom:0;height:68px;background:rgba(255,255,255,.98);border-top:1px solid var(--line);box-shadow:0 -8px 24px rgba(12,41,64,.10);z-index:55;display:none;grid-template-columns:repeat(var(--mobile-items,4),1fr);padding-bottom:env(safe-area-inset-bottom)}.mobile-bottom-nav button{border:0;background:transparent;color:#667b8a;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:10px;font-weight:750;min-width:0}.mobile-bottom-nav button svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.8}.mobile-bottom-nav button.active{color:var(--teal)}
.sticky-mobile-action{display:none}

@media(max-width:1180px){
  .global-search{max-width:430px}.action-dashboard{grid-template-columns:1fr}.approval-summary{grid-template-columns:repeat(2,1fr)}
  .filter-bar{grid-template-columns:minmax(220px,1fr) repeat(2,minmax(150px,190px));}.filter-actions{grid-column:1/-1}
}

@media(max-width:900px){
  .topbar{flex-wrap:wrap;height:auto;min-height:66px;padding-top:8px;padding-bottom:8px}.topbar-title{flex:1}.global-search{order:3;flex-basis:100%;max-width:none}.global-search-results{top:45px}.content{padding-bottom:100px}
  .record-tabs{top:112px}.record-hero-top{display:block}.record-amount{text-align:left;margin-top:14px}.next-action-card{grid-template-columns:1fr}.next-action-card .btn{width:100%}
  .choice-grid{grid-template-columns:1fr}.review-grid{grid-template-columns:1fr}.review-card.full{grid-column:auto}.photo-categories{grid-template-columns:1fr}.material-line-top{grid-template-columns:1fr 90px 40px}.material-line-top .coverage-select{grid-column:1/3}.material-line-details{grid-template-columns:1fr}
}

@media(max-width:820px){
  .toast-wrap{bottom:86px;left:12px;right:12px;max-width:none}
  .mobile-bottom-nav:not(.hidden){display:grid}.side-foot{padding-bottom:75px}.welcome-strip{display:block}.system-health{display:inline-flex;margin-top:13px}.desktop-records{display:none!important}.record-cards{display:block}.filter-bar{grid-template-columns:1fr}.filter-actions{grid-column:auto}.filter-actions .btn{flex:1}.result-meta{display:block}.result-meta span{display:block;margin-top:3px}.pagination{justify-content:space-between}.record-hero{padding:16px}.record-hero h1{font-size:22px}.record-actions{padding-bottom:60px}.record-actions .primary-action{width:100%;margin-right:0}.record-actions>.btn,.more-actions{flex:1}.record-actions>.btn,.more-actions summary{width:100%}.more-actions-menu{position:fixed;left:12px;right:12px;bottom:82px;top:auto;min-width:0}.workflow{margin-left:-8px;margin-right:-8px}.record-tabs{top:112px}.wizard-head,.wizard-body,.wizard-foot{border-radius:0;margin-left:-12px;margin-right:-12px}.wizard-head{border-top:0}.wizard-progress{overflow-x:auto;grid-template-columns:repeat(var(--wizard-steps,4),minmax(110px,1fr));padding-bottom:5px}.wizard-body{padding:18px 14px}.wizard-foot{padding:11px 12px}.wizard-foot .save-state{display:none}.wizard-foot-actions{width:100%}.wizard-foot-actions .btn{flex:1}.approval-card{grid-template-columns:1fr}.approval-card-actions{min-width:0;justify-content:flex-start}.approval-card-actions .btn{flex:1}.quick-metrics{grid-template-columns:repeat(2,1fr)}.task-card{grid-template-columns:1fr}.task-action{min-width:0}.approval-summary{grid-template-columns:repeat(2,1fr)}.sticky-mobile-action{display:block;position:fixed;left:0;right:0;bottom:68px;background:#fff;border-top:1px solid var(--line);padding:9px 12px;z-index:54}.sticky-mobile-action .btn{width:100%}
}

@media(max-width:560px){
  body{font-size:14px}.top-actions .help-button{display:none}.top-actions #queueButton{font-size:0}.top-actions #queueButton span{font-size:12px}.page-name{font-size:16px}.page-context{display:none}.welcome-strip{margin-left:-3px;margin-right:-3px;padding:16px}.welcome-strip h1{font-size:22px}.quick-metrics{grid-template-columns:1fr 1fr}.metric-card{min-height:85px;padding:12px}.metric-card strong{font-size:22px}.task-card{padding:12px}.record-card-meta{grid-template-columns:1fr}.detail-grid{grid-template-columns:1fr}.approval-summary{grid-template-columns:1fr 1fr}.approval-summary strong{font-size:19px}.glossary{grid-template-columns:1fr}.wizard-head h1{font-size:21px}.material-line-top{grid-template-columns:1fr 76px 38px}.commercial-summary{justify-content:space-between;gap:10px}.record-hero{border-radius:10px}.record-actions>.btn,.more-actions{flex-basis:100%}
}

@media print{
  .global-search,.mobile-bottom-nav,.record-back,.record-actions,.next-action-card .btn,.record-tabs{display:none!important}.record-page{max-width:none}.record-hero,.panel{break-inside:avoid}
}

/* Material and billing guided-workspace additions */
.material-view-tabs{margin-top:16px}
.billing-buckets{grid-template-columns:repeat(4,minmax(0,1fr));margin:16px 0}
.choice-card.selected>div{border:1px solid #acd1d3;border-radius:10px;padding:13px 14px;background:#f2f9f9;margin:8px 0 12px}
.choice-card.selected b{display:block;color:var(--navy);font-size:14px}
.choice-card.selected span{display:block;margin-top:3px;color:var(--muted);font-size:12.5px}
.preview-group{margin-top:18px;border:1px solid var(--line);border-radius:11px;overflow:hidden;background:#fff}
.preview-group>h3{margin:0;padding:12px 14px;background:#f5f8f9;color:var(--navy);font-size:15px;border-bottom:1px solid var(--line)}
.preview-group.ready>h3{background:#eef8f3;color:#1d6545}
.preview-group.blocked>h3{background:#fff5e8;color:#86520a}
.preview-group>.empty,.preview-group>.notice,.preview-group>.blocker-list{margin:14px}
.text-link{border:0;background:transparent;padding:0;color:var(--teal);font:inherit;font-weight:800;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.text-link:hover{color:var(--navy)}
@media(max-width:980px){.billing-buckets{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.billing-buckets{grid-template-columns:1fr 1fr}.material-view-tabs{grid-template-columns:1fr 1fr}}

/* ---- 4.1.2: Work Order photographs, JPPL queries, quotation, dashboard drill-down ---- */
.unit-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:8px}
button.unit-card{cursor:pointer;text-align:left;font:inherit;transition:.15s}
button.unit-card:hover,button.unit-card:focus-visible{transform:translateY(-1px);box-shadow:0 4px 12px rgba(12,41,64,.10);border-color:var(--teal)}
button.summary-item.summary-link{width:100%;background:transparent;border:0;border-bottom:1px solid #e8edef;text-align:left;font:inherit;cursor:pointer;color:inherit;border-radius:6px;padding:9px 6px}
button.summary-item.summary-link:last-child{border-bottom:0}
button.summary-item.summary-link:hover,button.summary-item.summary-link:focus-visible{background:#f2f8f9;color:var(--teal)}
button.summary-item.summary-link b{display:inline-flex;align-items:center;gap:4px}
button.summary-item.summary-link b svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2}
.query-thread{display:grid;gap:12px}
.query-card{border:1px solid var(--line);border-left:5px solid var(--warn);border-radius:10px;padding:14px 16px;background:#fffdf8}
.query-card.answered{border-left-color:var(--good);background:#fff}
.query-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:6px}
.query-card .prose{white-space:pre-wrap;margin:6px 0 0}
.query-answer{margin-top:12px;padding:12px 14px;border-radius:9px;background:#f0faf4;border:1px solid #cfe7d8}
.query-answer-form{margin-top:12px}
.query-answer-form label{display:block;font-size:12px;font-weight:700;color:var(--navy);margin-bottom:6px}
.query-answer-form textarea{min-height:88px}
.query-answer-form .action-row{margin-top:10px;display:flex;justify-content:flex-end}
.quote-filter .filter-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-end}
.quote-metrics .metric-card{cursor:default}
.quote-table td{vertical-align:top}
.quote-table tr.quote-continuation td{border-top:0;padding-top:0}
.page-head.compact{margin:6px 0 14px}
@media (max-width:820px){.unit-grid{grid-template-columns:repeat(auto-fill,minmax(96px,1fr))}.quote-filter .filter-actions .btn{flex:1 1 auto}}
.quote-card-lines{display:grid;gap:8px;margin:10px 0}
.quote-card-line{display:flex;justify-content:space-between;gap:12px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:#f8fbfc}
.quote-card-line strong{white-space:nowrap;color:var(--navy)}
.quote-unassessed summary{cursor:pointer}
.quote-unassessed-list{margin-top:10px;line-height:1.9}

/* 4.1.5: keep the sticky wizard footer visible above the fixed mobile bottom navigation */
@media (max-width:820px){.wizard-foot{bottom:calc(68px + env(safe-area-inset-bottom))}.content{padding-bottom:110px}}

/* 4.1.6 material picker */
.material-picker,.material-line-top>*{min-width:0}
.material-pick{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;max-width:100%;min-width:0;overflow:hidden;text-align:left;cursor:pointer;min-height:44px;font:inherit;color:var(--ink,#102f45);background:#fff}
.material-pick.is-placeholder .material-pick-label{color:#718697}
.material-pick-label{flex:1 1 auto;min-width:0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.3;word-break:break-word}
.material-pick-caret{flex:0 0 auto;color:#718697;font-size:12px}
.material-pick:focus-visible{outline:2px solid var(--teal);outline-offset:1px}
.picker-search{position:sticky;top:0;background:#fff;padding-bottom:10px;z-index:1}
.picker-search .input{min-height:44px;font-size:16px}
.picker-list.material-suggestions{position:static;max-height:none;box-shadow:none;border-radius:9px}
.picker-list .material-option{min-height:52px;cursor:pointer}
.picker-list .material-option:focus-visible{outline:2px solid var(--teal);outline-offset:-2px;background:#f1f8f8}
.picker-more{padding:8px 10px}
.picker-list .material-option b .mono{display:inline;font-weight:800;color:var(--teal)}
.picker-list .material-option b{word-break:break-word}
@media (max-width:820px){.picker-list .material-option{padding:12px 10px}}

/* 4.1.6 device sweep */
@media (max-width:820px){
  .mobile-menu{min-width:42px;min-height:42px;font-size:18px}
  .global-search input{font-size:16px}
}
@media (max-width:480px){
  /* all four wizard steps stay on screen; previously the strip scrolled sideways and "Review" was hidden */
  .wizard-progress{overflow:visible;grid-template-columns:repeat(var(--wizard-steps,4),minmax(0,1fr));gap:2px;padding-bottom:0}
  .wizard-step{font-size:10px;line-height:1.2;padding-top:30px;overflow-wrap:anywhere;hyphens:auto}
  .wizard-step i{width:26px;height:26px;font-size:11px}
  .wizard-step:before{top:12px}
}
@media (max-width:480px){
  /* record section tabs wrap into two rows instead of scrolling off-screen */
  .record-tabs{flex-wrap:wrap;gap:0;overflow:visible;padding-top:0}
  .record-tab{flex:1 1 auto;padding:10px 8px;font-size:12px;text-align:center}
}
@media (max-width:480px){
  /* the record's stage strip shows every stage on one screen instead of scrolling sideways */
  .workflow{grid-template-columns:repeat(var(--stage-count,7),minmax(0,1fr));overflow:visible;margin-left:0;margin-right:0}
  .workflow-stage{min-width:0;padding:0 2px;font-size:9.5px;line-height:1.15;overflow-wrap:anywhere;hyphens:auto}
  .workflow-stage span{font-size:9.5px}
  .workflow-dot{width:24px;height:24px;font-size:10px;margin-bottom:5px}
  .workflow-stage:before{top:11px}
}

.filter-toggle{display:none}
.filter-more{display:contents}
@media (max-width:480px){
  .filter-bar{grid-template-columns:1fr}
  .filter-toggle{display:inline-flex;width:100%}
  .filter-more{display:none}
  .filter-bar.open .filter-more{display:contents}
}

.help-notice summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px}
.help-notice summary::-webkit-details-marker{display:none}
.help-notice summary b{color:var(--navy)}
.help-notice-hint{font-size:11px;color:var(--muted);font-weight:650}
.help-notice[open] .help-notice-hint{display:none}
.help-notice-body{margin-top:8px}
@media (min-width:821px){.help-notice-hint{display:none}.help-notice summary{cursor:default}}

/* 4.2.1: edit the job wording from the job page */
.record-description{white-space:pre-line}.record-edit-link{display:inline-flex;align-items:center;gap:6px;margin-top:6px;min-height:36px}.record-edit-link svg{width:16px;height:16px}textarea.wo-description-input{min-height:190px}

/* 4.2.2: hold notes on the quotation */
.quote-progress{color:var(--warn);font-weight:700;margin:-4px 0 8px}

/* 4.3: weekly round and checklist */
.round-progress{display:flex;height:10px;border-radius:6px;overflow:hidden;background:#e6edf1;margin:10px 0 4px}.round-progress i{display:block;height:100%}.round-progress .signed{background:var(--good)}.round-progress .awaiting{background:#e5a100}.round-progress .progress{background:var(--teal2)}.round-progress .notvisited{background:#8a9bab}.round-progress .pending{background:#f0d3d0}
.round-sets .record-card.signed{border-left:4px solid var(--good)}.round-sets .record-card.awaiting_signoff,.round-sets .record-card.draft,.round-sets .record-card.started{border-left:4px solid #e5a100}.round-sets .record-card.not_visited{border-left:4px solid #8a9bab}.round-sets .record-card.pending{border-left:4px solid #e4b3ad}
.round-card.is-closed{opacity:.85}
.check-item{border:1px solid var(--line);border-radius:10px;padding:12px 14px;margin:0 0 10px;background:#fff}.check-item.is-ok{border-color:#bfe3cc}.check-item.is-fault{border-color:#efc3bf;background:#fffafa}.check-item.is-na{border-color:#d9e0e5;background:#f8fafb}
.check-item-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.check-item-head b{font-size:14.5px}
.check-choices{display:inline-flex;border:1px solid #b8c8d2;border-radius:9px;overflow:hidden}.check-choice{border:0;background:#fff;min-height:42px;min-width:64px;padding:0 14px;font-weight:760;color:var(--navy);cursor:pointer}.check-choice+.check-choice{border-left:1px solid #b8c8d2}.check-choice.active[data-value="OK"]{background:var(--good);color:#fff}.check-choice.active[data-value="FAULT"]{background:var(--bad);color:#fff}.check-choice.active[data-value="NA"]{background:#66788a;color:#fff}
.check-item-body{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}.check-item-body .input{flex:1;min-width:200px}
.checklist-table{display:grid;gap:6px;margin:6px 0 14px}.checklist-row{display:grid;grid-template-columns:24px 1fr auto;gap:8px;align-items:center;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:#fff}.checklist-row.is-fault{border-color:#efc3bf;background:#fffafa}.checklist-row.is-na{color:var(--muted)}.checklist-mark{font-weight:900;text-align:center}.checklist-row.is-ok .checklist-mark{color:var(--good)}.checklist-row.is-fault .checklist-mark{color:var(--bad)}.checklist-result{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.6px}.checklist-row.is-fault .checklist-result{color:var(--bad)}.checklist-remark{grid-column:2/-1;font-size:13px;color:#425e70}
@media(max-width:820px){.check-item-head{display:block}.check-choices{display:flex;margin-top:8px}.check-choice{flex:1}}
.round-cards,.round-sets{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.round-cards .record-card,.round-sets .record-card{border:1px solid var(--line);border-radius:12px;padding:14px;background:#fff}
@media(max-width:820px){.round-cards,.round-sets{grid-template-columns:1fr}}
