/* TrebuchetOS — Design System v2 */

/* ─── Design Tokens ──────────────────────────────────────────────────────── */
:root {
  /* Brand */
  --color-brand-600: #5b55f5;
  --color-brand-500: #716df4;
  --color-brand-300: #aeb8ff;
  --color-brand-100: #e7eaff;
  --color-brand-50: #f3f4ff;

  /* Neutrals */
  --color-neutral-950: #111827;
  --color-neutral-900: #1f2937;
  --color-neutral-700: #4b5563;
  --color-neutral-600: #5f6b7a;
  --color-neutral-500: #7b8496;
  --color-neutral-400: #a3acbd;
  --color-neutral-300: #c8ceda;
  --color-neutral-200: #edf0f5;
  --color-neutral-100: #f6f7fb;
  --color-neutral-50: #fbfcff;

  /* Semantic status */
  --color-success-600: #16a34a;
  --color-success-50: #f0fdf4;
  --color-warning-600: #d97706;
  --color-warning-50: #fffbeb;
  --color-danger-600: #dc2626;
  --color-danger-50: #fef2f2;
  --color-info-600: #2563eb;
  --color-info-50: #eff6ff;

  /* Surfaces */
  --surface-page: #f8f9fd;
  --surface-card: #ffffff;
  --surface-muted: #f6f7fb;
  --surface-soft: #f3f4ff;
  --surface-overlay: rgba(17, 24, 39, 0.45);

  /* Sidebar */
  --sidebar-bg: #ffffff;
  --sidebar-text: #7b8496;
  --sidebar-text-active: #1f2937;
  --sidebar-active-bg: #f3f4ff;
  --sidebar-active-border: #aeb8ff;
  --sidebar-w: 200px;
  --sidebar-collapsed: 60px;

  /* Topbar */
  --topbar-h: 56px;
  --topbar-bg: #ffffff;

  /* Borders */
  --border-default: #edf0f5;
  --border-strong: #d8deea;
  --border-focus: #aeb8ff;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 18px 38px rgba(15, 23, 42, 0.12);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 18px;
  --radius-pill: 999px;

  /* Spacing (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Legacy aliases — kept so older templates still compile */
  --app-surface: var(--surface-card);
  --app-surface-muted: var(--surface-muted);
  --app-border: var(--border-default);
  --app-border-strong: var(--border-strong);
  --app-text: var(--color-neutral-900);
  --app-text-muted: var(--color-neutral-500);
  --app-radius: var(--radius-md);
  --app-radius-sm: var(--radius-sm);
  --app-shadow: var(--shadow-md);
  --app-shadow-sm: var(--shadow-sm);
  --icaap-primary-navy: var(--color-brand-600);
  --icaap-primary-blue: var(--color-brand-500);
  --icaap-accent: var(--color-brand-500);
}

/* ─── Base ───────────────────────────────────────────────────────────────── */
html {
  scrollbar-gutter: stable both-edges;
}

body.dispatch-shell {
  background: var(--surface-page);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-neutral-700);
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  overflow-x: hidden;
  margin-bottom: 0;
}

body.dispatch-shell a {
  color: var(--color-brand-600);
}

body.dispatch-shell a:hover {
  color: var(--color-brand-500);
}

/* ─── Shell Layout ───────────────────────────────────────────────────────── */
.dispatch-shell .main-wrapper {
  display: flex;
  position: relative;
  min-height: 100vh;
}

.dispatch-shell .page-wrapper {
  min-height: 100vh;
  background: var(--surface-page);
  width: calc(100% - var(--sidebar-w));
  min-width: 0;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  transition:
    margin 0.15s ease,
    width 0.15s ease;
}

.dispatch-shell .page-wrapper .page-content {
  flex-grow: 1;
  min-width: 0;
  padding: var(--space-6);
  margin-top: var(--topbar-h);
}

@media (max-width: 767px) {
  .dispatch-shell .page-wrapper .page-content {
    padding: var(--space-4) var(--space-3);
  }
}

/* ─── Sidebar ────────────────────────────────────────────────────────────── */
.dispatch-shell .sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-w) !important;
  min-width: var(--sidebar-w) !important;
  height: 100vh;
  z-index: 999;
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-default);
  transition:
    width 0.15s ease,
    min-width 0.15s ease,
    left 0.25s ease;
}

.dispatch-shell .sidebar .sidebar-header {
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-4);
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-default);
}

.dispatch-shell .sidebar .sidebar-header .sidebar-brand {
  font-weight: 700;
  font-size: 15px;
  color: var(--sidebar-text-active);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

.dispatch-shell .sidebar .sidebar-header .sidebar-brand .brand-icon {
  color: var(--color-brand-500);
  font-size: 18px;
}

.dispatch-shell .sidebar .sidebar-header .sidebar-brand .brand-accent {
  color: var(--color-brand-500);
  font-weight: 300;
}

.dispatch-shell .sidebar .sidebar-header .sidebar-toggler {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  width: 20px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.dispatch-shell .sidebar .sidebar-header .sidebar-toggler:hover {
  opacity: 1;
}

.dispatch-shell .sidebar .sidebar-header .sidebar-toggler:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
}

.dispatch-shell .sidebar .sidebar-header .sidebar-toggler span {
  display: block;
  width: 100%;
  border-radius: 3px;
  height: 2px;
  background: var(--color-neutral-500);
}

.dispatch-shell .sidebar .sidebar-header .sidebar-toggler span + span {
  margin-top: 5px;
}

.dispatch-shell .sidebar .sidebar-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-3) var(--space-2) var(--space-6);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

/* Nav items */
.dispatch-shell .sidebar .sidebar-body .nav {
  flex-direction: column;
}

.dispatch-shell .sidebar .sidebar-body .nav .nav-item.nav-category {
  color: var(--color-neutral-500);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: var(--space-4) var(--space-3) var(--space-2);
  list-style: none;
}

.dispatch-shell
  .sidebar
  .sidebar-body
  .nav
  .nav-item.nav-category:not(:first-of-type) {
  border-top: 1px solid var(--border-default);
  margin-top: var(--space-2);
}

.dispatch-shell .sidebar .sidebar-body .nav .nav-item .nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  height: 36px;
  border-radius: 6px;
  margin: 1px var(--space-2);
  color: var(--sidebar-text);
  font-weight: 500;
  font-size: 13px;
  position: relative;
  text-decoration: none;
  transition:
    color 0.15s,
    background 0.15s;
}

.dispatch-shell .sidebar .sidebar-body .nav .nav-item .nav-link i {
  width: 16px;
  text-align: center;
  font-size: 14px;
  opacity: 0.7;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.dispatch-shell .sidebar .sidebar-body .nav .nav-item .nav-link .link-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dispatch-shell .sidebar .sidebar-body .nav .nav-item .nav-link:hover {
  background: var(--surface-muted);
  color: var(--sidebar-text-active);
}

.dispatch-shell .sidebar .sidebar-body .nav .nav-item .nav-link:hover i {
  opacity: 1;
}

.dispatch-shell .sidebar .sidebar-body .nav .nav-item.active > .nav-link {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-text-active);
  border-left: 3px solid var(--sidebar-active-border);
  padding-left: calc(var(--space-3) - 3px);
}

.dispatch-shell .sidebar .sidebar-body .nav .nav-item.active > .nav-link i {
  opacity: 1;
  color: var(--color-brand-500);
}

/* Sidebar footer */
.dispatch-shell .sidebar-footer {
  padding: var(--space-3) var(--space-4) var(--space-4);
  border-top: 1px solid var(--border-default);
}

.dispatch-shell .sidebar-footer .small {
  color: var(--sidebar-text);
  font-size: 11px;
}

/* ─── Folded Sidebar ─────────────────────────────────────────────────────── */
.dispatch-shell.sidebar-folded .sidebar {
  width: var(--sidebar-collapsed) !important;
  min-width: var(--sidebar-collapsed) !important;
}

.dispatch-shell.sidebar-folded .page-wrapper {
  margin-left: var(--sidebar-collapsed) !important;
  width: calc(100% - var(--sidebar-collapsed)) !important;
}

.dispatch-shell.sidebar-folded .dispatch-topbar.navbar {
  left: var(--sidebar-collapsed) !important;
  width: calc(100% - var(--sidebar-collapsed)) !important;
}

.dispatch-shell.sidebar-folded .sidebar .brand-full,
.dispatch-shell.sidebar-folded .sidebar .link-title,
.dispatch-shell.sidebar-folded .sidebar .nav-category {
  display: none !important;
}

.dispatch-shell.sidebar-folded .sidebar .sidebar-header .sidebar-brand {
  justify-content: center;
}

.dispatch-shell.sidebar-folded .sidebar .nav-item .nav-link {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
  margin: 1px var(--space-2);
  border-left: none !important;
}

.dispatch-shell.sidebar-folded .sidebar .nav-item.active > .nav-link {
  border-left: none;
  padding-left: 0;
}

.dispatch-shell.sidebar-folded .sidebar .nav-item .nav-link i {
  width: auto;
}

/* ─── Topbar ─────────────────────────────────────────────────────────────── */
.dispatch-shell .dispatch-topbar.navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border-default);
  z-index: 978;
  padding: 0;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  transition:
    left 0.15s ease,
    width 0.15s ease;
}

.dispatch-shell.sidebar-folded .dispatch-topbar.navbar {
  left: var(--sidebar-collapsed);
  width: calc(100% - var(--sidebar-collapsed));
}

.dispatch-shell .dispatch-topbar .navbar-content {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0 18px 0 16px;
  gap: 18px;
}

/* Mobile sidebar toggle in topbar */
.dispatch-shell .dispatch-topbar .sidebar-toggler {
  display: none;
  height: 100%;
  align-items: center;
  padding: 0 var(--space-4);
  color: var(--color-neutral-500);
  text-decoration: none;
  border-right: 1px solid var(--border-default);
}

.dispatch-shell .dispatch-topbar .sidebar-toggler:hover {
  color: var(--color-neutral-900);
  background: var(--surface-muted);
}

/* Search */
.dispatch-shell .dispatch-topbar .navbar-search-linkedin {
  flex: 0 1 380px;
  max-width: 380px;
}

.dispatch-shell .dispatch-topbar .navbar-search-linkedin .input-group {
  border: 1px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #eef3f8;
  height: 36px;
  box-shadow: none;
  transition:
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}

.dispatch-shell
  .dispatch-topbar
  .navbar-search-linkedin
  .input-group:focus-within {
  background: #fff;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.dispatch-shell .dispatch-topbar .navbar-search-linkedin .input-group-text {
  border: none;
  background: transparent;
  color: #64748b;
  padding: 0 var(--space-3);
}

.dispatch-shell .dispatch-topbar .navbar-search-linkedin .form-control {
  border: none;
  box-shadow: none;
  background: transparent;
  font-size: 13px;
  color: var(--color-neutral-900);
  height: 36px;
}

