:root{font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;color:#182b3e;background:#f2f5f8}*{box-sizing:border-box}body{margin:0}header{background:#10283f;color:white;padding:16px 24px;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}.brand{display:flex;align-items:center;gap:12px}.brand b{font-size:21px}.brand small{display:block;color:#c4d4e2;letter-spacing:.1em;font-size:10px}.tn{background:#e53935;font-weight:800;padding:13px;font-size:21px}nav{display:flex;gap:8px;flex-wrap:wrap}button{cursor:pointer;border:0;border-radius:8px;padding:12px 16px;background:#1266aa;color:white;font-weight:650;font-size:14px;min-height:44px}nav button{background:transparent;color:#d9e5f0}nav button.active,nav button:hover{background:#1875bd;color:white}button.secondary{background:#e7edf3;color:#203b50}button:disabled{opacity:.45;cursor:not-allowed}main{max-width:1440px;margin:auto;padding:24px}.hidden{display:none!important}.heading{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap;margin-bottom:18px}h1{font-size:27px;margin:0 0 4px}h2{font-size:18px;margin:0 0 15px}p{color:#66798a;margin:0}.panel{background:white;border:1px solid #dce5ed;border-radius:12px;padding:20px;margin-bottom:16px;box-shadow:0 2px 8px #10283f08}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:16px}.stat{background:white;border:1px solid #dce5ed;border-radius:12px;padding:18px}.stat strong{font-size:30px;display:block}.stat small{color:#62768a}.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:730px}th,td{text-align:left;padding:12px;border-bottom:1px solid #e9eef2;font-size:13px}th{background:#f5f8fa;color:#526679}td button{padding:7px 12px;min-height:36px}.fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}label{font-weight:650;font-size:13px;display:block}input,select,textarea{font:inherit;color:#20364b;width:100%;border:1px solid #b9cbd8;border-radius:8px;background:white;padding:12px;margin-top:7px;min-height:45px}textarea{min-height:85px}.stepbar{display:flex;gap:7px;overflow:auto;padding:2px 0 16px}.stepbar button{white-space:nowrap;background:#e3eaf0;color:#2b465c}.stepbar button.active{background:#125d97;color:white}.item{display:grid;grid-template-columns:minmax(150px,1.1fr) minmax(230px,1.5fr) minmax(150px,1fr);gap:12px;align-items:center;border-bottom:1px solid #edf0f3;padding:11px 0}.itemname{font-size:14px;font-weight:600}.ratings{display:flex;gap:5px}.ratings button{flex:1;min-width:44px;padding:9px 5px;background:#e8eef2;color:#344b5c}.ratings button.selected.pass{background:#14844a;color:white}.ratings button.selected.attention{background:#e5a600;color:#1d2932}.ratings button.selected.immediate{background:#d62f3a;color:white}.ratings button.selected.na{background:#64798a;color:white}.item input{margin:0}.footactions{display:flex;justify-content:space-between;margin:20px 0 40px}.pill{background:#e4edf6;padding:9px 13px;border-radius:50px;font-weight:700;font-size:13px}.tiregrid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.tire{border:1px solid #d8e2eb;border-radius:9px;padding:14px}.tirefields{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:10px}.tire .item{display:block}.tire .ratings{margin-top:9px}.checks{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.checks label{display:flex;gap:10px;align-items:center}.checks input{width:20px;height:20px;min-height:20px;margin:0}.review{background:#f3f7fa;border-radius:9px;padding:16px;margin:15px 0}.warn{color:#a13b10}.bad{color:#c62c36}.good{color:#12824b}#notice:not(:empty){background:#fff1d8;color:#68400a;padding:12px;border-radius:8px;margin-bottom:16px}.detail{margin-top:20px}.filter select{min-width:160px}.hint{color:#6c7e8e;font-size:12px;margin-top:5px}@media(max-width:1000px){.item{grid-template-columns:1fr;gap:8px}.item input{width:100%}.fields{grid-template-columns:repeat(2,1fr)}.stats{grid-template-columns:repeat(2,1fr)}}@media(max-width:620px){header{padding:13px}nav{width:100%}nav button{flex:1;padding:10px 5px;font-size:12px}main{padding:13px}h1{font-size:23px}.panel{padding:14px}.fields,.tiregrid,.checks{grid-template-columns:1fr}.ratings button{min-height:48px}.stats{gap:8px}.stat{padding:12px}.stat strong{font-size:24px}}@media print{header,.footactions,.stepbar,#export,button{display:none!important}main{padding:0}.page{display:none!important}#records{display:block!important}.panel{box-shadow:none}}

/* Inspection status colors remain visible before and after selection. */
.ratings button{font-weight:800;border:2px solid transparent;transition:box-shadow .12s,transform .12s}
.ratings button.pass{background:#d9f5e5;color:#08683a;border-color:#29a363}
.ratings button.attention{background:#fff1b8;color:#765100;border-color:#e5b322}
.ratings button.immediate{background:#ffe0e1;color:#9f1b27;border-color:#e34c55}
.ratings button.na{background:#e7edf3;color:#425468;border-color:#94a4b4}
.ratings button.selected{box-shadow:inset 0 0 0 2px #172b3b,0 0 0 2px #fff;transform:translateY(-1px)}
.ratings button.selected.pass{background:#14844a;color:white}
.ratings button.selected.attention{background:#e5a600;color:#1d2932}
.ratings button.selected.immediate{background:#d62f3a;color:white}
.ratings button.selected.na{background:#64798a;color:white}
@media(max-width:1000px){.ratings button{min-height:50px;font-size:16px}.item{padding:16px 0}}
@media print{.download-pdf{display:none!important}}

.nextpm-box{background:#eef4fa;border:1px solid #cbd9e6;border-radius:10px;padding:12px 16px;display:flex;flex-direction:column;gap:5px}.nextpm-box #nextPmPreview{font-size:1.25rem;font-weight:800;color:#173c60}.nextpm-box small{color:#526679}

/* Live mileage calculator, responsive on iPad */
.pm-calc-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0}.pm-calc-grid>div{padding:12px;background:#f1f5f9;border-radius:9px;min-width:0}.pm-calc-grid small{display:block;color:#526579;font-size:12px;margin-bottom:6px}.pm-calc-grid strong{display:block;font-size:clamp(16px,2vw,22px);color:#16334d;overflow-wrap:anywhere}.pm-empty{color:#526579}@media(max-width:650px){.pm-calc-grid{grid-template-columns:1fr}.pm-calc-grid>div{padding:10px}}

/* Maintenance Records — touch-friendly truck filtering and PDF actions */
.records-count{font-weight:700;margin:0 0 16px;color:#34465a}.record-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.pdf-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 14px;border-radius:8px;background:#163c63;color:white;text-decoration:none;font-weight:700;white-space:nowrap}.pdf-link:hover{background:#0c2d4d}.filter select{min-height:48px;min-width:165px}@media(max-width:700px){.record-actions{flex-direction:column;align-items:stretch}.record-actions button,.pdf-link{width:100%;text-align:center}}

/* Tennessee Rural Service Patrol official dashboard theme */
:root{color:#0c2b55;background:#eaf1f8}body{background:linear-gradient(160deg,#e8f1fa,#f7fafc 70%);min-height:100vh}.site-header{display:block;background:transparent;color:#092d58;padding:0}.masthead{min-height:152px;display:flex;align-items:center;gap:24px;padding:12px clamp(16px,3vw,50px);background:linear-gradient(100deg,#fff 0%,#f6f9fd 53%,#e1ebf7 100%);position:relative;overflow:hidden}.official-logo{width:135px;height:135px;object-fit:contain;flex:none;z-index:1}.brand-title{display:flex;flex-direction:column;line-height:1.04;z-index:1;white-space:nowrap}.brand-title strong{color:#ed1c2b;font-size:clamp(25px,3.1vw,48px);letter-spacing:-.025em}.brand-title span{color:#092b55;font-size:clamp(17px,2.1vw,34px);font-weight:850;letter-spacing:-.025em}.masthead-divider{height:94px;border-left:2px solid #8295b0;margin:0 6px 0 4px}.slogan{font-family:'Segoe Script','Brush Script MT',cursive;font-size:clamp(22px,2.8vw,41px);font-style:italic;font-weight:700;color:#062b59;transform:rotate(-4deg);border-bottom:5px solid #ed1c2b;line-height:1.3;white-space:nowrap;z-index:1}.tennessee-mark{position:absolute;right:30px;top:18px;font-size:65px;letter-spacing:-18px;color:#d2dfed;opacity:.75;transform:rotate(-15deg)}.topnav{display:flex;background:#062950;border-top:3px solid #ec1b2e;padding:0 28px;gap:12px;min-height:59px;align-items:stretch}.topnav button{border-radius:0;background:transparent;color:white;font-size:16px;padding:16px 22px}.topnav button.active,.topnav button:hover{background:#ec1b2e;color:#fff}.site-header nav button{min-height:56px}main{max-width:1600px;padding:22px clamp(15px,3vw,48px)}h1{font-size:clamp(26px,2.8vw,39px);color:#082b59;letter-spacing:-.025em}.dashboard-heading{margin-bottom:18px}.panel,.stat{border:1px solid #dce6f0;border-radius:10px;box-shadow:0 3px 12px #1234570b}.stats{gap:12px}.stat{display:flex;align-items:center;gap:17px;min-height:105px;padding:14px 16px}.stat strong{font-size:32px;line-height:1}.stat b{display:block;font-size:16px}.stat small{display:block;margin-top:5px}.stat-icon{display:flex;align-items:center;justify-content:center;width:66px;height:66px;border-radius:10px;font-size:28px;font-weight:900;color:white;background:#073b76;flex:none}.stat-current .stat-icon{background:#00a267}.stat-soon .stat-icon{background:#ffb800}.stat-overdue .stat-icon{background:#ed1428}.dashboard-panels{display:grid;grid-template-columns:1.13fr 1.13fr .9fr;gap:12px;align-items:stretch}.dashboard-panels .panel{min-width:0;padding:16px}.panel-title{display:flex;justify-content:space-between;align-items:center;gap:10px}.panel-title h2,.quick-actions h2{margin-bottom:12px;color:#0a2c57}.panel-symbol{font-size:23px}.due-symbol{color:#f5a900}.overdue-symbol{color:#e71a2e}.dashboard-panels table{min-width:0}.dashboard-panels th,.dashboard-panels td{padding:10px 7px;white-space:nowrap}.dashboard-panels th{font-size:12px}.status-chip{display:inline-block;border-radius:6px;background:#d9e3ed;color:#28435e;padding:5px 10px;font-size:12px;font-weight:750;font-style:normal;white-space:nowrap}.status-chip.good{background:#078f58;color:white}.status-chip.warn{background:#ffb500;color:#172b42}.status-chip.bad{background:#eb1829;color:white}.quick-actions button{display:flex;width:100%;align-items:center;justify-content:space-between;margin-bottom:10px;font-size:15px}.action-start{background:#ef192a}.action-records{background:#092e5a}.quick-actions button span{font-size:26px}.truck-quick-label{display:flex;align-items:center;justify-content:space-between;background:#eaf1f8;border-radius:7px;padding:7px 12px;gap:12px}.truck-quick-label select{width:120px;min-height:40px;margin:0}.fleet-panel{padding:15px}.fleet-legend{display:flex;gap:15px;flex-wrap:wrap;font-size:12px}.fleet-legend span{display:flex;align-items:center;gap:5px}.dot{width:13px;height:13px;border-radius:50%;display:inline-block}.dot.green{background:#07985d}.dot.yellow{background:#ffb500}.dot.red{background:#ed172c}.dot.gray{background:#8394a5}.fleetgrid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:10px}.fleet-tile{display:flex;flex-direction:column;align-items:center;gap:3px;min-height:83px;padding:7px 4px;border-radius:7px;border:1px solid #d6e1eb;border-top:4px solid #94a6b7;background:#fbfcfe;color:#0c2d59;font-weight:400}.fleet-tile.good{border-top-color:#06945c}.fleet-tile.warn{border-top-color:#ffb500}.fleet-tile.bad{border-top-color:#ed1428}.fleet-tile strong{font-size:15px}.fleet-tile>span{font-size:12px}.fleet-tile .status-chip{font-size:11px;min-width:80px;padding:4px}.fleet-tile:hover{box-shadow:0 2px 9px #0d3b6850;transform:translateY(-1px)}.fleet-detail-panel{margin-top:14px}.backup-button{background:#e6eef7;color:#0b3765}.empty-table{text-align:center;color:#61748a}.ratings button.pass{background:#14844a;color:white;border-color:#14844a}.ratings button.attention{background:#e5a600;color:#1c2836;border-color:#e5a600}.ratings button.immediate{background:#d62f3a;color:white;border-color:#d62f3a}.ratings button.na{background:#64798a;color:white;border-color:#64798a}.ratings button.selected{outline:3px solid #0a2c55;outline-offset:2px}
@media(max-width:1180px){.dashboard-panels{grid-template-columns:1fr 1fr}.quick-actions{grid-column:1/-1}.fleetgrid{grid-template-columns:repeat(6,minmax(0,1fr))}.masthead{gap:16px}.official-logo{width:104px;height:104px}.masthead-divider{height:72px}.slogan{font-size:26px}}@media(max-width:800px){.masthead{min-height:100px;flex-wrap:wrap;gap:10px}.official-logo{width:78px;height:78px}.masthead-divider{display:none}.slogan{margin-left:88px;font-size:23px}.topnav{padding:0 8px;gap:2px}.topnav button{font-size:13px;padding:12px}.dashboard-panels{grid-template-columns:1fr}.quick-actions{grid-column:auto}.fleetgrid{grid-template-columns:repeat(4,minmax(0,1fr))}.stat{min-height:88px}.stat-icon{width:50px;height:50px}.fleet-legend{gap:8px}}@media(max-width:500px){.masthead{padding:10px}.brand-title strong{font-size:22px}.brand-title span{font-size:15px}.official-logo{width:68px;height:68px}.slogan{margin:0 0 0 74px;font-size:21px}.topnav button{font-size:11px;padding:10px 6px}.fleetgrid{grid-template-columns:repeat(3,minmax(0,1fr))}.fleet-legend{font-size:11px}.stat{padding:10px;gap:9px}.stat-icon{width:40px;height:45px;font-size:21px}.stat strong{font-size:25px}.stat b{font-size:13px}.stat small{font-size:11px}}@media print{.site-header{display:none!important}}

/* Region 4 mileage and oil-change log */
.r4-toggle{display:flex;align-items:center;gap:12px;margin-top:18px;padding:14px;background:#eef4fa;border:1px solid #d6e2ed;border-radius:9px;font-size:15px}.r4-toggle input{width:24px;height:24px;min-height:24px;margin:0;accent-color:#078f58}.page#region4 .nextpm-box{margin-bottom:10px}.page#region4 .fields{margin-top:12px}.page#region4 .panel-title .filter{display:flex;align-items:center;gap:10px}.page#region4 .panel-title .filter select{margin:0;min-width:180px}@media(max-width:700px){.page#region4 .panel-title{align-items:flex-start;flex-direction:column}.page#region4 .panel-title .filter,.page#region4 .panel-title .filter select{width:100%}.r4-toggle{min-height:58px}}
