:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #203329;
  background: #f4f6f2;
  font-synthesis: none;
  --green: #206740;
  --muted: #69776c;
  --border: #e0e7de;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
summary {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #5a9774;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.workspace {
  max-width: 1560px;
  margin: auto;
  padding: 20px 28px 32px;
}
.app-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 22px;
  box-shadow: 0 3px 10px #20332904;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 18px;
  white-space: nowrap;
}
.brand-icon {
  display: grid;
  place-items: center;
  background: var(--green);
  color: white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
}
.brand-sub {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
}
.nav-links {
  display: flex;
  gap: 3px;
  margin: auto;
}
.nav-links a {
  padding: 9px 13px;
  font-size: 14px;
  color: #637267;
  border-radius: 9px;
}
.nav-links a:hover {
  background: #f1f5ef;
}
.nav-links a[aria-current] {
  background: #e7f1e4;
  color: #215936;
  font-weight: 700;
}
.preview-tag {
  font-size: 10px;
  letter-spacing: 1px;
  color: #7b857b;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 34px 0 25px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #69806b;
  margin: 0 0 9px;
}
h1 {
  font-size: 34px;
  letter-spacing: -1.2px;
  margin: 0 0 10px;
  font-weight: 650;
}
h2,
h3,
p {
  margin-top: 0;
}
.subtitle {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}
.primary,
.secondary,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 9px;
  padding: 11px 16px;
  border: 1px solid var(--border);
  background: white;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.primary:hover {
  background: #174d2f;
}
.secondary:hover {
  background: #f4f7f2;
}
.text-button {
  border-color: transparent;
  background: transparent;
  color: var(--green);
  padding: 8px;
}
.text-button:hover {
  text-decoration: underline;
}
.danger {
  color: #a64b33;
}
.planning-status {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid #d7e5d2;
  background: #edf4e8;
  border-radius: 13px;
  padding: 17px 20px;
}
.planning-status strong {
  font-size: 14px;
}
.planning-status p {
  font-size: 12px;
  color: #62735e;
  margin: 4px 0 0;
  line-height: 1.5;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #549244;
  flex-shrink: 0;
}
.status-dot.blocked {
  background: #b86928;
}
.status-dot.pending {
  background: #86925e;
  animation: pulse 1.5s infinite;
}
.origin-tag {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.7px;
  padding: 6px 9px;
  background: #fff9;
  border: 1px solid #d9e3d1;
  border-radius: 6px;
  white-space: nowrap;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0;
  list-style: none;
  margin: 23px 0 30px;
  gap: 20px;
}
.steps li {
  display: flex;
  gap: 12px;
  align-items: center;
}
.steps li > span {
  border: 1px solid #d6dfd1;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #537047;
  background: #f9fbf6;
}
.steps strong {
  font-size: 13px;
  font-weight: 650;
}
.steps small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}
.segmented {
  display: flex;
  gap: 3px;
  border-bottom: 1px solid var(--border);
}
.segmented button {
  padding: 12px 14px;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 13px;
}
.segmented button[aria-pressed="true"] {
  color: #244c2e;
  font-weight: 700;
  border-color: #457946;
}
.segmented span {
  margin-left: 6px;
  background: #e4ebde;
  border-radius: 5px;
  padding: 2px 5px;
}
.toolbar-end {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--muted);
}
select,
input {
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: #294030;
  min-width: 0;
}
.dispatch-board {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.route-sidebar {
  display: grid;
  gap: 20px;
}
.route-list {
  display: grid;
  gap: 10px;
}
.route-card {
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 18px;
  width: 100%;
  color: inherit;
}
.route-card.selected {
  border-color: #629259;
  box-shadow: inset 3px 0 #5d8f55;
  background: #fcfff8;
}
.route-card:hover {
  border-color: #72956b;
}
.route-card .card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.route-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
  font-weight: 650;
}
.route-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.5;
}
.route-card footer {
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: #37513b;
}
.route-code {
  font-size: 10px;
  color: #87907f;
  letter-spacing: 1px;
}
.badge {
  font-size: 10px;
  font-weight: 650;
  background: #ecf3e5;
  color: #557543;
  border-radius: 5px;
  padding: 4px 7px;
}
.badge.qa {
  background: #f8edd3;
  color: #846121;
}
.badge.muted {
  background: #f0f1ee;
  color: #777;
}
.demo-box {
  border: 1px dashed #ccd7c6;
  border-radius: 13px;
  padding: 20px;
  background: #eef2e8;
}
.demo-box h3 {
  font-size: 17px;
  margin: 0 0 9px;
}
.demo-box p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 15px;
}
.demo-box .secondary {
  width: 100%;
  background: #fffef7;
}
.demo-box small {
  display: block;
  font-size: 10px;
  color: #7b846e;
  margin-top: 13px;
}
.demo-box .text-button {
  width: 100%;
  margin-top: 8px;
}
.route-detail {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: white;
  min-height: 470px;
}
.detail-header {
  padding: 23px 26px 18px;
  border-bottom: 1px solid #eef1eb;
}
.detail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.detail-header h2 {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin: 0;
}
.detail-header p {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}
.detail-meta {
  display: flex;
  gap: 27px;
  flex-wrap: wrap;
  margin-top: 23px;
}
.detail-meta small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.6px;
  color: #7f8a79;
  margin-bottom: 6px;
}
.detail-meta strong {
  font-size: 17px;
  font-weight: 600;
}
.route-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 205px;
  padding: 22px 26px;
  gap: 24px;
}
.timeline-title {
  font-size: 11px;
  color: #798473;
  letter-spacing: 0.8px;
  font-weight: 650;
  margin: 0 0 18px;
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  column-gap: 12px;
  position: relative;
  padding-bottom: 24px;
  align-items: start;
}
.timeline li:before {
  content: "";
  position: absolute;
  left: 14px;
  top: 26px;
  bottom: 0;
  width: 1px;
  background: #dce5d6;
}
.timeline li:last-child:before {
  display: none;
}
.stop-number {
  position: relative;
  z-index: 1;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf3e7;
  border: 1px solid #d8e2ce;
  color: #557344;
  font-size: 12px;
  font-weight: 650;
}
.base-stop .stop-number {
  background: #365f3b;
  color: white;
  border-color: #365f3b;
  font-size: 10px;
}
.timeline strong {
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin: 4px 0;
}
.timeline p {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 4px;
}
.timeline time {
  font-size: 11px;
  color: #536449;
  padding-top: 7px;
  white-space: nowrap;
}
.stop-load {
  font-size: 10px;
  color: #7c896e;
}
.trip-info {
  background: #f5f7f0;
  padding: 18px;
  border-radius: 10px;
  align-self: start;
}
.trip-info h3 {
  font-size: 12px;
  margin: 0 0 15px;
}
.trip-info dt {
  font-size: 10px;
  color: #7b866f;
  margin-bottom: 5px;
}
.trip-info dd {
  font-size: 12px;
  margin: 0 0 17px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.trip-info .secondary {
  font-size: 11px;
  width: 100%;
  padding: 9px;
}
.capacity-track {
  height: 5px;
  border-radius: 4px;
  background: #e1e8d9;
  margin: 9px 0 6px;
  overflow: hidden;
}
.capacity-track progress {
  appearance: none;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #e1e8d9;
}
.capacity-track progress::-webkit-progress-bar {
  background: #e1e8d9;
}
.capacity-track progress::-webkit-progress-value {
  background: #799c5d;
}
.capacity-track progress::-moz-progress-bar {
  background: #799c5d;
}
.detail-footer {
  border-top: 1px solid #edf0e8;
  padding: 16px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: #fdfefb;
}
.detail-footer p {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 400px;
  margin: 0;
}
.empty-state {
  padding: 75px 35px;
  text-align: center;
  display: grid;
  justify-items: center;
}
.empty-state h2 {
  font-size: 21px;
  font-weight: 550;
}
.empty-state p {
  max-width: 360px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.empty-icon {
  background: #eef3e7;
  border: 1px solid #dfe8d3;
  color: #6d8e58;
  width: 58px;
  height: 58px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 25px;
  margin-bottom: 20px;
}
.empty {
  padding: 23px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 20px;
  overflow: hidden;
}
.panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 19px 22px;
  font-size: 13px;
  font-weight: 600;
}
.panel summary b {
  padding: 3px 7px;
  background: #edf2e6;
  border-radius: 5px;
  font-size: 11px;
  margin-left: 8px;
}
.summary-hint {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.settings-content {
  padding: 0 24px 24px;
  max-width: 820px;
}
#configForm {
  display: grid;
  gap: 15px;
  margin-top: 22px;
}
label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #5f705c;
}
.two,
.three {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}
.three {
  grid-template-columns: repeat(3, 1fr);
}
.toggle {
  display: flex;
  align-items: center;
  gap: 9px;
}
.toggle input {
  width: 18px;
  height: 18px;
}
.missing {
  margin-top: 12px;
  color: #957631;
  font-size: 12px;
}
.pickup-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr auto;
  gap: 15px;
  align-items: center;
  padding: 16px 23px;
  border-top: 1px solid #eef1eb;
  font-size: 12px;
}
.pickup-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.footnote {
  font-size: 11px;
  color: #85907b;
  margin: 20px 0;
}
.message {
  padding: 14px 18px;
  background: #edf5e9;
  border: 1px solid #d6e5ce;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 15px;
}
.message.error {
  background: #fff1e6;
  color: #974c21;
  border-color: #f0dac8;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
@media (prefers-reduced-motion: reduce) {
  .status-dot.pending {
    animation: none;
  }
}
@media (max-width: 1100px) {
  .brand-sub {
    display: none;
  }
  .app-nav {
    gap: 12px;
    padding: 14px;
  }
  .nav-links a {
    padding: 9px;
  }
  .preview-tag {
    display: none;
  }
  .route-body {
    grid-template-columns: 1fr;
  }
  .trip-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .trip-info h3 {
    grid-column: 1/-1;
    margin: 0;
  }
  .trip-info dl {
    margin: 0;
  }
  .dispatch-board {
    grid-template-columns: 270px minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .workspace {
    padding: 12px;
  }
  .app-nav {
    display: block;
    border-radius: 12px;
  }
  .brand {
    font-size: 16px;
  }
  .nav-links {
    overflow-x: auto;
    margin-top: 12px;
    white-space: nowrap;
  }
  .nav-links a {
    font-size: 12px;
    flex-shrink: 0;
  }
  .page-header {
    margin: 25px 0 20px;
    align-items: start;
  }
  .page-header h1 {
    font-size: 27px;
  }
  .page-header .secondary {
    padding: 9px;
    font-size: 11px;
  }
  .subtitle {
    font-size: 12px;
  }
  .planning-status {
    padding: 14px;
    flex-wrap: wrap;
  }
  .planning-status > div {
    flex: 1;
    min-width: 190px;
  }
  .origin-tag {
    margin-left: 22px;
  }
  .steps {
    gap: 8px;
    margin: 20px 0;
  }
  .steps li {
    align-items: start;
    gap: 6px;
  }
  .steps li > span {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    font-size: 10px;
  }
  .steps strong {
    font-size: 11px;
  }
  .steps small {
    font-size: 9px;
    line-height: 1.5;
  }
  .toolbar {
    align-items: start;
    flex-wrap: wrap;
  }
  .toolbar-end {
    width: 100%;
    flex-wrap: wrap;
  }
  .toolbar-end .text-button {
    margin-left: auto;
    font-size: 11px;
  }
  .dispatch-board {
    grid-template-columns: 1fr;
  }
  .route-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .route-card {
    min-width: 235px;
    max-width: 290px;
  }
  .route-sidebar {
    display: contents;
  }
  .route-list {
    order: 0;
  }
  .route-detail {
    order: 1;
    min-height: 350px;
  }
  .demo-box {
    order: 2;
  }
  .detail-header {
    padding: 20px;
  }
  .detail-header h2 {
    font-size: 21px;
  }
  .route-body {
    padding: 20px;
  }
  .detail-meta {
    gap: 20px;
  }
  .detail-meta strong {
    font-size: 16px;
  }
  .detail-footer {
    padding: 16px 20px;
    align-items: start;
    flex-direction: column;
  }
  .timeline li {
    column-gap: 9px;
  }
  .timeline time {
    font-size: 10px;
  }
  .panel summary {
    padding: 17px;
  }
  .summary-hint {
    font-size: 10px;
  }
  .pickup-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 15px 17px;
  }
  .two,
  .three {
    grid-template-columns: 1fr;
  }
  .settings-content {
    padding: 0 17px 17px;
  }
}

.section-heading { padding: 22px 23px 8px; }
.section-heading h2 { font-size: 18px; margin-bottom: 8px; }
.section-heading p, .settings-content > p { font-size: 12px; line-height: 1.6; color: var(--muted); }
#savingsProposals > p { padding: 12px 23px; font-size: 13px; color: var(--muted); }
.savings-panel .pickup-row { grid-template-columns: minmax(0, 1fr) auto; }
.savings-panel .pickup-row p { margin: 6px 0; }
.savings-panel .pickup-row > span { max-width: 230px; line-height: 1.6; }
#reminderRules { display: grid; gap: 16px; margin-top: 20px; }
#reminderRules > button { justify-self: start; }
#reminderResult { margin: 0; font-size: 12px; }
@media (max-width: 760px) {
  .savings-panel .pickup-row { grid-template-columns: 1fr; }
  .savings-panel .pickup-row > button { justify-self: start; }
  .section-heading { padding: 18px 17px 6px; }
}

.stop-record { display:inline-block; color:var(--green); font-size:12px; font-weight:650; padding:8px 0; text-decoration:underline; }

.journey-body{padding:24px}.journey-segment+.journey-segment{border-top:1px solid #d8e2df;padding-top:20px}.attention-panel{padding:24px;margin:24px 0}.attention-card{display:flex;gap:24px;justify-content:space-between;align-items:center;border-top:1px solid #e1ddd3;padding:18px 0}.attention-card h3{margin:0}.attention-card ul{padding-left:20px;font-size:14px;color:#596966}.route-card progress{width:100%;accent-color:#0b514b}.settings-content fieldset{display:flex;gap:14px;flex-wrap:wrap;margin:16px 0}.settings-content fieldset label{display:flex;align-items:center;gap:4px}.settings-content fieldset input{width:auto}#resourceForm{max-width:720px;padding:20px 0;border-bottom:1px solid #ddd;margin-bottom:25px}#routeDate{padding:10px;border:1px solid #d4dfda;border-radius:8px;background:white}@media(max-width:700px){.attention-card{align-items:stretch;flex-direction:column}.journey-body{padding:16px}.toolbar-end{flex-wrap:wrap}}

.saved-resource { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px; margin: 12px 0; background: #f3f7ef; border-radius: 10px; }
.saved-resource p { margin: 0; font-size: 13px; line-height: 1.6; }
.base-settings { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--border); }
.base-settings summary { padding: 12px 0; }
#resourceForm { display: grid; gap: 14px; }
#resourceForm fieldset { display: flex; flex-wrap: wrap; gap: 12px; border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
#resourceForm fieldset label { display: flex; align-items: center; gap: 5px; }
#resourceForm fieldset legend { font-size: 12px; color: var(--muted); }
#savingsProposals .pickup-row { grid-template-columns: minmax(0, 1fr) auto; }
#savingsProposals .empty { margin: 0 20px 20px; }
.qa-settings small { display: block; margin-top: 12px; color: var(--muted); }
@media (max-width: 650px) { #savingsProposals .pickup-row { grid-template-columns: 1fr; } .toolbar-end { flex-wrap: wrap; } .saved-resource { align-items: start; } }
/* Keep the return selector aligned and easy to tap on phones. */
#taskForm label:has(input[type=checkbox]) { display:flex; align-items:center; gap:10px; padding:12px 0; }
#taskForm input[type=checkbox] { width:22px; height:22px; flex:0 0 22px; margin:0; }
#taskForm { padding:0 20px 20px; }
#taskResult { margin-top:12px; line-height:1.6; }
