:root {
  --bg: #f4f6f8;
  --surface: rgba(255, 255, 255, 0.98);
  --surface-strong: #ffffff;
  --surface-deep: #121212;
  --text: #17191d;
  --text-soft: #69707a;
  --border: rgba(17, 24, 39, 0.08);
  --primary: #c61f36;
  --primary-strong: #991428;
  --accent: #17191d;
  --danger: #b42318;
  --shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Source Sans 3", sans-serif;
  background:
    radial-gradient(circle at 0% 0%, rgba(198, 31, 54, 0.07), transparent 24%),
    radial-gradient(circle at 100% 0%, rgba(17, 24, 39, 0.05), transparent 18%),
    linear-gradient(180deg, #fafbfd 0%, #f4f6f8 46%, #eef2f6 100%);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.03em;
}

p {
  margin: 0;
}

#app {
  max-width: 1540px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 0.95;
}

.hero-copy {
  max-width: 680px;
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-eyebrow {
  margin-top: 20px;
}

.card,
.panel,
.sidebar-card,
.summary-card,
.map-card,
.stops-card {
  background: var(--surface);
  backdrop-filter: none;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.card,
.panel {
  padding: 18px;
  margin: 12px 0;
}

.auth-card {
  max-width: 460px;
}

.hero {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.hero-badge,
.metric-chip,
.pill {
  background: #fff;
  color: var(--text);
  border: 1px solid rgba(198, 31, 54, 0.12);
  box-shadow: none;
}

.eyebrow {
  color: var(--primary);
}

.dashboard-toolbar,
.nav-shell {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.tab {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.95rem;
}

.tab.active {
  background: color-mix(in srgb, var(--primary) 10%, white);
  color: var(--primary-strong);
  border-color: rgba(198, 31, 54, 0.18);
}

.route-card-list,
.product-detail-grid,
.dispatch-shell,
.dashboard-shell {
  gap: 16px;
}

.card-head,
.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.tab {
  border: 1px solid rgba(31, 122, 99, 0.16);
  background: rgba(255, 255, 255, 0.56);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.tab:hover,
.tab.active {
  transform: translateY(-1px);
  background: rgba(31, 122, 99, 0.12);
  border-color: rgba(31, 122, 99, 0.28);
}

label {
  display: block;
  margin: 12px 0 6px;
  font-size: 0.92rem;
  color: var(--text-soft);
}

input,
select,
textarea,
button {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(31, 122, 99, 0.14);
  padding: 12px 14px;
  font: inherit;
}

input,
select,
textarea {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(31, 122, 99, 0.18);
  border-color: rgba(31, 122, 99, 0.35);
}

button,
.button-link {
  background: linear-gradient(135deg, var(--primary) 0%, #2b9a7b 100%);
  color: #f7fbf9;
  border-color: transparent;
  cursor: pointer;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(17, 83, 64, 0.18);
}

button.secondary {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  border: 1px solid rgba(31, 122, 99, 0.14);
  box-shadow: none;
}

.actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.summary-actions {
  justify-content: flex-end;
}

.summary-actions > * {
  min-width: 150px;
}

.summary-select {
  max-width: 260px;
}

.footer-actions {
  justify-content: flex-end;
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.pill,
.metric-chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.pill {
  background: rgba(31, 122, 99, 0.12);
  color: var(--primary-strong);
}

.metric-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.metric-chip {
  background: rgba(24, 54, 46, 0.06);
  color: var(--text);
}

.summary-copy {
  color: var(--text-soft);
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.message {
  min-height: 20px;
  margin-top: 10px;
  color: var(--danger);
  font-weight: 700;
}

.message[data-type="success"] {
  color: var(--primary-strong);
}

.dispatch-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
}

.dispatch-sidebar {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.sidebar-card,
.summary-card,
.map-card,
.stops-card {
  padding: 20px;
}

.route-card-list,
.slot-list,
.stop-timeline {
  display: grid;
  gap: 12px;
}

.route-card {
  border: 1px solid rgba(31, 122, 99, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.route-card.active {
  border-color: rgba(31, 122, 99, 0.38);
  box-shadow: inset 0 0 0 1px rgba(31, 122, 99, 0.14);
}

.route-card.planning {
  border-style: dashed;
}

.route-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.route-card-meta,
.route-fine-print,
.stop-meta,
.slot-meta,
.empty-note {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.status-pill {
  background: rgba(24, 54, 46, 0.08);
  color: var(--text);
  text-transform: capitalize;
}

.status-pill.committed,
.status-pill.reviewed {
  background: rgba(31, 122, 99, 0.14);
  color: var(--primary-strong);
}

.status-pill.planned,
.status-pill.draft,
.status-pill.partial {
  background: rgba(217, 142, 25, 0.14);
  color: #8f5b0a;
}

.status-pill.failed,
.status-pill.superseded {
  background: rgba(178, 73, 61, 0.14);
  color: var(--danger);
}

.dispatch-stage {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.dispatch-top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 18px;
}

.dispatch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: 18px;
}

.map-canvas {
  height: 660px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(31, 122, 99, 0.08), rgba(24, 54, 46, 0.02));
}

.stop-item,
.slot-item,
.list li,
.override-item {
  border-radius: 18px;
  border: 1px solid rgba(31, 122, 99, 0.12);
  background: rgba(255, 255, 255, 0.84);
  padding: 14px 16px;
}

.stop-item {
  position: relative;
  padding-left: 68px;
}

.stop-item::before {
  content: attr(data-sequence);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #49b194);
  color: white;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
}

.stop-item h4,
.slot-item h4,
.override-item h4 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.override-grid {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.override-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.override-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

.override-label input {
  width: auto;
}

.route-marker {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  background: linear-gradient(135deg, var(--primary), #49b194);
  border: 3px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 18px rgba(17, 83, 64, 0.24);
}

.route-marker.depot {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), #efb04b);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(31, 122, 99, 0.14);
  background: rgba(255, 255, 255, 0.82);
}

.list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 12px;
}

.list li {
  line-height: 1.45;
}

.leaflet-container {
  font-family: "Source Sans 3", sans-serif;
}

.support-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(217, 142, 25, 0.22);
  background: linear-gradient(135deg, rgba(255, 244, 221, 0.96), rgba(255, 232, 191, 0.92));
  color: #6c4500;
  box-shadow: 0 12px 30px rgba(217, 142, 25, 0.12);
}

.support-banner strong {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.02em;
}

.support-banner span {
  color: rgba(77, 50, 0, 0.86);
}

@media (max-width: 1320px) {
  .dispatch-shell,
  .dispatch-top,
  .dispatch-grid,
  .company-product-grid {
    grid-template-columns: 1fr;
  }

  .map-canvas {
    height: 540px;
  }
}

@media (max-width: 720px) {
  #app {
    padding: 16px;
  }

  .hero {
    flex-direction: column;
  }

  .summary-actions > * {
    min-width: 100%;
  }

  .map-canvas {
    height: 420px;
  }

  .stop-item {
    padding-left: 16px;
    padding-top: 64px;
  }

  .stop-item::before {
    top: 14px;
    left: 14px;
  }
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(31, 122, 99, 0.18), transparent 28%),
    radial-gradient(circle at 88% 14%, rgba(217, 142, 25, 0.16), transparent 22%),
    linear-gradient(180deg, #eff6f4 0%, #f8fbfa 50%, #f3f6f5 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2)),
    repeating-linear-gradient(
      90deg,
      rgba(21, 62, 51, 0.018) 0,
      rgba(21, 62, 51, 0.018) 1px,
      transparent 1px,
      transparent 72px
    );
  pointer-events: none;
  opacity: 0.72;
}

.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.scene-orb {
  position: absolute;
  display: block;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.7;
}

.scene-admin .orb-a {
  width: 320px;
  height: 320px;
  top: -100px;
  left: -30px;
  background: radial-gradient(circle, rgba(31, 122, 99, 0.42), rgba(31, 122, 99, 0));
}

.scene-admin .orb-b {
  width: 360px;
  height: 360px;
  top: 90px;
  right: -120px;
  background: radial-gradient(circle, rgba(217, 142, 25, 0.28), rgba(217, 142, 25, 0));
}

.scene-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.54), transparent 78%);
  opacity: 0.28;
}

#app {
  position: relative;
  z-index: 1;
  max-width: 1620px;
  margin: 0 auto;
  padding: 28px 28px 56px;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid rgba(21, 62, 51, 0.08);
  background:
    linear-gradient(135deg, rgba(14, 54, 47, 0.94), rgba(31, 122, 99, 0.92) 60%, rgba(217, 142, 25, 0.78));
  box-shadow: 0 28px 72px rgba(20, 65, 56, 0.16);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 22%),
    linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.08) 48%, transparent 100%);
  pointer-events: none;
}

.hero h1,
.hero .eyebrow,
.hero-copy {
  position: relative;
  z-index: 1;
  color: #f8fffd;
}

.hero-copy {
  max-width: 60ch;
  color: rgba(244, 251, 249, 0.84);
}

.hero-actions {
  position: relative;
  z-index: 1;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  color: #f8fffd;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tabs {
  position: sticky;
  top: 14px;
  z-index: 12;
  padding: 10px;
  border: 1px solid rgba(21, 62, 51, 0.08);
  border-radius: 24px;
  background: rgba(248, 251, 250, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 30px rgba(20, 65, 56, 0.08);
}

.tab {
  border-radius: 16px;
  border: 1px solid transparent;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.tab:hover {
  transform: translateY(-1px);
  background: rgba(21, 62, 51, 0.05);
}

.tab.active {
  border-color: rgba(31, 122, 99, 0.22);
  background: linear-gradient(135deg, rgba(31, 122, 99, 0.12), rgba(217, 142, 25, 0.12));
  color: #13514d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.auth-card,
.sidebar-card,
.summary-card,
.map-card,
.stops-card,
.panel {
  border-color: rgba(21, 62, 51, 0.08);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 46px rgba(20, 65, 56, 0.08);
}

.sidebar-card,
.summary-card,
.map-card,
.stops-card,
.route-card,
.slot-item,
.list li {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.sidebar-card:hover,
.summary-card:hover,
.map-card:hover,
.stops-card:hover,
.route-card:hover,
.slot-item:hover,
.list li:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 122, 99, 0.22);
  box-shadow: 0 22px 42px rgba(20, 65, 56, 0.12);
}

.dispatch-shell,
.dispatch-top,
.dispatch-grid {
  gap: 20px;
}

.company-product-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
}

.product-source-badge {
  background: rgba(21, 62, 51, 0.05);
  color: var(--text-soft);
}

.product-source-badge.company {
  background: rgba(31, 122, 99, 0.14);
  color: var(--primary-strong);
}

.product-example-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.product-example-item {
  border: 1px solid rgba(21, 62, 51, 0.08);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.72);
}

.product-detail-grid {
  display: grid;
  gap: 10px;
}

.product-filter-shell {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(21, 62, 51, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 30px rgba(20, 65, 56, 0.08);
}

.product-filter-row,
.product-filter-meta,
.product-card-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-filter-row > * {
  flex: 1 1 160px;
}

.dosage-example-list {
  display: grid;
  gap: 10px;
}

.dosage-example-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.8fr) auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(21, 62, 51, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
}

@media (max-width: 900px) {
  .dosage-example-row {
    grid-template-columns: 1fr;
  }
}

button,
.button-link {
  border-radius: 16px;
  border: 1px solid rgba(21, 62, 51, 0.08);
  box-shadow: 0 12px 26px rgba(20, 65, 56, 0.1);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(20, 65, 56, 0.13);
}

button.secondary {
  background: rgba(255, 255, 255, 0.84);
}

