:root{--gold:#FFBF00;--line:#e2e2e2;--bg:#f7f7f7;--surface:#fff;--text:#232323;--muted:#626262;--red:#af2727;--green:#087742}*{box-sizing:border-box}body{font:15px/1.5 'Segoe UI',Arial,sans-serif;margin:0;background:var(--bg);color:var(--text)}body.dark{--bg:#161616;--surface:#252525;--text:#f4f4f4;--muted:#bbb;--line:#484848}header{background:var(--surface);border-bottom:2px solid var(--gold);padding:14px max(16px,calc((100% - 980px)/2));position:relative}header strong{font-size:11px;letter-spacing:2px;color:var(--gold)}h1{font-size:22px;margin:1px 0}h2{font-size:19px;margin:0 0 14px}h3{font-size:15px;margin:0 0 7px;border-bottom:2px solid var(--gold);padding-bottom:7px}main{max-width:980px;margin:20px auto;padding:0 14px}.panel{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:20px;margin-bottom:16px}.flex{display:flex;justify-content:space-between;align-items:center;gap:12px}.muted{color:var(--muted);font-size:13px}label{display:block;margin:14px 0 5px;font-weight:600}input:not([type=checkbox]),textarea,select{width:100%;border:1px solid var(--line);border-radius:6px;padding:10px;font:inherit;background:var(--surface);color:var(--text);min-height:40px}input[readonly]{background:var(--bg)}textarea{resize:vertical}button,.action{display:inline-block;background:var(--gold);color:#292106;border:0;padding:10px 14px;border-radius:6px;cursor:pointer;font:inherit;text-decoration:none;font-weight:600}.secondary{background:var(--surface);color:var(--text);border:1px solid var(--line)}button.small{font-size:12px;padding:5px 10px}.action{display:block;margin:10px 0}header #theme{position:absolute;right:18px;top:18px}.hidden{display:none!important}.error{color:var(--red);font-weight:600;white-space:pre-line}.notice{background:var(--bg);border-left:4px solid var(--gold);padding:12px;margin:14px 0}.inline{display:flex;gap:8px;align-items:center}.inline input{accent-color:var(--gold)}details{margin:12px 0;padding:10px;border:1px solid var(--line);border-radius:7px}summary{cursor:pointer;font-weight:600}.group{margin-top:16px;border:1px solid var(--line);border-radius:8px;padding:12px}.q{display:grid;grid-template-columns:minmax(0,1fr) 112px;gap:10px;align-items:start;padding:8px 0}.q strong{display:block}.q .desc{font-size:12px;color:var(--muted)}.choices{display:flex;gap:5px;justify-content:flex-end}.choices button{padding:5px 10px;background:#f5f5f5;color:#444;border:1px solid #ddd;min-width:43px}.choices .selected.pass{background:var(--green);color:#fff}.choices .selected.fail{background:var(--red);color:#fff}.choices .selected.na{background:#777;color:#fff}.reason{grid-column:1/-1}.failbox{background:var(--bg);padding:10px;border-radius:6px}.grid{overflow:auto}.grid table{border-collapse:collapse;width:100%;white-space:nowrap}.grid th,.grid td{border-bottom:1px solid var(--line);padding:9px;text-align:left}.grid th{cursor:pointer;color:var(--gold)}.tick{color:var(--green);font-weight:700}.cross{color:var(--red);font-weight:700}@media(max-width:520px){.panel{padding:13px}.q{grid-template-columns:minmax(0,1fr) 100px}header #theme{right:8px}}
@media print{header,button,.no-print{display:none!important}body{background:#fff;color:#000}.panel{border:0}}

#fullReport:not(:empty){position:fixed;z-index:30;inset:5vh max(12px,calc((100vw - 900px)/2));overflow:auto;background:var(--surface);box-shadow:0 0 0 100vw rgba(0,0,0,.55);padding:24px;border-radius:10px}#fullReport table{border-collapse:collapse;width:100%}#fullReport td,#fullReport th{border:1px solid var(--line);padding:6px;text-align:left}#fullReport h3{margin-top:20px}@media print{#fullReport:not(:empty){position:static;box-shadow:none;inset:auto}#admin>.panel:not(:first-child){display:none}.grid,#admin>.panel:first-child>.flex,#columns,#thead,#tbody{display:none!important}}

/* Manager reporting / settings navigation */
.manager-nav{display:flex;gap:10px;flex-wrap:wrap;max-width:980px;margin:14px auto 0;padding:0 14px}
.manager-nav a{display:inline-block;padding:9px 14px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--text);text-decoration:none;font-weight:600}
.manager-nav a.active,.settings-tabs button.active{background:var(--gold);color:#fff;border-color:var(--gold)}
.settings-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 8px}
.settings-tabs button{flex:0 0 auto}
@media(max-width:600px){.manager-nav a,.settings-tabs button{flex:1 1 auto;text-align:center}}

/* Restore compact white-and-gold original reporting presentation */
body:has(.manager-grid){background:#f7f6f3}
body:has(.manager-grid) header{padding:13px max(18px,calc((100% - 1380px)/2));border-bottom:2px solid var(--gold)}
body:has(.manager-grid) header h1{font-size:23px}
.manager-subtitle{font-size:12px;color:var(--muted);margin:2px 0 0}
body:has(.manager-grid) main{max-width:1380px;margin:20px auto}
body:has(.manager-grid) main>.panel{padding:16px}
.manager-filters{display:grid;grid-template-columns:120px 120px minmax(150px,1.3fr) minmax(150px,1fr) minmax(150px,1fr) auto auto;gap:9px;align-items:end;border:1px solid var(--line);background:var(--surface);padding:11px;border-radius:8px}
.manager-filters label{font-size:11px;margin:0;min-width:0;font-weight:600}
.manager-filters input,.manager-filters select{margin-top:5px;font-size:12px;padding:7px;min-height:34px}
.manager-filters button{font-size:12px;white-space:nowrap;min-height:34px;padding:7px 10px}
.manager-grid{border:1px solid var(--line);border-radius:6px;overflow-x:auto}
.manager-grid table{font-size:12px}
.manager-grid th{background:#fbf8ef;color:#514326;font-size:11px;white-space:nowrap}
.manager-grid td,.manager-grid th{padding:8px 10px}
body:has(.manager-grid) .manager-nav{max-width:1380px}
@media(max-width:1180px){.manager-filters{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:650px){.manager-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Restored manager configuration layout */
.settings-section{border:1px solid var(--line);background:var(--surface);border-radius:9px;margin:10px 0;overflow:hidden}
.settings-section-header{display:flex;align-items:center;gap:10px;padding:10px 12px;background:#faf8f2}
.settings-section-header .section-toggle{flex:1;text-align:left;font-size:14px;font-weight:700}
.settings-item,.settings-question{display:flex;align-items:center;gap:12px;padding:12px 10px;border-bottom:1px solid var(--line);background:var(--surface)}
.settings-item:last-child,.settings-question:last-child{border-bottom:0}
.settings-item-text{flex:1;min-width:0}
.drag-handle{font-size:21px;color:var(--gold);cursor:grab;touch-action:none;user-select:none;line-height:1}
.dragging{opacity:.45}
.question-list{padding:6px 12px}
.settings-question{border-radius:5px}
#editQuestionPanel{border-color:var(--gold);margin-top:12px}
.vehicle-selector{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:5px;margin:10px 0 16px;padding:10px;border:1px solid var(--line);border-radius:6px;max-height:220px;overflow-y:auto}
.vehicle-selector label{margin:3px 0;font-weight:400}
@media(max-width:700px){.settings-section-header{flex-wrap:wrap}.settings-item{flex-wrap:wrap}.settings-section-header button{font-size:12px}}

/* Restored paired inspection report */
#fullReport .report-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;border-bottom:2px solid var(--gold);padding-bottom:12px}
#fullReport .report-header small{font-weight:700;letter-spacing:2px;color:var(--gold)}
#fullReport .report-header h2{margin:4px 0}
#fullReport .report-header p{margin:0;color:var(--muted)}
#fullReport .report-actions{display:flex;flex-wrap:wrap;gap:7px}
#fullReport .report-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:14px 0;border-bottom:1px solid var(--line)}
#fullReport .report-meta>div{display:flex;flex-direction:column;gap:3px}
#fullReport .report-meta strong{font-size:11px;color:var(--muted);text-transform:uppercase}
#fullReport .report-meta span{font-weight:600}
#fullReport .report-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
#fullReport .report-phase{min-width:0}
#fullReport .report-phase h3{margin-top:18px}
#fullReport .report-submitted{font-size:12px;color:var(--muted);margin:6px 0}
#fullReport .report-odometer{font-size:13px;margin:0 0 15px}
#fullReport .report-group{break-inside:avoid;margin:13px 0}
#fullReport .report-group h4{font-size:12px;background:#f6f1e6;padding:5px 8px;margin:0;border-left:3px solid var(--gold)}
#fullReport .report-answer{display:grid;grid-template-columns:minmax(0,1fr) 22px;gap:6px;align-items:center;border-bottom:1px solid var(--line);font-size:12px;padding:7px 6px}
#fullReport .report-defect{grid-column:1/-1;margin:0;color:var(--red);font-size:11px;white-space:pre-wrap}
#fullReport .report-notes{white-space:pre-wrap;font-size:12px;padding:10px;background:#faf8f2}
@media(max-width:650px){#fullReport .report-columns{grid-template-columns:1fr}#fullReport .report-meta{grid-template-columns:1fr 1fr}#fullReport .report-header{flex-direction:column}}
@media print{
 @page{size:A4 portrait;margin:12mm}
 body:has(#fullReport:not(:empty)) > header,body:has(#fullReport:not(:empty)) > nav,body:has(#fullReport:not(:empty)) #denied{display:none!important}
 body:has(#fullReport:not(:empty)) #admin>.panel:first-child{display:block!important}
 body:has(#fullReport:not(:empty)) #admin>.panel:first-child > :not(#fullReport){display:none!important}
 #fullReport:not(:empty){display:block!important;position:static!important;inset:auto!important;box-shadow:none!important;border:0!important;padding:0!important;margin:0!important;overflow:visible!important}
 #fullReport .report-columns{grid-template-columns:repeat(2,minmax(0,1fr));gap:12mm}
 #fullReport .report-group h4,#fullReport .report-notes{print-color-adjust:exact;-webkit-print-color-adjust:exact}
}

#fullReport .report-photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0}
#fullReport .report-photo-grid figure{margin:0;border:1px solid var(--line);padding:8px;border-radius:7px;break-inside:avoid}
#fullReport .report-photo-grid img{width:100%;height:140px;object-fit:contain;border-radius:4px;background:#f7f7f7}
#fullReport .report-photo-grid figcaption{font-size:11px;line-height:1.3;margin-top:5px}
@media(max-width:650px){#fullReport .report-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media print{#fullReport .report-photo-grid{grid-template-columns:repeat(3,minmax(0,1fr))}#fullReport .report-photo-grid img{height:110px}}

/* Compact manager Settings — aligned with Inspection Reports */
body.manager-settings{font-size:13px;background:#f7f6f3}
body.manager-settings header{padding:13px max(18px,calc((100% - 1380px)/2))}
body.manager-settings header h1{font-size:23px}
body.manager-settings .manager-nav{max-width:1380px}
body.manager-settings main{max-width:1380px;margin:20px auto}
body.manager-settings .panel{padding:14px 16px;margin-bottom:12px;border-radius:8px}
body.manager-settings h2{font-size:16px;margin:0 0 9px}
body.manager-settings h3{font-size:13px;margin:12px 0 6px;padding-bottom:5px}
body.manager-settings .muted{font-size:11.5px}
body.manager-settings label{font-size:12px;margin:8px 0 3px}
body.manager-settings input:not([type=checkbox]):not([type=radio]),
body.manager-settings select,
body.manager-settings textarea{font-size:12px;padding:6px 9px;min-height:33px;border-radius:5px}
body.manager-settings textarea{min-height:64px}
body.manager-settings button{font-size:12px;padding:7px 11px;border-radius:5px;line-height:1.3}
body.manager-settings button.small{font-size:11px;padding:5px 9px}
body.manager-settings .flex{gap:9px}
body.manager-settings .settings-tabs{margin:10px 0;gap:6px}
body.manager-settings .settings-tabs button{padding:7px 12px}
body.manager-settings .settings-item,
body.manager-settings .settings-question{padding:7px 9px;gap:9px}
body.manager-settings .settings-section{margin:7px 0;border-radius:6px}
body.manager-settings .settings-section-header{padding:6px 9px;gap:7px}
body.manager-settings .settings-section-header .section-toggle{font-size:12.5px}
body.manager-settings .question-list{padding:4px 10px}
body.manager-settings .settings-item-text strong{font-size:12px}
body.manager-settings .drag-handle{font-size:18px}
body.manager-settings #editQuestionPanel{max-width:100%;padding:13px}
body.manager-settings .vehicle-selector{gap:4px;padding:8px}
body.manager-settings #fleetPanel>.flex,
body.manager-settings #checklistPanel>.flex{justify-content:flex-start;flex-wrap:wrap}
body.manager-settings #fleetPanel>.flex input,
body.manager-settings #checklistPanel>.flex input,
body.manager-settings #checklistPanel>.flex select{width:auto;flex:1 1 170px;min-width:130px}
body.manager-settings #fleetPanel>.flex button,
body.manager-settings #checklistPanel>.flex button{flex:0 0 auto}
.manager-nav a{font-size:12px;padding:8px 12px}
@media(max-width:650px){
 body.manager-settings .panel{padding:11px}
 body.manager-settings #fleetPanel>.flex input,
 body.manager-settings #checklistPanel>.flex input{flex-basis:100%}
}

/* Driver account management */
body.manager-settings .driver-form{display:grid;grid-template-columns:minmax(130px,1fr) minmax(180px,1.3fr) minmax(130px,1fr) auto;align-items:end;gap:10px;margin:10px 0}
body.manager-settings .driver-form label{margin:0}
body.manager-settings .driver-form input{margin-top:4px}
body.manager-settings .driver-form button{min-height:33px;white-space:nowrap}
@media(max-width:760px){body.manager-settings .driver-form{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){body.manager-settings .driver-form{grid-template-columns:1fr}}

/* Driver checklist-first home screen */
.driver-home{max-width:680px;margin:0 auto;padding:22px}
.driver-home #role:empty{display:none}
.driver-home .driver-primary{display:flex;align-items:center;justify-content:center;min-height:100px;margin:26px 0 18px;font-size:23px;line-height:1.25;text-align:center;border-radius:12px;box-shadow:0 3px 12px rgba(0,0,0,.12)}
.driver-home #adminLink{font-size:13px}
.driver-home #signOut{font-size:12px}
.driver-home #installationHelp{margin-top:24px}
@media(max-width:520px){.driver-home{padding:18px 14px}.driver-home .driver-primary{min-height:118px;font-size:23px;margin:24px 0}}

.driver-thanks{max-width:640px;margin:50px auto;text-align:center;padding:45px 24px}.driver-thanks h2{font-size:30px;margin:12px 0}.driver-thanks p{font-size:16px}.driver-thanks .thank-you-check{width:82px;height:82px;margin:0 auto;border-radius:50%;display:grid;place-items:center;background:var(--green);color:#fff;font-size:49px;font-weight:700}.driver-thanks button{margin-top:12px}

/* Fixed report grid rows and anchored column picker */
body:has(.manager-grid) #columnChooser{position:relative;padding:0;margin:10px 0;min-height:33px;overflow:visible}
body:has(.manager-grid) #columnChooser>summary{list-style:revert;padding:7px 12px;font-size:12px;min-height:33px;cursor:pointer}
body:has(.manager-grid) #columnChooser #columns{position:absolute;top:calc(100% + 4px);left:0;width:min(480px,calc(100vw - 50px));max-height:350px;overflow-y:auto;padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:7px;box-shadow:0 7px 22px rgba(0,0,0,.15);z-index:25}
body:has(.manager-grid) #columnChooser:not([open]) #columns{display:none}
body:has(.manager-grid) #columnChooser #columns label{font-size:12px;font-weight:400;margin:5px 0}
body:has(.manager-grid) #columnChooser #columns details{padding:7px;margin:5px 0}
.manager-grid table{table-layout:fixed;width:max-content;min-width:100%;border-collapse:collapse}
.manager-grid th,.manager-grid td{height:40px;max-height:40px;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}
.manager-grid th{min-width:110px}
.manager-grid td{min-width:110px}
.manager-grid th:nth-child(1),.manager-grid td:nth-child(1){min-width:110px}
.manager-grid th:nth-child(2),.manager-grid td:nth-child(2){min-width:120px}
.manager-grid th:nth-child(3),.manager-grid td:nth-child(3){min-width:140px}
.manager-grid tbody tr{height:40px}
.defect-pill{font-size:11px!important;line-height:1!important;padding:5px 8px!important;border-radius:15px!important;background:#772539!important;color:white!important;white-space:nowrap}
.no-defects{font-size:11px;color:var(--green);font-weight:600}
#fullReport .expand-photo{cursor:zoom-in}
.photo-overlay{position:fixed;inset:0;z-index:1000;background:rgba(0,0,0,.9);display:flex;align-items:center;justify-content:center;flex-direction:column;padding:30px 20px;color:white}
.photo-overlay img{display:block;max-width:95vw;max-height:85vh;object-fit:contain}
.photo-overlay .photo-close{position:absolute;top:15px;right:20px;background:transparent;color:white;font-size:35px;padding:5px 15px}
.photo-overlay p{font-size:13px;text-align:center;margin:10px}
@media print{.photo-overlay{display:none!important}}

.critical-notice{border:2px solid #a82929;border-left:7px solid #a82929;background:#fff4f3;color:#572020;padding:14px 16px;border-radius:7px;margin:15px 0}
.critical-notice strong{font-size:15px;display:block}
.critical-notice p{font-size:13px;margin:5px 0 0;line-height:1.5}
.overdue-tag{display:inline-block;color:#8b1e22;background:#fff0ee;border:1px solid #d9a6a6;padding:4px 6px;border-radius:5px;font-size:11px;font-weight:700}
@media print{.critical-notice{print-color-adjust:exact;-webkit-print-color-adjust:exact}}

/* Consistent management header height across Reports and Settings */
body:has(.manager-nav)>header{min-height:104px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:3px;padding-top:14px;padding-bottom:14px}
body:has(.manager-nav)>header h1{margin:0;font-size:23px;line-height:1.25}
body:has(.manager-nav)>header .manager-subtitle{margin:0;font-size:12px;line-height:1.35}
body:has(.manager-nav)>header:not(:has(.manager-subtitle))::after{content:"";height:16px;display:block}
@media(max-width:520px){body:has(.manager-nav)>header{min-height:104px}}

/* Separate declaration from the final checklist action */
.checklist-submit-row{display:flex;justify-content:flex-end;margin-top:32px;margin-bottom:12px}
.checklist-submit-row #submit{width:auto;min-width:160px;max-width:100%}

/* Login form breathing room, including narrow phone screens */
#login .login-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:20px}
#login .login-actions button{min-height:42px}

/* Manager inspection summary */
.report-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:12px 0 20px}
.report-summary>div{background:var(--bg);border:1px solid var(--line);border-radius:9px;padding:13px 15px;display:flex;flex-direction:column;gap:4px}
.report-summary strong{font-size:26px;font-variant-numeric:tabular-nums;line-height:1.2}
.report-summary span{font-size:12px;color:var(--muted)}
@media(max-width:650px){.report-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.report-summary>div{padding:12px}.report-summary strong{font-size:23px}}

/* Inspection mileage marker and driver submission history */
.unchanged-mileage{background:#fff0c2;color:#563b00;border:1px solid #FFBF00;border-radius:5px;padding:4px 7px;font-weight:700;cursor:help;white-space:nowrap}
.unchanged-mileage:focus{outline:2px solid var(--gold);outline-offset:2px}
.driver-history{margin-top:20px;border-top:1px solid var(--line);padding-top:16px}
.driver-history>#historyToggle{width:100%;text-align:left}
#historyPanel{padding-top:10px}
.history-entry{margin:8px 0;padding:10px}
.history-entry summary{font-weight:600}
.history-detail{margin:8px 0;font-size:13px;color:var(--muted)}
.history-answers{padding:8px 0;font-size:13px}
.history-answers p{margin:5px 0;padding-bottom:5px;border-bottom:1px solid var(--line)}
.export-select-label{min-width:190px}

/* Driver inspection history shows same report presentation as management */
.history-report-button{display:block;width:100%;text-align:left;white-space:normal}
.driver-full-report{margin-top:12px;text-align:left}
.driver-full-report .report-columns{min-width:0}
@media print{#historyToggle,.history-report-button,#installationHelp,#openChecklist,#signOut{display:none!important}}

/* Clear, spacious checklist configuration cards */
#checklistPanel{max-width:1100px;margin:0 auto}
.checklist-heading{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:18px;flex-wrap:wrap}
.checklist-heading h2{margin-bottom:4px}
#checklistPanel>.muted{margin-bottom:18px}
#sectionList{display:grid;gap:18px;margin:22px 0}
#sectionList .settings-section{margin:0;border:1px solid var(--line);border-left:5px solid var(--gold);border-radius:12px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.045)}
#sectionList .settings-section-header{padding:16px 18px;gap:12px;background:var(--bg);min-height:70px}
#sectionList .settings-section-header .section-toggle{background:transparent;border:0;color:var(--text);font-size:17px;font-weight:700;padding:6px 0}
#sectionList .section-question-count{display:inline-block;font-size:12px;font-weight:500;color:var(--muted);margin-left:7px}
#sectionList .question-list{padding:12px 18px}
#sectionList .settings-question{padding:13px 8px;border-bottom:1px solid var(--line);min-height:68px}
#sectionList .settings-question:last-child{border-bottom:0}
#sectionList .settings-question .settings-item-text strong{font-size:14px}
#sectionList .section-footer{padding:14px 20px 18px;border-top:1px solid var(--line)}
#sectionList .drag-handle{cursor:grab;font-size:19px;color:var(--muted);touch-action:none}
#editQuestionPanel{border:2px solid var(--gold);margin:20px 0;padding:22px;border-radius:12px}
#editQuestionPanel .editor-actions{display:flex;gap:12px;margin-top:20px;flex-wrap:wrap}
#checklistPreviewPanel{margin:24px 0;border:2px solid var(--gold);padding:22px}
#checklistPreviewPanel .choices{font-weight:700;color:var(--gold);white-space:pre}
@media(max-width:640px){#sectionList .settings-section-header{padding:12px;gap:7px}#sectionList .settings-section-header .section-toggle{font-size:15px}#sectionList .question-list{padding:8px}#sectionList .settings-question{gap:9px}#checklistPreviewPanel{padding:12px}}

#sectionList .section-name-editor{display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:12px 20px;background:var(--surface);border-top:1px solid var(--line)}
#sectionList .section-name-editor label{flex:1;min-width:220px;margin:0}
#sectionList .section-name-editor button{min-height:40px}

/* Management theme toggle and dark-mode report surfaces */
body:has(#managerTheme) header #managerTheme{position:absolute;right:max(16px,calc((100% - 980px)/2));top:18px}
body:has(#managerTheme) header{padding-right:145px}
body.dark .report-group h4{background:#373127;color:var(--text)}
body.dark .report-notes,body.dark .settings-section-header{background:#302d27;color:var(--text)}
@media(max-width:520px){body:has(#managerTheme) header{padding-right:115px}body:has(#managerTheme) header #managerTheme{right:12px;top:14px}}

/* Align management theme toggle to right end of navigation */
body:has(#managerTheme) header{padding-right:max(16px,calc((100% - 980px)/2))}
.manager-nav #managerTheme{position:static;margin-left:auto;flex:0 0 auto;align-self:center;white-space:nowrap;min-height:37px}
@media(max-width:520px){.manager-nav #managerTheme{margin-left:auto}}

/* Align manager heading and navigation to report panel edges */
body:has(.manager-grid)>header{padding-left:max(16px,calc((100% - 1380px)/2 + 14px));padding-right:max(16px,calc((100% - 1380px)/2 + 14px))}
body:has(.manager-grid) .manager-nav{max-width:1380px;display:flex;align-items:center;gap:10px}
body:has(.manager-grid) .manager-nav a{flex:0 0 auto}
body:has(.manager-grid) .manager-nav #managerTheme{flex:0 0 auto;margin-left:auto;position:static}
@media(max-width:560px){body:has(.manager-grid) .manager-nav{flex-wrap:wrap}body:has(.manager-grid) .manager-nav #managerTheme{margin-left:auto}}

/* Same aligned navigation theme button on settings and reports */
body.manager-settings>.manager-nav{display:flex;align-items:center;gap:10px}
body.manager-settings>.manager-nav a{flex:0 0 auto}
body.manager-settings>.manager-nav #managerTheme{flex:0 0 auto;margin-left:auto;position:static;white-space:nowrap;min-height:37px}

/* Checklist progress and pending uploads */
.check-progress{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:18px 0 12px;padding:12px;background:var(--bg);border:1px solid var(--line);border-radius:8px}
.check-progress span{font-weight:600}
.check-progress progress{flex:1;min-width:110px;height:12px;accent-color:var(--gold)}
.question-attention{outline:2px solid var(--gold);outline-offset:4px;background:rgba(176,139,57,.12)}
#uploadStatus{margin-top:8px}
.quick-date-filters,.section-bulk-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0 15px}
@media print{
 body:has(.manager-grid) header,body:has(.manager-grid) .manager-nav,body:has(.manager-grid) .manager-filters,body:has(.manager-grid) .quick-date-filters,body:has(.manager-grid) .report-summary,body:has(.manager-grid) .grid,body:has(.manager-grid) #columnChooser,body:has(.manager-grid) #admin>.muted,body:has(.manager-grid) #admin>.panel>.flex,body:has(.manager-grid) .no-print{display:none!important}
 body:has(.manager-grid),body:has(.manager-grid) main,body:has(.manager-grid) .panel{background:white!important;color:black!important;border:0!important;box-shadow:none!important}
 body:has(.manager-grid) main{max-width:none!important;padding:0!important;margin:0!important}
 body:has(.manager-grid) #fullReport{display:block!important}
 body:has(.manager-grid) .report-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px}
 body:has(.manager-grid) .report-group{break-inside:avoid}
 body:has(.manager-grid) .report-photo-grid figure{break-inside:avoid}
 body:has(.manager-grid) .report-photo-grid img{max-height:240px;width:auto;object-fit:contain}
}

/* Dark theme overrides for manager pages (legacy light-only backgrounds) */
body.dark:has(.manager-grid),body.manager-settings.dark{background:var(--bg);color:var(--text)}
body.dark .manager-grid th{background:#343027;color:#FFE49A}
body.dark #fullReport .report-group h4{background:#373127;color:var(--text)}
body.dark #fullReport .report-notes{background:#302d27;color:var(--text)}
body.dark #fullReport .report-photo-grid img{background:#161616}
body.dark .settings-section-header{background:#302d27;color:var(--text)}
body.dark .manager-grid td,body.dark .manager-grid th{border-color:var(--line)}
@media print{body.dark:has(.manager-grid),body.dark:has(.manager-grid) main,body.dark:has(.manager-grid) .panel{background:white!important;color:black!important}}

/* Driver home PWA installation guide */
.install-guide{margin-top:20px;padding:15px;border:1px solid var(--line);border-radius:9px;background:var(--bg)}
.install-guide-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.install-guide-heading h3{margin:0 0 4px;border:0;padding:0;font-size:16px}
.install-guide-heading p{margin:0}
.install-guide details{margin-top:10px;padding:10px 12px;border:1px solid var(--line);border-radius:7px;background:var(--surface)}
.install-guide summary{font-weight:600;cursor:pointer}
.install-guide ol{padding-left:22px;margin:10px 0 0}
.install-guide li+li{margin-top:5px}

/* Driver history report: compact top-right collapse control */
.driver-full-report .report-header{position:relative;padding-right:45px}
.driver-report-collapse{position:absolute;right:0;top:0;display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--text);font-size:26px;line-height:1;cursor:pointer}
.driver-report-collapse:hover{background:var(--bg)}
@media(max-width:540px){.driver-full-report .report-header{padding-right:40px}.driver-report-collapse{right:0;top:0}}

/* Mobile-friendly spacing for driver inspection reports */
.driver-full-report .report-header{display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding-right:48px;margin-bottom:16px}
.driver-full-report .report-header h2{margin:5px 0 10px;line-height:1.25}
.driver-full-report .report-header p{margin:0}
.driver-full-report .report-actions{display:flex;margin-top:2px}
.driver-full-report .report-meta{display:grid;grid-template-columns:1fr;gap:10px;margin:14px 0 22px;padding:14px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.driver-full-report .report-meta>div{display:grid;grid-template-columns:minmax(105px,35%) 1fr;align-items:baseline;gap:10px}
.driver-full-report .report-meta strong{font-size:13px}
.driver-full-report .report-meta span{overflow-wrap:anywhere}
.driver-full-report .report-phase{margin:0 0 23px}
.driver-full-report .report-phase h3{margin:0 0 13px;padding-bottom:9px}
.driver-full-report .report-submitted{margin:12px 0 18px}
.driver-full-report .report-odometer{margin:14px 0 22px}
.driver-full-report .report-group{margin:20px 0}
.driver-full-report .report-group h4{margin:0 0 8px}
.driver-full-report .report-answer{display:flex;align-items:center;gap:9px;min-height:38px;padding:8px 0;border-bottom:1px solid var(--line)}
.driver-full-report .report-notes{margin:20px 0;padding:10px 12px}
.driver-report-collapse{display:grid;place-items:center;font-size:initial;line-height:normal}
.driver-report-collapse svg{display:block;width:20px;height:20px;margin:auto;flex:none}
@media(max-width:540px){.driver-full-report .report-meta>div{grid-template-columns:minmax(92px,34%) 1fr}}

/* Driver report mobile layout — compact and prevent images overflowing */
#historyList,.history-entry,.driver-full-report,.driver-full-report .report-evidence,.driver-full-report .report-photo-grid{min-width:0;max-width:100%;box-sizing:border-box}
.driver-full-report{width:100%;overflow:hidden}
.driver-full-report .report-header{gap:6px;margin-bottom:8px}
.driver-full-report .report-header h2{margin:3px 0 4px}
.driver-full-report .report-meta{gap:5px;margin:8px 0 12px;padding:8px 0}
.driver-full-report .report-meta>div{gap:8px}
.driver-full-report .report-phase{margin-bottom:12px}
.driver-full-report .report-phase h3{margin-bottom:7px;padding-bottom:6px}
.driver-full-report .report-submitted{margin:6px 0 10px}
.driver-full-report .report-odometer{margin:8px 0 10px}
.driver-full-report .report-group{margin:10px 0}
.driver-full-report .report-group h4{margin-bottom:3px}
.driver-full-report .report-answer{min-height:0;padding:5px 0;gap:6px}
.driver-full-report .report-notes{margin:10px 0;padding:6px 8px}
.driver-full-report .report-columns{display:block;max-width:100%}
.driver-full-report .report-evidence{width:100%;overflow:hidden}
.driver-full-report .report-photo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));gap:10px;width:100%}
.driver-full-report .report-photo-grid figure{min-width:0;max-width:100%;margin:0;padding:6px;overflow:hidden;border:1px solid var(--line);border-radius:7px}
.driver-full-report .report-photo-grid img{display:block;width:100%;max-width:100%;height:145px;max-height:145px;object-fit:contain;border-radius:5px;cursor:zoom-in}
.driver-full-report .report-photo-grid figcaption{overflow-wrap:anywhere;font-size:12px;margin-top:5px}
@media(max-width:540px){.driver-full-report .report-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.driver-full-report .report-photo-grid img{height:115px;max-height:115px}}

/* Visually separate driver report sections without excessive spacing */
.driver-full-report .report-details-card,.driver-full-report .report-section-card{min-width:0;max-width:100%;margin:10px 0;padding:12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);box-sizing:border-box}
.driver-full-report .report-details-card h3,.driver-full-report .report-section-card>h3{margin:0 0 9px;padding-bottom:6px;border-bottom:2px solid var(--gold);font-size:15px}
.driver-full-report .report-details-card .report-meta{margin:0;padding:0;border:0;gap:5px}
.driver-full-report .report-section-card.report-phase{margin:10px 0}
.driver-full-report .report-section-card .report-group{margin:9px 0}
.driver-full-report .report-section-card .report-notes{margin:9px 0 0}
.driver-full-report .report-section-card.report-evidence{width:100%;overflow:hidden}
@media(max-width:540px){.driver-full-report .report-details-card,.driver-full-report .report-section-card{padding:10px;margin:9px 0}}

/* Keep labels and values vertically aligned in the driver report details */
.driver-full-report .report-details-card .report-meta>div{
 display:grid;
 grid-template-columns:minmax(96px,35%) minmax(0,1fr);
 align-items:center;
 column-gap:12px;
 min-height:30px;
}
.driver-full-report .report-details-card .report-meta strong,
.driver-full-report .report-details-card .report-meta span{
 display:block;
 line-height:1.35;
 margin:0;
 align-self:center;
}
.driver-full-report .report-answer{align-items:center}

/* Print driver history reports in the same A4 format as management reports. */
@media print{
 @page{size:A4 portrait;margin:12mm}
 body:has(.driver-full-report){background:#fff!important;color:#000!important;font:13px/1.45 'Segoe UI',Arial,sans-serif!important}
 body:has(.driver-full-report)>header,body:has(.driver-full-report) #login,body:has(.driver-full-report) #thankYou,body:has(.driver-full-report) #checklist,
 body:has(.driver-full-report) #home>.panel>.flex,body:has(.driver-full-report) #role,body:has(.driver-full-report) #driverHomeNotice,body:has(.driver-full-report) #adminLink,body:has(.driver-full-report) #changePassword,body:has(.driver-full-report) #changePasswordBlock,body:has(.driver-full-report) #historyToggle,body:has(.driver-full-report) #historyStatus,body:has(.driver-full-report) .history-report-button,body:has(.driver-full-report) .history-entry:not(:has(.driver-full-report)),body:has(.driver-full-report) #installationHelp,body:has(.driver-full-report) .no-print{display:none!important}
 body:has(.driver-full-report) main,body:has(.driver-full-report) #home,body:has(.driver-full-report) #home>.panel,body:has(.driver-full-report) #historyPanel,body:has(.driver-full-report) #historyList,body:has(.driver-full-report) .history-entry:has(.driver-full-report),body:has(.driver-full-report) .driver-full-report{max-width:none!important;width:100%!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;background:#fff!important;color:#000!important;overflow:visible!important}
 body:has(.driver-full-report) .driver-full-report .report-header{display:flex!important;flex-direction:row!important;justify-content:space-between!important;padding:0 0 12px!important;margin:0 0 4px!important;border-bottom:2px solid #FFBF00;gap:16px}
 body:has(.driver-full-report) .driver-full-report .report-header small{font-weight:700;letter-spacing:2px;color:#FFBF00}
 body:has(.driver-full-report) .driver-full-report .report-header h2{margin:4px 0;font-size:19px}
 body:has(.driver-full-report) .driver-full-report .report-header p{margin:0}
 body:has(.driver-full-report) .driver-full-report .report-details-card,body:has(.driver-full-report) .driver-full-report .report-section-card{margin:0!important;padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;overflow:visible!important;break-inside:auto}
 body:has(.driver-full-report) .driver-full-report .report-details-card h3{display:none}
 body:has(.driver-full-report) .driver-full-report .report-meta{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;margin:0 0 14px!important;padding:14px 0!important;border:0!important;border-bottom:1px solid #ddd!important}
 body:has(.driver-full-report) .driver-full-report .report-meta>div{display:flex!important;flex-direction:column!important;gap:3px!important}
 body:has(.driver-full-report) .driver-full-report .report-meta strong{font-size:11px;color:#626262;text-transform:uppercase}
 body:has(.driver-full-report) .driver-full-report .report-meta span{font-weight:600}
 body:has(.driver-full-report) .driver-full-report .report-columns{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12mm!important;align-items:start}
 body:has(.driver-full-report) .driver-full-report .report-phase{min-width:0!important;margin:0!important}
 body:has(.driver-full-report) .driver-full-report .report-phase>h3{font-size:15px;margin:18px 0 8px!important;padding-bottom:7px!important;border-bottom:2px solid #FFBF00}
 body:has(.driver-full-report) .driver-full-report .report-phase .report-submitted{font-size:12px;color:#626262;margin:6px 0!important}
 body:has(.driver-full-report) .driver-full-report .report-odometer{font-size:13px;margin:0 0 15px!important}
 body:has(.driver-full-report) .driver-full-report .report-group{break-inside:avoid;margin:13px 0!important}
 body:has(.driver-full-report) .driver-full-report .report-group h4{font-size:12px;background:#f6f1e6!important;padding:5px 8px;margin:0!important;border-left:3px solid #FFBF00;print-color-adjust:exact;-webkit-print-color-adjust:exact}
 body:has(.driver-full-report) .driver-full-report .report-answer{display:grid!important;grid-template-columns:minmax(0,1fr) 22px!important;gap:6px!important;min-height:0!important;font-size:12px;padding:7px 6px!important;border-bottom:1px solid #e2e2e2}
 body:has(.driver-full-report) .driver-full-report .report-defect{grid-column:1/-1;font-size:11px;white-space:pre-wrap}
 body:has(.driver-full-report) .driver-full-report .report-notes{white-space:pre-wrap;font-size:12px;padding:10px!important;margin:12px 0!important;background:#faf8f2!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}
 body:has(.driver-full-report) .driver-full-report .report-evidence{margin-top:14px!important}
 body:has(.driver-full-report) .driver-full-report .report-evidence>h3{font-size:15px;border-bottom:2px solid #FFBF00;padding-bottom:7px;margin:0 0 10px}
 body:has(.driver-full-report) .driver-full-report .report-photo-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;width:100%!important}
 body:has(.driver-full-report) .driver-full-report .report-photo-grid figure{margin:0!important;padding:8px!important;border:1px solid #ddd!important;break-inside:avoid;overflow:hidden}
 body:has(.driver-full-report) .driver-full-report .report-photo-grid img{display:block;width:100%!important;max-width:100%!important;height:140px!important;max-height:140px!important;object-fit:contain}
}

/* Previous inspection disclosure chevron and compact receipt */
.history-report-button.history-chevron-row{position:relative;padding-right:32px;text-align:left}
.history-chevron-row::after{content:'';position:absolute;right:13px;top:50%;width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-65%) rotate(45deg);transition:transform .15s ease}
.history-chevron-row[aria-expanded="true"]::after{transform:translateY(-25%) rotate(225deg)}
.submission-receipt{font-weight:600;line-height:1.4;margin:8px 0 12px}
#lastRefreshed{font-size:12px;white-space:nowrap;align-self:center}

.report-updated-row{display:flex;justify-content:flex-end;align-items:center;text-align:right;margin:8px 0 2px;min-height:18px}
@media print{.report-updated-row{display:none!important}}

/* Report footer: retention note left, refresh timestamp right */
.report-footer{max-width:1380px;margin:0 auto 18px;padding:0 14px;display:flex;align-items:baseline;justify-content:space-between;gap:16px;flex-wrap:wrap}
.report-footer p{margin:0}
.report-footer #lastRefreshed{margin-left:auto;text-align:right}
@media print{.report-footer{display:none!important}}

/* Inline odometer location editor on vehicle rows */
.vehicle-odometer-label{display:flex;flex-direction:column;gap:4px;font-size:12px;margin:6px 0 0;max-width:430px}
.vehicle-odometer-input{width:100%;min-width:0;box-sizing:border-box}
.vehicle-odometer-status{display:block;font-size:11px;min-height:12px}

/* Vehicle settings cards echo the Pre-Start checklist section layout */
#vehicleList{display:grid;gap:12px;margin-top:14px}
#vehicleList .vehicle-settings-card{display:flex;align-items:center;gap:14px;border:1px solid var(--line);border-left:5px solid var(--gold);border-radius:10px;padding:13px 15px;background:var(--surface);box-shadow:0 2px 8px rgba(0,0,0,.045);margin:0;min-width:0}
#vehicleList .vehicle-settings-card .settings-item-text{flex:1;min-width:0}
#vehicleList .vehicle-settings-card .vehicle-odometer-label{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:10px;max-width:none;width:100%;margin:8px 0 0;font-size:12px}
#vehicleList .vehicle-settings-card .vehicle-odometer-input{min-width:0;width:100%;max-width:420px;margin:0}
#vehicleList .vehicle-settings-card .edit-vehicle{flex-shrink:0}
@media(max-width:520px){#vehicleList .vehicle-settings-card{gap:8px;padding:10px}#vehicleList .vehicle-settings-card .vehicle-odometer-label{gap:7px;grid-template-columns:max-content minmax(0,1fr)}#vehicleList .vehicle-settings-card .vehicle-odometer-input{font-size:12px}}

/* Fleet card editing and shared compact settings controls */
.vehicle-search-line{display:flex;align-items:center;gap:12px;margin-top:12px;max-width:550px}
.vehicle-search-line label{white-space:nowrap;font-weight:600}
.vehicle-search-line input{flex:1;min-width:0}
#vehicleList .vehicle-settings-card{align-items:flex-start}
#vehicleList .vehicle-card-heading{display:flex;align-items:center;gap:5px;width:100%;border:0;background:transparent;color:var(--text);text-align:left;cursor:pointer;font:inherit;padding:3px 0}
#vehicleList .vehicle-card-chevron{display:inline-block;width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-left:auto;flex-shrink:0}
#vehicleList .vehicle-card-heading[aria-expanded="true"] .vehicle-card-chevron{transform:rotate(225deg)}
#vehicleList .vehicle-card-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:14px;row-gap:7px;margin-top:9px}
#vehicleList .vehicle-card-fields[hidden]{display:none!important}
#vehicleList .vehicle-card-fields>label{min-width:0;display:flex;flex-direction:column;gap:4px;font-size:12px;margin:0}
#vehicleList .vehicle-card-fields input:not([type=checkbox]){width:100%;box-sizing:border-box;min-width:0;margin:0}
#vehicleList .vehicle-card-fields .vehicle-odometer-label{display:flex;flex-direction:row;align-items:center;gap:10px;grid-column:1/-1}
#vehicleList .vehicle-card-fields .vehicle-odometer-input{flex:1;max-width:none}
#vehicleList .vehicle-card-fields .vehicle-active-label{flex-direction:row;align-items:center;gap:8px}
#vehicleList .vehicle-card-fields .vehicle-odometer-status{grid-column:1/-1;min-height:0;font-size:11px}
#vehicleList .vehicle-card-fields .vehicle-odometer-status:empty{display:none}
#checklistPanel .settings-question{min-height:0!important;padding:8px 8px!important}
#checklistPanel .question-list{padding:7px 14px}
body.manager-settings .settings-page input:not([type=checkbox]):not([type=radio]),body.manager-settings .settings-page select,body.manager-settings .settings-page textarea{border-radius:6px;min-height:34px}
body.manager-settings .settings-page button{border-radius:6px}
@media(max-width:580px){#vehicleList .vehicle-card-fields{grid-template-columns:1fr}#vehicleList .vehicle-card-fields .vehicle-odometer-label{grid-column:1;display:grid;grid-template-columns:max-content minmax(0,1fr)}.vehicle-search-line{align-items:stretch;flex-direction:column;gap:4px}}

/* Touch-friendly drag handles and continuous scrolling while reordering. */
.manager-settings .drag-handle{touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab;min-width:30px;min-height:38px;display:inline-flex;align-items:center;justify-content:center}
.manager-settings .drag-reordering{opacity:.78;outline:2px dashed var(--gold);outline-offset:2px}
.manager-settings .drag-reordering .drag-handle,.settings-is-reordering .drag-handle{cursor:grabbing}
.settings-is-reordering{user-select:none;-webkit-user-select:none}

/* A floating copy stays visually attached to the pointer while sorting. */
.settings-drag-ghost{position:fixed!important;z-index:10000!important;pointer-events:none!important;opacity:.94!important;box-sizing:border-box;box-shadow:0 9px 25px rgba(0,0,0,.24)!important;transform:scale(.985)}
.settings-is-reordering{cursor:grabbing!important;touch-action:none}
.manager-settings .drag-reordering{opacity:.3!important;outline:2px dashed var(--gold)!important}

/* Add-question editor appears directly within its target checklist section. */
#sectionList .settings-section>#editQuestionPanel{margin:8px 12px 12px;padding:12px;border:1px solid var(--line);border-radius:8px;box-shadow:none;min-width:0}
#sectionList .settings-section>#editQuestionPanel h3{margin:0}

/* Inline edit panel underneath the chosen inspection question. */
#sectionList .question-list>#editQuestionPanel{margin:8px 4px 12px;padding:12px;border:1px solid var(--line);border-left:3px solid var(--gold);border-radius:8px;box-shadow:none;min-width:0}

/* Keep applicability radio controls immediately beside their text. */
#editQuestionPanel>label.inline:has(input[type="radio"]){display:flex!important;flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;gap:8px!important;width:max-content;max-width:100%;margin:7px 0!important;text-align:left}
#editQuestionPanel>label.inline input[type="radio"]{display:inline-block!important;position:static!important;flex:0 0 auto!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;margin:0!important;padding:0!important;vertical-align:middle}

/* Optional evidence attached to the driver’s additional notes. */
.notes-photo-input{margin:10px 0 14px;padding:10px;border:1px solid var(--line);border-radius:8px;display:grid;gap:6px}
.notes-photo-input>label{font-weight:600}
.notes-photo-input input[type=file]{max-width:100%;font-size:13px}
.notes-photo-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:5px 0;border-top:1px solid var(--line);font-size:12px;overflow-wrap:anywhere}
.notes-photo-row span{min-width:0}
.report-evidence[hidden]{display:none!important}

/* Preserve management-entered line and paragraph breaks in driver instructions. */
#driverSharedInstructions,#driverContactInstructions{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55}

.driver-instruction-bullets{padding-left:22px;margin:5px 0 9px;list-style:disc outside}
.driver-instruction-bullets li{padding-left:2px;margin:3px 0}
.driver-instruction-line{min-height:1em}

/* Manager report deletion is deliberately distinct from print/close. */
#fullReport .delete-report-button{border-color:#a82929;color:#a82929}
#fullReport .delete-report-button:hover{background:#fff0ee}
@media print{#fullReport .delete-report-button{display:none!important}}

/* Driver answer cards and section summary */
.check-section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.section-count{font-size:12px;font-weight:600;border-radius:999px;border:1px solid var(--line);padding:3px 8px;white-space:nowrap;color:var(--muted)}
.section-count.section-done{color:#158449;border-color:#158449}
.defect-photo-preview img,.notes-local-thumbnail img{display:block;width:76px;height:68px;object-fit:cover;border-radius:7px;border:1px solid var(--line)}
.defect-photo-preview{margin-top:6px}
.notes-photo-row{justify-content:flex-start}
.notes-photo-row button{margin-left:auto}
.notes-local-thumbnail{flex:0 0 58px}
.notes-local-thumbnail img{width:56px;height:54px}
/* Keep inspection progress and primary action in view. */
.checklist-sticky-submit{position:sticky;bottom:0;z-index:15;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;background:var(--panel,var(--bg));border-top:2px solid var(--gold);box-shadow:0 -6px 15px rgba(0,0,0,.10)}
.sticky-progress-text{font-size:12px;font-weight:650;white-space:nowrap}
@media(max-width:430px){.checklist-sticky-submit{padding:8px}.sticky-progress-text{font-size:11px}}
/* Manager grid readability and pinned identity */
.manager-grid{overflow-x:auto;position:relative}
.manager-grid table{border-collapse:separate;border-spacing:0}
.manager-grid tbody tr:nth-child(even) td{background:var(--bg)}
.manager-grid tbody tr:nth-child(odd) td{background:var(--panel,var(--surface,#fff))}
.manager-grid th:nth-child(1),.manager-grid td:nth-child(1){position:sticky;left:0;z-index:3}
.manager-grid th:nth-child(2),.manager-grid td:nth-child(2){position:sticky;left:var(--grid-date-width,108px);z-index:3}
.manager-grid th:nth-child(3),.manager-grid td:nth-child(3){position:sticky;left:calc(var(--grid-date-width,108px) + var(--grid-reg-width,128px));z-index:3;box-shadow:3px 0 5px rgba(0,0,0,.07)}
.manager-grid th:nth-child(-n+3){z-index:6;background:var(--panel,var(--bg))}
.manager-grid th:nth-child(1),.manager-grid td:nth-child(1){min-width:108px;width:108px}
.manager-grid th:nth-child(2),.manager-grid td:nth-child(2){min-width:128px;width:128px}
.manager-grid th:nth-child(3),.manager-grid td:nth-child(3){min-width:145px;width:145px}
.manager-grid tbody tr.grid-has-defects td:first-child{box-shadow:inset 4px 0 #bd3535}
.manager-grid tbody tr.grid-has-defects td{border-bottom-color:rgba(190,52,52,.28)}
/* Group the proof images by their inspection phase. */
.photo-phase-label{display:inline-block;padding:3px 7px;margin:5px 0;background:rgba(190,145,30,.12);border-radius:4px;font-size:11px;font-weight:700}
.report-photo-grid figure{min-width:0}
.report-photo-grid figure img{width:100%;height:145px;object-fit:cover;border-radius:6px}
@media print{.checklist-sticky-submit{position:static;box-shadow:none}.report-photo-grid figure img{height:auto;max-height:175px;object-fit:contain}}
/* Compact, regular settings headers and clear gold drag insertion marker */
#sectionList .settings-section-header{gap:8px;padding-top:6px;padding-bottom:6px}
#sectionList .settings-section-header .section-toggle{font-size:13px;line-height:1.3}
#sectionList .section-question-count{font-size:11px;opacity:.7}
.manager-settings .drag-reordering{border-top:4px solid var(--gold)!important;border-bottom:4px solid var(--gold)!important;outline:0!important}

.manager-settings .drag-insert-before{box-shadow:inset 0 4px 0 var(--gold)!important}
.manager-settings .drag-insert-after{box-shadow:inset 0 -4px 0 var(--gold)!important}
