/* Maintenance: a quiet operations surface, isolated from the shared theme. */
.maint-screen,
.maint-dialog {
  --maint-ink: #203431;
  --maint-muted: #647571;
  --maint-line: #dce5e1;
  --maint-soft: #f3f7f5;
  --maint-teal: #116b5f;
  --maint-teal-soft: #e4f2ed;
  --maint-danger: #a53b34;
  --maint-danger-soft: #fff0ed;
  --maint-warning: #8c5919;
  --maint-warning-soft: #fff5df;
  color: var(--maint-ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.45;
}

.boomer-ui .maint-screen {
  min-width: 0;
  --teal: var(--maint-teal);
  --teal-weak: var(--maint-teal-soft);
  --muted: var(--maint-muted);
  --line: var(--maint-line);
  --text: var(--maint-ink);
}

.maint-screen *,
.maint-dialog * { box-sizing: border-box; }

.maint-screen button,
.maint-dialog button { cursor: pointer; }

.maint-screen button:disabled,
.maint-dialog button:disabled { cursor: wait; opacity: .58; }

.boomer-ui .maint-screen :is(button, input, select, textarea, a):focus-visible,
.boomer-ui .maint-dialog :is(button, input, select, textarea, a):focus-visible {
  outline: 3px solid #167868;
  outline-offset: 3px;
}

.maint-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
}