input,
select,
textarea {
  border-color: rgba(21, 62, 51, 0.1);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(31, 122, 99, 0.45);
  box-shadow:
    0 0 0 4px rgba(31, 122, 99, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.pill {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.14);
  color: #f8fffd;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.metric-chip,
.toggle {
  border-color: rgba(21, 62, 51, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.route-card-list > *,
.slot-list > *,
.list li {
  padding: 16px 18px;
  border: 1px solid rgba(21, 62, 51, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
}

.stop-item,
.override-item {
  border-color: rgba(21, 62, 51, 0.08);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 28px rgba(20, 65, 56, 0.06);
}

.map-card,
.stops-card {
  overflow: hidden;
}

.map-canvas {
  border-radius: 24px;
}

.message {
  min-height: 22px;
}

@media (max-width: 720px) {
  .hero-badges {
    margin-top: 16px;
  }

  .tabs {
    top: 10px;
  }
}

.route-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.route-card-label,
.route-step-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(21, 62, 51, 0.08);
  background: rgba(31, 122, 99, 0.08);
  color: #155850;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-step-badge {
  background: rgba(217, 142, 25, 0.12);
  color: #8c5a0f;
}

.route-card-alert {
  background: rgba(178, 73, 61, 0.12);
  color: var(--danger);
}

.subtle-chip {
  background: rgba(21, 62, 51, 0.05);
  color: var(--text-soft);
}

.route-card-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.route-card-footer {
  padding-top: 2px;
  border-top: 1px solid rgba(21, 62, 51, 0.08);
}

.route-card-actions {
  justify-content: space-between;
}

.planning-insight-rail {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.planning-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.planning-stat-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(21, 62, 51, 0.08);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 26px rgba(20, 65, 56, 0.06);
}

.planning-stat-label {
  color: var(--text-soft);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.planning-stat-value {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.planning-stat-note {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.planning-tech-strip,
.planning-warning-list {
  display: grid;
  gap: 12px;
}

.planning-tech-strip {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.planning-tech-card {
  appearance: none;
  width: 100%;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(21, 62, 51, 0.08);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 28px rgba(20, 65, 56, 0.06);
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.planning-tech-card:hover,
.planning-tech-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(31, 122, 99, 0.24);
  box-shadow: 0 22px 42px rgba(20, 65, 56, 0.12);
  outline: none;
}

.planning-tech-card.active {
  border-color: rgba(31, 122, 99, 0.34);
  box-shadow: inset 0 0 0 1px rgba(31, 122, 99, 0.12), 0 18px 36px rgba(20, 65, 56, 0.1);
}

.planning-tech-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.planning-tech-head h4,
.planning-warning-card h4 {
  margin: 0;
  font-size: 1rem;
}

.planning-tech-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.planning-inline-note {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.planning-warning-card {
  display: grid;
  gap: 8px;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid rgba(178, 73, 61, 0.12);
  background: rgba(178, 73, 61, 0.08);
}

.planning-lane-board {
  margin-bottom: 18px;
}

.planning-lane-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.planning-lane {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(21, 62, 51, 0.08);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 26px rgba(20, 65, 56, 0.05);
}

.planning-lane.active {
  border-color: rgba(31, 122, 99, 0.26);
  box-shadow: inset 0 0 0 1px rgba(31, 122, 99, 0.12), 0 18px 34px rgba(20, 65, 56, 0.08);
}

.planning-lane-head {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.planning-lane-head h4 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.planning-lane-cards {
  min-height: 96px;
  display: grid;
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  border: 1px dashed rgba(21, 62, 51, 0.08);
  background: rgba(246, 248, 246, 0.78);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.planning-lane-cards.drag-over {
  border-color: rgba(31, 122, 99, 0.28);
  background: rgba(31, 122, 99, 0.08);
  box-shadow: inset 0 0 0 1px rgba(31, 122, 99, 0.08);
}

.planning-lane-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(21, 62, 51, 0.08);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 18px rgba(20, 65, 56, 0.06);
  cursor: grab;
}

.planning-lane-card:active {
  cursor: grabbing;
}

.planning-lane-card.pending {
  border-color: rgba(217, 142, 25, 0.24);
  box-shadow: inset 0 0 0 1px rgba(217, 142, 25, 0.12), 0 10px 18px rgba(20, 65, 56, 0.06);
}

.planning-lane-card.dragging {
  opacity: 0.45;
}

.planning-lane-card.drop-before {
  box-shadow: inset 0 3px 0 rgba(31, 122, 99, 0.52);
}

.planning-lane-card.drop-after {
  box-shadow: inset 0 -3px 0 rgba(31, 122, 99, 0.52);
}

.planning-lane-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.planning-lane-card h5 {
  margin: 0;
  font-size: 0.98rem;
}

.planning-lane-empty {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-height: 68px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(21, 62, 51, 0.12);
  color: var(--text-soft);
  font-size: 0.92rem;
  text-align: center;
}

.route-address-line {
  font-size: 0.95rem;
  color: var(--text);
}

.stop-visual-card,
.planning-stop-card,
.planning-unassigned-card {
  display: grid;
  gap: 10px;
}

@media (max-width: 720px) {
  .route-card-topline,
  .route-card-head,
  .route-card-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .planning-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .planning-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.message:not(:empty) {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(178, 73, 61, 0.16);
  background: rgba(178, 73, 61, 0.08);
}

.message[data-type="success"]:not(:empty) {
  border-color: rgba(31, 122, 99, 0.18);
  background: rgba(31, 122, 99, 0.08);
}

.message[data-type="loading"]:not(:empty) {
  border-color: rgba(21, 62, 51, 0.16);
  background: rgba(21, 62, 51, 0.08);
  color: #155850;
}

.panel:not(.hidden) {
  animation: panel-enter 220ms ease;
}

.empty-state-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px dashed rgba(21, 62, 51, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-soft);
}

.empty-state-card h3 {
  font-size: 1.05rem;
}

.empty-state-card p {
  line-height: 1.55;
}

.skeleton-card,
.skeleton-list-item {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(21, 62, 51, 0.08);
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
  list-style: none;
}

.skeleton-line {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(21, 62, 51, 0.06), rgba(21, 62, 51, 0.12), rgba(21, 62, 51, 0.06));
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.1s linear infinite;
}

.w-35 {
  width: 35%;
}

.w-45 {
  width: 45%;
}

.w-70 {
  width: 70%;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 22, 20, 0.48);
  backdrop-filter: blur(8px);
}

.confirm-dialog {
  width: min(100%, 520px);
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(21, 62, 51, 0.08);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 80px rgba(20, 65, 56, 0.2);
}

.confirm-actions {
  justify-content: flex-end;
}

#confirmAcceptBtn[data-tone="danger"] {
  background: linear-gradient(135deg, #a94242 0%, #d76363 100%);
}

@keyframes skeleton-shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 2026 shell refresh */
:root {
  --bg: #f6f6f6;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --surface-deep: #101010;
  --text: #141414;
  --text-soft: #5d5d63;
  --border: rgba(16, 16, 16, 0.08);
  --primary: #d6131b;
  --primary-strong: #8b0d12;
  --accent: #d6131b;
  --danger: #b10f16;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.1);
}

body {
  background:
    radial-gradient(circle at top left, rgba(214, 19, 27, 0.12), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(16, 16, 16, 0.08), transparent 22%),
    linear-gradient(180deg, #ffffff 0%, #f7f7f8 44%, #f0f0f2 100%);
}

body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.46)),
    repeating-linear-gradient(
      90deg,
      rgba(16, 16, 16, 0.016) 0,
      rgba(16, 16, 16, 0.016) 1px,
      transparent 1px,
      transparent 96px
    );
  opacity: 0.56;
}

#app {
  max-width: 1720px;
  padding: 24px 24px 52px;
}

.hero {
  padding: 30px 32px;
  background:
    linear-gradient(135deg, rgba(8, 8, 8, 0.98), rgba(26, 26, 26, 0.96) 55%, rgba(173, 14, 22, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.2);
}

.hero-copy {
  color: rgba(255, 255, 255, 0.78);
}

.hero-side-note {
  max-width: 18rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
  text-align: right;
  font-weight: 600;
}

body.dashboard-active .hero {
  padding: 22px 24px;
  margin-bottom: 14px;
}

body.dashboard-active .hero-badges {
  display: none;
}

body.dashboard-active .hero-copy {
  max-width: 48ch;
  font-size: 0.98rem;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.dashboard-main {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.nav-shell {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 18px;
  padding: 22px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(9, 9, 9, 0.98), rgba(20, 20, 20, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.24);
  color: #fff;
  z-index: 20;
}

.nav-shell-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.nav-shell .eyebrow {
  color: rgba(255, 255, 255, 0.54);
}

.nav-shell-copy {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.shell-tabs {
  position: static;
  top: auto;
  z-index: auto;
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 18px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.shell-tabs .tab {
  width: 100%;
  justify-content: flex-start;
  padding: 13px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.84);
  text-align: left;
  transform: none;
}

.shell-tabs .tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.shell-tabs .tab.active {
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, rgba(214, 19, 27, 1), rgba(139, 13, 18, 0.92));
  color: #fff;
  box-shadow: 0 14px 30px rgba(214, 19, 27, 0.22);
}

.nav-shell-footer {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.dashboard-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 26px;
  border: 1px solid rgba(16, 16, 16, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.toolbar-primary {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.toolbar-copy-wrap h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
}

.toolbar-copy {
  margin-top: 6px;
  color: var(--text-soft);
  line-height: 1.55;
  max-width: 54ch;
}

.toolbar-secondary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shell-icon-button {
  width: auto;
  min-width: 58px;
  padding: 0 16px;
  flex: 0 0 auto;
}

#adminNavToggleBtn,
.nav-close {
  display: none;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  width: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.42);
  box-shadow: none;
  backdrop-filter: blur(4px);
}

.panel,
.auth-card,
.sidebar-card,
.summary-card,
.map-card,
.stops-card {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(16, 16, 16, 0.08);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.07);
}

button,
.button-link {
  background: linear-gradient(135deg, #d6131b 0%, #8b0d12 100%);
  box-shadow: 0 12px 26px rgba(214, 19, 27, 0.2);
}

button.secondary,
.button-link.secondary-link,
.nav-shell-footer .secondary {
  background: rgba(255, 255, 255, 0.94);
  color: #121212;
  border: 1px solid rgba(16, 16, 16, 0.1);
  box-shadow: none;
}

input,
select,
textarea {
  border-color: rgba(16, 16, 16, 0.1);
  background: rgba(255, 255, 255, 0.96);
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: rgba(214, 19, 27, 0.42);
  box-shadow:
    0 0 0 4px rgba(214, 19, 27, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.pill {
  background: rgba(214, 19, 27, 0.08);
  color: #a50f15;
  border: 1px solid rgba(214, 19, 27, 0.14);
}

.metric-chip,
.toggle,
.status-pill {
  background: rgba(16, 16, 16, 0.05);
  color: var(--text);
}

.route-marker,
.stop-item::before {
  background: linear-gradient(135deg, #d6131b, #8b0d12);
  box-shadow: 0 10px 18px rgba(214, 19, 27, 0.22);
}

.route-marker.depot {
  background: linear-gradient(135deg, #111111, #303030);
}

.route-card.active,
.planning-lane.active,
.planning-tech-card.active {
  border-color: rgba(214, 19, 27, 0.32);
  box-shadow: inset 0 0 0 1px rgba(214, 19, 27, 0.1), 0 18px 36px rgba(0, 0, 0, 0.08);
}

.support-banner {
  border-color: rgba(214, 19, 27, 0.12);
  background: linear-gradient(135deg, rgba(255, 245, 245, 0.96), rgba(255, 255, 255, 0.92));
  color: #7c0e13;
  box-shadow: 0 14px 28px rgba(214, 19, 27, 0.08);
}

@media (max-width: 1100px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  #adminNavToggleBtn,
  .nav-close {
    display: inline-flex;
  }

  .nav-shell {
    position: fixed;
    top: 0;
    left: 0;
    width: min(88vw, 320px);
    height: 100vh;
    border-radius: 0 28px 28px 0;
    transform: translateX(-104%);
    transition: transform 180ms ease;
    z-index: 120;
  }

  #ownerDashboard.nav-open .nav-shell {
    transform: translateX(0);
  }

  .nav-shell-footer {
    margin-top: auto;
    padding-top: 18px;
  }
}

@media (max-width: 720px) {
  #app {
    padding: 14px 14px 36px;
  }

  .hero,
  body.dashboard-active .hero {
    padding: 18px;
  }

  .hero-side-note {
    max-width: none;
    text-align: left;
  }

  .dashboard-toolbar,
  .toolbar-primary {
    flex-direction: column;
    align-items: flex-start;
  }

  .toolbar-secondary {
    width: 100%;
  }

    .toolbar-secondary .pill {
      width: 100%;
      justify-content: center;
    }
  }

/* content polish */
.dashboard-main .panel,
.sidebar-card,
.summary-card,
.map-card,
.stops-card {
  position: relative;
}

.dashboard-main .panel {
  padding: 20px 22px;
}

.card-head,
.summary-header {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(16, 16, 16, 0.06);
}

.card-head h2,
.summary-header h2,
.card-head h3 {
  letter-spacing: -0.04em;
}

.row {
  align-items: end;
}

.row > * {
  min-width: 0;
}

.route-card-list,
.slot-list,
.stop-timeline,
.list,
.planning-insight-rail,
.planning-tech-strip,
.planning-warning-list,
.detail-list,
.dosage-example-list,
.product-example-list {
  gap: 14px;
}

.route-card,
.stop-item,
.slot-item,
.list li,
.planning-lane-card,
.planning-tech-card,
.planning-warning-card,
.planning-stat-card,
.product-example-item,
.dosage-example-row,
.override-item {
  border-radius: 22px;
}

.route-card,
.slot-item,
.planning-lane-card,
.planning-tech-card,
.planning-warning-card,
.planning-stat-card,
.product-example-item,
.override-item {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.05);
}

.route-card {
  padding: 18px;
  overflow: hidden;
}

.route-card::before,
.stop-item::after,
.planning-lane-card::before,
.planning-tech-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(214, 19, 27, 0.95), rgba(214, 19, 27, 0.18));
}

.planning-lane-card,
.planning-tech-card,
.stop-item {
  position: relative;
}

.stop-item::after {
  left: 68px;
  right: 18px;
}

.route-card-head,
.route-card-topline,
.planning-tech-head,
.planning-lane-head {
  align-items: flex-start;
}

.route-card h3,
.route-card h4,
.stop-item h4,
.slot-item h4,
.planning-tech-card h4,
.planning-lane-card h5 {
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.route-card-meta,
.route-fine-print,
.stop-meta,
.slot-meta,
.planning-inline-note,
.empty-note,
.detail-caption {
  color: var(--text-soft);
  line-height: 1.55;
}

.route-card-kpis,
.metric-strip,
.planning-tech-meta,
.product-card-docs,
.product-filter-meta {
  gap: 8px;
}

.detail-empty {
  display: grid;
  gap: 10px;
  padding: 24px;
  min-height: 220px;
  border: 1px dashed rgba(16, 16, 16, 0.12);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 245, 247, 0.92));
  color: var(--text-soft);
  line-height: 1.65;
}

.company-product-grid {
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
}

.company-product-grid .summary-card {
  position: sticky;
  top: 18px;
}

.map-card .card-head,
.stops-card .card-head {
  margin-bottom: 16px;
}

.list li,
.slot-item,
.override-item {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
}

.planning-summary-grid {
  gap: 14px;
}

.planning-stat-card {
  min-height: 120px;
  align-content: start;
}

.planning-lane {
  gap: 14px;
}

.planning-lane-cards {
  padding: 10px;
  min-height: 110px;
}

.planning-lane-card {
  gap: 10px;
  padding: 14px 15px;
}

.product-filter-shell,
.detail-empty,
.planning-lane,
.route-card,
.list li,
.slot-item,
.override-item,
.product-example-item,
.dosage-example-row {
  background: rgba(255, 255, 255, 0.96);
}

.status-pill,
.metric-chip,
.route-card-label,
.route-step-badge,
.subtle-chip {
  font-size: 0.76rem;
  letter-spacing: 0.05em;
}

@media (max-width: 1320px) {
  .company-product-grid .summary-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .dashboard-main .panel {
    padding: 16px;
  }

  .stop-item::after {
    left: 16px;
    right: 16px;
  }

  .detail-empty {
    min-height: 180px;
    padding: 18px;
  }
}

/* Pest Commander enterprise refresh */
:root {
  --bg: #f4f6f8;
  --surface: rgba(255, 255, 255, 0.98);
  --surface-strong: #ffffff;
  --surface-deep: #121212;
  --text: #17191d;
  --text-soft: #69707a;
  --border: rgba(17, 24, 39, 0.08);
  --primary: #c61f36;
  --primary-strong: #991428;
  --accent: #17191d;
  --danger: #b42318;
  --shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

body {
  background:
    radial-gradient(circle at 0% 0%, rgba(198, 31, 54, 0.07), transparent 24%),
    radial-gradient(circle at 100% 0%, rgba(17, 24, 39, 0.05), transparent 18%),
    linear-gradient(180deg, #fafbfd 0%, #f4f6f8 46%, #eef2f6 100%);
}

.hero,
.card,
.panel,
.sidebar-card,
.summary-card,
.map-card,
.stops-card,
.nav-shell,
.dashboard-toolbar {
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  backdrop-filter: none;
}

.hero {
  padding: 22px 24px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.card,
.panel {
  padding: 18px;
}

.hero-badge,
.metric-chip,
.pill {
  background: #fff;
  color: var(--text);
  border: 1px solid rgba(198, 31, 54, 0.12);
  box-shadow: none;
}

.eyebrow {
  color: var(--primary);
}

.tab {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.95rem;
}

.tab.active {
  background: color-mix(in srgb, var(--primary) 10%, white);
  color: var(--primary-strong);
  border-color: rgba(198, 31, 54, 0.18);
}

.dashboard-shell,
.dispatch-shell,
.route-card-list,
.product-detail-grid {
  gap: 16px;
}

/* Data-dense admin workspace refinement */
#customerList,
#appointmentList {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.data-list-item {
  margin: 0;
}

.data-list-empty {
  padding: 18px;
  border: 1px dashed rgba(17, 24, 39, 0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.85);
  color: var(--text-soft);
}

.data-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

.compact-data-card {
  gap: 10px;
}

.data-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

[data-panel="billing"] .row {
  margin-bottom: 10px;
  align-items: center;
}

[data-panel="billing"] .detail-stack {
  padding: 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 16px;
  background: #fbfcfd;
}

#serviceReportDetail .product-detail-grid {
  gap: 14px;
}

#serviceReportDetail .product-example-item {
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: #fbfcfd;
  padding: 14px;
}

/* Shell contrast fix + tighter dispatch surfaces */
.nav-shell,
#adminNavShell,
#platformNavShell {
  background: #ffffff !important;
  color: var(--text) !important;
  border: 1px solid rgba(17, 24, 39, 0.08) !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06) !important;
}

.nav-shell h2,
.nav-shell p,
.nav-shell .eyebrow,
.nav-shell-copy,
.nav-shell-head,
.nav-shell-footer,
.nav-shell .tab,
.nav-shell .secondary,
.nav-shell .button-link {
  color: var(--text) !important;
}

.nav-shell .eyebrow {
  color: var(--primary) !important;
}

.nav-shell .tab {
  background: #fbfcfd !important;
  border: 1px solid rgba(17, 24, 39, 0.08) !important;
}

.nav-shell .tab.active {
  background: color-mix(in srgb, var(--primary) 10%, white) !important;
  color: var(--primary-strong) !important;
  border-color: rgba(198, 31, 54, 0.18) !important;
}

.dashboard-toolbar,
.toolbar-primary,
.toolbar-secondary {
  background: #ffffff !important;
  color: var(--text) !important;
}

.dashboard-toolbar h2,
.dashboard-toolbar p,
.toolbar-copy,
.toolbar-copy-wrap,
#adminCurrentSectionTitle,
#platformCurrentSectionTitle,
#adminCurrentSectionCopy,
#platformCurrentSectionCopy,
#userBadge,
#platformUserBadge {
  color: var(--text) !important;
}

.dispatch-shell {
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  align-items: start;
}

.dispatch-sidebar,
.dispatch-main,
.map-card,
.sidebar-card {
  gap: 14px;
}

.dispatch-sidebar .sidebar-card,
.dispatch-main .panel,
.map-card {
  background: linear-gradient(180deg, #ffffff, #fbfcfd) !important;
  border: 1px solid rgba(17, 24, 39, 0.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05) !important;
}

.route-card,
.planning-run-card,
.route-stop-card,
.route-lane,
.route-lane-empty,
.planning-summary-card {
  background: #ffffff !important;
  border: 1px solid rgba(17, 24, 39, 0.08) !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04) !important;
}

.route-card-topline,
.route-card-head,
.route-card-actions,
.metric-strip {
  gap: 10px;
}

.leaflet-container,
#dispatchMap,
.map-shell,
.map-card {
  border-radius: 16px !important;
  overflow: hidden;
}

/* Dispatch map + planning run premium pass */
.dispatch-shell {
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: start;
}

.dispatch-sidebar {
  position: sticky;
  top: 16px;
}

.dispatch-sidebar .sidebar-card,
.map-card {
  padding: 16px !important;
}

#dispatchMap {
  min-height: 520px;
  border-radius: 16px !important;
}

.route-card.planning,
.route-card,
.override-item,
.planning-stop-card,
.planning-unassigned-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%) !important;
  border: 1px solid rgba(17, 24, 39, 0.08) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04) !important;
}

.route-card.active,
.planning-tech-card.active,
.planning-lane.active {
  border-color: rgba(198, 31, 54, 0.24) !important;
  box-shadow: 0 12px 24px rgba(198, 31, 54, 0.08) !important;
}

.route-card-topline,
.route-card-head,
.route-card-footer,
.route-card-actions,
.meta-row.route-card-kpis,
.metric-strip {
  gap: 10px !important;
}

.route-card-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-strong) !important;
}

.route-card-alert {
  color: #9a3412 !important;
}

.planning-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.planning-stat-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.planning-stat-label {
  display: block;
  color: var(--text-soft);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.planning-stat-value {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 6px;
}

.planning-stat-note,
.planning-inline-note {
  color: var(--text-soft) !important;
}

.planning-tech-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.planning-tech-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: #ffffff;
  text-align: left;
}

.planning-tech-head,
.planning-tech-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.planning-warning-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.planning-warning-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(154, 52, 18, 0.16);
  background: linear-gradient(180deg, #fff8f4 0%, #fffdfb 100%);
}

.planning-lane-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.planning-lane {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfc 100%);
}

.planning-lane-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.planning-lane-cards {
  display: grid;
  gap: 10px;
  min-height: 120px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px dashed rgba(17, 24, 39, 0.08);
}

.planning-lane-cards.drag-over {
  background: rgba(198, 31, 54, 0.05);
  border-color: rgba(198, 31, 54, 0.22);
}

.planning-lane-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: #ffffff;
}

.planning-lane-card.drop-before {
  box-shadow: inset 0 3px 0 rgba(198, 31, 54, 0.35);
}

.planning-lane-card.drop-after {
  box-shadow: inset 0 -3px 0 rgba(198, 31, 54, 0.35);
}

.planning-lane-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.planning-lane-empty {
  padding: 18px;
  text-align: center;
  color: var(--text-soft);
  border-radius: 12px;
}

@media (max-width: 1100px) {
  .dispatch-shell {
    grid-template-columns: 1fr !important;
  }

  .dispatch-sidebar {
    position: static;
  }

  .planning-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .planning-summary-grid,
  .planning-lane-grid,
  .planning-tech-strip {
    grid-template-columns: 1fr;
  }

  #dispatchMap {
    min-height: 360px;
  }
}

/* Planning controls refinement */
.summary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.summary-actions > button,
.summary-actions > .button-link,
.summary-actions > select {
  min-height: 40px;
}

#planningTechnicianSelect,
.summary-select {
  min-width: 180px;
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #fff;
}

.override-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.override-grid.compact {
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  align-items: end;
}

.override-label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-soft);
}

.planning-technician,
.planning-sequence,
.planning-start,
.planning-end,
.planning-reason {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.planning-reason {
  min-height: 42px;
}

.planning-technician:focus,
.planning-sequence:focus,
.planning-start:focus,
.planning-end:focus,
.planning-reason:focus,
.summary-select:focus {
  outline: none;
  border-color: rgba(198, 31, 54, 0.3);
  box-shadow: 0 0 0 3px rgba(198, 31, 54, 0.08);
}

.override-item .toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: #fbfcfd;
  font-weight: 700;
}

.override-item .toggle input {
  accent-color: var(--primary);
}

#generateDraftPlanBtn,
#reviewPlanningRunBtn,
#applyPlanningRunBtn,
#refreshPlanningRunsBtn,
#rerenderRouteBtn,
#openNavigationBtn {
  min-height: 40px;
  border-radius: 12px;
}

#reviewPlanningRunBtn {
  border-color: rgba(17, 24, 39, 0.12);
}

#applyPlanningRunBtn {
  box-shadow: 0 8px 18px rgba(198, 31, 54, 0.14);
}

.route-summary-card {
  gap: 14px;
}

.route-summary-card .summary-header {
  align-items: flex-start;
  gap: 14px;
}

.route-summary-card .summary-copy {
  color: var(--text-soft);
  max-width: 78ch;
}

@media (max-width: 1100px) {
  .override-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .override-grid.compact {
    grid-template-columns: 1fr;
  }

  .summary-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .override-grid {
    grid-template-columns: 1fr;
  }

  .summary-actions {
    padding: 8px;
  }

  .summary-actions > button,
  .summary-actions > .button-link,
  .summary-actions > select {
    width: 100%;
  }
}
.nav-shell .tab {
  background: #ffffff !important;
  color: var(--muted) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: none !important;
}
.nav-shell .tab:hover {
  background: #f8fafc !important;
  color: var(--text) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
}
.nav-shell .tab.active {
  background: #f4f6f8 !important;
  color: var(--text) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: inset 3px 0 0 var(--primary) !important;
}

.dispatch-workspace-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.dispatch-workspace-tab {
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  color: var(--muted);
  border-radius: 12px;
  padding: 0.72rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: none;
}

.dispatch-workspace-tab:hover {
  background: #f8fafc;
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.14);
}

.dispatch-workspace-tab.active {
  background: #f4f6f8;
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: inset 3px 0 0 var(--primary);
}

.dispatch-panel-hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .dispatch-workspace-nav {
    overflow-x: auto;
    padding-bottom: 0.2rem;
    flex-wrap: nowrap;
  }

  .dispatch-workspace-tab {
    white-space: nowrap;
  }
}
/* pest commander enterprise cleanup */
body {
  background: #f6f7f9 !important;
}
body::before,
body::after {
  display: none !important;
  content: none !important;
}
.hero,
.nav-shell,
.dashboard-toolbar,
.panel,
.auth-card,
.sidebar-card,
.summary-card,
.map-card,
.stops-card,
.route-card,
.compact-data-card,
.detail-card,
.product-example-item,
.override-item,
.planning-tech-card,
.planning-warning-card,
.planning-stat-card,
.planning-lane,
.planning-lane-card,
.slot-card {
  background: #ffffff !important;
  background-image: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
}
.hero,
.nav-shell,
.dashboard-toolbar {
  color: var(--text) !important;
}
.hero h1,
.hero p,
.hero-copy,
.dashboard-toolbar h2,
.dashboard-toolbar p,
.toolbar-copy,
.toolbar-copy-wrap,
.toolbar-copy-wrap h2,
#adminCurrentSectionTitle,
#adminCurrentSectionCopy,
#adminUserBadge {
  color: var(--text) !important;
}
.shell-tabs .tab.active,
.nav-shell .tab.active,
.dispatch-workspace-tab.active {
  background: #f4f6f8 !important;
  color: var(--text) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: inset 3px 0 0 var(--primary) !important;
}
button,
.button-link {
  background: var(--primary) !important;
  background-image: none !important;
  border-color: var(--primary) !important;
  box-shadow: none !important;
}
button:hover,
.button-link:hover {
  transform: none !important;
  box-shadow: none !important;
  filter: brightness(0.98);
}
button.secondary,
.button-link.secondary {
  background: #ffffff !important;
  color: var(--text) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
}
input:focus,
select:focus,
textarea:focus,
.planning-reason:focus,
.planning-start:focus,
.planning-end:focus,
.planning-sequence:focus,
.planning-technician:focus {
  box-shadow: none !important;
  border-color: rgba(198, 31, 54, 0.35) !important;
}
.route-card.active,
.planning-tech-card.active,
.planning-lane.active,
.planning-warning-card,
.route-summary-card,
.map-card,
.stops-card,
.dispatch-sidebar .sidebar-card {
  box-shadow: none !important;
}
.route-card.active,
.planning-tech-card.active,
.planning-lane.active {
  border-color: rgba(198, 31, 54, 0.26) !important;
}

/* pest commander office workflow density cleanup */
[data-panel="customers"] .panel,
[data-panel="appointments"] .panel,
[data-panel="billing"] .panel,
[data-panel="customers"] .summary-card,
[data-panel="appointments"] .summary-card,
[data-panel="billing"] .summary-card {
  padding: 14px !important;
  border-radius: 14px !important;
}

[data-panel="customers"] .row,
[data-panel="appointments"] .row,
[data-panel="billing"] .row {
  gap: 10px !important;
  margin-bottom: 8px !important;
}

[data-panel="customers"] .actions,
[data-panel="appointments"] .actions,
[data-panel="billing"] .actions {
  gap: 8px !important;
  align-items: flex-start !important;
}

[data-panel="customers"] .detail-stack,
[data-panel="appointments"] .detail-stack,
[data-panel="billing"] .detail-stack,
.compact-data-card,
.data-list-item {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

.data-list-item,
.compact-data-card {
  padding: 12px 14px !important;
}

.data-list-item + .data-list-item,
.compact-data-card + .compact-data-card {
  margin-top: 10px !important;
}

.data-card-head,
.compact-data-card .data-card-head,
[data-panel="billing"] .data-card-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 8px !important;
}

.data-card-head h3,
.data-card-head h4,
.compact-data-card h3,
.compact-data-card h4,
[data-panel="billing"] h3,
[data-panel="billing"] h4 {
  margin: 0 !important;
  font-size: 1rem !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
}

.data-list-item .route-fine-print,
.data-list-item .route-card-meta,
.compact-data-card .route-fine-print,
.compact-data-card .route-card-meta,
[data-panel="billing"] .route-fine-print,
[data-panel="billing"] .route-card-meta {
  line-height: 1.42 !important;
  margin-top: 4px !important;
}

[data-panel="customers"] .metric-strip,
[data-panel="appointments"] .metric-strip,
[data-panel="billing"] .metric-strip,
[data-panel="customers"] .meta-row,
[data-panel="appointments"] .meta-row,
[data-panel="billing"] .meta-row {
  gap: 8px !important;
}

[data-panel="customers"] .metric-chip,
[data-panel="appointments"] .metric-chip,
[data-panel="billing"] .metric-chip {
  padding: 0.38rem 0.66rem !important;
  font-size: 0.8rem !important;
  border-radius: 999px !important;
}

[data-panel="billing"] .detail-stack {
  padding: 12px 14px !important;
  gap: 10px !important;
}

[data-panel="billing"] .detail-stack .actions,
[data-panel="billing"] .detail-stack .row {
  justify-content: flex-start !important;
}

[data-panel="customers"] input,
[data-panel="customers"] select,
[data-panel="appointments"] input,
[data-panel="appointments"] select,
[data-panel="billing"] input,
[data-panel="billing"] select {
  min-height: 42px !important;
}