.dispatch-shell
  .dispatch-topbar
  .navbar-search-linkedin
  .form-control::placeholder {
  color: var(--color-neutral-400);
}

/* Topbar nav items */
.dispatch-shell .dispatch-topbar .navbar-nav {
  margin-left: auto !important;
  align-items: center;
  height: var(--topbar-h);
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
}

.dispatch-shell .dispatch-topbar .linkedin-nav-item {
  display: flex;
  align-items: center;
}

.dispatch-shell .dispatch-topbar .dropdown-toggle::after {
  display: none !important;
}

.dispatch-shell .dispatch-topbar .linkedin-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 44px;
  border-radius: 6px;
  color: #64748b !important;
  text-decoration: none;
  position: relative;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

.dispatch-shell .dispatch-topbar .linkedin-nav-link:hover {
  background: #f3f6f8;
  border-color: transparent;
  color: #111827 !important;
}

.dispatch-shell .dispatch-topbar .linkedin-nav-link:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.dispatch-shell .dispatch-topbar .linkedin-nav-link > i {
  color: #667085;
  font-size: 16px;
  line-height: 1;
}

.dispatch-shell .dispatch-topbar .linkedin-nav-label {
  display: none;
}

.dispatch-shell .dispatch-topbar .topbar-action-link {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.dispatch-shell .dispatch-topbar .topbar-tenant-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: linear-gradient(180deg, #6c63f6 0%, #5147dc 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.25);
}

.dispatch-shell .dispatch-topbar .topbar-dropdown-wide-create {
  min-width: 200px;
}

.dispatch-shell .dispatch-topbar .topbar-dropdown-wide-feed {
  min-width: 360px;
  max-width: min(420px, calc(100vw - 24px));
}

.dispatch-shell .dispatch-topbar .topbar-dropdown-wide-account {
  min-width: 266px;
  max-width: min(266px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 72px));
  overflow: hidden;
}

.dispatch-shell .dispatch-topbar .topbar-dropdown-wide-account.show {
  display: flex;
  flex-direction: column;
}

.dispatch-shell .dispatch-topbar .topbar-tenant-list-wrap {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
}

.dispatch-shell .dispatch-topbar .topbar-tenant-list {
  max-height: max(140px, min(320px, calc(100vh - 280px)));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.dispatch-shell .dispatch-topbar .topbar-account-button {
  width: auto;
  min-width: 48px;
  max-width: min(206px, 44vw);
  height: 42px;
  padding: 0 12px 0 7px;
  gap: 9px;
  background: #eef0ff;
  border-color: #c8ceff;
  border-radius: 14px;
  box-shadow: none;
}

.dispatch-shell .dispatch-topbar .topbar-account-button:hover {
  background: #e7eaff;
  border-color: #aeb8ff;
}

.dispatch-shell .dispatch-topbar .topbar-account-button.show,
.dispatch-shell .dispatch-topbar .topbar-account-button[aria-expanded="true"] {
  background: #e7eaff;
  border-color: #aeb8ff;
}

.dispatch-shell .dispatch-topbar .topbar-account-copy {
  min-width: 0;
  text-align: left;
  line-height: 1.1;
}

.dispatch-shell .dispatch-topbar .topbar-account-company,
.dispatch-shell .dispatch-topbar .topbar-account-user {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-shell .dispatch-topbar .topbar-account-company {
  color: #111827;
  font-size: 13px;
  font-weight: 500;
  max-width: 130px;
}

.dispatch-shell .dispatch-topbar .topbar-account-user {
  color: #8b93a5;
  font-size: 11px;
  font-weight: 500;
  max-width: 130px;
}

.dispatch-shell .dispatch-topbar .topbar-account-caret {
  color: #716df4;
  font-size: 11px;
}

.dispatch-shell .dispatch-topbar .topbar-profile-name {
  font-size: 14px;
}

.dispatch-shell .dispatch-topbar .linkedin-nav-active {
  color: #3730a3 !important;
  background: #eef2ff;
  border-color: transparent;
}

/* Notification badge */
.dispatch-shell .dispatch-topbar .notification-pill {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 9px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  line-height: 16px;
  border-radius: 100px;
  background: #f59e0b !important;
  color: #fff !important;
  font-weight: 700;
  z-index: 2;
  pointer-events: none;
  text-align: center;
  letter-spacing: 0;
}

.dispatch-shell .dispatch-topbar .chatterbox-pill {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 9px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  line-height: 16px;
  border-radius: 100px;
  background: #4f46ff !important;
  color: #fff !important;
  font-weight: 700;
  z-index: 2;
  pointer-events: none;
  text-align: center;
  letter-spacing: 0;
}

/* Avatar */
.topbar-avatar-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 37px;
  height: 37px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #7468ff 0%, #5f4dea 100%);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.22);
}

/* Topbar dropdowns */
.dispatch-shell .dispatch-topbar .dropdown {
  position: relative;
  overflow: visible;
}

.topbar-dropdown-menu {
  border: 1px solid #edf0f5;
  border-radius: 17px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
  padding: 0;
  background: #fff;
  min-width: 200px;
  position: absolute !important;
  margin-top: 0 !important;
  z-index: 1035;
  overflow: hidden;
}

.dispatch-shell .dispatch-topbar .topbar-dropdown-menu {
  top: calc(100% + 10px) !important;
  margin-top: 0 !important;
}

.topbar-dropdown-section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #a3acbd;
}

.topbar-dropdown-item {
  align-items: center;
  border-radius: 8px;
  color: #6b7280;
  display: flex;
  font-size: 13.5px;
  font-weight: 500;
  gap: 10px;
  min-height: 36px;
  padding: 8px 14px;
  text-decoration: none;
  transition: background 0.1s;
  width: 100%;
  white-space: normal;
}

.topbar-dropdown-item:hover {
  background: #f7f8fb;
  color: #4b5563;
}

.topbar-dropdown-item.active {
  background: transparent;
  color: #4f46ff;
  font-weight: 500;
}

.topbar-dropdown-item.text-danger:hover {
  background: var(--color-danger-50);
  color: var(--color-danger-600) !important;
}

.topbar-profile-head {
  padding: 14px 16px 12px;
}

.topbar-profile-person {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.topbar-profile-copy {
  display: grid;
  min-width: 0;
}

.topbar-profile-name,
.topbar-profile-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-profile-name {
  color: #111827;
  font-weight: 500;
  line-height: 1.25;
}

.topbar-profile-subtitle {
  color: #9aa3b2;
  font-size: 12px;
  line-height: 1.25;
  margin-top: 1px;
}

.topbar-dropdown-divider {
  border-color: #edf0f5;
  margin: 0;
  opacity: 1;
}

.topbar-dropdown-label-row {
  padding: 12px 16px 4px;
}

.topbar-tenant-form,
.topbar-signout-form {
  margin: 0;
}

.topbar-tenant-list-wrap {
  list-style: none;
}

.topbar-tenant-list {
  max-height: max(140px, min(320px, calc(100vh - 280px)));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.topbar-tenant-form {
  padding: 0 8px 12px;
}

.topbar-tenant-option {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 16px;
  justify-items: start;
  line-height: 1.16;
  min-height: 42px;
  padding: 7px 8px;
}

.topbar-tenant-option-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.topbar-branch-icon {
  color: #4f46ff;
  font-size: 14px;
}

.topbar-profile-icon {
  color: #7b8496 !important;
  font-size: 14px;
}

.topbar-profile-action:hover .topbar-profile-icon,
.topbar-profile-action:focus .topbar-profile-icon,
.topbar-signout-action:hover .topbar-profile-icon,
.topbar-signout-action:focus .topbar-profile-icon {
  color: #7b8496 !important;
}

.topbar-tenant-option.active .topbar-branch-icon,
.topbar-tenant-option.active .topbar-check-icon {
  color: #4f46ff;
}

.topbar-check-icon {
  align-self: center;
  color: #5b55f5;
  font-size: 12px;
  justify-self: end;
}

.topbar-profile-action {
  border-radius: 0;
  color: #6b7280 !important;
  min-height: 39px;
  padding: 9px 16px;
}

.topbar-profile-action:hover,
.topbar-profile-action:focus,
.topbar-profile-action:active {
  background: #f7f8fb;
  color: #6b7280 !important;
}

.topbar-signout-action {
  border: 0;
  background: transparent;
  border-radius: 0;
  color: #6b7280 !important;
  text-align: left;
}

.topbar-signout-action:hover,
.topbar-signout-action:focus,
.topbar-signout-action:active {
  background: #f7f8fb;
  color: #4b5563 !important;
}

.topbar-feed-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 7px;
}

.topbar-feed-title {
  color: #111827;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.topbar-feed-subtitle {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}

.topbar-feed-link,
.topbar-feed-footer {
  color: #3730a3;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-feed-link:hover,
.topbar-feed-footer:hover {
  color: #312e81;
  text-decoration: underline;
}

.topbar-feed-item {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  color: #334155;
  text-decoration: none;
}

.topbar-feed-item:hover {
  background: #f3f6f8;
  color: #111827;
  text-decoration: none;
}

.topbar-feed-icon {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.topbar-feed-icon-task {
  background: #eef2ff;
  color: #3730a3;
}

.topbar-feed-icon-alert {
  background: #fff1f2;
  color: #be123c;
}

.topbar-feed-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.topbar-feed-item-title {
  color: #111827;
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-feed-item-meta {
  color: #64748b;
  display: block;
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-feed-empty {
  color: #64748b;
  font-size: 13px;
  padding: 18px 10px;
  text-align: center;
}

.topbar-feed-footer {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
}

.topbar-feed-footer:hover {
  background: #eef2ff;
  text-decoration: none;
}

/* ─── Mobile sidebar ─────────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .dispatch-shell .dispatch-topbar .sidebar-toggler {
    display: inline-flex;
  }

  .dispatch-shell .sidebar {
    left: calc(-1 * var(--sidebar-w));
  }

  .dispatch-shell.sidebar-open .sidebar {
    left: 0;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.3);
  }

  .dispatch-shell .page-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .dispatch-shell .dispatch-topbar.navbar {
    left: 0 !important;
    width: 100% !important;
  }

  .dispatch-shell.sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--surface-overlay);
    z-index: 990;
  }
}

/* ─── Auth / Public Pages ────────────────────────────────────────────────── */
.dispatch-auth {
  background:
    radial-gradient(
      circle at top left,
      rgba(59, 130, 246, 0.12),
      transparent 34%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(245, 158, 11, 0.12),
      transparent 30%
    ),
    linear-gradient(180deg, #f8fafc 0%, #eef4fb 100%);
}

.dispatch-auth .auth-shell {
  display: flex;
  min-height: 100vh;
  padding: var(--space-3);
}

.dispatch-auth .auth-grid {
  display: grid;
  grid-template-columns: 45% 55%;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
}

.dispatch-auth .auth-grid-single {
  grid-template-columns: 1fr;
  max-width: 560px;
}

.dispatch-auth .auth-panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.dispatch-auth .auth-panel-brand {
  position: relative;
  color: var(--color-neutral-900);
  text-align: left;
  background:
    radial-gradient(
      circle at top right,
      rgba(59, 130, 246, 0.2),
      transparent 28%
    ),
    linear-gradient(
      160deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(241, 245, 249, 0.95) 100%
    );
}

.dispatch-auth .auth-panel-brand::before {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  pointer-events: none;
}

.dispatch-auth .auth-brand-inner {
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.dispatch-auth .auth-brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.16),
    rgba(245, 158, 11, 0.14)
  );
  color: var(--color-brand-700);
  font-size: 22px;
  margin-bottom: var(--space-4);
}

.dispatch-auth .auth-brand-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: var(--space-3);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--color-brand-700);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dispatch-auth .auth-brand-title {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--color-neutral-900);
}

.dispatch-auth .auth-brand-sub {
  color: var(--color-neutral-600);
  margin-bottom: var(--space-4);
  max-width: 420px;
}

.dispatch-auth .auth-feature-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.dispatch-auth .auth-feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--color-neutral-800);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.dispatch-auth .auth-feature-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-brand-700);
  flex: 0 0 auto;
}

