/* WJ Group brand theme (WJ Group Brand Guidelines: colour palette p.25, typefaces p.26, logo p.20–24).
   Loaded after Bootstrap; site.css holds layout rules.

   Palette: primary #009fda (+ white) · secondary beige #d9d1bd, navy #082145 · accent coral #fa6661.
   Typeface: Segoe UI ("for all internal communications and desktop applications").

   Contrast (WCAG AA): brand blue on white is only 2.9:1, so it is used for fills, borders and large
   elements; text and links on white use --wj-blue-ink (a darker shade of the brand blue, 5.0:1).
   Navy on brand blue is 5.3:1, so header links are navy. */
:root {
  --wj-blue: #009fda;
  --wj-blue-80: #33b2e1;
  --wj-blue-50: #80cfed;
  --wj-blue-25: #bfe7f6;
  --wj-blue-10: #e6f5fb;
  --wj-blue-ink: #0077a8;
  --wj-navy: #082145;
  --wj-navy-80: #465a74;
  --wj-navy-50: #8591a2;
  --wj-navy-25: #c1c7d0;
  --wj-navy-10: #e6e8ec;
  /* Borders between cards, rows and sections: firmer than navy-10, so the parts of a page stay apart (feedback of 7 October). */
  --wj-line: #cdd2da;
  --wj-beige: #d9d1bd;
  --wj-beige-60: #e8e3d7;
  --wj-beige-30: #f2efe8;
  --wj-beige-10: #f9f7f3;
  --wj-coral: #fa6661;

  --bs-body-font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --bs-body-color: var(--wj-navy);
  --bs-body-color-rgb: 8, 33, 69;
  --bs-emphasis-color: var(--wj-navy);
  --bs-secondary-color: rgba(8, 33, 69, .8);
  --bs-heading-color: var(--wj-navy);
  --bs-primary: var(--wj-navy);
  --bs-primary-rgb: 8, 33, 69;
  --bs-link-color: var(--wj-blue-ink);
  --bs-link-color-rgb: 0, 119, 168;
  --bs-link-hover-color: var(--wj-navy);
  --bs-link-hover-color-rgb: 8, 33, 69;
  --bs-border-color: var(--wj-line);
  --bs-border-color-translucent: rgba(8, 33, 69, .12);
  --bs-focus-ring-color: rgba(0, 159, 218, .45);
  --bs-tertiary-bg: var(--wj-beige-10);
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 600; letter-spacing: -.01em; }

/* ---- Navigation: white logo on brand blue (guidelines p.20) ----
   Signed in, inside an app: a left sidebar with that app's sections only (fixed from lg up; an off-canvas menu below
   that, opened from the top bar). Signed in on the hub: a header with the account menu (.wj-hubbar), no sidebar.
   Signed out: a plain logo bar (.wj-header). */
.wj-header { background: var(--wj-blue); padding: .9rem 0; }

.wj-brand {
  display: inline-flex;
  align-items: center;
  padding: .35rem 0; /* keep clear space around the logo (exclusion zone) */
}

.wj-logo {
  height: 46px; /* ≈ 204px wide: inside the 125–300px digital size range */
  width: auto;
  display: block;
}

