:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#112846;background:#f4f6fa;font-synthesis:none;--navy:#102644;--ink:#142d4f;--muted:#50647e;--line:#dce4ee;--orange:#ed6e27;--white:#fff;--field-height:44px;--field-gap:12px}
*{box-sizing:border-box}
body{margin:0}
[hidden]{display:none!important}
a{color:inherit}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{touch-action:manipulation}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #237ac4;outline-offset:2px}
.shell{display:grid;grid-template-columns:225px minmax(0,1fr);min-height:100vh}
.sidebar{background:var(--navy);color:#e8eef8;padding:31px 17px 22px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column}
.brand{display:block;width:calc(100% - 16px);max-width:194px;margin:0 8px 37px;text-decoration:none}
.brand-logo{display:block;width:100%;aspect-ratio:3.3;object-fit:cover;object-position:center 65%;border-radius:7px;background:#fff}
.nav-toggle{display:none}
.nav-caption,.eyebrow,.private{font-size:11px;letter-spacing:.14em;font-weight:800}
.nav-caption{margin:0 12px 12px;color:#a6b8d0}
nav{display:grid;gap:6px}
nav a,.nav-finance summary{display:flex;align-items:center;gap:12px;text-decoration:none;padding:12px 12px;border-radius:9px;font-size:14px;font-weight:600;white-space:nowrap;color:#d2def0}
nav a:hover,.nav-finance summary:hover{background:#1d385d}
nav a[aria-current="page"]{background:#294466;color:#fff;box-shadow:inset 3px 0 #ff9252}
.nav-icon{width:19px;color:#ffa56c;text-align:center;font-size:17px;line-height:1}
.side-footer{margin-top:auto;border-top:1px solid #395172;padding:17px 8px 0;font-size:12px;color:#b9c9df;display:flex;align-items:center;gap:8px}
.side-footer span{width:8px;height:8px;border-radius:50%;background:#83d0aa}
.top{height:61px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:0 34px;background:#fff;font-size:13px;font-weight:650;color:#465b75}
.top b{padding:0 8px;color:#a8b4c4}.private{color:#526781}
.content{max-width:1460px;margin:auto;padding:33px 34px 50px}
.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;margin-bottom:23px}
.eyebrow{color:#a14414;margin-bottom:7px}
h1,h2,p{margin:0}
h1{font-size:clamp(29px,3.3vw,42px);letter-spacing:-.045em;line-height:1.12}
h2{font-size:17px;letter-spacing:-.015em}
p{color:var(--muted);font-size:13px;line-height:1.5}
.page-head p{margin-top:8px;font-size:14px}
.work-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(315px,.86fr);gap:19px;align-items:start}
.manage-grid{display:grid;grid-template-columns:minmax(0,.86fr) minmax(0,1.14fr);gap:19px;align-items:start}
.stack{display:grid;gap:16px}
.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px;box-shadow:0 3px 12px #16355508;min-width:0}
.card-head,.preview-head{display:flex;gap:11px;align-items:center;margin-bottom:14px}
.card-head p,.preview-head p{margin-top:2px}
.step{display:grid;place-items:center;border-radius:8px;width:35px;height:35px;background:#fff1e7;color:#974116;font-size:12px;font-weight:800;flex-shrink:0}
label{display:block;min-inline-size:0;margin-top:var(--field-gap);font-size:12px;font-weight:700;overflow-wrap:anywhere}
label small{font-size:11px;font-weight:500;color:var(--muted);margin-left:3px}
input:not([type=checkbox],[type=radio],[type=range]),textarea,select{
  display:block;color:var(--ink);border:1px solid #cbd7e5;border-radius:7px;background:#fff;
  padding:9px 10px;inline-size:100%;min-inline-size:0;max-inline-size:100%;
  min-block-size:var(--field-height);margin-top:5px;font-size:14px
}
input:not([type=checkbox],[type=radio],[type=range],[type=file]),select:not([multiple],[size]){
  block-size:var(--field-height)
}
input[type=date],input[type=time],input[type=month],input[type=datetime-local],input[type=week]{
  -webkit-min-logical-width:0
}
input::-webkit-date-and-time-value{min-width:0;min-height:1.2em;text-align:start}
input::placeholder,textarea::placeholder{color:#64768c}
textarea{resize:vertical;min-block-size:64px}
input[type=hidden]{display:none}
input[type=checkbox],input[type=radio]{flex:none;inline-size:18px;block-size:18px;margin:0;accent-color:var(--navy)}
input[type=range]{max-inline-size:100%}
label.check,label.check-label,label:has(> input:is([type=checkbox],[type=radio])){
  display:flex;align-items:flex-start;gap:8px;min-block-size:24px
}
.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--field-gap);min-inline-size:0}
.fields>*{min-inline-size:0}
.fields:not(:has(> :not(label,[hidden],input[type=hidden]))) {margin-top:var(--field-gap)}
.fields:not(:has(> :not(label,[hidden],input[type=hidden]))) > label{margin-top:0}
.dates{grid-template-columns:repeat(3,minmax(0,1fr))}
@supports (grid-template-rows:subgrid){
  .fields:not(:has(> :not(label,[hidden],input[type=hidden]))) > label:has(> :is(input:not([type=checkbox],[type=radio],[type=range],[type=hidden]),textarea,select)){
    display:grid;grid-row:span 3;grid-template-rows:subgrid;row-gap:5px;align-items:start
  }
  .fields > label > :is(input:not([type=checkbox],[type=radio],[type=range],[type=hidden]),textarea,select){
    min-width:0
  }
  .fields:not(:has(> :not(label,[hidden],input[type=hidden]))) > label > :is(input:not([type=checkbox],[type=radio],[type=range],[type=hidden]),textarea,select){
    grid-row:2;margin-top:0
  }
  .fields:not(:has(> :not(label,[hidden],input[type=hidden]))) > label > small{grid-row:3;margin-left:0}
}
.button{display:inline-flex;align-items:center;justify-content:center;gap:10px;border:1px solid transparent;border-radius:8px;padding:10px 13px;font-size:13px;line-height:1.25;font-weight:750;cursor:pointer;text-decoration:none;min-height:39px;text-align:center}
.primary{background:var(--navy);color:#fff}.primary:hover{background:#26476d}
.secondary{background:#fff;color:var(--ink);border-color:#cbd7e5}.secondary:hover{background:#f3f6fa}
.button:disabled{opacity:.55;cursor:default}
.text-button{border:0;background:none;color:#214e77;padding:8px 0 0;text-decoration:underline;cursor:pointer;font-size:12px;font-weight:650}
.preview{position:sticky;top:15px}
.preview-head,.history-head{justify-content:space-between}
.pill{display:inline-flex;align-items:center;background:#edf3fa;color:#365370;border-radius:20px;padding:4px 9px;font-size:11px;font-weight:750;vertical-align:middle;white-space:nowrap}
.paper-wrap{background:#eaf0f7;border:1px solid #dbe4ef;border-radius:9px;padding:11px;display:flex;justify-content:center}
#paper,.invoice-paper{width:auto;max-width:100%;height:auto;max-height:53vh;display:block;background:white;box-shadow:0 2px 9px #172e4d21}
.totals{display:grid;gap:7px;margin:14px 0;font-size:13px}
.totals div{display:flex;justify-content:space-between;gap:10px}
.totals .grand{padding-top:9px;border-top:1px solid var(--line);font-size:16px;font-weight:750}
.full{width:100%}.full+.full{margin-top:8px}
.actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:15px}
.record-list{margin-top:13px}
.record{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 0;border-top:1px solid var(--line)}
.record strong{font-size:14px;overflow-wrap:anywhere}
.record p{margin-top:4px;overflow-wrap:anywhere}
.record .actions{margin:0;flex-shrink:0}
.empty{padding:14px 0}
.history-head{display:flex;align-items:center;gap:10px}.history-head label{margin:0;width:min(100%,270px)}
#notice{margin:0 0 14px;border:1px solid #a6cbb7;background:#eef9f2;color:#195437;padding:10px 12px;border-radius:8px;font-size:13px}
#notice.error{border-color:#eab7af;background:#fff2ee;color:#83291c}
@media(max-width:1090px){.shell{grid-template-columns:183px minmax(0,1fr)}.sidebar{padding-left:12px;padding-right:12px}.content,.top{padding-left:19px;padding-right:19px}.card{padding:15px}}
@media(max-width:900px){.shell{display:block}.sidebar{position:static;height:auto;padding:12px 15px;gap:9px}.brand{margin:0}.nav-caption,.side-footer{display:none}.sidebar-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.nav-toggle{display:inline-flex;align-items:center;gap:8px;border:1px solid #506a8b;border-radius:8px;background:#1d385d;color:#fff;padding:10px 13px;font-size:14px;font-weight:700;cursor:pointer}.nav-toggle svg{color:#ffa56c}#desk-menu{display:none;gap:4px;padding:7px;border:1px solid #395172;border-radius:10px;background:#172e4e}#desk-menu.is-open{display:grid}#desk-menu a{min-height:44px;padding:9px 12px}.top{height:41px}.preview{top:10px}}
@media(max-width:670px){.work-grid,.manage-grid{grid-template-columns:1fr}.preview{position:static}#paper,.invoice-paper{max-height:none;width:min(100%,380px)}.content{padding:22px 13px 35px}.top{padding:0 13px}.page-head{align-items:flex-start}.page-head>.button{flex-shrink:0}.private{display:none}input:not([type=checkbox],[type=radio],[type=range]),textarea,select{font-size:16px}.record{flex-wrap:wrap}}
@media(max-width:560px){
  .fields,.accounting-period{grid-template-columns:minmax(0,1fr)}
  .history-head{flex-wrap:wrap}
  .history-head label{width:100%}
}
@media(max-width:390px){.page-head>.button{padding:8px;font-size:11px}}

.income-stats{display:grid;grid-auto-rows:1fr;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;margin:17px 0 0}
.income-stats div{background:#f0f4fa;border-radius:8px;padding:13px 11px;min-width:0}
.income-stats div:last-child{background:var(--navy);color:#fff}
.income-stats dt{font-size:12px;font-weight:650}
.income-stats dd,.income-tabs strong{font-size:clamp(15px,2.1vw,23px);font-weight:800;margin:4px 0 0;overflow-wrap:anywhere}
.income-tabs button{min-width:0;border:1px solid #d4dfed;border-radius:8px;background:#f0f4fa;color:var(--ink);padding:13px 11px;text-align:left;cursor:pointer;font:inherit}
.income-tabs button[aria-selected=true]{background:var(--navy);border-color:var(--navy);color:#fff}
.income-tabs span{display:block;font-size:12px;font-weight:650}
.income-tabs strong{display:block}
#income-details-heading{margin:0;font-size:15px}
.month-overview{margin-top:16px}
.table-wrap{overflow-x:auto;margin-top:12px}
.month-overview table{width:100%;border-collapse:collapse;font-size:13px;white-space:nowrap}
.month-overview th,.month-overview td{padding:9px 10px;border-top:1px solid var(--line);text-align:right}
.month-overview th:first-child{text-align:left}
.month-overview .button{min-height:32px;padding:6px 9px}
#invoice-zip-dialog,#sent-dialog{border:0;padding:0;border-radius:14px;color:var(--ink);width:min(430px,calc(100% - 26px));box-shadow:0 18px 58px #0b213c55}
#invoice-zip-dialog::backdrop,#sent-dialog::backdrop{background:#10264488}
#sent-dialog p{margin-top:6px}
#invoice-zip-dialog .sent-error,#sent-dialog .sent-error{color:#83291c}
#invoice-zip-months{min-width:0;margin:12px 0;padding:10px 12px;border:1px solid #d4dfed;border-radius:8px}
#invoice-zip-months legend{font-weight:700}
#invoice-zip-months p,#invoice-zip-count{margin:6px 0 10px}
#invoice-zip-month-list{max-height:35vh;overflow:auto}
#invoice-zip-month-list label{display:flex;align-items:center;gap:9px;margin:0;padding:7px 2px}
#invoice-zip-month-list input{width:18px;height:18px;flex:none}
@media(max-width:900px){.brand{max-width:170px}}
@media(max-width:540px){.income-stats{grid-template-columns:repeat(2,minmax(0,1fr))}#income .history-head{align-items:flex-start}#income .history-head label{max-width:155px}.record .actions{flex-shrink:1}}
.admin{display:flex;align-items:center;gap:10px;min-width:0;margin-left:10px}
#admin-account{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.admin a{white-space:nowrap}
.send-panel{border-top:1px solid var(--line);padding:12px 0 4px;margin:12px 0 6px}
.send-panel h3{margin:0;font-size:14px}
.send-panel .actions{margin-top:8px}
#delivery-dialog{border:0;padding:0;border-radius:14px;color:var(--ink);width:min(475px,calc(100% - 26px));box-shadow:0 18px 58px #0b213c55}
#delivery-dialog::backdrop{background:#10264488}
#delivery-dialog p{margin-top:8px}
#delivery-dialog .sent-error{color:#83291c}
#delivery-open[aria-disabled=true]{opacity:.6}
#history .record,#sent .record{flex-wrap:wrap}
#history .record .actions,#sent .record .actions{flex-shrink:1}
@media(max-width:540px){#admin-account{display:none}}
.address-link{display:inline-block}
.payment-badge{display:inline-block;background:#fff0d7;color:#80440e;border-radius:20px;padding:4px 9px;font-size:11px;font-weight:750;vertical-align:middle}
.payment-badge.paid{background:#e3f5ea;color:#175334}
.invoice-payment-badges{display:inline-flex;flex-wrap:wrap;gap:4px;max-width:100%;vertical-align:middle}
.record .invoice-payment-badges,.record-disclosure .invoice-payment-badges{margin-inline-start:4px;max-width:calc(100% - 4px)}
#issue-date-badges{display:contents}
.payment-badge.invoice-date-badge{background:#eaf0f8;color:#25415e;white-space:nowrap}
.payment-actions{align-items:center}
.history-filters{display:flex;gap:10px;align-items:end}
.history-filters label{width:auto}
.history-filters label:first-child{width:min(32vw,260px)}
#payment-dialog{border:0;padding:0;border-radius:14px;color:var(--ink);width:min(430px,calc(100% - 26px));box-shadow:0 18px 58px #0b213c55}
#payment-dialog::backdrop{background:#10264488}
#payment-dialog p{margin-top:6px}
#payment-dialog .sent-error{color:#83291c}
#delivery-preview,#delivery-manual{margin-top:10px}
#delivery-preview summary,#delivery-manual summary{cursor:pointer}
#delivery-message{background:#f0f4fa;border-radius:8px;padding:10px 12px;white-space:pre-wrap}
#delivery-copy-status{margin-left:8px;font-size:13px}
@media(max-width:590px){#history .history-head,#customers .history-head{align-items:stretch;flex-direction:column}.history-filters{flex-wrap:wrap}.history-filters label:first-child{width:min(100%,260px)}}

.nav-payables{margin-top:7px;border-top:1px solid #395172}
.check-label{display:flex;align-items:flex-start;gap:8px}
.check-label input{flex:none;width:16px;height:16px;min-height:0;margin:1px 0 0}
.self-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
.self-stats div:nth-child(2),.payment-badge.overdue{background:#ffe7e4;color:#8e2821}
.self-register-actions{margin-top:10px}
#self-register .record{flex-wrap:wrap}
details.record-disclosure{display:block}
.record-disclosure>summary{cursor:pointer;overflow-wrap:anywhere;padding:4px 0}
.record-disclosure>summary:focus-visible{outline:2px solid currentColor;outline-offset:4px}
.record-disclosure[open]>.record-disclosure-body{margin-top:10px}
.record-disclosure-body>.actions{margin-top:8px}
#self-register .record .actions{flex-shrink:1}
@media(max-width:900px){.nav-payables{margin-top:0;border-top:0}}
@media(max-width:590px){#self-register .history-head{align-items:stretch;flex-direction:column}.self-stats{gap:6px}.self-stats div{padding:9px 7px}}

.contractor-bank{border:1px solid var(--line);border-radius:8px;min-width:0;margin:14px 0 0;padding:3px 10px 10px}
.contractor-bank legend{padding:0 4px;font-size:12px;font-weight:750}
.contractor-bank legend small{font-size:11px;color:var(--muted);font-weight:500}
.contractor-note{margin-top:6px;color:#195437}
.contractor-note.error{color:#83291c}
@media(max-width:660px){#contractor-directory .history-head{flex-wrap:wrap}}
.auth-page{min-height:100vh;display:grid;place-items:center;padding:20px;background:#f4f7fb}
.auth-card{width:min(100%,440px);padding:26px}
.auth-logo{display:block;width:min(100%,220px);margin:0 auto 16px}
.auth-card h1{margin:4px 0 9px}
.auth-card .button{margin-top:17px}
.auth-card .auth-message{background:#fff0e7;color:#783513;padding:9px 11px;border-radius:6px;margin-top:14px}
.auth-card .text-button{display:inline-block;margin-top:13px}
#desk-signout{white-space:nowrap;padding:0}

#invoice-pod-limits{margin-top:6px}
.pod-list{margin:8px 0 0;padding:0;list-style:none}
.pod-list li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 0;border-top:1px solid var(--line);font-size:13px;overflow-wrap:anywhere}
.pod-list button{flex-shrink:0}
#delivery-pods h3{font-size:13px;margin:4px 0 0}

.address-fields textarea{display:block}
.address-feedback{margin-top:6px;font-size:12px}
.address-suggestions{margin:4px 0 0;padding:3px;list-style:none;border:1px solid var(--line);border-radius:8px;background:#f6f9fd}
.address-suggestions button{display:block;width:100%;min-height:42px;text-align:left;padding:7px 9px;border:0;border-radius:5px;background:transparent;color:var(--ink);font-size:13px;cursor:pointer;overflow-wrap:anywhere}
.address-suggestions button:hover,.address-suggestions button:focus-visible{background:#e6eff9}
#save-delivery-address{margin-top:8px}
@media(max-width:670px){.address-fields{grid-template-columns:1fr;gap:0}}

.supplier-invoice-form{max-width:640px}
.supplier-invoice-form h2{margin-bottom:4px}
#supplier-file-help{margin-top:5px}

.proof-events{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.proof-events fieldset{margin:0;min-width:0;border:1px solid var(--line);border-radius:9px;padding:9px}
.proof-events legend{padding:0 4px;font-weight:750;font-size:13px}
.proof-events label{margin-top:6px}.proof-events input{min-height:40px}
.proof-sign-label{display:flex;justify-content:space-between;align-items:center;font-size:12px;font-weight:700;margin:9px 0 5px}
.proof-signature{display:block;width:100%;height:70px;border:1px dashed #9bafc8;border-radius:7px;background:#f8fafd;touch-action:none}
.proof-status{margin-top:7px}.proof-status:empty{display:none}
#proof-dialog{width:min(960px,calc(100% - 22px))}
#proof-dialog .preview-head{justify-content:space-between}
.proof-dialog-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:15px}
#proof-saved-editor[hidden]+div{grid-column:1/-1}
.proof-dialog-grid h3{font-size:14px;margin:10px 0 7px}
#proof-saved-editor .proof-events{grid-template-columns:1fr}
.proof-tabs{margin:0 0 8px}
.proof-tabs [aria-pressed=true]{background:var(--navy);color:#fff}
.proof-paper{background:#fff;border:1px solid var(--line);padding:13px;border-radius:9px;overflow-wrap:anywhere}
.proof-paper header{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:2px solid #ed792f;padding-bottom:8px}
.proof-paper header img{width:min(40%,155px);height:auto}
.proof-paper header div{text-align:right}
.proof-paper .proof-contact{font-size:11px;margin:7px 0}
.proof-document-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:8px 0}
.proof-document-grid div{min-width:0;padding:7px;border:1px solid var(--line);border-radius:6px;font-size:12px;white-space:pre-line}
.proof-document-grid strong{display:block;font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;margin-bottom:4px}
.proof-paper canvas{width:min(100%,145px);height:auto;display:block;margin-top:3px}
@media(max-width:720px){.proof-dialog-grid,.proof-events{grid-template-columns:1fr}}

#quote-form .card-head { margin-bottom: 4px; }
#quote-form .quote-contact { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
#quote-form small { display: block; margin: 5px 0 0; }
.quote-help:not(:empty) { margin-top: 9px; }
.quote-calculate { background: #fa8b45; color: var(--navy); }
.quote-calculate:hover { background: #ff9c5d; }
.quote-card { background: var(--navy); color: #fff; }
.quote-card p { color: #d2def0; }
.quote-card .pill { background: #314b6e; color: #fff; }
.quote-amount { font-size: clamp(34px, 5vw, 48px); font-weight: 800; letter-spacing: -.045em; }
.quote-card .grand, .quote-note { border-color: #506787; }
.quote-share { margin-top: 16px; }
.quote-share p { margin-top: 9px; }
.quote-whatsapp { background: #43d982; color: #102f23; }
.quote-whatsapp:hover { background: #6fe49e; }
.quote-email { background: #fff; color: var(--navy); }
.quote-email:hover { background: #edf3fa; }
.quote-note { border-top: 1px solid #506787; margin-top: 16px; padding-top: 12px; }

.job-alert { border: 1px solid #efc5a5; border-radius: 20px; background: #fff0e4; color: #813a13; padding: 5px 9px; font-size: 12px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.job-alert:hover { background: #ffdfc5; }
.job-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.jobs-status:not(:empty) { margin-top: 10px; }
.job-record { border-top: 1px solid var(--line); padding: 14px 0; overflow-wrap: anywhere; }
.job-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.job-price { text-align: right; flex-shrink: 0; }
.job-state { display: inline-block; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 800; }
.job-state.requested { background: #fff0e4; color: #813a13; }
.job-state.confirmed { background: #e8f0fd; color: #254f85; }
.job-state.completed { background: #e4f6ed; color: #21634b; }
.job-state.cancelled { background: #fcebea; color: #8a2e25; }
.job-actions .job-cancel { color: #8a2e25; }
.job-details { margin-top: 7px; font-size: 13px; }
.job-details summary { cursor: pointer; }
.job-details p { margin-top: 4px; }
.job-actions { align-items: flex-end; margin-top: 9px; }
.job-actions label { margin-top: 0; width: min(100%, 170px); }
@media(max-width:540px) { #received-jobs .page-head { flex-wrap: wrap; } }

.job-stops { margin-top: 12px; }
.job-stop-list, .job-stops ol { padding-inline-start: 22px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

.push-settings { margin-bottom: 14px; }
.push-settings p { margin-top: 6px; }
.push-settings .actions { margin-top: 11px; }
#push-status:empty { display: none; }

#driver-admin .card { margin-top: 16px; }
#driver-admin label { display: block; margin-top: 10px; }
#driver-admin input { max-width: 100%; }
#driver-admin .driver-quote-entry { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
#driver-admin h4 { margin: 0; }

.load-fields{display:grid;grid-template-columns:minmax(130px,190px) minmax(0,1fr);gap:9px 18px;margin:20px 0}.load-fields dt{font-weight:700;color:var(--muted,#657187)}.load-fields dd{margin:0;overflow-wrap:anywhere;white-space:pre-wrap}#load-search-results>.job-record{margin-bottom:18px}#load-search-input{min-width:230px}@media(max-width:600px){.load-fields{grid-template-columns:1fr;gap:4px}.load-fields dd{margin-bottom:12px}#load-search-form{align-items:stretch;flex-direction:column}#load-search-input{min-width:0;width:100%}}

.desk-navigation{display:flex;gap:8px;flex-shrink:0}
.desk-navigation .button{min-height:36px;padding:7px 10px}
#profit-month{max-width:240px}

.capacity-guide .capacity-scroll{overflow-x:auto}
.capacity-guide table{min-width:530px}
.capacity-guide caption{text-align:left;font-weight:700;padding:8px}

.nav-finance summary{cursor:pointer;list-style:none}
.nav-finance summary::-webkit-details-marker{display:none}
.nav-finance summary::after{content:"";width:7px;height:7px;border-right:2px solid;border-bottom:2px solid;transform:rotate(45deg);margin-left:auto;margin-right:4px}
.nav-finance[open] summary::after{transform:rotate(225deg)}
.nav-finance a{padding-left:25px}
.nav-finance:not([open]):has(a[aria-current="page"]) summary{background:#294466;color:#fff;box-shadow:inset 3px 0 #ff9252}

.nav-finance a[hidden]{display:none}

#profit-loss [data-profit-card][aria-pressed="true"]{background:var(--navy);border-color:var(--navy);color:#fff}
#profit-list-title{scroll-margin-top:80px}

.jobs-map-card{margin-bottom:16px}
#jobs-map{height:clamp(280px,52vh,540px);background:#e9eef5;border-radius:10px;isolation:isolate}
.job-activity-dates{display:flex;flex-wrap:wrap;gap:8px 24px;margin:8px 0}
.job-activity-dates div{display:flex;flex-wrap:wrap;gap:4px 8px}
.job-activity-dates dt{font-weight:650}
.job-activity-dates dd{margin:0}

.business-delete-dialog{width:min(32rem,calc(100% - 32px));border:0;border-radius:14px;padding:22px;color:var(--ink);box-shadow:0 18px 58px #0b213c55}
.business-delete-dialog::backdrop{background:#10264488}
.business-delete-dialog h3{margin:0 0 12px}
.business-delete-dialog .business-delete-action:not(:disabled){color:#fff;background:#9b2c20;border-color:#9b2c20}

#accounting{min-width:0}
#accounting .page-head{margin-bottom:14px}
.accounting-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:1fr;gap:var(--field-gap);margin-bottom:14px}
.accounting-grid.accounting-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
.accounting-grid .button{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:0;min-height:82px;padding:7px 4px;text-align:center;white-space:normal;overflow-wrap:anywhere;font-size:13px;line-height:1.2}
.accounting-grid .button span{color:#aa470e;font-size:21px;margin-bottom:6px}
.accounting-grid .button.primary span{color:#ffae76}
.accounting-tools .button{min-height:68px}
.accounting-period{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:8px;margin-bottom:12px}
.accounting-period label{min-width:0}
#accounting .history-filters,#accounting .history-head{flex-wrap:wrap;min-width:0}
#accounting .history-filters label{min-width:0;max-width:100%}
#accounting .record>*{min-width:0;overflow-wrap:anywhere}
#accounting .record .actions{flex-shrink:1}
#accounting .record .button{white-space:normal;overflow-wrap:anywhere;max-width:100%}
#accounting-sales #finance-access{margin-top:10px}

#accounting-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}
.accounting-finance-heading{margin:8px 0}
#accounting-finance-content,#accounting-finance-content .page{min-width:0}
#accounting-finance-content .page-head{flex-wrap:wrap}
#accounting-sales-totals{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:12px}
#accounting-sales-totals button{display:grid;grid-template-rows:1fr auto;align-items:start;justify-content:stretch;gap:6px;white-space:normal;overflow-wrap:anywhere}
#accounting-sales-totals button[aria-pressed=true]{background:var(--navy);border-color:var(--navy);color:#fff}
#accounting-sales-totals strong{color:inherit;margin:0;white-space:nowrap;overflow-wrap:normal;font-variant-numeric:tabular-nums}

.admin-hub{min-width:0}
.admin-hub .accounting-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.admin-hub .accounting-grid .button,#accounting .accounting-grid .button{
  display:grid;grid-template-rows:24px auto;align-content:center;justify-items:center;
  gap:7px;min-width:0;min-height:78px;padding:10px 7px;text-align:center;
  white-space:normal;overflow-wrap:anywhere;line-height:1.25;
}
.admin-hub .accounting-grid .button span,#accounting .accounting-grid .button span{
  margin:0;line-height:24px;
}

.admin-hub .accounting-grid .tile-label,#accounting .accounting-grid .tile-label{
  color:inherit;font-size:inherit;line-height:1.25;min-height:2.5em;
}

/* Keep the job views aligned with the toolbar as the workspace resizes. */
.content:has(> :is(#received-jobs,#unallocated-jobs,#allocated-jobs,#accepted-jobs,#completed-jobs):not([hidden])) {
  max-width: none;
}
#completed-jobs .page-head { flex-wrap: wrap; }
#completed-jobs-list { container-type: inline-size; }
#completed-jobs-period {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  max-width: 28rem;
}
#completed-jobs .completed-job-row {
  display: grid;
  justify-content: stretch;
  align-items: start;
  gap: .25rem 1rem;
  text-align: start;
  width: 100%;
  margin: 6px 0;
  padding: 11px;
  white-space: normal;
  overflow-wrap: anywhere;
}
#completed-jobs .completed-job-row span { color: var(--muted); font-weight: 500; }
#completed-jobs .completed-job-status { display: block; }
@container (min-width: 48rem) {
  #completed-jobs .completed-job-row {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1.25fr);
    font-size: .875rem;
  }
}

#received-jobs .received-page-tools { margin-bottom: 12px; }
#received-jobs .received-page-tools > summary,
#received-jobs .received-job-section > summary {
  cursor: pointer;
  font-weight: 700;
  padding: 11px 0;
}
#received-jobs .received-page-tools > summary { padding: 0; }
#received-jobs .received-page-tools > a { margin-top: 12px; }
#received-jobs .job-record { padding: 0; }
#received-jobs .received-job-summary {
  align-items: center;
  display: flex;
  gap: 10px;
  list-style: none;
  min-height: 62px;
  padding: 10px 0;
  cursor: pointer;
}
#received-jobs .received-job-summary::-webkit-details-marker { display: none; }
#received-jobs .received-job-summary::before {
  content: '';
  flex: 0 0 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(-45deg);
}
#received-jobs .job-record[open] > .received-job-summary::before { transform: rotate(45deg); }
#received-jobs .received-job-route { flex: 1; min-width: 0; }
#received-jobs .received-job-route small { display: block; color: var(--muted); }
#received-jobs .received-job-summary .job-state { max-width: 44%; white-space: normal; }
#received-jobs .received-job-body .job-cancel { color: #8a2e25; }
#received-jobs .received-job-body { padding-bottom: 12px; }
#received-jobs .received-job-section { border-top: 1px solid var(--line); }
#received-jobs .received-job-section[open] { padding-bottom: 10px; }

#cx-monthly-downloads .button{grid-template-rows:auto}

.booking-calendar-controls { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .75rem; }
.booking-calendar-controls h2 { margin: 0; }
.booking-calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: .25rem; text-align: center; }
.booking-calendar-grid button { display: grid; justify-items: center; gap: .2rem; padding: .35rem 0; min-width: 0; }
.booking-calendar-grid small { font-size: .7rem; }
#calendar-alert:not([hidden]) { margin-bottom: 1rem; }
#calendar-bookings article { margin-bottom: .75rem; }
#calendar-bookings form { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; }

.combined-accounts-table { overflow-x: auto; }
.combined-accounts-table table { border-collapse: collapse; width: 100%; }
.combined-accounts-table th, .combined-accounts-table td { border-bottom: 1px solid #ccd6e3; padding: .65rem; }
.combined-accounts-table th:first-child { text-align: left; }
.combined-accounts-table th:not(:first-child), .combined-accounts-table td { text-align: right; }
.combined-accounts-table td { font-variant-numeric: tabular-nums; white-space: nowrap; }

.places-suggestions { display: grid; gap: .25rem; padding: .4rem; border: 1px solid #aeb8c6; border-radius: .5rem; background: white; color: #17233b; }
.places-suggestions[hidden] { display: none; }
.places-suggestions button { text-align: left; background: white; color: #17233b; border: 0; padding: .45rem; }
.places-suggestions button:hover, .places-suggestions button:focus-visible { background: #e9eff8; }
.places-suggestions small { justify-self: end; }

.desk-navigation { flex-wrap: wrap; }
#desk-first-picker select, .desk-split-toolbar select { max-width: 100%; padding: 7px; }
.desk-split-open {
  grid-template-columns: 225px minmax(0,var(--desk-left-width,1fr)) minmax(0,var(--desk-right-width,1fr));
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
.desk-split-open > main { overflow: auto; min-width: 0; }
.desk-split-open > main .top { flex-wrap: wrap; gap: 8px; }
.desk-second-panel { display: grid; grid-template-rows: auto minmax(0,1fr); min-width: 0; border-inline-start: 2px solid var(--line); }
.desk-split-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px; background: white; border-block-end: 1px solid var(--line); }
.desk-split-toolbar > label:first-child { min-width: 0; }
.desk-split-resize { display: flex; align-items: center; gap: 6px; font-size: .82rem; }
.desk-split-resize input { width: 105px; }
#desk-second-frame { width: 100%; height: 100%; border: 0; }
.desk-embedded-panel .shell { display: block; }
.desk-embedded-panel .sidebar, .desk-embedded-panel #desk-signout { display: none; }

.combined-accounts-table .combined-breakdown { text-align: left; white-space: normal; }
.combined-breakdown caption { text-align: left; font-weight: 700; padding: .65rem 0; }

/* Expand each workspace section within the Admin Desk sidebar. */
.sidebar { overflow-y: auto; }
#desk-menu > a { white-space: normal; }
#desk-menu > a.desk-active-group { background: #1d385d; color: #fff; }
.desk-submenu-arrow { margin-left: auto; color: #ffa56c; }
[aria-expanded="true"] > .desk-submenu-arrow { transform: rotate(90deg); }
.desk-submenu { margin: 0 0 7px 18px; padding-left: 7px; border-left: 1px solid #506a8b; }
#desk-menu .desk-submenu a { padding: 8px 10px; white-space: normal; font-size: 13px; }
body:has(#finance-menu-code[hidden]) .desk-finance-code-link { display: none; }
html:not(.desk-embedded-panel) .desk-section-tiles,
html:not(.desk-embedded-panel) .accounting-finance-heading,
html:not(.desk-embedded-panel) #accounting.desk-accounting-sales > .page-head { display: none; }
html:not(.desk-embedded-panel) #invoicing.desk-download-page .desk-section-tiles { display: block; }
html:not(.desk-embedded-panel) #invoicing.desk-download-page .desk-section-tiles > :not(#self-download-all) { display: none; }
@media (max-width: 900px) {
  #desk-menu.is-open { max-height: 65dvh; overflow-y: auto; }
}

.message-thread { display: grid; gap: 8px; list-style: none; padding: 0; }
.message-thread li { padding: 10px 14px; background: #eef3f8; border-radius: 8px; }
.message-thread .message-own { background: #e8f4ec; }
.message-thread p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

#messenger > .actions { margin-bottom: 12px; }
.messenger-panel:not([hidden]) { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(0, 3fr); gap: 18px; }
.messenger-contact-list select { width: 100%; min-height: 12rem; }
.messenger-conversation { min-width: 0; }
#messenger-picker { margin-top: 12px; }
#messenger-picker:not([hidden]) { display: grid; gap: 8px; }
#messenger-results button { white-space: normal; overflow-wrap: anywhere; text-align: left; }
#messenger-selected:empty { display: none; }
@media (max-width: 680px) {
  .messenger-panel:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
  .messenger-contact-list select { min-height: 0; max-height: 8rem; }
}

#invoice-viewer { box-sizing: border-box; width: min(940px, calc(100% - 20px)); height: min(92dvh, 1100px); padding: 0; border: 0; border-radius: 12px; color: var(--ink); box-shadow: 0 18px 58px #0b213c55; }
#invoice-viewer[open] { display: flex; flex-direction: column; }
#invoice-viewer::backdrop { background: #10264488; }
.invoice-viewer-head, .invoice-viewer-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #dce3ea; }
.invoice-viewer-bar[hidden] { display: none; }
.invoice-viewer-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
#invoice-viewer-close { min-width: 44px; min-height: 44px; font-size: 1.45rem; line-height: 1; }
#invoice-viewer-status { margin: 10px 14px; }
#invoice-viewer-status:empty { display: none; }
#invoice-viewer-paper { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 10px; background: #eef3f8; }
#invoice-viewer-paper canvas { display: block; width: 100%; height: auto; margin: auto; background: white; }

.staff-training-directory { margin-top: 16px; }
.staff-training-directory input, .staff-training-directory select { max-width: 440px; }
.staff-training-task { border-top: 1px solid var(--line); padding: 12px 0; }
.staff-training-task > summary { cursor: pointer; font-weight: 700; }
.staff-training-category { color: #526680; margin: 10px 0; }
.staff-training-flow { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 10px 0; counter-reset: training-step; }
.staff-training-flow li { display: flex; align-items: center; gap: 8px; background: #eaf1fa; border-radius: 8px; padding: 8px 12px; font-weight: 600; }
.staff-training-flow li::before { counter-increment: training-step; content: counter(training-step); background: #102644; color: #fff; border-radius: 50%; min-width: 24px; text-align: center; }
.staff-training-instructions { margin: 12px 0; }
.staff-training-instructions li + li { margin-top: 8px; }
.staff-training-preview { display: block; width: min(100%, 640px); height: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; }

.jobs-workspace-tabs{margin:0 0 16px}
.jobs-workspace-tabs a[aria-current="page"]{background:var(--navy);color:#fff;border-color:var(--navy)}

#directory-contact-dialog{width:min(440px,calc(100% - 26px));color:var(--ink)}
#directory-contact-dialog::backdrop{background:#10264488}

#profit-downloads:has(> summary[hidden]) { display: contents; }

.cx-profit-overview .history-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 12rem);
  align-items: end;
  gap: .75rem;
  margin-bottom: .9rem;
}
.cx-profit-overview .history-head h2 { margin: 0 0 .3rem; }
.cx-profit-overview .history-head label { width: 100%; }
.cx-profit-overview #profit-month {
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  min-block-size: 44px;
}
@media (max-width: 670px) {
  .cx-profit-overview .history-head { grid-template-columns: minmax(0, 1fr); }
  .cx-profit-overview .history-head h2 { margin: 0; }
  .cx-profit-overview #profit-month { appearance: none; }
}

.cx-profit-overview #profit-downloads {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 1rem;
  padding: 0 .75rem;
}
.cx-profit-overview #profit-downloads summary {
  cursor: pointer;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.4;
  padding: .75rem 0;
}
.cx-profit-overview .cx-download-heading {
  font-size: .875rem;
  margin: .6rem 0 .4rem;
}
.cx-profit-overview #profit-downloads .actions,
.cx-profit-overview #cx-monthly-downloads .accounting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: .5rem;
  margin: 0 0 .75rem;
}
.cx-profit-overview #profit-downloads .button {
  justify-content: center;
  min-height: 44px;
  padding: .5rem;
  text-align: center;
  white-space: normal;
}
.cx-profit-overview .income-stats {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: .6rem;
}
.cx-profit-overview .income-tabs button { padding: .65rem .7rem; }
.cx-profit-overview .income-tabs span { font-size: .875rem; line-height: 1.25; }
.cx-profit-overview .income-tabs strong {
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  font-variant-numeric: tabular-nums;
  margin-top: .3rem;
}
.cx-profit-overview #profit-expense-summary { margin-top: .85rem; }
@media (min-width: 340px) and (max-width: 540px) {
  .cx-profit-overview .income-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

#dispatch .desk-section-tiles{display:grid}
#website-requests #website-quote-requests h2{display:none}
@media(max-width:600px){#home .home-dispatch-links,#dispatch .accounting-grid{grid-template-columns:minmax(0,1fr)}}

.job-contact-matches:not([hidden]){display:grid;gap:6px}.job-contact-matches button{min-height:44px;white-space:normal;text-align:left;justify-content:flex-start}

.desk-navigation .mobile-home, #desk-shortcuts { display: none; }
@media (max-width: 900px) {
  .top { position: relative; height: auto; min-height: 44px; flex-wrap: wrap; }
  .desk-navigation { flex-shrink: 1; gap: 4px; }
  .desk-navigation .button { padding-inline: 7px; }
  .desk-navigation .mobile-home, #desk-shortcuts { display: block; }
  #desk-shortcuts summary { cursor: pointer; list-style: none; }
  #desk-shortcuts summary::-webkit-details-marker { display: none; }
  #desk-shortcuts nav {
    position: absolute; inset: 100% 8px auto; z-index: 12;
    max-height: 60vh; overflow-y: auto; background: white;
    border: 1px solid #cbd7e5; border-radius: 8px; padding: 6px;
    box-shadow: 0 6px 18px #14294526;
  }
  #desk-shortcuts a { display: block; padding: 12px; font-weight: 700; color: #122844; background: white; }
  #desk-shortcuts a:is(:hover, :focus-visible, :active) { background: #eaf1f8; }
  #desk-shortcuts .shortcut-child { padding-left: 28px; font-weight: 500; }
  body:has(#finance-menu-code[hidden]) #desk-shortcuts .desk-finance-code-link { display: none; }
}
