:root{color-scheme:dark;--ink:#edf3f8;--muted:#a9bac9;--line:#2a3b4a;--panel:#132331;--navy:#0b1722;--teal:#72d6ca;--s1:4px;--s2:8px;--s3:12px;--s4:16px;--s5:20px;--s6:24px;--s8:32px;--s10:40px}
/* Invoice reporting extends the workspace's existing task surface. */
.invoice-record-summary::after{margin-right:3px}
.invoice-report{margin:32px 0 40px;min-width:0;scroll-margin-top:96px;caret-color:var(--teal)}
.invoice-report [hidden]{display:none!important}
.invoice-report ::selection{background:var(--teal);color:var(--navy)}
.invoice-report-heading{display:flex;align-items:start;justify-content:space-between;gap:24px;margin-bottom:28px}
.invoice-report h2{font-size:28px;letter-spacing:-.025em;margin:0 0 10px}.invoice-report-heading p{max-width:65ch;margin:0;color:var(--muted);line-height:1.6}
.invoice-filters{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:16px;align-items:end;padding:24px 0;border-block:1px solid var(--line)}
.invoice-filters label,.invoice-field{display:grid;gap:8px;font-size:13px;color:var(--muted);min-width:0}
.invoice-report input,.invoice-report select{box-sizing:border-box;width:100%;min-width:0;min-height:44px;border:1px solid var(--line);border-radius:8px;padding:10px 12px;color:var(--ink);background:var(--navy);font:inherit;font-size:14px}
.invoice-report input:focus-visible,.invoice-report select:focus-visible,.invoice-report button:focus-visible,.invoice-record>summary:focus-visible,.invoice-lines-scroll:focus-visible{outline:2px solid var(--teal);outline-offset:3px}
.invoice-filter-actions{display:flex;gap:8px}.invoice-date-help{margin:12px 0 20px;color:var(--muted);font-size:13px;line-height:1.6}
.invoice-availability{margin:20px 0;padding:16px 20px;background:var(--panel);color:var(--muted);font-size:14px;line-height:1.6;border-radius:12px}
.invoice-report-overview{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:8px 0 20px}
.invoice-summary{display:flex;align-items:center;gap:24px;flex-wrap:wrap}.invoice-summary-label{font-size:13px;color:var(--muted)}
.invoice-currency-summary{display:flex;gap:8px 12px;align-items:baseline;flex-wrap:wrap;font-size:13px;font-variant-numeric:tabular-nums}.invoice-currency-summary strong{font-size:18px;font-weight:600;color:var(--ink)}.invoice-currency-summary>span{color:var(--muted)}.invoice-currency-summary .invoice-provisional{color:#edce96}
.invoice-text-button{display:inline-flex;align-items:center;min-height:44px;padding:8px 0;background:transparent;border:0;color:var(--teal);text-align:left;cursor:pointer;font:inherit;font-size:13px;text-underline-offset:4px}.invoice-text-button:hover{text-decoration:underline}.invoice-text-button[aria-pressed=true]{text-decoration:underline}
.invoice-report-status{min-height:20px;margin:0 0 16px;color:var(--muted);font-size:13px;line-height:1.6}.invoice-report-status.is-error,.invoice-review-status.is-error{color:#ffc4b8}
.invoice-user-group{margin:24px 0 32px}.invoice-user-heading{display:flex;justify-content:space-between;align-items:baseline;gap:24px;padding:16px 0;border-bottom:1px solid var(--line)}.invoice-user-heading h3{margin:0;font-size:20px;overflow-wrap:anywhere}.invoice-user-subtotal{display:flex;gap:16px;align-items:baseline;flex-wrap:wrap}.invoice-user-subtotal .invoice-currency-summary strong{font-size:14px}
.invoice-record{border-bottom:1px solid var(--line);min-width:0}.invoice-record-summary{display:grid;grid-template-columns:minmax(145px,1fr) minmax(140px,2fr) minmax(120px,1fr) 150px 12px;align-items:center;gap:20px;padding:20px 0;list-style:none;cursor:pointer;font-size:14px}.invoice-record-summary::-webkit-details-marker{display:none}.invoice-record-summary::after{content:'';width:7px;height:7px;border-right:1px solid var(--muted);border-bottom:1px solid var(--muted);transform:rotate(45deg);justify-self:end}.invoice-record[open]>.invoice-record-summary::after{transform:rotate(225deg)}.invoice-record-summary:hover{background:var(--panel)}
.invoice-identity{display:grid;gap:6px;font-variant-numeric:tabular-nums}.invoice-identity strong{font-weight:550}.invoice-identity>span{font-size:12px;color:var(--muted);overflow-wrap:anywhere}.invoice-dealership{overflow-wrap:anywhere}.invoice-amount{text-align:right;font-variant-numeric:tabular-nums}.invoice-status{font-size:12px;color:var(--muted);justify-self:end}.invoice-status-verified{color:var(--teal)}.invoice-status-needs_review,.invoice-status-failed{color:#edce96}
.invoice-detail{display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,2fr);align-items:start;gap:32px;padding:16px 0 32px}.invoice-detail h4{font-size:16px;margin:0 0 12px}.invoice-source{position:sticky;top:24px;min-width:0}.invoice-source-photo{display:block;width:100%;height:auto;max-height:650px;object-fit:contain;background:var(--panel);border-radius:8px}
.invoice-correction-form{display:grid;gap:20px;min-width:0}.invoice-correction-form>h4{margin:0}.invoice-correction-form h5{font-size:14px;margin:12px 0 -8px}.invoice-muted{color:var(--muted);font-size:13px;line-height:1.6;margin:0}.invoice-meta-fields{display:grid;grid-template-columns:1fr 1fr 90px;gap:12px}.invoice-issues{margin:0;padding:16px 16px 16px 32px;border-radius:8px;background:#302b23;color:#edce96;font-size:13px;line-height:1.6}
.invoice-lines-scroll{max-width:100%;overflow-x:auto;scrollbar-color:var(--line) var(--navy)}.invoice-lines-table{min-width:900px;font-size:12px}.invoice-lines-table caption{text-align:left;padding-bottom:12px;color:var(--muted);font-size:12px}.invoice-lines-table th{padding:8px;font-size:12px}.invoice-lines-table td{padding:8px;vertical-align:top}.invoice-lines-table td:nth-child(1){min-width:130px}.invoice-lines-table td:nth-child(2){min-width:150px}.invoice-lines-table td:nth-child(3){min-width:85px}.invoice-lines-table td:nth-child(4),.invoice-lines-table td:nth-child(5){min-width:115px}.invoice-lines-table td:nth-child(6){min-width:145px}.invoice-lines-table .invoice-field>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.invoice-lines-table input{font-size:13px}
.invoice-adjustments{display:grid;gap:12px}.invoice-adjustment{display:grid;grid-template-columns:minmax(0,2fr) 100px minmax(0,1fr) auto;gap:12px;align-items:end}.invoice-calculation{padding-block:16px;margin:0;border-block:1px solid var(--line);font-size:13px;color:var(--ink);line-height:1.8;font-variant-numeric:tabular-nums}.invoice-acknowledgment{display:flex!important;align-items:start;gap:12px!important;color:var(--muted);font-size:13px;line-height:1.6}.invoice-acknowledgment input{width:20px;min-width:20px;min-height:20px;margin:1px 0 0;accent-color:var(--teal)}.invoice-review-status{margin:0;color:var(--muted);font-size:13px;line-height:1.6}.invoice-review-status:empty{display:none}.invoice-review-actions{display:flex;flex-wrap:wrap;gap:12px}.invoice-empty{padding:32px 0;border-block:1px solid var(--line)}.invoice-empty h3{font-size:18px;margin:0 0 12px}.invoice-empty p{max-width:65ch;color:var(--muted);font-size:14px;line-height:1.6;margin:0}
@media(max-width:1100px){.invoice-filters{grid-template-columns:1fr 1fr 1fr}.invoice-filter-actions{grid-column:1/-1}.invoice-record-summary{grid-template-columns:minmax(125px,1fr) minmax(130px,1.5fr) minmax(105px,1fr) 120px 10px;gap:12px}.invoice-meta-fields{grid-template-columns:1fr 1fr}.invoice-detail{grid-template-columns:minmax(160px,1fr) minmax(0,2fr);gap:20px}}
@media(max-width:720px){.invoice-report{margin:24px 0 40px}.invoice-report-heading{display:block;margin-bottom:20px}.invoice-report-heading>.button{margin-top:16px}.invoice-report h2{font-size:26px}.invoice-filters{grid-template-columns:1fr 1fr;gap:16px 12px;padding:20px 0}.invoice-filters>label:last-of-type{grid-column:1/-1}.invoice-filter-actions{display:grid;grid-template-columns:1fr 1fr}.invoice-report input,.invoice-report select{font-size:16px;min-height:48px}.invoice-report-overview{align-items:start;flex-direction:column;gap:12px}.invoice-summary{align-items:start;gap:12px}.invoice-user-heading{display:block}.invoice-user-subtotal{margin-top:12px;gap:8px}.invoice-user-subtotal .invoice-summary-label{display:none}.invoice-record-summary{grid-template-columns:minmax(0,1fr) auto 10px;gap:12px;padding:20px 0}.invoice-identity{grid-column:1}.invoice-dealership{grid-column:1;grid-row:2;font-size:13px;color:var(--muted)}.invoice-amount{grid-column:2;grid-row:1}.invoice-status{grid-column:2;grid-row:2}.invoice-record-summary::after{grid-column:3;grid-row:1/3}.invoice-detail{grid-template-columns:minmax(0,1fr);gap:24px}.invoice-source{position:static}.invoice-source-photo{max-height:360px}.invoice-meta-fields{grid-template-columns:1fr}.invoice-adjustment{grid-template-columns:1fr 1fr}.invoice-adjustment>.invoice-field:first-child{grid-column:1/-1}.invoice-review-actions{display:grid;grid-template-columns:1fr}.invoice-review-actions>.button{min-height:48px}.invoice-availability{padding:16px}.invoice-currency-summary{gap:6px 12px}}
.mobile-photo-description{display:none}
.camera-is-open{overflow:hidden}
.camera-dialog{width:min(680px,calc(100% - 32px));max-height:calc(100dvh - 32px);padding:24px;border:1px solid var(--line);border-radius:14px;color:var(--ink);background:var(--navy);overflow-y:auto}
.camera-dialog::backdrop{background:rgba(0,0,0,.8)}
.camera-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
.camera-header h2{margin:0}.camera-header span{color:var(--muted);font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}
.camera-view{aspect-ratio:4/3;max-height:52dvh;display:grid;place-items:center;overflow:hidden;background:#000;border-radius:8px}
.camera-view video{width:100%;height:100%;max-height:52dvh;object-fit:contain}
.camera-status{font-size:14px;line-height:1.5;min-height:42px;margin:16px 0 12px}
.camera-photos{display:flex;gap:8px;overflow-x:auto;margin-bottom:16px;min-height:0}.camera-photos:empty{display:none}
.camera-photos img{flex:0 0 64px;width:64px;height:64px;object-fit:cover;border-radius:6px}
.camera-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px}.camera-controls .button{min-height:56px}
.camera-fallback{width:100%;margin-top:12px;min-height:44px}
@media(max-width:720px){.camera-dialog{width:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:calc(20px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));border:0;border-radius:0}.camera-view{max-height:48dvh}.camera-view video{max-height:48dvh}.camera-controls .button{padding:12px 8px;font-size:14px}}
.invoice-option{display:flex;align-items:flex-start;gap:12px}
.invoice-option[hidden]{display:none!important}
.invoice-option input{appearance:auto;width:20px;height:20px;min-height:20px;margin:2px 0 0;flex-shrink:0;accent-color:var(--teal)}
.invoice-option small{display:block;margin-top:4px;color:var(--muted);font-size:12px;font-weight:400;line-height:1.5}
.invoice-editor{min-width:0;scroll-margin-top:calc(92px + env(safe-area-inset-top))}
.invoice-editor h3{font-size:20px;margin:4px 0 8px}
.invoice-editor p{font-size:13px;line-height:1.5;margin-bottom:12px}
.invoice-stage{position:relative;width:calc(100% - 44px);max-width:360px;margin:28px auto;background:var(--navy)}
.invoice-stage canvas{display:block;width:100%;height:auto}
.invoice-stage svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.invoice-stage polygon{fill:rgba(114,214,202,.08);stroke:var(--teal);stroke-width:3;vector-effect:non-scaling-stroke}
.invoice-corner{position:absolute;width:44px;height:44px;padding:0;border:0;transform:translate(-50%,-50%);background:transparent;color:var(--navy);font-size:12px;font-weight:700;touch-action:none;cursor:move;display:grid;place-items:center;isolation:isolate}
.invoice-corner::before{content:"";position:absolute;width:26px;height:26px;border-radius:50%;background:var(--teal);border:2px solid var(--navy);z-index:-1}
.invoice-corner:focus-visible{outline:2px solid var(--ink);outline-offset:0;border-radius:8px}
.invoice-tools{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}
.invoice-tools .button{padding:10px 8px;min-height:44px;font-size:13px}
.invoice-result{margin:16px 0}
.invoice-result figcaption{color:var(--muted);font-size:13px;margin-bottom:8px}
.invoice-result img{display:block;width:100%;max-height:300px;object-fit:contain;background:#fff}
.invoice-status{color:var(--muted)}
.invoice-status.is-error{color:#ffb9b1}
.invoice-editor>.button{width:100%;min-height:48px}
.capture-form.is-scanning>#capture-preview,.capture-form.is-scanning>.photo-queue,.capture-form.is-scanning>.capture-actions,.capture-form.is-scanning>#save-photos-button,.capture-form.is-scanning>#send-capture-button,.capture-form.is-scanning>.email-route,.capture-form.is-scanning>.capture-note{display:none}
.button.primary:disabled:hover{color:#95a7b6;background:#273947}
.workspace-photo-only .vehicle-grid,.workspace-photo-only .records-panel,.workspace-photo-only .gallery-panel,.workspace-photo-only .dashboard-hero,.workspace-photo-only .capture-assignment,.workspace-photo-only .desktop-photo-description,.workspace-photo-only .email-route,.workspace-photo-only .capture-note{display:none}
.workspace-photo-only .mobile-photo-description{display:block}
.workspace-photo-only .workspace-layout{grid-template-columns:minmax(0,1fr);width:min(480px,100%);margin:32px auto 0}
.workspace-photo-only #send-capture-button:disabled{display:none}
*{box-sizing:border-box;scrollbar-color:#506778 var(--navy);scrollbar-width:thin}
body{min-width:320px;margin:0;color:var(--ink);background:var(--navy);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:15px;line-height:1.5}
::selection{color:var(--navy);background:var(--teal)}
a{color:inherit;text-decoration:none;text-underline-offset:4px}button,input,select{font:inherit}input{caret-color:var(--teal)}svg{flex-shrink:0}
h1,h2,h3,p{margin-top:0}h1{margin-bottom:var(--s3);font-size:clamp(26px,3vw,36px);line-height:1.2;font-weight:650;letter-spacing:-.025em;text-wrap:balance}h2{margin:0 0 var(--s1);font-size:20px;line-height:1.3;font-weight:650;letter-spacing:-.015em}h3{margin:0;font-size:14px;font-weight:600}p{color:var(--muted)}
.workspace-shell{width:min(1180px,calc(100% - 64px));min-height:100svh;margin:0 auto;padding:var(--s6) 0 var(--s10)}.is-hidden,.visually-hidden{display:none!important}
.workspace-header{display:flex;align-items:center;gap:var(--s6);min-height:76px;padding:0 0 var(--s6);border-bottom:1px solid var(--line)}.brand-logo{display:block;width:184px;height:auto;padding:5px var(--s2);background:transparent}.workspace-name{padding-left:var(--s6);border-left:1px solid var(--line);color:var(--muted);font-size:14px}.workspace-actions{margin-left:auto}.workspace-actions .button{min-height:40px;font-size:13px}
.dashboard-hero{display:flex;align-items:center;justify-content:space-between;gap:var(--s6);padding:var(--s10) 0 var(--s8)}.dashboard-hero p{margin-bottom:0}.tracker-label{display:flex;flex-wrap:wrap;gap:var(--s2);color:var(--muted);font-size:13px}.tracker-label span{color:#6e8494}
.workspace-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);align-items:start;gap:var(--s6)}.vehicle-grid{min-width:0}.vehicle-card,.capture-panel,.records-panel,.gallery-panel{border:1px solid var(--line);border-radius:14px;background:var(--panel);padding:var(--s6)}.vehicle-card{display:grid;gap:var(--s6)}.panel-heading{display:flex;align-items:start;justify-content:space-between;gap:var(--s4)}.panel-heading p{margin:0;font-size:13px}
.device-pill{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:var(--s1) 10px;border-radius:6px;color:#a3e3c3;background:#193c31;font-size:12px;font-weight:550;white-space:nowrap}.device-pill::before{width:6px;height:6px;border-radius:50%;background:currentColor;content:""}.device-pill.is-warning{color:#e9cb8e;background:#3a3223}
.vehicle-assignment{display:grid;grid-template-columns:1fr 1fr;gap:var(--s4)}label{display:grid;gap:var(--s2)}label>span{color:var(--muted);font-size:13px;font-weight:500}input,select{width:100%;min-width:0;min-height:46px;padding:0 var(--s3);border:1px solid #3a4c5b;border-radius:6px;color:var(--ink);background:#0e1d29}input:hover,select:hover{border-color:#627789}input:focus-visible,select:focus-visible,button:focus-visible,a:focus-visible{outline:2px solid var(--teal);outline-offset:4px}input:focus-visible,select:focus-visible{outline-offset:2px}
.assignment-save{display:flex;align-items:center;flex-wrap:wrap;gap:var(--s3)}.assignment-save span{color:var(--muted);font-size:12px}
.telemetry-list{display:grid;grid-template-columns:.8fr .85fr 1.4fr;gap:var(--s4);margin:0;padding:var(--s5) 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);font-variant-numeric:tabular-nums}.telemetry-list dt{margin-bottom:var(--s2);color:var(--muted);font-size:12px}.telemetry-list dd{margin:0;overflow-wrap:anywhere;font-size:18px;font-weight:550}.telemetry-list .telemetry-date{font-size:13px;line-height:1.65;font-weight:500}
.location-heading{display:grid;gap:var(--s1);margin-bottom:-12px}.location-heading span{color:var(--muted);font-size:12px;overflow-wrap:anywhere}.vehicle-map{display:grid;min-height:230px;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#0e1d29}.vehicle-map iframe{display:block;width:100%;height:230px;border:0}.vehicle-map a{padding:var(--s3) var(--s4);color:var(--teal);background:#0e1d29;font-size:13px}.vehicle-map a:hover{text-decoration:underline}.map-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--s2);min-height:230px;padding:var(--s6);text-align:center}.map-placeholder svg{margin-bottom:var(--s2);color:#7395a9}.map-placeholder strong{font-size:15px;font-weight:550}.map-placeholder span{max-width:30ch;color:var(--muted);font-size:13px}.tracker-note{margin:-8px 0 0;color:var(--muted);font-size:12px}
.capture-form{display:grid;gap:var(--s4);padding-top:var(--s5)}.capture-assignment{margin-bottom:0;color:var(--ink);font-size:13px;overflow-wrap:anywhere}.capture-preview{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:180px;border:1px dashed #456071;border-radius:8px;overflow:hidden;background:#0e1d29;text-align:center}.capture-preview svg{margin-bottom:var(--s4);color:#7395a9}.capture-preview strong{margin:0 var(--s4);font-size:14px;font-weight:550}.capture-preview span{padding:var(--s2) var(--s4);color:var(--muted);font-size:12px}.capture-preview img{display:block;width:100%;max-height:220px;object-fit:contain}.capture-preview:not(.is-empty){border-style:solid}
.button{display:inline-flex;align-items:center;justify-content:center;gap:var(--s2);min-height:46px;padding:10px var(--s4);border:1px solid transparent;border-radius:6px;cursor:pointer;font-size:14px;font-weight:600;transition:background-color 160ms ease,border-color 160ms ease}.button.primary{color:#082620;background:#72d6ca}.button.primary:hover{background:#94e5da}.button.secondary{border-color:#405565;color:var(--ink);background:transparent}.button.secondary:hover{border-color:#7795a8;background:#203646}.button:disabled{border-color:#354856;color:#95a7b6;background:#273947;cursor:not-allowed}
.email-route{display:grid;gap:var(--s2);padding:var(--s4) 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.email-route div{display:grid;grid-template-columns:40px minmax(0,1fr);gap:var(--s2);align-items:baseline;font-size:12px}.email-route span{color:var(--muted)}.email-route strong{font-weight:500;overflow-wrap:anywhere}.capture-note{margin:-4px 0 0;font-size:12px;text-align:center}.form-status{display:none;padding:var(--s3);border:1px solid #3e6371;border-radius:6px;color:#d4ebf1;background:#1b3540;font-size:13px;overflow-wrap:anywhere}.form-status.is-error{color:#ffd7c3;border-color:#805444;background:#432c27}.form-status.is-success{color:#bfe8d2;border-color:#42745c;background:#1b392d}
.records-panel,.gallery-panel{margin-top:var(--s6)}.records-toolbar{display:flex;gap:var(--s3);flex-wrap:wrap;align-items:end;margin:var(--s5) 0}.records-toolbar label{max-width:210px}.record-actions{display:flex;flex-wrap:wrap;gap:var(--s2)}.table-wrap{overflow-x:auto;margin-top:var(--s4)}table{width:100%;border-collapse:collapse;font-size:13px;font-variant-numeric:tabular-nums}th,td{text-align:left;padding:var(--s3);border-bottom:1px solid var(--line);white-space:nowrap}th{color:var(--muted);font-weight:500}td.empty{text-align:center;padding:var(--s8);color:var(--muted);white-space:normal}.record-subtitle{margin:var(--s6) 0 var(--s3)}.record-source{font-size:12px;color:var(--muted)}
.photo-queue,.photo-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:var(--s3)}.photo-queue:empty{display:none}.photo-item{min-width:0;margin:0}.photo-item img{display:block;width:100%;height:110px;object-fit:cover;border-radius:6px;background:#0e1d29}.photo-item figcaption{font-size:12px;margin-top:var(--s2);color:var(--muted);overflow-wrap:anywhere}.photo-item .button{min-height:36px;width:100%;font-size:12px;margin-top:var(--s2)}.photo-gallery{grid-template-columns:repeat(auto-fill,minmax(175px,1fr));margin-top:var(--s5)}.photo-gallery img{height:140px}.gallery-filter{min-width:180px;max-width:300px}.empty-gallery{color:var(--muted);font-size:14px;grid-column:1/-1;padding:var(--s5) 0}.capture-actions{display:grid;grid-template-columns:1fr 1fr;gap:var(--s2)}.capture-actions .button{padding:10px var(--s2);font-size:13px}
@media(max-width:1000px){.workspace-shell{width:calc(100% - 40px)}.dashboard-hero{align-items:start;flex-direction:column;gap:var(--s4)}.workspace-layout{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:var(--s4)}.vehicle-card,.capture-panel{padding:var(--s5)}.panel-heading{flex-wrap:wrap;gap:var(--s3)}.telemetry-list{grid-template-columns:1fr 1fr}.telemetry-list>div:last-child{grid-column:1/-1}}
@media(max-width:720px){.workspace-shell{width:calc(100% - 32px);padding-top:var(--s4)}.workspace-header{gap:var(--s3);padding-bottom:var(--s4);min-height:60px}.brand-logo{width:154px}.workspace-name{display:none}.dashboard-hero{padding:var(--s8) 0 var(--s6)}.dashboard-hero p{max-width:35ch;font-size:14px}.workspace-layout{grid-template-columns:1fr;gap:var(--s6)}.panel-heading{flex-wrap:nowrap}.telemetry-list{grid-template-columns:.8fr .9fr 1.4fr;gap:var(--s3)}.telemetry-list>div:last-child{grid-column:auto}.telemetry-list dd{font-size:16px}.telemetry-list .telemetry-date{font-size:12px}.vehicle-card,.capture-panel,.records-panel,.gallery-panel{padding:var(--s5)}.capture-preview{min-height:180px}.gallery-panel>.panel-heading{flex-wrap:wrap}.gallery-filter{max-width:none;width:100%}.record-actions{width:100%}.record-actions .button{flex:1;font-size:12px;padding:10px var(--s2)}}
@media(max-width:380px){.panel-heading{flex-wrap:wrap}.vehicle-assignment{grid-template-columns:1fr}.capture-actions{grid-template-columns:1fr}}
@media(max-width:720px){.records-panel .table-wrap{overflow:visible}.records-panel table,.records-panel tbody{display:block}.records-panel thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.records-panel tbody tr{display:grid;grid-template-columns:1fr 1fr;gap:var(--s3);padding:var(--s4) 0;border-bottom:1px solid var(--line)}.records-panel td{display:block;border:0;white-space:normal;padding:0;overflow-wrap:anywhere}.records-panel td[data-label]::before{display:block;content:attr(data-label);color:var(--muted);font-size:12px;margin-bottom:var(--s1)}.records-panel td.empty{grid-column:1/-1;padding:var(--s5) 0;text-align:left}}
@media(prefers-reduced-motion:reduce){.button{transition:none}}

/* Login: compact branded entry to the existing vehicle workspace. */
.login-panel{display:grid;grid-template-columns:minmax(0,1fr) 420px;grid-template-rows:auto 1fr auto;align-items:center;column-gap:80px;row-gap:48px;width:min(1040px,100%);min-height:calc(100svh - 64px);margin:0 auto}
.login-header{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:12px 0 24px;border-bottom:1px solid var(--line)}
.login-header .brand-logo{width:190px}.back-link{display:inline-flex;align-items:center;gap:10px;min-height:44px;color:var(--muted);font-size:13px}.back-link:hover{color:var(--teal);text-decoration:underline}
.login-intro{padding:24px 0}.login-intro h1{max-width:10ch;margin:0 0 24px;font-size:clamp(36px,4vw,52px);line-height:1.08;font-weight:650;letter-spacing:-.03em}.login-description{max-width:36ch;margin:0;font-size:17px;line-height:1.7}
.login-features{display:grid;gap:24px;list-style:none;margin:40px 0 0;padding:0}.login-features li{display:flex;align-items:start;gap:16px}.login-features svg{margin-top:3px;color:var(--teal)}.login-features strong,.login-features span{display:block}.login-features strong{margin-bottom:4px;font-size:14px;font-weight:550}.login-features span{color:var(--muted);font-size:13px;line-height:1.6}
.login-form{display:grid;gap:24px;margin:0;padding:36px;border:1px solid var(--line);border-radius:16px;background:var(--panel)}.login-form-heading{padding-bottom:4px}.login-lock{box-sizing:content-box;display:block;margin-bottom:24px;padding:12px;border-radius:12px;color:var(--teal);background:#203b42}.login-form-heading h2{margin:0 0 8px;font-size:26px;letter-spacing:-.025em}.login-form-heading p{margin:0;font-size:14px}
.login-form label>span,.login-password-field>label{color:var(--ink);font-size:13px;font-weight:550}.login-form input:not([type=hidden]){min-height:50px;padding:0 14px;background:#0e1d29;border-radius:8px}.login-form input::placeholder{color:#9cabb9;font-size:14px;opacity:1}.login-password-field{display:grid;gap:8px}.login-password-control{position:relative}.login-password-control input{padding-right:76px!important}.password-toggle{position:absolute;inset:3px 4px 3px auto;min-width:62px;padding:0 10px;border:0;border-radius:5px;color:var(--teal);background:transparent;font-size:12px;font-weight:600;cursor:pointer}.password-toggle[hidden]{display:none}.password-toggle:hover{background:#203b42}.password-toggle:focus-visible{outline-offset:0}
.login-submit{width:100%;min-height:50px;border-radius:8px;justify-content:space-between;padding:12px 18px;font-size:15px}.login-submit:active{background:#60c4b8}.login-help{margin:0;padding-top:4px;border-top:1px solid var(--line);padding-top:20px;font-size:12px;line-height:1.7}.login-status{display:block;margin:0;font-size:13px;line-height:1.6}
.login-footer{grid-column:1/-1;display:flex;align-items:center;gap:8px;padding-top:24px;border-top:1px solid var(--line);color:var(--muted);font-size:12px}.login-footer svg{color:var(--teal)}.login-footer span{margin-left:auto}
@media(max-width:1000px){.login-panel{column-gap:40px;grid-template-columns:minmax(0,1fr) 390px}.login-form{padding:30px}}
@media(max-width:760px){.login-panel{grid-template-columns:1fr;width:min(460px,100%);min-height:calc(100svh - 56px);row-gap:28px}.login-header{padding:0 0 16px;gap:12px}.login-header .brand-logo{width:150px}.back-link{font-size:12px;gap:6px}.login-intro{padding:4px 0 0}.login-intro h1{max-width:none;margin-bottom:12px;font-size:32px}.login-description{max-width:none;font-size:15px;line-height:1.6}.login-features{display:none}.login-form{padding:28px;gap:22px}.login-lock{display:none}.login-form-heading h2{font-size:24px}.login-footer{padding-top:20px;flex-wrap:wrap;font-size:11px}}
@media(max-width:380px){.login-form{padding:24px}.login-header .brand-logo{width:134px}.login-intro h1{font-size:29px}.login-footer span{margin-left:0;width:100%;padding-left:24px}}

/* Mobile photo workspace: a full-screen task surface after sign-in. */
@media (max-width:767px), (max-width:1023px) and (pointer:coarse) {
  .workspace-signed-in{overflow:hidden}
  .workspace-signed-in .dashboard{position:fixed;inset:0;z-index:10;overflow-y:auto;overscroll-behavior-y:contain;background:var(--navy);padding:0 max(20px,env(safe-area-inset-right)) max(28px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left))}
  .dashboard .workspace-header{position:sticky;top:0;z-index:2;min-height:76px;padding:calc(12px + env(safe-area-inset-top)) 0 12px;gap:16px;background:var(--navy)}
  .dashboard .workspace-header .brand-logo{width:150px;padding:0}
  .dashboard .workspace-header .button{min-height:44px;padding:10px 14px}
  .dashboard .workspace-name,.dashboard .dashboard-hero,.dashboard .vehicle-grid,.dashboard .records-panel,.dashboard .gallery-panel,.dashboard .capture-assignment,.desktop-photo-description{display:none}
  .mobile-photo-description{display:block}
  .dashboard .workspace-layout{display:block}
  .dashboard .capture-panel{padding:28px 0 0;border:0;border-radius:0;background:transparent}
  .dashboard #capture-title{font-size:28px;line-height:1.15;letter-spacing:-.025em;margin-bottom:10px}
  .dashboard .panel-heading p{font-size:15px;line-height:1.55;max-width:32ch}
  .dashboard .capture-form{padding-top:24px;gap:20px}
  .dashboard .capture-form label>span{color:var(--ink);font-size:14px;font-weight:600}
  .dashboard .capture-form select{min-height:54px;font-size:16px;border-radius:8px}
  .dashboard .capture-preview{min-height:176px;padding:20px;border-radius:12px}
  .dashboard .capture-preview strong{font-size:16px}
  .dashboard .capture-preview span{max-width:28ch;padding:8px 0 0;font-size:14px;line-height:1.5}
  .dashboard .capture-preview svg{color:var(--teal);margin-bottom:12px}
  .dashboard .capture-actions{grid-template-columns:1fr 1fr;gap:12px}
  .dashboard .capture-actions .button{min-height:56px;padding:12px 8px;font-size:14px;border-radius:8px}
  .dashboard #save-photos-button{min-height:56px;border-radius:8px;font-size:16px}
  .dashboard #send-capture-button{min-height:52px;border-radius:8px}
  .dashboard #send-capture-button:disabled{display:none}
  .dashboard .email-route,.dashboard .capture-note{display:none}
  .dashboard .form-status{font-size:14px;line-height:1.6;padding:14px}
  .dashboard .photo-queue{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
  .dashboard .photo-item img{height:144px;border-radius:8px}
  .dashboard .photo-item .button{min-height:44px}
}
/* Photo history shares the existing workspace colors and touch targets. */
.photo-tabs{display:flex;gap:12px;margin:24px 0 0}
.photo-tabs .button{flex:1;min-height:48px}
#capture-workspace[hidden],#history-workspace[hidden]{display:none!important}
.history-panel [hidden]{display:none!important}
.monthly-totals{margin:24px 0 32px;padding:20px 0;border-block:1px solid var(--line)}
.monthly-totals h3{margin:0;font-size:18px}.monthly-totals h4{margin:16px 0 10px;font-size:15px}
.monthly-user{display:grid;gap:6px;margin:12px 0;font-size:14px;font-variant-numeric:tabular-nums}
.monthly-dealer-total{background:var(--panel);padding:16px;border-radius:8px;margin-bottom:20px}
.monthly-provisional{color:#edce96}.monthly-history{margin-top:16px}.monthly-history summary{padding:12px 0;cursor:pointer;color:var(--teal);min-height:44px;box-sizing:border-box}
.monthly-entry{padding-bottom:8px}.monthly-history .monthly-entry{padding:12px 0;border-top:1px solid var(--line)}
.history-panel{margin:24px auto;width:min(100%,720px);color:var(--ink)}
.history-panel h2{margin:0 0 10px;font-size:28px}
.history-panel p{color:var(--muted);font-size:14px;line-height:1.6}
.history-filters{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;margin:24px 0}
.history-filters label{display:grid;gap:8px;font-size:14px;min-width:0}
.history-filters select{width:100%;min-width:0;min-height:52px;font:inherit;background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:8px;padding:12px}
.history-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 16px}
.history-grid figure{margin:0;min-width:0}
.history-thumbnail{display:block;width:100%;padding:0;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:var(--panel);cursor:pointer}
.history-thumbnail img{display:block;width:100%;height:180px;object-fit:contain}
.history-grid label{display:flex;align-items:center;gap:8px;min-height:48px;font-size:13px;overflow-wrap:anywhere}
.history-grid input{width:20px;height:20px;accent-color:var(--teal);flex-shrink:0}
.history-send{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:24px}
.history-send .button{min-height:52px}
.history-route{overflow-wrap:anywhere}
.history-preview{max-width:92vw;max-height:90vh;border:1px solid var(--line);border-radius:12px;background:var(--navy);padding:16px}
.history-preview::backdrop{background:rgba(0,0,0,.8)}
.history-preview img{display:block;max-width:100%;max-height:72vh;object-fit:contain;margin-top:12px}
.history-panel button:focus-visible,.history-panel input:focus-visible,.history-panel select:focus-visible,.photo-tabs button:focus-visible{outline:2px solid var(--teal);outline-offset:3px}
@media(max-width:480px){.history-filters{grid-template-columns:1fr}.history-thumbnail img{height:156px}.history-send{font-size:14px}}
@media(max-width:760px){.login-panel{grid-template-rows:repeat(4,auto);align-content:start}}

/* Desktop task sections inherit the workspace palette and spacing scale. */
.desktop-workspace-nav,.desktop-section-heading{display:none}
#capture-workspace{display:block}
.workspace-photo-only .fleet-workspace{display:none}
@media(max-width:767px),(max-width:1023px) and (pointer:coarse){.fleet-workspace{display:none}}
@media(min-width:1024px){
  .workspace-signed-in .workspace-shell{width:min(1280px,calc(100% - 80px));padding-top:16px}
  .workspace-header{position:sticky;top:0;z-index:20;min-height:72px;padding:12px 0;background:var(--navy)}
  .workspace-header .brand-logo{width:168px}
  .desktop-workspace-nav{position:sticky;top:72px;z-index:19;display:flex;align-items:center;gap:28px;min-height:56px;padding:8px 0;border-bottom:1px solid var(--line);background:var(--navy)}
  .desktop-workspace-nav a{display:inline-flex;align-items:center;min-height:40px;color:var(--muted);font-size:14px}
  .desktop-workspace-nav a:hover{color:var(--teal)}
  .dashboard-hero{padding:28px 0 24px}
  .dashboard-hero h1{font-size:28px;margin-bottom:8px}
  .dashboard-hero p{font-size:14px}
  .invoice-report{margin:16px 0 40px;padding:28px 32px;border:1px solid var(--line);border-radius:12px;background:var(--panel);scroll-margin-top:148px}
  .invoice-report h2{font-size:24px;margin-bottom:8px}
  .invoice-report-heading{margin-bottom:24px;gap:32px;align-items:center}
  .invoice-report-heading p{font-size:14px}
  .invoice-filters{gap:16px;padding:20px 0;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto}
  .invoice-filter-actions{grid-column:auto;gap:8px}
  .invoice-date-help{margin:12px 0 20px}
  .invoice-report-overview{padding:16px 0 20px;gap:24px}
  .invoice-user-group{margin:24px 0}
  .invoice-user-heading{padding:12px 0}
  .invoice-record-summary{padding:16px 0;gap:20px}
  .photo-workspace{margin:40px 0;padding-top:32px;border-top:1px solid var(--line);scroll-margin-top:148px}
  .photo-tabs{width:auto;justify-content:flex-start;gap:12px;margin:0 0 28px}
  .photo-tabs .button{flex:0 0 auto;min-width:150px;min-height:46px}
  .workspace-layout,.workspace-photo-only .workspace-layout{display:block;width:min(760px,100%);margin:0 auto}
  .capture-panel{padding:28px 32px}
  .capture-form{gap:20px;padding-top:24px}
  .capture-panel h2{font-size:24px}
  .history-panel{width:100%;margin:0}
  .history-panel h2{font-size:24px;margin-bottom:8px}
  .history-panel>.history-filters{max-width:420px;margin:24px 0 28px}
  .history-layout{display:grid;grid-template-columns:minmax(280px,340px) minmax(0,1fr);gap:28px;align-items:start}
  .monthly-totals,.history-images{min-width:0;margin:0;padding:24px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
  .monthly-totals h3,.history-images>h3{font-size:20px;line-height:1.3;margin:0 0 8px}
  .monthly-totals h4{margin-top:24px}
  .monthly-dealer-total{background:var(--navy);margin:16px 0 20px}
  .monthly-user{gap:6px;margin:16px 0}
  .history-images>.history-filters{max-width:300px;margin:20px 0}
  .history-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px 16px}
  .history-thumbnail img{height:200px}
  .history-send{margin-top:28px;padding-top:20px;border-top:1px solid var(--line)}
  .desktop-section-heading{display:block;font-size:24px;margin:0 0 24px}
  .fleet-workspace{margin:48px 0 40px;padding-top:32px;border-top:1px solid var(--line);scroll-margin-top:148px}
  .fleet-layout{display:grid;grid-template-columns:minmax(280px,.85fr) minmax(0,1.65fr);gap:28px;align-items:start}
  .fleet-layout .records-panel{min-width:0;margin:0;padding:24px}
  .fleet-layout .vehicle-card{padding:24px;gap:24px}
  .fleet-layout .panel-heading{flex-wrap:wrap}
  .records-toolbar{gap:16px;margin:24px 0;align-items:end}
  .record-actions{gap:8px}
  .records-panel .panel-heading h2,.gallery-panel h2{font-size:20px}
  .gallery-panel{margin-top:40px;padding:28px 32px;scroll-margin-top:148px}
  #gallery-title{scroll-margin-top:148px}
}