.dispatch-auth .auth-panel-form {
  background:
    radial-gradient(
      circle at top left,
      rgba(37, 99, 235, 0.05),
      transparent 24%
    ),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.dispatch-auth .auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  padding: var(--space-6);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.dispatch-auth .auth-card-single {
  max-width: none;
}

.dispatch-auth .auth-card-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: var(--space-3);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dispatch-auth .auth-card h1 {
  margin: 0 0 var(--space-2) 0;
  font-size: 28px;
  color: var(--color-neutral-950);
}

.dispatch-auth .auth-card p.sub {
  color: var(--color-neutral-600);
  margin-bottom: var(--space-5);
}

.dispatch-auth .auth-card .form-control,
.dispatch-auth .auth-card .input-group .form-control {
  background: #fff;
}

.dispatch-auth .auth-submit {
  height: 44px;
  font-weight: 600;
  border-radius: 14px;
}

.dispatch-auth .auth-footer {
  color: var(--color-neutral-500) !important;
}

@media (max-width: 900px) {
  .dispatch-auth .auth-grid {
    grid-template-columns: 1fr;
    border-radius: 0;
    box-shadow: none;
  }
  .dispatch-auth .auth-panel-brand {
    display: none;
  }
  .dispatch-auth .auth-panel-form {
    padding: var(--space-6) var(--space-3);
  }
  .dispatch-auth .auth-panel {
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .dispatch-auth .auth-grid-single {
    max-width: 100%;
  }
}

.location-picker-map,
.job-location-preview-map {
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-muted);
}

.job-location-preview-map {
  min-height: 220px;
}

.location-geocode-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.location-geocode-status {
  color: var(--color-neutral-500);
  font-size: 12px;
  line-height: 1.3;
  min-height: 16px;
}

.dispatch-map-grid {
  position: relative;
  width: 100%;
  min-height: 650px;
  overflow-x: hidden;
}

.dispatch-map-canvas {
  width: 100%;
  min-height: 650px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-muted);
  box-shadow: var(--shadow-xs);
}

.dispatch-map-overlay-controls {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

/* Controls in the map canvas overlay (technician map mode). */
.dispatch-map-grid > .dispatch-map-overlay-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1000;
}

/* Controls mounted in the top toolbar (dispatch map mode). */
.dispatch-calendar-toolbar .dispatch-map-overlay-controls {
  margin-left: auto;
  align-items: center;
}

.dispatch-calendar-toolbar .dispatch-map-overlay-btn {
  box-shadow: none;
}

.dispatch-map-overlay-btn-group {
  position: relative;
}

.dispatch-map-overlay-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-neutral-700);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.13);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  white-space: nowrap;
  line-height: 1;
}

.dispatch-map-overlay-btn:hover,
.dispatch-map-overlay-btn.active {
  border-color: var(--color-primary-400, #818cf8);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  color: var(--color-neutral-900);
}

.dispatch-map-overlay-btn.dispatch-map-overlay-btn-primary {
  background: var(--color-primary-600, #4f46e5);
  color: #fff;
  border-color: var(--color-primary-700, #4338ca);
}

.dispatch-map-overlay-btn.dispatch-map-overlay-btn-primary:hover {
  background: var(--color-primary-700, #4338ca);
  color: #fff;
}

.dispatch-map-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-600, #4f46e5);
  color: #fff !important;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  line-height: 1;
}

/* ── Map float panels (dropdown lists) ──────────────────────── */
.dispatch-map-float-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  width: 300px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1001;
  padding: 8px;
}

.dispatch-map-float-panel-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-neutral-500);
  padding: 4px 6px 8px;
}

.dispatch-map-job-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 4px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-size: 13px;
  color: var(--color-neutral-700);
  transition:
    border-color 0.12s,
    box-shadow 0.12s;
}

.dispatch-map-job-row:last-child {
  margin-bottom: 0;
}

.dispatch-map-job-row:hover,
.dispatch-map-job-row:focus-visible {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.dispatch-map-job-row strong {
  color: var(--color-neutral-950);
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-map-job-row em {
  color: var(--color-neutral-500);
  font-size: 11px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-job-marker.is-selected {
  z-index: 1000 !important;
  filter: drop-shadow(0 0 0.35rem rgba(79, 70, 229, 0.7));
}

.dispatch-job-marker.is-selected .dispatch-job-marker-pin {
  transform: scale(1.12);
  outline: 3px solid rgba(79, 70, 229, 0.22);
  outline-offset: 2px;
}

/* ── Map detail drawer (slides in from right over the map) ──── */
.dispatch-map-drawer {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 360px;
  background: var(--surface-card, #fff);
  border-left: 1px solid var(--border-default);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  box-shadow: -6px 0 28px rgba(0, 0, 0, 0.13);
  transform: translateX(102%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 998;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.dispatch-map-drawer.open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dispatch-map-drawer-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 20px 16px 16px;
}

.dispatch-map-drawer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-neutral-500);
  font-size: 13px;
  z-index: 1;
  flex-shrink: 0;
}

.dispatch-map-drawer-close:hover {
  background: var(--surface-muted);
  color: var(--color-neutral-900);
}

/* Details inside drawer: no card border/shadow */
.dispatch-map-drawer .dispatch-map-details {
  border: none;
  box-shadow: none;
  padding: 0;
  min-height: 0;
  background: transparent;
  border-radius: 0;
}

.dispatch-map-details {
  min-height: 320px;
  align-self: start;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-xs);
}

.dispatch-map-detail-list {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: var(--space-2) var(--space-3);
  margin: 0 0 var(--space-4);
  font-size: 13px;
}

.dispatch-map-detail-list dt {
  color: var(--color-neutral-500);
  font-weight: 600;
}

.dispatch-map-detail-list dd {
  margin: 0;
  color: var(--color-neutral-800);
  overflow-wrap: anywhere;
}

.dispatch-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.dispatch-tech-marker {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #0f766e;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
}

.dispatch-tech-marker.is-stale {
  background: #64748b;
  opacity: 0.68;
}

@media (max-width: 991px) {
  .dispatch-map-canvas {
    min-height: 480px;
  }

  .dispatch-map-drawer {
    width: 100%;
    border-left: none;
    border-radius: 0;
    border-top: 1px solid var(--border-default);
    top: auto;
    bottom: 0;
    height: 60%;
    transform: translateY(102%);
  }

  .dispatch-map-drawer.open {
    transform: translateY(0);
  }
}
/* ─── Breadcrumbs ────────────────────────────────────────────────────────── */
.dispatch-shell .dispatch-page-toolbar {
  margin-bottom: var(--space-3);
}

.dispatch-shell .dispatch-breadcrumb {
  margin-bottom: 0;
  padding: 0;
  background: transparent;
  font-size: 13px;
}

.dispatch-shell .dispatch-breadcrumb .breadcrumb-item {
  color: var(--color-neutral-500);
}

.dispatch-shell
  .dispatch-breadcrumb
  .breadcrumb-item
  + .breadcrumb-item::before {
  color: var(--color-neutral-400);
  content: "/";
}

.dispatch-shell .dispatch-breadcrumb a {
  color: var(--color-neutral-500);
  text-decoration: none;
}

.dispatch-shell .dispatch-breadcrumb a:hover {
  color: var(--color-neutral-900);
  text-decoration: underline;
}

.dispatch-shell .dispatch-breadcrumb .breadcrumb-item.active {
  color: var(--color-neutral-900);
  font-weight: 500;
}

/* Search results grouped layout */
.search-results-group h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-neutral-500);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.search-result-item {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 8px;
  transition:
    box-shadow 0.12s,
    transform 0.08s;
}

.search-result-item:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  text-decoration: none;
}

.search-result-item .fw-semibold {
  color: var(--color-neutral-900);
}

@media (max-width: 767px) {
  .search-result-item {
    padding: 10px 12px;
  }
}

/* ─── Page Header ────────────────────────────────────────────────────────── */
.app-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-default);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.app-page-eyebrow {
  color: var(--color-neutral-500);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-1);
}

.app-page-heading {
  min-width: 0;
}

.dispatch-page-title,
.app-page-header .dispatch-page-title {
  color: var(--color-neutral-900);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0;
}

.app-page-subtitle {
  color: var(--color-neutral-500);
  font-size: 14px;
  margin-top: var(--space-1);
}

.app-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.app-page-action-link:not(.btn-primary):not(.btn-success):not(.btn-danger) i {
  color: var(--color-neutral-500) !important;
}

/* ─── Filter Bar ─────────────────────────────────────────────────────────── */
.app-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--space-2);
  padding: var(--space-2);
  min-height: 48px;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-xs);
  overflow-x: auto;
  scrollbar-width: thin;
}

.app-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  justify-self: start;
  margin-bottom: var(--space-2);
}

.app-filter-toggle[aria-expanded="true"] {
  margin-bottom: var(--space-2);
}

.app-filter-bar.is-collapsed {
  display: none;
}

.app-filter-bar.filter-stacked {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--space-2);
}

.app-filter-bar.row {
  margin-left: 0;
  margin-right: 0;
}

.app-filter-bar > *,
.app-filter-bar .filter-primary > *,
.app-filter-bar .filter-advanced > * {
  min-width: 0;
}

.app-filter-bar .filter-primary,
.app-filter-bar .filter-advanced {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--space-2);
  width: auto;
  flex: 0 0 auto;
}

.app-filter-bar .filter-advanced {
  padding-top: 0;
  border-top: 0;
}

.app-filter-bar .filter-field {
  flex: 0 0 180px;
  min-width: 0;
}

.app-filter-bar .filter-field-sm {
  flex: 0 0 140px;
  min-width: 0;
}

.app-filter-bar .filter-field-lg,
.app-filter-bar .filter-grow {
  flex: 0 0 260px;
  min-width: 0;
}

