:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #475569;
  --soft-muted: #9aa2aa;
  --line: #e3e7ea;
  --line-strong: #d9dee3;
  --teal: #c2410c;
  --teal-dark: #9a3412;
  --teal-soft: #fff7ed;
  --orange: #166534;
  --orange-soft: #f0fdf4;
  --danger: #b91c1c;
  --success: #166534;
  --info: #1d4ed8;
  --warning: #b45309;
  --shadow: 0 18px 46px rgba(37, 46, 54, 0.05);
  --dashboard-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  --dashboard-shadow-hover: 0 18px 44px rgba(15, 23, 42, 0.09);
  --radius: 8px;
  --ease: 180ms ease;
  --font-sans: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-family:
    var(--font-sans);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
a,
input,
textarea {
  transition:
    border-color var(--ease),
    box-shadow var(--ease),
    background-color var(--ease),
    color var(--ease),
    transform var(--ease);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(194, 65, 12, 0.42);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

[data-lucide] {
  display: inline-grid;
  place-items: center;
}

[data-lucide]::before,
[data-lucide]::after {
  display: none !important;
  content: none !important;
}

[data-lucide] > svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.showcase-shell {
  width: min(1024px, 100%);
  margin: 0 auto;
}

.page-frame {
  width: 100%;
  min-height: 100vh;
  border: 1px solid var(--line-strong);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  overflow: hidden;
  background: var(--card);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  color: var(--teal);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
}

.header-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
}

.product-label,
.service-status {
  color: #6d747c;
  font-size: 14px;
  font-weight: 500;
}

.service-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.service-status span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
}

main {
  padding: 34px 40px 18px;
}

.auth-layout {
  display: grid;
  grid-template-columns: 384px minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}

.auth-card,
.preview-card,
.dashboard {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.auth-card {
  padding: 24px;
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  min-height: 50px;
  border: 0;
  background: transparent;
  color: #6f7680;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}

.tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
}

.tab.is-active {
  color: var(--teal);
}

.tab.is-active::after {
  background: var(--teal);
}

.auth-form {
  display: grid;
  gap: 18px;
  padding-top: 30px;
}

.role-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.role-picker legend {
  grid-column: 1 / -1;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.role-picker label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
}

.role-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #787f87;
}

.role-icon svg,
.preview-badge svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.role-picker label:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(180, 83, 9, 0.1);
}

.role-picker label:has(input:checked) .role-icon {
  color: var(--teal);
}

.field {
  display: grid;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.input-control {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #87909a;
}

.password-control {
  grid-template-columns: 24px minmax(0, 1fr) 44px;
}

.input-control .field-icon {
  width: 20px;
  height: 20px;
  margin-left: 16px;
}

.input-control input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 0;
  padding: 0 14px;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
}

.input-control:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.14);
}

.input-control input::placeholder {
  color: #a0a8b0;
}

.password-visibility-toggle {
  display: inline-grid;
  width: 38px;
  height: 38px;
  margin-right: 4px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #87909a;
  cursor: pointer;
}

.password-visibility-toggle:hover {
  background: #fff7ed;
  color: #c2410c;
}

.password-visibility-toggle:focus-visible {
  outline: 2px solid #c2410c;
  outline-offset: 1px;
}

.password-visibility-toggle .eye-icon,
.password-visibility-toggle svg {
  width: 18px;
  height: 18px;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: -2px;
  color: #5d6872;
  font-size: 13px;
}

.remember-option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.remember-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--teal);
}

.form-options a {
  color: var(--teal);
}

.form-message {
  min-height: 20px;
  margin: -8px 0 -2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.form-message.is-error {
  color: var(--danger);
}

.form-message.is-success {
  color: var(--success);
}

.primary-button,
.outline-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}

.primary-button {
  border: 0;
  background: linear-gradient(180deg, #c65a10 0%, #9f3f06 100%);
  color: #fff;
  box-shadow: 0 10px 18px rgba(180, 83, 9, 0.16);
}

.primary-button:hover {
  background: linear-gradient(180deg, #b84f0c 0%, #8a3506 100%);
}

.outline-button,
.secondary-button {
  border: 1px solid var(--teal);
  background: #fff;
  color: var(--teal);
}

.secondary-button {
  min-width: 112px;
  border-color: var(--line);
  color: var(--text);
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  color: #8b939b;
  font-size: 15px;
}

.divider::before,
.divider::after {
  height: 1px;
  background: var(--line);
  content: "";
}

.preview-stack {
  display: grid;
  gap: 14px;
}

.preview-card {
  display: grid;
  min-height: 306px;
  padding: 28px;
}

.preview-courier {
  background: linear-gradient(135deg, #f6fcfc 0%, #ffffff 58%);
}

.preview-logistician {
  background: linear-gradient(135deg, var(--orange-soft) 0%, #ffffff 62%);
}

.preview-title {
  display: flex;
  align-items: center;
  gap: 18px;
  align-self: start;
}

.preview-title h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
}

.preview-badge {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
}

.preview-logistician .preview-badge {
  background: #dcfce7;
  color: var(--orange);
}

.preview-badge svg {
  width: 26px;
  height: 26px;
}

.empty-preview {
  display: grid;
  place-items: center;
  align-self: center;
  color: #a9b0b7;
  text-align: center;
}

.empty-preview-icon {
  width: 76px;
  height: 76px;
  margin: 0 0 16px;
  color: #b6bdc4;
}

.empty-preview p {
  margin: 0;
  color: #828b94;
  font-size: 15px;
  line-height: 1.45;
}

.empty-preview > span:not(.empty-preview-icon) {
  display: block;
  margin-top: 8px;
  color: #8d959e;
  font-size: 14px;
}

.dashboard {
  max-width: 940px;
  margin: 0 auto;
  padding: 36px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

.dashboard h2 {
  margin: 0;
  color: var(--text);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0;
}

.dashboard-header p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 280px;
  margin-top: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  background: #fafbfc;
}

.empty-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff7ed;
  color: #c2410c;
}

.empty-icon svg {
  width: 30px;
  height: 30px;
}

.empty-state h3 {
  margin: 18px 0 0;
  font-size: 24px;
  font-weight: 600;
}

.empty-state p {
  max-width: 560px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

body.is-dashboard-view {
  background:
    linear-gradient(180deg, rgba(255, 247, 237, 0.54) 0, rgba(246, 248, 251, 0) 210px),
    #f6f8fb;
}

body.is-vehicle-modal-open,
body.is-work-modal-open,
body.is-profile-modal-open,
body.is-ozon-api-modal-open,
body.is-route-postpone-modal-open,
body.is-manual-order-modal-open,
body.is-marketplace-sync-modal-open {
  overflow: hidden;
}

body.is-dashboard-view .showcase-shell {
  width: 100%;
}

body.is-dashboard-view .page-frame {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 247, 237, 0.54) 0, rgba(246, 248, 251, 0) 210px),
    #f6f8fb;
}

body.is-dashboard-view .site-header {
  display: none;
}

body.is-dashboard-view main {
  padding: 0;
}

.app-dashboard {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.courier-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  border-right: 1px solid rgba(226, 232, 240, 0.9);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 56px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.sidebar-brand .brand,
.mobile-brand .brand {
  color: #c2410c;
  font-size: 18px;
  font-weight: 700;
}

.sidebar-brand span {
  position: relative;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.sidebar-brand span::before {
  position: absolute;
  top: 50%;
  left: -10px;
  width: 1px;
  height: 18px;
  background: #e5e7eb;
  content: "";
  transform: translateY(-50%);
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  padding: 16px 12px;
}

.sidebar-link,
.sidebar-logout,
.bottom-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #111827;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.sidebar-link {
  min-height: 38px;
  border-radius: 7px;
  padding: 0 12px;
}

.sidebar-link:hover,
.sidebar-logout:hover {
  background: #f8fafc;
  color: #c2410c;
}

.sidebar-link.is-active {
  background: #fff7ed;
  color: #c2410c;
}

.sidebar-link.is-active::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  border-radius: 999px;
  background: #c2410c;
  content: "";
}

.sidebar-logout {
  margin: auto 12px 16px;
  min-height: 34px;
  padding: 0 12px;
  color: #475569;
}

.nav-icon {
  position: relative;
  display: inline-grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  color: currentColor;
}

.nav-icon::before,
.nav-icon::after {
  position: absolute;
  content: "";
}

.home-icon::before {
  width: 13px;
  height: 11px;
  border: 1.8px solid currentColor;
  border-top: 0;
  border-radius: 2px;
  bottom: 2px;
}

.home-icon::after {
  width: 10px;
  height: 10px;
  border-top: 1.8px solid currentColor;
  border-left: 1.8px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.orders-icon::before,
.work-icon::before,
.loading-icon::before,
.route-icon::before,
.message-icon::before,
.logout-icon::before,
.calendar-icon::before {
  width: 14px;
  height: 14px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
}

.work-icon::before {
  border-radius: 4px;
}

.work-icon::after {
  top: 3px;
  width: 7px;
  height: 3px;
  border: 1.8px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.loading-icon::before {
  border-radius: 2px;
}

.loading-icon::after {
  width: 10px;
  height: 6px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
}

.route-icon::after {
  width: 6px;
  height: 6px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
  background: #fff;
}

.message-icon::before {
  border-radius: 4px;
}

.message-icon::after {
  right: 1px;
  bottom: 1px;
  width: 5px;
  height: 5px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(28deg);
}

.logout-icon::before {
  border-radius: 2px;
}

.logout-icon::after {
  width: 8px;
  height: 1.8px;
  background: currentColor;
  transform: translateX(3px);
}

.courier-shell {
  min-width: 0;
}

.courier-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 22px;
  min-height: 56px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.mobile-brand {
  display: none;
  margin-right: auto;
}

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #111827;
  min-height: 28px;
  border: 1px solid #dcfce7;
  border-radius: 999px;
  padding: 0 10px;
  background: #f0fdf4;
  color: #166534;
  font-size: 12px;
  font-weight: 500;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #166534;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 138px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 8px 4px 4px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.topbar-user:hover {
  border-color: #fed7aa;
  background: #fff7ed;
}

.topbar-user:focus-visible {
  outline: 2px solid rgba(194, 65, 12, 0.36);
  outline-offset: 3px;
}

.user-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  color: #c2410c;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.topbar-user strong,
.topbar-user span {
  display: block;
}

.topbar-user .user-avatar {
  display: grid;
}

.topbar-user strong {
  color: #111827;
  font-size: 12px;
  font-weight: 600;
}

.topbar-user span {
  color: #475569;
  font-size: 11px;
}

.courier-content {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 24px 40px;
}

.welcome-card,
.metric-card,
.vehicle-panel,
.work-hero,
.work-panel,
.loading-hero,
.loading-empty,
.loading-panel,
.route-panel {
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--dashboard-shadow);
}

.welcome-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  overflow: hidden;
}

.welcome-card::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 3px;
  border-radius: 999px;
  background: #c2410c;
  content: "";
}

.welcome-card h1 {
  margin: 0;
  color: #111827;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.2;
}

.welcome-card p {
  margin: 7px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.today-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 0 12px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.calendar-icon {
  width: 16px;
  height: 16px;
  color: #475569;
}

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

.metric-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 104px;
  padding: 17px;
  overflow: hidden;
}

.metric-card:hover {
  border-color: rgba(194, 65, 12, 0.26);
  box-shadow: var(--dashboard-shadow-hover);
  transform: translateY(-1px);
}

.vehicle-panel:hover,
.work-hero:hover,
.work-panel:hover,
.loading-hero:hover,
.loading-empty:hover,
.loading-panel:hover {
  border-color: rgba(194, 65, 12, 0.26);
  box-shadow: var(--dashboard-shadow-hover);
}

.metric-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: #c2410c;
  content: "";
}

.metric-card:nth-child(2)::before {
  background: #166534;
}

.metric-card:nth-child(3)::before {
  background: #1d4ed8;
}

.metric-card:nth-child(4)::before {
  background: #b45309;
}

.metric-card span,
.metric-card small {
  color: #475569;
  font-size: 12px;
  font-weight: 500;
}

.metric-card strong {
  color: #111827;
  font-size: 31px;
  font-weight: 600;
  line-height: 1;
}

.metric-card .positive {
  color: #166534;
}

.courier-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 16px;
}

.courier-focus-card,
.courier-readiness-card {
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--dashboard-shadow);
}

.courier-focus-card {
  display: flex;
  min-height: 278px;
  flex-direction: column;
  align-items: flex-start;
  border-top: 3px solid #c2410c;
  padding: 24px;
}

.courier-focus-head {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
}

.courier-focus-head > div {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.courier-focus-head > div > span {
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.courier-focus-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 8px;
  background: #fff7ed;
  color: #c2410c;
}

.courier-focus-icon svg {
  width: 21px;
  height: 21px;
}

.courier-focus-status,
.courier-readiness-state,
.courier-readiness-count {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.courier-focus-status.is-warning {
  background: #fff7ed;
  color: #b45309;
}

.courier-focus-status.is-info {
  background: #eff6ff;
  color: #1d4ed8;
}

.courier-focus-status.is-success,
.courier-readiness-state.is-ready,
.courier-readiness-count.is-ready {
  background: #f0fdf4;
  color: #166534;
}

.courier-focus-card h2 {
  max-width: 560px;
  margin: 24px 0 0;
  color: #111827;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.courier-focus-card > p {
  max-width: 620px;
  margin: 9px 0 22px;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

.courier-primary-action {
  min-width: 190px;
  margin-top: auto;
}

.courier-primary-action svg {
  width: 17px;
  height: 17px;
}

.courier-readiness-card {
  padding: 20px;
}

.courier-readiness-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
}

.courier-readiness-head > div > span {
  color: #c2410c;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.courier-readiness-head h2 {
  margin: 4px 0 0;
  color: #111827;
  font-size: 20px;
  font-weight: 700;
}

.courier-readiness-list {
  display: grid;
}

.courier-readiness-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border-top: 1px solid #e2e8f0;
  padding: 13px 0;
}

.courier-readiness-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
}

.courier-readiness-icon svg {
  width: 18px;
  height: 18px;
}

.courier-readiness-row > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.courier-readiness-row > div strong {
  color: #111827;
  font-size: 13px;
  font-weight: 650;
}

.courier-readiness-row > div span {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.courier-vehicle-panel {
  border-color: rgba(203, 213, 225, 0.9);
}

.courier-vehicle-panel .vehicle-toggle {
  min-height: 82px;
}

.courier-vehicle-panel .vehicle-toggle-icon::before,
.courier-vehicle-panel .vehicle-toggle-icon::after {
  display: none;
}

.courier-vehicle-panel .vehicle-toggle-icon svg {
  width: 21px;
  height: 21px;
}

.vehicle-panel {
  padding: 0;
}

.vehicle-toggle {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 78px;
  border: 0;
  border-radius: 8px;
  padding: 16px 18px;
  background: #fff;
  color: #111827;
  cursor: pointer;
  text-align: left;
}

.vehicle-toggle:hover {
  background: #fff7ed;
}

.vehicle-toggle:focus-visible {
  outline: 2px solid rgba(194, 65, 12, 0.36);
  outline-offset: 3px;
}

.vehicle-toggle-icon {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: #fff7ed;
  color: #c2410c;
}

.vehicle-toggle-icon::before {
  width: 20px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
  content: "";
}

.vehicle-toggle-icon::after {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(-45deg);
}

.vehicle-toggle-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.vehicle-toggle-copy span {
  color: #475569;
  font-size: 12px;
  font-weight: 500;
}

.vehicle-toggle-copy strong {
  color: #111827;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.1;
}

.vehicle-chevron {
  width: 18px;
  height: 18px;
  color: #64748b;
  transform: none;
  transition: transform 160ms ease;
}

.vehicle-toggle.is-open .vehicle-chevron {
  transform: rotate(180deg);
}

.work-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px;
}

.work-hero p,
.work-slot-heading p {
  margin: 0 0 6px;
  color: #c2410c;
  font-size: 12px;
  font-weight: 600;
}

.work-hero h1 {
  margin: 0;
  color: #111827;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.2;
}

.work-hero span,
.work-summary p,
.work-slot-heading span {
  color: #475569;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.work-hero span {
  display: block;
  margin-top: 7px;
}

.work-booking-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #c2410c;
  border-radius: 6px;
  padding: 0 18px;
  background: linear-gradient(180deg, #d95113 0%, #c2410c 100%);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(194, 65, 12, 0.18);
  white-space: nowrap;
}

.work-booking-button:hover,
.dash-primary-button:hover {
  transform: translateY(-1px);
}

.work-booking-button:focus-visible {
  outline: 2px solid rgba(194, 65, 12, 0.36);
  outline-offset: 3px;
}

.work-panel {
  padding: 18px;
}

.work-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: #fff7ed;
  color: #b45309;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.work-status.is-booked {
  background: #ecfdf5;
  color: #166534;
}

.work-summary {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 92px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  background: #f8fafc;
}

.work-summary-icon {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: #fff7ed;
  color: #c2410c;
}

.work-summary-icon::before {
  width: 20px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 4px;
  content: "";
}

.work-summary-icon::after {
  position: absolute;
  top: 10px;
  width: 10px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.work-summary strong {
  display: block;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

.work-summary p {
  margin: 6px 0 0;
}

.vehicle-modal,
.work-modal,
.profile-modal,
.ozon-api-modal,
.route-postpone-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
}

.vehicle-modal[hidden],
.work-modal[hidden],
.profile-modal[hidden],
.ozon-api-modal[hidden],
.route-postpone-modal[hidden] {
  display: none !important;
}

.vehicle-modal-backdrop,
.work-modal-backdrop,
.profile-modal-backdrop,
.ozon-api-modal .profile-modal-backdrop,
.route-postpone-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.34);
  cursor: pointer;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.vehicle-modal-dialog,
.work-modal-dialog,
.profile-modal-dialog,
.ozon-api-modal .profile-modal-dialog,
.route-postpone-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(940px, 100%);
  max-height: min(780px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(15, 23, 42, 0.22);
}

.work-modal-dialog {
  width: min(560px, 100%);
}

.route-postpone-modal-dialog {
  width: min(600px, 100%);
}

.profile-modal-dialog {
  width: min(520px, 100%);
}

.manual-order-modal-dialog {
  width: min(940px, 100%);
  max-height: min(860px, calc(100vh - 48px));
}

.sync-confirm-modal-dialog {
  width: min(520px, 100%);
  overflow: hidden;
}

.sync-confirm-modal-content {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 26px;
}

.sync-confirm-modal-icon {
  width: 48px;
  height: 48px;
  padding: 13px;
  border-radius: 14px;
  background: #fff7ed;
  color: #c2410c;
}

.sync-confirm-modal-content p {
  margin: 0;
  color: #111827;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}

.sync-confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 26px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.sync-confirm-modal-actions .dash-primary-button,
.sync-confirm-modal-actions .dash-outline-button {
  min-width: 160px;
}

.sync-confirm-modal-actions .dash-primary-button span {
  width: 16px;
  height: 16px;
}

@media (max-width: 560px) {
  .sync-confirm-modal {
    padding: 14px;
  }

  .sync-confirm-modal-content {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    padding: 20px;
  }

  .sync-confirm-modal-icon {
    width: 40px;
    height: 40px;
    padding: 10px;
  }

  .sync-confirm-modal-content p {
    font-size: 16px;
  }

  .sync-confirm-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
    padding: 16px 20px 20px;
  }

  .sync-confirm-modal-actions .dash-primary-button,
  .sync-confirm-modal-actions .dash-outline-button {
    width: 100%;
    min-width: 0;
  }
}