@media (max-width: 900px) {
  [data-panel="customers"] .panel,
  [data-panel="appointments"] .panel,
  [data-panel="billing"] .panel,
  [data-panel="customers"] .summary-card,
  [data-panel="appointments"] .summary-card,
  [data-panel="billing"] .summary-card,
  .compact-data-card,
  .data-list-item {
    padding: 12px !important;
  }

  .data-card-head,
  .compact-data-card .data-card-head {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}

/* compact dispatch switcher + customer workspace cleanup */
.dispatch-workspace-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dispatch-workspace-switcher .route-fine-print {
  margin: 4px 0 0;
}

.dispatch-workspace-nav {
  display: inline-flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px !important;
  width: auto;
  max-width: 100%;
  margin: 0 !important;
  padding: 4px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #ffffff;
}

.dispatch-workspace-nav .dispatch-workspace-tab {
  padding: 0.55rem 0.78rem !important;
  border-radius: 10px !important;
  border: 1px solid transparent !important;
  background: #ffffff !important;
  color: var(--text-soft) !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  line-height: 1.2;
  box-shadow: none !important;
}

.dispatch-workspace-nav .dispatch-workspace-tab:hover {
  background: #f8fafc !important;
  color: var(--text) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

.dispatch-workspace-nav .dispatch-workspace-tab.active {
  background: #f5f7fa !important;
  color: var(--text) !important;
  border-color: rgba(198, 31, 54, 0.16) !important;
  box-shadow: inset 2px 0 0 var(--primary) !important;
}

.customer-workspace {
  display: grid;
  gap: 16px;
}

.office-workspace {
  display: grid;
  gap: 16px;
}

.customer-panel-toolbar,
.customer-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.customer-panel-toolbar h2,
.customer-editor-header h2 {
  margin-bottom: 4px;
}

.customer-search-row {
  margin-bottom: 10px;
}

.customer-search-row input {
  max-width: 540px;
}

.office-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.office-filter-row input {
  min-height: 42px;
}

.office-filter-row input:first-child {
  min-width: min(420px, 100%);
  flex: 1 1 320px;
}

.customer-editor-shell {
  display: grid;
  gap: 16px;
}

.customer-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.field-block {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1 1 220px;
}

.field-block label,
.detail-stack label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-soft);
}

.customer-editor-actions {
  justify-content: flex-end !important;
  margin-top: 4px;
}

.stacked-actions {
  display: grid;
  gap: 8px;
}

.customer-record-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: none !important;
  color: var(--text) !important;
}

.customer-record-button:hover,
.customer-record-button:focus-visible {
  border-color: rgba(198, 31, 54, 0.22) !important;
  background: #ffffff !important;
  transform: none !important;
  box-shadow: none !important;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.22) !important;
  border: 0 !important;
}

.modal-card {
  position: relative;
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 20px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: none;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.customer-detail-modal-content,
.customer-detail-sections {
  display: grid;
  gap: 14px;
}

.customer-detail-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.customer-detail-grid,
.customer-detail-sections {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-detail-card {
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fbfcfd;
}

.schedule-intelligence-card {
  gap: 10px;
}

.schedule-intelligence-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.schedule-intelligence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.schedule-intelligence-grid article,
.portal-smart-booking-preview .schedule-intelligence-grid article {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.schedule-intelligence-grid span {
  color: #6a7687;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.schedule-intelligence-grid strong {
  color: #162033;
}

.schedule-intelligence-reasons,
.schedule-intelligence-web {
  margin: 0;
  color: #5b6678;
  font-size: 0.84rem;
  line-height: 1.45;
}

.schedule-intelligence-guidance,
.schedule-intelligence-engine {
  margin: 0;
  color: #445064;
  font-size: 0.82rem;
  line-height: 1.45;
}

.schedule-intelligence-engine {
  color: #6a7687;
}

.schedule-intelligence-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.schedule-intelligence-slot {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.schedule-intelligence-slot--selected {
  border-color: rgba(176, 22, 45, 0.28);
  box-shadow: inset 0 0 0 1px rgba(176, 22, 45, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 246, 0.94));
}

.schedule-intelligence-slot span {
  color: #6a7687;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.schedule-intelligence-slot strong {
  color: #162033;
}

.schedule-intelligence-slot small {
  color: #5b6678;
  line-height: 1.45;
}

.schedule-intelligence-slot-why {
  display: block;
  padding-top: 2px;
  color: #445064;
}

.schedule-intelligence-slot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.schedule-intelligence-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.customer-record-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.portal-slot-preview-shell {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.portal-slot-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.portal-slot-preview-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

.portal-slot-preview-card strong {
  color: #162033;
}

.schedule-intelligence-empty {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #5b6678;
}

.schedule-intelligence-empty strong {
  color: #162033;
}

.workspace-lock-banner {
  margin-bottom: 14px;
}

.workspace-lock-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(198, 31, 54, 0.14);
  background: linear-gradient(180deg, rgba(253, 242, 244, 0.96), rgba(255, 255, 255, 0.98));
}

.workspace-lock-copy {
  display: grid;
  gap: 8px;
}

.workspace-lock-card strong {
  font-size: 1.02rem;
  color: #162033;
}

.workspace-lock-card > span,
.workspace-lock-copy > span {
  color: #5b6678;
  line-height: 1.5;
}

.workspace-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(198, 31, 54, 0.1);
  color: #a61d35;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-lock-points {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  color: #465166;
}

.workspace-lock-hint {
  margin: 0;
  color: #6b7280;
  font-size: 0.86rem;
}

.workspace-locked .workspace-lock-banner,
.workspace-locked .workspace-lock-card {
  opacity: 1 !important;
}

.customer-mini-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
}

.customer-mini-row + .customer-mini-row {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.modal-actions {
  margin-top: 16px;
  justify-content: flex-end !important;
}

.route-summary-card,
.map-card,
.stops-card {
  border-radius: 14px !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.route-summary-card .summary-header,
.map-card .card-head,
.stops-card .card-head {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.stop-visual-card,
.planning-unassigned-card,
.override-item {
  border-radius: 12px !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

@media (max-width: 1180px) {
  .customer-editor-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 960px) {
  .dispatch-workspace-switcher,
  .customer-panel-toolbar,
  .customer-editor-header,
  .customer-detail-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .customer-editor-grid,
  .customer-detail-grid,
  .customer-detail-sections {
    grid-template-columns: 1fr;
  }

  .schedule-intelligence-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .schedule-intelligence-grid {
    grid-template-columns: 1fr;
  }

  .office-filter-row {
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .dispatch-workspace-nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .dispatch-workspace-nav .dispatch-workspace-tab {
    white-space: nowrap;
  }

  .modal-card {
    width: calc(100vw - 20px);
    padding: 16px;
  }
}

/* workspace cleanup: top tabs, condensed customers, clearer portal sections */
.dispatch-workspace-switcher {
  display: grid !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  justify-items: start !important;
  gap: 10px !important;
}

.workspace-switcher-copy h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}

.workspace-subtabs {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 6px;
  padding: 4px;
  margin: 0 0 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #ffffff;
  width: auto;
  max-width: 100%;
  align-self: flex-start;
  overflow-x: auto;
}

.workspace-subtab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 132px;
  padding: 0.58rem 0.82rem;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: var(--text-soft) !important;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: none !important;
}

.workspace-subtab:hover {
  background: #f8fafc !important;
  color: var(--text) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

.workspace-subtab.active {
  background: #f5f7fa !important;
  color: var(--text) !important;
  border-color: rgba(198, 31, 54, 0.16) !important;
  box-shadow: inset 2px 0 0 var(--primary) !important;
}

.dispatch-workspace-nav {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  width: auto !important;
  max-width: 100% !important;
  align-self: flex-start !important;
  overflow-x: auto;
}

.dispatch-workspace-nav .dispatch-workspace-tab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 132px;
}

.portal-workspace {
  display: grid;
  gap: 16px;
}

.portal-smart-booking-card {
  min-height: 100%;
  grid-column: span 1;
}

.portal-smart-booking-preview {
  gap: 10px;
}

.portal-subpanel.hidden {
  display: none !important;
}

.customer-table-shell {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.customer-table-head,
.customer-table-button {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) minmax(120px, 0.95fr) minmax(120px, 0.95fr) minmax(140px, 1fr) minmax(110px, 0.8fr);
  gap: 12px;
  align-items: center;
}

.customer-table-head {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: #fbfcfd;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.customer-table-list {
  gap: 0 !important;
}

.customer-table-list .data-list-item {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.customer-table-list .data-list-item + .data-list-item {
  margin-top: 0 !important;
}

.customer-table-button {
  width: 100%;
  padding: 12px 14px;
  border: 0 !important;
  border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 0 !important;
  background: #ffffff !important;
}

.customer-table-list .data-list-item:first-child .customer-table-button {
  border-top: 0 !important;
}

.customer-table-button:hover,
.customer-table-button:focus-visible {
  background: #fafbfc !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

.customer-table-cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-table-primary {
  display: grid;
  gap: 2px;
}

.customer-table-primary strong {
  font-size: 0.95rem;
  line-height: 1.2;
}

.customer-table-status {
  justify-self: end;
}

.report-table-head,
.report-table-button {
  grid-template-columns: minmax(210px, 1.45fr) minmax(170px, 1.25fr) minmax(150px, 1fr) minmax(160px, 1fr) minmax(120px, 0.8fr);
}

.technician-table-head,
.technician-table-button {
  grid-template-columns: minmax(220px, 1.4fr) minmax(120px, 0.8fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(110px, 0.7fr);
}

.technician-table-list {
  gap: 0 !important;
}

.modal-actions {
  justify-content: space-between !important;
  flex-wrap: wrap;
}

#customerDetailModalMessage {
  margin: 0 0 12px;
}

#reportDetailModalMessage {
  margin: 0 0 12px;
}

.technician-asset-list {
  display: grid;
  gap: 10px;
}

.technician-asset-list.compact .technician-asset-row {
  padding: 12px;
}

.technician-asset-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fbfcfd;
}

.technician-asset-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.technician-asset-actions {
  display: flex;
  justify-content: flex-end;
}

.technician-asset-actions .secondary {
  width: auto;
}

@media (max-width: 960px) {
  .customer-table-head {
    display: none;
  }

  .customer-table-button {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: flex-start;
  }

  .customer-table-status {
    justify-self: start;
  }

  .workspace-subtabs,
  .dispatch-workspace-nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .workspace-subtab,
  .dispatch-workspace-tab {
    white-space: nowrap;
  }

  .technician-asset-main {
    flex-direction: column;
  }
}

.report-workspace,
.product-workspace {
  display: grid;
  gap: 16px;
}

.report-subpanel.hidden,
.product-subpanel.hidden {
  display: none !important;
}

.report-subpanel .summary-card,
.product-subpanel .summary-card,
.report-subpanel .sidebar-card,
.product-subpanel .sidebar-card {
  position: static !important;
}

/* Final office usability cleanup */
#ownerDashboard .panel,
#ownerDashboard .sidebar-card,
#ownerDashboard .summary-card,
#ownerDashboard .map-card,
#ownerDashboard .stops-card,
#ownerDashboard .route-card,
#ownerDashboard .planning-stat-card,
#ownerDashboard .planning-tech-card,
#ownerDashboard .planning-warning-card,
#ownerDashboard .planning-lane,
#ownerDashboard .planning-lane-card,
#ownerDashboard .product-example-item,
#ownerDashboard .detail-empty,
#ownerDashboard .customer-table-shell,
#ownerDashboard .customer-detail-card,
#ownerDashboard .modal-card,
#ownerDashboard .summary-actions,
#ownerDashboard .toggle,
#ownerDashboard .customer-record-button,
#ownerDashboard .data-card {
  box-shadow: none !important;
}

.dispatch-workspace-switcher {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: start !important;
}

.workspace-switcher-copy {
  max-width: 56rem;
}

.dispatch-workspace-nav,
.workspace-subtabs,
#productsWorkspaceNav,
#portalWorkspaceNav {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 2px 0 0 !important;
  padding: 4px !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 14px !important;
  background: #f8fafc !important;
  overflow-x: auto !important;
}

.dispatch-workspace-tab,
.workspace-subtab {
  width: auto !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
  padding: 8px 12px !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: var(--text-soft) !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

.dispatch-workspace-tab:hover,
.workspace-subtab:hover {
  background: rgba(15, 23, 42, 0.04) !important;
  color: var(--text) !important;
}

.dispatch-workspace-tab.active,
.workspace-subtab.active {
  background: #ffffff !important;
  color: var(--text) !important;
  border-color: rgba(198, 31, 54, 0.18) !important;
}

.dispatch-shell {
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: start !important;
}

.dispatch-sidebar,
.dispatch-stage,
.dispatch-top,
.dispatch-grid,
.planning-summary-grid,
.planning-tech-strip,
.planning-warning-list,
.planning-lane-grid {
  gap: 12px !important;
}

.dispatch-top {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px) !important;
}

.dispatch-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr) !important;
}

.route-summary-card,
.slot-card,
.map-card,
.stops-card,
.sidebar-card {
  padding: 16px !important;
  border-radius: 14px !important;
}

.summary-actions {
  padding: 8px !important;
  border-radius: 12px !important;
  align-items: center !important;
}

.summary-actions > * {
  min-width: 0 !important;
}

#dispatchMap {
  min-height: 500px !important;
  border-radius: 12px !important;
}

.planning-stat-card,
.planning-tech-card,
.planning-warning-card,
.planning-lane,
.planning-lane-card,
.route-card,
.stop-item,
.slot-item,
.override-item {
  border-radius: 12px !important;
}

.planning-stat-card {
  min-height: 0 !important;
  padding: 12px !important;
}

.planning-tech-card,
.planning-warning-card,
.planning-lane,
.planning-lane-card,
.route-card,
.stop-item,
.slot-item,
.override-item {
  padding: 12px !important;
}

.planning-lane-cards {
  min-height: 96px !important;
  padding: 6px !important;
}

.customer-panel-toolbar,
.office-panel-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 14px;
}

.customer-search-row {
  margin-bottom: 12px;
}

.customer-table-shell {
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

.customer-table-list {
  display: grid !important;
  gap: 0 !important;
  margin: 0 !important;
}

.customer-table-head {
  padding: 10px 14px !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: #f8fafc !important;
}

.customer-record-button {
  width: 100% !important;
  padding: 12px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 0 !important;
  background: #ffffff !important;
}

.customer-table-list > li:last-child .customer-record-button {
  border-bottom: 0 !important;
}

.customer-record-button:hover,
.customer-record-button:focus-visible {
  transform: none !important;
  background: #fbfcfd !important;
}

.report-table-head,
.report-table-button {
  grid-template-columns: minmax(240px, 1.3fr) minmax(220px, 1.1fr) minmax(160px, 0.8fr) 150px 110px !important;
}

#reportsWorkspace[data-report-mode="edit"] .customer-editor-shell,
#billingWorkspace[data-workspace-mode="edit"] .customer-editor-shell,
#appointmentWorkspace[data-workspace-mode="edit"] .customer-editor-shell {
  max-width: 1120px;
}

#billingWorkspace .customer-editor-grid,
#appointmentWorkspace .customer-editor-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr) !important;
  gap: 14px !important;
}

#billingWorkspace .detail-stack,
#appointmentWorkspace .detail-stack,
#reportsWorkspace .detail-stack,
#portalWorkspace .detail-stack {
  gap: 10px !important;
}

#portalWorkspace {
  display: grid !important;
  gap: 14px !important;
}

.portal-subpanel .company-product-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr) !important;
  gap: 14px !important;
  align-items: start !important;
}

.portal-subpanel .summary-card,
.portal-subpanel .sidebar-card {
  padding: 16px !important;
  border-radius: 14px !important;
}

.portal-subpanel,
.product-subpanel,
#customerListView,
#customerEditorView,
#appointmentListView,
#appointmentEditorView,
#reportListView,
#reportEditorView,
#billingListView,
#billingEditorView {
  width: 100% !important;
  max-width: 100% !important;
}

#emailTemplateList,
#emailWorkflowList,
#portalCredentialList {
  gap: 10px !important;
}

@media (max-width: 1180px) {
  .dispatch-shell,
  .dispatch-top,
  .dispatch-grid,
  .portal-subpanel .company-product-grid,
  #billingWorkspace .customer-editor-grid,
  #appointmentWorkspace .customer-editor-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 860px) {
  .customer-panel-toolbar,
  .office-panel-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .report-table-head,
  .report-table-button,
  .customer-table-head,
  .customer-table-row .customer-record-button,
  .technician-table-head,
  .technician-table-button {
    grid-template-columns: 1fr !important;
  }

  .customer-table-head {
    display: none !important;
  }
}

/* final admin flow cleanup: compact tabs, full-width workspaces, dense row lists */
#dispatchWorkspaceNav,
#portalWorkspaceNav,
.workspace-subtabs {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  width: auto !important;
  max-width: 100% !important;
  overflow: visible !important;
}

#dispatchWorkspaceNav > .dispatch-workspace-tab,
#portalWorkspaceNav > .workspace-subtab,
.workspace-subtabs > .workspace-subtab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
}

#dispatchWorkspaceNav > .dispatch-workspace-tab {
  background: #ffffff !important;
  color: var(--text-soft) !important;
  border: 1px solid transparent !important;
}

#dispatchWorkspaceNav > .dispatch-workspace-tab.active,
#portalWorkspaceNav > .workspace-subtab.active,
.workspace-subtabs > .workspace-subtab.active {
  background: #ffffff !important;
  color: var(--text) !important;
  border-color: rgba(198, 31, 54, 0.18) !important;
  box-shadow: inset 2px 0 0 var(--primary) !important;
}

#productsWorkspace,
#reportsWorkspace,
#appointmentWorkspace,
#billingWorkspace,
#portalWorkspace {
  width: 100% !important;
  max-width: 100% !important;
}

#productListView,
#productEditorView {
  width: 100% !important;
  max-width: 100% !important;
}

#productsWorkspace[data-product-mode="edit"] .customer-editor-shell {
  max-width: 1120px;
}

.appointment-table-head,
.appointment-table-button {
  grid-template-columns: minmax(220px, 1.05fr) minmax(220px, 1fr) minmax(220px, 1fr) minmax(160px, 0.8fr) 110px !important;
}

.billing-table-head,
.billing-table-button {
  grid-template-columns: minmax(220px, 1.05fr) minmax(220px, 1fr) 160px 140px 110px !important;
}

.product-table-head,
.product-table-button {
  grid-template-columns: minmax(260px, 1.15fr) 140px 160px 180px 110px !important;
}

.appointment-table-list,
.billing-table-list,
.product-table-list,
.report-table-list {
  display: grid !important;
  gap: 0 !important;
  margin: 0 !important;
}

@media (max-width: 860px) {
  #dispatchWorkspaceNav,
  #portalWorkspaceNav,
  .workspace-subtabs {
    width: 100% !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
  }

  .appointment-table-head,
  .appointment-table-button,
  .billing-table-head,
  .billing-table-button,
  .product-table-head,
    .product-table-button {
    grid-template-columns: 1fr !important;
  }
}

/* qa cleanup: modal header buttons, flatter dispatch stage, compact route summary */
.modal-head > button,
.modal-head > .button-link {
  width: auto !important;
  min-width: 96px;
  flex: 0 0 auto !important;
}

.dispatch-top {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
  align-items: start !important;
}

.route-summary-card {
  min-height: 100%;
}

.route-summary-card .summary-header {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
  align-items: start !important;
}

.route-summary-card .summary-header > div:first-child {
  min-width: 0;
}

.route-summary-card .summary-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 10px !important;
  width: min(560px, 100%);
  justify-self: stretch !important;
}

.route-summary-card .summary-actions > button,
.route-summary-card .summary-actions > a,
.route-summary-card .summary-actions > select {
  width: 100% !important;
}

.dispatch-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.9fr) !important;
  gap: 14px !important;
  align-items: start !important;
}

.map-card,
.stops-card,
.slot-card,
.route-summary-card {
  min-width: 0;
}

.dispatch-sidebar {
  align-content: start;
}

.dispatch-sidebar .slot-card {
  margin-top: -2px;
}

.route-summary-card .summary-copy {
  max-width: 96ch;
}

@media (max-width: 1180px) {
  .dispatch-top,
  .dispatch-grid,
  .route-summary-card .summary-header {
    grid-template-columns: 1fr !important;
  }

  .route-summary-card .summary-actions {
    width: 100% !important;
    justify-self: stretch !important;
  }
}

/* dispatch content rework: dense route review and office planning surfaces */
.route-card-list {
  display: grid;
  gap: 10px;
}

.route-list-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px 16px !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: #ffffff !important;
}

.route-list-card.active {
  border-color: rgba(198, 31, 54, 0.22) !important;
  background: #fffdfd !important;
}

.route-list-card-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.route-list-card-side {
  display: grid;
  gap: 10px;
  justify-items: end;
  align-content: space-between;
  min-width: 148px;
}

.route-card-id {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.route-card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.route-fact {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.07);
  color: var(--text-soft);
  font-size: 0.79rem;
  font-weight: 600;
}

.route-card-helper,
.route-card-footnote {
  margin: 0;
}

.route-card-helper {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.45;
}

.route-card-footnote {
  color: var(--text-soft);
  font-size: 0.8rem;
}

.route-list-card .route-card-actions {
  margin: 0;
  width: 100%;
}

.route-list-card .route-card-actions > button {
  width: 100%;
  min-width: 136px;
}

.route-summary-card .summary-actions {
  background: #f8fafc !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.route-summary-card .summary-actions > button,
.route-summary-card .summary-actions > a,
.route-summary-card .summary-actions > select {
  min-height: 44px;
}

.dispatch-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dispatch-section-head.compact {
  margin-bottom: 0;
}

.dispatch-section-head h3,
.dispatch-section-head h4 {
  margin: 0;
  color: var(--text);
}

.dispatch-section-head p {
  margin: 0;
}

.stops-card {
  display: grid;
  gap: 12px;
}

.stop-timeline {
  display: grid;
  gap: 10px;
}

.dispatch-stop-card,
.planning-stop-card,
.planning-unassigned-card {
  padding: 0 !important;
  overflow: hidden;
}

.dispatch-stop-row {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 16px;
  align-items: start;
}

.dispatch-stop-time {
  display: grid;
  gap: 5px;
  align-content: start;
  justify-items: start;
  padding-right: 16px;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
}

.dispatch-stop-time strong {
  font-size: 1.05rem;
  line-height: 1.15;
  color: var(--text);
}

.dispatch-stop-time span:not(.route-step-badge) {
  color: var(--text-soft);
  font-size: 0.8rem;
}

.dispatch-stop-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.dispatch-stop-mainline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dispatch-stop-mainline h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.28;
}

.dispatch-stop-meta {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.dispatch-stop-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dispatch-stop-notes > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.07);
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.2;
}

.planning-stop-editor {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #fcfcfd;
}

.planning-stop-editor .override-grid {
  margin-top: 0;
}

.planning-stop-editor .override-grid.compact {
  grid-template-columns: minmax(180px, 0.6fr) minmax(0, 1fr);
}

.planning-board-shell {
  display: grid;
  gap: 12px;
}

