/* FleetFlow AI — design tokens, base, components and page layouts. Tokens and values are documented in DESIGN_TOKENS.md. */

/* ==========================================================================
   FleetFlow AI — admin prototype
   Tokens measured from screenshots (see DESIGN_TOKENS.md)
   ========================================================================== */
:root {
  --ff-canvas: #f1f1ef;
  --ff-panel: #ffffff;
  --ff-surface: #f6f6f4;
  --ff-surface-2: #ebebe8;
  --ff-border: #e9e9e6;
  --ff-border-strong: #d7d7d3;
  --ff-ink: #111113;
  --ff-ink-2: #55565c;
  --ff-ink-3: #909097;
  --ff-purple: #6c3bff;
  --ff-purple-text: #5926f0;
  --ff-purple-deep: #4418c4;
  --ff-purple-soft: #9b7bff;
  --ff-purple-muted: #b69dff;
  --ff-purple-border: #cfbeff;
  --ff-lavender: #f4f0ff;
  --ff-ai-border: #e7deff;
  --ff-red: #f0484a;
  --ff-red-text: #c22326;
  --ff-red-soft: #fff0ef;
  --ff-amber: #f5a525;
  --ff-amber-text: #a86200;
  --ff-amber-soft: #fff6e5;
  --ff-green: #18a058;
  --ff-green-text: #0e7a42;
  --ff-green-soft: #e9f7ee;
  --ff-lime: #c4f03b;
  --ff-lime-text: #4a6601;
  --ff-lime-soft: #f2fbdd;
  --sidebar-w: 232px;
  --sidebar-w-collapsed: 72px;
  --panel-inset: 8px;
  --panel-pad: 28px;
  --gutter: 20px;
  --r-panel: 24px;
  --r-modal: 22px;
  --r-card: 20px;
  --r-table: 16px;
  --r-nav: 14px;
  --r-inner: 12px;
  --r-input: 10px;
  --r-tile: 8px;
  --sh-xs: 0 1px 2px rgba(17, 17, 19, .06);
  --sh-sm: 0 2px 8px rgba(17, 17, 19, .07);
  --sh-md: 0 8px 24px rgba(17, 17, 19, .10);
  --sh-lg: 0 24px 60px rgba(17, 17, 19, .18);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --bs-body-font-family: var(--font);
  --bs-body-color: var(--ff-ink);
  --bs-body-bg: var(--ff-canvas);
  --bs-border-color: var(--ff-border);
  --bs-link-color: var(--ff-purple-text);
  --bs-link-hover-color: var(--ff-purple-deep);
}
/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.45;
  color: var(--ff-ink);
  background: var(--ff-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "tnum" 0;
}
a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }
button { font-family: inherit; color: inherit; }
img { max-width: 100%; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12px; }
.ink { color: var(--ff-ink) !important; }
.ink-2 { color: var(--ff-ink-2) !important; }
.ink-3 { color: var(--ff-ink-3) !important; }
.t-purple { color: var(--ff-purple-text) !important; }
.t-red { color: var(--ff-red-text) !important; }
.t-amber { color: var(--ff-amber-text) !important; }
.t-green { color: var(--ff-green-text) !important; }
.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fs-11 { font-size: 11px !important; }
.fs-12 { font-size: 12px !important; }
.fs-13 { font-size: 13px !important; }
.fs-14 { font-size: 14px !important; }
.fs-15 { font-size: 15px !important; }
.fs-16 { font-size: 16px !important; }
.fs-18 { font-size: 18px !important; }
.fw-400 { font-weight: 400 !important; }
.micro {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--ff-ink-3);
}
.ph, .ph-fill, .ph-bold { line-height: 1; vertical-align: -0.125em; }
.gap-6 { gap: 6px !important; }
.gap-10 { gap: 10px !important; }
.gap-12 { gap: 12px !important; }
.gap-14 { gap: 14px !important; }
.gap-20 { gap: var(--gutter) !important; }
.mt-20 { margin-top: var(--gutter) !important; }
.mb-20 { margin-bottom: var(--gutter) !important; }
.min-w-0 { min-width: 0; }
.divider { height: 1px; background: var(--ff-border); border: 0; margin: 0; opacity: 1; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.sep-dot::before { content: "·"; margin: 0 4px; color: var(--ff-ink-3); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
::selection { background: rgba(108, 59, 255, .18); }
/* ==========================================================================
   App shell
   ========================================================================== */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  padding: 20px 14px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  z-index: 30;
  background: var(--ff-canvas);
}
.sidebar::-webkit-scrollbar { display: none; }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 0 2px 0 2px; margin-bottom: 3.5px; min-height: 40px; }
.sb-brand img { width: 40px; height: 40px; flex: none; }
.sb-brand-name { font-size: 17px; font-weight: 500; white-space: nowrap; }
.ai-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 6px;
  border-radius: 7px;
  background: var(--ff-purple);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}