.app-filter-bar .form-label {
  margin: 0 0 2px;
  color: var(--color-neutral-500);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.app-filter-bar .form-control,
.app-filter-bar .form-select {
  height: 32px;
  min-height: 32px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 13px;
}

.app-filter-bar .btn {
  height: 32px;
  min-height: 32px;
  padding-inline: 12px;
  font-size: 12px;
}

.app-filter-bar .filter-check,
.app-filter-bar .form-check {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  color: var(--color-neutral-700);
  font-size: 12px;
  white-space: nowrap;
}

.app-filter-bar .filter-search {
  flex: 0 0 320px;
  min-width: 0;
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-neutral-400);
  padding: 0 var(--space-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-card);
}

.app-filter-bar .filter-search input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--color-neutral-900);
  width: 100%;
}

.app-filter-bar .filter-search input::placeholder {
  color: var(--color-neutral-400);
}

.app-filter-bar .filter-divider {
  width: 1px;
  height: 24px;
  background: var(--border-default);
  flex-shrink: 0;
  margin: 0 var(--space-1);
}

.app-filter-bar select.filter-select {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--color-neutral-700);
  padding: 0 var(--space-3);
  min-height: 32px;
  cursor: pointer;
}

.app-filter-bar .filter-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  gap: var(--space-2);
}

/* ─── Custom Filter Select ───────────────────────────────────────────────── */
.app-filter-select {
  width: 100%;
}

.app-filter-select-btn {
  align-items: center;
  appearance: none;
  background-color: var(--bs-body-bg, #fff);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-position: right 0.6rem center;
  background-repeat: no-repeat;
  background-size: 14px 10px;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: var(--bs-border-radius, 0.375rem);
  color: var(--bs-body-color, #212529);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  height: 32px;
  min-height: 32px;
  justify-content: space-between;
  padding: 0 1.8rem 0 0.6rem;
  text-align: left;
  width: 100%;
  gap: 6px;
  overflow: hidden;
}

.app-filter-select-btn:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.2);
  outline: 0;
}

.app-filter-select-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 0;
  min-width: 0;
}

.app-filter-select-menu {
  background: var(--bs-body-bg, #fff);
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: var(--bs-border-radius, 0.375rem);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  position: fixed;
  white-space: nowrap;
  z-index: 9999;
}

.app-filter-select-option {
  align-items: center;
  color: var(--bs-body-color, #212529);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  gap: 8px;
  justify-content: space-between;
  padding: 5px 12px;
}

.app-filter-select-option:hover,
.app-filter-select-option:focus {
  background: var(--color-neutral-50, #f8fafc);
  outline: none;
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.dispatch-shell .page-content .card,
.app-panel {
  background: var(--surface-card);
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
}

.dispatch-shell .page-content .card-header {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-default);
  color: var(--color-neutral-900);
  font-weight: 600;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

/* ─── Tables ─────────────────────────────────────────────────────────────── */
.dispatch-shell .page-content table thead.table-light th,
.dispatch-shell .page-content .table thead th {
  background: var(--surface-muted) !important;
  color: var(--color-neutral-500) !important;
  border-color: var(--border-default) !important;
  border-bottom: 2px solid var(--border-default) !important;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-3) var(--space-4);
}

.dispatch-shell .table {
  color: var(--color-neutral-700);
}

.dispatch-shell .table > :not(caption) > * > * {
  border-bottom-color: var(--color-neutral-100);
  padding: 0 var(--space-4);
  height: 52px;
  vertical-align: middle;
}

.dispatch-shell .table-hover > tbody > tr:hover > *,
.dispatch-shell .table tbody tr:hover > * {
  background: var(--color-neutral-50);
}

/* Table wrap pattern */
.data-table-wrap {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.data-table-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-default);
}

.data-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-default);
  font-size: 13px;
  color: var(--color-neutral-500);
}

/* ─── Form Controls ──────────────────────────────────────────────────────── */
.dispatch-shell .form-control,
.dispatch-shell .form-select,
.dispatch-auth .form-control,
.dispatch-auth .form-select {
  height: 36px;
  padding: 0 var(--space-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--color-neutral-900);
  background: var(--surface-card);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.dispatch-shell .form-control:focus,
.dispatch-shell .form-select:focus,
.dispatch-auth .form-control:focus,
.dispatch-auth .form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  outline: none;
}

.dispatch-shell .form-label,
.dispatch-auth .form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-neutral-700);
  margin-bottom: 6px;
}

.dispatch-shell textarea.form-control,
.dispatch-auth textarea.form-control {
  height: auto;
  padding: var(--space-2) var(--space-3);
}

/* ─── Tabs ───────────────────────────────────────────────────────────────── */
.report-dashboard-tabs-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.report-dashboard-tabs-row .nav-tabs {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  scrollbar-width: thin;
}

.report-dashboard-tabs-row .nav-item {
  flex: 0 0 auto;
}

.report-dashboard-tabs-row .app-filter-toggle {
  flex: 0 0 auto;
  margin: 0 0 1px auto;
}

.dispatch-shell .nav-tabs {
  border-bottom-color: var(--border-default);
}

.dispatch-shell .nav-tabs .nav-link {
  color: var(--color-neutral-500);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-weight: 500;
  font-size: 13px;
}

.dispatch-shell .nav-tabs .nav-link.active {
  color: var(--color-neutral-900);
  border-color: var(--border-default) var(--border-default) var(--surface-card);
  font-weight: 600;
}

/* ─── Metric Grid ────────────────────────────────────────────────────────── */
.app-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.app-metric-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
  min-height: 0;
  height: 100%;
}

.app-metric-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

/* Report panels: make panels equal height and table areas scrollable */
.report-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.report-panel > h2 {
  margin: 0 0 var(--space-2) 0;
  font-size: 16px;
}

.dashboard-table {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 160px;
}

.dashboard-table .table-responsive {
  overflow: auto;
  max-height: 260px; /* clamp preview height */
}

.dashboard-table.expanded .table-responsive {
  max-height: none;
}

.dashboard-show-more {
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
}

.app-metric-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  min-width: 0;
  width: 100%;
}

.app-metric-heading {
  flex: 1 1 auto;
  min-width: 0;
}

.app-metric-label {
  color: var(--color-neutral-500);
  display: -webkit-box;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.app-metric-value {
  color: var(--color-neutral-900);
  font-size: 24px;
  line-height: 1.1;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.app-metric-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  overflow: hidden;
}

.app-metric-icon i {
  line-height: 1;
  max-width: 100%;
}

.app-metric-icon.tone-default {
  background: var(--color-neutral-100);
  color: var(--color-neutral-500);
}
.app-metric-icon.tone-money {
  background: var(--color-success-50);
  color: var(--color-success-600);
}
.app-metric-icon.tone-warning {
  background: var(--color-warning-50);
  color: var(--color-warning-600);
}
.app-metric-icon.tone-danger {
  background: var(--color-danger-50);
  color: var(--color-danger-600);
}
.app-metric-icon.tone-brand {
  background: var(--color-brand-50);
  color: var(--color-brand-600);
}
.app-metric-icon.tone-info {
  background: var(--color-info-50);
  color: var(--color-info-600);
}

.app-metric-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.app-metric-hint,
.app-metric-meta {
  color: var(--color-neutral-500);
  font-size: 11px;
  line-height: 1.3;
}

.app-metric-meta {
  background: var(--color-neutral-100);
  border-radius: 100px;
  font-weight: 600;
  padding: 2px 8px;
  white-space: nowrap;
}

.app-metric-trend-up {
  color: var(--color-success-600);
  font-size: 12px;
  font-weight: 600;
}
.app-metric-trend-down {
  color: var(--color-danger-600);
  font-size: 12px;
  font-weight: 600;
}

/* ─── Hub Card Grid ──────────────────────────────────────────────────────── */
.app-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.app-hub-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--color-neutral-700) !important;
  text-decoration: none;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    border-color 0.2s;
}

.app-hub-card:hover {
  transform: translateY(-1px);
  border-color: var(--color-brand-600);
  box-shadow: var(--shadow-md);
}

.app-hub-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.app-hub-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--color-brand-50);
  color: var(--color-brand-600);
  font-size: 18px;
}

.app-hub-meta {
  color: var(--color-neutral-500);
  background: var(--color-neutral-100);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
}

.app-hub-title {
  color: var(--color-neutral-900);
  font-weight: 600;
  font-size: 15px;
}

.app-hub-description {
  color: var(--color-neutral-500);
  font-size: 13px;
  line-height: 1.5;
  margin-top: var(--space-1);
}

.app-hub-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-1) var(--space-3);
  margin-top: var(--space-2);
}

.app-hub-highlights span {
  color: var(--color-neutral-500);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.app-hub-highlights li {
  color: var(--color-neutral-500);
  font-size: 12px;
}

.app-hub-highlights span::before {
  content: "•";
  color: var(--color-brand-500);
}

.app-hub-action {
  color: var(--color-brand-600);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-default);
}

.app-hub-action:hover {
  text-decoration: underline;
}

/* ─── Command Strip ──────────────────────────────────────────────────────── */
.app-command-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.app-command-item {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-xs);
}

.app-command-label {
  color: var(--color-neutral-500);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-command-value {
  color: var(--color-neutral-900);
  font-weight: 600;
  font-size: 15px;
  margin-top: var(--space-1);
}

/* ─── Empty State ────────────────────────────────────────────────────────── */
.app-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px var(--space-4);
  color: var(--color-neutral-500);
}

.app-empty-state .empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-neutral-100);
  color: var(--color-neutral-400);
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: var(--space-4);
}

.app-empty-state .empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-neutral-700);
  margin-bottom: var(--space-2);
}

.app-empty-state .empty-sub {
  font-size: 13px;
  color: var(--color-neutral-500);
  margin-bottom: var(--space-5);
}

/* ─── Status Badges ──────────────────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 var(--space-2);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.status-badge-success {
  background: var(--color-success-50);
  color: var(--color-success-600);
}
.status-badge-warning {
  background: var(--color-warning-50);
  color: var(--color-warning-600);
}
.status-badge-danger {
  background: var(--color-danger-50);
  color: var(--color-danger-600);
}
.status-badge-info {
  background: var(--color-info-50);
  color: var(--color-info-600);
}
.status-badge-neutral {
  background: var(--color-neutral-100);
  color: var(--color-neutral-700);
}

/* Legacy alias */
.app-status-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 var(--space-2);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  background: var(--color-neutral-100) !important;
  color: var(--color-neutral-700) !important;
  border: none !important;
}

/* ─── Pipeline / Kanban ──────────────────────────────────────────────────── */
.pipeline-column {
  background: var(--color-neutral-50);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  min-height: 220px;
}

.pipeline-column-title {
  color: var(--color-neutral-700);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: var(--space-3);
}

/* ─── Dispatch Board ─────────────────────────────────────────────────────── */
.dispatch-board-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  align-items: start;
}

