.route-page {
  display: flex;
  height: calc(100dvh - 40px);
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.route-page > .page-header,
.route-page > .message {
  flex: 0 0 auto;
}

.route-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.planning-status {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.import-panel {
  display: grid;
  gap: 16px;
  margin: 0;
}

.upload-area {
  display: flex;
  width: 40vw;
  height: 40vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  border: 2px dashed var(--border);
  border-radius: var(--border-radius);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.upload-area h2,
.upload-area p {
  margin: 0 0 6px;
}

.upload-area small {
  display: block;
  color: var(--text-muted);
}

.upload-area.dragging {
  background: var(--surface-hover);
  border-color: var(--primary);
}

.upload-area[data-upload-state="uploading"] {
  border-color: var(--primary);
}

.upload-label {
  display: inline-block;
  margin: 4px 0 8px;
  padding: 8px 14px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  background: var(--primary);
  border-radius: var(--border-radius);
}

.upload-status {
  min-height: 1.25em;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.upload-queue {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.upload-queue-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 8px;
  font-size: 0.8rem;
  background: var(--surface-light);
  border-radius: var(--border-radius);
}

.upload-queue-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-queue-state {
  flex-shrink: 0;
  color: var(--text-muted);
}

.upload-queue-complete .upload-queue-state {
  color: #4ade80;
}

.upload-queue-failed .upload-queue-state {
  max-width: 55%;
  color: #fca5a5;
  overflow-wrap: anywhere;
  white-space: normal;
}

.route-toolbar,
.jobs-panel,
.planned-route-panel {
  margin-bottom: 0;
}

.mobile-route-panel {
  display: none;
}

.route-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 1fr);
  gap: 1rem;
  flex: 1;
  min-height: 0;
}

.route-main-column {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

.unassigned-column {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.route-toolbar,
.date-form {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

.route-toolbar {
  min-width: 0;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
  gap: 8px;
  padding: 10px;
}

.route-toolbar .date-form {
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0;
}

.route-toolbar .form-field {
  min-width: 0;
}

.route-toolbar .form-field:first-child {
  flex: 1 1 0;
}

.route-toolbar .form-field:nth-child(2) {
  flex: 1 1 0;
}

.route-toolbar input,
.route-toolbar select {
  width: 100%;
  min-width: 0;
}

.planning-action-menu {
  align-self: center;
  margin-left: 0;
}

.route-modal {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: fit-content;
  height: fit-content;
  max-width: 60vw;
  max-height: 60vh;
  margin: auto;
  padding: 0;
  overflow: auto;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  box-shadow: 0 24px 80px rgb(0 0 0 / 45%);
}

.route-modal::backdrop {
  background: rgb(0 0 0 / 65%);
  backdrop-filter: blur(2px);
}

.route-modal-shell {
  display: flex;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  align-items: stretch;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0;
}

.route-modal-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.route-modal-header h2,
.route-modal-header p {
  margin: 0;
}

.route-modal-header p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.route-modal-close {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
}

.route-modal-body {
  flex: 1 1 auto;
  max-width: 100%;
  min-height: 0;
  padding: 20px;
  overflow: visible;
}

.create-route-modal-body {
  display: grid;
  align-content: start;
  gap: 10px;
}

.send-emails-modal-body {
  display: grid;
  align-content: start;
  gap: 14px;
}

.send-emails-modal-body p {
  margin: 0;
}

#send-emails-summary {
  color: var(--text-muted);
  line-height: 1.5;
}

.send-emails-confirmation {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.send-emails-confirmation input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 0;
  accent-color: var(--primary);
}

.send-emails-confirmation span {
  display: grid;
  gap: 3px;
}

.send-emails-confirmation strong {
  font-size: 0.9rem;
}

.send-emails-confirmation small {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.4;
}

.send-emails-confirmation:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
}

#send-emails-status:empty {
  display: none;
}

#send-emails-modal .route-modal-actions button[type="button"] {
  color: var(--text);
  background: var(--surface-light);
  border: 1px solid var(--border);
}

#send-emails-modal .route-modal-actions button[type="button"]:hover {
  background: var(--surface-hover);
}

.create-route-vehicle-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.create-route-vehicle-fieldset legend {
  margin-bottom: 8px;
  padding: 0;
  font-size: 0.85rem;
  font-weight: 700;
}

.create-route-vehicle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  width: min(520px, calc(60vw - 42px));
  gap: 10px;
}

.create-route-vehicle-choice {
  min-width: 0;
  cursor: pointer;
}

