/* Approved light theme (7 Nov 2026 dashboard): colourful icon tiles and tinted cards.
   Loads after bulls-ui.css. Navigation, grouping and behaviour stay as they are.
   Dark mode keeps the same tiles (white glyph on a saturated chip) so labels stay readable. */

:root {
  --c-blue: #007AFF;
  --c-indigo: #5856D6;
  --c-green: #34C759;
  --c-orange: #FF9500;
  --c-red: #FF3B30;
  --c-purple: #AF52DE;
  --c-teal: #30B0C7;
  --c-pink: #FF2D55;
  --c-gray: #8E8E93;
  --c-gold: #D1A318;
}

/* ---------- sidebar: one colour per item, gold when it is the current page ---------- */
html .shell .side .nav :is(a, .nav-acc-btn, .nav-acc-back) { --t: var(--c-blue) !important; }
html .shell .side .nav :is(a, .nav-acc-btn, .nav-acc-back) > svg {
  background: linear-gradient(180deg, color-mix(in srgb, var(--t) 78%, #fff), var(--t)) !important;
  color: #fff !important;
  stroke: #fff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18), inset 0 0 0 .5px rgba(0, 0, 0, .08) !important;
}
html .shell .side .nav :is(a, .nav-acc-btn, .nav-acc-back):is([data-nav=welcome], [data-nav=dashboard], [data-nav=carriers], [data-nav=company], [data-nav=time-clock], [data-nav=settings], [data-nav=dept-partners]) { --t: var(--c-indigo) !important; }
html .shell .side .nav :is(a, .nav-acc-btn, .nav-acc-back):is([data-nav=my], [data-nav=dept-dispatch], [data-nav=dept-billing], [data-nav=dispatch], [data-nav=loads], [data-nav=documents], [data-nav=data], [data-nav=invoices]) { --t: var(--c-blue) !important; }
html .shell .side .nav :is(a, .nav-acc-btn, .nav-acc-back):is([data-nav=dept-accounting], [data-nav=pnl], [data-nav=settlements], [data-nav=carrier-pay], [data-nav=drivers], [data-nav=check-calls], [data-nav=receivables], [data-nav=payables], [data-nav=driver-scores], [data-nav=home-time]) { --t: var(--c-green) !important; }
html .shell .side .nav :is(a, .nav-acc-btn, .nav-acc-back):is([data-nav=chat], [data-nav=quick-quote], [data-nav=locations], [data-nav=billing-queue], [data-nav=statements], [data-nav=rates], [data-nav=office], [data-nav=vendor-health]) { --t: var(--c-teal) !important; }
html .shell .side .nav :is(a, .nav-acc-btn, .nav-acc-back):is([data-nav=dept-fleet], [data-nav=dept-maintenance], [data-nav=dept-fuel], [data-nav=trucks], [data-nav=trailers], [data-nav=maintenance], [data-nav=tires], [data-nav=work-orders], [data-nav=service-lines], [data-nav=equipment], [data-nav=fuel], [data-nav=costs]) { --t: var(--c-orange) !important; }
html .shell .side .nav :is(a, .nav-acc-btn, .nav-acc-back):is([data-nav=dept-safety], [data-nav=dept-operations], [data-nav=safety], [data-nav=incidents], [data-nav=inspections], [data-nav=yard-safety], [data-nav=compliance], [data-nav=dq], [data-nav=claims], [data-nav=breakdowns], [data-nav=planner]) { --t: var(--c-red) !important; }
html .shell .side .nav :is(a, .nav-acc-btn, .nav-acc-back):is([data-nav=dept-reports], [data-nav=reports], [data-nav=ai], [data-nav=margin], [data-nav=scorecards], [data-nav=rfqs], [data-nav=leads], [data-nav=commissions], [data-nav=tax]) { --t: var(--c-purple) !important; }
html .shell .side .nav :is(a, .nav-acc-btn, .nav-acc-back):is([data-nav=dept-sales], [data-nav=dept-hr], [data-nav=customers], [data-nav=team], [data-nav=people], [data-nav=hiring]) { --t: var(--c-pink) !important; }
html .shell .side .nav :is(a, .nav-acc-btn, .nav-acc-back):is([data-nav=dept-admin], [data-nav=billing], [data-nav=help], [data-nav=connections], [data-nav=security]) { --t: var(--c-gray) !important; }
html .shell .side .nav a.on > svg,
html .shell .side .nav a[aria-current=page] > svg {
  background: var(--c-gold) !important;
  color: #1d1d1f !important;
  stroke: #1d1d1f !important;
}

/* ---------- department tiles and hub icons ---------- */
html .shell .card.dept-tile .dt-ic,
html:not([data-theme=dark]) .shell .card.ds-dhero .dt-ic.lg,
html[data-theme=dark] .shell .card.ds-dhero .dt-ic.lg {
  background: linear-gradient(180deg, color-mix(in srgb, var(--dc, var(--c-blue)) 72%, #fff), var(--dc, var(--c-blue))) !important;
  color: #fff !important;
}
html .shell .card.dept-tile .dt-ic svg,
html .shell .card.ds-dhero .dt-ic.lg svg { stroke: #fff !important; color: #fff !important; }
html .shell [data-dept=dispatch] { --dc: var(--c-blue); }
html .shell [data-dept=billing] { --dc: var(--c-blue); }
html .shell [data-dept=fuel] { --dc: var(--c-orange); }
html .shell [data-dept=partners] { --dc: var(--c-indigo); }
html .shell [data-dept=sales] { --dc: var(--c-pink); }
html .shell [data-dept=safety] { --dc: var(--c-red); }
html .shell [data-dept=maintenance] { --dc: var(--c-orange); }
html .shell [data-dept=hr] { --dc: var(--c-pink); }
html .shell [data-dept=accounting] { --dc: var(--c-green); }
html .shell [data-dept=operations] { --dc: var(--c-red); }
html .shell [data-dept=admin] { --dc: var(--c-gray); }
html .shell [data-dept=planner] { --dc: var(--c-purple); }
html .shell [data-dept=fleet] { --dc: var(--c-teal); }
html .shell [data-dept=reports] { --dc: var(--c-purple); }

/* ---------- shared card language: colour chip on each section heading ---------- */
.shell .card:nth-child(6n+1) { --chip: var(--c-indigo); }
.shell .card:nth-child(6n+2) { --chip: var(--c-blue); }
.shell .card:nth-child(6n+3) { --chip: var(--c-orange); }
.shell .card:nth-child(6n+4) { --chip: var(--c-green); }
.shell .card:nth-child(6n+5) { --chip: var(--c-red); }
.shell .card:nth-child(6n+6) { --chip: var(--c-teal); }
.shell .card > h2,
.shell .card > .row > h2,
.shell .card > .row > .grow > h2,
.shell .card .tone-h {
  display: flex;
  align-items: center;
  gap: 10px;
}
.shell .card > h2:not(:has(.tone-ic))::before,
.shell .card > .row > h2:not(:has(.tone-ic))::before,
.shell .card > .row > .grow > h2:not(:has(.tone-ic))::before,
.modal > h2::before,
.upgrade h2::before,
.soonbox h2::before,
.clock-gate h1::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: none;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='4' width='6' height='6' rx='1'/><rect x='14' y='4' width='6' height='6' rx='1'/><rect x='4' y='14' width='6' height='6' rx='1'/><rect x='14' y='14' width='6' height='6' rx='1'/></svg>") center / 14px 14px no-repeat,
    linear-gradient(180deg, color-mix(in srgb, var(--chip, var(--c-blue)) 72%, #fff), var(--chip, var(--c-blue)));
}
.modal > h2::before,
.upgrade h2::before,
.soonbox h2::before { display: inline-block; margin-right: 10px; vertical-align: -8px; }
.clock-gate { --chip: var(--c-orange); }
.clock-gate h1 { display: flex; align-items: center; gap: 10px; }
.upgrade { --chip: var(--c-gold); }
.soonbox { --chip: var(--c-teal); }

.tone-card { border-top: 3px solid var(--tone, var(--chip, var(--c-indigo))) !important; }
.tone-indigo { --chip: var(--c-indigo); --tone: var(--c-indigo); }
.tone-blue { --chip: var(--c-blue); --tone: var(--c-blue); }
.tone-green { --chip: var(--c-green); --tone: var(--c-green); }
.tone-orange { --chip: var(--c-orange); --tone: var(--c-orange); }
.tone-red { --chip: var(--c-red); --tone: var(--c-red); }
.tone-purple { --chip: var(--c-purple); --tone: var(--c-purple); }
.tone-teal { --chip: var(--c-teal); --tone: var(--c-teal); }
.tone-pink { --chip: var(--c-pink); --tone: var(--c-pink); }
.tone-gray { --chip: var(--c-gray); --tone: var(--c-gray); }
.tone-ic {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  flex: none;
  color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone, var(--chip, var(--c-blue))) 70%, #fff), var(--tone, var(--chip, var(--c-blue))));
  box-shadow: 0 2px 6px -2px color-mix(in srgb, var(--tone, var(--chip, var(--c-blue))) 55%, transparent);
}
.tone-ic svg { width: 16px; height: 16px; stroke: #fff; color: #fff; }
.fact-rows { display: grid; margin: 4px 0 12px; }
.fact-rows > div {
  display: grid;
  grid-template-columns: minmax(7.5rem, 11rem) minmax(0, 1fr);
  gap: 8px 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--v-line, #E3E6EE);
}
.fact-rows dt { margin: 0; font-size: 12px; font-weight: 650; color: #1d1d1f; }
.fact-rows dd { margin: 0; font-weight: 600; }
.tone-note { font-size: 12.5px; line-height: 1.45; }
html[data-theme=dark] .fact-rows dt { color: #C7C7CC; }
html[data-theme=dark] .fact-rows > div { border-bottom-color: #3A3A3C; }
html[data-theme=dark] .tone-note { color: #C7C7CC; }

/* Light dashboard cards keep a soft tint. Dark cards stay solid so text stays AA. */
html:not([data-theme=dark]) .shell .card.kpi2 {
  background: linear-gradient(160deg, color-mix(in srgb, var(--k-c, var(--c-indigo)) 14%, #fff) 0%, #fff 62%) !important;
}
html:not([data-theme=dark]) .shell .card.kpi2::after { display: block !important; }

/* Stage counters: the dot and the top edge follow the stage colour. */
.shell .ctile { border-top: 3px solid var(--ct, var(--c-blue)) !important; }
.shell .ctile .ct-l::before { background: var(--ct, var(--c-blue)) !important; }

/* Empty states: one coloured chip instead of a grey box. */
.shell .empty .art {
  background: linear-gradient(180deg, #8E8CF5, var(--c-indigo)) !important;
  color: #fff !important;
}
.shell .empty .art svg,
.shell .empty .art img { stroke: #fff; color: #fff; filter: none; }

/* ---------- sign-in and sign-up: colourful choice cards, navy panel unchanged ---------- */
.edition-pick .plan-opt,
.acct-pick .plan-opt,
#plans .plan-opt {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
}
.edition-pick .plan-opt { --ed: var(--c-blue); }
.edition-pick .plan-opt:nth-child(2) { --ed: var(--c-purple); }
.edition-pick .plan-opt:nth-child(3) { --ed: var(--c-orange); }
.edition-pick .plan-opt:nth-child(4) { --ed: var(--c-teal); }
.acct-pick .plan-opt:nth-child(1) { --ed: var(--c-indigo); }
.acct-pick .plan-opt:nth-child(2) { --ed: var(--c-orange); }
.acct-pick .plan-opt:nth-child(3) { --ed: var(--c-blue); }
.acct-pick .plan-opt:nth-child(4) { --ed: var(--c-green); }
#plans .plan-opt { --ed: var(--c-blue); }
#plans .plan-opt:nth-child(2) { --ed: var(--c-indigo); }
#plans .plan-opt:nth-child(3) { --ed: var(--c-purple); }
#plans .plan-opt:nth-child(4) { --ed: var(--c-teal); }
#plans .plan-opt:nth-child(5) { --ed: var(--c-gray); }
.edition-pick .plan-opt::before,
.acct-pick .plan-opt::before,
#plans .plan-opt::before {
  content: "";
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='7' width='13' height='8' rx='1'/><path d='M16 11h3l2 3v2h-5'/><circle cx='7' cy='17' r='1.6'/><circle cx='18' cy='17' r='1.6'/></svg>") center / 16px 16px no-repeat,
    linear-gradient(180deg, color-mix(in srgb, var(--ed) 70%, #fff), var(--ed));
}
.acct-pick .plan-opt:nth-child(1)::before {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 20V6l8-3 8 3v14'/><path d='M9 20v-6h6v6'/></svg>") center / 16px 16px no-repeat,
    linear-gradient(180deg, color-mix(in srgb, var(--ed) 70%, #fff), var(--ed));
}
.acct-pick .plan-opt:nth-child(2)::before,
.edition-pick .plan-opt:nth-child(1)::before {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='7' width='13' height='8' rx='1'/><path d='M16 11h3l2 3v2h-5'/><circle cx='7' cy='17' r='1.6'/><circle cx='18' cy='17' r='1.6'/></svg>") center / 16px 16px no-repeat,
    linear-gradient(180deg, color-mix(in srgb, var(--ed) 70%, #fff), var(--ed));
}
.edition-pick .plan-opt:nth-child(2)::before,
.acct-pick .plan-opt:nth-child(4)::before {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'><circle cx='9' cy='8' r='3'/><path d='M3 19c1-3 3.5-4.5 6-4.5s5 1.5 6 4.5'/><circle cx='17' cy='9' r='2.2'/><path d='M16 14.5c2.2.3 3.8 1.4 4.8 3.5'/></svg>") center / 16px 16px no-repeat,
    linear-gradient(180deg, color-mix(in srgb, var(--ed) 70%, #fff), var(--ed));
}
.edition-pick .plan-opt:nth-child(3)::before,
.acct-pick .plan-opt:nth-child(3)::before {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 8h13l5 4v6H3z'/><path d='M3 8l3-4h8l2 4'/></svg>") center / 16px 16px no-repeat,
    linear-gradient(180deg, color-mix(in srgb, var(--ed) 70%, #fff), var(--ed));
}
.edition-pick .plan-opt:nth-child(4)::before {
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='7' width='18' height='10' rx='1'/><path d='M3 11h18M8 7v10M16 7v10'/></svg>") center / 16px 16px no-repeat,
    linear-gradient(180deg, color-mix(in srgb, var(--ed) 70%, #fff), var(--ed));
}
.edition-pick .plan-opt .ed-copy,
.acct-pick .plan-opt b,
#plans .plan-opt b { min-width: 0; }
.edition-pick .plan-opt .small,
.acct-pick .plan-opt .small { grid-column: 2; }
.auth-form .plan-opt:has(input:checked),
body.sup .plan-opt:has(input:checked) {
  border-color: var(--ed, var(--c-blue)) !important;
  background: color-mix(in srgb, var(--ed, var(--c-blue)) 10%, #fff) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ed, var(--c-blue)) 24%, transparent) !important;
}
html[data-theme=dark] .auth-form .plan-opt:has(input:checked),
html[data-theme=dark] body.sup .plan-opt:has(input:checked) {
  background: color-mix(in srgb, var(--ed, var(--c-blue)) 24%, #1C1C1E) !important;
  color: #F5F5F7;
}
#card-section {
  border: 1px solid var(--v-line, #E3E6EE);
  border-top: 3px solid var(--c-green);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 14px;
  background: #fff;
}
#card-section h2 { display: flex; align-items: center; gap: 10px; }
#card-section h2::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(180deg, #7BE495, var(--c-green));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
#total, .included {
  border-top: 3px solid var(--c-indigo);
}
html[data-theme=dark] #card-section {
  background: #1C1C1E;
  border-color: #3A3A3C;
  color: #F5F5F7;
}
html[data-theme=dark] #card-section h2 { color: #F5F5F7; }
@media (max-width: 420px) {
  .acct-pick .plans { grid-template-columns: 1fr !important; }
  .fact-rows > div { grid-template-columns: 1fr; gap: 2px; }
}


/* Keep the first-visit BULLS AI hint stacked on the launcher, and reserve a
   strip of the page so the fixed hint, launcher and Team chat tab never sit
   on Dashboard KPI tiles, charts or table text (Nick, 10 Nov 2026).
   Padding-bottom alone only cleared the last rows after you scroll; the
   helper is viewport-fixed, so mid-page cards in the first fold were covered. */
/* RB-37 (release nov14): the hint sits beside the launcher (left of it), below the Team chat pill, so it never covers that pill. */
.bulls-hint{
  box-sizing:border-box;
  right:calc(16px + 44px + 12px);
  left:auto;
  bottom:20px;
  max-width:148px;
  z-index:59;
  padding:8px 12px;
  font-size:12px;
  line-height:1.3;
}
.bulls-hint::after{
  right:-5px;
  bottom:16px;
  left:auto;
  top:auto;
  transform:rotate(45deg);
}
body.bulls-left .bulls-hint{right:auto;left:calc(16px + 44px + 12px)}
body.bulls-left .bulls-hint::after{right:auto;left:-5px}
@media (max-width:640px){
  .bulls-hint{display:none}
  /* #view is also .content; bulls-ui sets its padding with !important. */
  .shell .content,
  .shell #view{
    padding-right:16px !important;
    padding-left:16px !important;
    padding-bottom:max(176px, calc(16px + 44px + 8px + 40px + 16px + env(safe-area-inset-bottom, 0px))) !important;
    box-sizing:border-box;
  }
  /* P2-7 leftover: keep the last dashboard KPI (Active now) above the gold FAB at 390. */
  #dash-kpis{padding-bottom:calc(36px + 44px + 16px + env(safe-area-inset-bottom, 0px))}
  html, body, .shell, .shell #view, .shell .content{
    scroll-padding-bottom:calc(36px + 44px + 16px + env(safe-area-inset-bottom, 0px));
  }
  #dash-kpis, #dash-kpis .kpi2, #dash-kpis .kpi-grid > *{
    scroll-margin-bottom:calc(36px + 44px + 16px + env(safe-area-inset-bottom, 0px));
  }
  body.bulls-left .shell .content,
  body.bulls-left .shell #view{padding-right:16px !important;padding-left:16px !important}
}
/* P3: at 360 Active now is full width; keep its content above the FAB and chat tab while scrolling. */
@media (max-width:379px){
  #dash-kpis [data-testid=kpi-active]{padding-bottom:calc(36px + 44px + 16px + env(safe-area-inset-bottom, 0px))}
}
@media (min-width:641px){
  /* Must beat .shell .content{padding-right:80px !important} so the 148px hint fits. */
  /* RB-18 (release nov14): reserve the 200px gutter only while the Bulls AI hint is on screen; otherwise tables use the full width. */
  .shell .content,
  .shell #view{padding-right:24px !important;box-sizing:border-box}
  body:has(.bulls-hint:not([hidden])) .shell .content,
  body:has(.bulls-hint:not([hidden])) .shell #view{padding-right:200px !important}
  body.bulls-left:has(.bulls-hint:not([hidden])) .shell .content,
  body.bulls-left:has(.bulls-hint:not([hidden])) .shell #view{padding-right:24px !important;padding-left:200px !important}
}
@media (min-width:901px){
  .shell #view{padding-bottom:148px}
  .shell #view .tablewrap:has(>table.t){margin-bottom:24px;padding-right:8px}
}


/* Light KPI cards are a soft tint on white (rules above). modern.css still forced
   white type from the old gradient cards, which dropped contrast to ~1.09:1. */
html:not([data-theme=dark]) .shell .card.kpi2 .v,
html:not([data-theme=dark]) .shell .card.kpi2 .l,
html:not([data-theme=dark]) .shell .card.kpi2 .tiny,
html:not([data-theme=dark]) .shell .card.kpi2 .kpi-sub,
html:not([data-theme=dark]) [data-testid=my-stats] .kpi2 .v,
html:not([data-theme=dark]) [data-testid=my-stats] .kpi2 .l,
html:not([data-theme=dark]) [data-testid=my-stats] .kpi2 .tiny {
  color: #1d1d1f !important;
}
html:not([data-theme=dark]) .shell .card.kpi2 .tiny.muted,
html:not([data-theme=dark]) .shell .card.kpi2 .kpi-sub,
html:not([data-theme=dark]) [data-testid=my-stats] .kpi2 .tiny.muted {
  color: #1d1d1f !important;
  opacity: 1 !important;
}

/* Shared-view "Shared" / "Team" badge: keep info styling above 4.5:1. */
html:not([data-theme=dark]) .sv-sh,
html:not([data-theme=dark]) .badge.info.sv-sh {
  font-size: 11px;
  font-weight: 650;
  color: #003A82 !important;
  background: #D7E6FF !important;
  border-color: #8FB4F0 !important;
}


/* Disabled ghost buttons used opacity .55 on mid-gray, which dropped contrast
   to ~2.87:1 (Sign out other devices on Settings). Keep them readable. */
html:not([data-theme=dark]) .shell .btn[disabled],
html:not([data-theme=dark]) .shell .btn:disabled {
  opacity: 1 !important;
  color: #1d1d1f !important;
}


/* Dashboard lists and glance chips: names and subtitles must shrink or wrap, not
   run over the figures beside them. Also keep dark rank indexes AA. */
.shell .rank li,
.shell .fleet-list li,
.shell .b2-day-list li {
  min-width: 0;
}
.shell .rank .grow,
.shell .rank .rank-main,
.shell .rank .dg-lane,
.shell .fleet-list .grow,
.shell .b2-day-list .grow,
.shell .b2-ell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shell .rank-v,
.shell .fleet-list .badge,
.shell .stageBadge,
.shell .b2-need,
.shell .b2-need-t,
.shell .b2-ok,
.shell .b2-day-list > li > a,
.shell .b2-day-list .tiny.num {
  flex: none;
}
.shell .dg-chip,
.shell .dg-chip .tiny,
.shell .dg-chip .dg-l,
.shell .dg-chip b {
  min-width: 0;
  max-width: 100%;
}
.shell .dg-chip .tiny {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.35;
}
@media (max-width: 720px) {
  .shell .dash-glance .dg-chips { grid-template-columns: 1fr; }
}

html[data-theme=dark] .shell .rank-n { color: #C7C7CC; }
html[data-theme=dark] .shell .rank li:first-child .rank-n { color: #F2D56A; }


/* Dark welcome department tags were navy on navy (~1.15:1). */
html[data-theme=dark] .shell .card.dept-tile .dt-tag {
  color: #C5CDDC !important;
}

/* Advanced-billing upsell kept a cream card in dark theme, so body copy
   and the gold badge fell to ~1.1:1. */
html[data-theme=dark] .shell .upsell {
  background: #1C1C1E !important;
  border-color: #8A7010 !important;
  color: #F5F5F7 !important;
}
html[data-theme=dark] .shell .upsell h3,
html[data-theme=dark] .shell .upsell li,
html[data-theme=dark] .shell .upsell p {
  color: #F5F5F7 !important;
}
html[data-theme=dark] .shell .upsell .muted,
html[data-theme=dark] .shell .upsell .small.muted {
  color: #C7C7CC !important;
}
html[data-theme=dark] .shell .badge.gold {
  color: #1d1d1f !important;
  background: #E8C24A !important;
  border-color: #C9A227 !important;
}

/* Membership KPI labels on the tinted billing cards (opacity .85 was under AA). */
html:not([data-theme=dark]) .shell .bp-kpi .l { opacity: 1 !important; }
html:not([data-theme=dark]) .shell .bp-kpis .bp-blue .l { color: #003A82 !important; }
html:not([data-theme=dark]) .shell .bp-kpis .bp-purple .l { color: #5B2178 !important; }
html:not([data-theme=dark]) .shell .bp-kpis .bp-green .l { color: #0B5C32 !important; }

/* Dispatch warning counts (red on pale grey) need a darker red. */
html:not([data-theme=dark]) .shell .bt-chip.is-warn,
html:not([data-theme=dark]) .shell .bt-chip.is-warn .num,
html:not([data-theme=dark]) .shell .board-tools .bt-chip.is-warn {
  color: #8A1610 !important;
}
html[data-theme=dark] .shell .bt-chip.is-warn,
html[data-theme=dark] .shell .bt-chip.is-warn .num {
  color: #FFB4AE !important;
}

/* Board "Issues" view count uses --v-red (#FF3B30 / #FF453A), under AA on the segment. */
html:not([data-theme=dark]) .shell .b2-seg .num {
  color: #8A1610 !important;
}
html[data-theme=dark] .shell .b2-seg .num {
  color: #FFB4AE !important;
}
html:not([data-theme=dark]) .shell .bt-chip.is-warn .num,
html[data-theme=dark] .shell .bt-chip.is-warn .num {
  opacity: 1 !important;
}

/* Dark loads filters: count chips stayed light-on-light. */
html[data-theme=dark] .shell .filters .fc-n {
  color: #F5F5F7 !important;
  background: #3A3A3C !important;
}
html[data-theme=dark] .shell .filters .btn.sm:not(.ghost) .fc-n,
html[data-theme=dark] .shell .filters a.btn.sm[aria-current] .fc-n {
  color: #1d1d1f !important;
  background: #E8C24A !important;
}

/* Same disabled-ghost treatment as light Settings, for dark theme. */
html[data-theme=dark] .shell .btn[disabled],
html[data-theme=dark] .shell .btn:disabled {
  opacity: 1 !important;
  color: #C7C7CC !important;
}

/* Phone card layouts for loads and customers: flex-wrap, not CSS grid on
   <tr>, so names, badges and row actions never share a cell. */
@media (max-width: 720px) {
  .shell .tablewrap table.t.ll,
  .shell .tablewrap .t.ll,
  .shell .tablewrap table.t.cu-table,
  .shell .tablewrap .t.cu-table {
    display: block !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  .shell .tablewrap .t.ll thead,
  .shell .tablewrap .t.cu-table thead { display: none !important; }
  .shell .tablewrap .t.ll tbody,
  .shell .tablewrap .t.cu-table tbody { display: block !important; width: 100% !important; }

  .shell .tablewrap .t.ll tr {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 6px 10px !important;
    padding: 12px 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
  }
  .shell .tablewrap .t.ll td {
    display: block !important;
    position: static !important;
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .shell .tablewrap .t.ll td.ll-sel { order: 1 !important; flex: 0 0 auto !important; width: auto !important; }
  .shell .tablewrap .t.ll td.ll-no { order: 2 !important; flex: 1 1 auto !important; }
  .shell .tablewrap .t.ll td.ll-no .ll-stage {
    display: block !important;
    margin-left: 0 !important;
    margin-top: 4px !important;
  }
  .shell .tablewrap .t.ll td.acts,
  .shell .tablewrap .t.ll td.has-rm {
    order: 3 !important;
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 4px !important;
    position: static !important;
    white-space: normal !important;
  }
  .shell .tablewrap .t.ll td[data-col=customer],
  .shell .tablewrap .t.ll td.ll-cu {
    order: 4 !important;
    flex: 1 0 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
  .shell .tablewrap .t.ll td.ll-lane { order: 5 !important; flex: 1 0 100% !important; }
  .shell .tablewrap .t.ll td[data-col=pickup],
  .shell .tablewrap .t.ll td[data-col=cargo],
  .shell .tablewrap .t.ll td.ll-rev,
  .shell .tablewrap .t.ll td[data-col=margin],
  .shell .tablewrap .t.ll td[data-col=driver] {
    order: 6 !important;
    flex: 1 0 100% !important;
  }
  .shell .t.ll tbody td.ll-cu,
  .shell .t.ll .ll-cu { min-width: 0 !important; max-width: 100% !important; }

  .shell .tablewrap .t.cu-table tr[data-testid=cust-row] {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 6px 0 !important;
    padding: 12px 14px !important;
    padding-right: 7.5rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
  }
  .shell .tablewrap .t.cu-table td {
    display: block !important;
    position: static !important;
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .shell .tablewrap .t.cu-table td.cu-co {
    order: 1 !important;
    flex: 1 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .shell .tablewrap .t.cu-table tr[data-testid=cust-row] > td:last-child {
    order: 2 !important;
    position: absolute !important;
    top: 12px !important;
    right: 14px !important;
    left: auto !important;
    width: auto !important;
    max-width: 7rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 4px !important;
    z-index: 2 !important;
  }
  .shell .tablewrap .t.cu-table tr[data-testid=cust-row] > td:not(.cu-co):not(:last-child) {
    order: 3 !important;
    flex: 1 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Customer billing page (Nov 10, 2026): quiet, high-contrast treatment. Loaded last. */
.bill-page{--bill-ink:#12141A;--bill-muted:#3E4658;--bill-line:#D4D8E2;--bill-bg:#fff;--bill-soft:#F4F6FA;--bill-accent:#0F1C41;--bill-gold:#7A5600;color:var(--bill-ink)}
html[data-theme=dark] .bill-page{--bill-ink:#F3F5F9;--bill-muted:#C5CAD6;--bill-line:#3A4154;--bill-bg:#161B27;--bill-soft:#1C2230;--bill-accent:#F3D37A;--bill-gold:#E8C35A}
.bill-page .bill-card{background:var(--bill-bg)!important;color:var(--bill-ink)!important;border:1px solid var(--bill-line)!important;box-shadow:none!important;border-radius:16px;padding:22px 24px}
.bill-page .bill-kicker{margin:0 0 6px;font-size:11px;letter-spacing:.08em;text-transform:uppercase;font-weight:700;color:var(--bill-gold)}
.bill-page .bill-plan-name{margin:0 0 4px;font-size:28px;line-height:1.15;letter-spacing:-.03em;color:var(--bill-accent)}
.bill-page .bill-sub{margin:0 0 16px;color:var(--bill-muted);font-size:15px}
.bill-page .bill-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 24px;margin:0 0 18px}
.bill-page .bill-facts div{display:grid;gap:2px}
.bill-page .bill-facts dt{font-size:12px;color:var(--bill-muted);font-weight:600}
.bill-page .bill-facts dd{margin:0;font-size:15px;font-weight:650;color:var(--bill-ink)}
.bill-page .bill-meters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 18px}
.bill-page .bill-meter{background:var(--bill-soft);border:1px solid var(--bill-line);border-radius:12px;padding:12px 14px}
.bill-page .bill-meter-h{display:flex;justify-content:space-between;gap:8px;font-size:13px;color:var(--bill-muted)}
.bill-page .bill-meter-h b{color:var(--bill-ink);font-weight:700}
.bill-page .bill-meter-bar{margin-top:8px;height:6px;background:color-mix(in srgb,var(--bill-line) 70%,transparent);border-radius:99px;overflow:hidden}
.bill-page .bill-meter-bar i{display:block;height:100%;background:var(--bill-accent);border-radius:99px}
.bill-page .bill-meter-bar.hot i{background:#9B1C1C}
html[data-theme=dark] .bill-page .bill-meter-bar.hot i{background:#F0A3A3}
.bill-page .bill-actions{gap:10px;flex-wrap:wrap}
.bill-page .bill-cancel-status{border-color:var(--bill-gold)!important}
.bill-page .bill-card-on-file{font-size:16px;font-weight:650;margin:0 0 8px}
.bill-page .bill-email-row{gap:8px;align-items:center;flex-wrap:wrap}
.bill-page .bill-email-row .input{flex:1;min-width:200px}
.bill-card-modal h2{margin:0 0 8px}
.bill-card-modal .bill-amount{font-size:16px}
.bill-card-modal #m-sq,.bill-card-modal [data-testid=replace-square]{min-height:72px;margin:12px 0;padding:8px;border:1px solid var(--bill-line,#D4D8E2);border-radius:10px;background:#fff}
html[data-theme=dark] .bill-card-modal #m-sq,html[data-theme=dark] .bill-card-modal [data-testid=replace-square]{background:#fff;color:#12141A}
@media (max-width:720px){
  .bill-page .bill-facts,.bill-page .bill-meters{grid-template-columns:1fr}
  .bill-page .bill-plan-name{font-size:24px}
}
/* Quiet the leftover colourful billing tiles if the older header is still on the page. */
#view:has(#membership-billing) .bp-kpis .bp-kpi,
#view:has(#membership-billing) .tone-card.tone-indigo,
#view:has(#membership-billing) .tone-card.tone-blue,
#view:has(#membership-billing) .tone-card.tone-teal,
#view:has(#membership-billing) .tone-card.tone-green{
  background:var(--bill-bg,#fff)!important;color:inherit!important;box-shadow:none!important;border:1px solid var(--bill-line,#D4D8E2)!important
}


.btn-rate-con .rc-short{display:none}
.btn-rate-con .rc-long{display:inline}
/* Visual/UX Nov 12 (Robin): APP-01/03/04/05/06/07/09/10 + REG-01. colourful.css loads last. */
@media (min-width:901px){
  .shell .gs-btn{display:none !important}
  .shell .topbar, .shell .topbar>.row{flex-wrap:nowrap !important;align-items:center;overflow:visible;min-width:0;max-width:100%}
  .shell .topbar .tb-co{flex:1 1 11rem;max-width:none;min-width:11rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .shell .topbar .gsearch{flex:1 1 18rem;min-width:16rem;max-width:28rem;align-self:center}
  .shell .topbar .gs-box,.shell .topbar .gs-in{min-width:0;width:100%}
  .shell .topbar .gs-btn{flex:0 0 auto}
}
/* 1440 is more crowded than 1280 because the user name, My dashboard and Sign out return. Hide them until the bar has room. */
@media (max-width:1520px) and (min-width:901px){
  .shell:not(.staff) .topbar .um-name,
  .shell:not(.staff) .topbar #logout,
  .shell:not(.staff) .topbar #home-btn{display:none !important}
  .shell:not(.staff) .topbar .tb-co{max-width:none;min-width:11rem}
  .shell:not(.staff) .topbar .gsearch{flex:1 1 18rem;min-width:16rem;max-width:28rem}
}
@media (max-width:900px){
  .shell .gs-btn{display:inline-flex !important}
  .chat-dock-tab{writing-mode:horizontal-tb;transform:none;top:auto !important;bottom:72px !important;right:16px !important;left:auto;border-radius:10px;padding:8px 14px;z-index:40}
  /* REG-01: every header control must fit the viewport. The 160px search min-width is for the desktop field, not the 40px magnifier. */
  .shell, .shell .main, .shell .topbar{min-width:0;max-width:100%;width:100%;box-sizing:border-box}
  .shell .topbar, .shell .topbar>.row{flex-wrap:nowrap !important;align-items:center;gap:8px !important;min-width:0;max-width:100%}
  .shell .topbar>.row:first-child{flex:1 1 auto !important;min-width:0 !important;overflow:hidden}
  .shell .topbar>.row:last-child{flex:0 0 auto !important;min-width:0}
  .shell .topbar .tb-co{flex:1 1 auto !important;min-width:0 !important;max-width:none !important;overflow:hidden !important;text-overflow:ellipsis;white-space:nowrap}
  .shell .topbar .gsearch,
  .shell:not(.staff) .topbar .gsearch{flex:0 0 auto !important;min-width:0 !important;width:auto !important;max-width:none !important;margin:0 !important}
  .shell .topbar .menu-btn,
  .shell .topbar .gs-btn,
  .shell .topbar #bell,
  .shell .topbar #user-menu-btn,
  .shell .topbar .theme-btn,
  .shell .topbar .help-btn,
  .shell .topbar .um-btn{flex:0 0 auto !important;margin:0}
}
@media (max-width:640px){
  .shell .content, .shell #view{
    padding-right:16px !important;
    padding-left:16px !important;
  }
  .btn-rate-con .rc-long{display:none}
  .btn-rate-con .rc-short{display:inline}
  .page-head .row, .head-actions, .page-head, .page-head .ph-actions{flex-wrap:wrap;gap:12px !important}
  .btn-rate-con{flex:1 1 auto}
}

/* APP-05: dashboard pulse stages (.stage-l), and list counters (.ct-l). Own row below 1500px. */
.shell .ctile{overflow:visible}
.shell .ctile .ct-l, .ct-l{
  white-space:normal;
  overflow:hidden;
  line-height:1.25;
  align-items:flex-start;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
}
.shell .pulse .stage-l, .pipeline .stage-l, .stage-l{
  white-space:normal !important;
  overflow:hidden !important;
  text-overflow:clip !important;
  line-height:1.25;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
@media (max-width:1500px){
  .counters, nav.counters{grid-column:1 / -1;width:100%;grid-template-columns:repeat(auto-fit,minmax(7.5rem,1fr))}
  .shell .pulse-body, .pulse-body{grid-template-columns:1fr !important}
}

/* APP-06: DQ files table scrolls horizontally instead of clipping */
.dq-wrap, .dq-wrap .table-wrap, .dq-wrap .tablewrap{overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}

/* APP-07: calendar day numbers meet 4.5:1. Out-of-month cells must not use opacity. */
.ot-cal-n{color:#1A2333}
.ot-cal-d.out{opacity:1}
.ot-cal-d.out .ot-cal-n{color:#4A5568}
html[data-theme=dark] .ot-cal-n{color:#E6EAF3}
html[data-theme=dark] .ot-cal-d.out .ot-cal-n{color:#C5CAD6}
/* RB-23 (release nov14): at phone width the Team chat pill sits in the same bottom row as the Bulls AI launcher (left of it), so the
   floating controls take one 44px band at the bottom (cleared by the page's bottom padding), not two stacked corners over table rows. */
@media (max-width:640px){
  .chat-dock-tab{bottom:calc(16px + env(safe-area-inset-bottom, 0px)) !important;right:calc(16px + 44px + 8px) !important;padding:8px 12px;min-height:44px;box-sizing:border-box}
  body.bulls-left .chat-dock-tab{right:16px !important}
}

/* RB-23 (release nov14 round 4): phones put Team chat and the BULLS AI launcher below the header (portal.js dockFloaters),
   so nothing floats over page content or row actions. The panels they open still overlay as before. */
.tb-dock{display:none}
@media (max-width:640px){
  .shell .tb-dock:not([hidden]){display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:8px 16px;background:var(--br-surface,#f8fafc);border-bottom:1px solid var(--line);}
  .shell .tb-dock .bulls-launch{position:relative!important;inset:auto!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;width:36px!important;height:36px!important;transform:none!important;opacity:1!important;pointer-events:auto!important;margin:0!important;box-shadow:none!important;z-index:auto!important}
  .shell .tb-dock .bulls-launch .bull-badge{width:30px!important;height:30px!important}
  .shell .tb-dock .bulls-launch .dot{top:-4px;right:-4px}
  .shell .tb-dock .chat-dock-tab{position:relative!important;inset:auto!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;transform:none!important;writing-mode:horizontal-tb!important;min-height:36px!important;height:36px;padding:0 10px!important;font-size:13px;border-radius:10px!important;z-index:auto!important;white-space:nowrap;box-shadow:none!important}
}

/* FW-37 (release nov14 round 4): on phone cards an avatar cell is sized to its content, so ds.css's
   "max-width: calc(100% - 38px)" on the name resolved to ~0 for short names ("RTL" stacked one letter per line).
   Any table with an avatar column (enhance.js) gets an inline name beside the avatar that wraps normally. */
@media (max-width:640px){
  .shell .tablewrap .t td.has-av>.ds-av-cell+a,
  .shell .tablewrap .t td.has-av>.ds-av-cell+b,
  .shell .tablewrap .t td.has-av>.ds-av-cell+strong{display:inline!important;max-width:none!important;overflow-wrap:break-word!important}
  .shell .tablewrap .t td.has-av>.ds-av-cell{margin-right:6px;vertical-align:middle}
}