.planning-lane-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px !important;
}

.planning-lane {
  padding: 0 !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: #ffffff !important;
  overflow: hidden;
}

.planning-lane.active {
  border-color: rgba(198, 31, 54, 0.2) !important;
}

.planning-lane-head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
}

.planning-lane-eyebrow {
  margin: 0 0 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.planning-lane-head h4 {
  margin: 0;
}

.planning-inline-note {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.planning-lane-cards {
  min-height: 0 !important;
  padding: 12px !important;
}

.planning-lane-card {
  display: grid;
  gap: 8px;
  padding: 12px !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: #ffffff !important;
}

.planning-lane-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.planning-lane-time {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 600;
}

.planning-lane-empty {
  padding: 16px;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--text-soft);
  font-size: 0.84rem;
}

@media (max-width: 1180px) {
  .dispatch-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 860px) {
  .route-list-card,
  .dispatch-stop-row,
  .planning-stop-editor .override-grid.compact {
    grid-template-columns: 1fr !important;
  }

  .route-list-card-side {
    justify-items: stretch;
    min-width: 0;
  }

  .dispatch-stop-time {
    padding-right: 0;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }

  .dispatch-stop-mainline,
  .dispatch-section-head,
  .planning-lane-head {
    flex-direction: column;
    align-items: stretch;
  }

  .planning-lane-grid {
    grid-template-columns: 1fr;
  }
}

/* final tab bar cleanup: full-width segmented controls */
#dispatchWorkspaceNav,
#portalWorkspaceNav,
.workspace-subtabs {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  overflow-x: auto !important;
  scrollbar-width: thin;
}

#dispatchWorkspaceNav > .dispatch-workspace-tab,
#portalWorkspaceNav > .workspace-subtab,
.workspace-subtabs > .workspace-subtab {
  flex: 1 1 0 !important;
  min-width: 152px !important;
  min-height: 50px !important;
  padding: 12px 16px !important;
  border: 0 !important;
  border-right: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  color: var(--text-soft) !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

#dispatchWorkspaceNav > .dispatch-workspace-tab:first-child,
#portalWorkspaceNav > .workspace-subtab:first-child,
.workspace-subtabs > .workspace-subtab:first-child {
  border-top-left-radius: 14px !important;
  border-bottom-left-radius: 14px !important;
}

#dispatchWorkspaceNav > .dispatch-workspace-tab:last-child,
#portalWorkspaceNav > .workspace-subtab:last-child,
.workspace-subtabs > .workspace-subtab:last-child {
  border-right: 0 !important;
  border-top-right-radius: 14px !important;
  border-bottom-right-radius: 14px !important;
}

#dispatchWorkspaceNav > .dispatch-workspace-tab:hover,
#portalWorkspaceNav > .workspace-subtab:hover,
.workspace-subtabs > .workspace-subtab:hover {
  background: #fafbfc !important;
  color: var(--text) !important;
}

#dispatchWorkspaceNav > .dispatch-workspace-tab.active,
#portalWorkspaceNav > .workspace-subtab.active,
.workspace-subtabs > .workspace-subtab.active {
  background: #fdf2f4 !important;
  color: var(--text) !important;
  border-right-color: rgba(198, 31, 54, 0.14) !important;
  box-shadow: inset 0 -2px 0 var(--primary) !important;
}

.dispatch-workspace-switcher {
  gap: 14px !important;
}

.workspace-switcher-copy {
  max-width: none !important;
}

@media (max-width: 860px) {
  #dispatchWorkspaceNav > .dispatch-workspace-tab,
  #portalWorkspaceNav > .workspace-subtab,
  .workspace-subtabs > .workspace-subtab {
    flex: 0 0 auto !important;
    min-width: 170px !important;
  }
}

/* dispatch workspace mode cleanup: each view gets the full stage it needs */
.dispatch-shell[data-active-view="schedule"],
.dispatch-shell[data-active-view="planning"],
.dispatch-shell[data-active-view="details"] {
  grid-template-columns: minmax(0, 1fr) !important;
}

.dispatch-shell[data-active-view="schedule"] .dispatch-stage,
.dispatch-shell[data-active-view="planning"] .dispatch-stage,
.dispatch-shell[data-active-view="details"] .dispatch-sidebar {
  display: none !important;
}

.dispatch-shell[data-active-view="schedule"] .dispatch-sidebar,
.dispatch-shell[data-active-view="planning"] .dispatch-sidebar,
.dispatch-shell[data-active-view="details"] .dispatch-stage {
  width: 100% !important;
  max-width: 100% !important;
}

.dispatch-shell[data-active-view="schedule"] .dispatch-sidebar,
.dispatch-shell[data-active-view="planning"] .dispatch-sidebar {
  display: grid !important;
  gap: 14px !important;
}

.dispatch-shell[data-active-view="details"] .dispatch-stage {
  display: grid !important;
  gap: 14px !important;
}

.dispatch-shell[data-active-view="all"] {
  grid-template-columns: minmax(340px, 390px) minmax(0, 1fr) !important;
}

.dispatch-shell[data-active-view="details"] .dispatch-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(420px, 0.95fr) !important;
}

.dispatch-shell[data-active-view="details"] .route-summary-card,
.dispatch-shell[data-active-view="details"] .map-card,
.dispatch-shell[data-active-view="details"] .stops-card {
  width: 100% !important;
  max-width: 100% !important;
}

.dispatch-shell[data-active-view="schedule"] .route-card-list,
.dispatch-shell[data-active-view="planning"] .route-card-list,
.dispatch-shell[data-active-view="planning"] .slot-list {
  width: 100% !important;
}

.dispatch-shell[data-active-view="schedule"] .sidebar-card,
.dispatch-shell[data-active-view="planning"] .sidebar-card,
.dispatch-shell[data-active-view="details"] .route-summary-card,
.dispatch-shell[data-active-view="details"] .map-card,
.dispatch-shell[data-active-view="details"] .stops-card {
  padding: 18px !important;
}

.dispatch-shell[data-active-view="details"] .dispatch-top {
  gap: 16px !important;
}

.dispatch-shell[data-active-view="details"] .summary-actions {
  grid-template-columns: repeat(3, minmax(170px, 1fr)) !important;
  width: 100% !important;
  max-width: 760px !important;
}

.dispatch-shell[data-active-view="details"] .summary-actions > button,
.dispatch-shell[data-active-view="details"] .summary-actions > a,
.dispatch-shell[data-active-view="details"] .summary-actions > select {
  min-height: 46px !important;
}

.dispatch-shell[data-active-view="details"] .metric-strip {
  margin-top: 8px;
}

.dispatch-shell[data-active-view="details"] .planning-lane {
  background: #fbfcfd !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

.dispatch-shell[data-active-view="details"] .planning-lane.active {
  background: #ffffff !important;
  border-color: rgba(198, 31, 54, 0.18) !important;
}

.dispatch-shell[data-active-view="details"] .planning-lane-head {
  background: #ffffff !important;
  border-left: 4px solid var(--primary);
  padding-left: 12px !important;
}

.dispatch-shell[data-active-view="details"] .planning-lane-head .metric-chip {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  color: var(--text) !important;
}

.dispatch-shell[data-active-view="details"] .planning-lane-cards {
  background: #f8fafc;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.dispatch-shell[data-active-view="details"] .planning-lane-card {
  background: #ffffff !important;
}

.dispatch-shell[data-active-view="details"] .planning-lane-card.pending {
  border-color: rgba(198, 31, 54, 0.22) !important;
  background: #fffdfd !important;
}

.dispatch-shell[data-active-view="details"] .dispatch-section-head {
  align-items: flex-start;
}

@media (max-width: 1180px) {
  .dispatch-shell[data-active-view="details"] .dispatch-grid,
  .dispatch-shell[data-active-view="all"] {
    grid-template-columns: 1fr !important;
  }

  .dispatch-shell[data-active-view="details"] .summary-actions {
    grid-template-columns: repeat(2, minmax(160px, 1fr)) !important;
    max-width: 100% !important;
  }
}

@media (max-width: 860px) {
  .dispatch-shell[data-active-view="details"] .summary-actions {
    grid-template-columns: 1fr !important;
  }
}

/* dispatch v2 workspace */
.dispatch-v2-root {
  width: 100%;
}

.dispatch-v2-shell {
  display: grid;
  gap: 18px;
  width: 100%;
}

.dispatch-v2-header-card,
.dispatch-v2-section,
.dispatch-focus-card,
.dispatch-review-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
}

.dispatch-v2-header-card,
.dispatch-v2-section {
  display: grid;
  gap: 16px;
}

.dispatch-v2-header-card,
.dispatch-v2-section,
.dispatch-focus-card,
.dispatch-review-card,
.dispatch-pattern-block {
  padding: 20px 22px;
}

.dispatch-v2-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  margin-top: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  overflow: hidden;
}

.dispatch-v2-switcher .dispatch-v2-tab {
  appearance: none;
  width: 100%;
  border: 0;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff !important;
  color: #5b6678 !important;
  font-weight: 700;
  min-height: 52px;
  padding: 14px 18px;
  box-shadow: none !important;
  border-radius: 0;
}

.dispatch-v2-switcher .dispatch-v2-tab:last-child {
  border-right: 0;
}

.dispatch-v2-switcher .dispatch-v2-tab:hover {
  background: #fafbfc !important;
  color: #162033 !important;
  transform: none !important;
  box-shadow: none !important;
}

.dispatch-v2-switcher .dispatch-v2-tab.active {
  background: #fff7f8 !important;
  color: #162033 !important;
  box-shadow: inset 0 -2px 0 #c62136 !important;
}

.dispatch-v2-shell-copy {
  margin: 0.35rem 0 0;
  max-width: 54rem;
  color: #6a7687;
}

.dispatch-v2-header-copy {
  display: grid;
  gap: 8px;
}

.dispatch-shell-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.dispatch-shell-title-row h3 {
  margin: 0;
}

.dispatch-shell-mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(198, 33, 54, 0.14);
  background: #fff7f8;
  color: #a82235;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dispatch-shell-context {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.dispatch-shell-chip {
  min-width: 132px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #f8fafc;
  display: grid;
  gap: 4px;
}

.dispatch-shell-chip-label {
  color: #7a8596;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dispatch-shell-chip strong {
  color: #162033;
  font-size: 0.93rem;
  font-weight: 700;
}

.schedule-week-command-shell {
  display: grid;
  gap: 14px;
}

.schedule-week-command-card {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #ffffff;
}

.schedule-week-command-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.schedule-week-command-copy {
  display: grid;
  gap: 6px;
  max-width: 44rem;
}

.schedule-week-command-copy h4 {
  margin: 0;
  font-size: 1.08rem;
  color: #162033;
}

.schedule-week-command-copy p:last-child {
  margin: 0;
  color: #6a7687;
}

.schedule-week-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.schedule-week-command-button,
.schedule-day-command-button,
.schedule-map-command-button {
  appearance: none;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  color: #162033;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.schedule-week-command-button:hover,
.schedule-day-command-button:hover,
.schedule-map-command-button:hover {
  background: #f8fafc;
  border-color: rgba(198, 33, 54, 0.18);
  color: #a82235;
}

.schedule-week-command-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.schedule-week-command-metric {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.schedule-week-command-metric-label {
  color: #7a8596;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.schedule-week-command-metric strong {
  color: #162033;
  font-size: 0.93rem;
  font-weight: 700;
}

.schedule-week-command-board {
  display: grid;
}

.schedule-day-command-shell,
.schedule-map-command-shell {
  display: grid;
  gap: 14px;
}

.schedule-day-command-card,
.schedule-map-command-card {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #ffffff;
}

.schedule-day-command-header,
.schedule-map-command-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.schedule-day-command-copy,
.schedule-map-command-copy {
  display: grid;
  gap: 6px;
  max-width: 44rem;
}

.schedule-day-command-copy h4,
.schedule-map-command-copy h4 {
  margin: 0;
  font-size: 1.08rem;
  color: #162033;
}

.schedule-day-command-copy p:last-child,
.schedule-map-command-copy p:last-child {
  margin: 0;
  color: #6a7687;
}

.schedule-day-command-actions,
.schedule-map-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.schedule-day-command-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.schedule-map-command-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.schedule-day-command-metric,
.schedule-map-command-metric {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.schedule-day-command-metric-label,
.schedule-map-command-metric-label {
  color: #7a8596;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.schedule-day-command-metric strong,
.schedule-map-command-metric strong {
  color: #162033;
  font-size: 0.93rem;
  font-weight: 700;
}

.schedule-day-command-board,
.schedule-map-command-board {
  display: grid;
}

@media (max-width: 760px) {
  .schedule-week-command-actions,
  .schedule-day-command-actions,
  .schedule-map-command-actions {
    width: 100%;
  }

  .schedule-week-command-button,
  .schedule-day-command-button,
  .schedule-map-command-button {
    width: 100%;
    justify-content: center;
  }

  .schedule-week-command-summary,
  .schedule-day-command-summary,
  .schedule-map-command-summary {
    grid-template-columns: 1fr;
  }
}

.dispatch-command-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dispatch-command-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fbfcfd;
}

.dispatch-command-card.active {
  background: #fff7f8;
  border-color: rgba(198, 33, 54, 0.22);
}

.dispatch-command-card span,
.dispatch-command-card small {
  color: #6a7687;
}

.dispatch-command-card span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dispatch-command-card strong {
  color: #162033;
  font-size: 0.92rem;
}

.dispatch-v2-toolbar,
.dispatch-focus-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dispatch-filter-row,
.dispatch-builder-toolbar,
.dispatch-form-grid,
.dispatch-stop-edit-grid {
  display: grid;
  gap: 12px;
}

.dispatch-filter-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  width: 100%;
}

.dispatch-builder-toolbar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  margin-top: 16px;
}

.dispatch-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.dispatch-stop-edit-grid {
  grid-template-columns: 1.2fr 1.3fr auto auto;
  align-items: end;
  margin-top: 12px;
}

.dispatch-filter-row label,
.dispatch-builder-toolbar label,
.dispatch-form-grid label,
.dispatch-stop-edit-grid label,
.dispatch-pattern-block label {
  display: grid;
  gap: 6px;
}

.dispatch-filter-row label span,
.dispatch-builder-toolbar label span,
.dispatch-form-grid label span,
.dispatch-stop-edit-grid label span,
.dispatch-pattern-block label span {
  font-size: 12px;
  font-weight: 700;
  color: #6a7687;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dispatch-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.dispatch-inline-check {
  display: inline-flex !important;
  align-items: center;
  gap: 8px !important;
  min-height: 46px;
}

.dispatch-inline-check input {
  width: auto;
}

.dispatch-table-shell {
  margin-top: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  overflow: hidden;
}

.dispatch-table-head,
.dispatch-table-row {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 0.95fr 1fr 0.9fr 0.9fr;
  gap: 14px;
  align-items: center;
}

.dispatch-table-shell.compact .dispatch-table-head,
.dispatch-table-shell.compact .dispatch-table-row {
  grid-template-columns: 1.1fr 1.1fr 0.95fr 0.8fr;
}

.dispatch-tech-row {
  grid-template-columns: 1.2fr 1fr 0.6fr;
}

.dispatch-table-head {
  padding: 14px 18px;
  background: #fafbfc;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 12px;
  font-weight: 700;
  color: #6a7687;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dispatch-table-body {
  display: grid;
}

.dispatch-table-row {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.dispatch-table-row:last-child {
  border-bottom: 0;
}

.dispatch-table-row.active {
  background: #fff8f9;
}

.dispatch-table-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dispatch-table-cell strong {
  color: #162033;
}

.dispatch-table-cell span {
  color: #6a7687;
  font-size: 13px;
}

.dispatch-table-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.dispatch-focus-card,
.dispatch-review-card,
.dispatch-pattern-block {
  display: grid;
  gap: 16px;
}

.dispatch-focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dispatch-focus-grid article,
.dispatch-pattern-item,
.dispatch-map-shell {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  background: #ffffff;
}

.dispatch-focus-grid strong,
.dispatch-map-shell strong {
  display: block;
  margin-top: 6px;
  color: #162033;
}

.dispatch-schedule-toolbar,
.dispatch-map-toolbar {
  grid-template-columns: minmax(180px, 220px) minmax(180px, 220px) minmax(180px, 220px) minmax(0, 1fr);
}

.dispatch-day-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.dispatch-day-tray {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #ffffff;
}

.dispatch-day-tray-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.dispatch-day-tray-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.dispatch-tray-stop {
  display: grid;
  gap: 4px;
  align-items: start;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #fcfcfd !important;
  color: #162033 !important;
  min-height: 0;
}

.dispatch-tray-stop strong {
  color: #162033;
}

.dispatch-tray-stop span,
.dispatch-tray-stop small {
  color: #6a7687;
}

.dispatch-day-column,
.dispatch-day-map-card {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #ffffff;
}

.dispatch-day-column.active,
.dispatch-day-map-card.active {
  border-color: rgba(198, 33, 54, 0.26);
  box-shadow: inset 0 0 0 1px rgba(198, 33, 54, 0.08);
}

.dispatch-day-column.dragover {
  border-color: rgba(31, 122, 99, 0.45);
  background: #f7fcfa;
}

.dispatch-day-column-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.dispatch-day-stop-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.dispatch-mini-stop {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #fcfcfd;
  cursor: grab;
}

.dispatch-mini-stop.dragging,
.dispatch-tray-stop.dragging {
  opacity: 0.55;
}

.dispatch-mini-stop.dragover {
  border-color: rgba(198, 33, 54, 0.32);
  background: #fff8f9;
}

.dispatch-mini-stop-time {
  min-width: 62px;
  font-size: 12px;
  font-weight: 700;
  color: #6a7687;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dispatch-mini-stop div {
  display: grid;
  gap: 3px;
}

.dispatch-mini-stop div strong {
  color: #162033;
}

.dispatch-mini-stop div span {
  color: #6a7687;
  font-size: 13px;
}

.dispatch-day-column-actions {
  justify-content: space-between;
}

.dispatch-day-drop-note {
  font-size: 12px;
  color: #6a7687;
  padding: 10px 12px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: #fcfcfd;
}

.dispatch-v2-empty-state.compact {
  padding: 16px 18px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: #fcfcfd;
}

.dispatch-v2-empty-state.compact strong {
  display: block;
  color: #162033;
  margin-bottom: 4px;
}

.dispatch-v2-empty-state.compact p {
  margin: 0;
  color: #6a7687;
}

.dispatch-route-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.dispatch-route-summary-card {
  display: grid;
  gap: 6px;
  padding: 10px 11px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fbfcfd;
}

.dispatch-route-summary-card.active {
  background: #ffffff;
  border-color: rgba(198, 31, 54, 0.22);
}

.dispatch-route-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dispatch-route-summary-head h4 {
  margin: 2px 0 0;
  font-size: 0.96rem;
}

.dispatch-route-summary-card .metric-strip {
  margin-top: 0;
}

.dispatch-route-summary-card .dispatch-inline-actions {
  justify-content: flex-start;
}

.dispatch-calendar-shell {
  margin-top: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  overflow: auto;
  background: #ffffff;
}

.dispatch-calendar-shell-quarter {
  max-height: none;
}

.dispatch-calendar-grid {
  display: grid;
  gap: 1px;
  min-width: max-content;
  background: rgba(15, 23, 42, 0.08);
}

.dispatch-calendar-grid-quarter .dispatch-calendar-time-head,
.dispatch-calendar-grid-quarter .dispatch-calendar-tech-head {
  position: sticky;
  top: 0;
  z-index: 2;
}

.dispatch-calendar-time-head,
.dispatch-calendar-tech-head,
.dispatch-calendar-time-cell,
.dispatch-calendar-slot {
  background: #ffffff;
}

.dispatch-calendar-time-head,
.dispatch-calendar-tech-head {
  padding: 7px 10px;
  background: #fbfcfd;
}

.dispatch-calendar-time-head {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6a7687;
}

.dispatch-calendar-tech-head {
  display: grid;
  gap: 2px;
}

.dispatch-calendar-tech-head.active {
  background: #fff7f8;
}

.dispatch-calendar-tech-head strong {
  font-size: 0.94rem;
  color: #162033;
}

.dispatch-calendar-tech-head span,
.dispatch-calendar-tech-head small {
  color: #6a7687;
  line-height: 1.35;
}

.dispatch-calendar-time-cell {
  padding: 8px 8px;
  text-align: right;
  font-size: 0.76rem;
  font-weight: 700;
  color: #6a7687;
}

.dispatch-calendar-time-cell-quarter {
  padding: 4px 8px;
  font-size: 0.72rem;
  color: #98a2b3;
  font-weight: 600;
}

.dispatch-calendar-time-cell-quarter.is-hour {
  color: #5b6777;
  font-weight: 700;
}

.dispatch-calendar-slot {
  min-height: 72px;
  padding: 6px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.dispatch-calendar-slot-quarter {
  min-height: 30px;
  padding: 3px;
  gap: 3px;
}

.dispatch-calendar-slot-quarter .dispatch-calendar-slot-note {
  padding: 2px 4px;
  font-size: 0.72rem;
}

.dispatch-calendar-slot.dragover {
  background: #fff7f8;
  box-shadow: inset 0 0 0 2px rgba(198, 31, 54, 0.18);
}

.dispatch-calendar-slot.selected {
  background: #fff5f6;
  box-shadow: inset 0 0 0 2px rgba(198, 31, 54, 0.22);
}

.dispatch-calendar-slot-note {
  padding: 4px 6px;
  font-size: 0.77rem;
  color: #7a8594;
}

.dispatch-calendar-slot.selected .dispatch-calendar-slot-note {
  color: #a31536;
  font-weight: 700;
}

.dispatch-calendar-stop {
  display: grid;
  gap: 6px;
  padding: 6px 7px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: #fcfcfd;
  cursor: grab;
}

.dispatch-calendar-stop:hover {
  border-color: rgba(198, 31, 54, 0.18);
}

.dispatch-calendar-stop.dragging {
  opacity: 0.55;
}

.dispatch-calendar-stop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dispatch-calendar-stop-head strong {
  font-size: 0.82rem;
  color: #162033;
}

.dispatch-calendar-stop-copy {
  display: grid;
  gap: 2px;
}

.dispatch-calendar-stop-copy strong {
  font-size: 0.92rem;
  color: #162033;
}

.dispatch-calendar-stop-copy span,
.dispatch-calendar-stop-copy small {
  color: #6a7687;
  line-height: 1.35;
}

.dispatch-builder-calendar-shell {
  margin-top: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  overflow: auto;
  background: #ffffff;
  max-height: none;
}

.dispatch-calendar-grid-builder {
  min-width: 100%;
}

.dispatch-calendar-grid-builder .dispatch-calendar-time-head,
.dispatch-calendar-grid-builder .dispatch-calendar-tech-head {
  position: sticky;
  top: 0;
  z-index: 2;
}

.dispatch-calendar-time-cell-builder {
  padding: 8px 10px;
  font-size: 0.76rem;
}

.dispatch-calendar-slot-builder {
  min-height: 34px;
  padding: 3px 5px;
  gap: 4px;
}

.dispatch-calendar-slot-builder .dispatch-calendar-slot-note {
  padding: 2px 4px;
  font-size: 0.72rem;
  color: #a31536;
  font-weight: 700;
}

.dispatch-calendar-stop-builder {
  padding: 6px 7px;
  gap: 4px;
}

.dispatch-calendar-stop-builder .dispatch-calendar-stop-head strong {
  font-size: 0.78rem;
}

.dispatch-calendar-stop-builder .dispatch-calendar-stop-copy strong {
  font-size: 0.86rem;
}

.dispatch-calendar-stop-builder .dispatch-calendar-stop-copy span,
.dispatch-calendar-stop-builder .dispatch-calendar-stop-copy small {
  font-size: 0.8rem;
}

.dispatch-calendar-stop-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dispatch-calendar-stop-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dispatch-calendar-stop-actions button {
  width: auto;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1;
}

.dispatch-calendar-gap {
  padding-top: 2px;
  border-top: 1px dashed rgba(15, 23, 42, 0.08);
  font-size: 0.76rem;
  color: #6a7687;
}

.dispatch-calendar-gap.is-overlap {
  color: #b42318;
}

.dispatch-builder-map-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #fbfcfd;
}

.dispatch-builder-map-card.compact {
  padding: 12px;
  gap: 10px;
}

.dispatch-builder-map-stage {
  position: relative;
  min-height: 300px;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.dispatch-builder-map-stage .dispatch-review-map {
  min-height: 300px;
}

section[data-panel="dispatch"] .dispatch-v2-header-card,
section[data-panel="dispatch"] .dispatch-v2-section,
section[data-panel="dispatch"] .dispatch-focus-card,
section[data-panel="dispatch"] .dispatch-review-card,
section[data-panel="dispatch"] .dispatch-pattern-block {
  padding: 16px 18px;
}

section[data-panel="dispatch"] .dispatch-v2-shell {
  gap: 12px;
}

section[data-panel="dispatch"] .dispatch-schedule-view .dispatch-v2-toolbar {
  align-items: end;
  gap: 10px;
}

section[data-panel="dispatch"] .dispatch-schedule-view .dispatch-v2-toolbar > div:first-child {
  display: grid;
  gap: 4px;
}

section[data-panel="dispatch"] .dispatch-schedule-view .dispatch-v2-toolbar h3 {
  margin: 0;
}

section[data-panel="dispatch"] .dispatch-schedule-toolbar {
  grid-template-columns: minmax(140px, 160px) minmax(160px, 180px) minmax(160px, 180px) minmax(140px, 150px) minmax(140px, 150px) auto;
  gap: 8px;
}

section[data-panel="dispatch"] .dispatch-schedule-toolbar .dispatch-inline-actions {
  justify-content: flex-end;
  align-self: end;
  gap: 8px;
}

section[data-panel="dispatch"] .dispatch-schedule-toolbar .dispatch-inline-actions > button {
  min-height: 38px;
  padding: 8px 12px;
}

section[data-panel="dispatch"] .dispatch-schedule-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.3fr);
  gap: 14px;
  align-items: start;
}

section[data-panel="dispatch"] .dispatch-schedule-hero-copy {
  display: grid;
  gap: 6px;
}

section[data-panel="dispatch"] .dispatch-schedule-hero-copy h3,
section[data-panel="dispatch"] .dispatch-schedule-hero-copy p {
  margin: 0;
}

section[data-panel="dispatch"] .dispatch-day-tray-anchorfill .dispatch-day-tray-header {
  align-items: flex-end;
}

section[data-panel="dispatch"] .dispatch-day-tray-anchorfill .dispatch-day-tray-items {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

section[data-panel="dispatch"] .dispatch-day-tray-anchorfill .dispatch-tray-stop {
  gap: 5px;
  padding: 11px 12px;
}

section[data-panel="dispatch"] .dispatch-route-summary-card .dispatch-inline-actions.compact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

section[data-panel="dispatch"] .dispatch-route-summary-card .dispatch-inline-actions.compact > button {
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  font-size: 0.78rem;
}

section[data-panel="dispatch"] .dispatch-builder-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}

section[data-panel="dispatch"] .dispatch-builder-workbench {
  grid-template-columns: 1fr;
}

.dispatch-day-map-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.dispatch-map-overhaul-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.45fr);
  gap: 14px;
  align-items: start;
}