.wj-shell { display: flex; min-height: 100vh; }
.wj-content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.wj-main { width: 100%; max-width: 1480px; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
.wj-main:focus { outline: none; }
@media (min-width: 768px) { .wj-main { padding: 1.75rem 2rem 2.5rem; } }

.wj-skip {
  position: absolute;
  top: .5rem;
  left: .5rem;
  z-index: 1100;
  background: #fff;
  color: var(--wj-navy);
  padding: .5rem .75rem;
  border-radius: .375rem;
  font-weight: 600;
}

.wj-sidebar-panel {
  --bs-offcanvas-width: 17rem;
  --bs-offcanvas-bg: var(--wj-blue);
  --bs-offcanvas-color: var(--wj-navy);
  color: var(--wj-navy);
  display: flex;
  flex-direction: column;
}

/* The sidebar is a fixed column from 1280px up, and slides in from the top bar's menu button below that (feedback of
   28 October: laptops get the width). Bootstrap's responsive offcanvas (offcanvas-xl) at 1280px instead of 1200px. */
.wj-offcanvas {
  --bs-offcanvas-zindex: 1045;
  --bs-offcanvas-border-width: var(--bs-border-width);
  --bs-offcanvas-border-color: var(--bs-border-color-translucent);
  --bs-offcanvas-transition: transform 0.3s ease-in-out;
}
@media (max-width: 1279.98px) {
  .wj-offcanvas {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: var(--bs-offcanvas-zindex);
    width: var(--bs-offcanvas-width);
    max-width: 100%;
    color: var(--bs-offcanvas-color);
    visibility: hidden;
    background-color: var(--bs-offcanvas-bg);
    background-clip: padding-box;
    border-right: var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);
    outline: 0;
    transform: translateX(-100%);
    transition: var(--bs-offcanvas-transition);
  }
  .wj-offcanvas.showing, .wj-offcanvas.show:not(.hiding) { transform: none; }
  .wj-offcanvas.showing, .wj-offcanvas.hiding, .wj-offcanvas.show { visibility: visible; }
}
@media (max-width: 1279.98px) and (prefers-reduced-motion: reduce) {
  .wj-offcanvas { transition: none; }
}
@media (min-width: 1280px) {
  .wj-offcanvas { --bs-offcanvas-border-width: 0; background-color: transparent !important; }
  .wj-narrow-only { display: none !important; }
}

@media (min-width: 1280px) {
  .wj-sidebar {
    flex: 0 0 16rem;
    width: 16rem;
    background: var(--wj-blue);
    position: sticky;
    top: 0;
    height: 100vh;
  }
  .wj-sidebar-panel { height: 100%; }
}

.wj-sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: 1rem 1rem .5rem;
}
.wj-sidebar .wj-logo { height: 42px; } /* ≈ 186px: fits the sidebar, above the 125px digital minimum */

/* The app's links scroll on their own, so All apps and the account stay at the foot of the screen. A thin navy
   scrollbar on the blue (the browser's default grey one clashes), and a soft edge where links run under the foot. */
.wj-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: .25rem .75rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(8, 33, 69, .35) transparent;
  scrollbar-gutter: stable;
}
.wj-nav::-webkit-scrollbar { width: 8px; }
.wj-nav::-webkit-scrollbar-track { background: transparent; }
.wj-nav::-webkit-scrollbar-thumb { background: rgba(8, 33, 69, .35); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.wj-nav::-webkit-scrollbar-thumb:hover { background-color: rgba(8, 33, 69, .55); }
.wj-account { box-shadow: 0 -10px 12px -10px rgba(8, 33, 69, .35); position: relative; }

/* Groups (Purchase Orders, Records): a divider line and a bold heading that opens / closes the group. Headings and
   links are in title case. */
.wj-nav-group {
  border-top: 1px solid rgba(8, 33, 69, .22);
  margin-top: .6rem;
  padding-top: .6rem;
}

.wj-nav-heading {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  border: 0;
  border-radius: .375rem;
  background: rgba(8, 33, 69, .1);
  color: var(--wj-navy);
  font-size: .875rem;
  font-weight: 700;
  text-align: left;
  padding: .5rem .75rem;
}
.wj-nav-heading > .wj-nav-label { flex: 1 1 auto; }
.wj-nav-heading:hover { background: rgba(8, 33, 69, .16); }
.wj-nav-heading:focus-visible { outline: none; box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .7); }

/* Chevron: down when open, right when closed. */
.wj-nav-caret {
  width: .5rem;
  height: .5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .15s;
}
.wj-nav-heading.collapsed .wj-nav-caret { transform: rotate(-45deg); }

/* The group's count on its heading only while it's closed (the items show their own counts when open). */
.wj-nav-heading-count { display: none; }
.wj-nav-heading.collapsed .wj-nav-heading-count { display: inline-block; }