.create-route-vehicle-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.create-route-vehicle-choice-content {
  display: grid;
  min-height: 72px;
  align-content: center;
  gap: 5px;
  padding: 13px 14px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.create-route-vehicle-choice-content strong {
  overflow-wrap: anywhere;
}

.create-route-vehicle-choice-content small {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.create-route-vehicle-choice:hover .create-route-vehicle-choice-content {
  background: var(--surface-hover);
  border-color: var(--primary);
}

.create-route-vehicle-choice input:checked + .create-route-vehicle-choice-content {
  background: rgb(59 130 246 / 14%);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgb(96 165 250 / 16%);
}

.create-route-vehicle-choice input:focus-visible + .create-route-vehicle-choice-content {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.create-route-vehicle-grid[aria-busy="true"] {
  pointer-events: none;
  opacity: 0.65;
}

.route-modal-actions {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.job-context-menu {
  position: fixed;
  z-index: 15000;
  display: grid;
  min-width: 220px;
  gap: 2px;
  padding: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: 0 12px 28px rgb(0 0 0 / 28%);
}

.job-context-menu[hidden],
.job-notice[hidden],
.location-form-grid[hidden],
.location-map-empty[hidden] {
  display: none;
}

.job-time-window-modal-body {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 20px;
  overflow: visible;
}

.job-time-window-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--surface-light);
  border-left: 4px solid var(--primary);
  border-radius: var(--border-radius);
}

.job-time-window-summary-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.job-time-window-summary strong {
  font-size: 1rem;
}

.job-time-window-summary > span:last-child {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.job-time-window-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.job-time-window-fields input {
  width: 100%;
}

.job-location-modal-body {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(360px, 1.15fr);
  gap: 20px;
  overflow: visible;
}

.location-fields {
  min-height: 0;
  overflow: visible;
}

.location-method {
  display: flex;
  gap: 18px;
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
}

.location-method label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.location-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.location-form-grid .form-field:nth-child(4) {
  grid-column: 1 / -1;
}

.location-form-grid input {
  width: 100%;
}

.location-preview {
  position: relative;
  min-width: 0;
  min-height: 300px;
  overflow: hidden;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
}

.location-map {
  width: 100%;
  height: 100%;
}

.location-map-empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--text-muted);
  text-align: center;
  pointer-events: none;
  background: var(--surface-light);
}

.job-notice {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  font-size: 0.8rem;
  line-height: 1.35;
  border-radius: var(--border-radius);
}

.job-manual-location-warning,
.job-notice-warning {
  margin-top: 10px;
  color: #fde68a;
  background: rgb(120 53 15 / 65%);
  border: 1px solid rgb(245 158 11 / 55%);
}

.job-notice-error {
  color: #fecaca;
  background: rgb(127 29 29 / 65%);
  border: 1px solid rgb(248 113 113 / 55%);
}

.job-notice-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.planning-time-window {
  padding: 14px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
}

.planning-time-window h3,
.planning-time-window p,
.vehicle-overrides-heading h3,
.vehicle-overrides-heading p {
  margin: 0;
}

.planning-time-window p,
.vehicle-overrides-heading p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.time-window-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 220px));
  align-items: end;
  gap: 10px;
}

.time-window-fields .form-field,
.vehicle-override-row .form-field,
.job-time-window-fields .form-field {
  gap: 6px;
}

.time-window-fields label,
.vehicle-override-row .form-field label,
.job-time-window-fields label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.clock-input {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  border-color: var(--border);
  border-radius: 6px;
}

.clock-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(96 165 250 / 14%);
}

.time-window-fields .save-status {
  grid-column: 1 / -1;
}

.vehicle-overrides {
  padding-top: 14px;
}

.vehicle-overrides-heading {
  display: grid;
  grid-template-columns:
    minmax(110px, 1.4fr)
    minmax(120px, 1fr)
    minmax(120px, 1fr)
    minmax(120px, 1fr);
  align-items: end;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 10px;
}

.vehicle-overrides-title {
  grid-column: 1;
}