.manual-order-form {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.manual-order-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 20px 24px 0;
  padding: 5px;
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  background: #f1f5f9;
}

.manual-order-mode-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #475569;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.manual-order-mode-tab span {
  width: 18px;
  height: 18px;
}

.manual-order-mode-tab:hover {
  color: #9a3412;
}

.manual-order-mode-tab.is-active {
  background: #fff;
  color: #c2410c;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.09);
}

.manual-order-mode-tab:focus-visible {
  outline: 3px solid rgba(194, 65, 12, 0.18);
  outline-offset: 2px;
}

.automatic-order-intro {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 17px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fffaf5;
}

.automatic-order-intro-icon {
  width: 46px;
  height: 46px;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  color: #c2410c;
}

.automatic-order-intro strong {
  display: block;
  color: #111827;
  font-size: 16px;
}

.automatic-order-intro p {
  margin: 5px 0 0;
  color: #475569;
  line-height: 1.5;
}

.automatic-order-grid {
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
}

.manual-order-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.manual-order-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  background: #f8fafc;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.manual-order-field.is-wide {
  grid-column: 1 / -1;
}

.manual-order-field.is-accent {
  border-color: #fed7aa;
  background: #fffaf5;
}

.manual-order-field:focus-within {
  border-color: #c2410c;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.09);
}

.manual-order-field > span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.manual-order-field input,
.manual-order-field textarea,
.manual-order-field select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  line-height: 1.4;
  resize: vertical;
}

.manual-order-field input::placeholder,
.manual-order-field textarea::placeholder {
  color: #94a3b8;
}

.manual-order-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.manual-order-actions .dash-primary-button,
.manual-order-actions .dash-outline-button {
  min-width: 180px;
}

@media (max-width: 760px) {
  .manual-order-modal {
    padding: 10px;
  }

  .manual-order-modal-dialog {
    max-height: calc(100vh - 20px);
  }

  .manual-order-form {
    gap: 14px;
    padding: 14px;
  }

  .manual-order-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .manual-order-field.is-wide {
    grid-column: auto;
  }

  .manual-order-actions {
    flex-direction: column-reverse;
  }

  .manual-order-actions .dash-primary-button,
  .manual-order-actions .dash-outline-button {
    width: 100%;
    min-width: 0;
  }

  .manual-order-mode-tabs {
    grid-template-columns: 1fr;
    margin: 14px 14px 0;
  }

  .manual-order-mode-tab {
    justify-content: flex-start;
  }

  .automatic-order-intro {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 14px;
  }

  .automatic-order-intro-icon {
    width: 38px;
    height: 38px;
    padding: 9px;
  }
}

.ozon-api-modal .profile-modal-dialog {
  width: min(560px, 100%);
}

.vehicle-modal-header,
.work-modal-header,
.profile-modal-header,
.ozon-api-modal .profile-modal-header,
.route-postpone-modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #e5e7eb;
  padding: 22px 24px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.vehicle-modal-header p,
.work-modal-header p,
.profile-modal-header p,
.ozon-api-modal .profile-modal-header p,
.route-postpone-modal-header p {
  margin: 0 0 6px;
  color: #c2410c;
  font-size: 12px;
  font-weight: 600;
}

.vehicle-modal-header h3,
.work-modal-header h3,
.profile-modal-header h3,
.ozon-api-modal .profile-modal-header h3,
.route-postpone-modal-header h3 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
}

