:root {
  font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;
  color:#17324d;
  background:#f5f7fa;
  font-synthesis:none
}
* {
  box-sizing:border-box
}
body {
  margin:0
}
header {
  background:#17324d;
  color:white;
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:18px 28px
}
header a {
  color:white;
  text-decoration:none;
  font-weight:700
}
main {
  max-width:1440px;
  margin:auto;
  padding:24px
}
h1 {
  font-size:28px;
  margin:0
}
h2 {
  font-size:20px;
  margin:0
}
h3 {
  font-size:16px;
  margin:0
}
p {
  line-height:1.5
}
.heading,.actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap
}
.actions {
  justify-content:flex-end
}
button,input,select,textarea {
  font:inherit
}
button {
  border:1px solid #dbe2ea;
  background:#e8eef4;
  color:#17324d;
  padding:9px 13px;
  border-radius:9px;
  cursor:pointer;
  font-weight:650
}
button:hover {
  background:#d9e5ef
}
.primary {
  background:#2f75b5;
  border-color:#2f75b5;
  color:white
}
.primary:hover {
  background:#246195
}
button:disabled {
  opacity:.55;
  cursor:wait
}
button:focus-visible,a:focus-visible {
  outline:3px solid #4fa2df;
  outline-offset:3px
}
input,select,textarea {
  width:100%;
  border:1px solid #cbd5e1;
  background:white;
  color:#17324d;
  padding:10px;
  border-radius:8px;
  min-width:0
}
label {
  display:grid;
  gap:6px;
  font-size:14px
}
small,.muted {
  color:#66758a;
  font-size:13px
}
.summary {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:18px 0
}
.summary article {
  padding:15px;
  background:white;
  border:1px solid #dbe2ea;
  border-radius:12px
}
.summary strong {
  display:block;
  margin-top:8px;
  font-size:25px
}
.filters {
  display:flex;
  gap:12px;
  margin-bottom:18px
}
.filters label:first-child {
  flex:1
}
.layout {
  display:grid;
  grid-template-columns:minmax(260px,350px) minmax(0,1fr);
  gap:20px;
  align-items:start
}
#vehicleList {
  display:grid;
  gap:10px
}
.vehicle {
  display:grid;
  width:100%;
  text-align:left;
  gap:9px;
  padding:15px;
  background:white;
  border:1px solid #dbe2ea;
  border-radius:12px;
  font-weight:400
}
.vehicle.selected {
  border:2px solid #2f75b5;
  padding:14px;
  background:#edf5fc
}
.vehicle strong {
  font-size:17px
}
.vehicle .row {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px
}
.badge {
  display:inline-block;
  border-radius:999px;
  font-size:12px;
  padding:4px 8px;
  font-weight:650;
  background:#e8eef4;
  white-space:nowrap
}
.available,.completed {
  background:#dcfce7;
  color:#166534
}
.workshop,.in_progress {
  background:#dbeafe;
  color:#1e40af
}
.inactive {
  background:#e5e7eb;
  color:#4b5563
}
.open,.warning {
  background:#fff3cd;
  color:#8a5a00
}
.overdue {
  background:#fee2e2;
  color:#991b1b
}
.panel {
  background:white;
  border:1px solid #dbe2ea;
  border-radius:12px;
  padding:18px;
  margin-bottom:14px
}
.facts {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin:18px 0
}
.facts dt {
  font-size:13px;
  color:#66758a
}
.facts dd {
  margin:4px 0 0;
  overflow-wrap:anywhere
}
.notes {
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.reminders {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px
}
.entry {
  border-top:1px solid #dbe2ea;
  padding:15px 0
}
.entry:last-child {
  padding-bottom:0
}
.entry .heading {
  align-items:start
}
.entry p {
  margin:10px 0
}
.files {
  display:flex;
  gap:8px;
  flex-wrap:wrap
}
.files button {
  font-size:13px;
  overflow-wrap:anywhere;
  max-width:100%;
  white-space:normal
}
.empty {
  padding:24px;
  text-align:center;
  color:#66758a
}
.error {
  color:#b91c1c;
  font-weight:600
}
#message:empty {
  display:none
}
dialog {
  width:min(680px,calc(100% - 24px));
  max-height:90vh;
  border:0;
  border-radius:14px;
  padding:22px;
  color:#17324d;
  box-shadow:0 16px 60px #17324d40
}
dialog::backdrop {
  background:#17324d80
}
.form-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin:20px 0
}
.wide {
  grid-column:1/-1
}
.file-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin:6px 0;
  font-size:13px
}
[hidden] {
  display:none!important
}
.block {
  display: block;
  margin-top: 6px;
  font-weight: 400;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 12px;
}
.tabs [aria-pressed="true"] {
  background: #17324d;
  color: white;
}
.category-filter {
  max-width: 300px;
  margin: 12px 0;
}
.table-scroll {
  overflow-x: auto;
  margin-top: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid #dbe2ea;
}
th {
  background: #edf3f8;
  white-space: nowrap;
}
td {
  min-width: 95px;
}
.entry-items summary {
  cursor: pointer;
  padding-block: 8px;
}
.item-editor {
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
}
.item-editor .form-grid {
  margin-bottom: 0;
}
#lineItemsSection {
  margin-block: 18px;
}
@media(max-width:750px) {
  header {
    padding:15px
  }
  main {
    padding:15px
  }
  .summary {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .layout {
    grid-template-columns:1fr
  }
  .filters {
    flex-wrap:wrap
  }
  .filters label {
    min-width:150px;
    flex:1
  }
  #vehicleList {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .vehicle .row {
    flex-wrap:wrap
  }
  .facts {
    grid-template-columns:1fr 1fr
  }
}
@media(max-width:440px) {
  .form-grid {
    grid-template-columns:1fr
  }
  .wide {
    grid-column:auto
  }
  #vehicleList {
    grid-template-columns:1fr
  }
  .heading .actions {
    width:100%;
    justify-content:flex-start
  }
  .facts {
    grid-template-columns:1fr
  }
  dialog {
    padding:16px
  }
}