.dispatch-queue,
.dispatch-grid-wrap,
.dispatch-drawer {
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Remove styling for map view */
.dispatch-grid-wrap:has(.dispatch-map-grid) {
  border: none;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.dispatch-queue {
  min-height: 580px;
  padding: var(--space-3);
}

.dispatch-pane-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.dispatch-card-list {
  display: grid;
  gap: var(--space-2);
}

.dispatch-grid-wrap {
  overflow: auto;
}

.dispatch-grid {
  display: grid;
  min-width: 760px;
}

.dispatch-grid-corner,
.dispatch-lane-head,
.dispatch-time-label,
.dispatch-slot {
  border-right: 1px solid var(--color-neutral-200);
  border-bottom: 1px solid var(--color-neutral-200);
}

.dispatch-grid-corner,
.dispatch-lane-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-muted);
  padding: var(--space-2) var(--space-3);
  font-size: 12px;
  font-weight: 600;
}

.dispatch-time-label {
  background: var(--color-neutral-50);
  color: var(--color-neutral-500);
  font-size: 11px;
  font-weight: 600;
  padding: var(--space-2) var(--space-3);
}

.dispatch-slot {
  min-height: 92px;
  padding: var(--space-1);
  background: var(--surface-card);
}

.dispatch-slot.drag-over {
  outline: 2px solid var(--color-info-600);
  outline-offset: -2px;
  background: var(--color-info-50);
}

.dispatch-week-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.dispatch-week-mode {
  border: 0;
  background: transparent;
  color: var(--color-neutral-600);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.dispatch-week-mode.active {
  background: var(--surface-card);
  color: var(--color-neutral-900);
  box-shadow: var(--shadow-xs);
}

.dispatch-tech-time-grid {
  --dispatch-header-px: 52px;
  --dispatch-hour-px: 96px;
  --dispatch-time-col-px: 74px;
  display: grid;
  grid-template-columns: var(--dispatch-time-col-px) repeat(var(--dispatch-lane-count), minmax(190px, 1fr));
  grid-template-rows: var(--dispatch-header-px) repeat(var(--dispatch-hour-count), var(--dispatch-hour-px));
  min-width: max(860px, calc(var(--dispatch-time-col-px) + (var(--dispatch-lane-count) * 190px)));
  position: relative;
}

.dispatch-week-time-grid {
  grid-template-columns: var(--dispatch-time-col-px) repeat(7, minmax(160px, 1fr));
  min-width: max(1194px, calc(var(--dispatch-time-col-px) + (7 * 160px)));
}

.dispatch-tech-time-corner,
.dispatch-tech-time-head,
.dispatch-tech-time-label,
.dispatch-tech-time-slot {
  border-right: 1px solid var(--color-neutral-200);
  border-bottom: 1px solid var(--color-neutral-200);
  min-height: 0;
}

.dispatch-tech-time-corner,
.dispatch-tech-time-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface-muted);
}

.dispatch-tech-time-corner {
  left: 0;
  z-index: 6;
}

.dispatch-tech-time-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  gap: 2px 8px;
  padding: 8px 10px;
  font-size: 12px;
}

.dispatch-week-time-head {
  grid-template-columns: 1fr;
  gap: 2px;
}

.dispatch-week-time-head strong {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.dispatch-week-time-head .dispatch-day-revenue {
  display: inline;
  margin-top: 0;
  white-space: nowrap;
}

.dispatch-tech-time-head strong,
.dispatch-capacity-tech strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-tech-time-head em,
.dispatch-capacity-tech em {
  grid-column: 2;
  color: var(--color-neutral-500);
  font-style: normal;
  font-size: 11px;
}

.dispatch-tech-color {
  width: 10px;
  height: 10px;
  margin-top: 3px;
  border-radius: 999px;
  background: var(--tech-color);
}

.dispatch-tech-time-label {
  position: sticky;
  left: 0;
  z-index: 4;
  background: var(--color-neutral-50);
  color: var(--color-neutral-500);
  font-size: 11px;
  font-weight: 700;
  padding: 8px;
}

.dispatch-tech-time-slot {
  position: relative;
  background: var(--surface-card);
}

.dispatch-tech-time-slot.dispatch-office-hours-hidden {
  background: var(--color-neutral-100);
  cursor: default;
  pointer-events: none;
}

.dispatch-tech-time-slot.drag-over,
.dispatch-capacity-cell.drag-over {
  outline: 2px solid var(--color-info-600);
  outline-offset: -2px;
  background: var(--color-info-50);
}

.dispatch-tech-time-slot.selecting::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: var(--selection-top, 0);
  height: var(--selection-height, 28px);
  border: 1px solid var(--color-info-600);
  background: rgba(37, 99, 235, 0.12);
  border-radius: 6px;
  pointer-events: none;
}

.dispatch-week-time-slot {
  cursor: crosshair;
}

.dispatch-tech-time-lane {
  align-self: start;
  height: calc(var(--dispatch-hour-count) * var(--dispatch-hour-px));
  left: calc(var(--dispatch-time-col-px) + (var(--dispatch-lane-index) * ((100% - var(--dispatch-time-col-px)) / var(--dispatch-lane-count))));
  min-height: 0;
  position: absolute;
  pointer-events: none;
  top: var(--dispatch-header-px);
  width: calc((100% - var(--dispatch-time-col-px)) / var(--dispatch-lane-count));
}

.dispatch-appointment-block {
  position: absolute;
  z-index: 3;
  overflow: hidden;
  pointer-events: auto;
}

.dispatch-appointment-block.density-timeline {
  align-content: start;
  padding: 6px 8px;
}

.dispatch-appointment-block .visit-card-bottom {
  display: none;
}

.dispatch-week-capacity-grid {
  display: grid;
  grid-template-columns: minmax(180px, 220px) repeat(7, minmax(150px, 1fr));
  min-width: 1180px;
}

.dispatch-capacity-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-right: 1px solid var(--color-neutral-200);
  border-bottom: 1px solid var(--color-neutral-200);
  background: var(--surface-muted);
  font-size: 12px;
}

.dispatch-capacity-tech-head {
  left: 0;
  z-index: 4;
}

.dispatch-capacity-row {
  display: contents;
}

.dispatch-capacity-tech {
  position: sticky;
  left: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: 2px 8px;
  min-height: 112px;
  padding: 10px;
  border-right: 1px solid var(--color-neutral-200);
  border-bottom: 1px solid var(--color-neutral-200);
  background: var(--color-neutral-50);
}

.dispatch-capacity-cell {
  min-height: 112px;
  padding: 6px;
  border-right: 1px solid var(--color-neutral-200);
  border-bottom: 1px solid var(--color-neutral-200);
  background: var(--surface-card);
  display: grid;
  align-content: start;
  gap: 6px;
}

.dispatch-visit-card {
  width: 100%;
  display: grid;
  gap: 2px;
  text-align: left;
  border: 1px solid var(--border-default);
  border-left: 4px solid var(--color-neutral-400);
  background: var(--surface-card);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  color: var(--color-neutral-700);
  transition: border-color 0.15s;
}

.dispatch-visit-card:hover {
  border-color: var(--border-strong);
}

.dispatch-visit-card .visit-time {
  color: var(--color-neutral-700);
  font-size: 11px;
  font-weight: 600;
}

.dispatch-visit-card .visit-meta {
  color: var(--color-neutral-500);
  font-size: 11px;
}

.dispatch-visit-card .visit-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.dispatch-visit-card .visit-flags em {
  background: var(--color-warning-50);
  color: var(--color-warning-600);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-style: normal;
  padding: 1px 4px;
}

.dispatch-visit-card.priority-high,
.dispatch-visit-card.priority-urgent {
  border-left-color: var(--color-danger-600);
}
.dispatch-visit-card.priority-normal {
  border-left-color: var(--color-info-600);
}
.dispatch-visit-card.priority-low {
  border-left-color: var(--color-neutral-400);
}

.dispatch-drawer {
  position: fixed;
  right: 18px;
  top: 80px;
  bottom: 18px;
  width: min(380px, calc(100vw - 24px));
  padding: var(--space-4);
  overflow: auto;
  transform: translateX(calc(100% + 28px));
  transition: transform 0.18s ease;
  z-index: 1030;
}

.dispatch-drawer.open {
  transform: translateX(0);
}

.dispatch-quick-drawer {
  top: calc(var(--topbar-h) + 20px);
  right: 16px;
  bottom: 16px;
  width: min(390px, calc(100vw - 24px));
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.dispatch-quick-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-default);
}

.dispatch-quick-eyebrow,
.dispatch-quick-section-title {
  color: var(--color-neutral-400);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.dispatch-quick-head h2 {
  margin: 3px 0 0;
  color: var(--color-neutral-900);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.dispatch-quick-summary {
  margin-top: 3px;
  color: var(--color-neutral-500);
  font-size: 12px;
  line-height: 1.35;
}

.dispatch-quick-close {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  color: var(--color-neutral-500);
}

.dispatch-quick-close:hover {
  background: var(--surface-muted);
  color: var(--color-neutral-900);
}

.dispatch-quick-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  overflow: hidden;
}

/* Tab bar */
.dispatch-tab-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: var(--space-1) var(--space-3);
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border-default);
  flex-shrink: 0;
}

.dispatch-tab {
  padding: 6px var(--space-2);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-neutral-500);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.dispatch-tab:hover:not(.active) {
  background: var(--color-neutral-200);
  color: var(--color-neutral-700);
}

.dispatch-tab.active {
  background: var(--surface-card);
  color: var(--color-neutral-900);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Tab content area — scrollable */
.dispatch-tab-content {
  flex: 1 1 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.dispatch-tab-panel {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

/* Footer — pinned, never scrolls */
.dispatch-drawer-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border-default);
}

.dispatch-quick-section {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-default);
}

.dispatch-quick-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
}

.dispatch-quick-field {
  display: grid;
  gap: var(--space-1);
  margin: 0;
}

.dispatch-quick-field > span:not(.visually-hidden) {
  color: var(--color-neutral-500);
  font-size: 13px;
  font-weight: 500;
}

.dispatch-quick-drawer .form-control,
.dispatch-quick-drawer .form-select {
  width: 100%;
  min-width: 0;
  height: 40px;
  border-color: var(--border-default);
  border-radius: var(--radius-md);
  font-size: 14px;
}

.dispatch-quick-drawer textarea.form-control {
  min-height: 60px;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  resize: vertical;
}

.dispatch-quick-drawer textarea::placeholder {
  color: var(--color-neutral-500);
}

.dispatch-quick-flags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  min-height: 0;
}

.dispatch-quick-flags:empty {
  display: none;
}

.dispatch-quick-flags .badge {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}

.dispatch-quick-actions {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: 1fr;
}

