:root {
  color-scheme: dark;
  --ink: #e8eef8;
  --muted: #9aa9bd;
  --nav: #050b15;
  --blue: #72a3ff;
  --sky: #172a4b;
  --coral: #ff7d73;
  --amber: #efb24a;
  --green: #38c99a;
  --line: #27364c;
  --paper: #111c2d;
  --wash: #08111f;
}

body {
  background: radial-gradient(circle at 80% 0, #132541 0, var(--wash) 36%);
  color: var(--ink);
}

.sidebar {
  background: #050b15;
  border-right: 1px solid #1c2a3e;
}

.nav-item:hover,
.nav-item.active {
  background: #17253a;
}

.profile {
  border-color: #25354b;
}

.avatar,
.scan-avatar,
.person-avatar,
.activity-icon {
  background: #1a3155;
  color: #9fc0ff;
}

.panel,
.stat,
.route-card,
.person-card,
.downed-card,
.resource-grid > section {
  background: linear-gradient(145deg, #121e30, #0e1828);
  border-color: var(--line);
  box-shadow: 0 10px 30px #02071133;
}

.status-strip {
  background: #102a25;
  border-color: #1d4d40;
  color: #8bcab5;
}

.status-strip strong {
  color: #a6e2ce;
}

.status-strip time {
  color: #80b4a3;
}

.icon-btn,
.issue button,
.filter,
.edit-route-card,
.dialog-actions button,
.install-app,
.address-result,
.builder-buttons button,
.directions-head button {
  background: #152238;
  border-color: #31435d;
  color: #d9e4f4;
}

.primary,
.dialog-actions .primary {
  background: #356fd8;
  color: #fff;
}

.primary:hover {
  background: #477fe4;
}

.install-app:hover {
  background: #1b3153;
}

.text-btn,
.route-id,
.route-detail-link,
.person-route-button,
.person-assign-button,
.downed-card button {
  color: #83adff;
}

.pill {
  background: #1d2a3d;
  color: #b4c1d3;
}

.issue,
td,
th,
.scan,
.activity-item,
.queue-item,
.resource-item,
.route-card dl div {
  border-color: #25344a;
}

.issue-icon {
  background: #402321;
}

.amber-bg {
  background: #3a2b13;
}

.blue-bg {
  background: #182e50;
}

.filter.active {
  background: #315fba;
}

.progress {
  background: #243247;
}

.tag.good,
.queue-status.sent,
.person-status.assigned {
  background: #123a30;
  color: #65d9b3;
}

.tag.warn,
.queue-status.sending,
.person-status.unassigned {
  background: #3a2a12;
  color: #f4c46d;
}

.section-intro > p:last-child,
.panel-note,
.route-toolbar span,
.quiet,
.scan p,
.scan time,
.activity-item p,
.activity-item time,
.queue-item small,
.resource-item span,
.person-route span,
.person-route small,
.maintenance-notes,
.maintenance-meta,
.field-help {
  color: var(--muted);
}

.queue-item p {
  color: #c3cede;
}

.route-big {
  background: #18315a;
  color: #9abaff;
}

.person-route,
.filter-empty,
.impact {
  background: #0c1727;
}

.impact {
  color: #b3c2d8;
  border: 1px solid #263a58;
}

.fleet-summary span,
.all-available {
  background: #103229;
  color: #75d5b5;
}

.fleet-summary .down-summary {
  background: #3a211f;
  color: #ff9d95;
}

.maintenance-status.needs {
  background: #402421;
  color: #ff9a91;
}

.maintenance-status.shop {
  background: #142d4d;
  color: #91bcff;
}

.maintenance-status.parts {
  background: #3b2b13;
  color: #f3c36a;
}

input,
select,
textarea,
.compose select,
.compose textarea,
dialog select,
.form-grid input,
.form-grid textarea,
.resource-add input,
.directory-add input,
.builder-fields input,
.builder-fields select,
.builder-fields textarea {
  background: #0b1524;
  border-color: #33455f;
  color: #e8eef8;
}

input::placeholder,
textarea::placeholder {
  color: #718198;
}

select option,
select optgroup {
  background: #0b1524;
  color: #e8eef8;
}

dialog,
dialog form {
  background: #0e1929;
  color: var(--ink);
}

dialog {
  border: 1px solid #30415a;
}

dialog::backdrop {
  background: #01050bc7;
}

.address-search,
.student-lookup,
.school-lookup,
.builder-stop,
.route-detail-summary span {
  background: #0c192a;
  border-color: #2a3d57;
}

/* The route viewer loads builder.css on demand after this stylesheet. Keep its
   summary modules on the Hub's dark surface regardless of stylesheet order. */
.route-detail-dialog .route-detail-summary span {
  background: linear-gradient(145deg, #132238, #0c1727);
  border: 1px solid #2a3d57;
  color: #e8eef8;
  box-shadow: inset 0 1px 0 #ffffff0a;
}

.route-detail-dialog .route-detail-summary small {
  color: #9aa9bd;
}

.builder-warning,
.route-detail-warning {
  background: #352811;
  color: #f0c878;
  border: 1px solid #59451d;
}

.address-search .address-help,
.student-lookup .address-help,
.school-lookup .address-help,
.directions-panel small,
.route-detail-grid li span,
.route-detail-grid li small {
  color: var(--muted);
}

.builder-layout #builder-errors {
  color: #ff8b82;
}

.map,
.leaflet-container {
  background: #09111d;
}

.leaflet-tile-pane {
  filter: brightness(.7) invert(1) contrast(1.18) hue-rotate(180deg) saturate(.45);
}

.leaflet-control-zoom a,
.leaflet-control-attribution,
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #111c2d;
  color: #dce6f5;
}

.leaflet-control-zoom a {
  border-color: #314159;
}

.map-legend {
  background: #0b1524eb;
  color: #c8d3e2;
  border: 1px solid #2b3a50;
}

.school {
  background: #111c2d;
  border-color: #34445a;
  color: #c9d4e3;
}

.route-marker,
.barn-marker,
.bus {
  border-color: #dbe7f7;
}

.toast {
  background: #1a2940;
  border: 1px solid #3b4e6a;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #08111f;
}

::-webkit-scrollbar-thumb {
  background: #31425a;
  border-radius: 999px;
}

.sped-resource em,
.table-sped {
  color: #ddd6fe;
  background: #4c1d95;
}

.sped-resource small,
.route-bus-equipment,
.downed-equipment {
  color: #c4b5fd;
}

.route-bus-equipment {
  background: #241a40;
}

.delete-route-card {
  background: #321d22;
  border-color: #69323a;
  color: #ffaaa3;
}

.open-route-row:hover td,
.open-route-row:focus-visible td {
  background: #17263b;
}

.route-reorder-controls button {
  background: #241a40;
  border-color: #5b35a5;
  color: #ddd6fe;
}

.route-marker.changed {
  background: var(--blue);
}

.hub-session-card {
  background: #0c1727;
  border-color: #27364c;
}

.tablet-setup select,
.scanner-panel select {
  background: #0b1524;
  border-color: #33455f;
  color: #e8eef8;
}
.planner-draft-card{background:#0c1727;border-color:#354f70}.planner-draft-card p{color:#a9bfd7}.planner-draft-card a{color:#9dccff}
.planner-draft-card blockquote{background:#332713;color:#ffd98c}.planner-draft-actions button,.planner-draft-actions a{background:#142237;border-color:#466486;color:#9dccff}.planner-draft-actions .delete-draft{color:#ffaaa3;border-color:#69323a}.review-summary span,.review-check{background:#0c1727}.review-check.pass{background:#102a25;color:#65d9b3}.review-check.fail{background:#3a211f;color:#ffaaa3}.review-note textarea{background:#0b1524;color:#eef4ff;border-color:#526780}.review-return{background:#3a2a12;color:#ffd583;border-color:#6a4a18}
.route-run-toggle button{background:#101d30;border-color:#35465e;color:#b9cae0}.route-run-toggle button.active{background:#235eaa;border-color:#75aff6;color:#fff}.route-detail-tiers article{background:#0b1728;border-color:#35465e}.route-detail-tiers strong{color:#f4f8ff}.route-detail-tiers span{color:#a9bfd7}.route-detail-dialog .tier-school-stop{background:#10243d;border-left-color:#5ea4ff}
.route-evacuation-panel{background:#0b1728;border-color:#35465e}.route-detail-evacuations article{background:#101d30;border-color:#35465e}.route-detail-evacuations span,.route-evac-empty{color:#a9bfd7}.route-evac-empty{border-color:#35465e}.evac-status{background:#3b2c13;color:#ffd583}.evac-status.ready{background:#12392d;color:#70e3b1}