/* The app's name under the logo: inside an app the sidebar shows only that app's sections. */
.wj-app-name {
  padding: 0 1.75rem .35rem;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
}

/* Items in a group sit under their heading. */
.wj-nav-group .nav { padding-top: .25rem; }
.wj-sidebar .wj-nav-group .nav-link { padding-left: 1.25rem; font-weight: 500; }

.wj-sidebar .nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  width: 100%;
  text-align: left;
  color: var(--wj-navy);
  font-weight: 600;
  border-radius: .375rem;
  padding: .45rem .75rem;
  white-space: nowrap;
}

.wj-sidebar .nav-link:hover,
.wj-sidebar .nav-link:focus-visible {
  color: var(--wj-navy);
  background: rgba(255, 255, 255, .28);
}

.wj-sidebar .nav-link:focus-visible { box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .7); }

/* The current page, and on the dashboard the section in view (home.js). */
.wj-sidebar .nav-link.active,
.wj-sidebar .nav-link.is-current {
  color: var(--wj-navy);
  background: rgba(255, 255, 255, .55);
  box-shadow: inset 3px 0 0 var(--wj-navy);
}

.wj-account {
  border-top: 1px solid rgba(8, 33, 69, .2);
  padding: .75rem .75rem 1rem;
}

.wj-account-who {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  border: 0;
  border-radius: .375rem;
  background: transparent;
  color: var(--wj-navy);
  text-align: left;
  padding: .45rem .75rem;
}
.wj-account-who:hover { background: rgba(255, 255, 255, .28); }
.wj-account-who:focus-visible { outline: none; box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .7); }
/* The links open above the name: the chevron points up while closed, down while open. */
.wj-account-who .wj-nav-caret { transform: translateY(-2px) rotate(45deg); }
.wj-account-who.collapsed .wj-nav-caret { transform: translateY(2px) rotate(-135deg); }
.wj-account .collapse .nav, .wj-account .collapsing .nav { padding-bottom: .35rem; }
.wj-account-label { display: block; font-size: .75rem; }
.wj-account-name { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wj-account .nav-link { font-weight: 500; padding-top: .35rem; padding-bottom: .35rem; }
/* Theme (System / Light / Dark) in the account menus. */
.wj-theme { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.wj-theme-label { font-size: .8rem; font-weight: 600; }
.wj-theme .btn { --bs-btn-padding-y: .15rem; --bs-btn-padding-x: .5rem; --bs-btn-font-size: .78rem; }
.wj-sidebar .wj-theme .btn-outline-secondary {
  --bs-btn-color: var(--wj-navy);
  --bs-btn-border-color: rgba(8, 33, 69, .35);
  --bs-btn-hover-bg: rgba(255, 255, 255, .28);
  --bs-btn-active-bg: var(--wj-navy);
  --bs-btn-active-color: #fff;
  --bs-btn-active-border-color: var(--wj-navy);
}
.wj-theme .btn-outline-secondary.active { --bs-btn-active-bg: var(--wj-navy); --bs-btn-active-color: #fff; --bs-btn-active-border-color: var(--wj-navy); }

/* Back to the app list, at the foot of every app's sidebar. */
.wj-all-apps-icon { width: .9rem; height: .9rem; fill: currentColor; opacity: .8; flex: 0 0 auto; }

/* Section icons (Features:CollapsibleSidebar, Pages/NavIcons.cs): beside the group headings and the links outside a
   group, and alone in the narrowed sidebar. */
.wj-nav-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wj-sidebar .wj-nav-top { justify-content: flex-start; }
.wj-sidebar .wj-nav-top > .wj-nav-label { flex: 1 1 auto; }

/* The button beside the logo that narrows the sidebar to its icons and widens it again (site.js), from 1280px up. */
.wj-rail-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: .375rem;
  background: transparent;
  color: var(--wj-navy);
}
.wj-rail-toggle:hover { background: rgba(255, 255, 255, .28); }
.wj-rail-toggle:focus-visible { outline: none; box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .7); }
@media (max-width: 1279.98px) {
  .wj-wide-only { display: none !important; }
}

/* The narrowed sidebar (.wj-rail on .wj-shell): each section is its icon, with its count on the corner. The labels stay
   for screen readers, and site.js puts them in a tooltip. A group's icon opens its links beside it (.wj-flyout, site.js),
   as does the name at the foot for the account links. Below 1280px the sidebar slides in at full width as before. */
@media (min-width: 1280px) {
  /* Sticky makes the sidebar its own stacking context: above the page, so that its open links aren't under it. */
  .wj-rail .wj-sidebar { flex-basis: 4.5rem; width: 4.5rem; z-index: 1030; }
  .wj-rail .wj-sidebar-top { justify-content: center; padding: 1rem .5rem .5rem; }
  .wj-rail .wj-sidebar .wj-brand,
  .wj-rail .wj-app-name,
  .wj-rail .yard-picker,
  .wj-rail .wj-nav-caret { display: none; }
  .wj-rail .wj-nav { padding: .25rem .5rem 1rem; scrollbar-gutter: auto; }
  .wj-rail .wj-nav-group { margin-top: .4rem; padding-top: .4rem; }
  .wj-rail .wj-account { padding: .75rem .5rem 1rem; }
  .wj-rail .wj-nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .wj-rail .wj-nav-heading,
  .wj-rail .wj-sidebar .wj-nav-top,
  .wj-rail .wj-account-who { position: relative; justify-content: center; padding: .6rem 0; }
  .wj-rail .wj-nav-icon { width: 1.35rem; height: 1.35rem; }
  .wj-rail .wj-nav-heading .wj-nav-heading-count,
  .wj-rail .wj-nav-top > .badge-count { display: inline-block; position: absolute; top: .05rem; right: .05rem; font-size: .65rem; }
  /* The section holding the current page, marked as its link would be. */
  .wj-rail .wj-nav-group:has(.nav-link.active, .nav-link.is-current) > .wj-nav-heading {
    background: rgba(255, 255, 255, .55);
    box-shadow: inset 3px 0 0 var(--wj-navy);
  }

  .wj-rail .wj-sidebar [data-nav-group]:not(.wj-flyout) { display: none; }
  .wj-rail .wj-sidebar [data-nav-group].wj-flyout {
    display: block;
    position: fixed;
    left: 4.75rem;
    top: var(--wj-flyout-top, 1rem);
    z-index: 1050;
    width: 15rem;
    max-height: calc(100vh - 1rem);
    overflow-y: auto;
    padding: .5rem;
    border-radius: .5rem;
    background: var(--wj-blue);
    box-shadow: 0 .5rem 1.5rem rgba(8, 33, 69, .3);
  }
  .wj-rail [data-nav-group].wj-flyout::before {
    content: attr(data-nav-title);
    display: block;
    padding: .25rem .75rem .4rem;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .wj-rail .wj-flyout .nav { padding-top: 0; padding-bottom: 0; }
  .wj-rail .wj-sidebar .wj-flyout .nav-link { padding-left: .75rem; }
}

/* The hub (no app open): a header across the top with the account menu, and no sidebar. */
.wj-hubbar { background: var(--wj-blue); }
.wj-hubbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1480px;
  margin: 0 auto;
  padding: .5rem 1rem;
}
@media (min-width: 768px) { .wj-hubbar-inner { padding: .6rem 2rem; } }
.wj-hubbar .wj-logo { height: 42px; }
.wj-hubbar-who { width: auto; max-width: 18rem; }
.wj-hubbar .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .75); }
.wj-hubbar-who[aria-expanded="true"] .wj-nav-caret { transform: translateY(2px) rotate(-135deg); }
.wj-sidebar .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .75); }