.dispatch-map-overhaul-side {
  display: grid;
  gap: 14px;
}

.dispatch-map-sidecard {
  padding: 16px;
}

.dispatch-map-route-list,
.dispatch-map-anchor-list,
.dispatch-map-fill-list {
  display: grid;
  gap: 10px;
}

.dispatch-map-route-card {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fbfcfe;
}

.dispatch-map-route-card.active {
  border-color: rgba(198, 31, 54, 0.22);
  background: #fff9fa;
}

.dispatch-map-route-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.dispatch-map-route-card__head > div {
  display: grid;
  gap: 4px;
}

.dispatch-map-route-card__head strong {
  color: #162033;
}

.dispatch-map-route-card__head span {
  color: #697586;
}

.dispatch-map-anchor-row,
.dispatch-map-fill-row {
  display: grid;
  grid-template-columns: minmax(82px, 0.26fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #fbfcfe;
}

.dispatch-map-anchor-row > div,
.dispatch-map-fill-row > div {
  display: grid;
  gap: 4px;
}

.dispatch-map-anchor-row span,
.dispatch-map-anchor-row small,
.dispatch-map-fill-row span,
.dispatch-map-fill-row small {
  color: #697586;
}

.dispatch-map-fill-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.dispatch-map-overhaul-main {
  padding: 16px;
  min-height: 560px;
}

.dispatch-map-overhaul-stage {
  min-height: 500px;
}

.dispatch-map-side {
  display: grid;
  gap: 12px;
  align-content: start;
}

.dispatch-week-board {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.dispatch-week-grid {
  display: grid;
  grid-template-columns: 220px repeat(7, minmax(160px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.dispatch-week-tech-cell,
.dispatch-week-day-head,
.dispatch-week-cell {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #ffffff;
  padding: 12px 14px;
}

.dispatch-week-tech-card {
  display: grid;
  gap: 4px;
}

.dispatch-week-tech-card strong,
.dispatch-week-day-head strong,
.dispatch-week-cell strong {
  color: #162033;
}

.dispatch-week-tech-card span {
  color: #6a7687;
  font-size: 13px;
}

.dispatch-week-day-head.active,
.dispatch-week-cell.active {
  border-color: rgba(198, 33, 54, 0.28);
  background: #fff8f9;
}

.dispatch-week-cell.muted {
  opacity: 0.56;
}

.dispatch-week-cell {
  display: grid;
  gap: 10px;
  min-height: 132px;
}

.dispatch-week-cell-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

@media (max-width: 1180px) {
  .dispatch-v2-switcher {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .schedule-week-command-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-day-command-summary,
  .schedule-map-command-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dispatch-command-strip,
  .dispatch-bestfit-grid,
  .dispatch-bestfit-summary-grid {
    grid-template-columns: 1fr;
  }

  .dispatch-day-map-shell {
    grid-template-columns: 1fr;
  }

  .dispatch-week-grid {
    grid-template-columns: 1fr;
  }

  .dispatch-schedule-toolbar,
  .dispatch-map-toolbar {
    grid-template-columns: 1fr;
  }
}

.dispatch-focus-note {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fafbfc;
  color: #445063;
}

.dispatch-builder-grid,
.dispatch-review-grid,
.dispatch-tech-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.dispatch-bestfit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.dispatch-bestfit-table .dispatch-table-head,
.dispatch-bestfit-table .dispatch-table-row {
  grid-template-columns: 1.05fr 1fr 0.8fr 0.82fr;
}

.dispatch-bestfit-panel {
  gap: 14px;
}

.dispatch-bestfit-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dispatch-bestfit-suggestions {
  display: grid;
  gap: 12px;
}

.dispatch-bestfit-suggestion-card {
  padding: 16px 18px;
}

.dispatch-builder-next-step {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(198, 33, 54, 0.12);
  border-radius: 12px;
  background: #fff8f9;
}

.dispatch-builder-next-step strong {
  color: #162033;
}

.dispatch-builder-next-step span {
  color: #6a7687;
  font-size: 0.92rem;
}

.dispatch-builder-grid,
.dispatch-review-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.dispatch-tech-grid {
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
}

.dispatch-builder-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  align-items: start;
}

.dispatch-review-stack {
  display: grid;
  gap: 18px;
}

.dispatch-review-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dispatch-review-hero-copy {
  display: grid;
  gap: 8px;
}

.dispatch-review-stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.dispatch-review-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dispatch-review-summary-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #ffffff;
}

.dispatch-review-summary-item strong {
  color: #162033;
}

.dispatch-table-row-button {
  width: 100%;
  border: 0;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  align-items: center;
}

.dispatch-table-row-button:hover {
  background: #fafbfc;
}

.dispatch-row-action-label {
  color: #5b6678;
  font-size: 0.92rem;
  font-weight: 600;
}

.dispatch-review-settings-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dispatch-review-notes-field {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.dispatch-review-stop-list {
  display: grid;
  gap: 12px;
}

.dispatch-plan-stop-list,
.dispatch-pattern-list {
  display: grid;
  gap: 12px;
}

.dispatch-builder-day-shell {
  display: grid;
  gap: 14px;
}

.dispatch-builder-section {
  display: grid;
  gap: 12px;
}

.dispatch-builder-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.dispatch-builder-clear-target {
  width: auto;
  min-height: 32px;
  padding: 0 10px;
}

.dispatch-builder-summary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.dispatch-builder-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #ffffff;
}

.dispatch-builder-summary-row span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a7687;
}

.dispatch-builder-summary-row strong {
  color: #162033;
  text-align: right;
}

.dispatch-builder-rail-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.dispatch-builder-rail-tab {
  display: grid;
  gap: 3px;
  justify-items: center;
  padding: 8px 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #ffffff;
  color: #5b6678;
  font-size: 0.78rem;
  font-weight: 700;
}

.dispatch-builder-rail-tab strong {
  font-size: 0.88rem;
  color: #111827;
}

.dispatch-builder-rail-tab.active {
  border-color: rgba(198, 31, 54, 0.18);
  background: #fff7f8;
  color: #111827;
}

.dispatch-builder-rail-panel {
  display: grid;
  gap: 10px;
}

.dispatch-builder-work-list {
  gap: 8px;
}

.dispatch-builder-empty-slim {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px dashed rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: #fcfcfd;
}

.dispatch-builder-empty-slim strong {
  color: #162033;
}

.dispatch-builder-empty-slim span {
  color: #6a7687;
  font-size: 0.9rem;
  line-height: 1.45;
}

.dispatch-guardrail-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.dispatch-guardrail-strip.compact {
  margin-top: 6px;
}

.dispatch-guardrail-note.warning {
  border: 1px solid rgba(202, 138, 4, 0.18);
  background: #fff9eb;
  color: #7c5a02;
}

.dispatch-guardrail-note.danger {
  border: 1px solid rgba(198, 31, 54, 0.18);
  background: #fff3f5;
  color: #7f1d1d;
}

.dispatch-plan-stop-card.warning-row,
.dispatch-table-row.warning-row {
  border-color: rgba(198, 31, 54, 0.18);
  background: #fffafb;
}

.dispatch-plan-stop-card,
.dispatch-review-stop,
.dispatch-due-modal-grid article,
.dispatch-live-route-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  background: #ffffff;
}

.dispatch-plan-stop-main,
.dispatch-review-stop-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.dispatch-review-stop-top {
  display: grid;
  grid-template-columns: minmax(130px, 0.22fr) minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}

.dispatch-review-stop-sequence {
  display: grid;
  gap: 6px;
}

.dispatch-stop-sequence-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a8699;
}

.dispatch-review-stop-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.dispatch-review-stop-copy h4 {
  margin: 0;
}

.dispatch-review-stop-subline {
  margin: 0;
  color: #5b6678;
  font-size: 0.92rem;
}

.dispatch-review-stop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.dispatch-plan-stop-meta,
.dispatch-review-stop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dispatch-review-edit-grid {
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1.2fr) auto auto;
  align-items: end;
}

.dispatch-plan-stop-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.dispatch-live-route-card {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.dispatch-live-route-card h4 {
  margin: 0;
}

.dispatch-due-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.dispatch-due-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.34);
  cursor: pointer;
}

.dispatch-due-modal-card {
  position: relative;
  z-index: 1;
  width: min(880px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.dispatch-due-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.dispatch-due-modal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dispatch-due-modal-grid article {
  display: grid;
  gap: 6px;
}

.dispatch-due-modal-body {
  display: grid;
  gap: 12px;
}

.dispatch-due-modal-body .dispatch-focus-note strong {
  display: block;
  margin-bottom: 6px;
}

.dispatch-due-modal-body .dispatch-focus-note p {
  margin: 0;
}

.dispatch-due-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.dispatch-modal-close {
  width: auto;
}

.dispatch-map-shell {
  display: grid;
  gap: 12px;
}

.dispatch-map-canvas {
  min-height: 360px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  overflow: hidden;
  background: #eef3f7;
}

.dispatch-map-card .dispatch-map-canvas {
  min-height: 420px;
}

.dispatch-pattern-item {
  display: grid;
  gap: 4px;
}

.dispatch-v2-loading {
  width: 100%;
}

@media (max-width: 1180px) {
  .dispatch-filter-row,
  .dispatch-builder-toolbar,
  .dispatch-form-grid,
  .dispatch-stop-edit-grid,
  .dispatch-builder-grid,
  .dispatch-review-grid,
  .dispatch-tech-grid,
  .dispatch-focus-grid,
  .dispatch-review-summary-grid,
  .dispatch-review-settings-grid,
  .dispatch-review-edit-grid,
  .dispatch-table-head,
  .dispatch-table-row,
  .dispatch-table-shell.compact .dispatch-table-head,
  .dispatch-table-shell.compact .dispatch-table-row,
  .dispatch-tech-row {
    grid-template-columns: 1fr;
  }

  .dispatch-table-head {
    display: none;
  }

  .dispatch-table-row {
    gap: 10px;
  }

  .dispatch-v2-toolbar,
  .dispatch-focus-header,
  .dispatch-plan-stop-main,
  .dispatch-review-stop-top,
  .dispatch-review-hero {
    flex-direction: column;
  }

  .dispatch-review-stop-top {
    display: grid;
  }

  .dispatch-table-actions,
  .dispatch-review-stage-actions,
  .dispatch-review-stop-actions {
    justify-content: flex-start;
  }

  .dispatch-due-modal-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .dispatch-v2-switcher {
    grid-template-columns: 1fr 1fr;
  }

  .dispatch-v2-header-card,
  .dispatch-v2-section,
  .dispatch-focus-card,
  .dispatch-review-card,
  .dispatch-pattern-block {
    padding: 16px;
  }

  .dispatch-due-modal-card {
    width: calc(100vw - 20px);
    padding: 16px;
  }

  .dispatch-due-modal-grid {
    grid-template-columns: 1fr;
  }

  .dispatch-due-modal-header,
  .dispatch-due-modal-actions {
    flex-direction: column;
    align-items: stretch;
  }
}


/* Dispatch workspace cleanup: tighter signed-in shell, denser due-work list, clearer review sections */
body:has(section[data-panel="dispatch"]:not(.hidden)) .hero {
  padding: 14px 18px;
  min-height: auto;
}

body:has(section[data-panel="dispatch"]:not(.hidden)) .hero h1 {
  margin: 0 0 4px;
  font-size: 1.8rem;
  line-height: 1.02;
}

body:has(section[data-panel="dispatch"]:not(.hidden)) .hero-copy {
  max-width: 560px;
  font-size: 0.92rem;
}

body:has(section[data-panel="dispatch"]:not(.hidden)) .hero-side-note {
  max-width: 220px;
  font-size: 0.84rem;
}

body:has(section[data-panel="dispatch"]:not(.hidden)) .dashboard-shell {
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 10px;
}

body:has(section[data-panel="dispatch"]:not(.hidden)) .nav-shell {
  padding: 10px;
}

body:has(section[data-panel="dispatch"]:not(.hidden)) .nav-shell .tab,
body:has(section[data-panel="dispatch"]:not(.hidden)) .nav-shell-footer button {
  min-height: 38px;
  padding: 9px 12px;
}

body:has(section[data-panel="dispatch"]:not(.hidden)) .dashboard-toolbar {
  padding: 12px 16px;
}

body:has(section[data-panel="dispatch"]:not(.hidden)) .toolbar-copy-wrap h2 {
  font-size: 1.35rem;
}

body:has(section[data-panel="dispatch"]:not(.hidden)) .toolbar-copy-wrap p {
  margin-top: 4px;
  font-size: 0.92rem;
}

body:has(#ownerDashboard:not(.hidden)) .hero {
  padding: 18px 22px;
  min-height: auto;
}

body:has(#ownerDashboard:not(.hidden)) .hero h1 {
  margin: 0 0 6px;
  font-size: 2.1rem;
  line-height: 1.05;
}

body:has(#ownerDashboard:not(.hidden)) .hero-copy {
  max-width: 620px;
  margin: 0;
  font-size: 0.98rem;
}

body:has(#ownerDashboard:not(.hidden)) .hero-badges {
  display: none;
}

body:has(#ownerDashboard:not(.hidden)) .hero-side-note {
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 260px;
}

body:has(#ownerDashboard:not(.hidden)) .dashboard-shell {
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 12px;
}

body:has(#ownerDashboard:not(.hidden)) .nav-shell {
  padding: 12px;
}

body:has(#ownerDashboard:not(.hidden)) .nav-shell-copy {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

body:has(#ownerDashboard:not(.hidden)) .nav-shell .tab,
body:has(#ownerDashboard:not(.hidden)) .nav-shell-footer button {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 12px;
}

body:has(#ownerDashboard:not(.hidden)) .dashboard-toolbar {
  padding: 14px 18px;
}

body:has(#ownerDashboard:not(.hidden)) .toolbar-copy-wrap h2 {
  font-size: 1.55rem;
}

section[data-panel="dispatch"] .dispatch-v2-shell {
  gap: 12px;
}

section[data-panel="dispatch"] .dispatch-v2-header-card,
section[data-panel="dispatch"] .dispatch-v2-section {
  gap: 12px;
  padding: 14px 18px;
}

section[data-panel="dispatch"] .dispatch-v2-header-card h3 {
  margin: 2px 0 0;
  font-size: 1rem;
}

section[data-panel="dispatch"] .dispatch-shell-context {
  gap: 8px;
}

section[data-panel="dispatch"] .dispatch-shell-chip {
  min-width: 118px;
  padding: 8px 10px;
  border-radius: 10px;
}

section[data-panel="dispatch"] .dispatch-shell-chip strong {
  font-size: 0.88rem;
}

section[data-panel="dispatch"] .schedule-week-command-card {
  gap: 12px;
  padding: 14px 18px;
}

section[data-panel="dispatch"] .schedule-week-command-copy h4 {
  font-size: 1rem;
}

section[data-panel="dispatch"] .schedule-week-command-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
}

section[data-panel="dispatch"] .schedule-day-command-card,
section[data-panel="dispatch"] .schedule-map-command-card {
  gap: 12px;
  padding: 14px 18px;
}

section[data-panel="dispatch"] .schedule-day-command-copy h4,
section[data-panel="dispatch"] .schedule-map-command-copy h4 {
  font-size: 1rem;
}

section[data-panel="dispatch"] .schedule-day-command-button,
section[data-panel="dispatch"] .schedule-map-command-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
}

section[data-panel="dispatch"] .schedule-week-command-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

section[data-panel="dispatch"] .schedule-day-command-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

section[data-panel="dispatch"] .schedule-map-command-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

section[data-panel="dispatch"] .schedule-week-command-metric {
  min-height: 64px;
  padding: 8px 10px;
}

section[data-panel="dispatch"] .schedule-day-command-metric,
section[data-panel="dispatch"] .schedule-map-command-metric {
  min-height: 64px;
  padding: 8px 10px;
}

section[data-panel="dispatch"] .schedule-week-workbench {
  grid-template-columns: minmax(210px, 0.56fr) minmax(0, 1.55fr) minmax(250px, 0.78fr);
  gap: 12px;
  align-items: start;
}

section[data-panel="dispatch"] .schedule-week-sidebar,
section[data-panel="dispatch"] .schedule-week-main {
  gap: 12px;
}

section[data-panel="dispatch"] .schedule-week-card,
section[data-panel="dispatch"] .schedule-week-board-card {
  padding: 14px 16px;
  border-radius: 16px;
}

section[data-panel="dispatch"] .schedule-week-inspector .schedule-week-card {
  gap: 10px;
}

section[data-panel="dispatch"] .schedule-week-inspector .schedule-week-card:last-child {
  max-height: 520px;
  overflow: auto;
}

section[data-panel="dispatch"] .schedule-week-inspector .schedule-stop-card,
section[data-panel="dispatch"] .schedule-week-inspector .schedule-week-nearby-card {
  padding: 10px 12px;
  gap: 8px;
}

section[data-panel="dispatch"] .schedule-week-head-metrics {
  gap: 6px;
}

section[data-panel="dispatch"] .schedule-week-grid-wrap {
  overflow-x: auto;
  padding-bottom: 2px;
}

section[data-panel="dispatch"] .schedule-map-split {
  grid-template-columns: minmax(260px, 0.88fr) minmax(0, 1.12fr);
  gap: 14px;
  align-items: start;
}

section[data-panel="dispatch"] .schedule-map-route-items {
  display: grid;
  gap: 8px;
}

section[data-panel="dispatch"] .schedule-map-route-card {
  display: grid;
  gap: 4px;
  align-items: start;
  justify-items: start;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffffff;
  text-align: left;
}

section[data-panel="dispatch"] .schedule-map-route-card strong {
  font-size: 0.96rem;
}

section[data-panel="dispatch"] .schedule-map-route-card span,
section[data-panel="dispatch"] .schedule-map-route-card small {
  color: #6a7687;
}

section[data-panel="dispatch"] .schedule-map-route-card small {
  text-transform: capitalize;
}

section[data-panel="dispatch"] .schedule-map-canvas-card {
  padding: 14px 16px;
  border-radius: 16px;
}

section[data-panel="dispatch"] .schedule-map-stage {
  min-height: 440px;
}

@media (max-width: 1260px) {
  section[data-panel="dispatch"] .schedule-week-workbench,
  section[data-panel="dispatch"] .schedule-map-split {
    grid-template-columns: 1fr;
  }
}

section[data-panel="dispatch"] .dispatch-v2-switcher {
  align-items: stretch;
  margin-top: 10px;
}

section[data-panel="dispatch"] .dispatch-v2-tab {
  min-height: 44px;
  padding: 0 14px;
  font-size: 0.91rem;
  font-weight: 700;
  background: #fff;
  color: #384255;
}

section[data-panel="dispatch"] .dispatch-v2-tab.active {
  background: #fff7f8;
  color: #111827;
}

.routes-areas-shell {
  gap: 14px;
}

.routes-areas-catalog-shell,
.route-area-editor-shell {
  gap: 14px;
}

.routes-areas-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #ffffff;
}

.routes-areas-toolbar label {
  min-width: 160px;
}

.route-area-overview-card {
  gap: 12px;
}

.route-area-map-stage {
  min-height: 340px;
  border: 1px solid var(--line-color);
  border-radius: 16px;
  background: #f8fafc;
  overflow: hidden;
}

.route-area-map-stage.editor {
  min-height: 400px;
}

section[data-panel="routesareas"] .routes-areas-shell,
section[data-panel="routesareas"] .routes-areas-catalog-shell,
section[data-panel="routesareas"] .route-area-editor-shell {
  gap: 12px;
}

section[data-panel="routesareas"] .routes-areas-toolbar {
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
}

section[data-panel="routesareas"] .route-area-overview-card,
section[data-panel="routesareas"] .dispatch-v2-header-card,
section[data-panel="routesareas"] .dispatch-v2-section {
  padding: 16px 18px;
  border-radius: 16px;
}

section[data-panel="routesareas"] .route-area-map-stage {
  min-height: 320px;
  border-radius: 16px;
}

section[data-panel="routesareas"] .route-area-map-stage.editor {
  min-height: 380px;
}

.dispatch-slot-target-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: #fcfcfd;
}