.dispatch-status-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.dispatch-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 40px;
  padding: 0 var(--space-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  color: var(--color-neutral-700);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.dispatch-action-button:hover {
  text-decoration: none;
}

.dispatch-action-button i {
  font-size: 12px;
}

.dispatch-action-primary {
  border-color: var(--color-brand-600);
  background: var(--color-brand-600);
  color: #fff;
}

.dispatch-action-primary:hover {
  background: #4338ca;
  border-color: #4338ca;
  color: #fff;
}

.dispatch-action-soft-primary {
  border-color: transparent;
  background: #eef2ff;
  color: #3730a3;
}

.dispatch-action-soft-primary:hover {
  background: #e0e7ff;
  color: #312e81;
}

.dispatch-action-info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.dispatch-action-info:hover {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1e40af;
}

.dispatch-action-teal {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.dispatch-action-teal:hover {
  border-color: #6ee7b7;
  background: #d1fae5;
  color: #065f46;
}

.dispatch-action-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--color-success-600);
}

.dispatch-action-success:hover {
  border-color: #86efac;
  background: #dcfce7;
  color: #15803d;
}

.dispatch-action-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.dispatch-action-warning:hover {
  border-color: #fcd34d;
  background: #fef3c7;
  color: #92400e;
}

.dispatch-action-muted {
  background: #f8f7f4;
  color: var(--color-neutral-500);
}

.dispatch-action-muted:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
  color: var(--color-neutral-700);
}

.dispatch-action-neutral {
  background: #f8f7f4;
  color: var(--color-neutral-700);
}

.dispatch-action-neutral:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
  color: var(--color-neutral-900);
}

.dispatch-action-danger {
  border-color: transparent;
  background: #fef2f2;
  color: #b91c1c;
}

.dispatch-action-danger:hover {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 575px) {
  .dispatch-quick-drawer {
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
  }

  .dispatch-quick-grid,
  .dispatch-status-actions {
    grid-template-columns: 1fr;
  }
}

/* ─── Quick Drawer: compact facts grid ──────────────────────────────────────── */
.dispatch-quick-facts {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 3px var(--space-2);
  margin: 0;
  font-size: 12px;
}

.dispatch-quick-facts dt {
  color: var(--color-neutral-400);
  font-weight: 600;
  white-space: nowrap;
}

.dispatch-quick-facts dd {
  margin: 0;
  color: var(--color-neutral-700);
  overflow-wrap: anywhere;
}

.dispatch-quick-facts-location {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-default);
}

/* 2-column grid for paired fields */
.dispatch-quick-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}

/* Compact inline map button */
.dispatch-map-btn {
  width: auto;
  align-self: start;
  padding: var(--space-1) var(--space-2);
  min-height: 26px;
  font-size: 11px;
  margin-top: var(--space-2);
}

/* Status button selected/pending state */
.dispatch-status-btn.is-status-selected {
  filter: brightness(0.78) saturate(1.3);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.18);
}

/* Actions section gap */
.dispatch-quick-actions-section {
  gap: var(--space-2) !important;
}

/* ─── Report Panels ──────────────────────────────────────────────────────── */
.report-filter-bar,
.report-panel {
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
}

.report-panel h2 {
  color: var(--color-neutral-900);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 var(--space-3);
}

.report-bar-chart {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(46px, 1fr));
  min-height: 220px;
  padding-top: 4px;
}

.report-bar-item {
  align-items: stretch;
  display: grid;
  gap: 6px;
  grid-template-rows: auto minmax(128px, 1fr) auto;
  min-width: 0;
}

.report-bar-column {
  align-items: end;
  background: linear-gradient(to top, var(--color-neutral-100), transparent);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  min-height: 128px;
  overflow: hidden;
}

.report-bar-fill {
  background: var(--color-brand-500, var(--color-brand-600));
  border-radius: 6px 6px 0 0;
  min-height: 0;
  transition: height 0.16s ease;
  width: 100%;
}

.report-bar-label,
.report-bar-value {
  color: var(--color-neutral-700);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
}

.report-bar-label {
  color: var(--color-neutral-500);
  min-height: 28px;
  text-transform: uppercase;
}

.report-chart-empty {
  align-items: center;
  color: var(--color-neutral-500);
  display: flex;
  font-size: 13px;
  justify-content: center;
  min-height: 180px;
  text-align: center;
}

/* ─── Auth Shell ─────────────────────────────────────────────────────────── */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-8) var(--space-4);
  background: var(--surface-page);
}

.auth-card {
  width: min(100%, 420px);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.auth-brand {
  padding: var(--space-6) var(--space-6) var(--space-5);
  border-bottom: 1px solid var(--border-default);
  background: var(--surface-muted);
}

.auth-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--color-brand-600);
  margin-bottom: var(--space-4);
  font-size: 20px;
}

.auth-brand h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--color-neutral-900);
}

.auth-brand p {
  color: var(--color-neutral-500);
  margin: var(--space-1) 0 0;
  font-size: 14px;
}

.auth-form {
  padding: var(--space-6);
}

.auth-form .btn {
  min-height: 40px;
  border-radius: var(--radius-md);
  font-weight: 600;
}

/* ─── Confirm Dialog ─────────────────────────────────────────────────────── */
.app-confirm-dialog {
  --bs-modal-width: min(92vw, 400px);
}

.app-confirm-dialog .modal-content {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.app-confirm-dialog .modal-header {
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-5) var(--space-3);
  border-bottom: none;
}

.app-confirm-dialog .modal-title {
  color: var(--color-neutral-900);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.app-confirm-dialog .app-confirm-kicker {
  color: var(--color-neutral-500);
  font-size: 13px;
  margin-top: var(--space-1);
}

.app-confirm-dialog .app-confirm-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.app-confirm-dialog .app-confirm-icon.icon-warning {
  background: var(--color-warning-50);
  color: var(--color-warning-600);
}

.app-confirm-dialog .app-confirm-icon.icon-danger {
  background: var(--color-danger-50);
  color: var(--color-danger-600);
}

.app-confirm-dialog .app-confirm-icon.icon-info {
  background: var(--color-info-50);
  color: var(--color-info-600);
}

.app-confirm-dialog .modal-body {
  color: var(--color-neutral-700);
  padding: 0 var(--space-5) var(--space-5) 76px;
  font-size: 14px;
}

.app-confirm-dialog .modal-footer {
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border-default);
}

.app-confirm-dialog .btn {
  min-width: 88px;
}

@media (max-width: 575px) {
  .app-confirm-dialog .modal-body {
    padding-left: var(--space-5);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PUBLIC PAGES  (Pay, Estimate viewer, status screens)
   ═══════════════════════════════════════════════════════════════════════════ */

.public-card {
  width: min(100%, 480px);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.public-card-wide {
  width: min(100%, 880px);
}

/* Header bar inside a public card */
.public-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border-default);
}

.public-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--color-brand-600);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 17px;
  flex-shrink: 0;
  margin-top: 2px;
}

.public-card-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-neutral-500);
  margin-bottom: var(--space-1);
}

.public-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-neutral-900);
  line-height: 1.25;
}

.public-card-meta {
  font-size: 13px;
  color: var(--color-neutral-500);
  margin-top: 2px;
}

/* Sections with dividers */
.public-card-section {
  border-bottom: 1px solid var(--border-default);
}

/* Body padding */
.public-card-body {
  padding: var(--space-5) var(--space-6);
}

/* Footer (terms, actions) */
.public-card-footer {
  padding: var(--space-5) var(--space-6);
  background: var(--surface-muted);
  border-top: 1px solid var(--border-default);
}

/* Section heading label */
.public-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-neutral-500);
  margin-bottom: var(--space-2);
}

/* Balance row */
.public-balance-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-default);
}

.public-balance-label {
  font-size: 14px;
  color: var(--color-neutral-700);
  font-weight: 500;
}

.public-balance-amount {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-neutral-900);
}

/* Inline alert strip */
.public-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: var(--space-4);
}

.public-alert-danger {
  background: var(--color-danger-50);
  color: var(--color-danger-600);
  border-left: 3px solid var(--color-danger-600);
}

.public-alert-warning {
  background: var(--color-warning-50);
  color: var(--color-warning-600);
  border-left: 3px solid var(--color-warning-600);
}

/* Totals grid */
.public-totals-grid {
  display: grid;
  gap: var(--space-2);
  max-width: 320px;
  margin-left: auto;
}

.public-totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--color-neutral-700);
}

.public-totals-divider {
  height: 1px;
  background: var(--border-default);
  margin: var(--space-1) 0;
}

.public-totals-grand {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-neutral-900);
}

.public-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: 13px;
  color: var(--color-neutral-500);
}

.public-muted-copy {
  color: var(--color-neutral-500);
  font-size: 14px;
  line-height: 1.55;
}

/* Status result screens (success / error / warning) */
.public-status-block {
  padding: var(--space-10) var(--space-8);
  text-align: center;
}

.public-status-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  margin: 0 auto var(--space-4);
  flex-shrink: 0;
}

.public-status-icon.icon-success {
  background: var(--color-success-50);
  color: var(--color-success-600);
}

.public-status-icon.icon-danger {
  background: var(--color-danger-50);
  color: var(--color-danger-600);
}

.public-status-icon.icon-warning {
  background: var(--color-warning-50);
  color: var(--color-warning-600);
}

.public-status-icon.icon-neutral {
  background: var(--color-neutral-100);
  color: var(--color-neutral-600);
}

.public-status-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-neutral-900);
  margin-bottom: var(--space-2);
}

.public-status-desc {
  font-size: 14px;
  color: var(--color-neutral-500);
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Public form controls */
.public-card .form-control,
.public-card .form-select {
  height: 40px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 14px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.public-card .form-control:focus,
.public-card .form-select:focus {
  border-color: var(--color-brand-600);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  outline: none;
}

.public-card .form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-neutral-700);
  margin-bottom: var(--space-1);
}

.public-card .input-group-text {
  background: var(--surface-muted);
  border-color: var(--border-default);
  color: var(--color-neutral-500);
}

/* Public page table override */
.public-card .app-data-table thead th {
  padding: 10px var(--space-6);
}

.public-card .app-data-table tbody td {
  padding: 10px var(--space-6);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PHASE 5 — SETTINGS LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.settings-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-6);
  align-items: start;
}

.settings-nav {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-2) 0;
  position: sticky;
  top: calc(var(--topbar-h) + var(--space-4));
}

.settings-nav-section {
  padding: var(--space-3) var(--space-4) var(--space-1);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-neutral-400);
}

.settings-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  font-size: 14px;
  color: var(--color-neutral-600);
  text-decoration: none;
  border-radius: 0;
  transition:
    background 0.12s,
    color 0.12s;
}

.settings-nav-link i {
  width: 16px;
  text-align: center;
  color: var(--color-neutral-400);
  transition: color 0.12s;
}

.settings-nav-link:hover {
  background: var(--surface-muted);
  color: var(--color-neutral-900);
}

.settings-nav-link:hover i {
  color: var(--color-neutral-600);
}

.settings-nav-link.active {
  background: var(--color-brand-50);
  color: var(--color-brand-600);
  font-weight: 600;
}

.settings-nav-link.active i {
  color: var(--color-brand-600);
}