/* Phones and tablets: logo bar with the menu button, kept at the top while scrolling. */
.wj-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--wj-blue);
  padding: .4rem 1rem;
}
.wj-topbar .wj-logo { height: 40px; } /* still above the 125px digital minimum */
.wj-topbar-app { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin-left: auto; text-align: right; }

.wj-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid rgba(8, 33, 69, .4);
  padding: .3rem .5rem;
}
.wj-menu-btn:focus-visible { box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .7); }
/* Bootstrap only defines the hamburger inside .navbar; navy lines here. */
.wj-menu-btn .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23082145' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.badge-count {
  background: var(--wj-coral);
  color: var(--wj-navy);
}

/* ---- Buttons ---- */
.btn-primary {
  --bs-btn-bg: var(--wj-navy);
  --bs-btn-border-color: var(--wj-navy);
  --bs-btn-hover-bg: #0f3163;
  --bs-btn-hover-border-color: #0f3163;
  --bs-btn-active-bg: #051630;
  --bs-btn-active-border-color: #051630;
  --bs-btn-focus-shadow-rgb: 0, 159, 218;
}

.btn-outline-primary {
  --bs-btn-color: var(--wj-navy);
  --bs-btn-border-color: var(--wj-navy);
  --bs-btn-hover-bg: var(--wj-navy);
  --bs-btn-hover-border-color: var(--wj-navy);
  --bs-btn-active-bg: var(--wj-navy);
  --bs-btn-active-border-color: var(--wj-navy);
  --bs-btn-focus-shadow-rgb: 0, 159, 218;
}

