:root{font-family:Arial,Helvetica,sans-serif;color:var(--ink,#172e32);background:var(--surface,#f4f6f4);font-size:16px}
*{box-sizing:border-box}body{margin:0}header{background:var(--ink,#172e32);color:#fff;border-bottom:4px solid var(--stripe,#d69859)}
.top,main{max-width:1040px;margin:auto;padding:0 24px}.top,.tools,.switch,.jobs a,.search div{display:flex;align-items:center;gap:12px}
.top{min-height:68px;justify-content:space-between}.brand{color:inherit;text-decoration:none;font-weight:bold;font-size:1.15rem}.brand span{color:var(--muted-light,#c3d1cf);font-size:.9rem}
main{padding-top:28px;padding-bottom:48px}h1{font-size:clamp(2rem,5vw,3rem);letter-spacing:-.04em;margin:24px 0 14px}h2{font-size:1.15rem;margin:0 0 18px}
label,dt,small,.subtitle,figcaption{color:var(--label,#455b60)}label{font-weight:bold}input,select,button{font:inherit;border-radius:6px;min-height:42px}
input,select{border:1px solid var(--field,#7c9193);background:white;padding:8px 12px;max-width:100%}button{background:var(--action,#215c56);color:white;border:1px solid transparent;cursor:pointer;padding:8px 16px;font-weight:bold}
button:hover{background:var(--hover,#184a45)}.quiet,.secondary{background:transparent;border-color:currentColor}.secondary,.back{color:var(--action,#215c56)}.secondary:hover{color:#fff}
:focus-visible{outline:3px solid var(--focus,#bc7230);outline-offset:3px}.switch{flex-wrap:wrap}.search{max-width:630px}.search label,.login label{display:block;margin:16px 0 6px}.search input{flex:1;min-width:0}
.jobs{list-style:none;padding:0;margin:24px 0}.jobs li,.card,.login{border:1px solid var(--border,#cbd7d3);border-radius:10px;background:#fff}.jobs a{justify-content:space-between;color:inherit;padding:20px;text-decoration:none}.jobs a:hover{background:var(--hover-row,#e7f0eb)}.jobs span,.jobs small,.card small{display:block;margin-top:5px}.jobs b{color:var(--link,#255c55)}.empty{padding:20px}
.back{display:inline-block;margin-top:28px}.detail{display:grid;grid-template-columns:1.1fr 1fr;gap:18px}.card{padding:22px;margin-bottom:18px}.subtitle{margin-top:0}dl{display:grid;grid-template-columns:100px 1fr;gap:12px;margin:0}dd{margin:0;overflow-wrap:anywhere}figure{margin:0}img{width:100%;height:auto;border-radius:5px}figcaption{margin-top:8px}
.login{max-width:420px;margin:7vh auto;padding:28px}.login h1{margin-top:0}.login input,.login button{width:100%}.login button{margin-top:20px}
@media(max-width:650px){.top,main{padding-left:16px;padding-right:16px}.top{align-items:flex-start;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:12px}.detail{grid-template-columns:1fr;gap:0}.card{padding:16px}.switch select{max-width:100%}.jobs a{align-items:flex-start}.tools{justify-content:space-between;width:100%}}
.draft-actions{display:flex;flex-wrap:wrap;align-items:center;gap:18px;margin:18px 0 26px}
.draft-actions a,.notice a{color:var(--action,#215c56);font-weight:bold}
.draft-actions .action-link{display:inline-block;padding:12px 16px;background:var(--action,#215c56);color:white;border-radius:6px;text-decoration:none}
.draft-form{max-width:780px}.draft-form fieldset{border:0;padding:0;margin:0 0 24px}
.draft-form legend{font-size:1.15rem;font-weight:bold;margin-bottom:14px}
.draft-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr));gap:16px}
.draft-fields label,.draft-fields input{display:block;width:100%}.draft-fields label{margin-bottom:5px}
.draft-form .check{display:flex;align-items:center;gap:8px;min-height:40px}
.draft-form .check input{min-height:0;width:18px;height:18px;accent-color:var(--action,#215c56)}
.draft-help{color:var(--label,#455b60)}.notice{padding:12px 16px;background:var(--highlight,#e5eee6);border-radius:5px;max-width:780px}
.conflict,.errorlist{color:#772e1c}.conflict{background:#f7e8df}
.truck-inputs{margin:18px 0;padding:12px 0;border-top:1px solid var(--border,#cbd7d3);border-bottom:1px solid var(--border,#cbd7d3)}
.truck-inputs summary{cursor:pointer;color:var(--action,#215c56);font-weight:bold;padding:6px 0}
.truck-inputs[open] summary{margin-bottom:16px}.draft-form textarea,.draft-fields select{width:100%;font:inherit}
.draft-form textarea{padding:8px 12px;border:1px solid var(--field,#7c9193);border-radius:6px;resize:vertical}
.draft-form .check input{flex:none}.draft-form .check{overflow-wrap:anywhere}.draft-form button{margin:4px 8px 4px 0}
.card dl + form,.card dl + details{margin-top:20px}
.optional-truck{margin-top:20px}.draft-form:has([name="include_truck"]:not(:checked)) .optional-truck:not(.has-errors){display:none}
#upload-photos{display:grid;gap:7px;min-width:0}
#upload-photos select,#upload-photos input{width:100%;min-width:0}
#upload-photos input[type=file]{padding:7px;font-size:.9rem}
#upload-photos .draft-help{margin:3px 0 6px}
#upload-photos button{justify-self:start}#upload-photos label:not(:first-child){margin-top:6px}
.photo-camera{display:none}.photo-camera label{display:block;margin-bottom:6px}
@media(pointer:coarse){.photo-camera{display:block}}
.photo-gallery{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(min(100%,135px),1fr));margin-top:16px}
.photo-gallery img{width:100%;max-height:180px;object-fit:contain;background:var(--surface,#f4f6f4)}
.photo-gallery figure,#photo-results li{overflow-wrap:anywhere}
#photo-results:empty{display:none}#photo-results{padding-left:20px}#photo-results li{margin:8px 0}
.ticket-form{max-width:840px}.ticket-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:12px}
.ticket-grid select,.ticket-grid input:not([type=checkbox]),.ticket-line textarea{width:100%;min-width:0}
.ticket-grid label,.ticket-line>div>label{display:block;margin-bottom:4px}.ticket-line fieldset{border:0;padding:0;margin:16px 0}
.ticket-line fieldset legend,.work-areas summary{font-weight:bold}.work-areas{margin:16px 0}.work-areas summary{cursor:pointer;color:var(--action,#215c56)}
.ticket-line input[type=checkbox],.ticket-form input[type=checkbox]{min-height:0}
.ticket-line fieldset div[id],.work-areas>div{display:flex;gap:10px;flex-wrap:wrap;padding:7px 0}
.ticket-line textarea{display:block;resize:vertical;min-height:52px;padding:8px;font:inherit}.ticket-line>div{margin:12px 0}.guide-hint{display:block}

.plan-row { display:grid; grid-template-columns:minmax(9rem,2fr) 5rem minmax(8rem,1fr); gap:1rem; align-items:center; padding:.65rem 0; border-bottom:1px solid #dce4e4; }
.plan-row input,.plan-row select { width:100%; }
.plan-row label { display:block; font-size:.85rem; }
@media(max-width:560px) { .plan-row { grid-template-columns:5rem 1fr; gap:.4rem .8rem; } .plan-row strong { grid-column:1 / -1; } }

.timeline-calendar { overflow-x:auto; background:white; border:1px solid var(--divider,#cbd9d7); border-radius:.5rem; margin:1rem 0; }
.timeline-calendar table { border-collapse:collapse; min-width:48rem; width:100%; font-size:.83rem; }
.timeline-calendar td,.timeline-calendar th { border:1px solid var(--table,#d9e4df); text-align:center; padding:.45rem; }
.timeline-calendar tr>th:first-child { background:var(--light,#f2f6f4); }
.timeline-calendar .occupied { background:var(--blue,#39776f); box-shadow:inset 0 4px white,inset 0 -4px white; }
.timeline-calendar a[draggable] { cursor:grab; }
.visually-hidden { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }

.truck-board { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; align-items:start; }
.truck-board>section { background:var(--section,#e8efeb); padding:.85rem; border-radius:.6rem; }
.truck-board h2 { margin:.25rem 0 .75rem; }
.truck-board .card { padding:.8rem; margin-bottom:.6rem; overflow-wrap:anywhere; }
.truck-board h3,.truck-board article p { margin:.35rem 0; }
@media(max-width:650px) { .truck-board { grid-template-columns:1fr; } }

.update-truck { margin:0 0 1rem; padding:.9rem; border:1px solid var(--frame,#cedad5); border-radius:.4rem; }
.update-truck select,#delay-form select { max-width:100%; width:100%; }
.phase-display { font-size:.9rem; color:var(--deep,#324e4a); }
.phase-display p { margin:.35rem 0; }

.parts-entry { margin-top:1rem; }
.parts-entry textarea { width:100%; max-width:100%; }

.ops-links { display: flex; gap: 1.25rem; flex-wrap: wrap; margin: 1rem 0; }
.ops-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.ops-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: .6rem 1rem; overflow-wrap: anywhere; }
.ops-card h2 { margin: .25rem 0; }
.ops-card dl { grid-column: 1/-1; display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; margin: .5rem 0 0; }
.ops-card dd { margin: 0; }
@media (max-width: 520px) { .ops-card { grid-template-columns: 1fr; } }

.attention ul { list-style: none; padding: 0; }
.attention li, .attention nav { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.attention li { border-top: 1px solid #d6dce1; padding: .65rem 0; }
.attention small { display: block; }
.attention nav { justify-content: flex-start; }

.estimate-line { margin: 1rem 0; padding: .75rem 1rem; min-width: 0; }
.estimate-line p[hidden] { display: none; }
#estimate-total strong { font-size: 1.6rem; }
#estimate-total dl { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; }
#estimate-total dd { margin: 0; }

.fast-action {
  --ink: #111b38;
  --stripe: #e02627;
  --action: #064b9c;
  --hover: #073476;
  --link: #064b9c;
  --blue: #005dac;
  --focus: #0078d1;
  --deep: #142e53;
  --muted-light: #d9e2f3;
  --label: #394862;
  --field: #8498b4;
  --highlight: #e1edfc;
  --hover-row: #e5effc;
  --section: #e8effa;
  --table: #d9e2f3;
  --border: #c9d5e5;
  --divider: #ccd8e8;
  --frame: #cad6e6;
  --light: #f1f5fc;
  --surface: #f4f7fc;
}
.fast-action {background:var(--surface);color:var(--ink);min-height:100vh}
.fast-action header {background:white;color:var(--ink);border-bottom:4px solid var(--stripe)}
.fast-action .brand {display:inline-flex;align-items:center;gap:14px}
.fast-action .brand-mark {width:144px;height:auto;border-radius:0;display:block}
.fast-action .brand span {color:var(--label)}
.fast-action main a {color:var(--action)}
.fast-action .jobs a {color:inherit}
.fast-action .draft-actions a.action-link {color:white}
.fast-action a.action-link + a.action-link {margin-left:.45rem}
.fast-action .quiet {color:var(--action)}
.fast-action .quiet:hover {background:var(--action);color:white}
@media(max-width:650px){.fast-action .brand-mark{width:120px}}
.fast-action :focus-visible {outline:2px solid var(--action);outline-offset:2px;box-shadow:0 0 0 5px #ffdf73}
.fast-action .estimate-line input[name$="-quantity"] {background:#fff6c9}

/* Keep the owner's purchase decision apart from job administration. */
.purchase-review {
  max-width: 46rem;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  margin: 1.5rem 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.purchase-review-heading :is(h1, h2) { margin: 0; font-size: clamp(1.4rem, 3vw, 1.75rem); }
.purchase-review-heading p { margin: .4rem 0 0; color: var(--label, #455b60); }
.purchase-review-lines { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.purchase-review-lines li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .45rem 1.25rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border, #cbd7d3);
}
.purchase-review-lines span, .purchase-review-note strong { display: block; }
.purchase-review-lines span { margin-top: .2rem; }
.purchase-review-lines small { grid-column: 1 / -1; margin: 0; font-size: .9rem; }
.purchase-price, .purchase-review-total strong { font-variant-numeric: tabular-nums; }
.purchase-review-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  margin: 0; padding-top: 1rem; border-top: 1px solid var(--border, #cbd7d3);
}
.purchase-review-total strong { font-size: 1.45rem; }
.purchase-review-note { margin: 1.25rem 0 0; }
.purchase-review-note strong { margin-bottom: .2rem; }
.purchase-decision-form { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border, #cbd7d3); }
.purchase-check { display: flex; align-items: center; gap: .7rem; min-height: 44px; font-weight: normal; cursor: pointer; }
.purchase-check input { flex: none; width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; }
.purchase-decisions { display: flex; justify-content: space-between; gap: 2rem; margin-top: 1.1rem; }
.purchase-decisions button { min-width: 8.5rem; min-height: 48px; margin: 0; }
.purchase-decisions .decline { border: 1px solid #a9413f; color: #942e2d; background: white; }
.purchase-decisions .decline:hover { background: #fff3f2; }
.purchase-workspace, .purchase-management { max-width: 46rem; margin: 1.5rem 0; }
.purchase-workspace > summary, .purchase-management > summary { padding: .75rem 0; cursor: pointer; font-weight: bold; }
.purchase-workspace[open] > summary { margin-bottom: 1rem; }
@media (max-width: 600px) {
  .purchase-decisions { flex-direction: column; gap: 1.5rem; }
  .purchase-decisions button { width: 100%; }
}

/* Fast Action letterhead, financial documents and printed staff pages. */
.fast-action > header {
  background: linear-gradient(113deg, #fff 0 44%, #e9f4ff 44% 56%, #074e9e 56% 78%, #09346c 78%);
  border: 0; box-shadow: 0 4px 0 #df2132, 0 8px 0 #ffd52a;
}
.fast-action .top { min-height: 82px; }
.fast-action .tools, .fast-action .tools .quiet { color: white; }
.fast-action .card { border-color: #b7cde3; }
.fast-action :is(.purchase-review,.bill-document) {
  --inset: clamp(1.25rem,3.6vw,2.25rem);
  max-width: 46rem; padding: 0 var(--inset) var(--inset);
  border: 1px solid #a6bfdc; border-radius: 16px; overflow: hidden;
  box-shadow: 0 7px 24px rgba(15,54,102,.11);
}
.fast-action :is(.purchase-review-heading,.bill-heading) {
  position: relative; margin: 0 calc(-1 * var(--inset)); padding: 1.3rem var(--inset) 1.5rem;
  background: linear-gradient(118deg, #103674 0%, #064b9c 66%, #0063ac 66%, #005498 86%, #064589 86%);
  color: white; border-bottom: 5px solid #ffd52a;
}
.fast-action :is(.purchase-review-heading,.bill-heading)::before {
  content: ""; position:absolute; top:0; left:0; width:100%; height:5px;
  background:linear-gradient(110deg,#e02234 0 70%,#ffdc4c 70% 84%,#22a1de 84%);
}
.fast-action .document-logo {
  display:block; width:126px; height:auto; padding:4px 6px; border-radius:6px; background:white; margin:0 0 .8rem;
}
.fast-action .purchase-review-heading :is(h1,h2), .fast-action .bill-heading h2 {
  color:white; font-size:clamp(1.5rem,3.4vw,2.15rem); line-height:1.12; margin:0; letter-spacing:-.032em;
}
.fast-action .purchase-review-heading p { color:#fff; }
.fast-action .purchase-review-lines { margin-top:.75rem; }
.fast-action .purchase-review-lines li:first-child { border-top:0; }
.fast-action .purchase-price { color:#064b9c; }
.fast-action .purchase-review-total {
  border:0; border-left:5px solid #e19c00; border-radius:6px;
  background:#ffdf59; color:#172540; padding:.65rem 1rem; font-weight:bold;
}
.fast-action .purchase-review-total strong { font-size:1.65rem; }
.fast-action .purchase-decisions button { border-radius:8px; }
.fast-action .purchase-decisions .decline { border:2px solid #b12538; color:#942038; background:#fff; }
.fast-action .purchase-decisions .decline:hover { color:#fff; background:#9d1c31; }
.fast-action .bill-document dl { background:#eef5fc; border-left:4px solid #0969ad; padding:1rem; }
.fast-action .attention li { border-left:4px solid #e5a800; padding:.7rem .85rem; background:#fff8d8; }
.fast-action [data-document="customer-email"] { border-top:7px solid #064b9c; border-bottom:5px solid #ffd52a; }
.fast-action [data-document="customer-email"] hr { border:0; border-top:3px solid #dc2938; }
@media (max-width:650px) {
  .fast-action > header { background:linear-gradient(114deg,#fff 0 70%,#edf5ff 70% 84%,#d4e6fc 84%); }
  .fast-action .tools, .fast-action .tools .quiet { color:#064b9c; }
}
@media print {
  .fast-action, .fast-action * { print-color-adjust:exact; -webkit-print-color-adjust:exact; }
  .fast-action > header .tools, .fast-action .switch, .fast-action .brand span { display:none; }
  .fast-action .purchase-review, .fast-action .bill-document { box-shadow:none; }
}

.release-block { margin-top:1.25rem; border-top:4px solid var(--action,#215c56); }
.release-block li,.release-management li { padding:.35rem 0; overflow-wrap:anywhere; }
.release-hold { border-left:5px solid #bc2936; background:#fff0ef; color:#732430; padding:.75rem 1rem; }
.release-controls { display:flex; flex-wrap:wrap; justify-content:space-between; gap:1.5rem; max-width:38rem; }
.release-form { display:grid; gap:.8rem; justify-items:start; }
.release-management summary { cursor:pointer; font-weight:bold; }
@media(max-width:600px) { .release-controls { display:grid; } .release-controls button { width:100%; } }
.fast-action .release-block { border-top:0; overflow:hidden; --release-pad:22px; }
.fast-action .release-block h2 {
  background:linear-gradient(113deg,#113775 0 70%,#07549d 70% 85%,#0866ac 85%);
  color:white; margin:calc(-1 * var(--release-pad)) calc(-1 * var(--release-pad)) 1rem;
  padding:1rem var(--release-pad); border-bottom:4px solid #ffd52a;
}
.fast-action .release-controls .secondary { color:#982636; }
.fast-action .release-controls .secondary:hover { color:white; background:#982636; }
@media(max-width:650px) { .fast-action .release-block { --release-pad:16px; } }
.purchase-mail,.completion-card { max-width:46rem; border-top:5px solid var(--action,#265957); overflow-wrap:anywhere; }
.purchase-mail .document-logo { width:135px; border:0; }
.purchase-mail-subject { overflow-wrap:anywhere; }
.fast-action .purchase-mail h2,.fast-action .completion-card h2 { color:#094787; border-bottom:3px solid #ffd52a; padding-bottom:.6rem; }