.settings-content {
  display: grid;
  gap: var(--space-5);
}

.settings-section {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.settings-section-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-default);
  background: var(--surface-muted);
}

.settings-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-neutral-900);
  margin: 0;
}

.settings-section-desc {
  font-size: 13px;
  color: var(--color-neutral-500);
  margin-top: var(--space-1);
}

.settings-section-body {
  padding: var(--space-5);
}

.settings-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-8);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-default);
}

.settings-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.settings-row-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-neutral-900);
  flex: 0 0 220px;
}

.settings-row-hint {
  font-size: 13px;
  color: var(--color-neutral-500);
  margin-top: var(--space-1);
}

.settings-row-control {
  flex: 1;
}

@media (max-width: 767px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    padding: var(--space-2);
  }

  .settings-nav-link {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
  }

  .settings-nav-section {
    display: none;
  }

  .settings-row {
    flex-direction: column;
    gap: var(--space-3);
  }

  .settings-row-label {
    flex: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PHASE 6 — POLISH: TRANSITIONS, HOVER STATES, RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

/* Sidebar nav link smooth transitions */
.dispatch-shell .sidebar .nav-link {
  transition:
    background 0.12s ease,
    color 0.12s ease,
    padding-left 0.12s ease;
}

.dispatch-shell .sidebar .nav-link:hover .link-title {
  color: var(--sidebar-text-active);
}

/* Hub card hover lift */
.app-hub-card {
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease,
    border-color 0.18s ease;
}

.app-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-brand-300, #a5b4fc);
  text-decoration: none;
}

/* Metric card hover lift */
.app-metric-card {
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.app-metric-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Data table row hover */
.app-data-table tbody tr {
  transition: background 0.1s;
}

/* Status badge appear */
.status-badge {
  transition: opacity 0.15s;
}

/* Topbar avatar */
.topbar-avatar-circle {
  transition: box-shadow 0.15s;
}

.topbar-avatar-circle:hover {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Public card hover (estimate viewer) */
.public-card {
  transition: box-shadow 0.18s ease;
}

/* ─── Responsive: Main layout ────────────────────────────────────────────── */

@media (max-width: 991px) {
  .dispatch-shell {
    grid-template-columns: 1fr;
  }

  .dispatch-shell .sidebar {
    display: none;
  }

  .dispatch-shell .topbar {
    grid-column: 1;
  }

  .dispatch-shell .page-content {
    grid-column: 1;
  }
}

@media (max-width: 767px) {
  .app-hub-grid {
    grid-template-columns: 1fr;
  }

  .app-metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .app-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .app-page-actions {
    width: 100%;
  }

  .app-filter-bar {
    height: auto;
    flex-wrap: nowrap;
    padding: var(--space-2) var(--space-3);
    gap: var(--space-2);
  }

  .app-filter-bar .filter-search {
    min-width: 0;
    width: auto;
    padding-right: 0;
  }

  .app-filter-bar .filter-actions {
    width: auto;
    padding-left: 0;
  }
}

@media (max-width: 575px) {
  .app-metric-grid {
    grid-template-columns: 1fr;
  }

  .public-card-header {
    flex-wrap: wrap;
  }

  .public-status-block {
    padding: var(--space-8) var(--space-5);
  }

  .public-card-body,
  .public-card-footer {
    padding: var(--space-4);
  }

  .public-totals-grid {
    max-width: 100%;
  }

  .auth-shell {
    padding: var(--space-4) var(--space-3);
  }
}

/* ─── List Group ─────────────────────────────────────────────────────────── */
.dispatch-shell .list-group,
.dispatch-auth .list-group {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.dispatch-shell .list-group-item,
.dispatch-auth .list-group-item {
  border-color: var(--border-default);
  color: var(--color-neutral-700);
  padding: var(--space-3) var(--space-4);
}

.dispatch-shell .list-group-item-action:hover {
  background: var(--color-neutral-50);
}

/* ─── Alerts ─────────────────────────────────────────────────────────────── */
.dispatch-shell .alert:empty,
.dispatch-auth .alert:empty {
  display: none;
}

/* ─── Admin / Role pickers ───────────────────────────────────────────────── */
.user-create-form .form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 100%;
}

.user-role-select {
  min-height: 10.5rem;
}

.user-branch-check {
  margin-top: 1.55rem;
}

.user-state-form {
  width: 100%;
  max-width: 16rem;
}

.role-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: var(--space-3);
}

.role-picker-item {
  display: block;
  margin: 0;
  position: relative;
}

.role-picker-input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.role-picker-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-height: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}

.role-picker-input:checked + .role-picker-card {
  border-color: var(--color-brand-600);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  transform: translateY(-1px);
}

.role-picker-input:focus-visible + .role-picker-card {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.role-picker-name {
  color: var(--color-neutral-900);
  font-weight: 600;
}

.role-picker-hint {
  color: var(--color-neutral-500);
  font-size: 12px;
  line-height: 1.3;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .app-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-hub-grid,
  .app-command-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dispatch-queue {
    min-height: 0;
  }

  .report-bar-chart {
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(38px, 1fr));
    min-height: 180px;
  }

  .report-bar-item {
    grid-template-rows: auto minmax(96px, 1fr) auto;
  }

  .report-bar-column {
    min-height: 96px;
  }
}

@media (max-width: 767px) {
  .app-page-header {
    flex-direction: column;
  }

  .app-page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .app-metric-grid {
    grid-template-columns: 1fr;
  }

  .app-hub-grid,
  .app-command-strip {
    grid-template-columns: 1fr;
  }
}

/* ─── System-wide soft UI polish ─────────────────────────────────────────── */
.dispatch-shell,
.dispatch-auth {
  background: var(--surface-page);
  color: var(--color-neutral-700);
}

.dispatch-shell i,
.dispatch-auth i {
  color: inherit;
}

.dispatch-shell .text-primary,
.dispatch-auth .text-primary {
  color: var(--color-brand-600) !important;
}

.dispatch-shell .text-secondary,
.dispatch-shell .text-muted,
.dispatch-auth .text-secondary,
.dispatch-auth .text-muted {
  color: var(--color-neutral-500) !important;
}

.dispatch-shell .bg-white,
.dispatch-auth .bg-white,
.dispatch-shell .bg-light,
.dispatch-auth .bg-light {
  background-color: var(--surface-card) !important;
}

.app-icon,
.app-icon-soft,
.dispatch-shell
  .page-content
  .btn:not(.btn-primary):not(.btn-success):not(.btn-danger)
  i,
.dispatch-auth .btn:not(.btn-primary):not(.btn-success):not(.btn-danger) i {
  color: var(--color-neutral-500);
}

.app-icon,
.app-icon-soft {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface-muted);
  border: 1px solid var(--border-default);
}

.app-icon-primary {
  background: var(--color-brand-50);
  border-color: var(--color-brand-100);
  color: var(--color-brand-600);
}

.app-icon-success {
  background: var(--color-success-50);
  border-color: #d8f5e2;
  color: var(--color-success-600);
}

.app-icon-warning {
  background: var(--color-warning-50);
  border-color: #f8e9bd;
  color: var(--color-warning-600);
}

.app-icon-danger {
  background: var(--color-danger-50);
  border-color: #f7d7d7;
  color: var(--color-danger-600);
}

.app-icon-info {
  background: var(--color-info-50);
  border-color: #d6e6ff;
  color: var(--color-info-600);
}

.dispatch-shell .page-content .card,
.dispatch-shell .page-content .app-panel,
.dispatch-shell .page-content .data-table-wrap,
.dispatch-shell .page-content .report-panel,
.dispatch-shell .page-content .dispatch-summary-panel,
.dispatch-shell .page-content .dispatch-grid-wrap,
.dispatch-shell .page-content .dispatch-drawer,
.dispatch-auth .auth-card,
.dispatch-auth .list-group,
.public-card {
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-xl) !important;
  background: var(--surface-card) !important;
  box-shadow: var(--shadow-sm) !important;
}

.dispatch-shell .page-content .card-header,
.dispatch-shell .page-content .modal-header,
.dispatch-shell .page-content .data-table-header,
.dispatch-auth .auth-card-badge,
.public-card-header,
.public-card-footer {
  background: var(--surface-muted) !important;
  border-color: var(--border-default) !important;
  color: var(--color-neutral-900);
}

.dispatch-shell .modal-content,
.dispatch-auth .modal-content,
.app-confirm-dialog .modal-content {
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-lg) !important;
  overflow: hidden;
}

.user-edit-modal {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 2rem);
}

.user-edit-modal-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.user-edit-modal-form .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.user-edit-modal-form .modal-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border-default) !important;
  padding-top: 0.75rem !important;
}

.dispatch-shell .dropdown-menu,
.dispatch-auth .dropdown-menu,
.dispatch-shell .row-action-dropdown {
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 6px !important;
}

.dispatch-shell .dropdown-item,
.dispatch-auth .dropdown-item {
  border-radius: 10px;
  color: var(--color-neutral-600);
  font-weight: 500;
}

.dispatch-shell .dropdown-item:hover,
.dispatch-shell .dropdown-item:focus,
.dispatch-auth .dropdown-item:hover,
.dispatch-auth .dropdown-item:focus {
  background: var(--surface-muted);
  color: var(--color-neutral-900);
}

.dispatch-shell .dropdown-item.active,
.dispatch-shell .dropdown-item:active,
.dispatch-auth .dropdown-item.active,
.dispatch-auth .dropdown-item:active {
  background: var(--color-brand-50);
  color: var(--color-brand-600);
}

.dispatch-shell .page-content .btn,
.dispatch-auth .btn,
.public-card .btn {
  min-height: 38px;
  border-radius: 13px;
  box-shadow: none !important;
  letter-spacing: 0;
}

.dispatch-shell .page-content .btn-primary,
.dispatch-auth .btn-primary,
.public-card .btn-primary {
  background: var(--color-brand-600) !important;
  border-color: var(--color-brand-600) !important;
}

.dispatch-shell .page-content .btn-primary:hover,
.dispatch-auth .btn-primary:hover,
.public-card .btn-primary:hover {
  background: #4f46e5 !important;
  border-color: #4f46e5 !important;
}

.dispatch-shell .page-content .btn-outline-primary,
.dispatch-shell .page-content .btn-outline-secondary,
.dispatch-shell .page-content .btn-secondary,
.dispatch-auth .btn-outline-primary,
.dispatch-auth .btn-outline-secondary,
.dispatch-auth .btn-secondary,
.public-card .btn-outline-primary,
.public-card .btn-outline-secondary,
.public-card .btn-secondary {
  background: var(--surface-card) !important;
  border-color: var(--border-default) !important;
  color: var(--color-neutral-700) !important;
}