.sb-group { font-size: 11px; font-weight: 500; text-transform: uppercase; color: var(--ff-ink-3); padding: 0 12px; margin: 11.5px 0 5px; white-space: nowrap; }
.sb-brand + .sb-group { margin-top: 0; }
.sb-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 12px;
  margin-bottom: 4px;
  border-radius: var(--r-nav);
  color: var(--ff-ink-2);
  font-size: 14px;
  white-space: nowrap;
}
.sb-link i { font-size: 20px; color: var(--ff-ink-3); width: 20px; text-align: center; flex: none; }
.sb-link:hover { background: rgba(255, 255, 255, .6); color: var(--ff-ink); }
.sb-link.active { background: #fff; color: var(--ff-ink); font-weight: 500; box-shadow: var(--sh-xs); }
.sb-link.active i { color: var(--ff-purple); }
.sb-label { flex: 1; min-width: 0; }
.sb-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: var(--ff-ink);
}
.sb-count.is-red { background: var(--ff-red); }
.sb-count.is-purple { background: linear-gradient(180deg, #8f6bff, var(--ff-purple)); }
.sb-value { font-size: 13px; color: var(--ff-ink-3); }
.sb-spacer { flex: 1 1 auto; min-height: 14px; }
.sb-bottom { margin-top: auto; padding-top: 14px; }
.sb-ask {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 12px 0 8px;
  margin: 6px 0 8px;
  border-radius: var(--r-nav);
  background: #fff;
  font-size: 14px;
  color: var(--ff-ink);
  white-space: nowrap;
  box-shadow: var(--sh-xs);
  border: 0;
  width: 100%;
  text-align: left;
}
.sb-ask img { width: 28px; height: 28px; flex: none; }
.sb-ask:hover { box-shadow: 0 0 0 1px var(--ff-purple-border), var(--sh-xs); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: var(--r-nav); white-space: nowrap; width: 100%; background: none; border: 0; text-align: left; }
.sb-user img { width: 36px; height: 36px; border-radius: 50%; flex: none; object-fit: cover; box-shadow: 0 0 0 2px #fff; }
.sb-user-name { font-size: 14px; font-weight: 500; line-height: 1.2; }
.sb-user-role { font-size: 12px; color: var(--ff-ink-3); line-height: 1.3; }
.sb-user:hover { background: rgba(255, 255, 255, .6); }
.sb-toggle {
  position: fixed;
  top: 29px;
  left: calc(var(--sidebar-w) - 11px);
  z-index: 40;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--ff-ink-2);
  box-shadow: 0 0 0 1px var(--ff-border), var(--sh-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.sb-toggle:hover { color: var(--ff-ink); }
.main-panel {
  position: relative;
  margin: var(--panel-inset) var(--panel-inset) var(--panel-inset) var(--sidebar-w);
  min-height: calc(100vh - 2 * var(--panel-inset));
  background: var(--ff-panel);
  border-radius: var(--r-panel);
  padding: calc(var(--panel-pad) - 4px) var(--panel-pad) var(--panel-pad);
}
/* collapsed rail */
.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); padding-left: 14px; padding-right: 14px; }
.sidebar-collapsed .main-panel { margin-left: var(--sidebar-w-collapsed); }
.sidebar-collapsed .sb-toggle { left: calc(var(--sidebar-w-collapsed) - 11px); transform: rotate(180deg); }
.sidebar-collapsed .sb-brand-name, .sidebar-collapsed .sb-brand .ai-chip,
.sidebar-collapsed .sb-label, .sidebar-collapsed .sb-value, .sidebar-collapsed .sb-ask span,
.sidebar-collapsed .sb-user > div { display: none; }
.sidebar-collapsed .sb-brand { padding: 0 2px; }
/* Collapsed group labels keep their height and show a short rule instead (S04). */
.sidebar-collapsed .sb-group { position: relative; color: transparent; overflow: hidden; }
.sidebar-collapsed .sb-group::before { content: ""; position: absolute; left: 12px; top: 5px; width: 20px; height: 1px; background: var(--ff-border-strong); }
.sidebar-collapsed .sb-link { width: 44px; padding: 0; justify-content: center; }
.sidebar-collapsed .sb-count {
  position: absolute;
  top: 4px;
  left: 28.5px;
  min-width: 22px;
  height: 12px;
  padding: 0 3px;
  font-size: 12.5px;
  line-height: 12px;
  border-radius: 6px;
}
.sidebar-collapsed .sb-ask { width: 44px; padding: 0; justify-content: center; background: #fff; }
.sidebar-collapsed .sb-ask img { width: 30px; height: 30px; }
.sidebar-collapsed .sb-user { padding: 4px; width: 44px; justify-content: center; }
/* mobile top bar */
.mobile-bar { display: none; }
/* ==========================================================================
   Page header
   ========================================================================== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.page-head-l { display: flex; align-items: center; gap: 14px; min-width: 0; }
.page-head.is-centered { align-items: center; }
.page-head.is-centered .page-head-r { padding-bottom: 0; }
.page-head-r { display: flex; align-items: center; gap: 12px; flex: none; padding-bottom: 1px; }
.page-head-r .seg-btn { padding: 0 16px; }
.page-head-r > [data-when], .page-head-r > [data-pause-wrap] { display: contents; }
.page-head-r .btn-ff { padding: 0 20px; font-size: 13.5px; }
.page-head-r .agent-toggle { padding: 0 17.5px 0 8px; font-size: 13.5px; }
.head-sep { flex: none; width: 1px; height: 24px; background: var(--ff-border); }
.page-head-r > .btn-icon + .dropdown { margin-left: -4px; }
.crumbs { font-size: 11px; font-weight: 500; text-transform: uppercase; color: var(--ff-ink-3); line-height: 16px; margin-bottom: 6px; white-space: nowrap; }
.crumbs a:hover { color: var(--ff-ink); }
.page-title { font-size: 40px; line-height: 44px; font-weight: 400; margin: 0; white-space: nowrap; }
.page-sub { font-size: 13px; color: var(--ff-ink-2); margin-top: 8px; }
.btn-back {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
  margin-bottom: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--ff-border-strong);
  font-size: 17px;
  color: var(--ff-ink);
}
.btn-back:hover { background: var(--ff-surface); }
.search-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  width: 286px;
  padding: 0 8px 0 14px;
  border-radius: 999px;
  background: var(--ff-surface);
  border: 0;
  color: var(--ff-ink-3);
  font-size: 13px;
  text-align: left;
}
.search-pill i { font-size: 16px; color: var(--ff-ink-2); }
.search-pill > span:not(.kbd) { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-pill:hover { background: var(--ff-surface-2); }
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  min-width: 30px;
  padding: 0 7px;
  border-radius: 7px;
  background: #fff;
  color: var(--ff-ink-2);
  font-size: 11px;
  font-weight: 500;
  box-shadow: 0 0 0 1px var(--ff-border);
  font-family: var(--font);
  white-space: nowrap;
}
.monitor-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 6px;
  border-radius: 999px;
  background: var(--ff-lavender);
  color: var(--ff-ink);
  font-size: 13px;
  white-space: nowrap;
  border: 0;
}
.monitor-pill img { width: 28px; height: 28px; }
.monitor-pill .sep { width: 1px; height: 14px; background: var(--ff-purple-border); }
.monitor-pill b { font-weight: 500; color: var(--ff-purple-text); }
.btn-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--ff-border-strong);
  color: var(--ff-ink);
  font-size: 17px;
}
.btn-icon:hover { background: var(--ff-surface); }
.btn-icon.sm { width: 32px; height: 32px; font-size: 15px; }
.btn-icon.xs { width: 28px; height: 28px; font-size: 14px; }
.btn-icon.ghost { border-color: transparent; background: transparent; }
.btn-icon.ghost:hover { background: var(--ff-surface); }
.btn-icon.dark { background: var(--ff-ink); color: #fff; border-color: var(--ff-ink); }
.notif-dot {
  position: absolute;
  top: -1px;
  right: -2px;
  min-width: 22px;
  height: 12px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--ff-red);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 12px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-ff {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}
.btn-ff i { font-size: 16px; }
.btn-primary-ff { background: var(--ff-purple); color: #fff; }
.btn-primary-ff:hover { background: #5d2bf5; color: #fff; }
.btn-primary-ff:disabled, .btn-primary-ff.disabled { background: var(--ff-purple-muted); color: #fff; cursor: default; }
.btn-dark-ff { background: var(--ff-ink); color: #fff; }
.btn-dark-ff:hover { background: #2a2a2e; color: #fff; }
.btn-light-ff { background: #fff; color: var(--ff-ink); border-color: var(--ff-border-strong); }
.btn-light-ff:hover { background: var(--ff-surface); color: var(--ff-ink); }
.btn-soft-ff { background: var(--ff-surface); color: var(--ff-ink); }
.btn-soft-ff:hover { background: var(--ff-surface-2); }
.btn-ghost-ff { background: transparent; color: var(--ff-ink-2); padding: 0 10px; }
.btn-ghost-ff:hover { color: var(--ff-ink); background: rgba(17, 17, 19, .04); }
.btn-danger-ff { background: #fff; color: var(--ff-red-text); border-color: var(--ff-border-strong); }
.btn-danger-ff:hover { background: var(--ff-red-soft); color: var(--ff-red-text); border-color: #f6c3c3; }
.btn-sm-ff { height: 32px; padding: 0 14px; font-size: 12px; gap: 6px; }
.btn-sm-ff i { font-size: 14px; }
.btn-xs-ff { height: 28px; padding: 0 12px; font-size: 12px; gap: 6px; }
.btn-xs-ff i { font-size: 13px; }
.link-ff { display: inline-flex; align-items: center; gap: 4px; color: var(--ff-purple-text); font-size: 12px; font-weight: 500; background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
.link-ff:hover { color: var(--ff-purple-deep); text-decoration: underline; text-underline-offset: 2px; }
.link-ff.dark { color: var(--ff-ink); }
.link-ff.muted { color: var(--ff-ink-2); }
/* ==========================================================================
   Badges, pills, chips
   ========================================================================== */
.delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  vertical-align: middle;
}
.delta.lime { background: var(--ff-lime); color: var(--ff-ink); }
.delta.grey { background: var(--ff-surface-2); color: var(--ff-ink-2); }
.delta.red { background: var(--ff-red-soft); color: var(--ff-red-text); }
.delta.purple { background: var(--ff-purple); color: #fff; }
.delta.amber { background: var(--ff-amber-soft); color: var(--ff-amber-text); }
.delta.green { background: var(--ff-green-soft); color: var(--ff-green-text); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1;
  vertical-align: middle;
}
.pill i { font-size: 12px; }
.pill .dot { width: 5px; height: 5px; }
.pill-purple { background: var(--ff-lavender); color: var(--ff-purple-text); }
.pill-violet { background: var(--ff-lavender); color: var(--ff-purple-deep); }
.pill-amber { background: var(--ff-amber-soft); color: var(--ff-amber-text); }
.pill-red { background: var(--ff-red-soft); color: var(--ff-red-text); }
.pill-green { background: var(--ff-green-soft); color: var(--ff-green-text); }
.pill-grey { background: var(--ff-surface-2); color: var(--ff-ink-2); }
.pill-muted { background: var(--ff-surface-2); color: var(--ff-ink-3); }
.pill-lime { background: var(--ff-lime); color: var(--ff-ink); }
.pill-lime-soft { background: var(--ff-lime-soft); color: var(--ff-lime-text); }
.pill-dark { background: var(--ff-ink); color: #fff; }
.pill-solid-purple { background: var(--ff-purple); color: #fff; }
.pill-white { background: #fff; color: var(--ff-ink); box-shadow: 0 0 0 1px var(--ff-border); }
.pill-outline { background: #fff; color: var(--ff-ink-2); box-shadow: inset 0 0 0 1px var(--ff-border-strong); }
.pill-lg { height: 26px; padding: 0 10px; font-size: 12px; }
.sev { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; }
.sev .dot { width: 5px; height: 5px; }
.sev-critical { background: var(--ff-red-soft); color: var(--ff-red-text); }
.sev-high { background: var(--ff-red-soft); color: var(--ff-red-text); }
.sev-medium { background: var(--ff-amber-soft); color: var(--ff-amber-text); }
.sev-low { background: var(--ff-surface-2); color: var(--ff-ink-2); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--ff-surface-2);
  color: var(--ff-ink-2);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.chip i { font-size: 13px; }
.chip-green { background: var(--ff-green-soft); color: var(--ff-green-text); }
.chip-amber { background: var(--ff-amber-soft); color: var(--ff-amber-text); }
.chip-purple { background: var(--ff-lavender); color: var(--ff-purple-text); }
.chip-white { background: #fff; color: var(--ff-ink); box-shadow: 0 0 0 1px var(--ff-border); }
.chip-sm { height: 22px; padding: 0 8px; font-size: 11.5px; }
.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--ff-ink);
  font-size: 12px;
  box-shadow: inset 0 0 0 1px var(--ff-border);
  white-space: nowrap;
}
.agent-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px 0 3px;
  border-radius: 999px;
  background: var(--ff-lavender);
  color: var(--ff-purple-deep);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.agent-chip img { width: 16px; height: 16px; }
.agent-chip.lg { height: 26px; font-size: 12px; padding-right: 10px; }
.agent-chip.lg img { width: 20px; height: 20px; }
.ai-orb { display: inline-block; border-radius: 50%; flex: none; }
.ai-orb.s14 { width: 14px; height: 14px; }
.ai-orb.s16 { width: 16px; height: 16px; }
.ai-orb.s18 { width: 18px; height: 18px; }
.ai-orb.s20 { width: 20px; height: 20px; }
.ai-orb.s24 { width: 24px; height: 24px; }
.ai-orb.s28 { width: 28px; height: 28px; }
.ai-orb.s32 { width: 32px; height: 32px; }
.ai-orb.s40 { width: 40px; height: 40px; }
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  background: var(--ff-surface-2);
  color: var(--ff-ink-2);
  font-size: 11px;
  font-weight: 500;
}
.count-pill.dark { background: var(--ff-ink); color: #fff; }
/* avatars & tiles */
.avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--ff-surface-2); }
.av-16 { width: 16px; height: 16px; }
.av-20 { width: 20px; height: 20px; }
.av-22 { width: 22px; height: 22px; }
.av-24 { width: 24px; height: 24px; }
.av-28 { width: 28px; height: 28px; }
.av-32 { width: 32px; height: 32px; }
.av-36 { width: 36px; height: 36px; }
.av-40 { width: 40px; height: 40px; }
.av-44 { width: 44px; height: 44px; }
.av-48 { width: 48px; height: 48px; }
.brand-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: var(--r-tile);
  color: #fff;
  font-size: 16px;
}
.brand-tile.s20 { width: 20px; height: 20px; border-radius: 6px; font-size: 11px; }
.brand-tile.s24 { width: 24px; height: 24px; border-radius: 7px; font-size: 13px; }
.brand-tile.s28 { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; }
.brand-tile.s40 { width: 40px; height: 40px; border-radius: 10px; font-size: 20px; }
.brand-tile.s44 { width: 44px; height: 44px; border-radius: 12px; font-size: 22px; }
.brand-tile.s56 { width: 56px; height: 56px; border-radius: 15px; font-size: 27px; }
.brand-tile.s48 { width: 48px; height: 48px; border-radius: 12px; font-size: 24px; }
.b-acme { background: var(--ff-purple); }
.b-atlas { background: var(--ff-amber); }
.b-vertex { background: var(--ff-green); }
.b-northstar { background: var(--ff-ink); }
.b-bluepeak { background: var(--ff-purple-soft); }
.b-summit { background: var(--ff-red); }
.b-harbor { background: #55565c; }
.b-golden { background: var(--ff-lime); color: var(--ff-ink); }
.b-redwood { background: #c8302f; }
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: var(--r-tile);
  background: var(--ff-ink);
  color: #fff;
  font-size: 16px;
}
.icon-tile.light { background: #fff; color: var(--ff-ink); box-shadow: 0 0 0 1px var(--ff-border); }
.icon-tile.white { background: #fff; color: var(--ff-ink); }
.icon-tile.amber-soft { background: var(--ff-amber-soft); color: var(--ff-amber-text); }
.icon-tile.green-soft { background: var(--ff-green-soft); color: var(--ff-green-text); }
.icon-tile.round { border-radius: 50%; }
.icon-tile.grey { background: var(--ff-surface-2); color: var(--ff-ink-2); }
.icon-tile.purple { background: var(--ff-purple); }
.icon-tile.s24 { width: 24px; height: 24px; border-radius: 7px; font-size: 13px; }
.icon-tile.s28 { width: 28px; height: 28px; font-size: 14px; }
.icon-tile.s36 { width: 36px; height: 36px; border-radius: 10px; font-size: 18px; }
.icon-tile.s40 { width: 40px; height: 40px; border-radius: 10px; font-size: 20px; }
.icon-tile.s56 { width: 56px; height: 56px; border-radius: 14px; font-size: 28px; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ff-ink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  flex: none;
}
.num-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 5px;
  border-radius: 6px;
  background: var(--ff-purple);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  flex: none;
}
.num-chip.soft { background: var(--ff-lavender); color: var(--ff-purple-text); }
.num-chip.grey { background: var(--ff-surface-2); color: var(--ff-ink-2); }
/* risk signal */
.risk { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.risk .bars { display: inline-flex; align-items: flex-end; gap: 4px; height: 12px; }
.risk .bars i { display: block; width: 3px; border-radius: 1px; background: var(--ff-surface-2); }
.risk .bars i:nth-child(1) { height: 6px; }
.risk .bars i:nth-child(2) { height: 9px; }
.risk .bars i:nth-child(3) { height: 12px; }
.risk-low { color: var(--ff-green-text); }
.risk-low .bars i:nth-child(1) { background: var(--ff-green); }
.risk-medium { color: var(--ff-amber-text); }
.risk-medium .bars i:nth-child(-n+2) { background: var(--ff-amber); }
.risk-high { color: var(--ff-red-text); }
.risk-high .bars i { background: var(--ff-red); }
/* ==========================================================================
   Cards
   ========================================================================== */
.card-ff { background: var(--ff-surface); border-radius: var(--r-card); padding: 20px; position: relative; }
.card-ff.p24 { padding: 24px; }
.card-ff.p16 { padding: 16px; }
.card-ai { background: var(--ff-lavender); }
/* Agent decision cards (S01 brief, S16 rail, S25, S42) carry a 1px lavender outline; plain AI cards do not. */
.card-agent { border: 1px solid var(--ff-ai-border); }
.brief { padding: 19px 19px 17px; }
.brief-headline { margin: 8px 0 0; font-size: 22px; line-height: 1.2; }
.brief-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; }
.card-dark { background: var(--ff-ink); color: #fff; }
.card-white { background: #fff; border: 1px solid var(--ff-border); }
.card-sel { box-shadow: inset 0 0 0 1.5px var(--ff-purple); background: #fff; }
.inner-ff { background: #fff; border-radius: var(--r-inner); padding: 12px 14px; }
.inner-ff.grey { background: var(--ff-surface); }
.card-title { font-size: 15px; font-weight: 500; margin: 0; line-height: 1.35; }
.card-sub { font-size: 12px; color: var(--ff-ink-3); margin-top: 2px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.kicker { font-size: 11px; font-weight: 500; text-transform: uppercase; color: var(--ff-purple-text); }
.kicker.grey { color: var(--ff-ink-3); }
.ai-head { display: flex; align-items: center; gap: 10px; }
.ai-head .ai-title { font-size: 14px; font-weight: 500; line-height: 1.25; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--ff-border); font-size: 13px; }
.kv:first-child { border-top: 0; }
.kv > span:first-child { color: var(--ff-ink-2); }
.kv > span:last-child, .kv > b { font-weight: 500; text-align: right; color: var(--ff-ink); }
.kv-list.white { background: #fff; border-radius: var(--r-inner); padding: 2px 14px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--ff-border); }
.list-row:first-child { border-top: 0; }
.row-title { font-size: 13px; font-weight: 500; color: var(--ff-ink); line-height: 1.3; }
.row-sub { font-size: 12px; color: var(--ff-ink-3); line-height: 1.35; margin-top: 1px; }
/* KPI strip */
/* KPIs are content-width and spread with equal gaps; each divider sits at the midpoint of its gap (S01, S12). */
.kpi-strip { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.kpi { min-width: 0; }
.kpi-sep { flex: none; align-self: center; width: 1px; height: 56px; background: var(--ff-border); }
.kpi-label { font-size: 11px; font-weight: 500; text-transform: uppercase; color: var(--ff-ink-3); line-height: 16px; white-space: nowrap; }
.kpi-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.kpi-value { font-size: 38px; line-height: 44px; font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-sub { font-size: 12px; color: var(--ff-ink-3); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* stat tile */
.stat-tile { background: var(--ff-surface); border-radius: 14px; padding: 12px 14px; }
.stat-tile.white { background: #fff; }
.stat-label { font-size: 10.5px; font-weight: 500; text-transform: uppercase; color: var(--ff-ink-3); }
.stat-value { font-size: 22px; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-value.lg { font-size: 26px; }
.stat-sub { font-size: 11.5px; color: var(--ff-ink-3); margin-top: 2px; }
/* callouts over images */
.callout {
  position: absolute;
  background: #fff;
  border-radius: var(--r-inner);
  padding: 7px 14px;
  box-shadow: var(--sh-sm);
  font-size: 13.5px;
  line-height: 18px;
  white-space: nowrap;
  z-index: 2;
}
.callout .micro { font-size: 11px; line-height: 14px; display: block; margin-bottom: 1px; }
.callout b { font-weight: 600; }
/* ==========================================================================
   Tabs, segmented, filters
   ========================================================================== */
.tabs-ff { display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--ff-border); position: relative; }
.tab-ff {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 45px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--ff-ink-3);
  font-size: 13.5px;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  cursor: pointer;
}
.tab-ff:hover { color: var(--ff-ink); }
.tab-ff.active { color: var(--ff-ink); font-weight: 500; border-bottom-color: var(--ff-ink); }
.tab-ff .count-pill { height: 16px; padding: 0 8px; border-radius: 8px; font-size: 13px; font-weight: 400; }
.tab-ff.active .count-pill { background: var(--ff-ink); color: #fff; }
.tabs-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; border-bottom: 1px solid var(--ff-border); margin-bottom: 20px; }
.tabs-row .tabs-ff { border-bottom: 0; }
.kpi-strip + .tabs-row { margin-top: -1.5px; }
.seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--ff-surface); white-space: nowrap; }
.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--ff-ink-2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.seg-btn:hover { color: var(--ff-ink); }
.seg-btn.active { background: #fff; color: var(--ff-ink); box-shadow: var(--sh-xs), 0 0 0 1px rgba(17, 17, 19, .04); }
.seg-btn.active.dark { background: var(--ff-ink); color: #fff; }
.seg-btn i { font-size: 13px; }
.seg.lg .seg-btn { height: 34px; padding: 0 16px; font-size: 13px; }
.seg.white { background: #fff; }
.seg.white .seg-btn.active { background: #fff; box-shadow: var(--sh-xs), 0 0 0 1px rgba(17, 17, 19, .07); }
.seg.block { display: flex; }
.seg.block .seg-btn { flex: 1; }
/* level selector (Observe … Autonomous) */
.levels { display: inline-flex; align-items: center; padding: 3px; gap: 2px; border-radius: 10px; background: var(--ff-surface-2); }
.level-btn {
  height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  font-size: 11.5px;
  color: var(--ff-ink-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  cursor: pointer;
}
.level-btn i { font-size: 11px; color: var(--ff-ink-3); }
.level-btn.active { background: #fff; color: var(--ff-ink); font-weight: 500; box-shadow: var(--sh-xs), 0 0 0 1px rgba(17, 17, 19, .06); }
.level-btn.active i { color: var(--ff-purple); }
.level-btn.off { color: #b4b4b8; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--ff-surface);
  border: 0;
  color: var(--ff-ink-3);
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
}
.filter-chip b { color: var(--ff-ink); font-weight: 500; }
.filter-chip i { font-size: 11px; color: var(--ff-ink); margin-left: 2px; }
.filter-chip:hover { background: var(--ff-surface-2); }
.filter-chip.dashed { background: #fff; box-shadow: inset 0 0 0 1px var(--ff-border); color: var(--ff-ink); }
.choice-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--ff-border-strong);
  color: var(--ff-ink);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.choice-chip i { display: none; font-size: 12px; }
.choice-chip.active { background: var(--ff-ink); border-color: var(--ff-ink); color: #fff; }
.choice-chip.active i { display: inline-block; }
.choice-chip.sm { height: 28px; padding: 0 11px; }
.pill-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--ff-border);
  color: var(--ff-ink);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.pill-filter .count-pill { background: var(--ff-surface-2); }
.pill-filter.active { background: var(--ff-ink); color: #fff; border-color: var(--ff-ink); }
.pill-filter.active .count-pill { background: rgba(255, 255, 255, .18); color: #fff; }
.pill-filter.active i { font-size: 12px; }
.ai-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px 0 4px;
  border-radius: 999px;
  background: var(--ff-lavender);
  color: var(--ff-purple-deep);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.ai-pill img { width: 20px; height: 20px; }
/* ==========================================================================
   Tables
   ========================================================================== */
.table-wrap { border: 1px solid var(--ff-border); border-radius: var(--r-table); overflow: hidden; background: #fff; }
.table-scroll { overflow-x: auto; }
.table-ff { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-ff thead th {
  height: 40px;
  padding: 0 12px;
  background: var(--ff-surface);
  color: var(--ff-ink-3);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--ff-border);
}
.table-ff thead th .sort { font-size: 11px; margin-left: 4px; color: var(--ff-ink-3); cursor: pointer; }
.table-ff thead th.sortable { cursor: pointer; }
.table-ff thead th.sortable:hover { color: var(--ff-ink); }
.table-ff tbody td { height: 60px; padding: 8px 12px; border-top: 1px solid var(--ff-border); vertical-align: middle; }
.table-ff tbody tr:first-child td { border-top: 0; }
.table-ff tbody tr.clickable { cursor: pointer; }
.table-ff tbody tr.clickable:hover, .table-ff tbody tr.is-selected { background: #fafaf8; }
.table-ff tbody tr.is-hl { background: var(--ff-lavender); }
.table-ff th:first-child, .table-ff td:first-child { padding-left: 20px; }
.table-ff.fixed { table-layout: fixed; }
.table-ff th.col-check, .table-ff td.col-check { padding-left: 16.5px; padding-right: 0; }
.table-ff .col-check .check-ff { transform: translateY(-2px); }
.table-ff tbody td.col-act { padding-left: 0; padding-right: 0; text-align: center; }
.table-ff .col-act .btn-icon { font-size: 18px; color: var(--ff-ink-2); }
.table-ff thead th.th-icon { padding-left: 0; padding-right: 0; text-align: center; font-size: 14px; }
.table-ff .cell-main { font-size: 14px; line-height: 20px; }
.table-ff .cell-sub { line-height: 20px; }
.table-ff .pill { font-size: 12.5px; }
.route-cell { display: flex; align-items: center; gap: 7px; }
.filters-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.table-ff th:last-child, .table-ff td:last-child { padding-right: 16px; }
.table-ff.compact tbody td { height: 48px; }
.table-ff.first-16 th:first-child, .table-ff.first-16 td:first-child { padding-left: 16px; }
.exc-table .exc-ai .agent-chip { vertical-align: top; }
.exc-table .exc-ai .t { margin-top: 3px; font-size: 12px; font-weight: 500; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-ff.dense tbody td { height: 44px; padding-top: 4px; padding-bottom: 4px; }
.cell-main { font-weight: 500; color: var(--ff-ink); line-height: 1.3; white-space: nowrap; }
.cell-sub { font-size: 12px; color: var(--ff-ink-3); line-height: 1.35; white-space: nowrap; margin-top: 1px; }
.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 53px;
  padding: 0 20px;
  background: var(--ff-surface);
  border-top: 1px solid var(--ff-border);
  font-size: 13px;
  color: var(--ff-ink-3);
}
.table-foot b { color: var(--ff-ink); font-weight: 500; margin: 0 5px; }
.pager { display: inline-flex; align-items: center; gap: 4px; }
.pager button {
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--ff-ink-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.pager button:hover { background: var(--ff-surface-2); }
.pager button.active { background: var(--ff-ink); color: #fff; }
.pager .gap { color: var(--ff-ink-3); padding: 0 4px; }
.pager .arrow { color: var(--ff-ink-2); font-size: 11px; margin: 0 4px; }
.pager .arrow:first-child { color: #b4b4b8; }
.rows-sel { display: inline-flex; align-items: center; gap: 10px; }
/* bars */
.bar { position: relative; height: 4px; border-radius: 4px; background: var(--ff-surface-2); overflow: hidden; }
.bar > span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--ff-ink); }
.bar.h6 { height: 6px; }
.bar.h8 { height: 8px; }
.bar.h3 { height: 3px; }
.bar.white { background: #fff; }
.bar > .green { background: var(--ff-green); }
.bar > .amber { background: var(--ff-amber); }
.bar > .red { background: var(--ff-red); }
.bar > .purple { background: var(--ff-purple); }
.bar > .lime { background: var(--ff-lime); }
.bar > .grey { background: #cfcfcb; }
.meter-cell { min-width: 96px; }
.meter-cell .v { font-size: 13px; margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.drv-meter .bar { width: 96px; margin-top: 8px; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.rating i { color: var(--ff-amber); }
.seg-meter { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.seg-meter i { height: 4px; border-radius: 4px; background: var(--ff-surface-2); display: block; }
.seg-meter i.on { background: var(--ff-purple); }
.seg-meter.lime i.on { background: var(--ff-lime); }
.seg-meter.h6 i { height: 6px; }
/* ==========================================================================
   Forms
   ========================================================================== */
.form-label-ff { display: block; font-size: 13px; color: var(--ff-ink-2); margin-bottom: 7px; line-height: 18px; }
.input-ff, .select-ff {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--r-input);
  border: 1px solid transparent;
  background: #fff;
  color: var(--ff-ink);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
}
textarea.input-ff { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; display: block; }
.input-ff::placeholder { color: var(--ff-ink-3); }
.input-ff:focus, .select-ff:focus-within, .select-ff.open { border-color: var(--ff-purple); box-shadow: 0 0 0 3px rgba(108, 59, 255, .12); }
.input-ff.grey, .select-ff.grey { background: var(--ff-surface); }
.input-ff.bordered, .select-ff.bordered { border-color: var(--ff-border); }
.input-ff.is-ai, .select-ff.is-ai { background: var(--ff-lavender); border-color: var(--ff-purple-border); }
.input-ff.is-warn, .select-ff.is-warn { background: var(--ff-amber-soft); border-color: var(--ff-amber); }
.select-ff { position: relative; cursor: pointer; }
.select-ff > i:first-child { font-size: 15px; color: var(--ff-ink-2); }
.select-ff .val { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.select-ff .caret { font-size: 14px; color: var(--ff-ink-3); margin-left: auto; }
.select-ff select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; font-size: 13px; }
.input-ff .suffix { color: var(--ff-ink-3); margin-left: auto; }
.input-group-ff { display: flex; align-items: center; }
.input-group-ff input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: inherit; color: inherit; height: 100%; }
.field-warn { display: flex; align-items: flex-start; gap: 8px; color: var(--ff-amber-text); font-size: 13px; line-height: 18px; margin-top: 11.5px; }
.field-warn i { color: var(--ff-amber-text); font-size: 15px; margin-top: 1px; }
.link-inherit { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.link-inherit:hover { text-decoration: underline; }
/* New-shipment pickup/delivery panels (S45). */
.stop-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stop-panel { background: #fff; border-radius: 14px; padding: 17px 16px 14px; }
.stop-panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.stop-tl { position: relative; margin-top: 13.5px; }
.stop-tl::before { content: ""; position: absolute; left: 5.5px; top: 15.5px; height: 42px; width: 1px; background: var(--ff-border-strong); }
.stop-tl-item { display: flex; align-items: flex-start; gap: 12.5px; }
.stop-tl-item + .stop-tl-item { margin-top: 12px; }
.stop-tl-item .t { font-size: 14px; font-weight: 500; line-height: 20px; }
.stop-tl-item .s { font-size: 13px; color: var(--ff-ink-3); line-height: 20px; margin-top: 2px; }
.stop-tl-dot { flex: none; width: 12px; height: 12px; margin-top: 3.5px; border-radius: 50%; background: var(--ff-ink); }
.stop-tl-dot.ring { background: #eae4ff; box-shadow: inset 0 0 0 2px var(--ff-purple); }
.stop-tl-tags { margin-top: 13px; }
.bar > .rate-range { background: #c5b5fb; }
.rate-driver { margin-top: 18px; }
.updates-card { padding-top: 15.5px; }
.updates-card .toggle-row { min-height: 60px; }
.updates-card .lock-note { margin-top: 60.5px; }
.agent-note { display: flex; gap: 8px; margin-top: 16px; font-size: 13px; line-height: 18px; color: var(--ff-ink-2); }
.stop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 11px; }
.switch-ff { position: relative; display: inline-block; width: 32px; height: 18px; flex: none; cursor: pointer; }
.switch-ff input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch-ff span { position: absolute; inset: 0; border-radius: 999px; background: #dcdcd8; }
.switch-ff span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 17, 19, .2);
}
.switch-ff input:checked + span { background: var(--ff-purple); }
.switch-ff input:checked + span::after { transform: translateX(14px); }
.switch-ff input:disabled + span { opacity: .55; }
.switch-ff.lg { width: 36px; height: 20px; }
.switch-ff.lg span::after { width: 16px; height: 16px; }
.switch-ff.lg input:checked + span::after { transform: translateX(16px); }
.check-ff { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--ff-border-strong); background: #fff; flex: none; margin: 0; cursor: pointer; display: inline-grid; place-content: center; vertical-align: middle; }
.check-ff::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check-ff:checked { background: var(--ff-purple); border-color: var(--ff-purple); }
.check-ff:checked::after { opacity: 1; }
.check-ff:disabled { opacity: .5; cursor: default; }
.check-ff.round { border-radius: 50%; }
.radio-ff { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #cfcfcb; background: #fff; margin: 0; flex: none; cursor: pointer; }
.radio-ff:checked { border: 5px solid var(--ff-purple); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--ff-border); }
.toggle-row:first-child { border-top: 0; }
.toggle-row .row-title { font-weight: 500; }
.radio-card { display: flex; gap: 10px; padding: 14px; border-radius: 12px; border: 1px solid var(--ff-border); background: #fff; cursor: pointer; }
.radio-card:hover { border-color: var(--ff-border-strong); }
.radio-card.active { border-color: var(--ff-purple); background: var(--ff-lavender); box-shadow: 0 0 0 1px var(--ff-purple); }
.people-input { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 44px; padding: 6px 8px; border-radius: var(--r-input); border: 1px solid var(--ff-border); background: #fff; }
.person-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 3px; border-radius: 999px; background: var(--ff-surface); font-size: 12px; font-weight: 500; }
.person-chip img { width: 22px; height: 22px; border-radius: 50%; }
.person-chip button { border: 0; background: none; padding: 0 2px; color: var(--ff-ink-2); font-size: 12px; line-height: 1; cursor: pointer; }
.people-input input { border: 0; outline: none; flex: 1; min-width: 80px; font: inherit; font-size: 12px; background: transparent; }
/* form section pages */
.form-section { background: var(--ff-surface); border-radius: var(--r-card); padding: 20px; margin-bottom: 20px; }
.form-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.form-section-head .card-title { font-size: 15px; }
.form-section .input-ff:not(.is-ai):not(.is-warn), .form-section .select-ff:not(.is-ai):not(.is-warn) { background: transparent; border-color: var(--ff-border); }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ai-banner { display: flex; align-items: center; gap: 16px; min-height: 70px; padding: 8px 20px; border-radius: var(--r-card); background: #f6f4ff; margin-bottom: 20px; }
.ai-banner .ai-orb { width: 36px; height: 36px; }
.ai-banner .t { font-size: 13px; font-weight: 500; line-height: 20px; }
.ai-banner .s { font-size: 12.5px; color: var(--ff-ink-3); line-height: 20px; margin-top: 1px; }
.page-head:has(.btn-back) { margin-bottom: 20px; }
body[data-nav="customers"] .page-head:has(.btn-back) { margin-top: -2px; margin-bottom: 16px; }
.lock-note { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ff-ink-3); margin-top: 14px; }
.lock-note i { font-size: 14px; margin-top: 2px; }
/* ==========================================================================
   Overlays: modal, drawer, palette, dropdown, toast
   ========================================================================== */
.modal-backdrop { --bs-backdrop-bg: #111113; --bs-backdrop-opacity: 1; }
.modal { --bs-modal-bg: #fff; }
.modal-backdrop.fade { opacity: 0; }
.modal-backdrop.show { opacity: 1; background: rgba(17, 17, 19, .30); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.offcanvas-backdrop.show { opacity: 1; background: rgba(17, 17, 19, .23); }
body:has(.palette.show) .modal-backdrop.show { background: rgba(17, 17, 19, .37); }
.modal-ff { --bs-modal-margin: 24px; }
.modal-ff .modal-dialog { max-width: 664px; }
.modal-ff.w-560 .modal-dialog { max-width: 560px; }
.modal-ff.w-600 .modal-dialog { max-width: 600px; }
.modal-ff.w-760 .modal-dialog { max-width: 760px; }
.modal-ff.w-960 .modal-dialog { max-width: 960px; }
.modal-ff.w-900 .modal-dialog { max-width: 952px; }
.modal-ff .modal-content { border: 0; border-radius: var(--r-modal); box-shadow: var(--sh-lg); overflow: hidden; max-height: calc(100vh - 48px); }
.modal-ff .modal-dialog-scrollable .modal-content { max-height: min(860px, calc(100vh - 48px)); }
.modal-ff .modal-header { display: block; border: 0; padding: 19.5px 24px 0; position: relative; }
.modal-ff .modal-header:has(.agent-chip) { padding-top: 19.5px; }
.modal-ff .modal-header:has(.agent-chip) .modal-desc { margin-top: 9px; }
.modal-ff .modal-header:has(.agent-chip) + .modal-body { padding-top: 17px; }
.modal-ff .modal-title { font-size: 28px; line-height: 1.2; font-weight: 400; margin: 0; }
.modal-ff .modal-desc { max-width: 460px; font-size: 14px; color: var(--ff-ink-2); margin: 8px 0 0; line-height: 20px; }
.modal-ff .agent-chip { margin-bottom: 7.5px; }
.modal-ff.head-loose .agent-chip { margin-bottom: 12px; }
.modal-ff.head-loose .modal-header:has(.agent-chip) .modal-desc { margin-top: 12.5px; }
.btn-close-ff {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  color: var(--ff-ink-3);
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background .15s ease, color .15s ease;
}
.btn-close-ff:hover,
.btn-close-ff:focus-visible {
  background: var(--ff-surface);
  color: var(--ff-ink);
  outline: none;
}
.btn-close-ff:focus-visible {
  box-shadow: 0 0 0 2px rgba(17, 17, 19, .12);
}
.modal-ff .btn-close-ff {
  position: absolute;
  top: 20px;
  right: 20px;
  color: var(--ff-ink);
  font-size: 17px;
}
.drawer-ff .btn-close-ff {
  margin-top: 2px;
  margin-right: -4px;
}
.modal-ff .modal-body { padding: 20px 24px 24.5px; }
.modal-ff .modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 24px;
  border-top: 1px solid var(--ff-border);
  flex-wrap: nowrap;
}
.modal-ff .modal-footer .btn-ff { height: 38px; font-size: 14px; }
.modal-ff.no-foot-rule .modal-footer { border-top: 0; padding-top: 0; padding-bottom: 16px; }
.modal-ff.no-foot-rule .modal-footer .btn-ff { height: 36px; }
.modal-ff .modal-footer > * { margin: 0; }
.foot-note { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ff-ink-3); }
.foot-note i { font-size: 13px; }
.modal-section-label { font-size: 13.5px; color: var(--ff-ink-2); margin: 0 0 8px; }
/* Share live tracking modal (S44). */
.share-link { display: flex; align-items: center; gap: 8px; padding-right: 4px; }
.share-link .mono { font-size: 13.5px; }
.share-to { padding: 0 16px; border: 1px solid var(--ff-border); border-radius: 12px; background: #fff; }
.share-to-row { display: flex; align-items: center; gap: 12px; min-height: 63px; border-bottom: 1px solid var(--ff-border); }
.share-to-row .t { font-size: 14px; font-weight: 500; }
.share-to-row .s { font-size: 13px; color: var(--ff-ink-3); }
.share-to-add { height: 44.5px; font-size: 14px; font-weight: 400; gap: 8px; }
.share-to-add i { font-size: 16px; }
.share-see { padding: 10px 16px; border-radius: var(--r-inner); background: var(--ff-surface); }
.share-see .toggle-row { min-height: 50px; padding: 0; border: 0; }
.share-see .row-title { font-size: 13.5px; }
.share-see .row-sub { font-size: 13px; }
.modal-ff .modal-body > * + .modal-section-label, .modal-ff .mfield + .mfield { margin-top: 12px; }
.modal.fade .modal-dialog { transform: translateY(8px) scale(.99); }
.modal.show .modal-dialog { transform: none; }
.drawer-ff.offcanvas {
  --bs-offcanvas-width: 440px;
  top: 8px;
  right: 8px;
  bottom: 8px;
  height: auto;
  border: 0 !important;
  border-radius: var(--r-panel);
  box-shadow: var(--sh-lg);
  background: #fff;
  overflow: hidden;
}
.drawer-ff .drawer-head { padding: 20px 20px 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.drawer-ff .drawer-title { font-size: 18px; font-weight: 400; line-height: 1.2; }
.drawer-ff .drawer-body { flex: 1; overflow-y: auto; padding: 0 20px 20px; }
.drawer-ff .drawer-foot { padding: 12px 20px 16px; border-top: 1px solid var(--ff-border); }
.notif-card { border-radius: 14px; padding: 12px 16px; display: flex; gap: 12px; margin-bottom: 8px; background: var(--ff-surface); position: relative; }
.notif-card.needs { background: var(--ff-lavender); }
.notif-card .icon-tile { width: 28px; height: 28px; font-size: 14px; border-radius: 8px; }
.notif-card .src { font-size: 12px; line-height: 18px; color: var(--ff-ink-2); }
.notif-card .time { font-size: 12px; color: var(--ff-ink-3); margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.notif-card .unread { width: 7px; height: 7px; border-radius: 50%; background: var(--ff-purple); }
.notif-card p { font-size: 13.5px; margin: 2px 0 0; line-height: 18px; }
.notif-card .notif-actions { display: flex; gap: 8px; margin-top: 12px; }
.notif-group { font-size: 11.5px; line-height: 16px; margin: 19px 0 7px; }
.notif-head-sub { font-size: 12px; color: var(--ff-ink-3); margin-top: 5.5px; }
.notif-card.is-read .unread { display: none; }
#notifDrawer .drawer-head { padding-bottom: 15.5px; }
.notif-head-tools { display: flex; align-items: center; gap: 12px; }
.notif-head-tools .btn-ff { padding: 0 8px; }
.notif-head-tools .btn-icon { width: 24px; height: 24px; font-size: 16px; }
.notif-tabs { padding: 0 20px; }
.notif-tabs .seg { height: 40px; padding: 4px; }
.notif-tabs .seg-btn { height: 32px; }
.notif-card .btn-ff { height: 32px; }
.palette .modal-dialog { max-width: 840px; margin-top: 96px; }
.palette .modal-content { border-radius: 20px; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 22px 24px 14px; }
.palette-input i { font-size: 20px; color: var(--ff-ink); }
.palette-input input { flex: 1; border: 0; outline: none; font: inherit; font-size: 16px; background: transparent; color: var(--ff-ink); }
.palette-input input::selection { background: rgba(108, 59, 255, .25); }
.palette .kbd { height: 22px; min-width: 35.5px; padding: 0 9px; border-radius: 8px; background: var(--ff-surface); color: var(--ff-ink-3); font-size: 13px; font-weight: 400; }
.palette-chips { display: flex; gap: 8px; padding: 0 24px 8px; flex-wrap: wrap; border-bottom: 1px solid var(--ff-border); }
.palette-chips .pill-filter { height: 30px; padding: 0 12px; font-size: 12.5px; }
.palette-chips .pill-filter:not(.active) { color: var(--ff-ink-2); }
.palette-chips .pill-filter .count-pill { height: 16px; min-width: 18px; font-size: 10.5px; }
.palette-body { max-height: 458px; overflow-y: auto; padding: 4px 8px; }
.palette-ask { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-radius: 14px; background: var(--ff-lavender); margin: 0 0 3px; cursor: pointer; }
.palette-ask .pa-title { font-size: 12.5px; font-weight: 500; color: var(--ff-purple-text); line-height: 1.4; }
.palette-ask .pa-q { font-size: 14px; line-height: 1.45; margin-top: 2px; }
.palette-group { font-size: 11.5px; font-weight: 500; text-transform: uppercase; color: var(--ff-ink-3); padding: 11.5px 16px 2.5px; }
.palette-item { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 16px; border-radius: 12px; cursor: pointer; }
.palette-item .pi-icon { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; color: var(--ff-ink); flex: none; }
.palette-item .pi-icon:has(> i) { background: var(--ff-surface); }
.palette-item .row-title { font-size: 14px; }
.palette-item .row-sub { font-size: 13px; }
.palette-item.active, .palette-item:hover { background: var(--ff-surface); }
.palette-foot { display: flex; align-items: center; gap: 16px; padding: 12px 24px 20px; border-top: 1px solid var(--ff-border); font-size: 12px; color: var(--ff-ink-3); }
.palette-foot span { display: inline-flex; align-items: center; gap: 6px; }
.palette-foot .kbd { min-width: 22px; }
.dropdown-menu {
  --bs-dropdown-bg: #fff;
  --bs-dropdown-border-color: var(--ff-border);
  --bs-dropdown-border-radius: 14px;
  --bs-dropdown-font-size: 13px;
  --bs-dropdown-link-hover-bg: var(--ff-surface);
  --bs-dropdown-link-active-bg: var(--ff-lavender);
  --bs-dropdown-link-active-color: var(--ff-purple-deep);
  --bs-dropdown-padding-y: 6px;
  --bs-dropdown-item-padding-x: 12px;
  --bs-dropdown-item-padding-y: 7px;
  box-shadow: var(--sh-md);
  padding: 6px;
  min-width: 180px;
}
.dropdown-item { border-radius: 8px; display: flex; align-items: center; gap: 8px; }
.dropdown-item i { font-size: 15px; color: var(--ff-ink-2); }
.dropdown-item.text-danger i { color: inherit; }
.dropdown-toggle::after { display: none; }
.toast-stack { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast-ff {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 340px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 20px;
  background: var(--ff-ink);
  color: #fff;
  box-shadow: var(--sh-lg);
  pointer-events: auto;
}
.toast-ff .t-ico { width: 28px; height: 28px; border-radius: 50%; background: var(--ff-green); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex: none; }
.toast-ff .t-ico.purple { background: var(--ff-purple); }
.toast-ff .t-ico.red { background: var(--ff-red); }
.toast-ff .t-title { font-size: 15px; font-weight: 500; line-height: 20px; }
.toast-ff .t-sub { font-size: 13.5px; color: #a9a9ae; line-height: 16px; margin-top: 3px; }
.toast-ff .t-act { margin-left: auto; color: var(--ff-purple-soft); font-size: 13.5px; font-weight: 500; background: none; border: 0; padding: 0 4px; }
.toast-ff .t-x { background: none; border: 0; color: #a9a9ae; font-size: 15px; padding: 2px 0 2px 4px; }
/* ==========================================================================
   Data visualization primitives
   ========================================================================== */
/* vertical timeline */
.vtimeline { position: relative; }
.vt-item { position: relative; display: flex; gap: 12px; padding-bottom: 18px; }
.vt-item:last-child { padding-bottom: 0; }
.vt-item::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 1px; background: var(--ff-border-strong); }
.vt-item:last-child::before { display: none; }
.vt-mark { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; flex: none; position: relative; z-index: 1; }
.vt-mark.green { background: var(--ff-green); }
.vt-mark.red { background: var(--ff-red); }
.vt-mark.purple { background: var(--ff-purple-soft); }
.vt-mark.dark { background: var(--ff-ink); }
.vt-mark.ai { background: transparent; }
.vt-mark.ai img { width: 24px; height: 24px; }
.vt-mark.hollow { background: #fff; box-shadow: inset 0 0 0 1.5px var(--ff-border-strong); }
.vt-mark.hollow::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #b4b4b8; }
.vt-time { font-size: 12px; color: var(--ff-ink-3); line-height: 1.3; display: flex; align-items: center; gap: 6px; }
.vt-title { font-size: 14px; font-weight: 500; margin-top: 3px; line-height: 1.3; }
.vt-meta { font-size: 12.5px; color: var(--ff-ink-3); margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.vt-item.muted .vt-title { color: var(--ff-ink-2); font-weight: 400; }
/* gantt */
.gantt { --gantt-pad: 0px; position: relative; font-size: 12px; }
.gantt-head, .gantt-row { display: grid; grid-template-columns: var(--gantt-name) 1fr; align-items: center; padding: 0 var(--gantt-pad); }
.gantt-head { height: 30px; color: var(--ff-ink-3); font-size: 11px; border-bottom: 1px solid var(--ff-border); }
.gantt-head .micro { font-size: 10.5px; }
.gantt-hours { position: relative; height: 100%; }
.gantt-hours span { position: absolute; top: 50%; transform: translate(-50%, -50%); font-size: 11.5px; color: var(--ff-ink-2); }
.gantt-hours span.first { left: 0; transform: translateY(-50%); }
.gantt-hours span.last { right: 0; transform: translateY(-50%); }
.gantt-row { height: 48px; border-bottom: 1px solid var(--ff-border); }
.gantt-row:last-child { border-bottom: 0; }
.gantt-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gantt-name { font-size: 13px; font-weight: 500; line-height: 1.25; }
.gantt-sub { font-size: 12px; }
.gantt-now-wrap { position: absolute; left: calc(var(--gantt-pad) + var(--gantt-name)); right: var(--gantt-pad); top: 0; bottom: 0; pointer-events: none; }
/* Dashboard timeline (S01): table bleeds 7–8px past the card padding, rows are inset 16px. */
.gantt-inset { --gantt-pad: 16px; margin: 0 -8px 0 -7px; }
.gantt-inset .gantt-head .micro { font-size: 11.5px; }
.gantt-inset .gantt-hours span { font-size: 12px; }
.gantt-inset .gantt-who { gap: 12px; }
.gantt-inset .gantt-name { line-height: 16px; }
.gantt-inset .gantt-sub { line-height: 16px; }
.gantt-inset .gbar { height: 26px; font-size: 12px; }
.gantt-inset .gantt-now { top: 4px; }
.gantt-inset .gantt-now span { top: 0; height: 24px; padding: 0 12px; font-size: 12px; }
.timeline-card { padding: 15px 20px 12px; }
.timeline-card .card-head { align-items: center; margin-bottom: 6.5px; }
.timeline-card .card-sub { margin-top: 3.5px; }
.gantt-track { position: relative; height: 100%; }
.gantt-grid { position: absolute; inset: 0; pointer-events: none; }
.gantt-grid i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ff-border); }
.gbar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 24px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}
.gbar:hover { filter: brightness(.97); }
.gbar.grey { background: var(--ff-surface-2); color: var(--ff-ink-3); }
.gbar.purple { background: var(--ff-purple); color: #fff; }
.gbar.red { background: var(--ff-red); color: #fff; }
.gbar.white { background: #fff; color: var(--ff-ink); box-shadow: inset 0 0 0 1px var(--ff-border-strong); }
.gbar.late { background: var(--ff-red-soft); color: var(--ff-red-text); box-shadow: inset 0 0 0 1px #f3a3a4; }
.gbar.dashed { background: var(--ff-lavender); color: var(--ff-purple-deep); box-shadow: none; border: 1px dashed var(--ff-purple-soft); gap: 5px; }
.gbar.dashed::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--ff-purple); }
.gantt-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ff-purple); z-index: 3; pointer-events: none; }
.gantt-now span { position: absolute; top: -1px; left: 50%; transform: translateX(-50%); height: 22px; padding: 0 8px; border-radius: 999px; background: var(--ff-purple); color: #fff; font-size: 11px; font-weight: 500; display: inline-flex; align-items: center; }
/* route progress track */
.route-track { position: relative; height: 70px; }
.route-track .rt-line { position: absolute; left: 0; right: 0; top: 17.5px; height: 3px; background: var(--ff-ink); }
.route-track .rt-line.future { background: var(--ff-border-strong); }
.route-track .rt-slow { position: absolute; top: 16px; height: 5px; background: var(--ff-red); border-radius: 3px; }
.route-track .rt-stop { position: absolute; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--ff-ink); transform: translateX(-50%); }
.route-track .rt-stop.end { background: #fff; box-shadow: inset 0 0 0 2.5px var(--ff-ink); width: 12px; height: 12px; top: 13px; }
.route-track .rt-stop.future { background: var(--ff-border-strong); width: 7px; height: 7px; top: 15.5px; }
.route-track .rt-truck { position: absolute; top: 7px; width: 24px; height: 24px; border-radius: 50%; background: var(--ff-ink); color: #fff; transform: translateX(-50%); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; box-shadow: 0 0 0 3px var(--ff-surface); z-index: 2; }
.route-track .rt-label { position: absolute; top: 36.5px; transform: translateX(-50%); text-align: center; font-size: 12px; white-space: nowrap; line-height: 1.35; }
.route-track .rt-label b { font-weight: 500; display: block; margin-bottom: 4.5px; color: var(--ff-ink); }
.route-track .rt-label span { color: var(--ff-ink-3); }
.route-track .rt-label.left { transform: none; text-align: left; }
.route-track .rt-label.right { transform: translateX(-100%); text-align: right; }
.route-track svg.rt-arc { position: absolute; overflow: visible; pointer-events: none; }
.rt-detour { position: absolute; transform: translate(-50%, -50%); z-index: 2; box-shadow: var(--sh-sm); }
/* pallets */
.pallets { display: inline-grid; gap: 4px; padding: 8px; border-radius: 12px; background: #fff; border: 1px solid var(--ff-border); }
.pallet { width: 40px; height: 44px; border: 0; border-radius: 6px; font-size: 13px; line-height: 15.5px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 0 0 0 8px; cursor: pointer; }
.pallet b { font-weight: 400; color: #a9a9ad; }
.pallet span { font-weight: 500; }
.pallet.loaded { background: var(--ff-ink); color: #fff; }
.pallet.sel { background: var(--ff-purple); color: #fff; }
.pallet.sel b { color: rgba(255, 255, 255, .7); }
.pallet.empty { background: #f3f3f1; color: var(--ff-ink-3); border: 1px dashed var(--ff-border-strong); align-items: center; padding: 0; }
.pallet:hover { transform: translateY(-1px); }
/* Load plan card (S42, S43). */
.load-plan { height: 100%; }
.load-plan .card-head { margin-bottom: 32.5px; }
.legend.load-legend { display: flex; margin-top: 31px; font-size: 12.5px; }
.legend i.sq.sel { background: var(--ff-purple); }
.legend i.sq.empty { background: transparent; border: 1px dashed var(--ff-border-strong); border-radius: 50%; }
.axle-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-content: start; gap: 12.5px; height: 75.5px; margin-top: 32px; padding: 12px 15.5px 0; border-radius: 18px; background: #fff; }
.axle-grid .micro { font-size: 10.5px; line-height: 13px; }
.axle-grid .v { margin-top: 7px; font-size: 14.5px; line-height: 20px; font-variant-numeric: tabular-nums; }
.axle-grid .bar { margin-top: 6px; }
.temp-chip { height: 25px; font-size: 13px; }
.vt-mark.dashed { background: #fff; color: var(--ff-ink-3); box-shadow: none; border: 1px dashed var(--ff-border-strong); }
.legend { display: inline-flex; align-items: center; gap: 16px; font-size: 12px; color: var(--ff-ink-2); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i.sq { width: 9px; height: 9px; border-radius: 2px; display: inline-block; background: var(--ff-ink); }
.legend i.ln { width: 14px; height: 2px; display: inline-block; background: var(--ff-ink); }
.legend i.ln.dash { background: repeating-linear-gradient(90deg, var(--ff-purple) 0 3px, transparent 3px 5px); }
.legend i.ln.dot { background: repeating-linear-gradient(90deg, var(--ff-ink-2) 0 2px, transparent 2px 4px); }
/* chat */
.bubble { max-width: 420px; padding: 11px 14px; border-radius: 16px; font-size: 13px; line-height: 1.5; }
.bubble.in { background: #fff; box-shadow: 0 0 0 1px var(--ff-border); border-bottom-left-radius: 6px; }
.bubble.out { background: var(--ff-ink); color: #fff; border-bottom-right-radius: 6px; }
.bubble-meta { font-size: 11.5px; color: var(--ff-ink-3); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.sys-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px 0 4px; border-radius: 999px; background: var(--ff-lavender); color: var(--ff-purple-text); font-size: 12px; font-weight: 500; }
.sys-pill img { width: 18px; height: 18px; }
/* chart tooltip */
.chart-box { position: relative; }
.chart-tip {
  position: absolute;
  pointer-events: none;
  background: var(--ff-ink);
  color: #fff;
  border-radius: 12px;
  padding: 11px 12.5px 9px;
  font-size: 14px;
  box-shadow: var(--sh-md);
  opacity: 0;
  z-index: 5;
  white-space: nowrap;
}
.chart-tip .tt { color: #a9a9ae; margin-bottom: 3px; font-size: 13.5px; line-height: 18px; }
.chart-tip .tr { display: flex; align-items: center; gap: 9px; font-size: 13px; line-height: 24px; color: #a9a9ae; }
.chart-tip .tr b { margin-left: auto; color: #fff; font-weight: 500; }
.chart-tip .sw { width: 8px; height: 8px; border-radius: 50%; }
/* ==========================================================================
   Maps
   ========================================================================== */
.map-card { position: relative; border-radius: var(--r-card); overflow: hidden; background: #eef0ee; isolation: isolate; }
.map-canvas { position: absolute; inset: 0; z-index: 0; background: #eef0ee; }
.map-canvas .leaflet-tile-pane { filter: grayscale(1) contrast(.92) brightness(1.03); }
.leaflet-container { font-family: var(--font); background: #eef0ee; }
.leaflet-control-attribution { font-size: 9px !important; background: rgba(255, 255, 255, .7) !important; border-radius: 6px 0 0 0; }
.map-ctrls { position: absolute; top: 12px; right: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 500; }
.map-ctrls .grp { display: flex; flex-direction: column; background: #fff; border-radius: 10px; box-shadow: var(--sh-sm); overflow: hidden; }
.map-ctrls button { width: 34px; height: 34px; border: 0; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; color: var(--ff-ink); }
.map-ctrls .grp button + button { border-top: 1px solid var(--ff-border); }
.map-ctrls > button { border-radius: 10px; box-shadow: var(--sh-sm); }
.map-ctrls button:hover { background: var(--ff-surface); }
.map-chips { position: absolute; top: 14px; left: 14px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 500; max-width: calc(100% - 80px); }
.map-chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px 0 12px; border-radius: 999px; background: #fff; box-shadow: var(--sh-sm); font-size: 13px; color: var(--ff-ink); border: 0; white-space: nowrap; }
.map-chip .count-pill { height: 18px; }
.map-chip.active { background: var(--ff-ink); color: #fff; }
.map-chip.active .count-pill { background: rgba(255, 255, 255, .18); color: #fff; }
.map-chip .live { width: 7px; height: 7px; border-radius: 50%; background: var(--ff-green); }
.map-legend { position: absolute; left: 12px; bottom: 12px; z-index: 500; display: inline-flex; align-items: center; gap: 14px; height: 30px; padding: 0 12px; border-radius: 999px; background: #fff; box-shadow: var(--sh-sm); font-size: 12px; color: var(--ff-ink-2); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.map-legend .d { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.map-legend .l { width: 14px; height: 2px; display: inline-block; }
.map-legend .l.dash { background: repeating-linear-gradient(90deg, var(--ff-purple) 0 3px, transparent 3px 5px); }
.map-legend .l.dot { background: repeating-linear-gradient(90deg, var(--ff-ink-2) 0 2px, transparent 2px 4px); height: 2px; }
.route-legend { top: 16px; left: 16px; bottom: auto; height: 32px; padding: 0 16px; gap: 17px; font-size: 13px; }
.route-legend span { gap: 8px; }
.route-legend .l { width: 20px; }
.route-legend .l.dot { background: repeating-linear-gradient(90deg, #919198 0 3px, transparent 3px 5.5px); }
.route-legend .l.line { background: var(--ff-purple); }
.route-stop .s, .route-stop .eta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk { display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; }
.mk-veh { width: 22px; height: 22px; background: var(--ff-ink); font-size: 11px; box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0, 0, 0, .25); }
.mk-veh.amber { background: var(--ff-amber); box-shadow: 0 0 0 3px rgba(245, 165, 37, .35), 0 0 0 2px #fff; }
.mk-veh.red { background: var(--ff-red); }
.mk-avatar { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, .3); }
.mk-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mk-alert { width: 30px; height: 30px; background: var(--ff-red); box-shadow: 0 0 0 4px rgba(240, 72, 74, .25), 0 0 0 2px #fff inset; font-size: 14px; }
.mk-ring { width: 14px; height: 14px; background: #fff; box-shadow: inset 0 0 0 3px var(--ff-ink); }
.mk-num { width: 22px; height: 22px; background: var(--ff-ink); font-size: 11px; font-weight: 600; box-shadow: 0 0 0 2px #fff; }
.mk-depot { width: 26px; height: 26px; border-radius: 7px; background: var(--ff-ink); font-size: 13px; box-shadow: 0 0 0 2px #fff; }
.mk-label { background: #fff; border-radius: 8px; padding: 4px 8px; box-shadow: var(--sh-sm); font-size: 11px; line-height: 1.25; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.mk-label b { font-weight: 500; display: block; }
.mk-label .r { color: var(--ff-red-text); }
.mk-label img { width: 16px; height: 16px; border-radius: 50%; }
.leaflet-div-icon { background: transparent; border: 0; }
.mk-wrap { display: flex; align-items: center; justify-content: center; }
/* Compact markers for the small dashboard map (S01). */
.map-compact .mk-veh { width: 13px; height: 13px; font-size: 7.5px; box-shadow: 0 0 0 1.5px #fff, 0 1px 2px rgba(0, 0, 0, .25); }
.map-compact .mk-veh.amber { width: 19px; height: 19px; font-size: 10px; box-shadow: 0 0 0 2px #fff, 0 0 0 5px rgba(245, 165, 37, .3); }
.map-compact .mk-avatar { width: 18px; height: 18px; box-shadow: 0 0 0 2px var(--ff-ink); }
.map-compact .mk-alert { width: 14px; height: 14px; font-size: 7.5px; box-shadow: 0 0 0 2px #fff, 0 0 0 4.5px var(--ff-red); }
.map-compact .mk-label { padding: 3px 10px; gap: 6px; font-size: 13px; line-height: 1.2; }
.map-compact .mk-label img { width: 18px; height: 18px; }
/* Mid-size markers for the dispatch map (S16). */
.map-mid .mk-veh { width: 15px; height: 15px; font-size: 9px; box-shadow: 0 0 0 1.5px #fff, 0 1px 2px rgba(0, 0, 0, .25); }
.map-mid .mk-veh.amber { width: 24px; height: 24px; font-size: 13px; box-shadow: 0 0 0 2px #fff, 0 0 0 5.5px rgba(245, 165, 37, .3); }
.map-mid .mk-avatar { width: 24px; height: 24px; box-shadow: 0 0 0 2px var(--ff-ink); }
.map-mid .mk-alert { width: 22px; height: 22px; font-size: 11px; box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--ff-red); }
.map-pop { position: absolute; z-index: 600; background: #fff; border-radius: 16px; box-shadow: var(--sh-md); padding: 14px; }
/* ==========================================================================
   Shared page compositions
   ========================================================================== */
/* hero shipment card (dashboard + shipment detail) */
.hero-ship { padding: 24px; min-height: 470px; overflow: hidden; }
.hero-top { display: flex; justify-content: space-between; gap: 20px; position: relative; z-index: 3; }
.hero-flag { display: flex; width: fit-content; align-items: center; gap: 8px; height: 26px; padding: 0 10px 0 3px; border-radius: 999px; background: #fff; font-size: 11px; font-weight: 500; text-transform: uppercase; color: var(--ff-purple-text); box-shadow: var(--sh-xs); }
.hero-flag img { width: 20px; height: 20px; }
.hero-route { display: flex; align-items: center; gap: 7px; margin-top: 9.5px; font-size: 23px; line-height: 1.2; }
.hero-route .arrow { font-size: 18px; }
.hero-route .pill { height: 22px; margin-left: 4px; padding: 0 9px; font-size: 13px; }
.hero-meta { font-size: 12px; color: var(--ff-ink-3); margin-top: 6px; }
.hero-metrics { display: flex; gap: 28px; text-align: right; }
.hero-metrics .micro { font-size: 10.5px; }
.hero-metrics .v { font-size: 26px; line-height: 1.15; margin-top: 2px; font-variant-numeric: tabular-nums; }
.hero-metrics .s { font-size: 11.5px; margin-top: 3px; }
.hero-stage { position: relative; height: 250px; margin-top: 2px; }
.hero-ship .hero-stage { height: 235px; }
.hero-ship.is-compact { min-height: 468px; }
.hero-ship.is-short { min-height: 446px; }
.hero-ship.is-compact .hero-stage { height: 238.5px; }
.hero-stage .truck { position: absolute; left: 50%; top: 0; width: 437px; transform: translateX(-50%); pointer-events: none; }
.hero-track { position: relative; z-index: 3; margin-top: 4px; }
.ai-why-row { display: grid; grid-template-columns: 24px 1fr 64px; align-items: center; gap: 6px; padding: 3px 0; font-size: 13px; line-height: 20px; }
.ai-why-row .bar { height: 4px; background: var(--ff-ai-border); }
.ai-why-row .n { color: var(--ff-purple-text); font-weight: 500; font-variant-numeric: tabular-nums; }
.ai-action { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px; border-radius: 999px; background: #fff; margin-top: 8px; font-size: 13px; cursor: pointer; }
.ai-action:hover { box-shadow: 0 0 0 1px var(--ff-purple-border); }
.ai-action i.lead { font-size: 15px; color: var(--ff-purple); }
.ai-action .muted { color: var(--ff-ink-3); font-size: 12px; }
.ai-action .chev { margin-left: auto; color: var(--ff-ink-3); font-size: 11px; }
.rec-card { background: #fff; border-radius: 14px; padding: 14px; margin-top: 10px; }
.rec-card .rec-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.rec-card p { font-size: 12px; color: var(--ff-ink-2); margin: 8px 0 10px; line-height: 1.45; }
.rec-card .rec-actions { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.rec-card.done { opacity: .55; }
.auto-list .ai-auto { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 12px; }
.auto-list .ai-auto i { color: var(--ff-green); font-size: 15px; }
.auto-list .ai-auto .t { margin-left: auto; color: var(--ff-ink-3); }
/* settings layout */
.settings-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-nav { background: var(--ff-surface); border-radius: var(--r-card); padding: 8px; min-height: 100%; align-self: stretch; }
.settings-nav a { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 10px; margin-bottom: 4px; border-radius: 12px; font-size: 13px; color: var(--ff-ink-2); }
.settings-nav a i { font-size: 16px; color: var(--ff-ink-2); }
.settings-nav a:hover { background: rgba(255, 255, 255, .6); color: var(--ff-ink); }
.settings-nav a.active { background: #fff; color: var(--ff-ink); font-weight: 500; box-shadow: var(--sh-xs); }
.settings-nav a.active i { color: var(--ff-purple); }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-title { font-size: 17px; font-weight: 400; margin: 0; line-height: 1.3; }
.section-sub { font-size: 12.5px; color: var(--ff-ink-2); margin-top: 4px; max-width: 620px; }
/* agent cards */
.agent-card { display: flex; flex-direction: column; }
.agent-card { padding: 16px; }
.agent-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.agent-card .icon-tile.s34 { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; }
.agent-card-top .pill { height: 24px; padding: 0 10px; font-size: 13px; gap: 6px; }
.agent-name { margin-top: 11.5px; font-size: 15px; font-weight: 500; line-height: 20px; }
.agent-desc { margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--ff-ink-2); }
.agent-card .stats { display: grid; grid-template-columns: 215.5px minmax(0, 1fr); margin: 24.5px 0 0; padding-left: 12.5px; }
.agent-card .stats .v { font-size: 24px; line-height: 28px; }
.agent-card .stats .l { font-size: 12px; line-height: 16px; color: var(--ff-ink-3); margin-top: 4px; }
.agent-last { display: flex; align-items: center; gap: 13px; height: 48px; margin-top: 24px; padding: 0 13px; border-radius: 14px; background: #fff; font-size: 12px; }
.agent-last .tm { width: 31.5px; flex: none; font-size: 13px; color: var(--ff-ink-3); font-variant-numeric: tabular-nums; }
.agent-last .t { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-last .pill { height: 21px; font-size: 12px; padding: 0 9px; }
.agent-auto { display: flex; justify-content: space-between; margin: 11.5px 0 8.5px; font-size: 12px; line-height: 16px; color: var(--ff-ink-3); }
.agent-auto .v { color: var(--ff-ink); font-weight: 500; }
/* queue card (dispatch) */
.queue-card { background: var(--ff-surface); border-radius: 18px; padding: 14px; margin-bottom: 10px; cursor: pointer; }
.queue-card:hover { box-shadow: inset 0 0 0 1px var(--ff-border-strong); }
.queue-card.active { background: #fff; box-shadow: inset 0 0 0 1.5px var(--ff-purple); }
.stop-box { background: #fff; border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.queue-card.active .stop-box { background: var(--ff-surface); }
.stop-line { display: flex; align-items: center; gap: 10px; font-size: 13px; position: relative; padding: 3px 0; }
.stop-line .s-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ff-ink); flex: none; position: relative; z-index: 1; }
.stop-line .s-dot.hollow { background: #fff; box-shadow: inset 0 0 0 1.5px var(--ff-purple); }
.stop-line + .stop-line::before { content: ""; position: absolute; left: 3px; top: -10px; height: 16px; width: 1px; background: var(--ff-border-strong); }
.stop-line .t { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 12px; }
/* Dispatch queue cards (S16). */
.dispatch-grid { padding-top: 2px; }
.dq-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.dq-rail { margin-top: 2px; padding: 20px; background: #f1ecff; border: 1px solid var(--ff-ai-border); }
.dq-rail .ai-title { font-size: 15px; }
.dq-rail .kicker { margin-top: 2px; font-size: 11px; }
.dq-rail .rec-card { padding: 16px; margin-top: 12px; border-radius: 18px; }
.dq-rail .rec-title { font-size: 14px; }
.dq-rail .rec-card p { margin: 2px 0 4px; font-size: 13px; line-height: 20px; }
.dq-rail .rec-card .pill { height: 22px; padding: 0 8px; font-size: 13px; }
.dq-rail .rec-actions { gap: 8px; margin-top: 16px; }
.dq-rail .rec-actions .btn-ff { height: 32px; padding: 0 16px; font-size: 13px; }
.dq-timeline .gantt-inset { --gantt-pad: 12px; margin: 0 -20px; }
/* Auto-assign modal (S17). */
.assign-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 3.5px 0 12px; }
.assign-stats .stat-tile { padding: 15px 16px; }
.assign-stats .stat-label { font-size: 11.5px; line-height: 16px; }
.assign-stats .stat-value { margin-top: 2px; font-size: 25px; line-height: 30px; }
.assign-stats .stat-sub { margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--ff-ink-2); white-space: nowrap; }
[data-assign-table] thead th { height: 26px; padding-top: 0; padding-bottom: 4px; vertical-align: bottom; }
[data-assign-table] tbody td { height: 61px; }
.assign-why { font-size: 13.5px; }
.dq-timeline { padding-bottom: 15px; }
.dq-timeline .card-head { margin-bottom: 11px; }
.dq-head .card-sub { margin-top: 3px; }
.dq-filters { display: flex; gap: 8px; margin-bottom: 12px; }
.dq-filters .pill-filter { height: 30px; }
.dq-card { padding: 17px 16px 14.5px; margin-bottom: 14px; }
.dq-id { font-size: 13.5px; font-weight: 500; line-height: 20px; }
.dq-cust { display: flex; align-items: center; gap: 10px; margin-top: 13px; }
.dq-cust b { font-size: 14px; font-weight: 500; }
.dq-cust span { margin-left: -4px; font-size: 13px; color: var(--ff-ink-3); }
.dq-card .stop-box { margin: 13px 0 0; padding: 11px 12px; }
.dq-card .stop-line { padding: 0; font-size: 14px; line-height: 20px; }
.dq-card .stop-line + .stop-line { margin-top: 6px; }
.dq-card .stop-line + .stop-line::before { top: -14px; height: 22px; }
.dq-card .stop-line .s-dot { width: 8px; height: 8px; }
.dq-card .stop-line .t { font-size: 13.5px; }
.dq-card .stop-line .t:not([class*="t-"]) { color: var(--ff-ink-3); }
.dq-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 11.5px; font-size: 13.5px; }
/* vehicle / driver cards */
.veh-card { border: 1px solid var(--ff-border); border-radius: 22px; padding: 7.5px; background: #fff; cursor: pointer; }
.veh-card:hover { box-shadow: var(--sh-md); }
.veh-photo { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 193 / 91; background: var(--ff-surface); }
.veh-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.veh-photo .pill { position: absolute; top: 12px; height: 25px; padding: 0 10px; background: #fff; color: var(--ff-ink); font-size: 13.5px; box-shadow: var(--sh-xs); }
.veh-photo .pill.l { left: 12px; }
.veh-photo .pill.r { right: 12px; }
.veh-body { padding: 7px 7.5px 5.5px; }
.veh-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14.5px; }
.veh-grid { gap: 20px; }
.veh-table tbody td { height: 61px; }
.veh-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.veh-name { font-size: 22px; line-height: 28px; }
.veh-model { margin-top: 1px; font-size: 13px; line-height: 18px; color: var(--ff-ink-3); }
.veh-head .avatar { box-shadow: 0 0 0 2px #fff, var(--sh-sm); }
.veh-stats { display: grid; grid-template-columns: 78fr 117fr 113fr; margin-top: 12px; border-top: 1px solid var(--ff-border); border-bottom: 1px solid var(--ff-border); }
.veh-stats > div { position: relative; padding: 11.5px 0 12px 14px; }
.veh-stats > div:first-child { padding-left: 0; }
.veh-stats > div + div::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 14px; width: 1px; background: var(--ff-border); }
.veh-stats .micro { font-size: 11px; line-height: 14px; }
.veh-stats .v { margin-top: 2px; font-size: 14.5px; line-height: 20px; }
.veh-stats .bar { width: 66px; margin-top: 4.5px; }
.veh-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; font-size: 14px; line-height: 20px; color: var(--ff-ink-2); }
.veh-foot span { display: flex; align-items: center; gap: 6px; }
.veh-foot i { font-size: 16px; }
.drv-card { background: var(--ff-surface); border-radius: 20px; padding: 16px 16px 14px; cursor: pointer; }
.drv-card-head { display: flex; align-items: center; gap: 12px; }
.drv-card-head .t { font-size: 15px; font-weight: 500; line-height: 20px; }
.drv-card-head .s { margin-top: 2.5px; font-size: 13px; line-height: 18px; color: var(--ff-ink-3); }
.drv-card .mini-stats { grid-template-columns: 104px 104px minmax(0, 1fr); margin: 12px 0 0; padding: 12px 12px 11.5px; border-radius: 16px; }
.drv-card .mini-stats .v { font-size: 15px; line-height: 20px; }
.drv-card .mini-stats .l { margin-top: 2.5px; font-size: 13px; line-height: 18px; }
.drv-card .meta-line { margin-top: 8px; padding: 0; font-size: 14px; line-height: 20px; }
.drv-card .mini-stats + .meta-line { margin-top: 10px; }
.drv-card .meta-line i { font-size: 16px; }
.drv-card:hover { box-shadow: inset 0 0 0 1px var(--ff-border-strong); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-radius: 12px; padding: 10px 12px; margin: 12px 0 10px; }
.mini-stats .v { font-size: 13px; font-weight: 500; }
.mini-stats .l { font-size: 11.5px; color: var(--ff-ink-3); }
.meta-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ff-ink-2); padding: 3px 0; }
.meta-line i { font-size: 13px; color: var(--ff-ink-3); }
/* integration cards */
.int-card { display: flex; flex-direction: column; min-height: 221px; }
.int-card .icon-tile { width: 36px; height: 36px; font-size: 18px; }
.int-card .fs-15.mt-3 { margin-top: 20px !important; }
.int-card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ff-ink-3); padding-top: 16px; }
/* utility layout grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.grid-gap-16 { gap: 16px; }
.grid-gap-12 { gap: 12px; }
.grid-gap-10 { gap: 10px; }
.layout-rail { display: grid; grid-template-columns: minmax(0, 1fr) 238px; gap: var(--gutter); align-items: start; }
.layout-rail-r { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gutter); align-items: start; }
.layout-form { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: var(--gutter); align-items: start; }
/* ==========================================================================
   Page-specific compositions
   ========================================================================== */
/* modal widths measured from screenshots (CSS px) */
.modal-ff.w-520 .modal-dialog { max-width: 520px; }
.modal-ff.w-560 .modal-dialog { max-width: 560px; }
.modal-ff.w-600 .modal-dialog { max-width: 600px; }
.modal-ff.w-640 .modal-dialog { max-width: 640px; }
.modal-ff.w-760 .modal-dialog { max-width: 760px; }
.modal-ff.w-960 .modal-dialog { max-width: 960px; }
.modal-ff.w-800 .modal-dialog { max-width: 800px; }
.cmp-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cmp-tile { height: 118px; padding: 15px 16px 0; border: 1px solid var(--ff-border); border-radius: 16px; background: var(--ff-surface); }
.cmp-tile.proposed { background: var(--ff-lavender); border-color: var(--ff-purple); }
.cmp-tile .l { font-size: 13px; line-height: 18px; color: var(--ff-ink-2); }
.cmp-tile .tm { display: flex; align-items: baseline; gap: 8px; margin-top: 6.5px; }
.cmp-tile .tm small { font-size: 13px; color: var(--ff-ink-3); }
.cmp-tile .pill { height: 24px; margin-top: 9.5px; padding: 0 10px; font-size: 13px; }
.route-kv { margin-top: 15px; }
.route-kv .kv { height: 43px; padding: 0; border-top: 0; border-bottom: 1px solid var(--ff-border); font-size: 14px; }
.audit-note { display: flex; gap: 8px; margin-top: 20px; padding: 7px 14px; border-radius: var(--r-inner); background: var(--ff-surface); font-size: 13.5px; line-height: 18px; color: var(--ff-ink-2); }
.audit-note i { font-size: 14px; margin-top: 2px; }
.cmp-time { font-size: 27px; line-height: 28px; }
/* ---------- Overview ---------- */
.dash-grid-top { display: grid; grid-template-columns: minmax(0, 1fr) 464px; gap: var(--gutter); margin-bottom: var(--gutter); }
.dash-grid-bottom { display: grid; grid-template-columns: 440px minmax(0, 1fr); gap: var(--gutter); }
.dash-grid-bottom .map-card { height: auto !important; min-height: 248px; }
/* ---------- Shipments ---------- */
.flex-none { flex: none !important; }
.span-4 { grid-column: 1 / -1; }
.board { display: grid; grid-template-columns: repeat(5, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.board-col { background: var(--ff-surface); border-radius: var(--r-card); padding: 12px 10px 4px; min-height: 420px; }
.board-col .queue-card { background: #fff; color: inherit; }
.ship-grid { display: grid; grid-template-columns: minmax(0, 1fr) 586px; gap: var(--gutter); align-items: stretch; }
.ship-sub { display: grid; grid-template-columns: minmax(0, 1fr) 174px; gap: 20px; }
/* Route Agent recommendation card on shipment detail (S42). */
.ai-rec { background: #fff; border: 1px solid var(--ff-ai-border); border-radius: var(--r-card); overflow: hidden; }
.ai-rec-body { padding: 16px 16px; }
.ai-rec-title { margin: 11.5px 0 7.5px; font-size: 16px; }
.ai-rec-row { display: flex; gap: 16px; padding: 4.5px 0; font-size: 13.5px; line-height: 20px; }
.ai-rec-row .micro { flex: none; width: 108px; font-size: 11px; line-height: 20px; }
.ai-rec-metrics { display: grid; grid-template-columns: 184px 184px minmax(0, 1fr); margin-top: 10.5px; padding: 12.5px 12px; border-radius: var(--r-inner); background: var(--ff-surface); }
.ai-rec-metrics b { display: block; font-size: 14.5px; font-weight: 500; line-height: 20px; }
.ai-rec-metrics span { display: block; margin-top: 1px; font-size: 12px; line-height: 18px; color: var(--ff-ink-3); }
.ai-rec-foot { padding: 11px 12px 13px; border-top: 1px solid var(--ff-border); background: var(--ff-lavender); }
.ai-rec-note { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; color: var(--ff-ink-2); }
.ai-rec-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ai-rec-actions .btn-ff { font-size: 13px; }
.ship-side { height: 100%; }
.ship-side .micro { font-size: 10.5px; }
.ship-side .v { margin: 4px 0 14px; font-size: 13px; font-weight: 500; }
.doc-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 7px 8px 8px 11px; border-radius: var(--r-inner); background: #fff; }
.doc-row + .doc-row { margin-top: 8px; }
.doc-row .t { font-size: 13px; line-height: 18px; white-space: nowrap; }
.doc-row .s { font-size: 12.5px; line-height: 15px; }
.ai-rec.is-approved [data-ai-footer] { background: var(--ff-green-soft); }
/* ---------- Dispatch ---------- */
.dispatch-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr) 344px; gap: var(--gutter); align-items: start; }
.map-chip { cursor: pointer; }
/* ---------- Tracking ---------- */
.track-grid { display: grid; grid-template-columns: 312px minmax(0, 1fr); gap: var(--gutter); align-items: start; }
.track-map { height: 753px; position: sticky; top: 8px; }
.veh-panel {
  position: absolute;
  right: 18px;
  top: 18px;
  bottom: 18px;
  width: 338px;
  overflow-y: auto;
  z-index: 600;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--sh-md);
  padding: 16px;
  scrollbar-width: thin;
}
.veh-panel.d-none + * { right: 12px; }
.queue-card[data-veh-card]:focus-visible { outline: 2px solid var(--ff-purple); outline-offset: 2px; }
/* ---------- Routes ---------- */
.route-grid { display: grid; grid-template-columns: 379px minmax(0, 1fr); gap: var(--gutter); align-items: stretch; padding-top: 2px; }
.route-map { min-height: 853px; }
.route-list { padding: 19px 20px 18px; }
.route-driver { display: flex; align-items: center; gap: 12px; margin: 15px 0 12.5px; padding: 13px 12px; background: #fff; border-radius: 20px; }
.route-driver .t { font-size: 14px; font-weight: 500; line-height: 16px; }
.route-driver .s { font-size: 13px; color: var(--ff-ink-3); line-height: 16px; margin-top: 2px; }
.route-stop { display: flex; align-items: center; gap: 12px; min-height: 54px; border-top: 1px solid var(--ff-border); }
.route-stop .mk-num { width: 24px; height: 24px; font-size: 12px; box-shadow: none; flex: none; }
.route-stop .mk-num.moved { background: var(--ff-purple); }
.route-applied .route-stop .mk-num.moved { background: var(--ff-ink); }
.route-stop .brand-tile { margin-right: 2px; }
.route-stop .t { font-size: 14px; font-weight: 500; line-height: 20px; }
.route-stop .s { font-size: 13px; color: var(--ff-ink-3); line-height: 18px; }
.route-stop .s.has-note { color: var(--ff-purple-text); }
.route-applied .route-stop .s.has-note { color: var(--ff-ink-3); }
.route-stop .eta { font-size: 13.5px; font-weight: 600; line-height: 20px; }
.route-card { position: absolute; right: 17px; top: 286px; width: 420px; background: #fff; border-radius: 20px; box-shadow: var(--sh-md); padding: 19px 20px 16px; z-index: 600; }
.route-metrics { width: 100%; font-size: 13px; border-collapse: collapse; }
.route-metrics th { font-size: 10.5px; font-weight: 500; text-transform: uppercase; color: var(--ff-ink-3); padding: 0 0 8px; text-align: right; }
.route-metrics th:first-child, .route-metrics td:first-child { text-align: left; }
.route-metrics td:first-child { color: var(--ff-ink-2); }
.route-card-head { display: flex; align-items: center; gap: 14px; }
.route-metrics td { padding: 8.5px 0; border-top: 1px solid var(--ff-border); text-align: right; white-space: nowrap; }
body:not(.route-applied) [data-when="applied"], body.route-applied [data-when="proposal"] { display: none !important; }
/* ---------- Exceptions ---------- */
.exc-strip { display: grid; grid-template-columns: 185.5fr 229.5fr 271fr 256.5fr 312fr 131.5fr; gap: 14px 0; align-items: start; margin-bottom: 20px; padding: 17.5px 20px 17px; }
.exc-strip .micro { font-size: 10.5px; line-height: 14px; }
.exc-strip .v { display: flex; align-items: center; gap: 8px; min-height: 22px; margin-top: 7.5px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.case-card .card-head { margin-bottom: 16px; }
.case-tl .vt-item { padding-bottom: 13.5px; }
.case-tl .vt-item:last-child { padding-bottom: 0; }
.case-tl .vt-time { font-size: 13.5px; gap: 8px; }
.case-tl .vt-time:has(.vt-orb) { min-height: 24px; margin-top: 4px; }
.case-tl .vt-title { margin-top: 2.5px; line-height: 20px; }
.case-tl .vt-meta { margin-top: 2px; line-height: 18px; }
.vt-orb { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ff-lavender); }
.note-form { display: flex; align-items: center; gap: 8px; height: 40px; margin-top: 19.5px; padding: 0 6px 0 16px; border-radius: 999px; background: #fff; }
.note-form input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 14px; outline: none; }
.note-form input::placeholder { color: var(--ff-ink-3); }
.note-form .btn-icon { width: 28px; height: 28px; }
.exc-rec .ai-rec-foot { padding: 12.5px 16px; }
.exc-rec .ai-rec-actions { margin-top: 0; }
.exc-rec .ai-rec-metrics { margin-top: 7px; }
.exc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: var(--gutter); align-items: start; }
.rules-list { border: 1px solid var(--ff-border); border-radius: 18px; padding: 4px 16px; }
.rule-row { display: flex; align-items: center; gap: 12px; padding: 10.5px 0; border-top: 1px solid var(--ff-border); }
.rule-row:first-child { border-top: 0; }
.rule-ico { width: 32px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--ff-surface); color: var(--ff-ink); font-size: 16px; }
.rule-line { display: flex; align-items: baseline; gap: 8px; font-size: 14px; line-height: 20px; }
.rule-line b { font-weight: 500; }
.rule-line .micro { width: 36px; flex: none; font-size: 11px; }
.rule-line.s { margin-top: 1.5px; font-size: 13px; line-height: 18px; color: var(--ff-ink-2); }
.rule-row .pill { height: 22px; padding: 0 9px; font-size: 13px; }
.new-rule-link:has(+ [data-new-rule]:not(.d-none)) { display: none; }
.new-rule { margin-top: 16px; padding: 12.5px 16px 16px; border: 1px solid var(--ff-border); border-radius: 18px; background: #fff; }
.new-rule .row { --bs-gutter-x: 12px; }
.new-rule .modal-section-label { margin-top: 0; }
.new-rule-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 12px; }
.new-rule .input-ff { border: 1px solid var(--ff-border); }
.new-rule .input-ff::placeholder { color: var(--ff-ink-2); }
.sugg-rule { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px 16px; border-radius: 18px; }
.sugg-rule .kicker { font-size: 11.5px; }
.sugg-rule .t { max-width: 395px; margin-top: 3px; font-size: 14px; line-height: 18px; }
.sugg-rule .btn-ff { margin-left: auto; }
.modal-body > .rules-seg:first-child { margin-top: 3px; }
.desc-wide .modal-desc { max-width: calc(100% - 60px); }
.rules-seg .seg-btn { height: 32px; padding: 0 16px; font-size: 14px; }
/* ---------- Drivers & vehicles ---------- */
.drv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.veh-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gutter); align-items: start; }
/* ---------- Customers ---------- */
.contact-row { display: flex; align-items: center; gap: 16px; padding: 12.5px 16px; border-radius: 14px; background: var(--ff-lavender); border: 1px solid var(--ff-purple-border); margin-top: 8px; flex-wrap: wrap; }
.contact-row .avatar { margin-right: -4px; }
.contact-row .who { width: 177px; }
.contact-row .who .t { font-size: 13.5px; font-weight: 500; line-height: 20px; }
.contact-row .who .s { font-size: 13px; line-height: 18px; color: var(--ff-ink-3); }
.contact-row .mail, .contact-row .tel { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.contact-row .mail { flex: 1; min-width: 0; }
.contact-row .tel { width: 157px; }
.contact-row .tag-slot { display: flex; justify-content: flex-end; width: 59px; }
.contact-row .tag { height: 25px; padding: 0 9px; font-size: 13px; box-shadow: none; }
.contact-row .tag:not(.t-purple) { color: var(--ff-ink-2); }
.cust-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--gutter); align-items: start; }
.cust-row { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--gutter); }
.cust-row2 { display: grid; grid-template-columns: minmax(0, 1fr) 379px; gap: var(--gutter); align-items: start; }
/* ---------- Inbox ---------- */
.inbox-grid { display: grid; grid-template-columns: 359px minmax(0, 1fr) 300px; gap: var(--gutter); align-items: start; }
.thread-card { width: 100%; border: 0; background: var(--ff-surface); border-radius: 20px; padding: 11px 14px 11px 18px; text-align: left; }
.thread-card:hover { box-shadow: inset 0 0 0 1px var(--ff-border-strong); }
.thread-card.active { background: #fff; box-shadow: inset 0 0 0 1.5px var(--ff-purple); }
.thread-prev { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3.5px; font-size: 12.5px; line-height: 16px; color: var(--ff-ink-2); }
.thread-list { display: flex; flex-direction: column; gap: 12px; }
.thread-in { display: flex; gap: 11px; }
.thread-top { display: flex; justify-content: space-between; align-items: baseline; }
.thread-top .n { font-size: 13.5px; font-weight: 500; line-height: 20px; }
.thread-top .tm { font-size: 13px; color: var(--ff-ink-3); }
.thread-org { margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--ff-purple-text); }
.convo { padding: 0; display: flex; flex-direction: column; min-height: 799px; }
.convo-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--ff-border); }
.convo-body { flex: 1; display: flex; flex-direction: column; padding: 6px 18px 18px; overflow-y: auto; }
.convo-body > :first-child { margin-top: auto; }
.convo-day { font-size: 10.5px; }
.composer { margin: 0 12px 12px; background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: inset 0 0 0 1.5px var(--ff-purple-border); }
.composer-text { display: block; width: 100%; border: 0; resize: none; background: var(--ff-surface); border-radius: 10px; padding: 10px 12px; margin-top: 10px; font: inherit; font-size: 13px; line-height: 1.5; outline: none; color: var(--ff-ink); }
.composer-text[readonly] { cursor: default; }
.convo-rail { min-width: 0; }
.suggest-row { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--ff-border); background: #fff; border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; font-size: 13px; text-align: left; }
.suggest-row:hover { border-color: var(--ff-purple-border); }
.ai-chip-btn { height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--ff-purple-border); background: #fff; color: var(--ff-purple-text); font-size: 11.5px; font-weight: 500; }
.ai-chip-btn:hover { background: var(--ff-lavender); }
/* ---------- AI agents ---------- */
.agents-hero { display: flex; justify-content: space-between; gap: 24px; margin-top: 20px; padding: 24px; }
.agents-hero-main { min-width: 0; margin-top: -1px; }
.agents-live { display: flex; align-items: center; gap: 12px; height: 28px; font-size: 11px; color: #b9b9be; }
.agents-headline { margin: 38px 0 0; font-size: 22px; line-height: 30px; }
.agents-kpis { display: flex; gap: 33px; margin-top: 35.5px; }
.agents-kpis .l { font-size: 11px; line-height: 16px; color: #9b9ba1; text-transform: uppercase; }
.agents-kpis .v { margin-top: 1.5px; font-size: 26px; line-height: 30px; }
.t-lime { color: var(--ff-lime); }
.agents-policy { display: flex; gap: 25px; flex: none; }
.dark-sub { width: 235px; background: #1e1e22; border-radius: 16px; padding: 19px 21px 0; }
.dark-sub .t { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; line-height: 20px; }
.dark-sub .t i { font-size: 16px; }
.dark-sub .i { display: flex; align-items: center; gap: 5px; font-size: 12px; line-height: 24px; color: #c9c9ce; }
.dark-sub .t + .i { margin-top: 2px; }
.dark-sub .i i { font-size: 14px; }
.dark-sub .ph-check-circle, .dark-sub .ph-check { color: var(--ff-lime); }
.dark-sub .ph-lock-simple { color: var(--ff-purple-soft); }
.agent-card { color: inherit; }
.agent-card:hover { box-shadow: inset 0 0 0 1px var(--ff-border-strong); color: inherit; }
.agent-toggle { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 10px; border-radius: 999px; background: var(--ff-green-soft); color: var(--ff-green-text); font-size: 13px; font-weight: 500; cursor: pointer; }
.agent-toggle.off { background: var(--ff-surface-2); color: var(--ff-ink-2); }
.agent-layout { grid-template-columns: minmax(0, 1fr) 379px; }
.agent-hero { display: flex; align-items: center; gap: 25px; padding: 20px 23px; }
.agent-hero .icon-tile { width: 72px; height: 72px; border-radius: 18px; font-size: 34px; }
.agent-hero .kicker { text-transform: none; font-size: 11.5px; line-height: 16px; color: #9b9ba1; }
.agent-hero p { margin: 8px 0 0; font-size: 21.5px; line-height: 27px; }
.agent-stats { padding: 18.5px 24px 20px; }
.agent-stats-grid { display: grid; grid-template-columns: 350px 256px 298px minmax(0, 1fr); }
.agent-stats .stat-label { line-height: 16px; }
.agent-stats .v { margin-top: 5.5px; font-size: 32px; line-height: 36px; }
.agent-stats .s { margin-top: 6px; font-size: 12px; line-height: 16px; color: var(--ff-ink-3); }
.agent-stats-bar { display: flex; gap: 4px; margin-top: 16px; }
.agent-stats-bar i { height: 8px; border-radius: 4px; background: #d6d6d2; }
.agent-stats-bar i.ok { background: var(--ff-green); }
.agent-stats-bar i.wait { background: var(--ff-amber); }
.caps-card { padding-bottom: 21px; }
.caps-card .card-head { margin-bottom: 13.5px; }
.cap-row { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 15.5px 0 16px; border-radius: 6px; background: #fff; }
.cap-row + .cap-row { margin-top: 5px; }
.cap-row > i { font-size: 16px; color: var(--ff-ink-2); }
.cap-row .t { font-size: 13.5px; font-weight: 500; line-height: 18px; }
.cap-row .s { font-size: 12px; line-height: 16px; color: var(--ff-ink-3); padding-bottom: 3.5px; }
.cap-row .levels { padding: 3px; border-radius: 11px; }
.cap-row .level-btn { padding: 0 10.5px; font-size: 12px; }
.actions-card { padding: 17px 20px 16px; }
.actions-card .legend { margin-left: 22px; }
.legend i.sq.purple { background: var(--ff-purple); }
.actions-card .chart-box { height: 94px; }
.guard-card { padding-bottom: 19.5px; }
.guard-card .toggle-row { padding: 10.5px 0 12px; }
.guard-card .toggle-row:last-child { padding-bottom: 0; }
.guard-card .row-title { font-size: 13.5px; line-height: 20px; }
.guard-card .row-sub { margin-top: 2.5px; line-height: 16px; }
.decisions-card { padding-bottom: 18px; }
.decisions-card .card-head { margin-bottom: 14px; }
.decision { display: flex; gap: 12px; padding: 11px 12px 9px; border-radius: 14px; background: #fff; }
.decision + .decision { margin-top: 16px; }
.decision .avatar { margin-top: 1px; }
.decision .t { font-size: 13.5px; font-weight: 500; line-height: 20px; }
.decision .s { margin-top: 2.5px; font-size: 12px; line-height: 16px; color: var(--ff-ink-3); }
.decision .pill { margin-top: 5.5px; font-size: 12px; }
.agents-paused .seg-meter i.on { background: #cfcfcb; }
/* ---------- Analytics ---------- */
.analytics-layout { grid-template-columns: minmax(0, 1fr) 420px; }
.an-split { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 28px; }
.analyst { padding: 18px; }
.analyst-thread { flex: 1; }
/* ---------- Settings ---------- */
.settings-2col { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: var(--gutter); align-items: start; }
.level-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.level-card { text-align: left; border: 0; background: var(--ff-surface); border-radius: 16px; padding: 14px; cursor: pointer; }
.level-card:hover { box-shadow: inset 0 0 0 1px var(--ff-border-strong); }
.level-card.active { background: var(--ff-lavender); box-shadow: inset 0 0 0 1.5px var(--ff-purple); }
.level-card .dashes { display: inline-flex; gap: 4px; }
.level-card .dashes i { width: 12px; height: 3px; border-radius: 2px; background: #d6d6d3; display: block; }
.level-card .dashes i.on { background: var(--ff-purple); }
.plan-card { border: 1px solid var(--ff-border); border-radius: 16px; padding: 18px; height: 100%; display: flex; flex-direction: column; }
.plan-card .mt-3:last-child { margin-top: auto !important; padding-top: 12px; }
.plan-card.current { background: var(--ff-lavender); border-color: var(--ff-purple); box-shadow: 0 0 0 1px var(--ff-purple); }
.plan-price { font-size: 36px; line-height: 1.1; }
.notif-matrix tbody td { height: 54px; }
.notif-matrix tr.grp td { height: 34px; background: #fff; padding-top: 12px; }
.map-card.is-full { position: fixed !important; inset: 16px; z-index: 1050; height: auto !important; box-shadow: var(--sh-lg); }
.map-color .leaflet-tile-pane { filter: none !important; }
.table-ff.tight th, .table-ff.tight td { padding-left: 8px; padding-right: 8px; }
.table-ff.tight .fw-500 { white-space: nowrap; }

/* ---------- Exceptions: log modal */
.log-types .choice-chip { height: 29px; }
textarea.input-ff.log-text { height: 96px; }
.log-also { margin-top: 17px; padding: 15.5px 16px 15px; border-radius: 16px; }
.log-also .kicker { font-size: 11.5px; }
.log-also-item { display: flex; align-items: flex-start; gap: 12px; margin-top: 10px; cursor: pointer; }
.log-also-item .check-ff { margin-top: 2px; }
.log-also-item .t { display: block; font-size: 14.5px; font-weight: 500; line-height: 20px; }
.log-also-item .s { display: block; margin-top: 2px; font-size: 13px; color: var(--ff-ink-3); line-height: 18px; }
.log-photos { display: flex; align-items: center; gap: 16px; margin-top: 16.5px; font-size: 13.5px; color: var(--ff-ink-3); }
.log-photos .btn-ff { height: 32px; }

/* ---------- Agent check lists (driver and vehicle rails) */

.agent-checks { margin-top: 11.5px; padding: 4px 16px; border-radius: 16px; background: #fff; }
.agent-check { display: flex; align-items: center; gap: 12px; padding: 10.75px 0; border-top: 1px solid var(--ff-border); }
.agent-check:first-child { border-top: 0; }
.agent-check > i { flex: none; font-size: 18px; }
.agent-check > i.t-green { color: var(--ff-green); }
.card-title + .agent-check { border-top: 0; }
.agent-check .t { font-size: 14px; font-weight: 500; line-height: 20px; }
.agent-check .s { margin-top: 2.5px; font-size: 13px; line-height: 18px; color: var(--ff-ink-3); }
.t-amber-ic { color: var(--ff-amber); }
.rail-profile-head { display: flex; align-items: center; gap: 12px; }
.rail-profile-head .avatar { width: 46px; height: 46px; }
.rail-profile-head .t { font-size: 15px; font-weight: 500; line-height: 20px; }
.rail-profile-head .micro { margin-top: 3px; font-size: 11.5px; }
.rail-tags { display: flex; flex-wrap: wrap; gap: 8.5px; margin-top: 18px; }
.rail-tags .tag { padding: 0 8px; font-size: 13px; box-shadow: none; }
.onboard-card { padding-top: 17.5px; }
.onboard-card .card-title { margin-bottom: 6.5px; }
.onboard-card .toggle-row { padding: 10.5px 0; }
.onboard-card .toggle-row .row-title { font-size: 14.5px; line-height: 20px; }
.onboard-card .toggle-row .row-sub { margin-top: 3px; font-size: 13.5px; line-height: 18px; }
.onboard-card .lock-note { margin-top: 17px; line-height: 18px; }

/* ---------- Vehicles: Fleet Agent rail */
.fleet-rail { padding: 20px 20px 13px; }
.fleet-rail .ai-head { gap: 12px; }
.fleet-rail .ai-title { font-size: 15px; line-height: 20px; }
.fleet-rail .kicker { font-size: 11.5px; line-height: 16px; }
.fleet-intro { margin: 16px 0 0; font-size: 15px; line-height: 19.5px; }
.fleet-rail .rec-card { margin-top: 17px; padding: 16.5px 16px 14.5px; border-radius: 20px; }
.fleet-intro + .rec-card { margin-top: 20px; }
.fleet-rail .rec-title { gap: 10px; font-size: 14px; font-weight: 600; line-height: 20px; }
.fleet-rail .num-chip { width: auto; min-width: 29px; height: 22px; padding: 0 6px; border-radius: 8px; font-size: 13px; }
.fleet-rail .rec-card p { margin: 11px 0 0; font-size: 13px; line-height: 16px; }
.fleet-rail .rec-card .pill { height: 22.5px; margin-top: 12px; padding: 0 8px; font-size: 13px; }
.fleet-rail .rec-actions { gap: 8px; margin-top: 12.5px; }
.fleet-rail .rec-actions .btn-ff { height: 30px; padding: 0 13px; font-size: 13px; }
.fleet-auto-label { margin-top: 21px; font-size: 11px; }
.fleet-rail .ai-auto { font-size: 13px; }
.veh-rail-photo { aspect-ratio: 360 / 123; }
.veh-rail-head { display: flex; align-items: flex-start; justify-content: space-between; margin-top: 12px; }
.veh-rail-head .t { font-size: 15px; font-weight: 500; line-height: 20px; }
.veh-rail-head .micro { margin-top: 3px; font-size: 11.5px; line-height: 16px; }
.veh-rail-tags { margin-top: 10px; }

/* ---------- Customers: agent insight cards */
.insight-card { padding: 16px; }
.insight-card .kicker { font-size: 10.5px; }
.insight-tag { height: 21px; padding: 0 8px; font-size: 11.5px; text-transform: uppercase; }
.insight-body { display: flex; gap: 12px; margin-top: 14px; }
.insight-body .t { font-size: 13px; font-weight: 500; line-height: 18px; }
.insight-body .s { margin-top: 3px; font-size: 12px; line-height: 18px; color: var(--ff-ink-2); }
.insight-card .link-ff { margin-top: 9px; }
.acme-chart { height: 152px; margin: 8px -6px 0 0; }

/* ---------- Customer overview: account brief */
.acct-brief { margin-top: 20px; padding: 18px 24px 21.5px; }
.acct-brief .kicker { font-size: 11.5px; }
.acct-brief-text { margin: 14px 0 0; font-size: 21.5px; line-height: 28px; }
.acct-brief-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.acct-brief-tags .tag { height: 24px; padding: 0 10px; font-size: 13px; box-shadow: none; }
.acct-opportunity { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 13px; padding: 9.75px 16px; border-radius: 14px; background: #fff; }
.acct-opportunity .micro { font-size: 12px; line-height: 16px; color: var(--ff-lime-text); }
.acct-opportunity .t { margin-top: 4px; font-size: 14px; line-height: 20px; }
.acct-brief-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }

/* ---------- Customer overview: account brief modal */
.brief-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.brief-tiles .stat-tile { padding: 10px 16px; border-radius: 16px; }
.brief-tiles .stat-label { font-size: 12.5px; line-height: 16px; }
.brief-tiles .stat-value { margin-top: 3.5px; font-size: 22.5px; line-height: 28px; }
.brief-tiles .stat-sub { margin-top: 2.5px; font-size: 13.5px; line-height: 18px; }
.brief-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16.5px; margin-top: 17px; }
.brief-col { padding: 15px 16px 16.5px; border: 1px solid var(--ff-border); border-radius: 16px; background: #fff; }
.brief-col h4 { margin: 0; font-size: 15px; font-weight: 500; line-height: 21px; }
.brief-item { display: flex; gap: 10px; margin-top: 11.8px; font-size: 14px; line-height: 18px; color: var(--ff-ink-2); }
.brief-item i { flex: none; margin-top: 1px; font-size: 16px; }
.t-green-ic { color: var(--ff-green); }
.brief-rec { margin-top: 16.5px; padding: 13px 16px 14.8px; border-radius: 16px; }
.brief-rec .kicker { font-size: 12px; }
.brief-rec p { margin: 9.2px 0 0; font-size: 14px; line-height: 18px; }
.brief-rec-src { display: flex; align-items: center; gap: 8px; margin-top: 11.5px; font-size: 13.5px; line-height: 18px; color: var(--ff-ink-3); }
.acct-ships .list-row { padding: 12.3px 0; }
.cust-grid .tab-ff { height: 43px; }
.head-pill { height: 24px; padding: 0 10px; font-size: 14px; }

/* ---------- Communication: new message modal */
.msg-meta { display: grid; grid-template-columns: 135px minmax(0, 1fr); gap: 16px; margin-top: 15px; }
.msg-box { display: block; height: auto; padding: 10px 12px; }
.msg-box textarea { display: block; width: 100%; border: 0; background: transparent; outline: none; font: inherit; line-height: 19px; resize: none; }


/* ---------- Agents: pause modal */
.pause-list { padding: 4px 16px; border-radius: 16px; background: var(--ff-surface); }
.pause-row { display: flex; align-items: center; gap: 12.5px; min-height: 62px; }
.pause-row + .pause-row { min-height: 63px; border-top: 1px solid var(--ff-border); }
.pause-row .icon-tile { width: 32px; height: 32px; border-radius: 9px; font-size: 16px; }
.pause-row .t { font-size: 13.5px; font-weight: 500; line-height: 20px; }
.pause-row .s { margin-top: 1.5px; font-size: 12px; line-height: 16px; color: var(--ff-ink-3); }
#pauseModal textarea.input-ff { height: 71.5px; min-height: 0; resize: none; }