.maint-eyebrow {
  display: block;
  margin: 0 0 7px;
  color: var(--maint-teal);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.boomer-ui .maint-head h1 {
  margin: 0;
  color: var(--maint-ink);
  font-size: clamp(25px, 2.8vw, 34px);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.15;
}

.maint-subtitle {
  max-width: 660px;
  margin: 9px 0 0;
  color: var(--maint-muted);
  font-size: 12px;
  line-height: 1.6;
}

.maint-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.boomer-ui .maint-screen :is(.primary-action, .secondary-action, .ghost-action, .danger-action),
.boomer-ui .maint-dialog :is(.primary-action, .secondary-action, .ghost-action, .danger-action) {
  min-height: 39px;
  padding: 9px 14px;
  border: 1px solid var(--maint-line);
  border-radius: 5px;
  box-shadow: none;
  color: var(--maint-ink);
  background: #fff;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.boomer-ui .maint-screen .primary-action,
.boomer-ui .maint-dialog .primary-action {
  border-color: var(--maint-teal);
  color: #fff;
  background: var(--maint-teal);
}

.boomer-ui .maint-screen .secondary-action,
.boomer-ui .maint-dialog .secondary-action {
  border-color: #c5dfd5;
  color: var(--maint-teal);
  background: var(--maint-teal-soft);
}

.boomer-ui .maint-screen .danger-action,
.boomer-ui .maint-dialog .danger-action {
  border-color: #efd1cb;
  color: var(--maint-danger);
  background: var(--maint-danger-soft);
}

.boomer-ui .maint-screen :is(.primary-action, .secondary-action, .ghost-action, .danger-action):hover,
.boomer-ui .maint-dialog :is(.primary-action, .secondary-action, .ghost-action, .danger-action):hover {
  filter: brightness(.96);
}

.maint-overview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 180px;
  padding: 29px 32px;
  overflow: hidden;
  border: 1px solid #174e44;
  border-radius: 7px;
  color: #fff;
  background: #153e36;
}

.maint-overview::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: linear-gradient(#84c3a909 1px, transparent 1px), linear-gradient(90deg, #84c3a909 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

.maint-overview-copy { position: relative; z-index: 1; max-width: 590px; }

.boomer-ui .maint-overview-copy h2 {
  margin: 0 0 11px;
  color: #f4fcf8;
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 550;
  letter-spacing: -.025em;
  line-height: 1.25;
}

.maint-overview-copy p { max-width: 520px; margin: 0; color: #c0d7cd; font-size: 12px; line-height: 1.7; }
.maint-overview .maint-eyebrow { margin-bottom: 13px; color: #8dd2b7; font-size: 9px; }
.maint-overview-art { position: relative; flex: 0 1 290px; width: 290px; min-width: 150px; color: #8fc3af; opacity: .85; }
.maint-overview-art svg { display: block; width: 100%; height: auto; max-height: 148px; }
.maint-overview-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; color: #a9cbbd; font-size: 10px; }
.maint-overview-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.maint-overview-meta strong { color: #e0f2e9; font-weight: 600; }

.maint-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0 26px;
  border: 1px solid var(--maint-line);
  border-radius: 6px;
  background: #fff;
}

.boomer-ui .maint-screen .maint-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  min-height: 105px;
  margin: 0;
  padding: 18px 21px;
  border: 0;
  border-right: 1px solid var(--maint-line);
  border-radius: 0;
  color: var(--maint-ink);
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.boomer-ui .maint-screen .maint-stat:first-child { border-radius: 5px 0 0 5px; }
.boomer-ui .maint-screen .maint-stat:last-child { border-right: 0; border-radius: 0 5px 5px 0; }
.boomer-ui .maint-screen .maint-stat:hover { background: #f6f9f7; }
.boomer-ui .maint-screen .maint-stat.is-active { background: #edf5f1; box-shadow: inset 0 -3px var(--maint-teal); }
.maint-stat > span { font-size: 11px; font-weight: 600; }
.maint-stat strong { color: var(--maint-ink); font-size: 28px; font-weight: 550; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.maint-stat small { color: var(--maint-muted); font-size: 10px; font-weight: 400; line-height: 1.45; }
.maint-stat[data-tone="danger"] strong { color: var(--maint-danger); }
.maint-stat[data-tone="warning"] strong { color: var(--maint-warning); }
.maint-stat[data-tone="teal"] strong { color: var(--maint-teal); }
.boomer-ui .maint-screen .maint-stat[data-tone="danger"].is-active { background: var(--maint-danger-soft); box-shadow: inset 0 -3px var(--maint-danger); }
.boomer-ui .maint-screen .maint-stat[data-tone="warning"].is-active { background: var(--maint-warning-soft); box-shadow: inset 0 -3px var(--maint-warning); }

.maint-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 22px; }
.maint-main { min-width: 0; }
.boomer-ui .maint-screen .maint-panel { min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--maint-line); border-radius: 6px; background: #fff; box-shadow: none; }
.maint-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 0 19px; border-bottom: 1px solid var(--maint-line); }
.maint-tabs { display: flex; align-self: stretch; align-items: stretch; gap: 22px; }
.boomer-ui .maint-screen .maint-tabs button { position: relative; min-height: 54px; padding: 0 1px; border: 0; border-radius: 0; color: var(--maint-muted); background: transparent; box-shadow: none; font-size: 12px; font-weight: 600; white-space: nowrap; }
.boomer-ui .maint-screen .maint-tabs button:hover { color: var(--maint-teal); }
.boomer-ui .maint-screen .maint-tabs button.is-active { color: var(--maint-teal); box-shadow: inset 0 -2px var(--maint-teal); }
.maint-tabs button span { margin-left: 5px; color: var(--maint-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.maint-toolbar > small { color: var(--maint-muted); font-size: 10px; }
.maint-filters { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--maint-line); }
.maint-search { position: relative; display: flex; align-items: center; flex: 1; min-width: 110px; }
.maint-search > svg { position: absolute; left: 11px; width: 15px; height: 15px; color: #768b82; pointer-events: none; }
.boomer-ui .maint-screen .maint-search input,
.boomer-ui .maint-screen .maint-filters select { width: 100%; min-width: 0; min-height: 36px; padding: 8px 10px; border: 1px solid var(--maint-line); border-radius: 4px; color: var(--maint-ink); background: #fff; box-shadow: none; font: inherit; font-size: 11px; }
.boomer-ui .maint-screen .maint-search:has(> svg) input { padding-left: 34px; }
.boomer-ui .maint-screen .maint-filters select { flex: 0 1 165px; width: 165px; padding-right: 26px; }
.maint-search input::placeholder { color: #78877f; }

.maint-table-wrap { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.boomer-ui .maint-screen .maint-table { width: 100%; min-width: 690px; margin: 0; border: 0; border-collapse: collapse; font-size: 12px; }
.boomer-ui .maint-screen .maint-table thead { color: var(--maint-muted); background: #f7faf8; }
.boomer-ui .maint-screen .maint-table th { padding: 11px 15px; border-bottom: 1px solid var(--maint-line); color: var(--maint-muted); font-size: 9px; font-weight: 650; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.boomer-ui .maint-screen .maint-table td { padding: 17px 15px; border-bottom: 1px solid #edf1ef; vertical-align: middle; color: var(--maint-ink); }
.boomer-ui .maint-screen .maint-table th:first-child,
.boomer-ui .maint-screen .maint-table td:first-child { padding-left: 20px; }
.boomer-ui .maint-screen .maint-table th:last-child,
.boomer-ui .maint-screen .maint-table td:last-child { padding-right: 20px; text-align: right; }
.boomer-ui .maint-screen .maint-table tbody tr:last-child td { border-bottom: 0; }
.boomer-ui .maint-screen .maint-table tbody tr:hover { background: #f6faf7; }
.maint-table td > strong { display: block; max-width: 260px; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.maint-table td small { display: block; margin-top: 5px; color: var(--maint-muted); font-size: 10px; line-height: 1.5; }
.maint-plate { display: inline-block; color: var(--maint-ink); font-size: 12px; font-weight: 700; letter-spacing: .025em; white-space: nowrap; }
.boomer-ui .maint-screen button.maint-plate { padding: 0; border: 0; border-bottom: 1px dotted #a2b9af; border-radius: 0; background: transparent; box-shadow: none; }
.maint-category { display: inline-block; margin-top: 5px; color: var(--maint-muted); font-size: 10px; }
.maint-badge { display: inline-flex; align-items: center; gap: 5px; width: max-content; max-width: 100%; padding: 4px 7px; border: 1px solid #dce5e1; border-radius: 4px; color: #596c62; background: #f1f5f2; font-size: 10px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.maint-badge[data-tone="danger"] { border-color: #f0d8d2; color: var(--maint-danger); background: var(--maint-danger-soft); }
.maint-badge[data-tone="warning"] { border-color: #efdfba; color: var(--maint-warning); background: var(--maint-warning-soft); }
.maint-badge[data-tone="teal"] { border-color: #c8e2d7; color: var(--maint-teal); background: var(--maint-teal-soft); }
.maint-date { display: block; font-size: 12px; font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; }
.maint-date[data-tone="danger"] { color: var(--maint-danger); }
.maint-date[data-tone="warning"] { color: var(--maint-warning); }
.maint-muted { color: var(--maint-muted); }
.boomer-ui .maint-screen .maint-table td :is(.ghost-action, .secondary-action) { min-height: 31px; padding: 6px 9px; font-size: 10px; white-space: nowrap; }

.maint-empty { display: flex; flex-direction: column; align-items: center; padding: 53px 25px 57px; text-align: center; }
.maint-empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 17px; border: 1px solid #d1e3d9; border-radius: 13px; color: var(--maint-teal); background: #eef7f1; }
.maint-empty-icon svg { width: 24px; height: 24px; }
.boomer-ui .maint-screen .maint-empty h3 { margin: 0 0 9px; color: var(--maint-ink); font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.maint-empty p { max-width: 420px; margin: 0; color: var(--maint-muted); font-size: 12px; line-height: 1.75; }
.maint-empty > button { margin-top: 22px; }

.maint-sidebar { display: grid; gap: 18px; min-width: 0; }
.maint-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 17px 18px; border-bottom: 1px solid var(--maint-line); }
.boomer-ui .maint-panel-head h2 { margin: 0; color: var(--maint-ink); font-size: 13px; font-weight: 650; letter-spacing: -.01em; }
.maint-panel-head small { flex-shrink: 0; color: var(--maint-muted); font-size: 10px; }
.maint-vehicle-list { display: grid; padding: 4px 0; }
.boomer-ui .maint-screen .maint-vehicle { display: block; width: 100%; margin: 0; padding: 15px 18px; border: 0; border-bottom: 1px solid #edf2ee; border-radius: 0; color: var(--maint-ink); background: #fff; box-shadow: none; text-align: left; }
.boomer-ui .maint-screen .maint-vehicle:last-child { border-bottom: 0; }
.boomer-ui .maint-screen .maint-vehicle:hover { background: #f6faf7; }
.boomer-ui .maint-screen .maint-vehicle.is-active { background: #edf5f0; box-shadow: inset 3px 0 var(--maint-teal); }
.maint-vehicle-top { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.maint-vehicle-top strong { font-size: 12px; font-weight: 650; letter-spacing: .02em; }
.maint-vehicle-top .maint-badge { font-size: 9px; }
.maint-vehicle-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; color: var(--maint-muted); font-size: 10px; line-height: 1.5; }
.maint-vehicle-bottom > span:last-child { font-variant-numeric: tabular-nums; }
.boomer-ui .maint-screen .maint-help { padding: 20px 18px; background: #f6f8f5; }
.maint-help .maint-panel-head { margin: -3px 0 13px; padding: 0; border: 0; }
.maint-help p { margin: 0 0 12px; color: var(--maint-muted); font-size: 11px; line-height: 1.75; }
.maint-help p:last-child { margin-bottom: 0; }
.maint-help ol { display: grid; gap: 12px; margin: 14px 0 0; padding-left: 18px; }
.maint-help li { padding-left: 3px; color: var(--maint-muted); font-size: 11px; line-height: 1.65; }
.maint-help li::marker { color: var(--maint-teal); font-weight: 650; }
.maint-help li strong { color: var(--maint-ink); font-weight: 600; }
.maint-error,
.maint-message { margin: 0 0 17px; padding: 12px 15px; border: 1px solid #c7dfd4; border-radius: 5px; color: var(--maint-teal); background: #eef7f1; font-size: 12px; line-height: 1.6; }
.maint-error { border-color: #ebd2ca; color: var(--maint-danger); background: var(--maint-danger-soft); }
.maint-error[hidden],
.maint-message[hidden] { display: none; }

.boomer-ui .maint-dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  overflow-y: auto;
  border: 1px solid #cadad1;
  border-radius: 9px;
  color: var(--maint-ink);
  background: #fff;
  box-shadow: 0 24px 80px #102b3433;
}

.maint-dialog::backdrop { background: #102b345c; backdrop-filter: blur(3px); }
.maint-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 25px; border-bottom: 1px solid var(--maint-line); }
.boomer-ui .maint-dialog-head h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.025em; }
.boomer-ui .maint-dialog-head > button { display: grid; place-items: center; width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 0; border: 1px solid var(--maint-line); border-radius: 4px; color: var(--maint-muted); background: #fff; box-shadow: none; font-size: 20px; line-height: 1; }
.maint-form { margin: 0; padding: 23px 25px 25px; }
.maint-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.maint-form-grid + .maint-form-grid { margin-top: 18px; }
.maint-dialog [hidden] { display: none !important; }
.maint-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 17px 18px; }
.maint-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; color: var(--maint-ink); font-size: 11px; font-weight: 600; }
.maint-field-wide { grid-column: 1 / -1; }
.boomer-ui .maint-dialog .maint-field :is(input, select, textarea) { width: 100%; max-width: 100%; min-width: 0; min-height: 40px; padding: 10px 11px; border: 1px solid #cddbd3; border-radius: 4px; color: var(--maint-ink); background: #fff; box-shadow: none; font: inherit; font-size: 12px; font-weight: 400; line-height: 1.45; }
.boomer-ui .maint-dialog .maint-field textarea { min-height: 82px; resize: vertical; }
.maint-field input::placeholder,
.maint-field textarea::placeholder { color: #7e8c84; }
.maint-field small { color: var(--maint-muted); font-size: 10px; font-weight: 400; line-height: 1.5; }
.maint-form-note { margin: 20px 0 0; padding: 12px 14px; border-left: 2px solid #b2ccbd; color: var(--maint-muted); background: #f4f8f4; font-size: 11px; line-height: 1.65; }
.maint-form-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 23px; padding-top: 19px; border-top: 1px solid var(--maint-line); }
.maint-form-error { margin: 16px 0 0; color: var(--maint-danger); font-size: 12px; line-height: 1.6; }
.maint-form-error:empty { display: none; }

@media (max-width: 1100px) {
  .maint-workspace { grid-template-columns: minmax(0, 1fr); }
  .maint-sidebar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .maint-overview-art { flex-basis: 225px; }
  .boomer-ui .maint-screen .maint-stat { padding: 17px 16px; }
}

@media (max-width: 700px) {
  .maint-head { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 20px; }
  .maint-actions { width: 100%; flex-wrap: wrap; }
  .maint-actions > button { flex: 1; }
  .maint-overview { min-height: 170px; padding: 24px 22px; }
  .maint-overview-copy { max-width: none; }
  .maint-overview-art { display: none; }
  .maint-overview-copy p { max-width: none; }
  .maint-overview-meta { gap: 7px 14px; }
  .maint-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 20px; }
  .boomer-ui .maint-screen .maint-stat { min-height: 104px; padding: 16px; }
  .boomer-ui .maint-screen .maint-stat:nth-child(2) { border-right: 0; border-radius: 0 5px 0 0; }
  .boomer-ui .maint-screen .maint-stat:nth-child(-n + 2) { border-bottom: 1px solid var(--maint-line); }
  .boomer-ui .maint-screen .maint-stat:first-child { border-radius: 5px 0 0; }
  .boomer-ui .maint-screen .maint-stat:nth-child(3) { border-radius: 0 0 0 5px; }
  .boomer-ui .maint-screen .maint-stat:last-child { border-radius: 0 0 5px; }
  .maint-sidebar { grid-template-columns: minmax(0, 1fr); }
  .maint-toolbar { gap: 0 12px; padding: 0 15px; }
  .maint-tabs { gap: 18px; }
  .maint-toolbar > small { padding: 0 0 12px; }
  .maint-filters { align-items: stretch; flex-direction: column; gap: 9px; padding: 13px 15px; }
  .boomer-ui .maint-screen .maint-filters select { flex-basis: auto; width: 100%; }
  .maint-search { width: 100%; }
  .maint-empty { padding: 40px 20px; }
  .maint-form-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .maint-field-wide { grid-column: auto; }
  .maint-dialog-head { padding: 19px; }
  .maint-form { padding: 20px 19px; }
  .maint-form-actions > button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .maint-screen *,
  .maint-dialog * { scroll-behavior: auto; transition: none; animation: none; }
}