.dispatch-slot-target-banner.active {
  border-style: solid;
  border-color: rgba(198, 31, 54, 0.18);
  background: #fff7f8;
}

.dispatch-slot-target-banner > div {
  display: grid;
  gap: 3px;
}

.dispatch-slot-target-banner strong {
  color: #162033;
}

.dispatch-slot-target-banner span {
  color: #6a7687;
  font-size: 0.84rem;
  line-height: 1.35;
}

.routes-areas-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.routes-areas-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-color);
  border-radius: 999px;
  background: #fff;
  color: var(--copy-muted);
  font-size: 0.86rem;
}

.routes-areas-legend-item i,
.routes-areas-color-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.16);
}

.routes-areas-head,
.routes-areas-row {
  grid-template-columns: minmax(220px, 1.2fr) minmax(130px, 0.7fr) minmax(220px, 1fr) minmax(220px, 1fr) 120px;
}

.routes-areas-row {
  cursor: pointer;
}

.routes-areas-row:hover {
  background: rgba(17, 24, 39, 0.025);
}

.route-area-modal-card {
  max-width: 1100px;
}

.route-area-map-card {
  gap: 14px;
}

.route-area-editor-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  align-items: start;
}

.route-area-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.route-area-circle-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.route-area-polygon-tools {
  display: grid;
  gap: 12px;
}

.route-area-point-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.route-area-point-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line-color);
  border-radius: 999px;
  background: #fff;
  color: var(--copy-muted);
  font-size: 0.82rem;
}

section[data-panel="dispatch"] .dispatch-due-view .dispatch-filter-row {
  grid-template-columns: minmax(130px, 0.7fr) minmax(140px, 0.78fr) minmax(140px, 0.82fr) minmax(150px, 0.85fr) minmax(240px, 1.35fr) auto;
  gap: 10px;
  align-items: end;
}

section[data-panel="dispatch"] .dispatch-due-view .dispatch-inline-actions {
  justify-self: end;
  flex-wrap: nowrap;
}

section[data-panel="dispatch"] .dispatch-due-view .dispatch-work-queue-search {
  min-width: 0;
}

section[data-panel="dispatch"] .dispatch-due-view .metric-strip {
  gap: 8px;
}

section[data-panel="dispatch"] .dispatch-due-view .metric-chip {
  padding: 6px 10px;
  font-size: 0.84rem;
}

section[data-panel="dispatch"] .dispatch-due-view .dispatch-table-shell {
  border-radius: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

section[data-panel="dispatch"] .dispatch-due-view .dispatch-table-head,
section[data-panel="dispatch"] .dispatch-due-view .dispatch-table-row {
  grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 1.1fr) minmax(140px, 0.85fr) minmax(170px, 1fr) minmax(140px, 0.8fr) minmax(180px, 0.95fr);
  min-width: 1120px;
}

section[data-panel="dispatch"] .dispatch-due-view .dispatch-table-head {
  padding: 12px 16px;
  background: #fafbfc;
}

section[data-panel="dispatch"] .dispatch-due-view .dispatch-table-row {
  padding: 12px 16px;
}

section[data-panel="dispatch"] .dispatch-due-view .dispatch-table-actions {
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}

section[data-panel="dispatch"] .dispatch-due-view .dispatch-table-actions button {
  min-width: 98px;
  padding-inline: 10px;
}

section[data-panel="dispatch"] .dispatch-due-view .dispatch-row-action-label {
  display: none;
}

section[data-panel="dispatch"] .dispatch-workqueue-filters {
  grid-template-columns: minmax(130px, 0.72fr) minmax(150px, 0.78fr) minmax(170px, 0.95fr) minmax(180px, 0.95fr) minmax(220px, 1.2fr);
  gap: 8px;
}

section[data-panel="dispatch"] .dispatch-workqueue-view .dispatch-v2-toolbar {
  align-items: end;
  gap: 10px;
}

section[data-panel="dispatch"] .dispatch-workqueue-view .dispatch-v2-toolbar > div:first-child {
  display: grid;
  gap: 4px;
  max-width: 580px;
}

section[data-panel="dispatch"] .dispatch-workqueue-view .dispatch-v2-toolbar h3,
section[data-panel="dispatch"] .dispatch-workqueue-view .dispatch-v2-toolbar p {
  margin: 0;
}

section[data-panel="dispatch"] .dispatch-workqueue-filters .dispatch-inline-actions {
  grid-column: 1 / -1;
  justify-self: stretch;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

section[data-panel="dispatch"] .dispatch-workqueue-actions > button {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.82rem;
}

section[data-panel="dispatch"] .dispatch-workqueue-daybar {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.4fr);
  gap: 12px;
  align-items: start;
}

section[data-panel="dispatch"] .dispatch-workqueue-daycopy {
  display: grid;
  gap: 6px;
}

section[data-panel="dispatch"] .dispatch-workqueue-daycopy h3,
section[data-panel="dispatch"] .dispatch-workqueue-daycopy p {
  margin: 0;
}

section[data-panel="dispatch"] .dispatch-workqueue-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

section[data-panel="dispatch"] .dispatch-workqueue-summary-grid .dispatch-review-summary-item small {
  color: #697586;
}

section[data-panel="dispatch"] .dispatch-workqueue-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 12px;
  align-items: start;
}

section[data-panel="dispatch"] .dispatch-workqueue-main,
section[data-panel="dispatch"] .dispatch-workqueue-sidecard {
  padding: 15px;
}

section[data-panel="dispatch"] .dispatch-workqueue-side {
  display: grid;
  gap: 12px;
}

section[data-panel="dispatch"] .dispatch-workqueue-explainer {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #f7fafc;
}

section[data-panel="dispatch"] .dispatch-workqueue-explainer strong,
section[data-panel="dispatch"] .dispatch-workqueue-explainer p {
  margin: 0;
}

section[data-panel="dispatch"] .dispatch-workqueue-explainer p {
  color: #697586;
}

section[data-panel="dispatch"] .dispatch-workqueue-stack {
  display: grid;
  gap: 10px;
}

section[data-panel="dispatch"] .dispatch-workqueue-stack.compact {
  gap: 8px;
}

section[data-panel="dispatch"] .dispatch-workqueue-anchor {
  display: grid;
  grid-template-columns: minmax(88px, 0.3fr) minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fbfcfe;
}

section[data-panel="dispatch"] .dispatch-workqueue-anchor-time,
section[data-panel="dispatch"] .dispatch-workqueue-anchor-copy {
  display: grid;
  gap: 4px;
}

section[data-panel="dispatch"] .dispatch-workqueue-anchor-time strong,
section[data-panel="dispatch"] .dispatch-workqueue-anchor-copy strong,
section[data-panel="dispatch"] .dispatch-workqueue-rail-item strong,
section[data-panel="dispatch"] .dispatch-workqueue-review strong {
  font-size: 0.95rem;
}

section[data-panel="dispatch"] .dispatch-workqueue-anchor-time span,
section[data-panel="dispatch"] .dispatch-workqueue-anchor-copy span,
section[data-panel="dispatch"] .dispatch-workqueue-rail-item span,
section[data-panel="dispatch"] .dispatch-workqueue-rail-item small,
section[data-panel="dispatch"] .dispatch-workqueue-review span,
section[data-panel="dispatch"] .dispatch-workqueue-review small {
  color: #697586;
}

section[data-panel="dispatch"] .dispatch-workqueue-rail-item {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #fbfcfe;
}

section[data-panel="dispatch"] .dispatch-workqueue-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #fbfcfe;
}

section[data-panel="dispatch"] .dispatch-workqueue-review > div {
  display: grid;
  gap: 4px;
}

section[data-panel="dispatch"] .dispatch-workqueue-main .dispatch-table-head,
section[data-panel="dispatch"] .dispatch-workqueue-main .dispatch-table-row {
  grid-template-columns: minmax(210px, 1.15fr) minmax(190px, 1fr) minmax(170px, 0.9fr) minmax(180px, 0.9fr);
  min-width: 0;
}

section[data-panel="dispatch"] .dispatch-workqueue-main .dispatch-table-cell span .metric-chip {
  margin-right: 6px;
  margin-bottom: 6px;
}

section[data-panel="dispatch"] .dispatch-workqueue-main .dispatch-table-actions {
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}

section[data-panel="dispatch"] .dispatch-workqueue-main .dispatch-table-actions button {
  min-width: 100px;
}

#refreshRoutesBtn,
#refreshPlanningRunsBtn,
#refreshCustomersBtn,
#refreshTechniciansBtn,
#refreshAppointmentsBtn,
#refreshReportsBtn,
#refreshProductsBtn,
#refreshBillingBtn,
#refreshOutboxBtn,
#refreshVehiclesBtn,
#refreshEquipmentBtn,
#refreshChemicalsBtn {
  display: none !important;
}

section[data-panel="dispatch"] .dispatch-builder-intro {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fafbfc;
}

section[data-panel="dispatch"] .dispatch-builder-intro p {
  margin: 0;
  color: #445063;
}

section[data-panel="dispatch"] .dispatch-builder-toolbar {
  grid-template-columns: minmax(150px, 0.78fr) minmax(170px, 0.92fr) minmax(220px, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

section[data-panel="dispatch"] .dispatch-builder-toolbar .dispatch-inline-actions {
  justify-self: end;
}

section[data-panel="dispatch"] .dispatch-builder-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}

section[data-panel="dispatch"] .dispatch-builder-day-shell .dispatch-inline-actions {
  justify-content: flex-start;
}

section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-card {
  padding: 16px;
  border-radius: 16px;
}

section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-empty {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-empty-actions {
  justify-content: flex-end;
}

section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-picker-head,
section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-picker-row {
  grid-template-columns: 1fr 1fr 0.9fr 0.62fr;
}

section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 14px;
  align-items: start;
}

section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-stage-actions > * {
  width: auto;
  min-width: 168px;
}

section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-stage-actions > button[disabled] {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
  color: #8a95a6;
  box-shadow: none;
}

section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-summary-item {
  padding: 12px 14px;
}

section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-settings-grid {
  grid-template-columns: minmax(200px, 1fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) minmax(170px, 0.85fr);
  gap: 12px;
}

section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-stop-list {
  gap: 10px;
}

section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-stop {
  padding: 12px 14px;
}

section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-stop-top {
  grid-template-columns: minmax(96px, 0.18fr) minmax(0, 1fr) auto;
  gap: 12px;
}

section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-edit-grid {
  grid-template-columns: minmax(160px, 0.8fr) minmax(220px, 1.15fr) auto auto;
  gap: 10px;
}

section[data-panel="dispatch"] .dispatch-review-view .map-card {
  min-height: 460px;
}

section[data-panel="dispatch"] .dispatch-review-view #dispatchReviewMap {
  min-height: 400px;
}

@media (max-width: 1260px) {
  body:has(section[data-panel="dispatch"]:not(.hidden)) .dashboard-shell {
    grid-template-columns: 1fr;
  }

  body:has(#ownerDashboard:not(.hidden)) .dashboard-shell {
    grid-template-columns: 1fr;
  }

  body:has(#ownerDashboard:not(.hidden)) .nav-shell {
    padding: 12px;
  }

  section[data-panel="dispatch"] .dispatch-due-view .dispatch-filter-row,
  section[data-panel="dispatch"] .dispatch-workqueue-daybar,
  section[data-panel="dispatch"] .dispatch-workqueue-layout,
  section[data-panel="dispatch"] .dispatch-schedule-hero,
  section[data-panel="dispatch"] .dispatch-schedule-toolbar,
  .dispatch-map-overhaul-layout,
  section[data-panel="dispatch"] .dispatch-builder-toolbar,
  section[data-panel="dispatch"] .dispatch-builder-grid,
  section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-empty,
  section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-hero,
  section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-summary-grid,
  section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-picker-head,
  section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-picker-row,
  section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-settings-grid {
    grid-template-columns: 1fr;
  }

  section[data-panel="dispatch"] .dispatch-due-view .dispatch-inline-actions,
  section[data-panel="dispatch"] .dispatch-builder-toolbar .dispatch-inline-actions,
  section[data-panel="dispatch"] .dispatch-review-view .dispatch-review-empty-actions {
    justify-self: stretch;
    justify-content: stretch;
  }

  section[data-panel="dispatch"] .dispatch-workqueue-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Routes & areas workspace cleanup */
.dispatch-technicians-view .dispatch-tech-grid {
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.3fr);
  align-items: start;
}

.dispatch-tech-roster-card,
.dispatch-tech-stage-card {
  padding: 18px;
}

.dispatch-tech-head {
  grid-template-columns: 1.15fr 0.9fr 1fr 0.72fr;
}

.dispatch-tech-row {
  grid-template-columns: 1.15fr 0.9fr 1fr 0.72fr;
  align-items: center;
}