/* A button that can't be used right now (no supplier lists the item, no project yet, can't check out) is plain grey,
   not a faded blue that still looks clickable. The same in dark.css. */
.btn-primary, .btn-outline-primary {
  --bs-btn-disabled-color: var(--bs-secondary-color);
  --bs-btn-disabled-bg: var(--bs-secondary-bg);
  --bs-btn-disabled-border-color: var(--bs-border-color);
  --bs-btn-disabled-opacity: 1;
}

.btn-outline-secondary {
  --bs-btn-color: var(--wj-navy);
  --bs-btn-border-color: var(--wj-navy-25);
  --bs-btn-hover-color: var(--wj-navy);
  --bs-btn-hover-bg: var(--wj-beige-30);
  --bs-btn-hover-border-color: var(--wj-navy-50);
  --bs-btn-active-color: var(--wj-navy);
  --bs-btn-active-bg: var(--wj-beige-60);
  --bs-btn-active-border-color: var(--wj-navy-50);
}

.btn-link { --bs-btn-color: var(--wj-blue-ink); --bs-btn-hover-color: var(--wj-navy); }

/* ---- Forms ---- */
.form-control:focus, .form-select:focus, .form-check-input:focus, .btn:focus-visible {
  border-color: var(--wj-blue);
  box-shadow: 0 0 0 .2rem rgba(0, 159, 218, .3);
}

.form-check-input:checked { background-color: var(--wj-navy); border-color: var(--wj-navy); }
.form-switch .form-check-input:focus:not(:checked) {
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2380cfed'/%3e%3c/svg%3e");
}

/* ---- Cards, lists, tables ---- */
.card { --bs-card-border-color: var(--wj-line); --bs-card-cap-bg: var(--wj-beige-30); }
.card-header { color: var(--wj-navy); }

.list-group { --bs-list-group-border-color: var(--wj-line); --bs-list-group-action-hover-bg: var(--wj-beige-10); }

.table { --bs-table-color: var(--wj-navy); --bs-table-hover-bg: var(--wj-blue-10); --bs-table-hover-color: var(--wj-navy); }
.table > thead > tr > th {
  border-bottom: 2px solid var(--wj-navy);
  font-weight: 600;
}

.pagination {
  --bs-pagination-color: var(--wj-navy);
  --bs-pagination-hover-color: var(--wj-navy);
  --bs-pagination-hover-bg: var(--wj-beige-30);
  --bs-pagination-focus-color: var(--wj-navy);
  --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(0, 159, 218, .3);
  --bs-pagination-active-bg: var(--wj-navy);
  --bs-pagination-active-border-color: var(--wj-navy);
  --bs-pagination-border-color: var(--wj-navy-10);
}