.vehicle-column-heading {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.vehicle-time-field label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.vehicle-override-list {
  display: grid;
  gap: 6px;
}

.vehicle-override-row {
  display: grid;
  grid-template-columns:
    minmax(110px, 1.4fr)
    minmax(120px, 1fr)
    minmax(120px, 1fr)
    minmax(120px, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
}

.vehicle-override-name {
  align-self: center;
  min-width: 0;
  overflow-wrap: anywhere;
}

.vehicle-enabled-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  cursor: pointer;
}

.vehicle-enabled-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.vehicle-toggle {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 42px;
  background: var(--border);
  border-radius: 999px;
  transition: background-color 0.15s ease;
}

.vehicle-toggle::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  content: "";
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.vehicle-enabled-control input:checked + .vehicle-toggle {
  background: var(--primary);
}

.vehicle-enabled-control input:checked + .vehicle-toggle::after {
  transform: translateX(18px);
}

.vehicle-enabled-control input:focus-visible + .vehicle-toggle {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.vehicle-override-row > .save-status {
  grid-column: 1 / -1;
}

.vehicle-override-row > .save-status:empty {
  display: none;
}

.save-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.save-status[data-state="error"] {
  color: #fca5a5;
}

.save-status[data-state="saved"] {
  color: #4ade80;
}

.route-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: 1 1 0;
  width: 100%;
  min-height: 0;
  gap: 16px;
  overflow: hidden;
}

.jobs-panel,
.planned-route-panel {
  display: flex;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.unassigned-column .jobs-panel {
  flex: 1 1 auto;
  height: auto;
}

.panel-header {
  flex-shrink: 0;
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

.panel-header h2 {
  margin-bottom: 4px;
}

.panel-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.unassigned-panel-header {
  display: flex;
  min-height: 61px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.unassigned-panel-header h2 {
  margin: 0;
}

.unassigned-panel-header button {
  flex: 0 0 auto;
}

.action-menu {
  position: relative;
  flex: 0 0 auto;
}

.action-menu > summary {
  display: inline-flex;
  min-width: 42px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  list-style: none;
}

.action-menu > summary::-webkit-details-marker {
  display: none;
}

.action-menu > summary:hover,
.action-menu[open] > summary {
  background: var(--surface-hover);
  border-color: var(--border);
}

.action-menu > summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.action-menu-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 220px;
  gap: 2px;
  padding: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: 0 12px 28px rgb(0 0 0 / 28%);
}

.action-menu-popover button,
.job-context-menu button {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: var(--primary);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: var(--border-radius);
}

.action-menu-popover button:hover,
.job-context-menu button:hover {
  color: #8ab4ee;
  background: var(--surface-hover);
}

.action-menu-popover button:focus-visible,
.job-context-menu button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.action-menu-popover .button-danger,
.action-menu-popover .delete-button,
.job-context-menu .button-danger {
  color: #f87171;
  background: transparent;
}

.action-menu-popover .button-danger:hover,
.action-menu-popover .delete-button:hover,
.job-context-menu .button-danger:hover {
  color: #fca5a5;
  background: var(--surface-hover);
}

.action-menu-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vehicle-selector-header {
  display: grid;
  gap: 6px;
}

.vehicle-selector-header select {
  width: 100%;
}

.route-selector-controls {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.route-selector-controls select {
  min-width: 0;
  flex: 1 1 auto;
}

.route-selector-controls button {
  flex: 0 0 auto;
}

.route-violations {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.route-violations h3 {
  margin: 0 0 2px;
  color: #fecaca;
}

.route-violations .job-notice {
  border: 1px solid rgba(248, 113, 113, 0.65);
  border-radius: var(--border-radius);
}

.panel-content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--surface);
}

.panel-content::-webkit-scrollbar {
  width: 10px;
}

.panel-content::-webkit-scrollbar-track {
  background: var(--surface);
}

.panel-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border: 2px solid var(--surface);
  border-radius: 10px;
}

.job-list {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
}

.route-summary-card {
  flex-shrink: 0;
  padding: 12px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  border-radius: var(--border-radius);
}

.route-summary-header {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.route-summary-header h3 {
  margin: 0;
  font-size: 0.95rem;
}

.route-summary-header span {
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
}

.route-summary-grid > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.route-summary-grid strong {
  overflow-wrap: anywhere;
  font-size: 0.85rem;
  font-weight: 600;
}

.route-summary-label {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.job-card {
  position: relative;
  flex-shrink: 0;
  padding: 12px;
  background-color: var(--surface-light);
  border: 1px solid var(--border);
  border-left-width: 5px;
  border-radius: var(--border-radius);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
}

.job-card:hover {
  background-color: var(--surface-hover);
  transform: translateY(-1px);
}

.job-card.job-card-highlighted {
  border-color: #facc15 !important;
  box-shadow:
    0 0 0 2px rgb(250 204 21 / 38%),
    0 8px 24px rgb(0 0 0 / 20%);
}

.job-card.job-card-dragging {
  opacity: 0.35;
}

.job-drag-active,
.job-drag-active * {
  cursor: grabbing !important;
}

.job-drag-ghost {
  position: fixed;
  z-index: 12000;
  width: min(340px, calc(100vw - 28px));
  max-height: 180px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.94;
  transform: rotate(1.5deg) scale(0.98);
  box-shadow: 0 18px 45px rgb(0 0 0 / 45%);
}

.job-list-drop-target {
  background: rgb(37 99 235 / 8%);
  outline: 2px dashed var(--primary);
  outline-offset: -5px;
}

.job-drop-marker {
  height: 4px;
  flex: 0 0 4px;
  margin: -2px 4px;
  background: #60a5fa;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgb(96 165 250 / 18%);
}

/* Delivery jobs — softer green */
.job-card.job-card-delivery {
}

.job-card.job-card-delivery:hover {
}

.job-card.job-card-delivery .job-type {
  color: var(--primary);
  font-weight: 700;
}

/* Pickup jobs — greener and more vibrant than delivery */
.job-card.job-card-pickup {
  background-color: rgba(22, 163, 74, 0.30) !important;
  border-color: rgba(34, 197, 94, 0.82) !important;
  border-left-color: #4ade80 !important;
}

.job-card.job-card-pickup:hover {
  background-color: rgba(22, 163, 74, 0.40) !important;
  border-color: rgba(74, 222, 128, 0.95) !important;
  border-left-color: #86efac !important;
}

.job-card.job-card-pickup .job-type {
  color: #bbf7d0;
  font-weight: 700;
}

.job-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.job-card-header strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.job-id {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.job-address {
  margin-bottom: 10px;
}

.job-address-row {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.job-address-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.job-address-row span:last-child {
  flex-shrink: 0;
  white-space: nowrap;
}

.job-card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 12px;
  font-size: 0.85rem;
}

.job-card-details > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.job-card-details span:last-child {
  overflow-wrap: anywhere;
}

.job-label {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.job-type {
  font-weight: 600;
}

.empty-state {
  padding: 30px 16px;
  color: var(--text-muted);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--border-radius);
}

@media (max-width: 1200px) {
  .route-page {
    height: auto;
    min-height: calc(100dvh - 28px);
  }

  .route-workspace {
    overflow: visible;
  }

  .route-lists {
    min-height: 650px;
  }

}

@media (max-width: 850px) {
  .route-page {
    min-height: 0;
    overflow: visible;
  }

  .planning-time-window,
  .time-window-fields,
  .vehicle-override-row,
  .job-location-modal-body,
  .location-form-grid,
  .job-time-window-fields {
    grid-template-columns: 1fr;
  }

  .vehicle-overrides-heading {
    display: block;
    padding: 0;
  }

  .vehicle-column-heading {
    display: none;
  }

  .vehicle-time-field label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .create-route-vehicle-grid {
    grid-template-columns: 1fr;
    width: min(420px, calc(60vw - 42px));
  }

  .job-location-modal-body {
    overflow: visible;
  }

  .location-preview {
    min-height: 280px;
  }

  .location-form-grid .form-field:nth-child(4) {
    grid-column: auto;
  }

  .time-window-fields .save-status,
  .vehicle-override-row > .save-status {
    grid-column: auto;
  }

  .route-workspace {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 16px;
  }

  .route-main-column {
    display: block;
    margin-bottom: 0;
    overflow: visible;
  }

  .route-lists {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .jobs-panel,
  .planned-route-panel {
    display: none;
  }

  .unassigned-column {
    display: block;
    overflow: visible;
  }

  .mobile-route-panel {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 12px;
    margin: 12px 0 0;
    padding: 12px;
  }

  .mobile-route-selector {
    display: grid;
    gap: 6px;
  }

  .mobile-route-selector label {
    color: var(--text-muted);
    font-size: 0.78rem;
  }

  .mobile-route-selector select {
    width: 100%;
  }

  .mobile-route-content {
    padding: 0;
    overflow: visible;
  }

  .mobile-route-content .route-summary-card {
    order: -1;
  }

  .mobile-route-content .route-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-summary-unassigned {
    border-left-color: #64748b;
  }

  .route-toolbar,
  .route-toolbar form,
  .date-form {
    align-items: stretch;
  }

  .route-toolbar form,
  .form-field,
  .button-group {
    width: 100%;
  }

  .route-toolbar .date-form {
    display: grid;
    width: auto;
    flex: 1 1 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-toolbar .form-field:first-child,
  .route-toolbar .form-field:nth-child(2) {
    min-width: 0;
  }

  .job-card-details {
    grid-template-columns: 1fr;
  }

  .route-selector-controls {
    flex-direction: column;
  }

  .job-address-row {
    flex-direction: column;
    gap: 2px;
  }

  .job-address-row span:last-child {
    white-space: normal;
  }

}
.job-violations {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.job-notice-message {
  min-width: 0;
  overflow-wrap: anywhere;
}
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
  display: grid;
  gap: 0.75rem;
  width: min(24rem, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 0.9rem 1rem;
  border-radius: 0.65rem;
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 12px 35px rgb(0 0 0 / 18%);
  border-left: 0.3rem solid #2563eb;
  transform: translateY(-1rem);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.toast.toast-visible { transform: translateY(0); opacity: 1; }
.toast-success { border-left-color: #15803d; }
.toast-error { border-left-color: #b91c1c; }
.toast-info { border-left-color: #2563eb; }