.dispatch-shell .page-content .btn-outline-primary:hover,
.dispatch-shell .page-content .btn-outline-secondary:hover,
.dispatch-shell .page-content .btn-secondary:hover,
.dispatch-auth .btn-outline-primary:hover,
.dispatch-auth .btn-outline-secondary:hover,
.dispatch-auth .btn-secondary:hover,
.public-card .btn-outline-primary:hover,
.public-card .btn-outline-secondary:hover,
.public-card .btn-secondary:hover {
  background: var(--surface-muted) !important;
  border-color: var(--border-strong) !important;
  color: var(--color-neutral-900) !important;
}

.dispatch-shell .page-content .btn-link,
.dispatch-auth .btn-link,
.public-card .btn-link {
  color: var(--color-neutral-600);
  text-decoration: none;
}

.dispatch-shell .form-control,
.dispatch-shell .form-select,
.dispatch-auth .form-control,
.dispatch-auth .form-select,
.public-card .form-control,
.public-card .form-select {
  border-color: var(--border-default) !important;
  border-radius: var(--radius-md) !important;
  background-color: #fff !important;
  color: var(--color-neutral-900);
  box-shadow: none !important;
}

.dispatch-shell .form-control:focus,
.dispatch-shell .form-select:focus,
.dispatch-auth .form-control:focus,
.dispatch-auth .form-select:focus,
.public-card .form-control:focus,
.public-card .form-select:focus {
  border-color: var(--border-focus) !important;
  box-shadow: 0 0 0 4px rgba(91, 85, 245, 0.11) !important;
}

.dispatch-shell .input-group-text,
.dispatch-auth .input-group-text,
.public-card .input-group-text {
  background: var(--surface-muted) !important;
  border-color: var(--border-default) !important;
  color: var(--color-neutral-500) !important;
  border-radius: var(--radius-md);
}

.dispatch-shell .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--color-neutral-700);
}

.dispatch-shell .page-content .table thead th,
.dispatch-shell .page-content table thead.table-light th,
.public-card .table thead th {
  background: var(--surface-muted) !important;
  color: var(--color-neutral-500) !important;
  border-bottom: 1px solid var(--border-default) !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.dispatch-shell .table > :not(caption) > * > *,
.public-card .table > :not(caption) > * > * {
  border-bottom-color: var(--border-default);
}

.dispatch-shell .table-hover > tbody > tr:hover > *,
.dispatch-shell .table tbody tr:hover > *,
.public-card .table tbody tr:hover > * {
  background: var(--color-neutral-50);
}

.dispatch-shell .badge,
.dispatch-auth .badge,
.public-card .badge,
.status-badge {
  border-radius: var(--radius-pill) !important;
  border: 1px solid transparent;
  letter-spacing: 0;
}

.dispatch-shell .alert,
.dispatch-auth .alert,
.public-alert {
  border: 1px solid var(--border-default);
  border-left: 0;
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.dispatch-shell .nav-tabs {
  gap: 4px;
  border-bottom-color: var(--border-default);
}

.dispatch-shell .nav-tabs .nav-link {
  border-radius: 12px 12px 0 0;
  color: var(--color-neutral-500);
}

.dispatch-shell .nav-tabs .nav-link.active {
  background: var(--surface-card);
  color: var(--color-neutral-900);
}

.dispatch-shell .sidebar {
  border-right-color: var(--border-default);
  box-shadow: none;
}

.dispatch-shell .sidebar .sidebar-body .nav .nav-item .nav-link {
  border-radius: 12px;
  color: var(--sidebar-text);
}

.dispatch-shell
  .sidebar
  .sidebar-body
  .nav
  .nav-item
  .nav-link
  i:not(.submenu-caret) {
  color: #9aa3b2;
}

.dispatch-shell .sidebar .sidebar-body .nav .nav-item.active > .nav-link {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-text-active);
  box-shadow: inset 0 0 0 1px rgba(174, 184, 255, 0.45);
}

.dispatch-shell
  .sidebar
  .sidebar-body
  .nav
  .nav-item.active
  > .nav-link
  i:not(.submenu-caret) {
  color: var(--color-brand-600);
}

.dispatch-shell .topbar-action-link i,
.dispatch-shell .row-action-toggle i,
.app-muted-action i {
  color: var(--color-neutral-500) !important;
}

#quickCreateDd i { color: #2563eb !important; }
#softphoneToggle i { color: #16a34a !important; }
#topbarTasksDd i { color: #f59e0b !important; }
#topbarAlertsDd i { color: #dc2626 !important; }

.app-metric-card,
.app-hub-card {
  border-color: var(--border-default);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.app-metric-card:hover,
.app-hub-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.app-metric-icon,
.app-hub-icon,
.public-brand-mark,
.auth-brand-mark,
.auth-feature-icon,
.public-status-icon {
  border-radius: 8px;
  background: var(--color-brand-50);
  border: 1px solid var(--color-brand-100);
  color: var(--color-brand-600);
  box-shadow: none;
}

.app-metric-icon {
  height: 28px;
  width: 28px;
}

.app-metric-icon.tone-default,
.app-hub-icon {
  background: var(--surface-muted);
  border-color: var(--border-default);
  color: var(--color-neutral-500);
}

.app-metric-icon.tone-money,
.public-status-icon.icon-success {
  background: var(--color-success-50);
  border-color: #d8f5e2;
  color: var(--color-success-600);
}

.app-metric-icon.tone-brand {
  background: var(--color-brand-50);
  border-color: var(--color-brand-100);
  color: var(--color-brand-600);
}

.app-metric-icon.tone-warning,
.public-status-icon.icon-warning {
  background: var(--color-warning-50);
  border-color: #f8e9bd;
  color: var(--color-warning-600);
}

.app-metric-icon.tone-danger,
.public-status-icon.icon-danger {
  background: var(--color-danger-50);
  border-color: #f7d7d7;
  color: var(--color-danger-600);
}

.app-metric-icon.tone-info {
  background: var(--color-info-50);
  border-color: #d6e6ff;
  color: var(--color-info-600);
}

.public-status-icon.icon-neutral {
  background: var(--surface-muted);
  border-color: var(--border-default);
  color: var(--color-neutral-500);
}

.app-hub-action {
  color: var(--color-neutral-500) !important;
}

.app-hub-card:hover .app-hub-action {
  color: var(--color-brand-600) !important;
}

.public-card-wide {
  width: min(100%, 900px);
}

.public-card-header,
.public-card-footer {
  background: var(--surface-card) !important;
}

.public-alert-danger,
.public-alert-warning {
  border-left: 0;
}

.public-meta-row i {
  color: var(--color-neutral-500) !important;
}

.dispatch-auth .auth-panel-brand {
  background: var(--surface-card);
}

.dispatch-auth .auth-panel-brand::before {
  opacity: 0.35;
}

.dispatch-auth .auth-card,
.auth-card {
  border-radius: var(--radius-xl);
}

.dispatch-auth .auth-feature-icon {
  color: var(--color-neutral-500);
  background: var(--surface-muted);
  border-color: var(--border-default);
}

.dispatch-shell .dispatch-topbar .topbar-dropdown-menu {
  border-radius: 17px !important;
  padding: 0 !important;
  overflow: hidden;
}

.dispatch-shell .dispatch-topbar .topbar-dropdown-item {
  border-radius: 8px;
}

.dispatch-shell .dispatch-topbar .topbar-profile-action,
.dispatch-shell .dispatch-topbar .topbar-signout-action {
  border-radius: 0;
  color: #6b7280 !important;
}

.dispatch-shell .dispatch-topbar .topbar-profile-action:hover,
.dispatch-shell .dispatch-topbar .topbar-profile-action:focus,
.dispatch-shell .dispatch-topbar .topbar-signout-action:hover,
.dispatch-shell .dispatch-topbar .topbar-signout-action:focus {
  background: #f7f8fb;
  color: #6b7280 !important;
}

.dispatch-shell .dispatch-topbar .topbar-profile-icon {
  color: #7b8496 !important;
}

.dispatch-shell .dispatch-topbar .topbar-tenant-option.active {
  background: transparent;
  color: #4f46ff;
}

/* ─── Topbar task and alert feeds ────────────────────────────────────────── */
.dispatch-shell .dispatch-topbar .topbar-feed-menu {
  width: 360px;
  min-width: 360px;
  max-width: min(360px, calc(100vw - 24px));
  padding: 0 !important;
  border: 1px solid #eef1f6 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08) !important;
  overflow: hidden;
}

.dispatch-shell .dispatch-topbar .topbar-feed-head {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 12px 9px;
  background: #fff;
}

.dispatch-shell .dispatch-topbar .topbar-feed-title {
  color: #253044;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: 0;
}

.dispatch-shell .dispatch-topbar .topbar-feed-subtitle {
  color: #728096;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  margin-top: 4px;
}

.dispatch-shell .dispatch-topbar .topbar-feed-link {
  color: #625ff0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 9px;
  text-decoration: none;
  white-space: nowrap;
}

.dispatch-shell .dispatch-topbar .topbar-feed-link:hover,
.dispatch-shell .dispatch-topbar .topbar-feed-link:focus {
  color: #5551dc;
  text-decoration: none;
}

.dispatch-shell .dispatch-topbar .topbar-feed-divider {
  border-color: #eef1f6;
  margin: 0;
  opacity: 1;
}

.dispatch-shell .dispatch-topbar .topbar-feed-item {
  align-items: flex-start;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  min-height: 54px;
  padding: 9px 12px;
  border-radius: 0;
  color: #334155;
  text-decoration: none;
}

.dispatch-shell .dispatch-topbar .topbar-feed-item:hover,
.dispatch-shell .dispatch-topbar .topbar-feed-item:focus {
  background: #fafbfe;
  color: #253044;
  text-decoration: none;
}

.dispatch-shell .dispatch-topbar .topbar-feed-icon {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 32px;
  justify-content: center;
  margin-top: 1px;
  width: 32px;
  opacity: 0.92;
}

.dispatch-shell .dispatch-topbar .topbar-feed-icon i {
  font-size: 13px;
  line-height: 1;
}

.dispatch-shell .dispatch-topbar .topbar-feed-icon-task {
  background: #f6f7ff;
  border-color: #eef0ff;
  color: #6d6af2;
}

.dispatch-shell .dispatch-topbar .topbar-feed-icon-alert {
  background: #fff7f8;
  border-color: #ffedf1;
  color: #d95c75;
}

.dispatch-shell .dispatch-topbar .topbar-feed-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dispatch-shell .dispatch-topbar .topbar-feed-item-title {
  color: #253044;
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-shell .dispatch-topbar .topbar-feed-item-meta {
  color: #728096;
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-shell .dispatch-topbar .topbar-feed-empty {
  color: #728096;
  font-size: 13px;
  padding: 28px 12px;
  text-align: center;
}

.dispatch-shell .dispatch-topbar .topbar-feed-footer {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 42px;
  padding: 11px 12px;
  border-radius: 0;
  color: #625ff0;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.dispatch-shell .dispatch-topbar .topbar-feed-footer:hover,
.dispatch-shell .dispatch-topbar .topbar-feed-footer:focus {
  background: #fafbfe;
  color: #5551dc;
  text-decoration: none;
}