/* ---- Badges / chips (brand colours, navy text wherever the fill is light) ---- */
.text-bg-info { background-color: var(--wj-blue-25) !important; color: var(--wj-navy) !important; }
.text-bg-secondary { background-color: var(--wj-navy-80) !important; color: #fff !important; }
.text-bg-warning { background-color: var(--wj-beige) !important; color: var(--wj-navy) !important; }
.text-bg-light { background-color: var(--wj-beige-30) !important; color: var(--wj-navy) !important; }
.text-bg-primary { background-color: var(--wj-navy) !important; color: #fff !important; }

.badge-status { font-weight: 600; }
.status-draft { background: var(--wj-navy-10); color: var(--wj-navy); border: 1px solid var(--wj-navy-25); }
.status-pending { background: var(--wj-blue-25); color: var(--wj-navy); }
.status-approved { background: #1d7a4a; color: #fff; }
.status-rejected { background: var(--wj-coral); color: var(--wj-navy); }
.status-void { background: var(--wj-navy); color: #fff; }

/* PO stages after approval (Services/RequestStage.cs): who has it now, on the PO page and PO tracking. */
.stage-approval { background: var(--wj-blue-25); color: var(--wj-navy); }
.stage-send { background: var(--wj-beige); color: var(--wj-navy); }
.stage-delivery { background: var(--wj-blue-10); color: var(--wj-navy); border: 1px solid var(--wj-blue-25); }
.stage-invoice { background: var(--wj-beige-30); color: var(--wj-navy); border: 1px solid var(--wj-beige); }
.stage-closed { background: #1d7a4a; color: #fff; }
.stage-rejected { background: var(--wj-coral); color: var(--wj-navy); }
.stage-none { background: var(--wj-navy-10); color: var(--wj-navy); }
.stage-late { background: var(--wj-coral); color: var(--wj-navy); }

/* ---- Alerts ---- */
.alert-warning { --bs-alert-bg: var(--wj-beige-30); --bs-alert-border-color: var(--wj-beige); --bs-alert-color: var(--wj-navy); }
.alert-secondary { --bs-alert-bg: var(--wj-beige-10); --bs-alert-border-color: var(--wj-beige-60); --bs-alert-color: var(--wj-navy); }
.alert-info { --bs-alert-bg: var(--wj-blue-10); --bs-alert-border-color: var(--wj-blue-25); --bs-alert-color: var(--wj-navy); }

/* ---- Approval steps ---- */
.approval-step { border-left-color: var(--wj-navy-10); }
.approval-step.done { border-left-color: #1d7a4a; }
.approval-step.current { border-left-color: var(--wj-blue); }

/* Buttons stay on one line; their containers wrap instead. */
.btn { white-space: nowrap; }

/* Active / Inactive pills (master data). */
.pill-active { background: #e3f1ea; color: #145235; border: 1px solid #b5d9c5; font-weight: 600; }
.pill-inactive { background: var(--wj-navy-10); color: var(--wj-navy-80); border: 1px solid var(--wj-navy-25); font-weight: 600; }

/* Role pills */
.role-pills { display: inline-flex; flex-wrap: wrap; gap: .25rem; }
.pill-admin { background: var(--wj-navy); color: #fff; font-weight: 600; }
.pill-approver { background: var(--wj-blue-25); color: var(--wj-navy); font-weight: 600; }
/* Tabs (e.g. Approvals): brand navy instead of Bootstrap blue. */
.nav-pills { --bs-nav-pills-link-active-bg: var(--wj-navy); --bs-nav-link-color: var(--wj-navy); --bs-nav-link-hover-color: var(--wj-navy); }
.pill-director { background: #fff; color: var(--wj-navy); border: 1px solid var(--wj-navy); font-weight: 600; }
.pill-requester { background: var(--wj-beige-30); color: var(--wj-navy); border: 1px solid var(--wj-beige); font-weight: 600; }
/* Yard Management and MRF roles (separate flags, shown after the PO roles). */
.pill-yard-keeper { background: var(--wj-beige); color: var(--wj-navy); font-weight: 600; }
.pill-yard-viewer { background: #fff; color: var(--wj-navy); border: 1px dashed var(--wj-navy-50); font-weight: 600; }
.pill-procurement { background: var(--wj-blue-ink); color: #fff; font-weight: 600; }
.pill-finance { background: var(--wj-beige-30); color: var(--wj-navy); border: 1px solid var(--wj-navy-50); font-weight: 600; }

/* ---- People: avatars (Pages/Shared/_Avatar) ----
   Initials on a brand colour per person; a profile photo (from Entra ID, later) covers them when set. */
.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
  user-select: none;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 2rem; height: 2rem; font-size: .75rem; }
.avatar-md { width: 2.75rem; height: 2.75rem; font-size: .95rem; }
.avatar-lg { width: 4rem; height: 4rem; font-size: 1.3rem; }
.avatar-tone-0 { background: var(--wj-navy); color: #fff; }
.avatar-tone-1 { background: var(--wj-blue-ink); color: #fff; }
.avatar-tone-2 { background: var(--wj-blue-25); color: var(--wj-navy); }
.avatar-tone-3 { background: var(--wj-beige); color: var(--wj-navy); }
.avatar-tone-4 { background: var(--wj-coral); color: var(--wj-navy); }
.avatar-tone-5 { background: var(--wj-navy-80); color: #fff; }

/* ---- Notifications (docs/in-app-notifications-plan.md): the bell in the hub's header and the small-screen top bar,
   its feed, and the "Needs you" dialog. The sidebar's foot has a plain link (_NotificationBell). ---- */
.wj-hubbar-end { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.wj-bell-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  color: var(--wj-navy);
  text-decoration: none;
}
.wj-bell-btn:hover, .wj-bell-btn:focus-visible, .wj-bell-btn[aria-expanded="true"] { color: var(--wj-navy); background: rgba(255, 255, 255, .28); }
.wj-bell-icon { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.wj-bell-btn .badge-count { position: absolute; top: .05rem; right: -.1rem; font-size: .65rem; }
.wj-bell-menu { width: min(24rem, calc(100vw - 2rem)); padding: 0; overflow: hidden; }
.wj-bell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--bs-border-color);
}
.wj-bell-feed { max-height: min(60vh, 28rem); overflow-y: auto; }
.wj-bell-feed > p { padding: .75rem .9rem; }
.wj-bell-all { display: block; padding: .5rem .9rem; border-top: 1px solid var(--bs-border-color); text-align: center; font-size: .85rem; }
.wj-notices li + li { border-top: 1px solid var(--bs-border-color-translucent); }
.wj-notice { display: flex; gap: .6rem; padding: .6rem .9rem; color: var(--bs-body-color); text-decoration: none; }
.wj-notice:hover, .wj-notice:focus-visible { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.wj-notice-dot { flex: 0 0 .5rem; height: .5rem; margin-top: .45rem; border-radius: 50%; }
.wj-notice.is-unread .wj-notice-dot { background: var(--wj-blue); }
.wj-notice.is-unread .wj-notice-text { font-weight: 600; }
.wj-notice-text { display: block; font-size: .9rem; overflow-wrap: anywhere; }
.wj-notice-when { display: block; font-size: .78rem; color: var(--bs-secondary-color); }
.wj-notice-empty { padding: .75rem .9rem; }
.card-body > .wj-notices, .card-body > .wj-notice-empty { margin: -1rem; }
/* A live notification's popup: the text is a link to its PO. */
.flash-stack .alert-info a { color: inherit; font-weight: 600; }
/* "Needs you": each line a link, late ones marked. */
.wj-needs-you { margin: 0; padding: 0; list-style: none; }
.wj-needs-you li + li { border-top: 1px solid var(--bs-border-color-translucent); }
.wj-needs-you a { display: flex; align-items: baseline; gap: .5rem; padding: .55rem 0; color: var(--bs-body-color); text-decoration: none; }
.wj-needs-you a:hover .wj-needs-you-text { text-decoration: underline; }
.wj-needs-you .badge { flex: 0 0 auto; }