.dispatch-tech-summary {
  display: grid;
  gap: 10px;
  padding: 0 0 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.dispatch-tech-summary h3 {
  margin: 0;
}

.dispatch-tech-capacity-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dispatch-tech-pattern-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dispatch-pattern-note-field {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.dispatch-pattern-head {
  grid-template-columns: 1.1fr 0.9fr 0.85fr 1.15fr;
}

.dispatch-pattern-row {
  grid-template-columns: 1.1fr 0.9fr 0.85fr 1.15fr;
}

.dispatch-tech-stage-card .dispatch-pattern-block {
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #fff;
}

.dispatch-tech-stage-card {
  display: grid;
  gap: 16px;
}

.dispatch-tech-stage-card .metric-strip {
  gap: 8px;
}

.dispatch-tech-stage-card .metric-chip {
  padding: 6px 10px;
  font-size: 0.84rem;
}

@media (max-width: 1260px) {
  .dispatch-technicians-view .dispatch-tech-grid,
  .dispatch-tech-capacity-grid,
  .dispatch-tech-pattern-form,
  .dispatch-tech-head,
  .dispatch-tech-row,
  .dispatch-pattern-head,
  .dispatch-pattern-row {
    grid-template-columns: 1fr;
  }
}

.dispatch-tech-grid {
  grid-template-columns: minmax(340px, 0.88fr) minmax(0, 1.42fr);
  align-items: start;
}

.dispatch-tech-roster-card .dispatch-table-body {
  display: grid;
  gap: 8px;
}

.dispatch-tech-row.active {
  border-color: rgba(198, 31, 54, 0.18);
  background: #fcfdff;
}

.dispatch-tech-stage-card {
  gap: 18px;
}

.dispatch-tech-overview-grid,
.dispatch-tech-helper-grid,
.dispatch-focus-usage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dispatch-tech-overview-card,
.dispatch-tech-helper-card {
  display: grid;
  gap: 6px;
  padding: 14px 15px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fbfcfd;
}

.dispatch-tech-overview-card h4,
.dispatch-tech-helper-card strong {
  margin: 0;
}

.dispatch-tech-helper-card span,
.dispatch-tech-overview-card .route-fine-print {
  color: var(--text-soft);
  line-height: 1.45;
}

.dispatch-tech-helper-note {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(198, 31, 54, 0.12);
  border-radius: 14px;
  background: #fff8f9;
}

.dispatch-tech-helper-note strong {
  color: var(--text);
}

.dispatch-tech-helper-note span {
  color: var(--text-soft);
  line-height: 1.5;
}

.dispatch-tech-rhythm-wrap {
  display: grid;
  gap: 12px;
}

.dispatch-tech-rhythm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dispatch-tech-rhythm-item {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #ffffff;
}

.dispatch-tech-rhythm-item div {
  display: grid;
  gap: 3px;
}

.dispatch-tech-rhythm-item span {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.dispatch-focus-area-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dispatch-tech-stage-card .dispatch-pattern-block {
  gap: 14px;
}

.dispatch-tech-stage-card .dispatch-focus-header.compact {
  margin-bottom: 0;
}

@media (max-width: 1260px) {
  .dispatch-tech-overview-grid,
  .dispatch-tech-helper-grid,
  .dispatch-focus-usage-grid,
  .dispatch-tech-rhythm,
  .dispatch-focus-area-form {
    grid-template-columns: 1fr;
  }

  .dispatch-tech-rhythm-item {
    grid-template-columns: 1fr;
  }
}

.pc-hidden-field {
  display: none !important;
}

.technician-management-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.technician-management-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 1.25rem;
}

.technician-management-card--full {
  grid-column: 1 / -1;
}

.technician-management-card__header {
  margin-bottom: 1rem;
}

.technician-management-card__header h3 {
  margin: 0.2rem 0 0.35rem;
}

.technician-management-card__header p {
  margin: 0;
  color: #6b7280;
}

.technician-management-card__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.technician-asset-form-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.technician-asset-form-grid--wide {
  grid-column: 1 / -1;
}

.technician-management-list {
  margin-top: 1rem;
}

.technician-management-list--stacked {
  display: grid;
  gap: 0.85rem;
}

.technician-management-table {
  border: 1px solid #eef0f3;
  border-radius: 14px;
  overflow: hidden;
}

.technician-management-table__head,
.technician-management-table__row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 2fr 1.25fr 1fr 1fr;
  padding: 0.8rem 0.95rem;
}

.technician-management-table__head {
  background: #f8fafc;
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.technician-management-table__row {
  align-items: center;
  border-top: 1px solid #eef0f3;
}

.technician-management-table__row strong,
.assigned-asset-card strong,
.technician-list-row strong {
  display: block;
}

.technician-management-table__row span,
.technician-list-row p,
.assigned-asset-card p,
.technician-log-card p {
  color: #6b7280;
}

.technician-management-empty {
  color: #6b7280;
  padding: 1rem 0;
}

.assigned-asset-card {
  align-items: flex-start;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
}

.assigned-asset-card__meta {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  white-space: nowrap;
}

.technician-log-card {
  border: 1px solid #eef0f3;
  border-radius: 14px;
  padding: 0.95rem 1rem;
}

.technician-log-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: #6b7280;
  font-size: 0.85rem;
  margin-bottom: 0.45rem;
}

.technician-log-card__type {
  color: #b91c1c;
  font-weight: 700;
  text-transform: capitalize;
}

.technician-log-card__miles {
  font-weight: 600;
}

.technician-list-row {
  cursor: pointer;
}

.technician-list-row:hover {
  background: #fafafa;
}

@media (max-width: 1100px) {
  .technician-management-grid {
    grid-template-columns: 1fr;
  }

  .technician-management-table__head,
  .technician-management-table__row {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .technician-asset-form-grid,
  .technician-management-table__head,
  .technician-management-table__row {
    grid-template-columns: 1fr;
  }

  .assigned-asset-card {
    flex-direction: column;
  }

  .assigned-asset-card__meta {
    align-items: flex-start;
  }
}

.asset-workspace__header {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.asset-workspace__toolbar {
  margin: 0.75rem 0 1rem;
}

.asset-summary-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.asset-summary-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
}

.asset-summary-card__label {
  color: #6b7280;
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.asset-summary-card strong {
  display: block;
  font-size: 1.4rem;
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.asset-summary-card p {
  color: #6b7280;
  margin: 0;
}

.asset-summary-card--warning {
  border-color: #fbbf24;
}

.asset-summary-card--danger {
  border-color: #ef4444;
}

.asset-summary-card--muted {
  border-color: #d1d5db;
}

.asset-record-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
}

.asset-record-list .data-list-item {
  list-style: none;
}

.asset-record-button {
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(130px, 1fr)) minmax(170px, 1.15fr);
  align-items: start;
}

.asset-record-cell-stack,
.asset-record-status {
  display: grid;
  gap: 4px;
}

.asset-record-cell-stack strong,
.asset-record-status .maintenance-badge {
  justify-self: flex-start;
}

.asset-record-button .route-fine-print {
  margin: 0;
}

.asset-workspace .customer-workspace__header-actions,
.asset-workspace .customer-editor-actions,
.asset-workspace .company-asset-modal__footer,
.asset-workspace .company-asset-modal__timeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.asset-workspace .customer-workspace__header-actions > button,
.asset-workspace .customer-editor-actions > button,
.asset-workspace .company-asset-modal__footer > button,
.asset-workspace .company-asset-modal__timeline-actions > button,
.asset-record-list button {
  width: auto;
  min-height: 40px;
  padding: 10px 14px;
  font-size: 0.92rem;
  line-height: 1.15;
  border-radius: 12px;
}

.asset-workspace .customer-workspace__header-actions > button:last-child {
  min-width: 126px;
}

[data-panel="routesareas"] .dispatch-v2-header-card,
[data-panel="routesareas"] .dispatch-v2-section,
[data-panel="routesareas"] .dispatch-focus-card,
[data-panel="routesareas"] .dispatch-review-card,
[data-panel="routesareas"] .dispatch-pattern-block {
  padding: 18px 20px;
  border-radius: 16px;
}

[data-panel="routesareas"] .dispatch-v2-root {
  display: grid;
  gap: 14px;
}

[data-panel="routesareas"] .dispatch-tech-grid,
[data-panel="routesareas"] .dispatch-tech-overview-grid,
[data-panel="routesareas"] .dispatch-tech-helper-grid,
[data-panel="routesareas"] .dispatch-focus-usage-grid {
  gap: 10px;
}

[data-panel="routesareas"] .dispatch-tech-summary {
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
}

[data-panel="routesareas"] .dispatch-table-head {
  padding: 12px 16px;
}

[data-panel="routesareas"] .dispatch-table-row {
  padding: 12px 16px;
}

[data-panel="routesareas"] .dispatch-tech-overview-card,
[data-panel="routesareas"] .dispatch-tech-helper-card,
[data-panel="routesareas"] .dispatch-tech-rhythm-item {
  padding: 12px 13px;
  border-radius: 12px;
}

[data-panel="routesareas"] .dispatch-tech-helper-note {
  padding: 12px 14px;
  border-radius: 12px;
}

[data-panel="routesareas"] .dispatch-tech-row .dispatch-table-actions button,
[data-panel="routesareas"] .dispatch-inline-actions button,
[data-panel="routesareas"] .dispatch-focus-area-form button,
[data-panel="routesareas"] .dispatch-pattern-block button {
  width: auto;
  min-height: 40px;
  padding: 10px 14px;
  font-size: 0.92rem;
  border-radius: 12px;
}

.maintenance-badge {
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
}

.maintenance-badge--good {
  color: #15803d;
}

.maintenance-badge--soon {
  color: #b45309;
}

.maintenance-badge--overdue,
.maintenance-badge--incident {
  color: #b91c1c;
}

.asset-editor-shell {
  display: grid;
  gap: 1rem;
}

.asset-editor-grid {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 1.2rem;
}

.asset-editor-log-list {
  display: grid;
  gap: 0.8rem;
}

.asset-log-inline {
  align-items: center;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
}

.asset-log-inline p,
.company-asset-modal__summary p,
.company-asset-modal__notes p {
  color: #6b7280;
  margin: 0.2rem 0 0;
}

.company-asset-modal__card {
  max-width: 760px;
}

.company-asset-modal__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.company-asset-modal__grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.company-asset-modal__grid article,
.company-asset-modal__notes,
.company-asset-modal__logs {
  border: 1px solid #eef0f3;
  border-radius: 14px;
  padding: 0.9rem 1rem;
}

.company-asset-modal__editor {
  border: 1px solid #eef0f3;
  border-radius: 14px;
  margin-bottom: 1rem;
  padding: 0.95rem 1rem;
}

.company-asset-modal__editor-head {
  margin-bottom: 0.85rem;
}

.company-asset-modal__editor-head h4 {
  margin: 0.2rem 0 0;
}

.company-asset-modal__editor-grid,
.company-asset-modal__timeline-form {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.company-asset-modal__editor-grid label,
.company-asset-modal__timeline-form label {
  color: #374151;
  display: grid;
  font-size: 0.92rem;
  font-weight: 600;
  gap: 0.35rem;
}

.company-asset-modal__editor-grid input,
.company-asset-modal__editor-grid select,
.company-asset-modal__editor-grid textarea,
.company-asset-modal__timeline-form input,
.company-asset-modal__timeline-form select {
  width: 100%;
}

.company-asset-modal__editor-wide {
  grid-column: 1 / -1;
}

.company-asset-modal__timeline {
  margin-top: 0.2rem;
}

.company-asset-modal__timeline-actions {
  align-items: end;
  display: flex;
}

.company-asset-modal__assignment-list {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.company-asset-modal__assignment-row {
  align-items: center;
  background: #fbfcfd;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.8rem 0.9rem;
}

.company-asset-modal__assignment-row > div {
  display: grid;
  gap: 0.2rem;
}

.company-asset-modal__assignment-row p {
  color: #6b7280;
  margin: 0;
}

.company-asset-modal__assignment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.company-asset-modal__assignment-row button,
.company-asset-modal__timeline-actions button {
  min-height: 38px;
  padding: 9px 13px;
  width: auto;
}

.company-asset-modal__assignment-form {
  margin-top: 0.15rem;
}

.company-asset-modal__footer {
  display: flex;
  justify-content: space-between;
}

.technician-maintenance-summary {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

@media (max-width: 1100px) {
  .asset-summary-grid,
  .technician-maintenance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .asset-summary-grid,
  .technician-maintenance-summary,
  .company-asset-modal__grid {
    grid-template-columns: 1fr;
  }

  .asset-log-inline,
  .company-asset-modal__assignment-row,
  .company-asset-modal__summary,
  .company-asset-modal__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .company-asset-modal__editor-grid,
  .company-asset-modal__timeline-form {
    grid-template-columns: 1fr;
  }
}

.technician-capability-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  margin-bottom: 1rem;
  padding: 1.1rem 1.2rem;
}

.technician-capability-row {
  align-items: flex-start;
}

.technician-capability-row .assigned-asset-card__meta {
  gap: 0.5rem;
}

.capability-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.capability-strip.compact {
  justify-content: flex-end;
  margin-top: 0;
}

.dispatch-capability-hint {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
}

.dispatch-capability-hint__header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.dispatch-capability-hint__header h3 {
  margin: 0;
}

.dispatch-capability-hint__warnings {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.dispatch-capability-hint__warning {
  background: #fff8f1;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  color: #9a3412;
  margin: 0;
  padding: 0.65rem 0.8rem;
}

.dispatch-capability-hint__warning.is-blocking {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

@media (max-width: 760px) {
  .dispatch-capability-hint__header {
    flex-direction: column;
  }

  .capability-strip.compact {
    justify-content: flex-start;
  }
}


/* asset inventory enhancements */
.asset-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

@media (max-width: 1120px) {
  .asset-record-button {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-record-button .customer-table-primary,
  .asset-record-button .asset-record-status {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .asset-record-button {
    grid-template-columns: 1fr;
  }
}

.maintenance-badge--muted {
  color: #6b7280;
}

.company-asset-modal__summary {
  align-items: flex-start;
}

.company-asset-modal__summary-copy {
  flex: 1 1 auto;
}

.company-asset-modal__summary-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.company-asset-modal__footer {
  gap: 0.75rem;
}

.technician-maintenance-summary {
  gap: 1rem;
}

.technician-maintenance-summary__cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.technician-maintenance-list {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  display: grid;
  gap: 0.8rem;
  padding: 1rem 1.1rem;
}

.technician-maintenance-row {
  align-items: flex-start;
  border-bottom: 1px solid #eef0f3;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: 0.8rem;
}

.technician-maintenance-row > div {
  flex: 1 1 0;
  min-width: 0;
}

.technician-maintenance-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.technician-maintenance-row p {
  color: #6b7280;
  margin: 0.2rem 0 0;
}

@media (max-width: 900px) {
  .technician-maintenance-summary__cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .technician-maintenance-row {
    flex-direction: column;
  }

  .company-asset-modal__summary-badges {
    justify-content: flex-start;
  }
}

@media (max-width: 1100px) {
  .route-area-editor-grid {
    grid-template-columns: 1fr;
  }

  .routes-areas-head,
  .routes-areas-row {
    grid-template-columns: minmax(180px, 1.2fr) minmax(120px, 0.7fr) minmax(180px, 1fr) minmax(180px, 1fr) 110px;
  }
}

@media (max-width: 820px) {
  .routes-areas-head {
    display: none;
  }

  .routes-areas-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .route-area-form-grid,
  .route-area-circle-grid {
    grid-template-columns: 1fr;
  }
}

.dispatch-calendar-resize-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px dashed rgba(15, 23, 42, 0.14);
  background: #f8fafc;
  color: #4a5565;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: ns-resize;
  user-select: none;
}

.dispatch-calendar-resize-strip strong {
  font-size: 0.74rem;
  color: #162033;
}

.dispatch-calendar-resize-strip:hover {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.2);
}

.dispatch-calendar-travel-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(14, 116, 144, 0.08), rgba(14, 116, 144, 0.02));
  border: 1px solid rgba(14, 116, 144, 0.14);
  font-size: 0.76rem;
  color: #285067;
}

.dispatch-calendar-travel-band strong {
  color: #10354d;
  font-size: 0.77rem;
}

.dispatch-calendar-travel-band.is-overlap {
  background: linear-gradient(90deg, rgba(198, 31, 54, 0.08), rgba(198, 31, 54, 0.02));
  border-color: rgba(198, 31, 54, 0.18);
  color: #9f1239;
}

.dispatch-builder-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.78fr) minmax(300px, 0.74fr);
  gap: 14px;
  align-items: start;
}

.dispatch-builder-main-panel {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.dispatch-builder-side-panel {
  position: static;
  align-self: start;
}

.dispatch-builder-sidecard {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fbfcfe;
}

.dispatch-builder-rail-card {
  background: #fbfcfd;
}

.dispatch-builder-topbar {
  gap: 10px;
  padding: 12px 14px;
}

.dispatch-builder-topbar .dispatch-focus-header {
  align-items: end;
}

.dispatch-builder-topbar h3 {
  margin: 2px 0 0;
  font-size: 1.12rem;
}

.dispatch-builder-topbar .route-fine-print {
  margin-top: 2px;
  font-size: 0.82rem;
}

.dispatch-builder-route-card,
.dispatch-builder-work-card {
  padding: 12px 14px;
}

.dispatch-builder-route-card .dispatch-focus-header,
.dispatch-builder-work-card .dispatch-focus-header {
  margin-bottom: 6px;
}

.dispatch-week-board {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.dispatch-week-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(340px, 0.8fr);
  gap: 14px;
  margin-top: 10px;
  align-items: start;
}

.dispatch-week-workbench-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.dispatch-week-map-panel {
  position: sticky;
  top: 72px;
  align-self: start;
  display: grid;
  gap: 12px;
}

.dispatch-week-map-panel .dispatch-review-map-stage {
  min-height: 420px;
}

.dispatch-week-grid {
  display: grid;
  grid-template-columns: 190px repeat(7, minmax(140px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.dispatch-week-day-head,
.dispatch-week-tech-card,
.dispatch-week-cell {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #ffffff;
}

.dispatch-week-day-head {
  padding: 10px 12px;
  background: #fbfcfd;
}

.dispatch-week-day-head.active {
  background: #fff7f8;
  border-color: rgba(198, 31, 54, 0.18);
}

.dispatch-week-tech-cell {
  font-size: 0.84rem;
}

.dispatch-week-tech-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  align-content: start;
}

.dispatch-week-tech-card strong {
  color: #162033;
  font-size: 0.92rem;
}

.dispatch-week-tech-card span {
  color: #6a7687;
  line-height: 1.35;
}

.dispatch-week-cell {
  display: grid;
  gap: 8px;
  padding: 10px 10px 11px;
  align-content: start;
}

.dispatch-week-cell.active {
  border-color: rgba(198, 31, 54, 0.18);
  background: #fffdfd;
}

.dispatch-week-cell.dragover {
  border-color: rgba(31, 122, 99, 0.34);
  background: #f4fbf8;
  box-shadow: inset 0 0 0 1px rgba(31, 122, 99, 0.12);
}

.dispatch-week-cell.muted {
  opacity: 0.58;
}

.dispatch-week-cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dispatch-week-cell strong {
  color: #162033;
  font-size: 0.9rem;
  line-height: 1.3;
}

.dispatch-week-cell .route-fine-print {
  font-size: 0.78rem;
}

.dispatch-week-cell .dispatch-inline-actions.compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.dispatch-week-cell .dispatch-inline-actions.compact button {
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  font-size: 0.78rem;
}

.dispatch-week-stop-list {
  display: grid;
  gap: 6px;
}

.dispatch-week-stop {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: #fbfcfd;
  cursor: grab;
}

.dispatch-week-stop strong {
  color: #162033;
  font-size: 0.76rem;
}

.dispatch-week-stop span {
  color: #6a7687;
  font-size: 0.76rem;
  line-height: 1.3;
}

.dispatch-week-drop-note {
  padding: 8px 9px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  background: #fcfcfd;
  color: #6a7687;
  font-size: 0.78rem;
  line-height: 1.35;
}

@media (max-width: 1320px) {
  .dispatch-week-workbench {
    grid-template-columns: 1fr;
  }

  .dispatch-week-map-panel {
    position: static;
  }
}

.route-area-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 2px;
}

.route-area-guide-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #ffffff;
}

.route-area-guide-card.subtle {
  background: #fbfcfe;
}

.route-area-guide-card h4 {
  margin: 0;
  color: #162033;
  font-size: 0.96rem;
}

.route-area-guide-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #546173;
  font-size: 0.84rem;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .dispatch-week-grid {
    grid-template-columns: 170px repeat(7, minmax(120px, 1fr));
  }

  .route-area-guide-grid {
    grid-template-columns: 1fr;
  }
}

.dispatch-builder-sidecard .dispatch-review-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dispatch-builder-side-actions {
  grid-template-columns: 1fr;
}

.dispatch-builder-side-actions > button {
  width: 100%;
}

@media (max-width: 1280px) {
  .dispatch-builder-workbench {
    grid-template-columns: 1fr;
  }

  .dispatch-builder-side-panel {
    position: static;
  }
}
.schedule-week-workbench {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.schedule-week-sidebar,
.schedule-week-inspector {
  display: grid;
  gap: 16px;
}

.schedule-week-main {
  min-width: 0;
}

.schedule-week-card,
.schedule-week-board-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.schedule-week-card h3,
.schedule-week-board-card h3 {
  margin: 0;
}

.schedule-week-card p,
.schedule-week-board-card p {
  color: #6a7687;
}

.schedule-week-sidebar-card {
  gap: 12px;
}

.schedule-week-controls-grid {
  display: grid;
  gap: 10px;
}

.schedule-week-sidebar-card label {
  display: grid;
  gap: 6px;
}

.schedule-week-sidebar-card label span {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a7687;
}

.schedule-week-sidebar-card select {
  margin-bottom: 0;
}

.schedule-week-card label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a7687;
}

.schedule-week-card select {
  width: 100%;
  margin-bottom: 12px;
}

.schedule-week-filter-note {
  display: grid;
  gap: 4px;
  font-size: 0.9rem;
  color: #5b6678;
}

.schedule-week-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.schedule-week-actions-inline button {
  flex: 1 1 120px;
}

.schedule-week-board-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.schedule-week-head-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.schedule-week-grid-wrap {
  overflow-x: auto;
}

.schedule-week-grid {
  display: grid;
  grid-template-columns: 180px repeat(5, minmax(180px, 1fr));
  gap: 10px;
  min-width: 1100px;
}

.schedule-week-grid-corner,
.schedule-week-day-head,
.schedule-week-tech-cell,
.schedule-week-board-cell {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #fbfcfd;
}

.schedule-week-grid-corner,
.schedule-week-tech-cell {
  padding: 16px;
}

.schedule-week-grid-corner {
  display: flex;
  align-items: center;
  font-weight: 700;
  color: #162033;
}

.schedule-week-day-head {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  text-align: left;
  background: #ffffff;
}

.schedule-week-day-head strong {
  color: #162033;
}

.schedule-week-day-head span {
  color: #6a7687;
  font-size: 0.92rem;
}

.schedule-week-day-head.is-active,
.schedule-week-board-cell.is-selected {
  border-color: rgba(198, 33, 54, 0.25);
  background: #fff8f8;
}

.schedule-week-tech-cell {
  display: grid;
  gap: 4px;
  align-content: start;
}

.schedule-week-tech-cell strong {
  color: #162033;
}

.schedule-week-tech-cell span {
  color: #6a7687;
  font-size: 0.92rem;
}

.schedule-week-board-cell {
  padding: 12px;
  min-height: 182px;
}

.schedule-week-plan-card,
.schedule-week-empty {
  width: 100%;
  min-height: 100%;
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 12px;
  background: #ffffff !important;
  box-shadow: none !important;
  text-align: left;
}

.schedule-week-empty {
  place-items: center;
  justify-items: start;
  color: #6a7687 !important;
  background: #f8fafc !important;
}

.schedule-week-plan-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.schedule-week-plan-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #162033;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: capitalize;
}

.schedule-week-plan-status.is-published {
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
}

.schedule-week-plan-status.is-draft {
  background: rgba(198, 33, 54, 0.1);
  color: #c62136;
}

.schedule-week-plan-stack {
  display: grid;
  gap: 8px;
}

.schedule-week-stop-chip {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f8fafc;
  color: #5b6678;
  font-size: 0.84rem;
}

.schedule-week-stop-chip b {
  color: #162033;
  font-size: 0.88rem;
}

.schedule-week-more {
  color: #6a7687;
  font-size: 0.84rem;
}

.schedule-week-stat-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.schedule-week-stat-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.schedule-week-stat-list span {
  color: #6a7687;
}

.schedule-week-stat-list strong {
  color: #162033;
}

.schedule-week-nearby-list {
  display: grid;
  gap: 10px;
}

.schedule-week-nearby-card,
.schedule-week-empty-note {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fbfcfd;
}

.schedule-week-nearby-card strong,
.schedule-week-empty-note strong {
  color: #162033;
}

.schedule-week-nearby-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.schedule-week-nearby-card p,
.schedule-week-empty-note span,
.schedule-week-nearby-card small {
  margin: 0;
  color: #6a7687;
}

.schedule-week-stop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.schedule-week-stop-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f8fafc;
  color: #5b6678;
  font-size: 0.8rem;
}

.schedule-week-summary-note {
  margin: 12px 0 0;
  color: #6a7687;
  font-size: 0.88rem;
}

.schedule-week-signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.schedule-week-signal-grid article {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.schedule-week-signal-grid span {
  color: #6a7687;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.schedule-week-signal-grid strong {
  width: fit-content;
}

.schedule-week-signal-grid small {
  color: #5b6678;
  line-height: 1.45;
}

.schedule-ai-preview-card {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #f8fafc;
  margin-bottom: 12px;
}

.schedule-ai-preview-copy,
.schedule-ai-preview-note {
  margin: 0;
  color: #5b6678;
  font-size: 0.9rem;
  line-height: 1.45;
}

.schedule-ai-preview-impact {
  margin: 0;
  padding: 9px 11px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #445064;
  font-size: 0.86rem;
  line-height: 1.45;
}

.schedule-ai-preview-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.schedule-ai-preview-summary article {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.schedule-ai-preview-summary span {
  color: #6a7687;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.schedule-ai-preview-summary strong {
  color: #162033;
}

.schedule-ai-preview-list {
  display: grid;
  gap: 8px;
}

.schedule-ai-preview-header-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.schedule-ai-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-ai-preview-actions button {
  flex: 1 1 180px;
}

.schedule-ai-preview-item {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.schedule-ai-preview-item-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.schedule-ai-preview-item strong {
  color: #162033;
}

.schedule-ai-preview-item span,
.schedule-ai-preview-item small {
  color: #6a7687;
}

.schedule-ai-preview-strategy,
.schedule-ai-preview-reasons,
.schedule-ai-preview-booking,
.schedule-ai-preview-handoff {
  margin: 0;
  color: #5b6678;
  font-size: 0.84rem;
  line-height: 1.45;
}

.schedule-ai-preview-compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.schedule-ai-preview-compare article {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.schedule-ai-preview-compare span {
  color: #6a7687;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.schedule-ai-preview-compare strong {
  color: #162033;
}

.schedule-ai-confidence {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.08);
  color: #162033;
  white-space: nowrap;
}

.schedule-ai-confidence--high,
.schedule-ai-confidence--open {
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
}

.schedule-ai-confidence--medium,
.schedule-ai-confidence--limited,
.schedule-ai-confidence--hold {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.schedule-ai-confidence--review {
  background: rgba(198, 33, 54, 0.12);
  color: #c62136;
}

.customer-rule-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-rule-chip-row--wide {
  gap: 10px;
}

.customer-rule-chip {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  color: #1f2937;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.customer-rule-chip:hover {
  border-color: rgba(198, 31, 54, 0.22);
  background: #fff7f8;
}

.customer-rule-chip.active {
  background: #fdf2f4;
  border-color: rgba(198, 31, 54, 0.26);
  color: #b42332;
  box-shadow: 0 0 0 1px rgba(198, 31, 54, 0.06);
}

.portal-review-queue-list {
  display: grid;
  gap: 14px;
}

.portal-review-queue-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.portal-review-queue-summary-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

.portal-review-queue-summary-card small,
.portal-review-queue-summary-card span {
  color: #6b7280;
}

.portal-review-queue-summary-card strong {
  font-size: 1.32rem;
  color: #162033;
}

.portal-review-queue-section {
  display: grid;
  gap: 10px;
}

.portal-review-queue-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-review-queue-heading span {
  color: #6b7280;
  font-size: 0.86rem;
}

.portal-review-queue-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #ffffff;
}

.portal-review-queue-item--exception {
  background: #fffbfc;
}

.portal-review-queue-item--priority {
  padding: 16px;
  gap: 12px;
}

.portal-review-queue-priority-list {
  display: grid;
  gap: 12px;
}

.portal-review-queue-item-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-review-queue-meta,
.portal-review-queue-actions,
.portal-review-queue-reasons,
.portal-review-queue-footnote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.portal-review-queue-copy {
  margin: 0;
}

.portal-review-queue-footnote .route-fine-print {
  margin: 0;
}

.portal-review-queue-details {
  border-top: 1px dashed rgba(15, 23, 42, 0.1);
  padding-top: 10px;
}

.portal-review-queue-details summary {
  cursor: pointer;
  color: #1d4ed8;
  font-weight: 700;
}

.portal-review-queue-details-body {
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.portal-review-queue-detail-row {
  display: grid;
  gap: 6px;
}

.portal-review-queue-detail-row strong {
  color: #162033;
}

.portal-review-queue-actions [data-action-tone="danger"] {
  border-color: rgba(185, 28, 28, 0.18);
  background: #fff5f5;
  color: #991b1b;
}

.technician-commission-workbench {
  display: grid;
  gap: 16px;
  margin: 16px 0;
}

.technician-commission-workbench--stacked {
  grid-template-columns: 1fr;
}

.commission-workspace-tabs {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  overflow-x: auto !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}

.commission-workspace-tab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 1 1 0 !important;
  min-width: 152px !important;
  min-height: 50px !important;
  padding: 12px 16px !important;
  border: 0 !important;
  border-right: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  color: var(--text-soft) !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease !important;
}

.commission-workspace-tab:first-child {
  border-top-left-radius: 14px !important;
  border-bottom-left-radius: 14px !important;
}

.commission-workspace-tab:last-child {
  border-right: 0 !important;
  border-top-right-radius: 14px !important;
  border-bottom-right-radius: 14px !important;
}

.commission-workspace-tab:hover {
  background: #fafbfc !important;
  color: var(--text) !important;
}

.commission-workspace-tab.active {
  background: #fdf2f4 !important;
  color: var(--text) !important;
  border-right-color: rgba(198, 31, 54, 0.14) !important;
  box-shadow: inset 0 -2px 0 var(--primary) !important;
}

.commission-workspace-panel {
  display: none;
  gap: 16px;
}

.commission-workspace-panel.active {
  display: grid;
}

.commission-settings-panel {
  max-width: 980px;
}

#commissionOverview {
  display: grid;
  gap: 14px;
}

#commissionOverview > .commission-analytics-grid:first-of-type {
  order: -3;
}

#commissionOverview > .commission-month-navigator {
  order: -2;
}