.vehicle-modal-header span,
.work-modal-header span,
.profile-modal-header span,
.ozon-api-modal .profile-modal-header span,
.route-postpone-modal-header span {
  display: block;
  max-width: 660px;
  margin-top: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.vehicle-modal-close,
.work-modal-close,
.profile-modal-close,
.ozon-api-modal .profile-modal-close,
.route-postpone-modal-close {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  cursor: pointer;
}

.vehicle-modal-close::before,
.vehicle-modal-close::after,
.work-modal-close::before,
.work-modal-close::after,
.profile-modal-close::before,
.profile-modal-close::after,
.ozon-api-modal .profile-modal-close::before,
.ozon-api-modal .profile-modal-close::after,
.route-postpone-modal-close::before,
.route-postpone-modal-close::after {
  display: none;
  content: none;
}

.vehicle-modal-close span,
.work-modal-close span,
.profile-modal-close span,
.ozon-api-modal .profile-modal-close span,
.route-postpone-modal-close span {
  width: 20px;
  height: 20px;
}

.route-postpone-form {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.route-postpone-preview {
  display: grid;
  gap: 14px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 16px;
  background: #fff7ed;
}

.route-postpone-preview > div {
  display: grid;
  gap: 4px;
}

.route-postpone-preview > div > span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-postpone-preview strong {
  color: #111827;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.route-postpone-preview-badge {
  width: fit-content;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 7px 10px;
  background: #f0fdf4;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.route-postpone-preview-copy {
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.route-postpone-message {
  min-height: 20px;
  margin: -4px 0 0;
  color: #b91c1c;
  font-size: 13px;
}

.route-postpone-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.profile-form {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.profile-avatar-preview {
  display: grid;
  justify-content: center;
}

.profile-avatar-preview span {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  color: #c2410c;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.profile-role-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0 12px;
  background: #f8fafc;
}

.profile-role-row span {
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.profile-role-row strong {
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.driver-license-field small {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.driver-license-field input[type="file"] {
  min-height: auto;
  padding: 10px 12px;
  color: #475569;
  font-size: 13px;
}

.driver-license-preview {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 12px;
  background: #fff7ed;
}

.driver-license-thumb {
  display: grid;
  width: 86px;
  height: 56px;
  place-items: center;
  border: 1px dashed #fdba74;
  border-radius: 6px;
  background-color: #ffffff;
  background-position: center;
  background-size: cover;
  color: #b45309;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.driver-license-preview strong,
.driver-license-preview span {
  display: block;
}

.driver-license-preview strong {
  color: #92400e;
  font-size: 14px;
  font-weight: 850;
}

.driver-license-preview span {
  margin-top: 4px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.driver-license-preview.is-uploaded {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.driver-license-preview.is-uploaded .driver-license-thumb {
  border-style: solid;
  border-color: #86efac;
}

.driver-license-preview.is-uploaded strong {
  color: #166534;
}

.profile-message {
  min-height: 19px;
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.profile-message.is-success {
  color: #166534;
}

.profile-message.is-error {
  color: #b91c1c;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.vehicle-modal .vehicle-layout {
  padding: 24px;
}

.contractor-vehicle-picker {
  display: grid;
  gap: 14px;
  margin: 20px 24px 0;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 16px;
  background: #fff7ed;
}

.contractor-vehicle-picker-copy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.contractor-vehicle-picker-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  color: #c2410c;
}

.contractor-vehicle-picker-copy p,
.contractor-vehicle-picker-copy h4,
.contractor-vehicle-picker-copy span,
.vehicle-form-heading h4,
.vehicle-form-heading p,
.vehicle-form-heading span {
  margin: 0;
}

.contractor-vehicle-picker-copy p,
.vehicle-form-heading span {
  color: #c2410c;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contractor-vehicle-picker-copy h4,
.vehicle-form-heading h4 {
  margin-top: 3px;
  color: #111827;
  font-size: 16px;
  font-weight: 650;
}

.contractor-vehicle-picker-copy > div > span,
.vehicle-form-heading p {
  display: block;
  margin-top: 5px;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.contractor-vehicle-picker-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.vehicle-form-heading {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 12px;
}

.route-upload-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.route-upload-panel textarea {
  min-height: 180px;
  resize: vertical;
}

.route-upload-help,
.route-upload-message {
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.route-upload-message {
  min-height: 20px;
}

.route-upload-message.is-success {
  color: #166534;
}

.route-upload-message.is-error {
  color: #b91c1c;
}

.route-upload-state {
  margin: 0 20px 20px;
}

.work-modal-body {
  padding: 24px;
}

.work-confirm-step {
  display: grid;
  justify-items: center;
  gap: 18px;
  min-height: 210px;
  align-content: center;
  text-align: center;
}

.work-question-icon {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  background: #fff7ed;
  color: #c2410c;
}

.work-question-icon::before {
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 50%;
  content: "";
}

.work-question-icon::after {
  position: absolute;
  color: currentColor;
  content: "?";
  font-size: 18px;
  font-weight: 600;
}

.work-confirm-step p {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 600;
}

.work-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.work-confirm-step .work-modal-actions {
  justify-content: center;
}

.work-slot-step {
  display: grid;
  gap: 16px;
}

.work-slot-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.work-slot-heading h4 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 600;
}

.work-slot-heading span {
  padding-top: 2px;
  text-align: right;
}

.work-slot-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.work-time-section {
  display: grid;
  gap: 10px;
  border-top: 1px solid #e5e7eb;
  padding-top: 14px;
}

.work-time-section[hidden] {
  display: none !important;
}

.work-slot-heading.is-compact h4 {
  font-size: 18px;
}

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

.work-slot-button {
  display: grid;
  gap: 5px;
  min-height: 94px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  cursor: pointer;
  padding: 10px 6px;
  text-align: center;
}

.work-slot-button:hover,
.work-slot-button.is-selected,
.work-time-button:hover,
.work-time-button.is-selected {
  border-color: #c2410c;
  background: #fff7ed;
}

.work-time-button.is-unavailable,
.work-time-button:disabled {
  border-color: #e5e7eb;
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.72;
}

.work-slot-button:focus-visible,
.work-time-button:focus-visible {
  outline: 2px solid rgba(194, 65, 12, 0.36);
  outline-offset: 2px;
}

.work-time-button {
  display: grid;
  gap: 4px;
  min-height: 56px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  cursor: pointer;
  padding: 9px 10px;
  text-align: left;
}

.work-time-button span {
  color: #475569;
  font-size: 11px;
  font-weight: 600;
}

.work-time-button strong {
  color: #111827;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.work-slot-button span,
.work-slot-button small {
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.work-slot-button strong {
  color: #111827;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.work-slot-button.is-selected strong,
.work-slot-button.is-selected span,
.work-slot-button.is-selected small,
.work-time-button.is-selected span,
.work-time-button.is-selected strong {
  color: #c2410c;
}

.work-time-button.is-unavailable span,
.work-time-button.is-unavailable strong {
  color: #94a3b8;
}

.work-booking-message {
  min-height: 18px;
  margin: 0;
  color: #166534;
  font-size: 12px;
  font-weight: 500;
}

.loading-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.loading-hero p {
  margin: 0 0 6px;
  color: #c2410c;
  font-size: 13px;
  font-weight: 600;
}

.loading-hero h1 {
  margin: 0;
  color: #111827;
  font-size: 27px;
  font-weight: 600;
  line-height: 1.2;
}

.loading-hero span:not(.loading-date-pill) {
  display: block;
  margin-top: 7px;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.loading-date-pill,
.loading-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: #fff7ed;
  color: #b45309;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.loading-date-pill.is-booked {
  background: #ecfdf5;
  color: #166534;
}

.loading-empty {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 22px;
}

.loading-empty[hidden],
.loading-panel[hidden] {
  display: none !important;
}

.loading-empty-icon {
  position: relative;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 14px;
  background: #fff7ed;
  color: #c2410c;
}

.loading-empty-icon::before {
  width: 22px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 3px;
  content: "";
}

.loading-empty-icon::after {
  position: absolute;
  width: 11px;
  height: 11px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.loading-empty h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 600;
}

.loading-empty p {
  margin: 7px 0 0;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.loading-start-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  border: 1px solid #c2410c;
  border-radius: 8px;
  padding: 0 18px;
  background: #c2410c;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(194, 65, 12, 0.16);
}

.loading-start-button:hover {
  background: #9a3412;
}

.loading-start-button:focus-visible {
  outline: 2px solid rgba(194, 65, 12, 0.36);
  outline-offset: 2px;
}

.loading-panel {
  min-width: 0;
  padding: 18px;
}

.loading-sequence {
  display: grid;
}

.loading-sequence-card {
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.loading-sequence-head,
.loading-sequence-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.loading-sequence-head {
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.loading-sequence-head strong {
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}

.loading-sequence-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.34fr);
  gap: 12px;
  padding: 18px;
}

.loading-sequence-body .data-cell {
  padding: 14px;
  background: #ffffff;
}

.loading-sequence-body .data-cell strong {
  font-size: 17px;
  font-weight: 750;
}

.loading-sequence-footer {
  border-top: 1px solid #e2e8f0;
  background: #fffaf7;
}

.loading-sequence-footer > span {
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.loading-sequence-complete {
  min-width: 210px;
}

.loading-sequence-complete span[data-lucide] {
  width: 18px;
  height: 18px;
}

.loading-sequence-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 22px;
  color: #475569;
  background: #ffffff;
}

.loading-sequence-empty > span {
  width: 28px;
  height: 28px;
  color: #c2410c;
}

.loading-sequence-empty strong {
  color: #111827;
  font-size: 16px;
}

.loading-sequence-empty p {
  margin: 4px 0 0;
  font-size: 13px;
}

.loading-cell-list {
  display: grid;
  gap: 12px;
}

.loading-cell-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.loading-cell-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 14px;
  background: #f8fafc;
}

.loading-cell-card-header strong {
  color: #111827;
  font-size: 15px;
  font-weight: 700;
}

.loading-order-list {
  display: grid;
}

.loading-order-card {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid #e5e7eb;
  padding: 13px 14px;
}

.loading-order-card:last-child {
  border-bottom: 0;
}

.loading-order-card h3 {
  margin: 5px 0 0;
  color: #111827;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.loading-order-number {
  display: grid;
  gap: 3px;
  color: #c2410c;
  font-size: 12px;
  font-weight: 700;
}

.loading-order-number::before,
.loading-order-card h3::before {
  display: block;
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  content: "Номер отправления";
}

.loading-order-card h3::before {
  margin-bottom: 3px;
  content: "Название товара";
}

.loading-order-meta-grid {
  display: grid;
  grid-template-columns: minmax(110px, 0.6fr) minmax(84px, 0.28fr);
  gap: 8px;
}

.loading-order-meta-grid span,
.data-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 11px;
  background: #f8fafc;
}

.loading-order-meta-grid small,
.data-cell span {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.loading-order-meta-grid strong,
.data-cell strong {
  min-width: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.data-cell.is-primary strong {
  color: #c2410c;
}

.data-cell.is-wide {
  grid-column: span 2;
}

.loading-route-action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  border: 1px solid #fb923c;
  border-radius: 8px;
  padding: 16px 16px 16px 20px;
  background: linear-gradient(90deg, #fff7ed 0%, #ffffff 100%);
  box-shadow: 0 14px 30px rgba(194, 65, 12, 0.12);
  overflow: hidden;
}

.loading-route-action::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: #c2410c;
  content: "";
}

.loading-route-action > div {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.loading-route-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: #c2410c;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.loading-route-action p {
  margin: 0;
  color: #111827;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
}

.loading-route-action .dash-primary-button {
  min-width: 170px;
}

.loading-tsd-notice {
  align-items: flex-start;
}

.route-panel {
  min-width: 0;
  padding: 18px;
}

.route-panel[hidden] {
  display: none !important;
}

.route-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: #ecfdf5;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.courier-route-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.courier-route-back {
  display: inline-flex;
  width: auto;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-inline: 14px;
}

.courier-route-back svg {
  width: 16px;
  height: 16px;
}

.route-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 14px;
}

.route-map,
.route-deliveries {
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.route-map-head,
.route-deliveries-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e5e7eb;
  padding: 13px 14px;
  background: #f8fafc;
}

.route-map-head span,
.route-deliveries-head p {
  margin: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 800;
}

.route-map-head strong,
.route-deliveries-head span {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.route-map-canvas {
  position: relative;
  min-height: 320px;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.13) 1px, transparent 1px),
    linear-gradient(0deg, rgba(148, 163, 184, 0.13) 1px, transparent 1px),
    radial-gradient(circle at 18% 72%, rgba(22, 101, 52, 0.12), transparent 21%),
    radial-gradient(circle at 80% 24%, rgba(29, 78, 216, 0.11), transparent 24%),
    #f8fafc;
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
  overflow: hidden;
}

.route-map-canvas::before,
.route-map-canvas::after {
  position: absolute;
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.18);
  content: "";
  transform: rotate(-18deg);
}

.route-map-canvas::before {
  top: 92px;
  right: -28px;
  left: 36px;
  height: 18px;
}

.route-map-canvas::after {
  top: 176px;
  right: 54px;
  left: -42px;
  height: 14px;
  transform: rotate(20deg);
}

.route-line {
  position: absolute;
  inset: 24px 34px;
  z-index: 1;
  width: calc(100% - 68px);
  height: calc(100% - 48px);
}

.route-line path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-line path:first-child {
  stroke: rgba(194, 65, 12, 0.2);
  stroke-width: 18;
}

.route-line path:last-child {
  stroke: #c2410c;
  stroke-dasharray: 8 10;
  stroke-width: 5;
}

.route-marker {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #c2410c;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

.route-marker-start {
  bottom: 50px;
  left: 54px;
  width: 40px;
  height: 40px;
  background: #166534;
  font-size: 12px;
}

.route-marker-1 {
  bottom: 98px;
  left: 28%;
}

.route-marker-2 {
  top: 76px;
  left: 45%;
}

.route-marker-3 {
  top: 38px;
  right: 64px;
}

.route-deliveries {
  display: grid;
  align-content: start;
}

.courier-route-deliveries {
  width: 100%;
}

.route-delivery-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  padding: 14px;
}

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

.route-delivery-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #fff7ed;
  color: #c2410c;
  font-size: 13px;
  font-weight: 800;
}

.route-delivery-cells {
  display: grid;
  grid-template-columns: minmax(190px, 1.3fr) minmax(105px, 0.7fr) minmax(115px, 0.7fr) minmax(92px, 0.55fr);
  gap: 8px;
  min-width: 0;
}

.route-call-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid #c2410c;
  border-radius: 999px;
  padding: 0 14px;
  background: #c2410c;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(194, 65, 12, 0.16);
}

.route-call-button:hover {
  background: #9a3412;
  border-color: #9a3412;
  transform: translateY(-1px);
}

.route-delivery-actions {
  display: grid;
  width: 184px;
  gap: 8px;
}

.route-proof-control {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 4px 7px;
  align-items: center;
  min-width: 0;
}

.route-proof-control:not(.has-proof) .route-proof-upload,
.route-proof-control:not(.has-proof) .route-proof-status {
  grid-column: 1 / -1;
}

.route-proof-preview {
  grid-row: 1 / span 2;
  display: block;
  width: 52px;
  height: 42px;
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f8fafc;
}

.route-proof-thumbnail {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.route-proof-upload {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #fdba74;
  border-radius: 999px;
  padding: 0 10px;
  background: #fff7ed;
  color: #9a3412;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
}

.route-proof-upload:hover {
  border-color: #c2410c;
  background: #ffedd5;
}

.route-proof-upload.is-uploading {
  cursor: wait;
  opacity: 0.68;
}

.route-proof-upload svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.route-proof-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.route-proof-status {
  min-width: 0;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
}

.route-proof-status.is-success {
  color: #166534;
}

.route-proof-status.is-error {
  color: #b91c1c;
}

.route-yandex-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  margin: 14px;
  border: 1px solid #c2410c;
  border-radius: 999px;
  padding: 0 16px;
  background: #c2410c;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 12px 24px rgba(194, 65, 12, 0.16);
}

.route-yandex-button:hover {
  background: #9a3412;
  border-color: #9a3412;
  transform: translateY(-1px);
}

.route-navigation-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.route-navigation-actions .route-yandex-button {
  width: 100%;
  margin: 0;
}

.route-offline-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #c2410c;
  border-radius: 999px;
  padding: 0 16px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.route-offline-button:hover:not(:disabled) {
  background: #ffedd5;
  transform: translateY(-1px);
}

.route-offline-button:focus-visible {
  outline: 3px solid rgba(194, 65, 12, 0.2);
  outline-offset: 2px;
}

.route-offline-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.route-offline-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.route-completion-action {
  display: grid;
  gap: 8px;
  border-top: 1px solid #e5e7eb;
  padding: 14px;
}

.route-completion-action[hidden] {
  display: none;
}

.route-completion-action p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.route-completion-action p.is-ready,
.route-completion-action p.is-success {
  color: #166534;
}

.route-completion-action p.is-error {
  color: #b91c1c;
}

.route-complete-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid #b91c1c;
  border-radius: 999px;
  padding: 0 18px;
  background: #b91c1c;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 12px 24px rgba(185, 28, 28, 0.18);
}

.route-complete-button:hover:not(:disabled) {
  background: #991b1b;
  border-color: #991b1b;
  transform: translateY(-1px);
}

.route-complete-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.route-empty-copy {
  margin: 14px;
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
}

.loading-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
}

.loading-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  color: #111827;
  font-size: 13px;
}

.loading-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid #1f2937;
  background: #2f6f55;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.loading-table th,
.loading-table td {
  border-right: 1px solid #d1d5db;
  padding: 8px 9px;
  vertical-align: top;
}

.loading-table th:last-child,
.loading-table td:last-child {
  border-right: 0;
}

.loading-table td {
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  font-weight: 600;
  line-height: 1.35;
}

.loading-table tr:nth-child(even) td {
  background: #f8fafc;
}

.loading-table tr:last-child td {
  border-bottom: 0;
}

.loading-table th:nth-child(1),
.loading-table td:nth-child(1) {
  width: 170px;
}

.loading-table th:nth-child(3),
.loading-table td:nth-child(3),
.loading-table th:nth-child(4),
.loading-table td:nth-child(4),
.loading-table th:nth-child(5),
.loading-table td:nth-child(5) {
  width: 100px;
  white-space: nowrap;
}

.cell-code {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 700;
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading p {
  margin: 0 0 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
}

.section-heading h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 600;
}

.vehicle-state {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: #fff7ed;
  color: #b45309;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.vehicle-state.is-saved {
  background: #ecfdf5;
  color: #166534;
}

.vehicle-layout {
  display: grid;
  grid-template-columns: minmax(270px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}

.vehicle-layout.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.vehicle-layout.is-single .vehicle-summary {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
  gap: 24px;
  align-items: start;
}

.vehicle-layout.is-single .vehicle-summary dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.vehicle-layout.is-single .vehicle-summary .vehicle-message {
  grid-column: 1 / -1;
  margin: 0;
}

.vehicle-summary {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  background: #f8fafc;
}

.vehicle-plate {
  position: relative;
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  width: min(248px, 100%);
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 0 0 2px #111827;
  color: #111827;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  overflow: hidden;
  text-transform: uppercase;
}

.vehicle-plate::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  height: 2px;
  background: #111827;
  content: "";
  pointer-events: none;
}

.vehicle-plate.is-empty {
  color: #475569;
}

.vehicle-plate-main {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  white-space: nowrap;
}

.vehicle-plate-region {
  display: grid;
  grid-template-rows: 1fr auto;
  min-width: 56px;
  border-left: 2px solid #111827;
  box-shadow: inset 0 -2px 0 #111827;
  text-align: center;
}

.vehicle-plate-region-code {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 3px;
  font-size: 18px;
  font-weight: 600;
}

.vehicle-plate-country {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding-bottom: 4px;
  font-size: 9px;
  font-weight: 600;
}

.vehicle-plate-flag {
  width: 14px;
  height: 9px;
  border: 1px solid #d1d5db;
  background: linear-gradient(to bottom, #fff 0 33%, #1d4ed8 33% 66%, #b91c1c 66% 100%);
}

.vehicle-summary dl {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
}

.vehicle-summary div {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 10px;
}

.vehicle-summary div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.vehicle-summary dt {
  color: #475569;
  font-size: 12px;
  font-weight: 500;
}

.vehicle-summary dd {
  margin: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.vehicle-form {
  display: grid;
  gap: 13px;
}

.vehicle-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dash-field {
  display: grid;
  gap: 7px;
  color: #111827;
  font-size: 12px;
  font-weight: 600;
}

.dash-field input,
.dash-field textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  outline: none;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 13px;
  font-weight: 400;
}

.dash-field input {
  min-height: 42px;
  padding: 0 12px;
}

.dash-field textarea {
  resize: vertical;
  min-height: 78px;
  padding: 12px;
}

.dash-field input::placeholder,
.dash-field textarea::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.dash-field input:focus,
.dash-field textarea:focus {
  border-color: #c2410c;
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.12);
}

.vehicle-message {
  min-height: 19px;
  margin: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
}

.vehicle-message.is-success {
  color: #166534;
}

.vehicle-message.is-error {
  color: #b91c1c;
}

.vehicle-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dash-primary-button,
.dash-outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border-radius: 5px;
  padding: 0 18px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.dash-primary-button > [data-lucide],
.dash-outline-button > [data-lucide] {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.dash-primary-button {
  border: 1px solid #c2410c;
  background: linear-gradient(180deg, #d95113 0%, #c2410c 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(194, 65, 12, 0.18);
}

.dash-outline-button {
  border: 1px solid #c2410c;
  background: #fff;
  color: #c2410c;
}

.dash-primary-button:disabled,
.dash-outline-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.app-dashboard {
  font-size: 14px;
}

.sidebar-link,
.sidebar-logout {
  font-size: 14px;
  font-weight: 600;
}

.topbar-status {
  font-size: 13px;
  font-weight: 600;
}

.user-avatar {
  font-size: 14px;
}

.topbar-user strong {
  font-size: 13px;
}

.topbar-user span {
  font-size: 12px;
  font-weight: 500;
}

.welcome-card h1,
.work-hero h1 {
  font-size: 27px;
}

.welcome-card p,
.work-hero span,
.work-summary p,
.work-slot-heading span {
  font-size: 14px;
  font-weight: 500;
}

.today-chip,
.metric-card span,
.metric-card small,
.vehicle-toggle-copy span,
.section-heading p,
.vehicle-modal-header p,
.work-modal-header p,
.vehicle-summary dt,
.vehicle-message,
.work-booking-message {
  font-size: 13px;
}

.metric-card span,
.metric-card small,
.vehicle-toggle-copy span,
.section-heading p,
.vehicle-summary dt,
.vehicle-message,
.work-booking-message {
  font-weight: 600;
}

.metric-card strong {
  font-size: 32px;
}

.vehicle-toggle-copy strong,
.section-heading h2 {
  font-size: 21px;
}

.work-status,
.vehicle-state {
  font-size: 12px;
  font-weight: 600;
}

.vehicle-modal-header h3,
.work-modal-header h3 {
  font-size: 24px;
}

.vehicle-modal-header span,
.work-modal-header span,
.vehicle-summary dd,
.dash-field input,
.dash-field textarea {
  font-size: 14px;
}

.vehicle-summary dd,
.dash-field,
.dash-field input,
.dash-field textarea {
  font-weight: 600;
}

.work-summary strong {
  font-size: 19px;
}

.work-slot-heading h4 {
  font-size: 21px;
}

.work-slot-button span,
.work-slot-button small,
.work-time-button span {
  font-size: 12px;
}

.work-slot-button strong {
  font-size: 25px;
}

.work-time-button strong {
  font-size: 17px;
}

.work-booking-button,
.dash-primary-button,
.dash-outline-button {
  font-size: 13px;
  font-weight: 700;
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 980px) {
  .showcase-shell {
    width: 100%;
  }

  .page-frame {
    border: 0;
    border-radius: 0;
  }

  .site-header {
    padding: 0 22px;
  }

  main {
    padding: 28px 22px 36px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-card {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
  }

  .preview-stack {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 70px;
    padding: 0 24px;
  }

  .header-left,
  .header-right {
    justify-content: space-between;
    gap: 14px;
  }

  .product-label,
  .service-status,
  .header-right {
    display: none;
  }

  .brand {
    font-size: 20px;
  }

  .header-divider {
    display: none;
  }

  main {
    padding: 20px 12px 34px;
  }

  .auth-layout {
    gap: 26px;
  }

  .auth-card {
    padding: 26px 14px 26px;
    border-radius: 8px;
    box-shadow: none;
  }

  .mode-tabs {
    margin: 0;
  }

  .tab {
    min-height: 46px;
    font-size: 14px;
  }

  .auth-form {
    gap: 18px;
    padding-top: 24px;
  }

  .role-picker {
    gap: 8px;
  }

  .role-picker legend,
  .field {
    font-size: 13px;
  }

  .role-picker label {
    min-height: 48px;
    gap: 8px;
    font-size: 12px;
  }

  .role-icon {
    width: 18px;
    height: 18px;
  }

  .input-control {
    min-height: 38px;
  }

  .input-control input {
    height: 38px;
    padding: 0 10px;
    font-size: 12px;
  }

  .input-control > svg {
    width: 16px;
    height: 16px;
    margin-left: 10px;
  }

  .form-options {
    font-size: 11px;
  }

  .remember-option input {
    width: 14px;
    height: 14px;
  }

  .primary-button,
  .outline-button {
    min-height: 38px;
    font-size: 13px;
  }

  .divider {
    gap: 12px;
    font-size: 12px;
  }

  .preview-card {
    min-height: 86px;
    padding: 14px;
    border-radius: 8px;
  }

  .preview-title {
    gap: 12px;
  }

  .preview-title h2 {
    font-size: 14px;
  }

  .preview-badge {
    width: 40px;
    height: 40px;
  }

  .preview-badge svg {
    width: 20px;
    height: 20px;
  }

  .empty-preview {
    display: none;
  }

  .dashboard {
    padding: 22px 16px;
    border-radius: 8px;
  }

  .dashboard-header {
    display: grid;
  }

}

@media (max-width: 1120px) {
  .app-dashboard {
    grid-template-columns: 172px minmax(0, 1fr);
  }

  .sidebar-brand {
    gap: 0;
  }

  .sidebar-brand span {
    display: none;
  }

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

  .courier-home-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-layout {
    grid-template-columns: 1fr;
  }

  .vehicle-layout.is-single .vehicle-summary,
  .vehicle-layout.is-single .vehicle-summary dl {
    grid-template-columns: 1fr;
  }
}

/* 2026-07-30: route planner rebuilt from the approved operational prototype */
.route-builder-panel.route-planner {
  display: block;
  max-width: 1440px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.route-builder-panel.route-planner[hidden] {
  display: none;
}

.route-planner-heading,
.route-planner-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.route-planner-heading {
  margin-bottom: 14px;
  padding: 2px 2px 0;
}

.route-planner-heading > div,
.route-planner-card-head > div {
  min-width: 0;
}

.route-planner-eyebrow,
.route-planner-card-head p {
  margin: 0 0 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-planner-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(24px, 2.3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.route-planner-heading > div > span {
  display: block;
  max-width: 720px;
  margin-top: 6px;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.route-planner-online {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(22, 101, 52, 0.16);
  border-radius: 999px;
  padding: 8px 12px;
  background: #f0fdf4;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
}

.route-planner-online i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #166534;
}

.route-workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

.route-workflow-step {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  min-height: 66px;
  border-right: 1px solid #e2e8f0;
  padding: 10px 16px;
  color: #475569;
  text-decoration: none;
}

.route-workflow-step:last-child {
  border-right: 0;
}

.route-workflow-step:hover,
.route-workflow-step.is-active {
  background: #fff7ed;
  color: #9a3412;
}

.route-workflow-step.is-active {
  box-shadow: inset 0 -3px 0 #c2410c;
}

.route-workflow-step > span {
  grid-row: span 2;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.route-workflow-step:hover > span,
.route-workflow-step.is-active > span {
  background: #c2410c;
  color: #ffffff;
}

.route-workflow-step strong {
  align-self: end;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

.route-workflow-step small {
  align-self: start;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

.route-planner-grid {
  display: grid;
  grid-template-columns: minmax(470px, 1.12fr) minmax(390px, 0.88fr);
  gap: 16px;
  align-items: start;
}

.route-builder-panel.route-planner .route-planner-orders,
.route-planner .route-builder-map-card,
.route-planner .route-builder-call-card,
.route-planner .route-distribution-panel {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.route-planner-card-head {
  min-height: 70px;
  border-bottom: 1px solid #eef2f7;
  padding: 14px 16px;
}

.route-planner-card-head h3 {
  margin: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.route-date-control {
  display: grid;
  flex: none;
  gap: 3px;
}

.route-date-control > span {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.route-date-control input {
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 13px;
}

.route-source-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid #eef2f7;
  padding: 11px 16px;
  scrollbar-width: thin;
}

.route-source-filter {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: #475569;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}

.route-source-filter:hover,
.route-source-filter.is-active {
  border-color: #c2410c;
  background: #fff7ed;
  color: #9a3412;
}

.route-source-filter i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.route-source-filter i.is-ozon,
.route-source-badge.is-ozon {
  background: #1d4ed8;
}

.route-source-filter i.is-wildberries,
.route-source-badge.is-wildberries {
  background: #9d174d;
}

.route-source-filter i.is-yandex,
.route-source-badge.is-yandex_market {
  background: #b45309;
}

.route-source-filter i.is-manual,
.route-source-badge.is-manual {
  background: #166534;
}

.route-source-filter i.is-b2b,
.route-source-badge.is-b2b {
  background: #475569;
}

.route-planner .route-selection-toolbar {
  margin: 0;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  padding: 10px 16px;
  background: #f8fafc;
}

.route-planner .route-selection-actions .dash-outline-button {
  min-height: 32px;
  border-color: #fdba74;
  padding: 0 11px;
  background: #ffffff;
}

.route-text-button {
  min-height: 32px;
  border: 0;
  padding: 0 6px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
}

.route-text-button:hover {
  color: #9a3412;
}

.route-planner .route-arrange-list {
  gap: 0;
  max-height: min(54vh, 610px);
  padding: 0;
}

.route-planner .route-arrange-row {
  grid-template-columns: 24px 110px minmax(190px, 1fr) 86px;
  gap: 12px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  padding: 12px 16px;
  box-shadow: none;
}

.route-planner .route-arrange-row:last-child {
  border-bottom: 0;
}

.route-planner .route-arrange-row:hover {
  background: #f8fafc;
}

.route-planner .route-arrange-row.is-selected {
  border-color: #fed7aa;
  background: #fff7ed;
  box-shadow: inset 3px 0 0 #c2410c;
}

.route-arrange-meta,
.route-arrange-details,
.route-arrange-totals {
  min-width: 0;
}

.route-arrange-meta {
  display: grid;
  justify-items: start;
  gap: 7px;
}

.route-source-badge {
  border-radius: 5px;
  padding: 3px 6px;
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.route-zone-badge {
  max-width: 100%;
  overflow: hidden;
  border-radius: 6px;
  padding: 4px 7px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-arrange-details {
  display: grid;
  gap: 3px;
}

.route-arrange-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.route-planner-heading-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
}

.route-orders-refresh {
  min-height: 38px;
  padding: 8px 13px;
  white-space: nowrap;
}

.route-orders-refresh svg {
  width: 16px;
  height: 16px;
}

.route-orders-refresh.is-loading svg {
  animation: route-refresh-spin 0.8s linear infinite;
}

@keyframes route-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.route-arrange-heading strong {
  overflow: hidden;
  color: #9a3412;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-arrange-heading span,
.route-arrange-details small,
.route-arrange-totals span {
  overflow: hidden;
  color: #64748b;
  font-size: 10px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-arrange-details p {
  overflow: hidden;
  margin: 0;
  color: #111827;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-arrange-totals {
  display: grid;
  justify-items: end;
  gap: 4px;
  text-align: right;
}

.route-arrange-totals strong {
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}

.route-build-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid #e2e8f0;
  padding: 12px 16px;
  background: #ffffff;
}

.route-build-bar > div {
  display: grid;
  gap: 2px;
}

.route-build-bar strong {
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}

.route-build-bar span {
  color: #64748b;
  font-size: 10px;
}

.route-build-bar .dash-primary-button {
  flex: none;
  width: auto;
  min-height: 40px;
}

.route-build-bar svg,
.route-builder-yandex svg,
.route-ozon-source svg {
  width: 17px;
  height: 17px;
}

.route-planner .route-ozon-source {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  margin: 0;
  border: 0;
  border-top: 1px solid #ffedd5;
  border-radius: 0;
  padding: 11px 16px;
  background: #fff7ed;
}

.route-planner .route-ozon-source .dash-outline-button {
  width: auto;
  min-height: 36px;
}

.route-planner .route-upload-message {
  margin: 0;
  border-top: 1px solid #eef2f7;
  padding: 10px 16px;
}

.route-planner-output,
.route-builder-result {
  display: grid;
  gap: 16px;
}

.route-planner .route-builder-map-card,
.route-planner .route-builder-call-card {
  display: grid;
  gap: 0;
}

.route-planner .route-builder-metrics {
  gap: 0;
  border-bottom: 1px solid #eef2f7;
}

.route-planner .route-builder-metrics article {
  border: 0;
  border-right: 1px solid #eef2f7;
  border-radius: 0;
  padding: 12px 14px;
  background: #ffffff;
}

.route-planner .route-builder-metrics article:last-child {
  border-right: 0;
}

.route-planner .route-builder-metrics span {
  font-size: 10px;
  font-weight: 650;
}

.route-planner .route-builder-metrics strong {
  margin-top: 3px;
  font-size: 20px;
  font-weight: 700;
}

.route-planner .route-builder-order-list {
  border: 0;
  border-radius: 0;
}

.route-planner .route-builder-order-row {
  grid-template-columns: 42px minmax(150px, 1.5fr) minmax(90px, 0.7fr) minmax(120px, 0.9fr);
}

.route-planner .route-builder-order-row span {
  border-right: 0;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
}

.route-planner .route-builder-order-row.is-header span {
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
}

.route-planner .route-builder-call-card {
  max-height: 620px;
}

.route-planner .route-builder-stops {
  max-height: 540px;
  overflow: auto;
  padding: 12px;
}

.route-planner .route-builder-stop {
  border-radius: 8px;
  box-shadow: none;
}

.route-planner .route-builder-stop-cells {
  grid-template-columns: 50px minmax(170px, 1fr) minmax(110px, 0.65fr);
}

.route-planner .route-builder-stop-cells .data-cell:nth-child(6) {
  grid-column: auto;
}

.route-planner .route-distribution-panel {
  margin-top: 0;
}

.route-planner .route-distribution-panel[hidden] {
  display: none;
}

.route-planner .distribution-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 14px 16px;
}

.route-planner .distribution-form .dash-primary-button {
  width: 100%;
}

.route-planner .route-distribution-panel > .route-upload-help,
.route-planner .route-distribution-panel > .carrier-admin-row,
.route-planner .route-distribution-panel > .profile-message,
.route-planner .route-distribution-panel > .distribution-orders,
.route-planner .route-distribution-panel > .operations-list {
  margin-right: 16px;
  margin-left: 16px;
}

.route-planner .route-distribution-panel > .operations-list {
  margin-bottom: 16px;
}

.route-planner .distribution-order > span {
  grid-template-columns: minmax(100px, 0.7fr) minmax(150px, 1.3fr);
}

@media (max-width: 1240px) {
  .route-planner-grid {
    grid-template-columns: minmax(420px, 1fr) minmax(360px, 0.9fr);
  }

  .route-planner .route-arrange-row {
    grid-template-columns: 24px 92px minmax(170px, 1fr);
  }

  .route-arrange-totals {
    display: none;
  }

  .route-planner .route-builder-stop-cells {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .route-planner-grid {
    grid-template-columns: 1fr;
  }

  .route-planner .route-arrange-list,
  .route-planner .route-builder-call-card {
    max-height: none;
  }

  .route-planner .route-builder-stops {
    max-height: none;
  }
}

@media (max-width: 640px) {
  .route-planner-heading {
    align-items: flex-start;
  }

  .route-planner-heading > div > span,
  .route-planner-online {
    display: none;
  }

  .route-planner-heading h2 {
    font-size: 24px;
  }

  .route-workflow-step {
    grid-template-columns: 22px minmax(0, 1fr);
    column-gap: 5px;
    min-height: 54px;
    padding: 7px 5px;
  }

  .route-workflow-step > span {
    width: 22px;
    height: 22px;
  }

  .route-workflow-step small {
    display: none;
  }

  .route-workflow-step strong {
    align-self: center;
    font-size: 9px;
  }

  .route-planner-card-head {
    align-items: flex-start;
    min-height: auto;
    padding: 12px;
  }

  .route-planner-card-head h3 {
    font-size: 14px;
  }

  .route-date-control input {
    width: 132px;
  }

  .route-source-filters,
  .route-planner .route-selection-toolbar {
    padding-right: 12px;
    padding-left: 12px;
  }

  .route-planner .route-selection-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .route-planner .route-arrange-row {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 9px;
    padding: 11px 12px;
  }

  .route-arrange-meta {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    align-items: center;
  }

  .route-arrange-details {
    grid-column: 2;
  }

  .route-arrange-heading {
    flex-wrap: wrap;
  }

  .route-arrange-details p,
  .route-arrange-details small {
    white-space: normal;
  }

  .route-build-bar {
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
  }

  .route-build-bar .dash-primary-button {
    width: 100%;
  }

  .route-planner .route-ozon-source {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .route-planner .route-ozon-source .dash-outline-button {
    width: 100%;
  }

  .route-planner .route-builder-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-planner .route-builder-metrics article:nth-child(2) {
    border-right: 0;
  }

  .route-planner .route-builder-metrics article:nth-child(-n + 2) {
    border-bottom: 1px solid #eef2f7;
  }

  .route-planner .route-builder-order-list {
    overflow-x: auto;
  }

  .route-planner .route-builder-order-row {
    min-width: 570px;
  }

  .route-planner .route-builder-stop-cells,
  .route-planner .distribution-form,
  .route-planner .distribution-order > span {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.is-dashboard-view main {
    padding: 0;
  }

  .app-dashboard {
    display: block;
    min-height: 100vh;
    padding: 60px 0 78px;
    border-radius: 0;
  }

  .courier-sidebar {
    display: none;
  }

  .courier-topbar {
    position: fixed;
    right: 0;
    left: 0;
    min-height: 60px;
    justify-content: flex-start;
    gap: 14px;
    padding: 0 14px;
  }

  .mobile-brand {
    display: block;
  }

  .mobile-brand .brand {
    font-size: 17px;
  }

  .topbar-status {
    margin-left: auto;
    min-height: 26px;
    font-size: 12px;
  }

  .topbar-user {
    min-width: 0;
  }

  .topbar-user div {
    display: none;
  }

  .user-avatar {
    width: 32px;
    height: 32px;
  }

  .courier-content {
    gap: 12px;
    padding: 16px 12px 24px;
  }

  .welcome-card {
    align-items: flex-start;
    padding: 16px;
  }

  .welcome-card::before {
    top: 16px;
    bottom: 16px;
  }

  .welcome-card h1 {
    font-size: 20px;
  }

  .welcome-card p {
    font-size: 13px;
  }

  .today-chip {
    display: none;
  }

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

  .metric-card {
    min-height: 82px;
    padding: 12px;
  }

  .metric-card:hover,
  .vehicle-panel:hover,
  .work-hero:hover,
  .work-panel:hover,
  .loading-hero:hover,
  .loading-empty:hover,
  .loading-panel:hover {
    transform: none;
  }

  .metric-card span,
  .metric-card small {
    font-size: 11px;
  }

  .metric-card strong {
    font-size: 23px;
  }

  .courier-home-grid {
    gap: 12px;
  }

  .courier-focus-card {
    min-height: 238px;
    padding: 18px;
  }

  .courier-focus-card h2 {
    margin-top: 20px;
    font-size: 22px;
  }

  .courier-focus-card > p {
    margin-bottom: 18px;
    font-size: 13px;
  }

  .courier-primary-action {
    width: 100%;
  }

  .courier-readiness-card {
    padding: 16px;
  }

  .courier-readiness-row {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 12px 0;
  }

  .courier-readiness-state {
    grid-column: 2;
    justify-self: start;
    min-height: 24px;
  }

  .courier-readiness-row > div span {
    white-space: normal;
  }

  .vehicle-panel {
    padding: 0;
  }

  .vehicle-toggle {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    gap: 10px;
    min-height: 70px;
    padding: 14px;
  }

  .vehicle-toggle .vehicle-state {
    grid-column: 2 / 3;
    justify-self: start;
    margin-top: 2px;
  }

  .vehicle-chevron {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
  }

  .vehicle-toggle-icon {
    width: 38px;
    height: 38px;
  }

  .vehicle-toggle-copy strong {
    font-size: 18px;
  }

  .work-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .work-hero h1 {
    font-size: 21px;
  }

  .work-hero span {
    font-size: 13px;
  }

  .work-booking-button {
    width: 100%;
    min-height: 42px;
    white-space: normal;
    text-align: center;
  }

  .work-panel {
    padding: 14px;
  }

  .work-summary {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 13px;
  }

  .work-summary-icon {
    width: 38px;
    height: 38px;
  }

  .work-summary strong {
    font-size: 16px;
  }

  .work-summary p {
    font-size: 13px;
  }

  .loading-hero {
    display: grid;
    gap: 14px;
    padding: 16px;
  }

  .loading-hero h1 {
    font-size: 21px;
  }

  .loading-hero span:not(.loading-date-pill) {
    font-size: 13px;
  }

  .loading-date-pill {
    justify-self: start;
  }

  .loading-empty {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .loading-empty-icon {
    width: 42px;
    height: 42px;
  }

  .loading-empty h2 {
    font-size: 18px;
  }

  .loading-empty p {
    font-size: 13px;
  }

  .loading-start-button {
    width: 100%;
    min-height: 46px;
  }

  .loading-panel {
    padding: 14px;
  }

  .loading-sequence-head,
  .loading-sequence-footer {
    align-items: stretch;
    padding: 13px;
  }

  .loading-sequence-body {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    padding: 13px;
  }

  .loading-sequence-body .data-cell {
    padding: 11px;
  }

  .loading-sequence-body .data-cell strong {
    font-size: 15px;
  }

  .loading-sequence-footer {
    display: grid;
  }

  .loading-sequence-complete {
    width: 100%;
    min-width: 0;
  }

  .loading-cell-list {
    gap: 10px;
  }

  .loading-cell-card-header {
    padding: 11px 12px;
  }

  .loading-order-card {
    padding: 12px;
  }

  .loading-order-card h3 {
    font-size: 14px;
    overflow-wrap: anywhere;
  }

  .loading-order-card p,
  .loading-order-number {
    font-size: 12px;
  }

  .loading-route-action {
    display: grid;
    gap: 12px;
    padding: 14px 12px 12px 16px;
  }

  .loading-route-action p {
    font-size: 17px;
  }

  .loading-route-action .dash-primary-button {
    width: 100%;
    min-width: 0;
  }

  .route-panel {
    padding: 14px;
  }

  .route-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .route-map-head,
  .route-deliveries-head {
    display: grid;
    gap: 4px;
    padding: 12px;
  }

  .route-map-head strong,
  .route-deliveries-head span {
    font-size: 11px;
  }

  .route-map-canvas {
    min-height: 230px;
  }

  .route-line {
    inset: 18px 20px;
    width: calc(100% - 40px);
    height: calc(100% - 36px);
  }

  .route-marker {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .route-marker-start {
    bottom: 38px;
    left: 28px;
    width: 36px;
    height: 36px;
    font-size: 11px;
  }

  .route-marker-1 {
    bottom: 78px;
    left: 27%;
  }

  .route-marker-2 {
    top: 64px;
    left: 45%;
  }

  .route-marker-3 {
    top: 34px;
    right: 32px;
  }

  .route-delivery-card {
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
    padding: 12px;
  }

  .route-delivery-card strong {
    grid-column: 2;
    font-size: 12px;
  }

  .route-call-button {
    grid-column: 2;
    width: fit-content;
    min-height: 32px;
    padding: 0 13px;
    font-size: 12px;
  }

  .route-delivery-card h3 {
    font-size: 14px;
  }

  .loading-table-wrap {
    margin-right: -2px;
    margin-left: -2px;
    border-radius: 7px;
  }

  .loading-table {
    min-width: 850px;
    font-size: 12px;
  }

  .loading-table th,
  .loading-table td {
    padding: 7px;
  }

  .vehicle-modal,
  .work-modal,
  .profile-modal,
  .route-postpone-modal {
    align-items: center;
    padding: 12px;
  }

  .vehicle-modal-dialog,
  .work-modal-dialog,
  .profile-modal-dialog,
  .route-postpone-modal-dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 12px;
  }

  .vehicle-modal-header,
  .work-modal-header,
  .profile-modal-header,
  .route-postpone-modal-header {
    padding: 16px;
  }

  .vehicle-modal-header h3,
  .work-modal-header h3,
  .profile-modal-header h3,
  .route-postpone-modal-header h3 {
    font-size: 19px;
  }

  .vehicle-modal-header span,
  .work-modal-header span,
  .profile-modal-header span,
  .route-postpone-modal-header span {
    font-size: 13px;
  }

  .work-modal-body {
    padding: 16px;
  }

  .profile-form {
    padding: 16px;
  }

  .route-postpone-form {
    padding: 16px;
  }

  .route-postpone-actions {
    grid-template-columns: 1fr;
  }

  .profile-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .work-confirm-step {
    min-height: 190px;
  }

  .work-confirm-step p {
    font-size: 19px;
  }

  .work-slot-heading {
    display: grid;
    gap: 6px;
  }

  .work-slot-heading h4 {
    font-size: 19px;
  }

  .work-slot-heading span {
    text-align: left;
  }

  .work-slot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .work-slot-button {
    min-height: 84px;
  }

  .work-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .vehicle-modal .vehicle-layout {
    padding: 14px;
  }

  .section-heading {
    display: grid;
    gap: 9px;
    margin-bottom: 14px;
  }

  .section-heading h2 {
    font-size: 18px;
  }

  .vehicle-state {
    justify-self: start;
  }

  .vehicle-summary {
    padding: 13px;
  }

  .vehicle-plate {
    grid-template-columns: minmax(0, 1fr) 52px;
    width: min(242px, 100%);
    min-height: 40px;
    font-size: 18px;
  }

  .vehicle-plate-main {
    padding: 0 10px;
  }

  .vehicle-plate-region {
    min-width: 52px;
  }

  .vehicle-plate-region-code {
    font-size: 15px;
  }

  .vehicle-plate-country {
    font-size: 8px;
  }

  .vehicle-form-row {
    grid-template-columns: 1fr;
  }

  .dash-field input {
    min-height: 40px;
  }

  .vehicle-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dash-primary-button,
  .dash-outline-button {
    width: 100%;
    min-height: 40px;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-height: 66px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 -12px 24px rgba(15, 23, 42, 0.05);
  }

  .bottom-link {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
  }

  .bottom-link.is-active {
    color: #c2410c;
  }

  .bottom-link:hover {
    color: #c2410c;
  }

  .bottom-link .nav-icon {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 760px) {
  .route-delivery-actions {
    grid-column: 2;
    width: 100%;
  }

  .route-delivery-actions .route-call-button {
    grid-column: auto;
    width: 100%;
  }

  .route-proof-upload {
    min-height: 40px;
    font-size: 12px;
  }
}

.contractor-work-crews {
  margin-top: 18px;
}

.contractor-work-crew-row {
  grid-template-columns: minmax(140px, 0.7fr) minmax(140px, 0.7fr) minmax(200px, 1.1fr) minmax(140px, 0.7fr) auto;
}

.contractor-edit-button {
  align-self: center;
  white-space: nowrap;
}

.contractor-crew-row-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.contractor-delete-button {
  color: #b91c1c;
  border-color: #fecaca;
  white-space: nowrap;
}

.contractor-delete-button:hover:not(:disabled) {
  border-color: #b91c1c;
  background: #fef2f2;
}

.contractor-work-crew-row.is-editing {
  border-color: #fdba74;
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.08);
}

.contractor-crew-inline-editor {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(170px, 0.65fr) minmax(170px, 0.7fr) minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.contractor-crew-edit-summary {
  display: grid;
  gap: 6px;
  align-self: center;
  color: #475569;
}

.contractor-crew-edit-summary strong {
  color: #111827;
  font-size: 1.05rem;
}

.contractor-crew-edit-actions {
  display: flex;
  gap: 10px;
}

.contractor-run-meta {
  display: grid;
  grid-template-columns: minmax(130px, 0.5fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  padding: 0 20px 18px;
}

.contractor-route-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}

.manifest-order-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  background: #fff;
}

.manifest-order-sequence {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 700;
}

.manifest-order-details {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(240px, 1.6fr) minmax(120px, 0.7fr) minmax(100px, 0.5fr);
  gap: 10px;
}

.manifest-verification-status {
  margin: 12px 0 0;
  color: #64748b;
}

.manifest-verification-status.is-verified,
.route-status.is-ready {
  color: #166534;
}

.route-yandex-button.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .contractor-work-crew-row,
  .contractor-run-meta,
  .manifest-order-details {
    grid-template-columns: 1fr 1fr;
  }

  .contractor-crew-inline-editor {
    grid-template-columns: 1fr 1fr;
  }

  .contractor-crew-edit-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .route-navigation-actions {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .route-yandex-button,
  .route-offline-button {
    min-height: 44px;
    width: 100%;
  }
}

@media (max-width: 620px) {
  .contractor-work-crew-row,
  .contractor-run-meta,
  .manifest-order-details,
  .contractor-crew-inline-editor {
    grid-template-columns: 1fr;
  }

  .contractor-crew-edit-actions {
    grid-column: auto;
    display: grid;
    grid-template-columns: 1fr;
  }

  .contractor-crew-row-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .manifest-order-row {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 12px;
  }

  .manifest-order-sequence {
    width: 32px;
    height: 32px;
  }

  .courier-route-heading-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .courier-route-back {
    width: 100%;
    min-height: 44px;
  }
}

.loading-sequence-body .data-cell.is-wide {
  grid-column: 1 / -1;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (min-width: 761px) {
  .app-dashboard {
    display: block;
  }

  .courier-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    width: 236px;
    min-height: 100vh;
    overflow-y: auto;
  }

  .courier-shell {
    margin-left: 236px;
    min-height: 100vh;
    padding-top: 56px;
  }

  .courier-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 236px;
    z-index: 25;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  }
}

@media (min-width: 761px) and (max-width: 1120px) {
  .courier-sidebar {
    width: 188px;
  }

  .courier-shell {
    margin-left: 188px;
  }

  .courier-topbar {
    left: 188px;
  }
}

/* Partner B2B cabinet */
.role-picker {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.partner-nav,
.partner-mobile-nav,
.contractor-nav,
.contractor-mobile-nav,
.admin-nav,
.admin-mobile-nav {
  display: none;
}

body.is-courier-view .partner-only,
body.is-logistician-view .partner-only,
body.is-logistician-view .admin-only,
body.is-contractor-view .partner-only,
body.is-partner-view .courier-only,
body.is-partner-view .logistician-only,
body.is-partner-view .contractor-only,
body.is-partner-view .courier-nav,
body.is-partner-view .logistician-nav,
body.is-partner-view .contractor-nav,
body.is-partner-view .courier-mobile-nav,
body.is-partner-view .logistician-mobile-nav,
body.is-partner-view .contractor-mobile-nav,
body.is-contractor-view .courier-only,
body.is-contractor-view .logistician-only,
body.is-contractor-view .courier-nav,
body.is-contractor-view .logistician-nav,
body.is-contractor-view .partner-nav,
body.is-contractor-view .courier-mobile-nav,
body.is-contractor-view .logistician-mobile-nav,
body.is-contractor-view .partner-mobile-nav,
body.is-admin-view .courier-only,
body.is-admin-view .partner-only,
body.is-admin-view .contractor-only,
body.is-admin-view .courier-nav,
body.is-admin-view .logistician-nav,
body.is-admin-view .partner-nav,
body.is-admin-view .contractor-nav,
body.is-admin-view .courier-mobile-nav,
body.is-admin-view .logistician-mobile-nav,
body.is-admin-view .partner-mobile-nav,
body.is-admin-view .contractor-mobile-nav {
  display: none !important;
}

body.is-partner-view .partner-nav {
  display: grid;
}

body.is-contractor-view .contractor-nav {
  display: grid;
}

.partner-orders-panel {
  margin-bottom: 18px;
}

.partner-order-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.partner-order-form .is-wide {
  grid-column: span 2;
}

.partner-order-form textarea {
  min-height: 92px;
  resize: vertical;
}

.partner-order-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.partner-order-actions .profile-message {
  flex: 1;
  margin: 0;
}

.partner-orders-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.partner-order-card {
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

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

.partner-order-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.partner-order-card-head h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 18px;
}

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

.partner-order-data .is-wide {
  grid-column: span 2;
}

@media (max-width: 980px) {
  body.is-partner-view .partner-mobile-nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  body.is-contractor-view .contractor-mobile-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

  .partner-order-data {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .role-picker {
    grid-template-columns: 1fr;
  }

  .partner-order-form {
    grid-template-columns: 1fr;
  }

  .partner-order-form .is-wide,
  .partner-order-data .is-wide {
    grid-column: auto;
  }

  .partner-order-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .partner-order-actions .dash-primary-button {
    width: 100%;
  }

  .partner-order-data {
    grid-template-columns: 1fr;
  }
}

/* Administrator and contractor cabinets */
.admin-management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.admin-management-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.contractor-vehicle-form {
  width: 100%;
  max-width: 760px;
}

.contractor-form-actions,
.contractor-fleet-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contractor-form-actions {
  justify-content: flex-start;
}

.contractor-fleet-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.admin-management-card {
  display: grid;
  align-content: start;
  gap: 14px;
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.admin-management-card h3 {
  margin: 0;
  color: #111827;
  font-size: 17px;
  font-weight: 650;
}

.admin-users-heading {
  margin-top: 24px;
}

.route-history-filters {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(180px, 240px) max-content max-content;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}

.route-history-filters .dash-primary-button,
.route-history-filters .dash-outline-button {
  min-height: 42px;
}

.route-history-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.route-history-summary article {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  background: #fff;
}

.route-history-summary span {
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.route-history-summary strong {
  color: #111827;
  font-size: 22px;
  font-weight: 700;
}

.route-history-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.route-history-card {
  overflow: hidden;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.route-history-card.is-expanded {
  border-color: #fdba74;
}

.route-history-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
}

.route-history-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.route-history-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: #fff7ed;
  color: #c2410c;
}

.route-history-icon svg {
  width: 21px;
  height: 21px;
}

.route-history-identity > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.route-history-identity span {
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.route-history-identity h3,
.route-history-identity p {
  margin: 0;
}

.route-history-identity h3 {
  color: #111827;
  font-size: 18px;
  font-weight: 700;
}

.route-history-identity p {
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-history-card-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.route-history-card-actions .dash-outline-button {
  min-height: 38px;
  padding: 0 14px;
}

.route-history-completed-status {
  border-radius: 999px;
  padding: 8px 12px;
  background: #ecfdf5;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
}

.route-history-card-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid #edf1f6;
  padding: 12px 16px;
  background: #f8fafc;
}

.route-history-card-metrics .data-cell {
  min-height: 58px;
  background: #fff;
}

.route-history-card-metrics .is-wide {
  grid-column: span 2;
}

.route-history-details {
  display: grid;
  gap: 14px;
  border-top: 1px solid #fed7aa;
  padding: 16px;
  background: #fffaf5;
}

.route-history-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.route-history-orders {
  display: grid;
  gap: 10px;
}

.route-history-order {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.route-history-order-sequence {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 750;
}

.route-history-order-data {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.route-history-order-data .data-cell {
  min-height: 58px;
}

.route-history-order-data .is-wide {
  grid-column: span 2;
}

.route-history-detail-message {
  margin: 0;
  color: #64748b;
}

.route-history-load-more {
  display: flex;
  margin: 16px auto 0;
}

.route-history-load-more[hidden] {
  display: none;
}

.admin-user-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.contractor-panel {
  margin-top: 18px;
}

.contractor-panel[data-contractor-panel] {
  animation: contractor-panel-enter 160ms ease-out;
}

@keyframes contractor-panel-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contractor-booking-form,
.contractor-assignment-form {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.contractor-run-card {
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
}

.contractor-run-card .section-heading {
  align-items: center;
  margin-bottom: 10px;
}

.contractor-run-card .section-heading p,
.contractor-run-card .section-heading h3 {
  margin: 0;
}

.contractor-run-card .section-heading p {
  margin-bottom: 3px;
}

.contractor-run-card .contractor-run-meta {
  grid-template-columns: minmax(110px, 0.4fr) minmax(220px, 1fr) auto;
  gap: 8px;
  padding: 0;
}

.contractor-run-card .contractor-run-meta .data-cell {
  min-height: 58px;
  align-content: center;
  padding: 8px 10px;
}

.contractor-run-card .contractor-route-link {
  min-height: 58px;
  padding-inline: 18px;
}

.contractor-run-head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.contractor-run-toggle {
  width: auto;
  min-width: 170px;
}

.contractor-available-runs {
  display: grid;
  gap: 14px;
}

.contractor-available-run-card {
  display: grid;
  gap: 10px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fffaf5;
  box-shadow: 0 10px 28px rgba(194, 65, 12, 0.06);
}

.contractor-available-run-card .section-heading {
  align-items: center;
  margin-bottom: 0;
}

.contractor-available-run-card .section-heading p,
.contractor-available-run-card .section-heading h3 {
  margin: 0;
}

.contractor-available-run-card .section-heading p {
  margin-bottom: 3px;
}

.contractor-available-run-card .contractor-run-meta {
  grid-template-columns: minmax(110px, 0.45fr) minmax(140px, 0.55fr) minmax(180px, 1fr) auto;
  gap: 8px;
  padding: 0;
}

.contractor-available-run-card .contractor-run-meta .data-cell {
  min-height: 58px;
  align-content: center;
  padding: 8px 10px;
}

.contractor-available-run-card .contractor-run-meta .data-cell.is-wide {
  grid-column: auto;
}

.contractor-available-run-card .contractor-route-link {
  min-height: 58px;
  padding-inline: 18px;
}

.contractor-available-run-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid #fed7aa;
  padding-top: 10px;
}

.contractor-available-run-actions select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: #111827;
  font: inherit;
}

@media (max-width: 620px) {
  .contractor-run-card .section-heading,
  .contractor-run-head-actions {
    align-items: stretch;
  }

  .contractor-run-card .contractor-run-meta {
    grid-template-columns: 1fr 1fr;
  }

  .contractor-run-card .contractor-route-link {
    grid-column: 1 / -1;
  }

  .contractor-run-head-actions,
  .contractor-run-toggle {
    width: 100%;
  }

  .contractor-available-run-card {
    padding: 12px;
  }

  .contractor-available-run-card .section-heading {
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }

  .contractor-available-run-card .contractor-run-meta {
    grid-template-columns: 1fr 1fr;
  }

  .contractor-available-run-card .contractor-run-meta .data-cell.is-wide,
  .contractor-available-run-card .contractor-route-link {
    grid-column: 1 / -1;
  }

  .contractor-available-run-actions {
    grid-template-columns: 1fr;
  }
}

.contractor-run-orders {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
}

.contractor-vehicle-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.contractor-fleet-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 14px;
  background: #f8fafc;
}

.contractor-fleet-card.is-released {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.contractor-fleet-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  padding: 9px;
  background: #fff;
  color: #475569;
}

.contractor-fleet-card.is-released .contractor-fleet-icon {
  color: #166534;
}

.contractor-fleet-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.contractor-fleet-copy strong {
  color: #111827;
  font-size: 15px;
  font-weight: 650;
}

.contractor-fleet-copy span,
.contractor-fleet-copy small {
  color: #475569;
  font-size: 12px;
  line-height: 1.4;
}

.contractor-fleet-card.is-released .contractor-fleet-copy small {
  color: #166534;
}

@media (max-width: 900px) {
  .admin-management-grid {
    grid-template-columns: 1fr;
  }

  .contractor-booking-form,
  .contractor-assignment-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .contractor-booking-form,
  .contractor-assignment-form,
  .admin-user-row {
    grid-template-columns: 1fr;
  }

  .contractor-vehicle-picker {
    margin: 14px 16px 0;
    padding: 14px;
  }

  .contractor-vehicle-picker-controls,
  .contractor-fleet-card {
    grid-template-columns: 1fr;
  }

  .contractor-fleet-card .dash-primary-button,
  .contractor-fleet-card .dash-outline-button,
  .contractor-vehicle-picker-controls .dash-primary-button,
  .contractor-vehicle-picker-controls .dash-outline-button {
    width: 100%;
  }

  .contractor-form-actions,
  .contractor-fleet-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
}

/* Route builder: the decorative route preview is intentionally hidden.
   The logistician works with the real stop list and Yandex route link instead. */
.route-builder-map {
  display: none;
}

body.is-logistician-view .courier-only,
body.is-courier-view .logistician-only {
  display: none !important;
}

/* 2026-07 design refresh: clean logistics SaaS shell inspired by DESIGN.md guidance. */
:root {
  --radius: 8px;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  --dashboard-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 16px 40px rgba(15, 23, 42, 0.05);
  --dashboard-shadow-hover: 0 1px 2px rgba(15, 23, 42, 0.05), 0 22px 54px rgba(15, 23, 42, 0.08);
}

body {
  font-size: 15px;
  font-weight: 450;
  line-height: 1.45;
}

body.is-dashboard-view,
body.is-dashboard-view .page-frame {
  background:
    linear-gradient(180deg, rgba(255, 247, 237, 0.74) 0, rgba(246, 248, 251, 0) 236px),
    var(--bg);
}

.page-frame {
  border-color: rgba(203, 213, 225, 0.78);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
}

.site-header,
.courier-topbar,
.sidebar-brand {
  min-height: 64px;
}

.site-header {
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  color: #c2410c;
  font-size: 21px;
  font-weight: 800;
}

.product-label,
.service-status,
.sidebar-brand span {
  color: #475569;
  font-weight: 600;
}

.service-status span,
.online-dot {
  background: #166534;
  box-shadow: 0 0 0 4px rgba(22, 101, 52, 0.1);
}

main {
  padding: 36px 40px 22px;
}

.auth-layout {
  grid-template-columns: minmax(330px, 390px) minmax(0, 1fr);
  gap: 34px;
}

.auth-card,
.preview-card,
.welcome-card,
.metric-card,
.vehicle-panel,
.work-hero,
.work-panel,
.loading-hero,
.loading-empty,
.loading-panel,
.route-panel,
.vehicle-modal-dialog,
.work-modal-dialog,
.profile-modal-dialog {
  border-color: rgba(203, 213, 225, 0.82);
  border-radius: 8px;
  box-shadow: var(--dashboard-shadow);
}

.auth-card {
  padding: 26px;
}

.tab {
  min-height: 52px;
  font-size: 15px;
  font-weight: 750;
}

.tab::after {
  height: 3px;
  border-radius: 999px 999px 0 0;
}

.role-picker label,
.input-control,
.dash-field input,
.dash-field textarea,
.profile-role-row,
.work-slot-button,
.work-time-button {
  border-color: #dbe3ec;
  border-radius: 8px;
}

.role-picker label {
  min-height: 64px;
  font-weight: 650;
}

.role-picker label:has(input:checked) {
  border-color: #c2410c;
  background: #fff7ed;
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.09);
}

.primary-button,
.outline-button,
.secondary-button,
.dash-primary-button,
.dash-outline-button,
.work-booking-button,
.loading-start-button {
  min-height: 44px;
  border-radius: 999px;
  font-weight: 800;
}

.primary-button,
.dash-primary-button,
.work-booking-button,
.loading-start-button {
  background: #c2410c;
  box-shadow: 0 14px 30px rgba(194, 65, 12, 0.2);
}

.primary-button:hover,
.dash-primary-button:hover,
.work-booking-button:hover,
.loading-start-button:hover {
  background: #9a3412;
  box-shadow: 0 18px 38px rgba(194, 65, 12, 0.26);
}

.outline-button,
.secondary-button,
.dash-outline-button {
  background: #ffffff;
}

.preview-card {
  min-height: 316px;
  padding: 30px;
  background: #ffffff;
}

.preview-courier {
  border-top: 3px solid #c2410c;
}

.preview-logistician {
  border-top: 3px solid #166534;
}

.preview-title h2,
.section-heading h2,
.dashboard h2,
.empty-state h3 {
  font-weight: 750;
}

.preview-badge,
.empty-icon,
.vehicle-toggle-icon,
.work-summary-icon,
.loading-empty-icon,
.work-question-icon {
  border-radius: 8px;
  background: #fff7ed;
  color: #c2410c;
}

.preview-logistician .preview-badge {
  background: #f0fdf4;
  color: #166534;
}

.app-dashboard {
  grid-template-columns: 248px minmax(0, 1fr);
}

.courier-sidebar {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 1px 0 0 rgba(226, 232, 240, 0.72);
}

.sidebar-brand {
  padding: 0 20px;
}

.sidebar-nav {
  gap: 8px;
  padding: 18px 14px;
}

.sidebar-link,
.sidebar-logout {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 720;
}

.sidebar-link.is-active {
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px rgba(194, 65, 12, 0.12);
}

.sidebar-link.is-active::before {
  top: 10px;
  bottom: 10px;
  width: 4px;
}

.sidebar-logout {
  margin: auto 14px 18px;
}

.courier-topbar {
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 0 rgba(226, 232, 240, 0.78);
}

.topbar-status {
  min-height: 32px;
  padding: 0 13px;
  font-weight: 750;
}

.topbar-user {
  min-height: 42px;
  padding: 5px 10px 5px 5px;
  border-color: rgba(226, 232, 240, 0.9);
  background: #ffffff;
}

.topbar-user strong {
  font-size: 13px;
  font-weight: 800;
}

.topbar-user span {
  font-weight: 650;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px rgba(194, 65, 12, 0.12);
  font-weight: 850;
}

.courier-content {
  max-width: 1320px;
  gap: 18px;
  padding: 26px 28px 44px;
}

.welcome-card,
.work-hero,
.loading-hero {
  padding: 24px;
}

.welcome-card::before {
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 0;
}

.welcome-card h1,
.work-hero h1,
.loading-hero h1 {
  font-size: 28px;
  font-weight: 820;
  line-height: 1.12;
}

.welcome-card p,
.work-hero span,
.loading-hero span:not(.loading-date-pill),
.work-summary p,
.empty-state p {
  color: #475569;
  font-size: 14px;
  font-weight: 520;
}

.today-chip,
.vehicle-state,
.work-status,
.loading-date-pill,
.loading-status,
.route-status,
.cell-code {
  border-radius: 999px;
  font-weight: 800;
}

.metric-grid {
  gap: 18px;
}

.metric-card {
  min-height: 118px;
  padding: 20px;
}

.metric-card::before {
  height: 4px;
}

.metric-card span,
.metric-card small,
.section-heading p,
.work-hero p,
.loading-hero p,
.work-slot-heading p,
.vehicle-modal-header p,
.work-modal-header p,
.profile-modal-header p {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.metric-card strong {
  font-size: 34px;
  font-weight: 830;
}

.vehicle-toggle {
  min-height: 84px;
  padding: 18px 20px;
}

.vehicle-toggle-copy strong {
  font-size: 21px;
  font-weight: 820;
}

.vehicle-toggle-copy span {
  font-weight: 700;
}

.vehicle-summary,
.work-summary,
.loading-cell-card,
.route-map,
.route-deliveries,
.empty-state {
  border-color: #dbe3ec;
  border-radius: 8px;
}

.vehicle-summary,
.work-summary,
.route-map,
.route-deliveries {
  background: #ffffff;
}

.vehicle-modal-backdrop,
.work-modal-backdrop,
.profile-modal-backdrop {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
}

.vehicle-modal-dialog,
.work-modal-dialog,
.profile-modal-dialog {
  box-shadow: 0 34px 110px rgba(15, 23, 42, 0.28);
}

.vehicle-modal-header,
.work-modal-header,
.profile-modal-header {
  padding: 24px 26px;
}

.vehicle-modal-header h3,
.work-modal-header h3,
.profile-modal-header h3 {
  font-size: 24px;
  font-weight: 840;
}

.vehicle-modal-close,
.work-modal-close,
.profile-modal-close {
  display: inline-grid;
  align-items: center;
  justify-items: center;
  border-radius: 999px;
  line-height: 0;
  padding: 0;
}

.vehicle-modal-close span,
.work-modal-close span,
.profile-modal-close span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  margin: 0;
  line-height: 0;
}

.vehicle-modal-close span svg,
.work-modal-close span svg,
.profile-modal-close span svg {
  width: 18px;
  height: 18px;
}

.work-summary {
  min-height: 104px;
  padding: 18px;
  background: #f8fafc;
}

.work-summary strong {
  font-size: 20px;
  font-weight: 820;
}

.work-slot-grid,
.work-time-grid {
  gap: 10px;
}

.work-slot-button,
.work-time-button {
  background: #ffffff;
}

.work-slot-button:hover,
.work-slot-button.is-selected,
.work-time-button:hover,
.work-time-button.is-selected {
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.09);
}

.work-slot-button strong {
  font-size: 27px;
  font-weight: 820;
}

.work-time-button strong {
  font-weight: 840;
}

.loading-empty {
  min-height: 132px;
  padding: 24px;
}

.loading-empty h2 {
  font-size: 24px;
  font-weight: 840;
}

.loading-panel,
.route-panel {
  padding: 20px;
}

.loading-cell-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.loading-cell-card {
  background: #ffffff;
}

.loading-cell-card-header {
  padding: 14px 16px;
  background: #f8fafc;
}

.loading-cell-card-header strong,
.loading-order-card h3,
.route-map-head span,
.route-deliveries-head p,
.route-delivery-card h3 {
  font-weight: 840;
}

.loading-order-card {
  padding: 15px 16px;
}

.loading-order-card > div {
  display: contents;
}

.loading-order-number {
  order: 1;
}

.loading-order-card p {
  order: 2;
  color: #111827;
  font-size: 17px;
  font-weight: 860;
  line-height: 1.25;
}

.loading-order-card h3 {
  order: 3;
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.loading-route-action {
  border-color: rgba(194, 65, 12, 0.3);
  border-radius: 8px;
  padding: 18px 18px 18px 22px;
  background: #fff7ed;
  box-shadow: 0 18px 42px rgba(194, 65, 12, 0.14);
}

.loading-route-badge {
  background: #111827;
  color: #ffffff;
}

.loading-route-action p {
  font-size: 22px;
  font-weight: 880;
}

.loading-tsd-notice {
  margin: 0 0 16px;
}

.loading-route-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.loading-route-footer .dash-primary-button {
  min-width: 190px;
}

.route-grid {
  gap: 16px;
}

.route-map-head,
.route-deliveries-head {
  padding: 15px 16px;
}

.route-map-canvas {
  min-height: 350px;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.18) 1px, transparent 1px),
    linear-gradient(0deg, rgba(148, 163, 184, 0.18) 1px, transparent 1px),
    #f8fafc;
  background-size: 42px 42px;
}

.route-marker {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
}

.route-delivery-card {
  padding: 15px 16px;
}

.mobile-bottom-nav {
  border-top-color: rgba(203, 213, 225, 0.82);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.bottom-link {
  font-weight: 800;
}

.logistician-nav,
.admin-nav {
  display: none;
}

body.is-logistician-view .courier-nav,
body.is-logistician-view .courier-mobile-nav,
body.is-courier-view .logistician-mobile-nav,
body.is-courier-view .admin-mobile-nav {
  display: none;
}

@media (max-width: 980px) {
  body.is-logistician-view .logistician-mobile-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.is-admin-view .admin-mobile-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

body.is-logistician-view .courier-only,
body.is-courier-view .logistician-only {
  display: none !important;
}

body.is-logistician-view .logistician-nav {
  display: grid;
}

body.is-admin-view .admin-nav {
  display: grid;
}

.logistician-only {
  max-width: 1280px;
}

.logistician-dispatch-panel {
  border: 1px solid rgba(203, 213, 225, 0.86);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: var(--dashboard-shadow);
}

#logisticianAdmin {
  order: 1;
}

#logisticianIntegrations {
  order: 2;
}

.admin-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.admin-heading-actions .dash-outline-button {
  width: auto;
}

.admin-heading-actions .dash-outline-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.dispatch-date-filter {
  display: grid;
  gap: 7px;
  min-width: 188px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.dispatch-date-filter input {
  min-height: 42px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-weight: 700;
}

.dispatch-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.dispatch-summary-grid article {
  min-height: 82px;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: 8px;
  padding: 15px;
  background: #f8fafc;
}

.dispatch-summary-grid span {
  display: block;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.dispatch-summary-grid strong {
  display: block;
  margin-top: 7px;
  color: #111827;
  font-size: 28px;
  font-weight: 850;
  line-height: 1;
}

.dispatch-vehicle-list {
  display: grid;
  gap: 12px;
}

.dispatch-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 28px;
  background: #f8fafc;
  color: #475569;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.dispatch-vehicle-card {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(203, 213, 225, 0.88);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.045);
}

.dispatch-vehicle-card.is-confirmed {
  border-color: rgba(22, 101, 52, 0.24);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.64), #ffffff 58%);
}

.dispatch-vehicle-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dispatch-vehicle-head h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 850;
}

.dispatch-vehicle-head p {
  margin: 5px 0 0;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.dispatch-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.dispatch-status.is-confirmed {
  background: #dcfce7;
  color: #166534;
}

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

.dispatch-vehicle-specs div {
  display: grid;
  gap: 5px;
  min-height: 70px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.dispatch-vehicle-specs span,
.dispatch-restrictions span {
  color: #475569;
  font-size: 12px;
  font-weight: 750;
}

.dispatch-vehicle-specs strong {
  color: #111827;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.3;
}

.dispatch-restrictions {
  display: grid;
  gap: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 13px;
  background: #f8fafc;
}

.dispatch-restrictions.has-restrictions {
  border-color: rgba(180, 83, 9, 0.28);
  background: #fff7ed;
}

.dispatch-restrictions strong {
  color: #111827;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.dispatch-restrictions.has-restrictions strong {
  color: #92400e;
}

.dispatch-actions {
  display: flex;
  justify-content: flex-end;
}

.dispatch-actions .dash-primary-button {
  min-width: 230px;
}

.logistician-route-panel {
  margin-top: 0;
}

.dispatch-address-panel {
  display: grid;
  gap: 14px;
}

.dispatch-address-total {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: start;
  gap: 10px;
  width: fit-content;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.dispatch-address-total span {
  color: #475569;
  font-size: 13px;
  font-weight: 750;
}

.dispatch-address-total strong {
  color: #111827;
  font-size: 18px;
  font-weight: 850;
}

.dispatch-address-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.dispatch-address-head-actions .dash-outline-button {
  width: auto;
  min-height: 36px;
  padding: 0 13px;
}

.dispatch-address-blocks {
  display: grid;
  gap: 12px;
}

.dispatch-address-block {
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 8px;
  background: #ffffff;
}

.dispatch-address-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  background: #fff7ed;
}

.dispatch-address-block-head h3 {
  margin: 0;
  color: #c2410c;
  font-size: 18px;
  font-weight: 900;
}

.dispatch-address-block-head p {
  margin: 4px 0 0;
  color: #475569;
  font-size: 13px;
  font-weight: 750;
}

.dispatch-address-block-head > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #ffffff;
  color: #111827;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.dispatch-address-table {
  display: grid;
}

.dispatch-address-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(110px, 0.7fr) minmax(130px, 0.8fr) minmax(180px, 1.2fr);
  gap: 12px;
  border-top: 1px solid #e2e8f0;
  padding: 11px 14px;
}

.dispatch-address-row.is-header {
  background: #f8fafc;
}

.dispatch-address-row span {
  color: #111827;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.dispatch-address-row.is-header span {
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}

.active-orders-panel {
  display: grid;
  gap: 16px;
}

.active-orders-filters,
.active-orders-form-grid {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(150px, 190px);
  gap: 10px;
}

.active-orders-form-grid {
  grid-template-columns: minmax(220px, 280px) minmax(180px, 220px);
  align-items: end;
}

.active-orders-filters label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.active-orders-filters select,
.active-orders-filters input,
.active-orders-upload select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-weight: 700;
}

.active-orders-form-grid .dash-field {
  min-width: 0;
  gap: 7px;
}

.active-orders-form-grid .dash-field select,
.active-orders-form-grid .dash-field input {
  width: 100%;
  height: 44px;
  min-height: 44px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: none;
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
}

.active-orders-form-grid .dash-field select:focus,
.active-orders-form-grid .dash-field input:focus {
  border-color: #c2410c;
  outline: 3px solid rgba(194, 65, 12, 0.12);
}

.active-orders-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  background: #f8fafc;
}

.active-orders-toolbar-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.active-orders-toolbar-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 8px;
  background: #fff7ed;
  color: #c2410c;
}

.active-orders-toolbar-icon svg {
  width: 19px;
  height: 19px;
}

.active-orders-toolbar-copy strong {
  display: block;
  color: #111827;
  font-size: 14px;
  font-weight: 800;
}

.active-orders-toolbar-copy p {
  margin: 3px 0 0;
  color: #475569;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.active-orders-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.active-orders-actions button {
  gap: 8px;
}

.active-orders-actions button span,
.active-orders-actions button svg {
  width: 16px;
  height: 16px;
}

.active-orders-message {
  min-height: 18px;
  margin: -4px 2px 0;
}

.ozon-api-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  border: 1px solid rgba(194, 65, 12, 0.34);
  border-radius: 999px;
  padding: 0 12px;
  background: #fff7ed;
  color: #c2410c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.ozon-api-button:hover {
  border-color: #c2410c;
  background: #ffffff;
}

.ozon-api-button span {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
}

.ozon-api-button span svg {
  width: 16px;
  height: 16px;
}

.active-orders-list {
  display: grid;
  gap: 12px;
}

.active-order-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(203, 213, 225, 0.88);
  border-radius: 8px;
  padding: 0;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.045);
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.active-order-card.is-edited {
  border-color: rgba(194, 65, 12, 0.58);
  box-shadow: 0 12px 32px rgba(194, 65, 12, 0.09);
}

.active-order-card.is-postponed {
  border-color: rgba(180, 83, 9, 0.26);
  background: linear-gradient(180deg, #fff7ed, #ffffff 62%);
}

.active-order-card.is-ozon {
  border-color: rgba(29, 78, 216, 0.22);
}

.active-order-card.is-cancelled {
  border-color: rgba(185, 28, 28, 0.58);
  box-shadow: 0 12px 34px rgba(185, 28, 28, 0.08);
}

.active-order-card.is-cancelled .active-order-head {
  border-bottom-color: rgba(185, 28, 28, 0.18);
  background: #fef2f2;
}

.active-order-card.is-cancelled .active-order-head-row {
  border-bottom-color: rgba(185, 28, 28, 0.18);
  background: #fef2f2;
}

.active-order-card.is-cancelled .active-order-sequence {
  background: #fee2e2;
  color: #b91c1c;
}

.active-order-card.is-delivered {
  border-color: rgba(22, 101, 52, 0.46);
  box-shadow: 0 12px 34px rgba(22, 101, 52, 0.07);
}

.active-order-card.is-delivered .active-order-head {
  border-bottom-color: rgba(22, 101, 52, 0.18);
  background: #f0fdf4;
}

.active-order-card.is-delivered .active-order-head-row {
  border-bottom-color: rgba(22, 101, 52, 0.18);
  background: #f0fdf4;
}

.active-order-card.is-delivered .active-order-sequence {
  background: #dcfce7;
  color: #166534;
}

.active-order-head-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.active-order-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  border-bottom: 0;
  padding: 12px 14px;
  background: #f8fafc;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.active-order-head:hover {
  background: #f1f5f9;
}

.active-order-card.is-collapsed .active-order-head {
  border-bottom-color: transparent;
}

.active-order-card.is-collapsed .active-order-head-row {
  border-bottom-color: transparent;
}

.active-order-wb-phone-button {
  min-height: 38px;
  align-self: center;
  gap: 7px;
  margin: 8px 12px 8px 0;
  padding: 0 14px;
  white-space: nowrap;
}

.active-order-wb-phone-button span,
.active-order-wb-phone-button svg {
  width: 16px;
  height: 16px;
}

.active-order-details {
  padding-top: 14px;
}

.active-order-toggle {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 0 9px;
  background: #ffffff;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.active-order-toggle > span:last-child {
  display: inline-grid;
  width: 14px;
  height: 14px;
  place-items: center;
  transition: transform 160ms ease;
}

.active-order-toggle svg {
  width: 14px;
  height: 14px;
}

.active-order-card.is-expanded .active-order-toggle > span:last-child {
  transform: rotate(180deg);
}

.active-order-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.active-order-sequence {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 50%;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 850;
}

.active-order-identity > div {
  min-width: 0;
}

.active-order-identity > div > span {
  display: block;
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.active-order-identity h3 {
  margin: 2px 0 0;
  color: #111827;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.active-order-title-grid {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(130px, 0.7fr) minmax(220px, 1.4fr) minmax(100px, 0.55fr) minmax(74px, 0.35fr);
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.active-order-title-grid .data-cell.is-wide,
.route-delivery-cells .data-cell.is-wide {
  grid-column: auto;
}

.active-order-source {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.active-order-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex: 0 0 auto;
}

.active-order-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.active-order-status.is-cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

.active-order-status.is-delivered {
  background: #dcfce7;
  color: #166534;
}

.active-order-status.is-delivering {
  background: #dbeafe;
  color: #1d4ed8;
}

.active-order-status.is-awaiting,
.active-order-status.is-warning {
  background: #ffedd5;
  color: #b45309;
}

.active-order-card.is-ozon .active-order-source {
  background: #eff6ff;
  color: #1d4ed8;
}

.active-order-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.active-order-editor-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(160px, 0.9fr) minmax(240px, 1.45fr) minmax(120px, 0.65fr);
  gap: 8px;
  padding: 0 14px;
}

.active-order-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 10px;
  background: #ffffff;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.active-order-field:focus-within {
  border-color: #c2410c;
  background: #fffaf7;
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.1);
}

.active-order-field > span {
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.active-order-field input,
.active-order-field textarea,
.active-order-field select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  resize: vertical;
}

.active-order-field input::placeholder,
.active-order-field textarea::placeholder {
  color: #94a3b8;
}

.active-order-field.is-order-number input {
  color: #c2410c;
  font-weight: 850;
}

.active-order-field.is-product,
.active-order-field.is-address,
.active-order-field.is-comment {
  grid-column: span 2;
}

.active-order-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 14px 14px;
}

.active-order-meta .data-cell {
  min-height: 58px;
  background: #f8fafc;
}

.active-order-meta .data-cell.is-cancelled {
  border-color: rgba(185, 28, 28, 0.22);
  background: #fef2f2;
}

.active-order-meta .data-cell.is-cancelled strong {
  color: #b91c1c;
}

.active-order-meta .data-cell.is-delivered {
  border-color: rgba(22, 101, 52, 0.2);
  background: #f0fdf4;
}

.active-order-meta .data-cell.is-delivered strong {
  color: #166534;
}

.active-order-grid .data-cell {
  min-height: 66px;
}

.active-order-note {
  margin: 0 14px 14px;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff7ed;
  color: #92400e;
  font-size: 13px;
  font-weight: 800;
}

.route-builder-panel {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(520px, 1.25fr);
  gap: 16px;
  align-items: start;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.route-builder-panel .route-upload-panel,
.route-builder-map-card,
.route-builder-call-card {
  border: 1px solid rgba(203, 213, 225, 0.88);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: var(--dashboard-shadow);
}

.route-builder-intro {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.route-builder-intro div {
  display: grid;
  gap: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.route-builder-intro strong {
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}

.route-builder-intro span {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.route-upload-head {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  border: 1px solid rgba(194, 65, 12, 0.2);
  border-radius: 8px;
  padding: 14px;
  background: #fff7ed;
}

.route-upload-head strong {
  color: #111827;
  font-size: 16px;
  font-weight: 900;
}

.route-upload-head span {
  color: #475569;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.route-ozon-source {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(194, 65, 12, 0.22);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.route-ozon-source .dash-outline-button {
  width: 100%;
  min-height: 44px;
}

.route-ozon-source span {
  color: #475569;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

.route-arrange-list {
  display: grid;
  gap: 10px;
  max-height: 460px;
  overflow: auto;
}

.route-selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.route-selection-toolbar > strong {
  color: #111827;
  font-size: 14px;
  font-weight: 850;
}

.route-selection-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.route-selection-actions .dash-outline-button {
  min-height: 36px;
  padding: 0 14px;
}

.route-arrange-row {
  display: grid;
  grid-template-columns: 24px 34px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.route-arrange-row.is-selected {
  border-color: #c2410c;
  background: #fff7ed;
  box-shadow: inset 3px 0 0 #c2410c;
}

.route-arrange-select {
  display: grid;
  width: 24px;
  height: 30px;
  place-items: center;
  cursor: pointer;
}

.route-arrange-select input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #c2410c;
  cursor: pointer;
}

.route-arrange-number {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 900;
}

.route-arrange-cells {
  display: grid;
  grid-template-columns: minmax(120px, 0.6fr) minmax(180px, 1fr);
  gap: 8px;
}

.route-builder-result {
  display: grid;
  gap: 16px;
}

.route-builder-map-card {
  display: grid;
  gap: 14px;
}

.route-builder-yandex {
  width: auto;
  min-height: 38px;
  padding: 0 14px;
  text-decoration: none;
}

.route-builder-yandex.is-disabled {
  color: #64748b;
  border-color: #cbd5e1;
  background: #f1f5f9;
  cursor: not-allowed;
  opacity: 0.8;
  box-shadow: none;
}

.route-builder-map {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.18) 1px, transparent 1px),
    linear-gradient(0deg, rgba(148, 163, 184, 0.18) 1px, transparent 1px),
    #f8fafc;
  background-size: 42px 42px;
}

.route-builder-map svg {
  position: absolute;
  inset: 20px;
  width: calc(100% - 40px);
  height: calc(100% - 40px);
}

.route-builder-map path {
  fill: none;
  stroke: #c2410c;
  stroke-linecap: round;
  stroke-width: 5;
}

.route-builder-map path:first-child {
  stroke: rgba(194, 65, 12, 0.16);
  stroke-width: 16;
}

.route-builder-pin {
  position: absolute;
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #c2410c;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.route-builder-pin.is-start {
  left: 8%;
  bottom: 15%;
  min-width: 62px;
  background: #166534;
}

.route-builder-pin.pin-1 {
  left: 34%;
  top: 48%;
}

.route-builder-pin.pin-2 {
  left: 52%;
  top: 28%;
}

.route-builder-pin.pin-3 {
  right: 9%;
  top: 12%;
}

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

.route-builder-metrics article {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 13px;
  background: #f8fafc;
}

.route-builder-metrics span {
  display: block;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.route-builder-metrics strong {
  display: block;
  margin-top: 6px;
  color: #111827;
  font-size: 24px;
  font-weight: 900;
}

.route-builder-order-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.route-builder-order-row {
  display: grid;
  grid-template-columns: 52px minmax(220px, 1.4fr) minmax(110px, 0.7fr) minmax(150px, 0.8fr);
  align-items: stretch;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.route-builder-order-row:last-child {
  border-bottom: 0;
}

.route-builder-order-row.is-header {
  background: #f8fafc;
}

.route-builder-order-row.is-fixed-start {
  background: #fff7ed;
}

.route-builder-order-row span {
  min-width: 0;
  border-right: 1px solid #e2e8f0;
  padding: 10px 11px;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.route-builder-order-row span:last-child {
  border-right: 0;
}

.route-builder-order-row.is-header span {
  color: #64748b;
  font-weight: 900;
  text-transform: uppercase;
}

.route-builder-order-row:not(.is-header) span:first-child {
  color: #c2410c;
  font-weight: 900;
}

.route-builder-stops {
  display: grid;
  gap: 10px;
}

.route-builder-stop {
  display: grid;
  gap: 10px;
  align-items: start;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 13px;
  background: #ffffff;
}

.route-builder-stop.is-ready {
  border-color: rgba(22, 101, 52, 0.28);
  background: #f0fdf4;
}

.route-builder-stop.is-not-ready {
  border-color: rgba(185, 28, 28, 0.22);
  background: #fef2f2;
}

.route-builder-stop.is-no-answer {
  border-color: rgba(180, 83, 9, 0.24);
  background: #fff7ed;
}

.route-builder-stop-cells {
  display: grid;
  grid-template-columns: 64px minmax(190px, 1.2fr) minmax(118px, 0.7fr) minmax(118px, 0.7fr);
  gap: 8px;
}

.route-builder-stop-cells .data-cell:nth-child(6) {
  grid-column: span 2;
}

.route-builder-stop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.integrations-panel {
  display: grid;
  gap: 16px;
  scroll-margin-top: 76px;
}

.integration-add-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(260px, 340px) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  padding: 14px 16px;
  background: #f8fafc;
}

.integration-add-copy {
  display: grid;
  align-self: center;
  gap: 4px;
}

.integration-add-copy strong {
  color: #111827;
  font-size: 15px;
  font-weight: 800;
}

.integration-add-copy span {
  max-width: 620px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.integration-provider-field {
  margin: 0;
}

.integration-add-button {
  min-height: 42px;
  padding-inline: 18px;
  white-space: nowrap;
}

.integration-add-message {
  grid-column: 1 / -1;
  min-height: 0;
  margin: 0;
}

.integration-add-message:empty {
  display: none;
}

.integration-delete-button {
  border-color: rgba(185, 28, 28, 0.34);
  background: #ffffff;
  color: #b91c1c;
}

.integration-delete-button:hover:not(:disabled) {
  border-color: #b91c1c;
  background: #fef2f2;
}

.integration-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.integration-card {
  border: 1px solid rgba(203, 213, 225, 0.88);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: var(--dashboard-shadow);
}

.integration-card.is-primary {
  border-top: 3px solid #c2410c;
}

.integration-card.is-yandex {
  border-top: 3px solid #166534;
}

.integration-card.is-yandex .integration-card-head p {
  color: #166534;
}

.integration-card-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.integration-card-head > div {
  min-width: 0;
  flex: 1;
}

.integration-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: #fff7ed;
  color: #c2410c;
}

.integration-icon.integration-icon-yandex {
  background: #f0fdf4;
  color: #166534;
}

.integration-card-head p {
  margin: 0 0 4px;
  color: #c2410c;
  font-size: 12px;
  font-weight: 900;
}

.integration-card-head h3 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 900;
}

.integration-card-head span {
  display: block;
  margin-top: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.integration-card-head > .integration-card-status {
  display: inline-flex;
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.integration-form {
  max-width: 560px;
}

.loading-status.is-success {
  background: #f0fdf4;
  color: #166534;
}

.loading-status.is-error {
  background: #fef2f2;
  color: #b91c1c;
}

.integration-schedule,
.integration-id-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(130px, 0.5fr);
  gap: 12px;
  align-items: end;
}

.dash-field-hint {
  margin: -4px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.integration-schedule-toggle {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  padding: 0 14px;
  color: #111827;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 750;
}

.integration-schedule-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #c2410c;
}

.integration-api-access {
  margin-top: 18px;
  border-top: 1px solid #e2e8f0;
  padding-top: 18px;
}

.integration-api-access h4,
.integration-journal h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
}

.integration-api-access > p {
  margin: 6px 0 14px;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.integration-token-value {
  display: block;
  overflow-wrap: anywhere;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 12px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  line-height: 1.55;
  user-select: all;
}

.integration-token-value[hidden] {
  display: none;
}

.integration-journal {
  border: 1px solid rgba(203, 213, 225, 0.88);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: var(--dashboard-shadow);
}

.integration-journal-head,
.integration-sync-run {
  display: flex;
  align-items: center;
  gap: 16px;
}

.integration-journal-head {
  justify-content: space-between;
  margin-bottom: 14px;
}

#refreshIntegrationSyncRuns {
  width: auto;
  min-height: 36px;
  flex: 0 0 auto;
  align-self: center;
  gap: 7px;
  padding: 0 13px;
  white-space: nowrap;
}

#refreshIntegrationSyncRuns [data-lucide],
#refreshIntegrationSyncRuns [data-lucide] > svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.integration-journal-head p {
  margin: 0 0 4px;
  color: #c2410c;
  font-size: 12px;
  font-weight: 850;
}

.integration-sync-runs {
  display: grid;
  gap: 10px;
}

.integration-sync-run {
  border: 1px solid #e2e8f0;
  border-left: 3px solid #1d4ed8;
  border-radius: 8px;
  padding: 12px;
}

.integration-sync-run.is-success {
  border-left-color: #166534;
}

.integration-sync-run.is-failed {
  border-left-color: #b91c1c;
}

.integration-sync-run-identity {
  display: grid;
  flex: 0 0 180px;
  gap: 3px;
}

.integration-sync-run-identity strong {
  color: #111827;
  font-size: 14px;
}

.integration-sync-run-identity span,
.integration-sync-run-result small {
  color: #64748b;
  font-size: 12px;
}

.integration-sync-run-counts {
  display: grid;
  min-width: 0;
  flex: 1;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 8px;
}

.integration-sync-run-counts .data-cell {
  min-height: auto;
  padding: 8px 10px;
}

.integration-sync-run-counts .data-cell span {
  font-size: 10px;
}

.integration-sync-run-counts .data-cell strong {
  font-size: 14px;
}

.integration-sync-run-result {
  display: grid;
  flex: 0 0 170px;
  justify-items: end;
  gap: 5px;
  text-align: right;
}

.active-order-provider-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
}

.active-order-provider-actions small {
  color: #64748b;
  font-size: 12px;
}

@media (max-width: 640px) {
  .integration-add-panel {
    grid-template-columns: 1fr;
    padding: 13px;
  }

  .integration-add-button {
    width: 100%;
  }

  .integration-card-head {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .integration-card-head > .integration-card-status {
    grid-column: 1 / -1;
    justify-self: start;
    margin: 0;
  }

  .integration-schedule,
  .integration-id-grid {
    grid-template-columns: 1fr;
  }

  .integration-journal-head,
  .integration-sync-run,
  .active-order-provider-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .integration-journal-head .dash-outline-button,
  .active-order-provider-actions .dash-primary-button {
    width: 100%;
  }

  #refreshIntegrationSyncRuns {
    width: auto;
    align-self: flex-start;
  }

  .integration-sync-run-identity,
  .integration-sync-run-result {
    flex-basis: auto;
    justify-items: start;
    text-align: left;
  }

  .integration-sync-run-counts {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.route-call-status {
  min-height: 34px;
  border: 1px solid #dbe3ec;
  border-radius: 999px;
  padding: 0 12px;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.route-call-status.is-active {
  border-color: #c2410c;
  background: #fff7ed;
  color: #c2410c;
}

@media (max-width: 900px) {
  .dispatch-summary-grid,
  .dispatch-vehicle-specs,
  .dispatch-address-row,
  .active-order-title-grid,
  .active-order-editor-grid,
  .active-order-meta,
  .active-order-grid,
  .route-delivery-cells,
  .route-arrange-cells,
  .route-builder-metrics,
  .route-builder-stop-cells {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-builder-order-row {
    grid-template-columns: 46px minmax(180px, 1.2fr) minmax(100px, 0.7fr) minmax(130px, 0.8fr);
  }

  .route-builder-panel {
    grid-template-columns: 1fr;
  }

  .integration-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1120px) {
  .app-dashboard {
    grid-template-columns: 188px minmax(0, 1fr);
  }

  .courier-content {
    padding-right: 20px;
    padding-left: 20px;
  }

  .loading-cell-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .app-dashboard {
    padding: 64px 0 78px;
  }

  .courier-topbar {
    min-height: 64px;
    padding: 0 14px;
  }

  .topbar-status {
    min-height: 28px;
    padding: 0 10px;
    font-size: 11px;
  }

  .topbar-user {
    border-color: transparent;
    background: transparent;
    padding: 0;
  }

  .user-avatar {
    width: 34px;
    height: 34px;
  }

  .courier-content {
    gap: 12px;
    padding: 14px 12px 24px;
  }

  .admin-heading-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .admin-heading-actions .dash-outline-button {
    width: 100%;
  }

  .welcome-card,
  .work-hero,
  .loading-hero,
  .loading-empty,
  .loading-panel,
  .route-panel {
    padding: 16px;
  }

  .welcome-card h1,
  .work-hero h1,
  .loading-hero h1 {
    font-size: 22px;
  }

  .metric-grid {
    gap: 10px;
  }

  .metric-card {
    min-height: 92px;
    padding: 14px;
  }

  .metric-card strong {
    font-size: 26px;
  }

  .vehicle-toggle {
    min-height: 76px;
    padding: 14px;
  }

  .work-booking-button,
  .loading-start-button,
  .dash-primary-button,
  .dash-outline-button {
    min-height: 46px;
  }

  .loading-cell-list {
    grid-template-columns: 1fr;
  }

  .loading-route-action {
    padding: 16px 14px 14px 18px;
  }

  .loading-route-action p {
    font-size: 18px;
  }

  .logistician-dispatch-panel {
    padding: 14px;
  }

  .dispatch-date-filter {
    min-width: 0;
  }

  .dispatch-address-head-actions {
    display: grid;
    justify-content: stretch;
  }

  .dispatch-address-head-actions .dash-outline-button {
    width: 100%;
  }

  .dispatch-summary-grid,
  .dispatch-vehicle-specs,
  .dispatch-address-row,
  .active-order-title-grid,
  .active-order-grid,
  .route-delivery-cells,
  .route-arrange-cells,
  .route-builder-metrics,
  .route-builder-stop-cells,
  .active-orders-filters,
  .active-orders-form-grid {
    grid-template-columns: 1fr;
  }

  .data-cell.is-wide,
  .route-builder-stop-cells .data-cell:nth-child(6) {
    grid-column: auto;
  }

  .route-builder-order-list {
    overflow-x: auto;
  }

  .route-builder-order-row {
    min-width: 620px;
  }

  .route-arrange-row {
    grid-template-columns: 24px 34px minmax(0, 1fr);
  }

  .route-arrange-cells {
    grid-column: 1 / -1;
  }

  .route-selection-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .route-selection-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .route-selection-actions .dash-outline-button {
    width: 100%;
  }

  .route-builder-stop {
    grid-template-columns: 1fr;
  }

  .route-builder-stop-actions {
    grid-column: 1 / -1;
  }

  .dispatch-vehicle-head,
  .dispatch-address-block-head,
  .active-order-head {
    display: grid;
  }

  .active-order-head-row {
    grid-template-columns: 1fr;
  }

  .active-order-wb-phone-button {
    width: auto;
    justify-self: stretch;
    margin: 0 14px 12px;
  }

  .active-orders-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .active-orders-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .active-orders-actions button {
    width: 100%;
  }

  .active-order-field.is-product,
  .active-order-field.is-address,
  .active-order-field.is-comment {
    grid-column: auto;
  }

  .dispatch-status,
  .active-order-source {
    justify-self: start;
  }

  .active-order-badges {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .dispatch-actions,
  .active-orders-actions {
    display: grid;
  }

  .dispatch-actions .dash-primary-button {
    min-width: 0;
  }

  .loading-route-footer {
    margin-top: 14px;
  }

  .loading-route-footer .dash-primary-button {
    width: 100%;
    min-width: 0;
  }

  .route-map-canvas {
    min-height: 250px;
  }

  .vehicle-modal,
  .work-modal,
  .profile-modal {
    padding: 12px;
  }

  .vehicle-modal-header,
  .work-modal-header,
  .profile-modal-header {
    padding: 16px;
  }

  .vehicle-modal-header h3,
  .work-modal-header h3,
  .profile-modal-header h3 {
    font-size: 20px;
  }

  .work-slot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (min-width: 761px) {
  .app-dashboard {
    display: block;
  }

  .courier-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    width: 236px;
    min-height: 100vh;
    overflow-y: auto;
  }

  .courier-shell {
    margin-left: 236px;
    min-height: 100vh;
  }
}

@media (min-width: 761px) and (max-width: 1120px) {
  .courier-sidebar {
    width: 188px;
  }

  .courier-shell {
    margin-left: 188px;
  }
}

/* Unified dashboard typography: restrained weights keep dense logistics data readable. */
body.is-dashboard-view,
body.is-dashboard-view input,
body.is-dashboard-view textarea,
body.is-dashboard-view select {
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: 0;
}

body.is-dashboard-view button {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0;
}

body.is-dashboard-view {
  font-size: 14px;
  line-height: 1.5;
}

body.is-dashboard-view :where(p, span, label, small, input, textarea, select, td) {
  font-weight: 400;
}

body.is-dashboard-view :where(strong, b, th) {
  font-weight: 600;
}

body.is-dashboard-view :where(h1, h2, h3) {
  font-weight: 700;
  line-height: 1.2;
}

body.is-dashboard-view :where(
  button,
  .sidebar-link,
  .sidebar-logout,
  .primary-button,
  .outline-button,
  .secondary-button,
  .dash-primary-button,
  .dash-outline-button,
  .work-booking-button,
  .loading-start-button
) {
  font-weight: 600;
}

body.is-dashboard-view :where(
  .section-heading p,
  .metric-card span,
  .metric-card small,
  .data-cell > span,
  .active-order-field > span,
  .active-order-sequence,
  .route-arrange-number,
  .loading-status,
  .route-status,
  .dispatch-status,
  .active-order-source,
  .active-order-status,
  .cell-code
) {
  font-weight: 600;
}

body.is-dashboard-view :where(
  .metric-card strong,
  .welcome-card h1,
  .work-hero h1,
  .loading-hero h1,
  .section-heading h2,
  .route-upload-head strong,
  .loading-route-action p
) {
  font-weight: 700;
}

body.is-dashboard-view :where(
  .data-cell strong,
  .active-order-field input,
  .active-order-field textarea,
  .active-order-field select,
  .route-builder-order-row,
  .route-builder-stop,
  .route-arrange-row,
  .dispatch-address-row,
  .dispatch-vehicle-card
) {
  font-variant-numeric: tabular-nums;
}

/* 2026-07-29: operational screens for catalog, distribution and delivery acts */
.operations-panel {
  max-width: 1280px;
}

.route-distribution-panel {
  margin-top: 18px;
}

.operations-form {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(220px, 1.4fr) minmax(120px, 0.7fr) minmax(130px, 0.7fr) auto;
  align-items: end;
  gap: 12px;
  margin: 18px 0;
}

#catalogForm {
  grid-template-columns: minmax(120px, 0.7fr) minmax(220px, 1.5fr) repeat(3, minmax(110px, 0.65fr)) auto;
}

.operations-form .is-wide {
  grid-column: auto;
}

.catalog-heading-actions,
.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.catalog-heading-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.catalog-heading-actions .dash-outline-button {
  min-height: 42px;
}

.catalog-heading-actions svg,
.catalog-search-control svg {
  width: 18px;
  height: 18px;
}

.catalog-toolbar {
  justify-content: space-between;
  margin-top: 16px;
}

.catalog-search-field {
  width: min(100%, 520px);
}

.catalog-search-control {
  position: relative;
  display: block;
}

.catalog-search-control > svg {
  position: absolute;
  top: 50%;
  left: 13px;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.catalog-search-control input {
  width: 100%;
  padding-left: 42px;
}

.catalog-load-more {
  display: flex;
  margin: 16px auto 0;
}

.catalog-load-more[hidden] {
  display: none;
}

.operations-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.operation-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid rgba(203, 213, 225, 0.86);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.catalog-operation-row {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.operation-row .data-cell {
  min-height: 64px;
}

.operation-row .is-wide {
  grid-column: span 2;
}

.carrier-admin-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.carrier-admin-row form {
  display: flex;
  align-items: end;
  gap: 10px;
}

.carrier-admin-row span {
  color: var(--muted);
  font-size: 12px;
}

.distribution-orders {
  display: grid;
  gap: 8px;
  max-height: 430px;
  margin-top: 16px;
  overflow: auto;
}

.distribution-order {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  cursor: pointer;
}

.distribution-order:has(input:checked) {
  border-color: #c2410c;
  background: #fff7ed;
}

.distribution-order > input {
  width: 18px;
  height: 18px;
  accent-color: #c2410c;
}

.distribution-order > span {
  display: grid;
  grid-template-columns: minmax(120px, 0.6fr) minmax(100px, 0.5fr) minmax(260px, 1.5fr) minmax(90px, 0.5fr) minmax(110px, 0.6fr);
  gap: 8px;
}

.distribution-order.is-assigned {
  opacity: 0.64;
  cursor: default;
}

.cost-act-total {
  color: #166534;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.cost-entry-row {
  grid-template-columns: repeat(8, minmax(100px, 1fr));
  min-width: 980px;
}

#logisticianCostActs .operations-list {
  overflow-x: auto;
}

.integration-placeholder {
  display: grid;
  gap: 14px;
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
}

.integration-placeholder input:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.active-order-field input:read-only {
  color: #1d4ed8;
  cursor: default;
}

@media (max-width: 1180px) {
  .operations-form,
  #catalogForm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operations-form .dash-primary-button,
  .operations-form .dash-outline-button {
    width: 100%;
  }

  .operation-row,
  .catalog-operation-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .route-history-card-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  body.is-logistician-view .logistician-mobile-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.is-admin-view .admin-mobile-nav {
    grid-template-columns: repeat(5, minmax(62px, 1fr));
    overflow-x: auto;
  }

  .active-order-toggle > span:first-child {
    display: none;
  }
}

body.is-logistician-view .courier-sidebar,
body.is-admin-view .courier-sidebar {
  overflow-y: auto;
}

@media (max-width: 640px) {
  .operations-form,
  #catalogForm,
  .operation-row,
  .catalog-operation-row,
  .distribution-order > span {
    grid-template-columns: 1fr;
  }

  .catalog-heading-actions,
  .catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-heading-actions .dash-outline-button,
  .catalog-search-field {
    width: 100%;
  }

  .operation-row .is-wide {
    grid-column: auto;
  }

  .route-history-filters,
  .route-history-summary,
  .route-history-card-metrics,
  .route-history-timeline,
  .route-history-order-data {
    grid-template-columns: 1fr;
  }

  .route-history-filters .dash-primary-button,
  .route-history-filters .dash-outline-button {
    width: 100%;
  }

  .route-history-card-head,
  .route-history-card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .route-history-card-actions .dash-outline-button,
  .route-history-completed-status {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .route-history-card-metrics .is-wide,
  .route-history-order-data .is-wide {
    grid-column: auto;
  }

  .route-history-order {
    grid-template-columns: 1fr;
  }

  .carrier-admin-row,
  .carrier-admin-row form {
    align-items: stretch;
    flex-direction: column;
  }

  .carrier-admin-row .dash-outline-button {
    width: 100%;
  }

  .active-order-badges {
    gap: 5px;
  }

  .active-order-toggle {
    width: 30px;
    justify-content: center;
    padding: 0;
  }
}

/* 2026-07-30: exact route-builder layout from arlog_route_builder.html */
.route-planner > .route-workflow,
.route-planner > .route-planner-grid {
  display: none;
}

.route-prototype-shell {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.route-prototype-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 16px;
  background: #ffffff;
}

.route-prototype-tabs > button {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0 14px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
}

.route-prototype-tabs > button:hover,
.route-prototype-tabs > button.is-active {
  color: #9a3412;
}

.route-prototype-tabs > button.is-active {
  border-bottom-color: #c2410c;
}

.route-prototype-tabs > button > span {
  display: inline-grid;
  min-width: 24px;
  height: 20px;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0 6px;
  background: #f8fafc;
  color: #64748b;
  font-size: 10px;
  font-weight: 750;
}

.route-prototype-tabs > button.is-active > span {
  border-color: transparent;
  background: #fff7ed;
  color: #9a3412;
}

.route-prototype-body {
  min-height: 560px;
  padding: 16px;
  background: #f8fafc;
}

.route-prototype-view[hidden] {
  display: none;
}

.route-prototype-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.route-prototype-date {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 0 10px;
  background: #ffffff;
}

.route-prototype-date > span {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.route-prototype-date input {
  width: 126px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  font-size: 12px;
}

.route-prototype-source-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.route-prototype-source-filters button {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: #475569;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
}

.route-prototype-source-filters button:hover,
.route-prototype-source-filters button.is-active {
  border-color: #c2410c;
  background: #fff7ed;
  color: #9a3412;
}

.route-prototype-source-filters i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.route-prototype-source-filters i.is-ozon {
  background: #1d4ed8;
}

.route-prototype-source-filters i.is-wildberries {
  background: #9d174d;
}

.route-prototype-source-filters i.is-yandex {
  background: #b45309;
}

.route-prototype-source-filters i.is-manual {
  background: #166534;
}

.route-prototype-source-filters i.is-b2b {
  background: #475569;
}

.route-prototype-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 16px;
  align-items: start;
}

.route-prototype-orders {
  min-width: 0;
}

.route-prototype-selection {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  margin-bottom: 10px;
}

.route-prototype-selection > span {
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.route-prototype-selected-volume {
  border-radius: 999px;
  padding: 6px 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 650;
}

.route-prototype-selected-volume.is-incomplete {
  background: #fef2f2;
  color: #b91c1c;
}

.route-prototype-selection > div {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.route-prototype-selection .dash-outline-button,
.route-prototype-assign-bar .dash-outline-button,
.route-prototype-assign-bar .dash-primary-button {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
}

.route-prototype-order-list {
  display: grid;
  gap: 8px;
}

.route-prototype-order {
  display: grid;
  grid-template-columns: 22px 114px minmax(0, 1fr) 88px auto;
  gap: 11px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.route-prototype-order:hover {
  border-color: #cbd5e1;
}

.route-prototype-order.is-selected {
  border-color: #c2410c;
  background: #fff7ed;
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.08);
}

.route-prototype-order > input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #c2410c;
}

.route-prototype-order-meta {
  display: grid;
  justify-items: start;
  gap: 6px;
}

.route-prototype-order-main {
  min-width: 0;
}

.route-prototype-order-main strong {
  display: block;
  overflow: hidden;
  color: #111827;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-prototype-order-main span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #64748b;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-prototype-order-total {
  display: grid;
  justify-items: end;
  gap: 4px;
  text-align: right;
}

.route-prototype-order-total strong {
  color: #111827;
  font-size: 11px;
}

.route-prototype-order-total span {
  color: #64748b;
  font-size: 10px;
}

.route-prototype-assign-bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.route-prototype-assign-bar > span {
  color: #475569;
  font-size: 11px;
  font-weight: 650;
}

.route-prototype-assign-bar > div {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.route-prototype-assign-bar .is-over-capacity,
.route-prototype-assign-bar .is-over-capacity:disabled {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  opacity: 1;
}

.route-prototype-capacity-message {
  min-height: 18px;
  margin: 8px 2px 0;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
}

.route-prototype-capacity-message.is-success {
  color: #166534;
}

.route-prototype-capacity-message.is-error {
  color: #b91c1c;
}

.route-prototype-distribution {
  position: sticky;
  top: 0;
  display: grid;
  gap: 12px;
}

.route-no-couriers {
  margin: 0;
  padding: 12px 4px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.route-loading-bookings {
  overflow: hidden;
  border: 1px solid #dbe4ef;
  border-radius: 11px;
  background: #ffffff;
}

.route-loading-bookings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #eef2f7;
  padding: 10px 11px;
  background: #f8fafc;
}

.route-loading-bookings-head > div {
  display: grid;
  gap: 2px;
}

.route-loading-bookings-head span {
  color: #64748b;
  font-size: 9px;
}

.route-loading-bookings-head strong {
  color: #111827;
  font-size: 12px;
}

.route-loading-bookings-count {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c !important;
  font-weight: 700;
}

.route-loading-bookings-list {
  display: grid;
}

.route-loading-booking-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px 11px;
}

.route-loading-booking-row + .route-loading-booking-row {
  border-top: 1px solid #eef2f7;
}

.route-loading-booking-row > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 7px;
  background: #f0fdf4;
  color: #166534;
}

.route-loading-booking-row svg {
  width: 15px;
  height: 15px;
}

.route-loading-booking-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.route-loading-booking-row strong {
  overflow: hidden;
  color: #111827;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-loading-booking-row div > span {
  color: #64748b;
  font-size: 10px;
}

.route-prototype-contractors {
  display: flex;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 3px;
  background: #f1f5f9;
}

.route-prototype-contractors button {
  flex: 1 0 auto;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
}

.route-prototype-contractors button.is-active {
  background: #ffffff;
  color: #9a3412;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.route-prototype-vehicles {
  display: grid;
  gap: 12px;
}

.route-prototype-vehicle {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #ffffff;
}

.route-prototype-vehicle.is-active {
  border-color: #c2410c;
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.08);
}

.route-prototype-vehicle-head {
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid #eef2f7;
  padding: 9px 11px;
  background: #f8fafc;
}

.route-prototype-vehicle-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: none;
  place-items: center;
  border-radius: 7px;
  background: #111827;
  color: #ffffff;
}

.route-prototype-vehicle-icon svg {
  width: 15px;
  height: 15px;
}

.route-prototype-vehicle-head strong {
  font-size: 12px;
}

.route-prototype-vehicle-head button {
  margin-left: auto;
  border: 0;
  border-radius: 6px;
  padding: 5px 8px;
  background: #fff7ed;
  color: #9a3412;
  font: inherit;
  font-size: 10px;
  font-weight: 650;
}

.route-prototype-vehicle.is-active .route-prototype-vehicle-head button {
  background: #f0fdf4;
  color: #166534;
}

.route-prototype-assignee {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #eef2f7;
  padding: 9px 11px;
}

.route-prototype-assignee svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: #64748b;
}

.route-prototype-assignee > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.route-prototype-assignee strong {
  color: #111827;
  font-size: 11px;
  font-weight: 650;
}

.route-prototype-assignee span {
  color: #64748b;
  font-size: 10px;
}

.route-prototype-assignee select {
  min-width: 0;
  flex: 1;
  min-height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 8px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 11px;
}

.route-prototype-stops {
  display: grid;
  gap: 5px;
  min-height: 48px;
  margin: 0;
  padding: 8px;
  list-style: none;
}

.route-prototype-stop {
  display: grid;
  grid-template-columns: 20px 8px minmax(0, 1fr) 22px;
  gap: 7px;
  align-items: center;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  padding: 6px 7px;
}

.route-prototype-stop.is-fixed-start {
  grid-template-columns: 20px 8px minmax(0, 1fr);
  border-color: #fed7aa;
  background: #fff7ed;
}

.route-prototype-stop > b {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 6px;
  background: #111827;
  color: #ffffff;
  font-size: 9px;
}

.route-prototype-stop > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c2410c;
}

.route-prototype-stop > span {
  overflow: hidden;
  color: #475569;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-prototype-stop > button {
  border: 0;
  border-radius: 5px;
  padding: 2px;
  background: transparent;
  color: #94a3b8;
  font-size: 15px;
}

.route-prototype-empty {
  padding: 18px 12px;
  color: #64748b;
  font-size: 11px;
  text-align: center;
}

.route-prototype-assign-bar[hidden],
.route-prototype-contractors[hidden],
.route-loading-bookings[hidden],
.route-no-couriers[hidden] {
  display: none;
}

.route-prototype-vehicle-summary,
.route-prototype-vehicle-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  border-top: 1px solid #eef2f7;
  padding: 8px 11px;
}

.route-prototype-vehicle-summary span {
  color: #64748b;
  font-size: 10px;
}

.route-prototype-vehicle-summary b {
  color: #111827;
}

.route-prototype-vehicle-summary.is-over-capacity {
  border-top-color: #fecaca;
  background: #fef2f2;
}

.route-prototype-vehicle-summary.is-over-capacity span,
.route-prototype-vehicle-summary.is-over-capacity b {
  color: #b91c1c;
}

.route-prototype-url-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 9px;
  border-top: 1px solid #eef2f7;
  padding: 10px 11px;
}

.route-prototype-url-editor label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.route-prototype-url-editor label > span {
  color: #64748b;
  font-size: 10px;
  font-weight: 650;
}

.route-prototype-url-editor input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 11px;
}

.route-prototype-url-editor input:focus {
  border-color: #c2410c;
  outline: 3px solid rgba(194, 65, 12, 0.12);
}

.route-prototype-url-editor .dash-outline-button {
  min-height: 36px;
  white-space: nowrap;
}

.route-prototype-vehicle-actions {
  padding: 10px 11px;
}

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

  .route-prototype-url-editor .dash-outline-button {
    width: 100%;
  }
}

.route-prototype-vehicle-actions a,
.route-prototype-vehicle-actions button {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 8px;
  padding: 0 9px;
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.route-prototype-vehicle-actions a {
  border: 1px solid #c2410c;
  background: #ffffff;
  color: #9a3412;
}

.route-prototype-vehicle-actions a.is-disabled {
  pointer-events: none;
  border-color: #cbd5e1;
  color: #94a3b8;
}

.route-prototype-vehicle-actions button {
  border: 0;
  background: #c2410c;
  color: #ffffff;
}

.route-prototype-vehicle-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.route-prototype-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

.route-prototype-table-head {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #eef2f7;
  padding: 12px 14px;
}

.route-prototype-table-head strong {
  color: #111827;
  font-size: 13px;
}

.route-prototype-table-head span {
  color: #64748b;
  font-size: 11px;
}

.route-prototype-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  font-size: 11px;
}

.route-prototype-table th {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}

.route-prototype-table td {
  max-width: 280px;
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  color: #334155;
  vertical-align: middle;
}

.route-prototype-table tr:last-child td {
  border-bottom: 0;
}

.route-prototype-table tbody tr:hover {
  background: #f8fafc;
}

.route-prototype-number {
  color: #9a3412;
  font-weight: 700;
  white-space: nowrap;
}

.route-prototype-status,
.route-prototype-zone,
.route-prototype-source {
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.route-prototype-zone {
  background: #f1f5f9;
  color: #475569;
}

.route-prototype-source {
  margin-left: 5px;
  background: #475569;
  color: #ffffff;
}

.route-prototype-source.is-ozon {
  background: #1d4ed8;
}

.route-prototype-source.is-wildberries {
  background: #9d174d;
}

.route-prototype-source.is-yandex_market {
  background: #b45309;
}

.route-prototype-source.is-manual {
  background: #166534;
}

.route-prototype-status.is-agreed {
  background: #f0fdf4;
  color: #166534;
}

.route-prototype-status.is-not_started {
  background: #f1f5f9;
  color: #475569;
}

.route-prototype-status.is-no_answer {
  background: #fef2f2;
  color: #b91c1c;
}

.route-prototype-status.is-postponed {
  background: #fff7ed;
  color: #b45309;
}

.route-prototype-return {
  min-height: 32px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 6px 10px;
  background: #fff7ed;
  color: #9a3412;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.route-prototype-return:hover:not(:disabled),
.route-prototype-return:focus-visible {
  border-color: #c2410c;
  background: #ffedd5;
}

.route-prototype-return:disabled {
  cursor: wait;
  opacity: 0.55;
}

.route-prototype-order-return {
  max-width: 132px;
  white-space: normal;
}

@media (max-width: 1180px) {
  .route-prototype-split {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
}

@media (max-width: 980px) {
  .route-prototype-split {
    grid-template-columns: 1fr;
  }

  .route-prototype-distribution {
    position: static;
  }
}

@media (max-width: 640px) {
  .route-planner-heading {
    align-items: flex-start;
  }

  .route-planner-heading-actions {
    align-items: flex-end;
    flex-direction: column;
  }

  .route-orders-refresh {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .route-prototype-tabs {
    padding: 0 6px;
  }

  .route-prototype-tabs > button {
    min-height: 48px;
    padding: 0 8px;
    font-size: 10px;
  }

  .route-prototype-body {
    min-height: 0;
    padding: 10px;
  }

  .route-prototype-toolbar,
  .route-prototype-selection,
  .route-prototype-assign-bar,
  .route-prototype-table-head {
    align-items: stretch;
    flex-direction: column;
  }

  .route-prototype-date {
    justify-content: space-between;
  }

  .route-prototype-selection > div,
  .route-prototype-assign-bar > div {
    margin-left: 0;
  }

  .route-prototype-order {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .route-prototype-order-meta {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    align-items: center;
  }

  .route-prototype-order-main,
  .route-prototype-order-total,
  .route-prototype-order-return {
    grid-column: 2;
  }

  .route-prototype-order-main span {
    overflow: visible;
    white-space: normal;
  }

  .route-prototype-order-total {
    display: flex;
    justify-content: space-between;
  }

  .route-prototype-order-return {
    width: fit-content;
    max-width: none;
    min-height: 42px;
  }

  .route-prototype-return {
    min-height: 42px;
  }

  .route-prototype-assign-bar .dash-outline-button,
  .route-prototype-assign-bar .dash-primary-button {
    flex: 1;
  }
}

/* 2026-07-30: compact API order accordion */
[data-route-prototype-panel="all"] .route-prototype-table {
  min-width: 0;
}

.route-prototype-collapsed-row td {
  max-width: none;
  padding: 0;
}

.route-prototype-order-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 70px;
  padding: 8px 16px;
  background: #ffffff;
}

.route-prototype-order-toggle {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  padding: 0;
  background: #ffffff;
  color: #111827;
  font: inherit;
  text-align: left;
}

.route-prototype-order-toggle:hover,
.route-prototype-collapsed-row.is-expanded .route-prototype-order-toggle strong {
  color: #c2410c;
}

.route-prototype-order-toggle strong {
  color: #9a3412;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.route-prototype-order-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.route-prototype-resumed-badge {
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 5px 8px;
  background: #f0fdf4;
  color: #166534;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.route-prototype-order-toggle > span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: none;
  place-items: center;
  border-radius: 7px;
  color: #64748b;
  transition: transform 0.18s ease;
}

.route-prototype-order-toggle > span svg {
  width: 17px;
  height: 17px;
}

.route-prototype-collapsed-row.is-expanded .route-prototype-order-toggle > span {
  transform: rotate(180deg);
}

.route-prototype-order-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.route-prototype-order-status {
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 12px;
  background: #ffffff;
  color: #475569;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.route-prototype-order-call {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 7px 12px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
}

.route-prototype-order-call:hover,
.route-prototype-order-call:focus-visible {
  border-color: #93c5fd;
  background: #dbeafe;
}

.route-prototype-order-wb-phone {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #fdba74;
  border-radius: 8px;
  padding: 7px 12px;
  background: #fff7ed;
  color: #9a3412;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  white-space: nowrap;
}

.route-prototype-order-wb-phone:hover:not(:disabled),
.route-prototype-order-wb-phone:focus-visible {
  border-color: #fb923c;
  background: #ffedd5;
}

.route-prototype-order-wb-phone:disabled {
  cursor: wait;
  opacity: 0.65;
}

.route-prototype-order-wb-phone span,
.route-prototype-order-wb-phone svg {
  width: 15px;
  height: 15px;
}

.route-prototype-order-status:hover:not(:disabled),
.route-prototype-order-status:focus-visible {
  border-color: #94a3b8;
  background: #f8fafc;
}

.route-prototype-order-status.is-agreed:hover:not(:disabled),
.route-prototype-order-status.is-agreed:focus-visible,
.route-prototype-order-status.is-agreed.is-active {
  border-color: #86b99a;
  background: #f0fdf4;
  color: #166534;
}

.route-prototype-order-status.is-postponed:hover:not(:disabled),
.route-prototype-order-status.is-postponed:focus-visible,
.route-prototype-order-status.is-postponed.is-active {
  border-color: #fdba74;
  background: #fff7ed;
  color: #b45309;
}

.route-prototype-order-status:disabled {
  cursor: default;
  opacity: 1;
}

.route-prototype-expanded-row[hidden] {
  display: none;
}

.route-prototype-expanded-row td {
  max-width: none;
  padding: 0;
  background: #f8fafc;
}

.route-prototype-details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid #ffedd5;
  padding: 12px 16px 16px;
}

.route-prototype-details-grid > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.route-prototype-details-grid > div.is-wide {
  grid-column: span 2;
}

.route-prototype-details-grid span {
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.route-prototype-details-grid strong {
  min-width: 0;
  color: #111827;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .route-prototype-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .route-prototype-order-summary {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 8px 12px 12px;
  }

  .route-prototype-order-toggle {
    min-height: 50px;
  }

  .route-prototype-order-actions {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr) minmax(0, 1.45fr);
  }

  .route-prototype-order-status,
  .route-prototype-order-call,
  .route-prototype-order-wb-phone {
    min-width: 0;
    min-height: 42px;
    padding: 7px 8px;
    white-space: normal;
  }

  .route-prototype-details-grid {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .route-prototype-details-grid > div.is-wide {
    grid-column: auto;
  }

  .route-prototype-phone-value {
    align-items: flex-start;
    flex-direction: column;
  }

  .route-prototype-phone-call.route-call-button {
    min-height: 42px;
    padding: 0 16px;
    font-size: 12px;
  }
}

.in-work-orders-panel {
  display: grid;
  gap: 18px;
}

.in-work-orders-heading > div:first-child > span {
  display: block;
  max-width: 720px;
  margin-top: 6px;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.in-work-orders-controls {
  display: flex;
  flex: none;
  align-items: flex-end;
  gap: 10px;
}

.in-work-orders-controls .dash-field {
  min-width: 190px;
}

.in-work-orders-controls .dash-field input,
.in-work-orders-controls .dash-outline-button {
  min-height: 44px;
}

.in-work-orders-controls .dash-outline-button {
  display: inline-flex;
  width: auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  white-space: nowrap;
}

.in-work-orders-controls .dash-outline-button svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.in-work-orders-list {
  display: grid;
  gap: 16px;
}

.in-work-orders-empty {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: #f8fafc;
  color: #64748b;
  text-align: left;
}

.in-work-orders-empty > span {
  width: 28px;
  height: 28px;
  color: #c2410c;
}

.in-work-orders-empty div {
  display: grid;
  gap: 4px;
}

.in-work-orders-empty strong {
  color: #111827;
  font-size: 16px;
}

.in-work-run-card {
  overflow: hidden;
  border: 1px solid #dbe3ee;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(15 23 42 / 4%);
}

.in-work-run-head {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.in-work-run-head > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.in-work-run-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  border-radius: 13px;
  background: #fff7ed;
  color: #c2410c;
}

.in-work-run-icon svg {
  width: 22px;
  height: 22px;
}

.in-work-run-head h3,
.in-work-run-head p {
  margin: 0;
}

.in-work-run-head h3 {
  color: #111827;
  font-size: 18px;
  font-weight: 700;
}

.in-work-run-head p {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
}

.in-work-status {
  flex: none;
  padding: 8px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
}

.in-work-run-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
}

.in-work-run-revoke-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}

.in-work-run-revoke-button:hover,
.in-work-run-revoke-button.is-confirming {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.in-work-run-revoke-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.in-work-run-revoke-button svg {
  width: 15px;
  height: 15px;
}

.in-work-run-orders {
  display: grid;
}

.in-work-order-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 108px;
  padding: 14px 20px;
  border-bottom: 1px solid #edf2f7;
}

.in-work-order-row:last-child {
  border-bottom: 0;
}

.in-work-order-sequence {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #fff7ed;
  color: #c2410c;
  font-size: 13px;
}

.in-work-order-main {
  min-width: 0;
}

.in-work-order-main > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.in-work-order-main > div > strong {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.in-work-order-main p {
  margin: 7px 0 4px;
  overflow: hidden;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.in-work-order-main > span {
  display: block;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.in-work-order-side {
  display: grid;
  min-width: 130px;
  justify-items: end;
  gap: 10px;
}

.in-work-order-side > strong {
  color: #111827;
  font-size: 13px;
}

.in-work-call-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border-radius: 11px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}

.in-work-call-button {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  text-decoration: none;
}

.in-work-call-button svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 760px) {
  .in-work-orders-heading,
  .in-work-orders-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .in-work-orders-controls .dash-field {
    min-width: 0;
  }

  .in-work-orders-summary {
    grid-template-columns: 1fr 1fr;
  }

  .in-work-orders-summary article:last-child {
    grid-column: 1 / -1;
  }

  .in-work-run-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .in-work-run-actions {
    width: 100%;
    justify-content: space-between;
  }

  .in-work-order-row {
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    padding: 14px;
  }

  .in-work-order-side {
    display: flex;
    grid-column: 2;
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .in-work-order-main > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .in-work-order-main > div > strong,
  .in-work-order-main p,
  .in-work-order-main > span {
    white-space: normal;
  }
}

/* Единый выпадающий список ArLog. Нативный select сохранён только для форм и API. */
.arlog-select {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.arlog-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.arlog-select-trigger {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid #dbe3ec;
  border-radius: 9px;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.arlog-select-trigger:hover:not(:disabled) {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.arlog-select-trigger:focus-visible,
.arlog-select.is-open .arlog-select-trigger {
  outline: none;
  border-color: #c2410c;
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.12);
}

.arlog-select.is-invalid .arlog-select-trigger {
  border-color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1);
}

.arlog-select-trigger.is-placeholder {
  color: #64748b;
}

.arlog-select-trigger:disabled {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.arlog-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arlog-select-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: color 150ms ease, transform 150ms ease;
}

.arlog-select-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.arlog-select.is-open .arlog-select-icon {
  color: #c2410c;
  transform: rotate(180deg);
}

.arlog-select-menu {
  position: fixed;
  z-index: 12000;
  display: grid;
  gap: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.08);
}

.arlog-select-menu[hidden] {
  display: none;
}

.arlog-select-option {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
}

.arlog-select-option:hover:not(:disabled),
.arlog-select-option:focus-visible {
  outline: none;
  background: #fff7ed;
  color: #9a3412;
}

.arlog-select-option[aria-selected="true"] {
  background: #fff7ed;
  color: #c2410c;
  font-weight: 700;
}

.arlog-select-option:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.route-prototype-assignee .arlog-select-trigger,
.contractor-available-run-actions .arlog-select-trigger,
.contractor-crew-inline-editor .arlog-select-trigger {
  min-height: 36px;
  padding-inline: 9px;
  font-size: 12px;
}

@media (max-width: 760px) {
  .arlog-select-trigger {
    min-height: 44px;
    font-size: 14px;
  }

  .arlog-select-option {
    min-height: 42px;
    font-size: 14px;
  }
}
