/* 1.12.2: information-dense but legible fleet workspace. Touch hit areas remain large. */
:root{--stripe:#f7f9fc;--table-border:#dbe3ed}
main{max-width:1650px;padding:10px 13px 34px}
#app>nav{margin:6px 0 9px;padding:4px 0;gap:3px}
#app>nav button{padding:7px 9px;min-height:34px;font-size:12px}
.panel{padding:11px 13px;border-radius:11px}
.panel h2{font-size:19px;margin:0 0 7px}
.panel h3{margin:10px 0 5px;font-size:15px}
.heading{margin-bottom:5px}
.panel .muted{line-height:1.3}
.panel>p.muted{margin:3px 0 7px}
.stats{gap:5px;margin-bottom:5px;grid-template-columns:repeat(auto-fit,minmax(132px,1fr))}
.stat{padding:7px 10px;border-radius:9px}.stat strong{font-size:22px;line-height:1.1}.stat .muted{font-size:11px}
.actions{margin:5px 0;gap:4px}
.grid{gap:6px}
input,select,textarea{padding:6px 9px;margin:3px 0 6px;border-radius:7px}
label{font-size:12px}
button{padding:6px 9px;min-height:33px;border-radius:7px;font-size:12px}
.badge{font-size:10px;padding:2px 6px}
.fleet-card{padding:8px;gap:5px 9px;border-radius:10px}
.fleet-avatar{width:56px;height:56px}
.fleet-card{grid-template-columns:56px minmax(0,1fr)}
.fleet-body h3,.vehicle-link{font-size:14px}.fleet-meta,.fleet-maintenance{font-size:11px}
.fleet-status{margin:3px 0 1px}.fleet-actions button{min-height:31px;padding:5px 7px;font-size:11px}
#vehicles{gap:6px;margin-top:6px}
/* Use inset borders and subtle zebra rows: fast scanning without excessive panels. */
#inspectionsList,#hist,#repairsList,#trashList,#allDeadlines,#controlList,#documentsList,#auditList,#counterpartyList{border:1px solid var(--table-border);border-radius:9px;overflow:hidden}
#inspectionsList>.row,#hist>.row,#repairsList>.row,#trashList>.row,#controlList>.row,#allDeadlines>.reminder-row{padding:7px 10px;margin:0;border:0;border-bottom:1px solid var(--table-border);gap:8px}
#inspectionsList>.row:nth-child(even),#hist>.row:nth-child(even),#repairsList>.row:nth-child(even),#trashList>.row:nth-child(even),#controlList>.row:nth-child(even),#allDeadlines>.reminder-row:nth-child(even){background:var(--stripe)}
#inspectionsList>.row:last-child,#hist>.row:last-child,#repairsList>.row:last-child,#trashList>.row:last-child,#controlList>.row:last-child,#allDeadlines>.reminder-row:last-child{border-bottom:0}
.row h3{font-size:14px;margin:0 0 2px}.row .muted{font-size:11px}
.row p{margin:3px 0}.row .actions{margin:3px 0}
.cost-box{padding:8px;border-radius:9px}.cost-dashboard-grid{gap:7px;margin:7px 0 10px}.cost-filters{gap:6px;margin:4px 0 7px}
.cost-journal-row,.cost-vehicle-row{padding:6px 8px}.cost-vehicle-row:nth-child(even),.cost-journal-row:nth-child(even){background:var(--stripe)}
.ops-counters{margin:7px 0;gap:6px}.ops-stat{padding:8px;border-radius:8px}.ops-stat b{font-size:19px}.ops-columns{gap:8px}.ops-columns section{padding:9px}.ops-item{padding:6px 9px}.ops-item:nth-child(even){background:var(--stripe)}
.ops-list{border-radius:9px;margin-top:7px}.ops-form{padding:7px 10px;margin:6px 0}
.reminder-row{padding:5px 6px;min-height:38px}
/* Defect desk: grouped by vehicle, with accessible accordion and optional chronological view. */
.defect-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.defect-heading h2{margin:0}.defect-heading p{margin:2px 0 0}
.defect-toolbar{display:grid;grid-template-columns:minmax(145px,.8fr) minmax(230px,2fr) minmax(150px,.8fr);gap:8px;align-items:end}
.defect-toolbar label{font-size:11px;font-weight:650;color:#53667b}
.defect-toolbar input,.defect-toolbar select{margin:2px 0 5px}
.defect-summary{font-size:11px;margin:1px 0 6px!important}
.defect-groups,.defect-list{border:1px solid #cedae6;border-radius:9px;overflow:hidden}
.defect-group{border-bottom:1px solid #d7e1ec;margin:0;background:#fff}
.defect-group:nth-child(even){background:#f5f8fc}
.defect-group:last-child{border-bottom:none}
.defect-group summary{list-style:none;display:flex;align-items:center;gap:9px;cursor:pointer;padding:8px 10px;min-height:40px;color:#1d344c}
.defect-group summary::-webkit-details-marker{display:none}
.defect-group summary:hover{background:#eaf2f9}
.defect-group summary:focus-visible{outline:2px solid #36719e;outline-offset:-2px}
.defect-group-critical>summary{border-left:3px solid #c14c52;padding-left:7px}
.defect-chevron{font-size:21px;line-height:1;color:#647f98;display:inline-block;transition:transform .15s;min-width:12px;text-align:center}
.defect-group[open] .defect-chevron{transform:rotate(90deg)}
.defect-vehicle{font-size:13px;min-width:160px;max-width:35%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.defect-preview{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:#637b93;flex:1}
.defect-all{font-size:11px;color:#75869a;white-space:nowrap}
.defect-group-content{border-top:1px solid #dfe7f0;background:#fff;padding:0 10px 6px}
.defect-group-toolbar{padding:6px 0;display:flex;align-items:center;gap:10px}
.defect-group-toolbar button{min-height:29px;font-size:11px}
.defect-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 6px;border-bottom:1px solid #e0e7ef}
.defect-item:nth-child(odd){background:#f9fbfd}
.defect-item:last-child{border-bottom:0}
.defect-info{flex:1;min-width:0}.defect-text{font-size:13px;line-height:1.35;overflow-wrap:anywhere;white-space:pre-wrap;font-weight:580}.defect-meta{font-size:11px;color:#71839a;margin-top:3px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.defect-actions,.defect-item-actions{display:flex;gap:4px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.defect-actions button{min-height:31px;padding:5px 8px;font-size:11px}
.defect-critical{border-left:3px solid #cc5259;padding-left:4px}
.defect-date-row{padding:6px 9px;border-bottom:1px solid #dbe3ed}.defect-date-row:last-child{border:0}.defect-date-row:nth-child(even){background:var(--stripe)}
.defect-date-car{font-weight:700;font-size:12px;color:#284b6c}
@media(max-width:900px){.defect-vehicle{min-width:110px}.defect-all{display:none}.defect-toolbar{grid-template-columns:1fr 1fr}.defect-toolbar label:nth-child(2){grid-column:1/-1;grid-row:2}}
@media(max-width:700px){main{padding:7px 8px 24px}.panel{padding:9px 10px}.stat{padding:7px}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}#app>nav button{min-height:42px;padding:8px 10px}.fleet-card{grid-template-columns:51px minmax(0,1fr);padding:7px}.fleet-avatar{height:51px;width:51px}.fleet-actions button{min-height:43px}.defect-toolbar{grid-template-columns:1fr 1fr;gap:5px}.defect-toolbar label:nth-child(2){grid-column:1/-1;grid-row:2}.defect-toolbar select,.defect-toolbar input{min-height:42px;font-size:14px}.defect-vehicle{min-width:0;max-width:58%;font-size:12px}.defect-preview{display:none}.defect-group summary{min-height:48px;padding:7px 8px}.defect-item{flex-direction:column;align-items:stretch;gap:5px}.defect-actions{justify-content:flex-start}.defect-actions button,.defect-group-toolbar button{min-height:42px;font-size:12px}.defect-group-content{padding:0 6px 5px}.defect-group-toolbar .muted{display:none}.defect-meta{font-size:10px}}
@media(pointer:coarse){button{min-height:42px}.defect-actions button,.defect-group-toolbar button{min-height:42px}}
