/* vendored from MilieuCentralWebsite@238ffb6; edit packages/milieu-shell there, then re-run vendor.ps1 */
/* ==========================================================================
   Milieu shell
   The one layout every Milieu app shares: the global bar (served by Milieu
   Central as bar.css/bar.js), an app header carrying the lockup, a left
   sidebar of the app's sections, the main column, and one footer line.

   Requires milieu-tokens.css to be loaded first. Every colour comes from a
   token; the system is one radius, 1px borders, no shadows, and hover shifts
   tone rather than position.

   Canonical copy: MilieuCentralWebsite/packages/milieu-shell/milieu-shell.css
   ========================================================================== */

:root {
  --motion-fast: 120ms;
  --motion-base: 180ms;
  --milieu-bar-h: 44px;
  --mshell-nav-w: 208px;
  --mshell-max: 1400px;
  --mshell-gutter: 20px;
}

/* --- Page frame -------------------------------------------------------- */

.mshell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: var(--color-surface-sunken);
  color: var(--color-text);
}

.mshell__header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.mshell__header-in {
  max-width: var(--mshell-max);
  margin: 0 auto;
  padding: 12px var(--mshell-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
}
.mshell__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mshell__body {
  flex: 1;
  width: 100%;
  max-width: var(--mshell-max);
  margin: 0 auto;
  padding: 24px var(--mshell-gutter) 48px;
  display: grid;
  grid-template-columns: var(--mshell-nav-w) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.mshell__body--full {
  grid-template-columns: minmax(0, 1fr);
}
.mshell__main {
  min-width: 0;
}

.mshell__footer {
  width: 100%;
  max-width: var(--mshell-max);
  margin: 0 auto;
  padding: 0 var(--mshell-gutter) 20px;
  display: flex;
  justify-content: flex-end;
}

/* --- Lockup: the rings and live text, never artwork for the words ------ */

.milieu-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text);
  min-width: 0;
}
.milieu-lockup img {
  height: 40px;
  width: auto;
  flex-shrink: 0;
}
/* One line: "Milieu" then the product name, both in the same bold face so
   "Milieu Labour Relations" reads as one name. */
.milieu-lockup__word {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.25em; /* one word space, so "Milieu Labour Relations" reads as one name */
  line-height: 1.15;
  white-space: nowrap;
}
.milieu-lockup__name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.2px;
}
.milieu-lockup__product {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: inherit;
}

/* --- Sidebar navigation ------------------------------------------------ */

.mshell__nav {
  position: sticky;
  top: calc(var(--milieu-bar-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mshell__nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mshell__nav-group + .mshell__nav-group {
  margin-top: 14px;
}
.mshell__nav-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  margin: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
  text-align: left;
  cursor: default;
}
button.mshell__nav-heading {
  cursor: pointer;
  border-radius: var(--radius-card);
}
/* The leading icon sits with the label on the left; only a collapsible
   heading has a trailing chevron, and only that one floats to the right. */
.mshell__nav-heading svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
button.mshell__nav-heading svg:last-child {
  margin-left: auto;
  transition: transform var(--motion-base) ease;
}
.mshell__nav-heading[aria-expanded="false"] svg:last-child {
  transform: rotate(-90deg);
}

.mshell__nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  color: var(--color-text-muted);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    color var(--motion-fast) ease;
}
.mshell__nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.mshell__nav-link:hover {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text);
}
.mshell__nav-link[aria-current="page"] {
  background: var(--color-brand-blue-light);
  color: var(--color-brand-blue-dark);
  font-weight: 600;
}
.mshell__nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--color-brand-blue);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

/* --- Page head: title, brand rule, description, actions ---------------- */

.mpage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.mpage-head h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.mpage-head .brand-rule {
  margin-top: 8px;
}
.mpage-head__desc {
  margin: 10px 0 0;
  max-width: 640px;
  font-size: 15px;
  color: var(--color-text-muted);
}
.mpage-head__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.msection-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
}

/* --- Small shared pieces ------------------------------------------------ */

.milieu-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition:
    background-color var(--motion-fast) ease,
    border-color var(--motion-fast) ease;
}
.milieu-icon-btn:hover {
  background: var(--color-surface-sunken);
}
.milieu-icon-btn svg {
  width: 20px;
  height: 20px;
}

.mempty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 20px;
  text-align: center;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-card);
}
.mempty svg {
  width: 28px;
  height: 28px;
  color: var(--color-text-subtle);
}
.mempty p {
  margin: 0;
  max-width: 420px;
}

.mskeleton {
  display: block;
  height: 14px;
  border-radius: 4px;
  background: var(--color-neutral-light);
  animation: mskeleton-pulse 1.2s ease-in-out infinite;
}
@keyframes mskeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.powered-by {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-subtle);
}
.powered-by img {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

/* --- Narrow screens: the sidebar becomes one scrolling row ------------- */

@media (max-width: 1024px) {
  .mshell__body {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding-top: 16px;
  }
  .mshell__nav {
    position: static;
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }
  .mshell__nav-group {
    flex-direction: row;
    gap: 4px;
  }
  .mshell__nav-group + .mshell__nav-group {
    margin-top: 0;
    padding-left: 8px;
    border-left: 1px solid var(--color-border-strong);
  }
  .mshell__nav-heading {
    display: none;
  }
  .mshell__nav-group > div[hidden] {
    display: contents !important;
  }
  .mshell__nav-link {
    padding: 7px 10px;
  }
  .milieu-lockup img {
    height: 34px;
  }
}

@media (max-width: 480px) {
  .milieu-lockup__word {
    flex-direction: column;
    gap: 0;
  }
  :root {
    --mshell-gutter: 14px;
  }
  .mpage-head h1 {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mshell__nav-link,
  .mshell__nav-heading svg,
  .milieu-icon-btn {
    transition: none;
  }
  .mskeleton {
    animation: none;
  }
}

@media print {
  .mshell__nav,
  .mshell__footer,
  #milieu-bar {
    display: none !important;
  }
  .mshell__body {
    grid-template-columns: minmax(0, 1fr);
  }
}
