/* Quickshine DASH v1.6 — Native Routes */

.routes-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.routes-heading h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -.045em;
}

.routes-heading p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--qs-muted);
  font-size: 12px;
}

.routes-heading__actions,
.routes-toolbar__group,
.routes-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.routes-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
  margin-bottom: 17px;
}

.routes-stat {
  border: 1px solid var(--qs-border);
  border-radius: 16px;
  background: #fff;
  padding: 17px;
  box-shadow: var(--qs-shadow);
}

.routes-stat span {
  color: var(--qs-muted);
  font-size: 9px;
  font-weight: 700;
}

.routes-stat strong {
  display: block;
  margin-top: 9px;
  font-size: 27px;
}

.routes-stat small {
  display: block;
  margin-top: 8px;
  color: var(--qs-muted);
  font-size: 8px;
}

.routes-grid {
  display: grid;
  grid-template-columns: minmax(0,1.3fr) minmax(300px,.7fr);
  gap: 17px;
  align-items: start;
}

.routes-column {
  display: grid;
  gap: 17px;
}

.routes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--qs-border);
  padding: 14px 16px;
}

.routes-toolbar select,
.routes-toolbar input,
.routes-notes textarea {
  min-height: 40px;
  border: 1px solid var(--qs-border);
  border-radius: 9px;
  background: #fff;
  padding: 8px 10px;
  font-size: 9px;
}

.routes-list {
  display: grid;
}

.route-stop {
  display: grid;
  grid-template-columns: 44px 95px minmax(0,1fr) 120px 120px auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--qs-border);
  padding: 14px 16px;
}

.route-stop:last-child {
  border-bottom: 0;
}

.route-stop:hover {
  background: var(--qs-primary-soft);
}

.route-stop__number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--qs-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 850;
}

.route-stop__time,
.route-stop__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.route-stop__time strong,
.route-stop__copy strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-stop__time span,
.route-stop__copy span {
  margin-top: 4px;
  color: var(--qs-muted);
  font-size: 7px;
  line-height: 1.4;
}

.route-pill {
  display: inline-flex;
  width: max-content;
  min-height: 23px;
  align-items: center;
  border-radius: 999px;
  background: #edf2f5;
  padding: 0 8px;
  color: #596875;
  font-size: 7px;
  font-weight: 750;
}

.route-pill--ready {
  background: var(--qs-success-soft);
  color: var(--qs-success);
}

.route-pill--blocked {
  background: var(--qs-warning-soft);
  color: var(--qs-warning);
}

.routes-summary {
  display: grid;
}

.routes-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--qs-border);
  padding: 12px 16px;
}

.routes-summary-row:last-child {
  border-bottom: 0;
}

.routes-summary-row span {
  color: var(--qs-muted);
  font-size: 8px;
}

.routes-summary-row strong {
  max-width: 62%;
  font-size: 8px;
  text-align: right;
}

.routes-notes {
  display: grid;
  gap: 10px;
  padding: 15px;
}

.routes-notes textarea {
  min-height: 110px;
  resize: vertical;
}

.routes-empty {
  padding: 48px 20px;
  text-align: center;
}

.routes-empty strong {
  display: block;
  font-size: 13px;
}

.routes-empty p {
  margin: 7px 0 0;
  color: var(--qs-muted);
  font-size: 8px;
}

.route-map-placeholder {
  min-height: 260px;
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(27, 47, 62, .05), rgba(27, 47, 62, .01)),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 18px,
      rgba(27, 47, 62, .03) 18px,
      rgba(27, 47, 62, .03) 19px
    );
  padding: 18px;
}

.route-map-placeholder strong {
  display: block;
  font-size: 12px;
}

.route-map-placeholder p {
  margin: 7px 0 0;
  color: var(--qs-muted);
  font-size: 8px;
  line-height: 1.6;
}

@media (max-width: 1050px) {
  .routes-stats {
    grid-template-columns: repeat(2,1fr);
  }

  .routes-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .routes-heading,
  .routes-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .routes-stats {
    grid-template-columns: 1fr;
  }

  .route-stop {
    grid-template-columns: 42px minmax(0,1fr);
  }

  .route-stop > *:nth-child(n+3) {
    grid-column: 1 / -1;
  }
}