#commissionOverview > .commission-summary-grid {
  order: -1;
}

.commission-toolbar-actions {
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.commission-toolbar-more {
  width: 100%;
}

.commission-toolbar-more summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}

.commission-toolbar-more summary::-webkit-details-marker {
  display: none;
}

.commission-toolbar-advanced {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.commission-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.commission-summary-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

.commission-summary-card small,
.commission-summary-card span {
  color: #6b7280;
}

.commission-summary-card strong {
  font-size: 1.2rem;
  color: #162033;
}

.commission-tech-bars,
.commission-history-list,
.commission-breakdown-list,
.commission-rate-grid {
  display: grid;
  gap: 10px;
}

.commission-tech-bar-row,
.commission-history-row,
.commission-breakdown-row,
.commission-job-type-row,
.commission-rate-row {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #ffffff;
}

.commission-tech-bar-header,
.commission-tech-bar-foot,
.commission-history-header,
.commission-history-foot,
.commission-breakdown-row,
.commission-job-type-row,
.commission-rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.commission-tech-bar-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
}

.commission-tech-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #0ea5e9);
}

.commission-job-type-row {
  width: 100%;
  text-align: left;
}

.commission-job-type-row .route-fine-print {
  margin: 2px 0 0;
}

.commission-job-type-meta,
.commission-breakdown-meta,
.commission-list-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.commission-rate-row input {
  width: 120px;
}

.technician-commission-card {
  margin-bottom: 16px;
}

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

.commission-trend-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px;
  align-items: end;
}

.commission-trend-bar {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.commission-trend-bar-track {
  height: 140px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  padding: 8px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.08));
}

.commission-trend-bar-track span {
  display: block;
  width: 100%;
  min-height: 10px;
  border-radius: 12px 12px 6px 6px;
  background: linear-gradient(180deg, #ef4444, #b91c1c);
}

.commission-mix-list,
.commission-recent-jobs {
  display: grid;
  gap: 10px;
}

.commission-mix-row,
.commission-recent-job-row,
.commission-progress-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #ffffff;
}

.commission-mix-copy {
  display: grid;
  gap: 4px;
}

.commission-mix-metrics {
  display: flex;
  justify-content: flex-end;
  color: #162033;
  font-weight: 700;
}

.commission-summary-grid--preview {
  margin-bottom: 10px;
}

.commission-month-navigator {
  margin-bottom: 14px;
}

.commission-month-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.commission-branch-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.commission-branch-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: #ffffff !important;
  color: var(--text-soft) !important;
  font-weight: 700;
  box-shadow: none !important;
}

.commission-branch-tab.active {
  border-color: rgba(198, 31, 54, 0.18) !important;
  background: #fdf2f4 !important;
  color: var(--text) !important;
  box-shadow: inset 0 -2px 0 var(--primary) !important;
}

.commission-month-tab {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #ffffff;
  text-align: left;
  color: var(--text);
}

.commission-month-tab span {
  color: #6b7280;
  font-size: 0.84rem;
}

.commission-month-tab.active {
  border-color: rgba(198, 31, 54, 0.18);
  background: #fdf2f4;
  box-shadow: inset 0 -2px 0 var(--primary);
}

.commission-export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fbfcfd;
}

.commission-export-copy {
  display: grid;
  gap: 4px;
}

.commission-export-copy span {
  color: #6b7280;
}

.commission-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.commission-month-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.commission-technician-list {
  display: grid;
  gap: 10px;
}

.commission-technician-row {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 14px;
  background: #ffffff !important;
  color: var(--text) !important;
  text-align: left;
  box-shadow: none !important;
}

.commission-technician-row.active {
  border-color: rgba(198, 31, 54, 0.18) !important;
  background: #fff8f9 !important;
  box-shadow: inset 0 -2px 0 var(--primary) !important;
}

.commission-technician-row strong,
.commission-technician-row span,
.commission-technician-row small {
  color: inherit !important;
}

.commission-technician-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.commission-technician-copy,
.commission-technician-metrics {
  display: grid;
  gap: 4px;
}

.commission-technician-copy span,
.commission-technician-metrics span {
  color: #6b7280;
}

.commission-technician-metrics {
  justify-items: end;
}

.commission-trend-chart--wide {
  margin-bottom: 12px;
}

.commission-trend-snapshot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.commission-inline-history,
.commission-technician-history-panel,
.commission-selected-tech {
  display: grid;
  gap: 10px;
}

.commission-selected-tech-head,
.commission-selected-tech-status {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.commission-selected-tech-head > div,
.commission-selected-tech-metrics {
  display: grid;
  gap: 4px;
}

.commission-selected-tech-head span,
.commission-selected-tech-metrics span {
  color: #6b7280;
}

.commission-selected-tech-metrics {
  justify-items: end;
}

.commission-trend-bar {
  border: 1px solid transparent !important;
  border-radius: 16px;
  background: #ffffff !important;
  color: var(--text) !important;
  padding: 0;
  box-shadow: none !important;
}

.commission-trend-bar.active {
  border-color: rgba(198, 31, 54, 0.16) !important;
  background: #fff8f9 !important;
}

.commission-trend-bar strong,
.commission-trend-bar span,
.commission-trend-bar small {
  color: inherit !important;
}

@media (max-width: 1100px) {
  .technician-commission-workbench {
    grid-template-columns: 1fr;
  }

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

  .commission-analytics-grid {
    grid-template-columns: 1fr;
  }

  .commission-export-bar,
  .commission-technician-main,
  .commission-selected-tech-head,
  .commission-selected-tech-status {
    flex-direction: column;
    align-items: flex-start;
  }

  .commission-technician-metrics,
  .commission-selected-tech-metrics {
    justify-items: start;
  }

  .commission-trend-snapshot {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .commission-summary-grid {
    grid-template-columns: 1fr;
  }

  .commission-month-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .commission-tech-bar-header,
  .commission-tech-bar-foot,
  .commission-history-header,
  .commission-history-foot,
  .commission-breakdown-row,
  .commission-job-type-row,
  .commission-rate-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .commission-rate-row input {
    width: 100%;
  }

  .commission-month-tabs {
    grid-template-columns: 1fr;
  }
}

.portal-review-queue-actions button {
  min-height: 40px;
}

.schedule-ai-preview-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}

@media (max-width: 1380px) {
  .portal-review-queue-summary {
    grid-template-columns: 1fr;
  }

  .schedule-week-workbench {
    grid-template-columns: 1fr;
  }
}
.schedule-day-builder,
.schedule-queue-simple,
.schedule-map-day-view {
  display: grid;
  gap: 16px;
}

.schedule-day-toolbar-card,
.schedule-queue-list-card,
.schedule-day-calendar-card,
.schedule-day-available-card,
.schedule-map-canvas-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.schedule-day-toolbar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.schedule-day-toolbar-grid label {
  display: grid;
  gap: 6px;
}

.schedule-day-toolbar-grid label span {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a7687;
}

.schedule-day-toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

section[data-panel="dispatch"] .schedule-day-toolbar-actions {
  gap: 8px;
}

section[data-panel="dispatch"] .schedule-day-toolbar-actions .secondary {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
}

.schedule-day-split,
.schedule-map-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.schedule-day-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.schedule-day-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.schedule-day-calendar-shell {
  display: grid;
  gap: 12px;
}

.schedule-day-event-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fbfcfd;
}

.schedule-day-time {
  font-weight: 800;
  color: #162033;
}

.schedule-day-event-body {
  display: grid;
  gap: 4px;
}

.schedule-day-event-timing {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-day-event-timing span {
  padding: 5px 9px;
  border-radius: 10px;
  background: #fff8f8;
  color: #7b3140;
  font-size: 0.79rem;
  font-weight: 600;
}

.schedule-day-event-body strong {
  color: #162033;
}

.schedule-day-event-body p,
.schedule-day-event-body small {
  margin: 0;
  color: #6a7687;
}

.schedule-day-empty,
.schedule-stop-empty-note {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px dashed rgba(15, 23, 42, 0.14);
  border-radius: 14px;
  background: #f8fafc;
}

.schedule-day-empty strong,
.schedule-stop-empty-note strong {
  color: #162033;
}

.schedule-day-empty span,
.schedule-stop-empty-note span {
  color: #6a7687;
}

.schedule-day-stop-section {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.schedule-day-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.schedule-day-section-head strong {
  color: #162033;
}

.schedule-day-section-head span {
  color: #6a7687;
  font-weight: 700;
}

.schedule-day-stop-list,
.schedule-map-route-items {
  display: grid;
  gap: 10px;
}

.schedule-stop-card,
.schedule-map-route-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fbfcfd !important;
  text-align: left;
}

.schedule-stop-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.schedule-stop-card-head strong,
.schedule-map-route-card strong {
  color: #162033;
}

.schedule-stop-card-head p,
.schedule-map-route-card span,
.schedule-map-route-card small {
  margin: 0;
  color: #6a7687;
}

.schedule-stop-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #162033;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: capitalize;
}

.schedule-stop-status.is-overdue {
  background: rgba(198, 33, 54, 0.1);
  color: #c62136;
}

.schedule-stop-status.is-due-now,
.schedule-stop-status.is-ready-now {
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
}

.schedule-stop-card-meta,
.schedule-stop-card-timing,
.schedule-stop-card-actions,
.schedule-day-mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-stop-card-timing span {
  padding: 6px 10px;
  border-radius: 10px;
  background: #fff8f8;
  color: #7b3140;
  font-size: 0.82rem;
  font-weight: 600;
}

.schedule-day-event-timing span:last-child,
.schedule-stop-card-timing span:last-child {
  background: #eef6ff;
  color: #22527a;
}

.schedule-stop-fit-copy {
  margin: 0;
  color: #6a7687;
  font-size: 0.84rem;
}

.schedule-stop-card-meta span,
.schedule-day-mini-list span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #5b6678;
  font-size: 0.84rem;
}

.schedule-day-summary-note {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.schedule-day-summary-note span {
  padding: 8px 12px;
  border-radius: 12px;
  background: #f8fafc;
  color: #5b6678;
  font-size: 0.88rem;
}

.schedule-day-summary-note strong {
  color: #162033;
}

.schedule-map-route-list .schedule-week-card {
  height: 100%;
}

.schedule-map-stage {
  min-height: 540px;
}

@media (max-width: 1260px) {
  .schedule-day-toolbar-grid,
  .schedule-day-split,
  .schedule-map-split {
    grid-template-columns: 1fr;
  }

  .schedule-day-toolbar-actions {
    justify-content: flex-start;
  }
}

.settings-workspace-nav {
  margin-bottom: 18px;
}

.settings-workspace,
.settings-subpanel,
.settings-grid {
  display: grid;
  gap: 18px;
}

.settings-grid {
  grid-template-columns: minmax(320px, 0.95fr) minmax(380px, 1.05fr);
  align-items: start;
}

.settings-user-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fbfcfd;
  text-align: left;
}

.settings-user-button span {
  display: grid;
  gap: 4px;
}

.settings-user-button strong {
  color: #162033;
}

.settings-user-button small {
  color: #6a7687;
}

.settings-user-button.active {
  border-color: rgba(198, 33, 54, 0.28);
  background: #fff7f8;
  box-shadow: 0 12px 30px rgba(198, 33, 54, 0.08);
}

.settings-access-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #fbfcfd;
}

.settings-access-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.settings-access-card-head strong {
  color: #162033;
}

.settings-access-card-head p {
  margin: 6px 0 0;
  color: #6a7687;
}

.settings-access-list {
  display: grid;
  gap: 10px;
}

.settings-access-toggle {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.settings-access-toggle span {
  display: grid;
  gap: 4px;
}

.settings-access-toggle strong {
  color: #162033;
}

.settings-access-toggle small {
  color: #6a7687;
}

.settings-access-toggle input {
  width: 18px;
  height: 18px;
}

.settings-access-toggle.is-disabled {
  opacity: 0.78;
  background: #f8fafc;
}

.settings-branch-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fbfcfd;
}

.settings-branch-row strong {
  color: #162033;
}

.settings-branch-row span,
.settings-branch-row small {
  color: #6a7687;
}

.settings-branch-row--metric {
  align-items: flex-start;
}

.corporate-stat-grid {
  display: grid;
  gap: 10px;
}

.corporate-grid .summary-card {
  height: 100%;
}

.corporate-bar-list {
  display: grid;
  gap: 14px;
}

.corporate-bar-row {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(176, 22, 45, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.corporate-bar-copy {
  display: grid;
  gap: 3px;
}

.corporate-bar-copy small {
  color: #6a7687;
}

.corporate-bar-metric {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 0.92rem;
}

.corporate-bar-metric span:first-child {
  color: #6a7687;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.corporate-bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(22, 32, 51, 0.08);
  overflow: hidden;
}

.corporate-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #d3203f, #7f081b);
}

.corporate-bar-metric--secondary .corporate-bar-track span {
  background: linear-gradient(135deg, #162033, #324665);
}

@media (max-width: 1120px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* commission workspace refresh: analytics first, clean tabs, separate settings + service types */
section[data-panel="commissions"] .commission-workspace-tabs.workspace-subtabs {
  margin-top: 8px;
  margin-bottom: 18px;
}

section[data-panel="commissions"] .commission-workspace-tab.workspace-subtab {
  background: transparent;
  color: #4b5563;
  border: 1px solid #d8dee8;
  box-shadow: none;
}

section[data-panel="commissions"] .commission-workspace-tab.workspace-subtab:hover {
  color: #152033;
  border-color: #c7d2e0;
  background: #f8fafc;
}

section[data-panel="commissions"] .commission-workspace-tab.workspace-subtab.active {
  background: linear-gradient(180deg, #fff8f8 0%, #ffe9ed 100%);
  color: #b4233c;
  border-color: #efb8c2;
  box-shadow: inset 0 0 0 1px rgba(180, 35, 60, 0.08);
}

section[data-panel="commissions"] .commission-workspace-panel {
  display: none;
}

section[data-panel="commissions"] .commission-workspace-panel.active {
  display: block;
}

section[data-panel="commissions"] .commission-panel-shell,
section[data-panel="servicetypes"] .customer-workspace {
  gap: 20px;
}

section[data-panel="commissions"] .commission-analytics-card,
section[data-panel="commissions"] .commission-settings-panel,
section[data-panel="servicetypes"] .commission-settings-panel {
  border: 1px solid #dbe3ef;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

section[data-panel="commissions"] .commission-chart-actions select,
section[data-panel="commissions"] .commission-toolbar-actions input,
section[data-panel="commissions"] .commission-toolbar-actions button,
section[data-panel="commissions"] .commission-settings-panel input,
section[data-panel="commissions"] .commission-settings-panel select,
section[data-panel="commissions"] .commission-reports-summary select,
section[data-panel="commissions"] .commission-reports-summary input,
section[data-panel="servicetypes"] .commission-settings-panel input,
section[data-panel="servicetypes"] .commission-settings-panel select {
  border-radius: 14px;
}

section[data-panel="commissions"] .commission-top-strip {
  margin-bottom: 18px;
}

section[data-panel="commissions"] .commission-tech-bars--chart {
  display: grid;
  gap: 14px;
}

section[data-panel="commissions"] .commission-tech-bar-row,
section[data-panel="commissions"] .commission-technician-row,
section[data-panel="servicetypes"] .commission-job-type-row {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  background: #ffffff;
  color: #152033;
  padding: 18px 20px;
  text-align: left;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

section[data-panel="commissions"] .commission-tech-bar-row--interactive:hover,
section[data-panel="commissions"] .commission-tech-bar-row--interactive:focus-visible,
section[data-panel="commissions"] .commission-technician-row:hover,
section[data-panel="commissions"] .commission-technician-row:focus-visible,
section[data-panel="servicetypes"] .commission-job-type-row:hover,
section[data-panel="servicetypes"] .commission-job-type-row:focus-visible {
  border-color: #c4d1df;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

section[data-panel="commissions"] .commission-tech-bar-header,
section[data-panel="commissions"] .commission-tech-bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

section[data-panel="commissions"] .commission-tech-bar-meta {
  margin-top: 10px;
  color: #5f6b7c;
  font-size: 0.92rem;
}

section[data-panel="commissions"] .commission-tech-bar-track {
  height: 12px;
  margin-top: 14px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
}

section[data-panel="commissions"] .commission-tech-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7a8f 0%, #d61f45 100%);
}

section[data-panel="commissions"] .commission-settings-shell {
  display: grid;
  gap: 18px;
}

section[data-panel="commissions"] .commission-settings-intro {
  display: grid;
  gap: 6px;
  color: #5b6678;
}

section[data-panel="commissions"] .commission-settings-rate-grid {
  display: grid;
  gap: 12px;
}

section[data-panel="commissions"] .commission-settings-rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #fbfcfe;
}

section[data-panel="commissions"] .commission-settings-rate-row strong,
section[data-panel="servicetypes"] .commission-job-type-row strong {
  color: #152033;
}

section[data-panel="commissions"] .commission-settings-rate-row small,
section[data-panel="servicetypes"] .commission-job-type-row .route-fine-print {
  color: #667287;
}

section[data-panel="commissions"] .commission-settings-rate-input {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

section[data-panel="commissions"] .commission-settings-rate-input input {
  width: 110px;
  text-align: right;
}

section[data-panel="commissions"] .commission-settings-rate-input em {
  font-style: normal;
  color: #667287;
  font-weight: 600;
}

section[data-panel="commissions"] .commission-detail-table {
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

section[data-panel="commissions"] .commission-detail-table-head,
section[data-panel="commissions"] .commission-detail-row {
  display: grid;
  grid-template-columns: 1.35fr 1.1fr 0.8fr 0.8fr 0.8fr;
  gap: 14px;
  align-items: start;
}

section[data-panel="commissions"] .commission-detail-table-head {
  padding: 14px 18px;
  background: #f8fafc;
  color: #667287;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

section[data-panel="commissions"] .commission-detail-row {
  padding: 16px 18px;
  border-top: 1px solid #edf2f7;
}

section[data-panel="commissions"] .commission-detail-value {
  font-weight: 700;
  color: #152033;
}

section[data-panel="commissions"] .commission-technician-modal-summary {
  margin-bottom: 18px;
}

section[data-panel="commissions"] .commission-summary-grid--preview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

section[data-panel="commissions"] .commission-summary-card {
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #fbfcfe;
  box-shadow: none;
}

section[data-panel="servicetypes"] .commission-analytics-grid--service-types {
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
}

section[data-panel="servicetypes"] #serviceTypesList {
  display: grid;
  gap: 12px;
}

section[data-panel="servicetypes"] .commission-job-type-meta {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  section[data-panel="commissions"] .commission-detail-table-head,
  section[data-panel="commissions"] .commission-detail-row,
  section[data-panel="servicetypes"] .commission-analytics-grid--service-types,
  section[data-panel="commissions"] .commission-summary-grid--preview {
    grid-template-columns: 1fr;
  }

  section[data-panel="commissions"] .commission-tech-bar-header,
  section[data-panel="commissions"] .commission-tech-bar-meta,
  section[data-panel="commissions"] .commission-settings-rate-row {
    flex-direction: column;
    align-items: flex-start;
  }

  section[data-panel="commissions"] .commission-settings-rate-input {
    width: 100%;
  }

  section[data-panel="commissions"] .commission-settings-rate-input input {
    width: 100%;
  }
}
