/* ========================================
   BPI360 Frontend Design Layout CSS
   ======================================== */

/* Force stable scrollbar gutter on html to prevent layout shift between pages
   with and without scrollbars. The browser always reserves ~15px, so 100vw
   content doesn't reflow when a scrollbar appears/disappears during navigation.
   html background matches the page bg so the transparent scrollbar track
   in the reserved gutter is invisible (no white strip visible). */
html {
  scrollbar-gutter: stable;
  background: var(--color-bpi-softblue);
}

/* Base Typography */
body {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  /* Prevent layout shifts during font loading */
  font-display: block;
  text-rendering: optimizeSpeed;
  margin: 0;
  padding: 0;
}

/* Prevent layout shifts during font loading */
* {
  font-display: block;
}

/* Layout Container - Now handled by CSS Grid above */

/* Header Height Synchronization */
.fd-header-sync {
  display: contents;
}

/* CSS-only equal height headers using CSS Grid */
.fd-layout-container {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  background-color: var(--color-bpi-softblue);
  /* Removed transition to prevent layout shifts during sidebar toggle */
  width: 100%;
  align-items: stretch; /* This makes headers in the same row equal height */
  /* Ensure stable dimensions */
  min-width: 320px;
  max-width: 100vw;
  /* clip (not hidden) — avoids creating a scrollport that kills position:sticky */
  overflow-x: clip;
}

/* Collapsed sidebar state */
.fd-layout-container.sidebar-collapsed {
  grid-template-columns: minmax(var(--sidebar-width-collapsed), var(--sidebar-width-collapsed)) 1fr;
}

/* Immediate collapsed state on page load - prevents flash */
.sidebar-collapsed-on-load .fd-layout-container {
  grid-template-columns: minmax(var(--sidebar-width-collapsed), var(--sidebar-width-collapsed)) 1fr;
}

.sidebar-collapsed-on-load .fd-sidebar {
  overflow: visible;
}

/* Collapsed nav/logo appearance from first paint - prevents icon/text/arrow flash before JS adds .fd-sidebar-collapsed (desktop/tablet only) */
@media (min-width: 768px) {
  /* Disable transitions on first paint while .sidebar-collapsed-on-load is active */
  .sidebar-collapsed-on-load .fd-layout-container,
  .sidebar-collapsed-on-load .fd-sidebar,
  .sidebar-collapsed-on-load .fd-sidebar-toggle,
  .sidebar-collapsed-on-load .fd-toggle-icon,
  .sidebar-collapsed-on-load .fd-sidebar .fd-sidebar-header,
  .sidebar-collapsed-on-load .fd-sidebar .fd-sidebar-content,
  .sidebar-collapsed-on-load .fd-sidebar .fd-sidebar-footer,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-link,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-dropdown-trigger,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-section-header,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-section,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-section-title,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-items,
  .sidebar-collapsed-on-load .fd-sidebar .fd-logo-img,
  .sidebar-collapsed-on-load .fd-sidebar .fd-logo-link,
  .sidebar-collapsed-on-load .fd-sidebar .fd-logo-stack {
    transition: none !important;
  }

  /* Ensure toggle button starts in collapsed position and arrow already rotated */
  .sidebar-collapsed-on-load .fd-sidebar-toggle {
    left: var(--sidebar-width-collapsed);
  }
  .sidebar-collapsed-on-load .fd-toggle-icon {
    transform: rotate(180deg);
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-sidebar-header {
    padding: var(--logo-header-pad-y-collapsed) var(--logo-header-pad-x-collapsed);
    justify-content: center;
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-sidebar-logo,
  .sidebar-collapsed-on-load .fd-sidebar .fd-logo-link {
    justify-content: center;
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-logo-stack {
    width: var(--logo-collapsed-size);
    min-width: var(--logo-collapsed-size);
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-logo-stack::before {
    width: var(--logo-collapsed-size);
    height: var(--logo-collapsed-size);
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-logo-expanded {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-logo-collapsed {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-text,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-arrow,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-section-title {
    opacity: 0;
    max-width: 0;
    flex: 0 0 0;
    margin: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-section:first-child {
    padding-top: var(--nav-section-header-expanded-height);
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-section:not(:first-child) .fd-nav-items {
    margin-top: var(--nav-section-header-offset);
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-section:first-child .fd-nav-section-header {
    max-height: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-section:not(:first-child) .fd-nav-section-header {
    max-height: var(--nav-section-header-divider-height);
    height: var(--nav-section-header-divider-height);
    margin: var(--inset-sm) var(--inset-sm);
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-section:not(:first-child) .fd-nav-section-header::before {
    content: '';
    display: block;
    width: 100%;
    height: 0;
    border-top: var(--stroke-hairline) solid var(--border-secondary);
    background: none;
    margin: 0;
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-link,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-dropdown-trigger {
    justify-content: center;
    align-items: center;
    width: var(--nav-collapsed-pill-size);
    height: var(--nav-collapsed-pill-size);
    min-width: var(--nav-collapsed-pill-size);
    min-height: var(--nav-collapsed-pill-size);
    max-width: var(--nav-collapsed-pill-size);
    margin: 0 0 var(--nav-item-margin-bottom) 0;
    padding: 0;
    display: inline-flex;
    flex-shrink: 0;
    box-sizing: border-box;
    background-color: transparent;
    border-radius: var(--radius-button); /* 12px — 3×4pt; not pill */
    box-shadow: none;
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-link .fd-nav-icon-slot,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-link i:first-child,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-dropdown-trigger i:first-child {
    margin-right: 0;
    margin-left: 0;
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-sidebar-content {
    padding: var(--inset-sm) 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-list,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-section,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-items {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-item {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-sidebar-footer {
    /* X = collapsed pill outer (24); Y stays L1 compact */
    padding: var(--inset-sm) var(--nav-link-margin-x-collapsed);
    text-align: center;
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-sidebar-footer-text,
  .sidebar-collapsed-on-load .fd-sidebar .fd-sidebar-footer-links {
    display: none;
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-dropdown-trigger .fd-nav-text,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-dropdown-trigger .fd-nav-arrow {
    display: none;
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-dropdown-menu {
    display: none;
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-link.active,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-dropdown-trigger.active {
    background-color: var(--bg-accent);
    color: var(--interactive-primary);
    border-radius: var(--radius-button); /* 12px — 3×4pt; not pill */
    box-shadow: none;
  }
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-link.active .fd-nav-icon,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-dropdown-trigger.active .fd-nav-icon,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-link.active i:first-child,
  .sidebar-collapsed-on-load .fd-sidebar .fd-nav-dropdown-trigger.active i:first-child {
    color: unset;
  }
}

/* Post-navigation hydration — keep collapsed sidebar stable across full page loads */
html.fd-layout-hydrating .fd-layout-container,
html.fd-layout-hydrating .fd-sidebar,
html.fd-layout-hydrating .fd-sidebar-toggle,
html.fd-layout-hydrating .fd-toggle-icon,
html.fd-layout-hydrating .fd-sidebar .fd-sidebar-header,
html.fd-layout-hydrating .fd-sidebar .fd-sidebar-content,
html.fd-layout-hydrating .fd-sidebar .fd-nav-link,
html.fd-layout-hydrating .fd-sidebar .fd-nav-dropdown-trigger,
html.fd-layout-hydrating .fd-sidebar .fd-nav-section-header,
html.fd-layout-hydrating .fd-sidebar .fd-nav-section-title,
html.fd-layout-hydrating .fd-sidebar .fd-nav-text,
html.fd-layout-hydrating .fd-sidebar .fd-logo-img,
html.fd-layout-hydrating .fd-sidebar .fd-logo-stack,
html.fd-layout-hydrating .fd-skin .fd-sidebar .fd-nav-icon-slot {
  transition: none !important;
  animation: none !important;
}

/* Collapsed session — soften main content swap on navigation */
@keyframes fd-content-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html.fd-collapsed-session:not(.fd-layout-hydrated) .fd-content-body {
  opacity: 0;
}

html.fd-collapsed-session.fd-layout-hydrated .fd-content-body {
  animation: fd-content-enter var(--transition-content-enter) both;
}

/* Collapsed navigation — freeze sidebar chrome after hydration (no jump on page change) */
html.fd-collapsed-session.fd-layout-hydrated:not(.fd-sidebar-animate) .fd-layout-container,
html.fd-collapsed-session.fd-layout-hydrated:not(.fd-sidebar-animate) .fd-sidebar,
html.fd-collapsed-session.fd-layout-hydrated:not(.fd-sidebar-animate) .fd-sidebar-toggle,
html.fd-collapsed-session.fd-layout-hydrated:not(.fd-sidebar-animate) .fd-toggle-icon,
html.fd-collapsed-session.fd-layout-hydrated:not(.fd-sidebar-animate) .fd-sidebar .fd-sidebar-header,
html.fd-collapsed-session.fd-layout-hydrated:not(.fd-sidebar-animate) .fd-sidebar .fd-sidebar-content,
html.fd-collapsed-session.fd-layout-hydrated:not(.fd-sidebar-animate) .fd-sidebar .fd-sidebar-footer,
html.fd-collapsed-session.fd-layout-hydrated:not(.fd-sidebar-animate) .fd-sidebar .fd-nav-link,
html.fd-collapsed-session.fd-layout-hydrated:not(.fd-sidebar-animate) .fd-sidebar .fd-nav-section-header,
html.fd-collapsed-session.fd-layout-hydrated:not(.fd-sidebar-animate) .fd-sidebar .fd-nav-section-title,
html.fd-collapsed-session.fd-layout-hydrated:not(.fd-sidebar-animate) .fd-sidebar .fd-nav-text,
html.fd-collapsed-session.fd-layout-hydrated:not(.fd-sidebar-animate) .fd-sidebar .fd-nav-arrow,
html.fd-collapsed-session.fd-layout-hydrated:not(.fd-sidebar-animate) .fd-sidebar .fd-logo-img,
html.fd-collapsed-session.fd-layout-hydrated:not(.fd-sidebar-animate) .fd-sidebar .fd-logo-stack {
  transition: none !important;
  animation: none !important;
}

/* Keep proximity icon lift on hover during collapsed sessions */
html.fd-collapsed-session.fd-layout-hydrated .fd-skin .fd-sidebar-nav--proximity .fd-nav-icon-slot {
  transition: transform var(--nav-icon-settle-duration) cubic-bezier(0.33, 1, 0.68, 1);
}

@media (prefers-reduced-motion: reduce) {
  html.fd-collapsed-session:not(.fd-layout-hydrated) .fd-content-body {
    opacity: 1;
  }

  html.fd-collapsed-session.fd-layout-hydrated .fd-content-body {
    animation: none;
  }
}

/* Prevent flash of expanded sidebar on page load */
html.fd-collapsed-session .fd-layout-container,
html.fd-collapsed-session .fd-sidebar {
  transition: none !important;
}

html.fd-collapsed-session.fd-sidebar-animate .fd-layout-container {
  transition: grid-template-columns var(--transition-sidebar) !important;
}

@media (min-width: 768px) {
  html.fd-collapsed-session .fd-layout-container.sidebar-collapsed,
  html.sidebar-collapsed-on-load.fd-collapsed-session .fd-layout-container {
    grid-template-columns: minmax(var(--sidebar-width-collapsed), var(--sidebar-width-collapsed)) 1fr;
  }

  html.fd-collapsed-session .fd-layout-container.sidebar-collapsed .fd-sidebar,
  html.sidebar-collapsed-on-load.fd-collapsed-session .fd-sidebar {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}

/* Prevent flash of expanded sidebar on page load — expanded sessions only */
html:not(.fd-collapsed-session) .fd-layout-container {
  transition: grid-template-columns var(--transition-sidebar);
}

/* Initial state - sidebar width follows grid track; animate only on explicit toggle */
.fd-layout-container:not(.sidebar-collapsed) .fd-sidebar {
  transition: none;
}

.fd-layout-container.sidebar-collapsed .fd-sidebar {
  transition: none;
}

/* Prevent flash by hiding sidebar content until JavaScript loads */
.fd-sidebar {
  overflow: hidden;
}

/* Ensure content area expands properly */
.fd-layout-container.sidebar-collapsed .fd-content-area {
  width: 100%;
  max-width: none;
}

.fd-sidebar {
  grid-row: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* never grow past parent rail (84/256) */
  grid-template-rows: auto 1fr auto;
  width: 100%;
  background-color: var(--bg-primary);
  /* Edge line: --shadow-sidebar → --stroke-inset-inline-end (paint). Never border-right (steals width from 256/84). */
  border-right: none;
  /* Removed transition to prevent layout shifts */
  box-shadow: var(--shadow-sidebar);
  align-items: stretch; /* Ensure sidebar content stretches to match content area */
  min-width: 0;
}

/* Desktop: shell is a no-op so header/content/footer stay sidebar grid children */
.fd-sidebar-shell {
  display: contents;
}

/*
  Desktop/tablet — dual sticky columns (no sidebar scrollbar, no transform).

  Both columns use position:sticky with top: min(0, vh − height) set by JS.
  Shorter column sticks when fully on-screen; taller keeps scrolling with the
  page. No translateY — that was lifting the sidebar and leaving a bottom gap.
*/
@media (min-width: 768px) {
  .fd-layout-container {
    grid-template-rows: auto;
    align-items: start;
  }

  .fd-sidebar,
  .fd-content-area {
    grid-row: auto;
    position: sticky;
    top: var(--fd-sticky-top, 0px);
    align-self: start;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    overflow: visible !important;
    transform: none !important; /* dual-sticky must not paint-shift the rail */
  }

  .fd-sidebar {
    grid-column: 1;
  }

  .fd-content-area {
    grid-column: 2;
  }

  /* Fixed/overlay siblings — park in col 1 so they don't create a 3rd track */
  .fd-sidebar-toggle,
  .fd-mobile-overlay {
    grid-column: 1;
  }

  .fd-sidebar .fd-sidebar-content {
    overflow: visible;
  }
}

.fd-content-area {
  grid-row: 1 / -1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  /* Removed transition to prevent layout shifts */
  width: 100%;
  /* Allow horizontal content to use full width on narrower laptop screens */
  overflow-x: visible;
  overflow-y: visible;
  align-items: stretch; /* Ensure content area stretches to match sidebar */
}

/* Ensure headers are in the same grid row */
.fd-sidebar-header {
  grid-row: 1;
}

.fd-content-header {
  grid-row: 1;
}

/* Ensure footers are in the same grid row */
.fd-sidebar-footer {
  grid-row: 3;
}

.fd-content-footer {
  grid-row: 3;
}

/* Fallback for browsers that don't support CSS Grid */
@supports not (display: grid) {
  .fd-layout-container {
    display: flex;
  }
  
  .fd-sidebar {
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
  }
  
  .fd-content-area {
    display: flex;
    flex-direction: column;
    flex: 1;
  }
}

/* ========================================
   SIDEBAR STYLES
   ======================================== */

/* Sidebar styles now handled by CSS Grid above */

/* Sidebar Header */
.fd-sidebar-header {
  padding: var(--logo-header-pad-y-expanded) var(--logo-header-pad-x-expanded);
  border-bottom: none;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: var(--header-height);
  height: var(--header-height);
  box-sizing: border-box;
  overflow: hidden;
  transition: padding var(--transition-sidebar);
}

.fd-sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  transition: justify-content var(--transition-sidebar);
}

.fd-logo-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  max-width: 100%;
}

/* Stacked logos — centre-origin scale crossfade */
.fd-logo-stack {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  transition: width var(--transition-sidebar),
    min-width var(--transition-sidebar),
    height var(--transition-sidebar);
}

/* Sizing ghost — stack dimensions while logos are absolutely centred */
.fd-logo-stack::before {
  content: '';
  display: block;
  width: var(--logo-expanded-width);
  height: var(--logo-expanded-height);
  max-height: var(--logo-expanded-height);
  visibility: hidden;
  transition: width var(--transition-sidebar), height var(--transition-sidebar);
}

.fd-logo-img {
  position: absolute;
  top: 50%;
  left: 50%;
  object-fit: contain;
  transform-origin: center center;
  margin: 0;
  transition-property: opacity, transform, visibility;
  transition-duration: var(--logo-fade-duration);
  transition-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
}

.fd-logo-expanded {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
  height: var(--logo-expanded-height);
  max-height: var(--logo-expanded-height);
  width: auto;
  max-width: var(--logo-expanded-width);
  transition-delay: 0s;
}

.fd-logo-collapsed {
  width: var(--logo-collapsed-size);
  height: var(--logo-collapsed-size);
  max-width: var(--logo-collapsed-size);
  max-height: var(--logo-collapsed-size);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  transition-delay: var(--logo-fade-stagger);
}

/* Expanding — icon shrinks first, then wordmark grows */
.fd-sidebar:not(.fd-sidebar-collapsed) .fd-logo-collapsed {
  transition-delay: 0s;
}

.fd-sidebar:not(.fd-sidebar-collapsed) .fd-logo-expanded {
  transition-delay: var(--logo-fade-stagger);
}

/* Collapsed — wordmark shrinks first, then icon grows */
.fd-sidebar-collapsed .fd-sidebar-header {
  padding: var(--logo-header-pad-y-collapsed) var(--logo-header-pad-x-collapsed);
  justify-content: center;
}

.fd-sidebar-collapsed .fd-sidebar-logo,
.fd-sidebar-collapsed .fd-logo-link {
  justify-content: center;
}

.fd-sidebar-collapsed .fd-logo-stack {
  width: var(--logo-collapsed-size);
  min-width: var(--logo-collapsed-size);
}

.fd-sidebar-collapsed .fd-logo-stack::before {
  width: var(--logo-collapsed-size);
  height: var(--logo-collapsed-size);
}

.fd-sidebar-collapsed .fd-logo-expanded {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  transition-delay: 0s;
}

.fd-sidebar-collapsed .fd-logo-collapsed {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
  transition-delay: var(--logo-fade-stagger);
}

/* Sidebar Content — fills column; scrolling owned by .fd-sidebar when needed */
.fd-sidebar-content {
  flex: 1;
  padding: var(--shell-gutter-y) 0;
  overflow: visible;
}

/* New Sidebar Navigation */
.fd-sidebar-nav {
  width: 100%;
}

.fd-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fd-nav-section {
  margin-bottom: var(--nav-section-gap);
}

.fd-nav-section-header {
  padding: var(--inset-sm) var(--shell-gutter);
  margin-bottom: var(--content-related-gap); /* L1 — 8 — label → first item */
  max-height: var(--nav-section-header-expanded-height);
  overflow: hidden;
  transition: padding var(--transition-sidebar), margin var(--transition-sidebar),
    max-height var(--transition-sidebar), opacity var(--transition-sidebar);
}

.fd-nav-section-title {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
  line-height: var(--line-height-meta); /* 11→16 */
  display: block;
  max-height: var(--line-height-meta);
  overflow: hidden;
  opacity: 1;
  transition: opacity var(--transition-sidebar), max-height var(--transition-sidebar),
    margin var(--transition-sidebar), visibility var(--transition-sidebar);
}

/* First section — padding replaces header height when collapsed (retains icon Y) */
.fd-sidebar .fd-nav-section:first-child {
  padding-top: 0;
  transition: padding-top var(--transition-sidebar);
}

.fd-sidebar .fd-nav-section:not(:first-child) .fd-nav-items {
  margin-top: 0;
  transition: margin-top var(--transition-sidebar);
}

.fd-nav-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fd-nav-item {
  margin: 0;
}

.fd-nav-link {
  font-family: var(--font-family-primary);
  display: flex;
  align-items: center;
  padding: var(--inset-sm) var(--nav-link-pad-x-expanded);
  margin: 0 var(--nav-link-margin-x-expanded) var(--nav-item-margin-bottom) var(--nav-link-margin-x-expanded);
  color: var(--text-secondary);
  text-decoration: none;
  transition: padding var(--transition-sidebar),
    margin var(--transition-sidebar),
    background-color var(--transition-sidebar),
    border-radius var(--transition-sidebar),
    color var(--transition-sidebar),
    box-shadow var(--transition-sidebar);
  border-radius: var(--radius-button); /* 12px — 3×4pt; match controls */
  position: relative;
  background-color: var(--bg-secondary);
  min-height: var(--nav-item-min-height);
  font-size: var(--nav-link-font-size);
  line-height: var(--line-height-body); /* 13→20 */
}

.fd-nav-link:hover {
  background-color: var(--bg-accent);
  color: var(--interactive-primary);
}

/* Focus state for accessibility */
.fd-nav-link:focus-visible {
  outline: 2px solid var(--interactive-primary);
  outline-offset: 2px;
  background-color: var(--bg-accent);
  color: var(--interactive-primary);
}

/* Primary active state - full width blue background like "Orders" in screenshot */
.fd-nav-link.active {
  background-color: var(--interactive-primary);
  color: var(--text-inverse);
  margin: 0 var(--nav-link-margin-x-expanded) var(--nav-item-margin-bottom) var(--nav-link-margin-x-expanded);
  padding: var(--inset-sm) var(--nav-link-pad-x-expanded);
  border-radius: var(--radius-button); /* 12px — 3×4pt */
}

/* Secondary selected state — same outer/inner rhythm as default nav link */
.fd-nav-link.selected {
  background-color: var(--bg-secondary);
  color: var(--interactive-primary);
  margin: 0 var(--nav-link-margin-x-expanded) var(--nav-item-margin-bottom) var(--nav-link-margin-x-expanded);
  padding: var(--inset-sm) var(--nav-link-pad-x-expanded);
  border-radius: var(--radius-button); /* 12px — 3×4pt */
}

.fd-nav-link .fd-nav-icon:not(.ph-duotone),
.fd-nav-link i:first-child:not(.ph-duotone),
.fd-nav-dropdown-trigger i:first-child:not(.ph-duotone) {
  margin-right: var(--inset-sm);
  width: var(--nav-icon-width);
  text-align: center;
  font-size: var(--nav-icon-size);
  color: var(--interactive-primary);
  flex-shrink: 0;
}

.fd-nav-link.active i:first-child:not(.ph-duotone) {
  color: var(--text-inverse);
}

.fd-nav-link.selected i:first-child:not(.ph-duotone) {
  color: var(--interactive-primary);
}

/* Prevent hover effects on active nav links - maintain active styling */
.fd-nav-link.active:hover {
  background-color: var(--interactive-primary);
  color: var(--text-inverse);
}

.fd-nav-link.active:hover i:first-child:not(.ph-duotone) {
  color: var(--text-inverse);
}

.fd-nav-text {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 14rem;
  opacity: 1;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.32s cubic-bezier(0.33, 1, 0.68, 1),
    max-width var(--transition-sidebar),
    flex var(--transition-sidebar),
    margin var(--transition-sidebar),
    padding var(--transition-sidebar),
    visibility var(--transition-sidebar);
}

.fd-nav-arrow {
  margin-left: auto;
  font-size: var(--nav-arrow-size);
  flex-shrink: 0;
  opacity: 1;
  max-width: 2rem;
  overflow: hidden;
  transition: opacity 0.32s cubic-bezier(0.33, 1, 0.68, 1),
    max-width var(--transition-sidebar),
    margin var(--transition-sidebar),
    visibility var(--transition-sidebar);
}

.fd-sidebar-collapsed .fd-nav-text,
.fd-sidebar-collapsed .fd-nav-arrow {
  opacity: 0;
  max-width: 0;
  flex: 0 0 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.fd-sidebar-collapsed .fd-nav-section-title {
  opacity: 0;
  max-height: 0;
  margin: 0;
  visibility: hidden;
}

.fd-sidebar-collapsed .fd-nav-section:first-child {
  padding-top: var(--nav-section-header-expanded-height);
}

.fd-sidebar-collapsed .fd-nav-section:not(:first-child) .fd-nav-items {
  margin-top: var(--nav-section-header-offset);
}

.fd-sidebar-collapsed .fd-nav-section:first-child .fd-nav-section-header {
  max-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
}

.fd-sidebar-collapsed .fd-nav-section:not(:first-child) .fd-nav-section-header {
  max-height: var(--nav-section-header-divider-height);
  height: var(--nav-section-header-divider-height);
  padding: 0;
  margin: var(--inset-sm) var(--inset-sm);
  opacity: 1;
  display: flex;
  align-items: center;
}

/* Replace section title with HR line in collapsed state (sections 2+) —
   hairline via border (paint only); band height stays on 4pt */
.fd-sidebar-collapsed .fd-nav-section:not(:first-child) .fd-nav-section-header::before {
  content: '';
  display: block;
  width: 100%;
  height: 0;
  border-top: var(--stroke-hairline) solid var(--border-secondary);
  background: none;
  margin: 0;
}

/* Collapsed sidebar — centred rounded-rect icon hits */
.fd-sidebar-collapsed .fd-nav-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: var(--nav-collapsed-pill-size);
  height: var(--nav-collapsed-pill-size);
  min-width: var(--nav-collapsed-pill-size);
  min-height: var(--nav-collapsed-pill-size);
  max-width: var(--nav-collapsed-pill-size);
  margin: 0 0 var(--nav-item-margin-bottom) 0;
  padding: 0;
  flex-shrink: 0;
  box-sizing: border-box;
  border-radius: var(--radius-button); /* 12px — 3×4pt; not pill */
  background-color: transparent;
  box-shadow: none;
}

.fd-sidebar-collapsed .fd-nav-link:hover {
  background-color: var(--bg-accent);
  color: var(--interactive-primary);
}

.fd-sidebar-collapsed .fd-nav-link.active {
  background-color: var(--bg-accent);
  color: var(--interactive-primary);
  box-shadow: none;
}

.fd-sidebar-collapsed .fd-nav-link.active i:first-child:not(.ph-duotone) {
  color: unset;
}

.fd-sidebar-collapsed .fd-nav-link.active:hover {
  background-color: var(--bg-accent);
  color: var(--interactive-primary);
}

.fd-sidebar-collapsed .fd-nav-link.active:hover i:first-child:not(.ph-duotone) {
  color: unset;
}

.fd-sidebar-collapsed .fd-nav-dropdown-trigger {
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0 0 var(--nav-item-margin-bottom) 0;
  width: var(--nav-collapsed-pill-size);
  height: var(--nav-collapsed-pill-size);
  min-width: var(--nav-collapsed-pill-size);
  min-height: var(--nav-collapsed-pill-size);
  max-width: var(--nav-collapsed-pill-size);
  display: inline-flex;
  background-color: transparent;
  border-radius: var(--radius-button); /* 12px — 3×4pt; not pill */
  position: relative;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Ensure all sidebar sections have consistent width and background in collapsed state */
.fd-sidebar-collapsed .fd-sidebar-header,
.fd-sidebar-collapsed .fd-sidebar-content,
.fd-sidebar-collapsed .fd-sidebar-footer {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background-color: var(--bg-primary);
}

/* Collapsed sidebar header — padding animated above with logo rules */

/* Collapsed sidebar content — stretch rows (no centre-shift) */
.fd-sidebar-collapsed .fd-sidebar-content {
  padding: var(--inset-sm) 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.fd-sidebar-collapsed .fd-nav-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.fd-sidebar-collapsed .fd-nav-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: var(--nav-section-gap-collapsed);
}

.fd-sidebar-collapsed .fd-nav-items {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.fd-sidebar-collapsed .fd-nav-item {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Collapsed sidebar footer — X matches pill outer; Y stays L1 compact */
.fd-sidebar-collapsed .fd-sidebar-footer {
  padding: var(--inset-sm) var(--nav-link-margin-x-collapsed);
  text-align: center;
}

/* Version string cannot fit 24+24 pad in 84 rail — hide with links */
.fd-sidebar-collapsed .fd-sidebar-footer-text,
.fd-sidebar-collapsed .fd-sidebar-footer-links {
  display: none;
}

/* Collapsed sidebar — overflow visible for tooltips + proximity scale */
.fd-sidebar.fd-sidebar-collapsed {
  overflow: visible;
}

.fd-sidebar-collapsed .fd-sidebar-content,
.fd-sidebar-collapsed .fd-sidebar-nav,
.fd-sidebar-collapsed .fd-nav-list {
  overflow: visible;
}

/* Collapsed nav tooltips — Pulse-style CSS (::after), desktop only */
@media (min-width: 768px) {
  .fd-sidebar-collapsed .fd-nav-link[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + var(--inset-md));
    top: 50%;
    transform: translateY(-50%);
    padding: var(--inset-xs) var(--inset-md);
    border-radius: var(--radius-md);
    background: var(--text-primary);
    color: var(--text-inverse);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    transition-delay: 0.35s;
    z-index: var(--z-popover);
    box-shadow: var(--shadow-02);
  }

  .fd-sidebar-collapsed .fd-nav-link[data-tooltip]:hover::after,
  .fd-sidebar-collapsed .fd-nav-link[data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
  }
}

@media (min-width: 768px) and (prefers-reduced-motion: reduce) {
  .fd-sidebar-collapsed .fd-nav-link[data-tooltip]::after {
    transition: none;
    transition-delay: 0s;
  }

  .fd-nav-section-header,
  .fd-nav-section-title,
  .fd-sidebar .fd-nav-section:first-child,
  .fd-sidebar .fd-nav-section:not(:first-child) .fd-nav-items,
  .fd-skin .fd-sidebar .fd-nav-icon-slot .ph-duotone,
  .fd-sidebar-collapsed .fd-nav-link,
  .fd-logo-img,
  .fd-logo-stack {
    transition: none;
  }
}

/* ========================================
   DROPDOWN NAVIGATION STYLES
   ======================================== */

/* Dropdown Container */
.fd-nav-dropdown {
  position: relative;
}

/* Dropdown Trigger — match .fd-nav-link outer (L3) + inner (16) rhythm */
.fd-nav-dropdown-trigger {
  display: flex;
  align-items: center;
  padding: var(--inset-sm) var(--nav-link-pad-x-expanded);
  margin: 0 var(--nav-link-margin-x-expanded) var(--nav-item-margin-bottom) var(--nav-link-margin-x-expanded);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-normal);
  border-radius: var(--radius-button); /* 12px — 3×4pt; match nav links */
  position: relative;
  background-color: var(--bg-secondary);
  min-height: var(--nav-item-min-height);
  font-size: var(--nav-link-font-size); /* 13px body */
}

.fd-nav-dropdown-trigger:hover {
  background-color: var(--bg-accent);
  color: var(--interactive-primary);
}

/* Focus state for dropdown triggers */
.fd-nav-dropdown-trigger:focus-visible {
  outline: 2px solid var(--interactive-primary);
  outline-offset: 2px;
  background-color: var(--bg-accent);
  color: var(--interactive-primary);
}

/* Primary active state for dropdown triggers */
.fd-nav-dropdown-trigger.active {
  background-color: var(--interactive-primary);
  color: var(--text-inverse);
  margin: 0 var(--nav-link-margin-x-expanded) var(--nav-item-margin-bottom) var(--nav-link-margin-x-expanded);
  padding: var(--inset-sm) var(--nav-link-pad-x-expanded);
  border-radius: var(--radius-button); /* 12px — 3×4pt */
}

/* Secondary selected state for dropdown triggers */
.fd-nav-dropdown-trigger.selected {
  background-color: var(--bg-secondary);
  color: var(--interactive-primary);
  margin: 0 var(--nav-link-margin-x-expanded) var(--nav-item-margin-bottom) var(--nav-link-margin-x-expanded);
  padding: var(--inset-sm) var(--nav-link-pad-x-expanded);
  border-radius: var(--radius-button); /* 12px — 3×4pt */
}

.fd-nav-dropdown-trigger i:first-child {
  margin-right: var(--inset-sm);
  width: var(--nav-icon-width);
  text-align: center;
  font-size: var(--nav-icon-size);
  color: var(--interactive-primary);
}

/* Icon slot parity with .fd-nav-link (Phosphor duotone) */
.fd-nav-dropdown-trigger .fd-nav-icon-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--nav-icon-width);
  margin-right: var(--inset-sm);
  flex-shrink: 0;
}

.fd-nav-dropdown-trigger .fd-nav-icon-slot .ph-duotone {
  font-size: var(--nav-icon-size);
}

/* Icon colors for dropdown trigger states */
.fd-nav-dropdown-trigger.active i:first-child {
  color: var(--text-inverse);
}

.fd-nav-dropdown-trigger.selected i:first-child {
  color: var(--interactive-primary);
}

/* Prevent hover effects on active dropdown triggers - maintain active styling */
.fd-nav-dropdown-trigger.active:hover {
  background-color: var(--interactive-primary);
  color: var(--text-inverse);
}

.fd-nav-dropdown-trigger.active:hover i:first-child {
  color: var(--text-inverse);
}

.fd-nav-dropdown-trigger.active:hover .fd-nav-arrow {
  color: var(--text-inverse);
}

.fd-nav-dropdown-trigger .fd-nav-text {
  flex: 1;
  transition: opacity var(--transition-normal);
}

/* Higher specificity override for dropdown text color and font to match nav links */
.fd-skin .fd-sidebar .fd-nav-dropdown-trigger .fd-nav-text {
  color: var(--text-secondary);
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-light);
  font-size: var(--nav-link-font-size);
}

/* Higher specificity override for dropdown submenu items to match nav links */
.fd-skin .fd-sidebar .fd-nav-dropdown-link {
  color: var(--text-secondary);
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-light);
  font-size: var(--nav-link-font-size);
}

.fd-skin .fd-sidebar .fd-nav-dropdown-link .fd-nav-text {
  color: var(--text-secondary);
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-light);
  font-size: var(--nav-link-font-size);
}

/* ========================================
   NAVIGATION TEXT HIGH SPECIFICITY OVERRIDES
   ======================================== */

/* Main Navigation Links - Default State */
.fd-skin .fd-sidebar .fd-nav-link {
  color: var(--text-secondary);
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-light);
  font-size: var(--nav-link-font-size);
}

.fd-skin .fd-sidebar .fd-nav-link .fd-nav-text {
  color: var(--text-secondary);
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-light);
  font-size: var(--nav-link-font-size);
}

/* Navigation Icons — Phosphor duotone colours in fd-icons.css */
.fd-skin .fd-sidebar .fd-nav-link i:first-child:not(.ph-duotone) {
  color: var(--interactive-primary);
}

/* High Specificity Overrides for Active States - Ensure White Text and Icons */
.fd-skin .fd-sidebar .fd-nav-link.active {
  color: var(--text-inverse);
}

.fd-skin .fd-sidebar .fd-nav-link.active .fd-nav-text {
  color: var(--text-inverse);
}

.fd-skin .fd-sidebar .fd-nav-link.active i:first-child:not(.ph-duotone) {
  color: var(--text-inverse);
}

.fd-skin .fd-sidebar .fd-nav-link.active:hover {
  color: var(--text-inverse);
}

.fd-skin .fd-sidebar .fd-nav-link.active:hover .fd-nav-text {
  color: var(--text-inverse);
}

.fd-skin .fd-sidebar .fd-nav-link.active:hover i:first-child:not(.ph-duotone) {
  color: var(--text-inverse);
}

/* Collapsed active — centred rounded-rect accent */
.fd-skin .fd-sidebar-collapsed .fd-nav-link.active,
.fd-skin .fd-sidebar-collapsed .fd-nav-link.active:hover {
  color: var(--interactive-primary);
  background-color: var(--bg-accent);
  box-shadow: none;
  border-radius: var(--radius-button); /* 12px — 3×4pt; not pill */
}

.fd-skin .fd-sidebar-collapsed .fd-nav-link.active .fd-nav-text,
.fd-skin .fd-sidebar-collapsed .fd-nav-link.active:hover .fd-nav-text {
  color: var(--interactive-primary);
}

.fd-skin .fd-sidebar-collapsed .fd-nav-link.active i:first-child:not(.ph-duotone),
.fd-skin .fd-sidebar-collapsed .fd-nav-link.active:hover i:first-child:not(.ph-duotone) {
  color: unset;
}

/* High Specificity Overrides for Active Dropdown Triggers */
.fd-skin .fd-sidebar .fd-nav-dropdown-trigger.active {
  color: var(--text-inverse);
}

.fd-skin .fd-sidebar .fd-nav-dropdown-trigger.active .fd-nav-text {
  color: var(--text-inverse);
}

.fd-skin .fd-sidebar .fd-nav-dropdown-trigger.active i:first-child {
  color: var(--text-inverse);
}

.fd-skin .fd-sidebar .fd-nav-dropdown-trigger.active:hover {
  color: var(--text-inverse);
}

.fd-skin .fd-sidebar .fd-nav-dropdown-trigger.active:hover .fd-nav-text {
  color: var(--text-inverse);
}

.fd-skin .fd-sidebar .fd-nav-dropdown-trigger.active:hover i:first-child {
  color: var(--text-inverse);
}

.fd-skin .fd-sidebar-collapsed .fd-nav-dropdown-trigger.active i:first-child {
  color: var(--text-inverse);
}

.fd-skin .fd-sidebar-collapsed .fd-nav-dropdown-trigger.active:hover i:first-child {
  color: var(--text-inverse);
}

/* Collapsed State Dropdown Arrow - Point Right */
.fd-skin .fd-sidebar-collapsed .fd-nav-dropdown-trigger .fd-nav-arrow {
  display: block !important;
  transform: rotate(-90deg); /* Rotate chevron-down to point right */
  font-size: var(--nav-arrow-size);
  color: var(--interactive-primary);
  transition: all var(--transition-normal);
  margin-left: auto; /* Position it to the right */
}

/* Collapsed State Dropdown Arrow Hover */
.fd-skin .fd-sidebar-collapsed .fd-nav-dropdown-trigger:hover .fd-nav-arrow {
  color: var(--interactive-primary);
}

/* Collapsed State Dropdown Arrow Active */
.fd-skin .fd-sidebar-collapsed .fd-nav-dropdown-trigger.active .fd-nav-arrow {
  color: var(--text-inverse);
}

.fd-skin .fd-sidebar-collapsed .fd-nav-dropdown-trigger.active:hover .fd-nav-arrow {
  color: var(--text-inverse);
}

/* ========================================
   MOBILE RESPONSIVE OVERRIDES
   ======================================== */

/* Hide sidebar toggle on mobile devices */
@media (max-width: 767px) {
  .fd-skin .fd-sidebar-toggle {
    display: none;
  }
}

/* ========================================
   HEADER ELEMENTS HIGH SPECIFICITY OVERRIDES
   ======================================== */

/* Search Input High Specificity */
.fd-skin .fd-content-header .fd-search-input {
  font-family: var(--font-family-primary);
  font-size: var(--fd-control-font-size);
  color: var(--text-primary);
  border: var(--stroke-hairline) solid var(--border-primary);
  border-radius: var(--form-field-radius); /* 12px — 3×4pt */
  padding: var(--inset-sm) var(--layout-gap-lg) var(--inset-sm) var(--inset-lg);
  background-color: var(--bg-primary);
  transition: all var(--transition-normal);
}

.fd-skin .fd-content-header .fd-search-input:focus {
  border-color: var(--interactive-primary);
  box-shadow: var(--shadow-focus);
  outline: none;
}

.fd-skin .fd-content-header .fd-search-input::placeholder {
  color: var(--text-secondary);
  font-size: var(--fd-control-font-size);
}

/* Button High Specificity — Pulse parity (geometry/typography; states in fd-buttons.css) */
.fd-skin .fd-content-header .fd-btn {
  box-sizing: border-box;
  font-family: var(--font-family-primary);
  font-size: var(--fd-control-font-size);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-secondary); /* 12→16 */
  border-radius: var(--radius-button); /* 12px — 3×4pt; labeled buttons (icon-round stays 50%) */
  padding: var(--inset-xs) var(--inset-md);
  gap: var(--toolbar-action-gap);
  transition: all var(--transition-normal);
}

.fd-skin .fd-content-header .fd-btn:not(.fd-btn-icon-round):not(.fd-toolbar-icon-btn) {
  min-height: var(--control-track-height);
}

/* User Profile High Specificity */
.fd-skin .fd-content-header .fd-user-name {
  font-family: var(--font-family-primary);
  font-size: var(--nav-arrow-size);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  line-height: var(--line-height-secondary); /* 12→16 */
}

.fd-skin .fd-content-header .fd-user-email,
.fd-skin .fd-content-header .fd-user-role {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-normal);
  color: var(--text-secondary);
  line-height: var(--line-height-meta); /* 11→16 */
}

/* User Button High Specificity */
.fd-skin .fd-content-header .fd-user-button {
  font-family: var(--font-family-primary);
  font-size: var(--nav-arrow-size);
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--inset-sm);
  border-radius: var(--radius-button); /* 12px — 3×4pt */
  transition: all var(--transition-normal);
}

.fd-skin .fd-content-header .fd-user-button:hover {
  background-color: var(--bg-secondary);
  color: var(--interactive-primary);
}

/* Mobile Menu Toggle High Specificity */
.fd-skin .fd-content-header .fd-mobile-menu-toggle {
  font-family: var(--font-family-primary);
  color: var(--interactive-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--inset-sm);
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.fd-skin .fd-content-header .fd-mobile-menu-toggle:hover {
  background-color: var(--bg-secondary);
  color: var(--interactive-primary);
}

.fd-nav-dropdown-trigger .fd-nav-arrow {
  margin-left: auto;
  font-size: var(--nav-arrow-size);
  transition: all var(--transition-normal);
}

/* Arrow colors for different states */
.fd-nav-dropdown-trigger.active .fd-nav-arrow {
  color: var(--text-inverse);
}

.fd-nav-dropdown-trigger.selected .fd-nav-arrow {
  color: var(--interactive-primary);
}

/* Dropdown Menu - Modern Sidebar Style - Updated v2 */
.fd-nav-dropdown-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: transparent;
  position: relative;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
  margin-left: var(--dropdown-margin-left);
}

/* Dropdown Menu - Open State */
.fd-nav-dropdown.open .fd-nav-dropdown-menu {
  max-height: var(--dropdown-max-height);
  padding: var(--dropdown-padding) 0;
}

.fd-nav-dropdown.open .fd-nav-arrow {
  transform: rotate(180deg);
}

/* Dropdown Items */
.fd-nav-dropdown-item {
  margin: 0;
  position: relative;
  display: flex;
  align-items: center;
  list-style: none;
}

/* Dropdown Links — nest under parent icon column (same L3 outer end) */
.fd-nav-dropdown-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: var(--inset-sm) var(--nav-link-pad-x-expanded);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-normal);
  border-radius: var(--radius-button); /* 12px — 3×4pt; match nav links */
  margin: var(--inset-xs) var(--nav-link-margin-x-expanded) var(--inset-xs) var(--nav-link-nested-margin-start);
  position: relative;
  font-size: var(--font-size-body); /* 13px — match main nav */
  background-color: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  min-height: var(--nav-item-min-height);
  font-weight: var(--font-weight-normal);
}

.fd-nav-dropdown-link:hover {
  color: var(--interactive-primary);
  background-color: var(--bg-accent);
  transform: translateX(2px);
}

/* Focus state for dropdown links */
.fd-nav-dropdown-link:focus-visible {
  outline: 2px solid var(--interactive-primary);
  outline-offset: 2px;
  color: var(--interactive-primary);
  background-color: var(--bg-accent);
  transform: translateX(2px);
}

.fd-nav-dropdown-link.active {
  color: var(--interactive-primary);
  background-color: var(--bg-secondary);
  font-weight: var(--font-weight-medium);
}

.fd-nav-dropdown-link .fd-nav-text {
  flex: 1;
  position: relative;
  margin-left: 0;
  text-align: left;
}

/* Modern sidebar indicator - left border line - REMOVED */

/* Subtle dot indicator for submenu items - REMOVED to prevent bullet points */

/* Badge Styles */
.fd-nav-badge {
  background-color: var(--bg-accent);
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  padding: var(--inset-2xs) var(--inset-xs);
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
  line-height: 1.2;
}

.fd-nav-dropdown-link.active .fd-nav-badge {
  background-color: var(--text-inverse);
  color: var(--interactive-primary);
}

/* Collapsed Sidebar States */
.fd-sidebar-collapsed .fd-nav-dropdown-trigger .fd-nav-text {
  display: none;
}

/* Hide arrow by default in collapsed state, but show it with high specificity override */
.fd-sidebar-collapsed .fd-nav-dropdown-trigger .fd-nav-arrow {
  display: none;
}

/* Fix icon alignment in collapsed state - remove margins since text is hidden */
.fd-sidebar-collapsed .fd-nav-link .fd-nav-icon-slot,
.fd-sidebar-collapsed .fd-nav-link i:first-child:not(.ph-duotone),
.fd-sidebar-collapsed .fd-nav-dropdown-trigger i:first-child:not(.ph-duotone) {
  margin-right: 0;
  margin-left: 0;
}

.fd-sidebar-collapsed .fd-nav-dropdown-menu {
  display: none;
}

/* Enhanced dropdown behavior in collapsed state */
.fd-sidebar-collapsed .fd-nav-dropdown-trigger {
  cursor: pointer;
  pointer-events: auto;
  position: relative;
}

/* Add hover effect for collapsed dropdown triggers */
.fd-sidebar-collapsed .fd-nav-dropdown-trigger:hover {
  background-color: transparent;
  color: var(--interactive-primary);
}

/* Active state for collapsed dropdown triggers */
.fd-sidebar-collapsed .fd-nav-dropdown-trigger.active {
  background-color: var(--interactive-primary);
  color: var(--text-inverse);
}

/* Active state icon color for collapsed dropdown triggers */
.fd-sidebar-collapsed .fd-nav-dropdown-trigger.active i:first-child {
  color: var(--text-inverse);
}

/* Prevent hover effects on active collapsed dropdown triggers - maintain active styling */
.fd-sidebar-collapsed .fd-nav-dropdown-trigger.active:hover {
  background-color: var(--interactive-primary);
  color: var(--text-inverse);
}

.fd-sidebar-collapsed .fd-nav-dropdown-trigger.active:hover i:first-child {
  color: var(--text-inverse);
}

/* Position dropdown arrow absolutely in collapsed state so it doesn't affect main icon centering */
.fd-sidebar-collapsed .fd-nav-dropdown-trigger .ti-chevron-down {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  transition: transform var(--transition-normal);
  z-index: var(--z-dropdown);
}

/* Hover state for collapsed dropdown chevron - match toggle button behavior */
.fd-sidebar-collapsed .fd-nav-dropdown-trigger:hover .ti-chevron-down {
  color: var(--interactive-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .fd-nav-dropdown-menu {
    margin-left: 0;
  }
  
  .fd-nav-dropdown-link {
    margin-left: var(--nav-link-nested-margin-start);
  }
}

/* Sidebar Footer */
.fd-sidebar-footer {
  padding: var(--shell-gutter-y) var(--shell-gutter-x);
  border-top: none;
  background-color: var(--bg-primary);
  box-sizing: border-box;
}

.fd-sidebar-footer-content {
  text-align: center;
}

.fd-sidebar-footer-text {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin: 0;
}

.fd-sidebar-footer-links {
  display: flex;
  gap: var(--shell-gap);
  margin-top: var(--shell-gap);
  justify-content: center;
}

.fd-footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--nav-arrow-size);
  transition: color var(--transition-fast);
}

button.fd-footer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.fd-footer-link:hover,
button.fd-footer-link[aria-expanded="true"] {
  color: var(--interactive-primary);
}

/* ========================================
   CONTENT AREA STYLES
   ======================================== */

/* Content area styles now handled by CSS Grid above */

/* Content Header — same shell gutter X/Y as body + footer */
.fd-content-header {
  background-color: var(--color-bpi-softblue);
  border-bottom: none;
  padding: var(--shell-gutter-y) var(--shell-gutter-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--shell-gap);
  box-shadow: var(--shadow-01);
  min-height: var(--header-height);
  height: var(--header-height);
  box-sizing: border-box;
}

.fd-header-left {
  display: flex;
  align-items: center;
}

.fd-sidebar-toggle {
  position: fixed;
  top: calc(var(--header-height) / 2);
  left: var(--sidebar-width);
  transform: translate(-50%, -50%);
  z-index: var(--z-fixed);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: var(--nav-arrow-size);
  color: var(--text-secondary);
  cursor: pointer;
  padding: var(--inset-xs);
  border-radius: var(--radius-button); /* 12px — 3×4pt; not pill */
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.fd-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 1);
  color: var(--interactive-primary);
  box-shadow: var(--shadow-hover-card-md);
}

/* Collapsed state positioning */
.fd-layout-container.sidebar-collapsed .fd-sidebar-toggle {
  left: var(--sidebar-width-collapsed);
}

/* Icon rotation for collapsed state */
.fd-toggle-icon {
  transition: transform var(--transition-normal);
}

.fd-layout-container.sidebar-collapsed .fd-toggle-icon {
  transform: rotate(180deg);
}

/* Mobile hamburger menu toggle - hidden by default, shown on mobile */
.fd-mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--control-track-height);
  height: var(--control-track-height);
  background: none;
  border: none;
  color: var(--interactive-primary);
  cursor: pointer;
  padding: 0;
  border-radius: var(--radius-button);
  transition: background-color var(--transition-fast), color var(--transition-fast);
  margin-right: 0;
  -webkit-tap-highlight-color: transparent;
}

.fd-mobile-menu-toggle:hover {
  background-color: var(--bg-secondary);
  color: var(--interactive-primary);
}

/* Hamburger → X + ring (Figma: press compress → morph → circled close) */
.fd-hamburger {
  position: relative;
  display: block;
  width: calc(20 / 13 * 1rem);
  height: calc(14 / 13 * 1rem);
}

.fd-hamburger__bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--inset-2xs);
  margin-inline: auto;
  width: 100%;
  border-radius: var(--radius-full);
  background-color: currentColor;
  transform-origin: center;
  transition:
    transform var(--transition-normal),
    width var(--transition-fast),
    opacity var(--transition-fast),
    top var(--transition-normal);
}

.fd-hamburger__bar--top {
  top: 0;
}

.fd-hamburger__bar--mid {
  top: calc(6 / 13 * 1rem); /* center of track box */
}

.fd-hamburger__bar--bot {
  top: calc(12 / 13 * 1rem);
}

.fd-hamburger__ring {
  position: absolute;
  inset: calc(-6 / 13 * 1rem);
  border: var(--stroke-hairline) solid currentColor;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.72);
  pointer-events: none;
  transition:
    opacity var(--transition-fast),
    transform var(--transition-normal);
  transition-delay: 0s;
}

/* Press: shorten outer bars (closed only) */
.fd-mobile-menu-toggle:active:not([aria-expanded="true"]) .fd-hamburger__bar--top,
.fd-mobile-menu-toggle:active:not([aria-expanded="true"]) .fd-hamburger__bar--bot,
.fd-mobile-menu-toggle.is-pressed:not([aria-expanded="true"]) .fd-hamburger__bar--top,
.fd-mobile-menu-toggle.is-pressed:not([aria-expanded="true"]) .fd-hamburger__bar--bot {
  width: 60%;
}

/* Open: bars → X; ring fades in after morph */
.fd-mobile-menu-toggle[aria-expanded="true"] .fd-hamburger__bar--top {
  top: calc(6 / 13 * 1rem);
  transform: rotate(45deg);
}

.fd-mobile-menu-toggle[aria-expanded="true"] .fd-hamburger__bar--mid {
  opacity: 0;
  transform: scaleX(0);
}

.fd-mobile-menu-toggle[aria-expanded="true"] .fd-hamburger__bar--bot {
  top: calc(6 / 13 * 1rem);
  transform: rotate(-45deg);
}

.fd-mobile-menu-toggle[aria-expanded="true"] .fd-hamburger__ring {
  opacity: 1;
  transform: scale(1);
  transition-delay: 0.18s, 0.18s;
}

/* Open press: drop ring early (close path cue) */
.fd-mobile-menu-toggle[aria-expanded="true"]:active .fd-hamburger__ring,
.fd-mobile-menu-toggle[aria-expanded="true"].is-pressed .fd-hamburger__ring {
  opacity: 0;
  transform: scale(0.85);
  transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
  .fd-hamburger__bar,
  .fd-hamburger__ring {
    transition: none;
  }

  .fd-mobile-menu-toggle[aria-expanded="true"] .fd-hamburger__ring {
    transition-delay: 0s;
  }
}

.fd-header-center {
  flex: 1;
  text-align: center;
}

.fd-search-container {
  display: flex;
  align-items: center;
}

.fd-search-box {
  position: relative;
  width: 280px;
}

.fd-search-input {
  width: 100%;
  padding: var(--inset-sm) var(--layout-gap-lg) var(--inset-sm) var(--inset-lg);
  border: var(--stroke-hairline) solid var(--border-primary);
  border-radius: var(--form-field-radius); /* 12px — 3×4pt; not pill */
  background-color: var(--color-soft-02);
  font-family: var(--font-family-primary);
  font-size: var(--fd-control-font-size);
  color: var(--text-primary);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-01);
}

.fd-search-input:focus {
  outline: none;
  border-color: var(--interactive-primary);
  box-shadow: var(--shadow-focus);
}

.fd-search-input::placeholder {
  color: var(--text-secondary);
  font-size: var(--fd-control-font-size);
}

.fd-search-icon {
  position: absolute;
  right: var(--inset-lg);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: var(--fd-control-font-size);
  pointer-events: none;
}

.fd-page-title {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-page-title);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin: 0;
}

.fd-header-right {
  display: flex;
  align-items: center;
  gap: var(--inset-2xl);
}

.fd-action-buttons {
  display: flex;
  align-items: center;
  gap: var(--inset-sm);
}

.fd-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: var(--toolbar-action-gap);
  padding: var(--inset-xs) var(--inset-md);
  border-radius: var(--radius-button); /* 12px — 3×4pt; not pill */
  font-family: var(--font-family-primary);
  font-size: var(--fd-control-font-size);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-secondary); /* 12→16 (was tight→15/24) */
  text-decoration: none;
  border: var(--stroke-hairline) solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

/* Labeled primary/secondary — match search / status-tabs / icon-cluster shell (32px) */
.fd-btn:not(.fd-btn-icon-round):not(.fd-toolbar-icon-btn) {
  min-height: var(--control-track-height);
}

/* Icon-only round actions (Export, Print, Refresh, Filters) — true circles, not ovals */
.fd-btn.fd-btn-icon-round:not(.fd-add-btn):not(.fd-map-view-btn):not(.fd-toolbar-icon-btn) {
  box-sizing: border-box;
  width: var(--fd-btn-icon-round-size);
  height: var(--fd-btn-icon-round-size);
  min-width: var(--fd-btn-icon-round-size);
  max-width: var(--fd-btn-icon-round-size);
  min-height: var(--fd-btn-icon-round-size);
  max-height: var(--fd-btn-icon-round-size);
  padding: 0 !important;
  gap: 0;
  flex: 0 0 var(--fd-btn-icon-round-size);
  border-radius: 50% !important;
  line-height: 1;
  overflow: hidden;
  justify-content: center;
}

/* Filter tool — square control, radius stack control tier (12), not circle */
.fd-btn.fd-btn-icon-round[data-fd-action="filter"]:not(.fd-add-btn):not(.fd-map-view-btn),
.fd-btn.fd-toolbar-icon-btn[data-fd-action="filter"],
.fd-toolbar-icon-btn[data-fd-action="filter"] {
  border-radius: var(--radius-button) !important; /* 12 — control / field rhythm */
  position: relative; /* anchor .fd-filter-badge */
  overflow: visible; /* badge sits outside the control corner */
}

.fd-btn.fd-btn-icon-round:not(.fd-add-btn):not(.fd-map-view-btn):not(.fd-toolbar-icon-btn) span:not(.fd-filter-badge) {
  display: none !important;
  width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}

.fd-btn.fd-btn-icon-round.dropdown-toggle:not(.fd-add-btn):not(.fd-map-view-btn):not(.fd-toolbar-icon-btn)::after {
  display: none !important;
  margin: 0 !important;
  width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* FD-BUTTON-POLICY: sizes — default + sm only */
.fd-btn-sm {
  padding: var(--inset-xs) var(--inset-md);
  font-size: var(--fd-control-font-size);
  min-height: var(--fd-toolbar-icon-size);
}

/* Map/list toggle pill — active when map visible (FD-BUTTON-POLICY) */
.fd-btn-outline.fd-map-view-btn.active,
.fd-btn-outline.fd-map-view-btn[aria-pressed="true"] {
  border-color: var(--interactive-primary);
  background-color: var(--bg-accent);
  color: var(--interactive-primary);
}

.fd-btn i {
  font-size: var(--fd-control-font-size);
}

/* Header Separator */
.fd-header-separator {
  width: 1px;
  height: 2.286rem; /* 32px @ 12px root */
  background-color: #d1d5db;
  margin: 0 var(--inset-lg);
  flex-shrink: 0;
  display: block;
  opacity: 1;
}

/* User Profile */
.fd-user-profile {
  display: flex;
  align-items: center;
  gap: var(--inset-sm);
  border-radius: var(--radius-button); /* 12px — 3×4pt */
  background-color: var(--bg-primary);
  padding: var(--inset-2xs);
  position: relative;
  overflow: visible;
}

.fd-user-avatar {
  width: var(--fd-user-avatar-size);
  height: var(--fd-user-avatar-size);
  border-radius: var(--radius-button); /* 12px — 3×4pt; match tile */
  overflow: hidden;
  flex-shrink: 0;
  background-color: var(--interactive-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fd-avatar-initials {
  color: var(--text-inverse);
  font-size: var(--nav-arrow-size);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  line-height: 1;
}

.fd-user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  flex: 1;
  text-align: left;
}

.fd-user-name {
  font-family: var(--font-family-primary);
  font-size: var(--nav-arrow-size);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  line-height: var(--line-height-secondary); /* 12→16 */
  margin: 0;
}

.fd-user-email,
.fd-user-role {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  line-height: var(--line-height-meta); /* 11→16 */
  margin: 0;
  margin-top: var(--inset-2xs);
}

.fd-user-menu {
  position: static;
  flex-shrink: 0;
}

.fd-user-tile-toggle {
  display: flex;
  align-items: center;
  gap: inherit;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.fd-user-tile-toggle:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-sm);
  border-radius: var(--radius-button);
}

.fd-user-button {
  background: none;
  border: none;
  font-size: var(--nav-arrow-size);
  color: var(--text-secondary);
  pointer-events: none;
  padding: var(--inset-sm);
  border-radius: var(--radius-button); /* 12px — 3×4pt */
  display: flex;
  align-items: center;
  justify-content: center;
}

.fd-user-tile-toggle:hover .fd-user-button {
  background-color: var(--bg-secondary);
  color: var(--interactive-primary);
}

.fd-user-button i {
  font-size: var(--nav-arrow-size);
  transition: transform var(--transition-normal);
}

/* ========================================
   FD USER DROPDOWN MENU STYLING
   ======================================== */

/* FD User Dropdown — below the whole tile (not the chevron), right-aligned */
.fd-skin .fd-user-tile .dropdown-menu {
  position: absolute;
  top: calc(100% + var(--content-related-gap));
  right: 0;
  left: auto;
  transform: none;
  margin-top: 0;
  border-radius: var(--dropdown-panel-radius); /* 16 — panel tier */
  padding: var(--dropdown-panel-pad); /* 4 — menu chrome */
  min-width: 16rem;
  z-index: var(--z-dropdown);
}

/* Settings modal / profile menu — drop extra L/R pad; last settings row has no seam */
.fd-settings-panel .fd-ui-scale-control,
.fd-settings-panel .fd-ui-font-control,
.fd-settings-panel .fd-ui-grid-control,
.fd-user-tile .dropdown-menu .fd-ui-scale-control {
  padding-left: 0;
  padding-right: 0;
  margin-bottom: 0;
}

.fd-settings-panel .fd-ui-grid-control {
  border-bottom: none;
  padding-bottom: 0;
}

/* Display size slider (fd-ui-scale) */
.fd-skin .fd-ui-scale-control {
  display: flex;
  flex-direction: column;
  gap: var(--inset-xs);
  padding: var(--inset-sm) var(--inset-lg) var(--inset-md);
  margin-bottom: var(--inset-xs);
  border-bottom: var(--stroke-hairline) solid var(--border-primary);
}

.fd-skin .fd-ui-scale-control__header {
  display: flex;
  align-items: center;
  gap: var(--inset-sm);
  color: var(--text-primary);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-sm);
}

.fd-skin .fd-ui-scale-control__header > i {
  font-size: var(--font-size-base);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  color: var(--interactive-primary);
}

.fd-skin .fd-ui-scale-control__title {
  flex: 1;
  font-weight: var(--font-weight-medium);
}

.fd-skin .fd-ui-scale-control__value {
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  font-variant-numeric: tabular-nums;
}

.fd-skin .fd-ui-scale-control__slider {
  width: 100%;
  margin: var(--inset-xs) 0 0;
  accent-color: var(--interactive-primary);
  cursor: pointer;
}

.fd-skin .fd-ui-scale-control__ticks {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--text-secondary);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  user-select: none;
}

.fd-skin .fd-ui-scale-control__tick {
  display: inline-flex;
  flex: 1;
  align-items: baseline;
  justify-content: center;
  min-width: 0;
  margin: 0;
  padding: var(--inset-2xs) 0 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.fd-skin .fd-ui-scale-control__tick:hover,
.fd-skin .fd-ui-scale-control__tick.is-active {
  color: var(--interactive-primary);
}

.fd-skin .fd-ui-scale-control__tick.is-active {
  font-weight: var(--font-weight-semibold);
}

.fd-skin .fd-ui-scale-control__tick:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-sm);
  border-radius: var(--radius-sm);
}

.fd-skin .fd-ui-scale-control__tick-label {
  font-size: var(--font-size-meta);
  font-weight: inherit;
}

/* Preview A's use px so relative size stays visible at the current UI scale */
.fd-skin .fd-ui-scale-control__tick-a {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
}

.fd-skin .fd-ui-scale-control__tick[data-fd-ui-scale-tick="1"] .fd-ui-scale-control__tick-a { font-size: 10px; }
.fd-skin .fd-ui-scale-control__tick[data-fd-ui-scale-tick="2"] .fd-ui-scale-control__tick-a { font-size: 13px; }
.fd-skin .fd-ui-scale-control__tick[data-fd-ui-scale-tick="3"] .fd-ui-scale-control__tick-a { font-size: 14px; }
.fd-skin .fd-ui-scale-control__tick[data-fd-ui-scale-tick="4"] .fd-ui-scale-control__tick-a { font-size: 16px; }
.fd-skin .fd-ui-scale-control__tick[data-fd-ui-scale-tick="5"] .fd-ui-scale-control__tick-a { font-size: 18px; }
.fd-skin .fd-ui-scale-control__tick[data-fd-ui-scale-tick="6"] .fd-ui-scale-control__tick-a { font-size: 20px; }

/* Font preview (Poppins / Inter) */
.fd-skin .fd-ui-font-control {
  display: flex;
  flex-direction: column;
  gap: var(--inset-xs);
  padding: var(--inset-sm) var(--inset-lg) var(--inset-md);
  margin-bottom: var(--inset-xs);
  border-bottom: var(--stroke-hairline) solid var(--border-primary);
}

.fd-skin .fd-ui-font-control__header {
  display: flex;
  align-items: center;
  gap: var(--inset-sm);
  color: var(--text-primary);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-sm);
}

.fd-skin .fd-ui-font-control__header > i {
  font-size: var(--font-size-base);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  color: var(--interactive-primary);
}

.fd-skin .fd-ui-font-control__title {
  flex: 1;
  font-weight: var(--font-weight-medium);
}

.fd-skin .fd-ui-font-control__hint {
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  text-transform: lowercase;
}

.fd-skin .fd-ui-font-control__options {
  display: flex;
  gap: var(--control-track-gap);
  padding: var(--control-track-pad);
  border-radius: var(--control-track-radius);
  background: var(--tab-track-fill);
  border: var(--stroke-hairline) solid var(--tab-track-border);
}

.fd-skin .fd-ui-font-control__btn {
  flex: 1;
  margin: 0;
  padding: var(--inset-xs) var(--inset-sm);
  border: none;
  border-radius: var(--control-track-inner-radius);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1.2;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.fd-skin .fd-ui-font-control__btn:hover {
  color: var(--text-primary);
}

.fd-skin .fd-ui-font-control__btn.is-active {
  background: var(--tab-active-bg);
  color: var(--text-primary);
  box-shadow: var(--tab-active-shadow);
  font-weight: var(--font-weight-semibold);
}

.fd-skin .fd-ui-font-control__btn[data-fd-ui-font="inter"] {
  font-family: 'Inter', sans-serif;
}

.fd-skin .fd-ui-font-control__btn[data-fd-ui-font="poppins"] {
  font-family: 'Poppins', sans-serif;
}

.fd-skin .fd-ui-font-control__btn[data-fd-ui-font="yellowfin"] {
  font-family: 'Libre Franklin', sans-serif;
}

/* 4pt layout grid toggle (debug guide) */
.fd-skin .fd-ui-grid-control {
  display: flex;
  flex-direction: column;
  gap: var(--inset-xs);
  padding: var(--inset-sm) var(--inset-lg) var(--inset-md);
  margin-bottom: var(--inset-xs);
  border-bottom: var(--stroke-hairline) solid var(--border-primary);
}

.fd-skin .fd-ui-grid-control__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--inset-sm);
}

.fd-skin .fd-ui-grid-control__header {
  display: flex;
  align-items: center;
  gap: var(--inset-sm);
  min-width: 0;
  color: var(--text-primary);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-sm);
}

.fd-skin .fd-ui-grid-control__header > i {
  font-size: var(--font-size-base);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  color: var(--interactive-primary);
}

.fd-skin .fd-ui-grid-control__title {
  font-weight: var(--font-weight-medium);
}

.fd-skin .fd-ui-grid-control__hint {
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-snug, 1.35);
}

.fd-skin .fd-ui-grid-control__switch {
  display: inline-flex;
  align-items: center;
  gap: var(--inset-sm);
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  cursor: pointer;
}

.fd-skin .fd-ui-grid-control__track {
  position: relative;
  display: block;
  width: 2rem;
  height: 1.125rem;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  background: var(--tab-track-fill);
  border: var(--stroke-hairline) solid var(--tab-track-border);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.fd-skin .fd-ui-grid-control__thumb {
  position: absolute;
  top: 1px;
  left: 1px;
  width: calc(1.125rem - 4px);
  height: calc(1.125rem - 4px);
  border-radius: var(--radius-full);
  background: var(--surface-card, #fff);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.fd-skin .fd-ui-grid-control__switch[aria-checked="true"] {
  color: var(--text-primary);
}

.fd-skin .fd-ui-grid-control__switch[aria-checked="true"] .fd-ui-grid-control__track {
  background: var(--interactive-primary);
  border-color: var(--interactive-primary);
}

.fd-skin .fd-ui-grid-control__switch[aria-checked="true"] .fd-ui-grid-control__thumb {
  transform: translateX(0.875rem);
  background: var(--text-inverse, #fff);
}

.fd-skin .fd-ui-grid-control__switch:focus-visible {
  outline: 2px solid var(--interactive-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Viewport overlay — 4px minor + 8px major guides; never captures clicks */
html.fd-debug-grid::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  background-image:
    linear-gradient(
      to right,
      color-mix(in srgb, var(--interactive-primary) 14%, transparent) 1px,
      transparent 1px
    ),
    linear-gradient(
      to bottom,
      color-mix(in srgb, var(--interactive-primary) 14%, transparent) 1px,
      transparent 1px
    ),
    linear-gradient(
      to right,
      color-mix(in srgb, var(--interactive-primary) 28%, transparent) 1px,
      transparent 1px
    ),
    linear-gradient(
      to bottom,
      color-mix(in srgb, var(--interactive-primary) 28%, transparent) 1px,
      transparent 1px
    );
  background-size:
    4px 4px,
    4px 4px,
    8px 8px,
    8px 8px;
  background-position: 0 0;
}

/* FD User Dropdown Menu Items */
.fd-skin .fd-user-tile .dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--inset-sm);
  min-height: var(--dropdown-item-min-height);
  padding: var(--dropdown-item-pad-y) var(--dropdown-item-pad-x);
  color: var(--text-primary);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-button);
  transition: all var(--transition-fast);
  text-decoration: none;
  margin-bottom: var(--inset-2xs);
}

.fd-skin .fd-user-tile .dropdown-item:last-child {
  margin-bottom: 0;
}

/* FD User Dropdown Item Hover States */
.fd-skin .fd-user-tile .dropdown-item:hover {
  background-color: var(--bg-accent);
  color: var(--interactive-primary);
  transform: translateX(2px);
}

/* FD User Dropdown Item Icons */
.fd-skin .fd-user-tile .dropdown-item i {
  font-size: var(--font-size-base);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

/* Special styling for logout item */
.fd-skin .fd-user-tile .dropdown-item[href*="logout"] {
  color: var(--status-error);
  border-top: var(--stroke-hairline) solid var(--border-primary);
  margin-top: var(--inset-xs);
  padding-top: var(--inset-lg);
}

.fd-skin .fd-user-tile .dropdown-item[href*="logout"]:hover {
  background-color: var(--icon-bg-error);
  color: var(--status-error);
}

.fd-skin .fd-user-tile .dropdown-item[href*="logout"] i {
  color: var(--status-error);
}

/* Focus states for accessibility */
.fd-skin .fd-user-tile .dropdown-item:focus-visible {
  outline: 2px solid var(--interactive-primary);
  outline-offset: 2px;
  background-color: var(--bg-accent);
  color: var(--interactive-primary);
}

/* Mobile responsive styles for user dropdown */
@media (max-width: 768px) {
  .fd-skin .fd-user-tile .dropdown-menu {
    min-width: min(16rem, calc(100vw - 2rem));
    right: 0;
    left: auto;
  }
  
  .fd-skin .fd-user-tile .dropdown-item {
    padding: var(--inset-lg) var(--inset-2xl);
    font-size: var(--font-size-base);
  }
  
  .fd-skin .fd-user-tile .dropdown-item i {
    font-size: var(--font-size-lg);
    width: 18px;
  }
}

/* Extra small mobile adjustments */
@media (max-width: 480px) {
  .fd-skin .fd-user-tile .dropdown-menu {
    min-width: 160px;
    padding: var(--inset-xs);
  }
  
  .fd-skin .fd-user-tile .dropdown-item {
    padding: var(--inset-sm) var(--inset-lg);
    font-size: var(--font-size-sm);
  }
}

/* Content Body — shell gutter X=Y (L3); stack gap = content-group (L2), not shell */
.fd-content-body {
  flex: 1;
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  box-sizing: border-box;
  padding: var(--shell-gutter-y) var(--shell-gutter-x);
  background-color: var(--color-bpi-softblue);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  overflow-x: hidden; /* prevent page-level horizontal scroll; inner wrappers will scroll */
  display: flex;
  flex-direction: column;
  gap: var(--page-stack-gap);
  min-height: 0; /* Allow flex children to shrink */
}

/* ========================================
   CONTENT BODY RESPONSIVE TYPOGRAPHY SYSTEM
   ======================================== */

/* Typography hierarchy within content body — size + matching 4pt LH */
.fd-content-body h1,
.fd-content-body .fd-page-title {
  font-size: var(--font-size-page-title);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-title); /* 16→24 */
  color: var(--text-primary);
  margin-bottom: var(--layout-gap-xs);
}

.fd-content-body h2,
.fd-content-body .fd-section-title {
  font-size: var(--font-size-heading);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-section); /* 18→24 */
  color: var(--text-primary);
  margin-bottom: var(--layout-gap-sm);
}

.fd-content-body h3:not(.fd-chart-title) {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-section); /* 18→24 */
  color: var(--text-primary);
  margin-bottom: var(--layout-gap-xs);
}

.fd-content-body h4:not(.fd-metric-title) {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-section);
  color: var(--text-primary);
  margin-bottom: var(--layout-gap-xs);
}

.fd-content-body h5 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-body); /* 14→20 */
  color: var(--text-primary);
  margin-bottom: var(--inset-xs);
}

.fd-content-body h6 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-secondary); /* 12→16 */
  color: var(--text-secondary);
  margin-bottom: var(--inset-xs);
}

.fd-content-body p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-prose); /* 14→28 */
  color: var(--text-primary);
  margin-bottom: var(--layout-gap-sm);
}

.fd-content-body .fd-page-subtitle {
  font-size: var(--font-size-page-subtitle);
  line-height: var(--line-height-secondary); /* 12→16 */
  color: var(--text-secondary);
  margin-bottom: var(--inset-sm);
}

/* ========================================
   CONTENT-BODY RESPONSIVE TYPOGRAPHY (§6)
   Single breakpoint set — mobile overrides only
   ======================================== */

/* Mobile: compact page title + aligned h5/h6 per TYPE-SPACE-POLICY §5 */
@media (max-width: 767px) {
  .fd-content-body h1,
  .fd-content-body .fd-page-title {
    font-size: var(--font-size-page-title);
    line-height: var(--line-height-tight);
    margin-bottom: var(--inset-sm);
  }

  .fd-content-body h2,
  .fd-content-body .fd-section-title {
    margin-bottom: var(--inset-sm);
  }

  .fd-content-body h4:not(.fd-metric-title) {
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    margin-bottom: var(--inset-xs);
  }

  .fd-content-body h5 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-normal);
    margin-bottom: var(--inset-xs);
  }

  .fd-content-body h6 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-normal);
    margin-bottom: var(--inset-xs);
  }

  .fd-content-body p {
    font-size: var(--nav-arrow-size);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--inset-sm);
  }

  .fd-content-body .fd-page-subtitle {
    margin-bottom: var(--inset-sm);
  }
}

/* Desktop: spacing tweaks only — sizes inherit base cascade */
@media (min-width: 768px) {
  .fd-content-body h1,
  .fd-content-body .fd-page-title,
  .fd-content-body h2,
  .fd-content-body .fd-section-title {
    margin-bottom: var(--inset-sm);
  }

  .fd-content-body h3,
  .fd-content-body h4 {
    margin-bottom: var(--inset-sm);
  }
}

/* ========================================
   CONTENT-BODY RESPONSIVE LAYOUT (§6)
   Shared organization — per-breakpoint padding/gap in sidebar blocks
   ======================================== */

@media (max-width: 767px) {
  .fd-content-body > * {
    width: 100%;
    margin-bottom: var(--inset-sm);
  }

  .fd-content-body > *:last-child {
    margin-bottom: 0;
  }

  .fd-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--inset-sm);
    margin-bottom: var(--inset-sm);
  }

  .fd-page-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: var(--inset-xs);
  }

  .fd-stats-section,
  .fd-datatable-section {
    margin-bottom: 0;
  }

  .fd-content-card {
    margin-bottom: var(--inset-sm);
  }

  .row {
    margin-left: calc(-0.5 * var(--inset-sm));
    margin-right: calc(-0.5 * var(--inset-sm));
  }

  .row > * {
    padding-left: calc(0.5 * var(--inset-sm));
    padding-right: calc(0.5 * var(--inset-sm));
    margin-bottom: var(--inset-sm);
  }
}

@media (min-width: 768px) {
  .fd-content-body > * {
    width: 100%;
    margin-bottom: var(--inset-sm);
  }

  .fd-content-body > *:last-child {
    margin-bottom: 0;
  }

  .fd-page-header {
    flex-direction: row;
    align-items: center;
    margin-bottom: var(--inset-sm);
  }

  .fd-page-actions {
    width: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: var(--inset-sm);
  }

  .fd-stats-section,
  .fd-datatable-section {
    margin-bottom: 0;
  }

  .fd-content-card {
    margin-bottom: var(--inset-sm);
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .fd-page-header { gap: var(--inset-lg); }
  .fd-content-card { padding: var(--inset-2xl); }
  .row {
    margin-left: calc(-0.5 * var(--inset-lg));
    margin-right: calc(-0.5 * var(--inset-lg));
  }
  .row > * {
    padding-left: calc(0.5 * var(--inset-lg));
    padding-right: calc(0.5 * var(--inset-lg));
    margin-bottom: var(--inset-sm);
  }
}

@media (min-width: 992px) {
  .fd-page-header { gap: var(--inset-2xl); }
  .fd-content-card { padding: var(--layout-gap-lg); }
  .row {
    margin-left: calc(-0.5 * var(--inset-2xl));
    margin-right: calc(-0.5 * var(--inset-2xl));
  }
  .row > * {
    padding-left: calc(0.5 * var(--inset-2xl));
    padding-right: calc(0.5 * var(--inset-2xl));
    margin-bottom: var(--inset-sm);
  }
}

/* Per-breakpoint content-card padding on mobile */
@media (max-width: 575px) {
  .fd-content-card { padding: var(--inset-sm); }
}
@media (min-width: 576px) and (max-width: 767px) {
  .fd-content-card { padding: var(--inset-lg); }
}

/* Mobile shell controls — shared across ≤767px sidebar breakpoints */
@media (max-width: 767px) {
  /* Beat any leftover collapsed-session grid lock; phone is always single column */
  html.sidebar-collapsed-on-load .fd-layout-container,
  html.fd-collapsed-session .fd-layout-container,
  .fd-layout-container,
  .fd-layout-container.sidebar-collapsed {
    grid-template-columns: 1fr !important;
  }

  .fd-mobile-menu-toggle {
    display: flex;
  }

  .fd-mobile-menu-toggle:hover {
    background-color: var(--bg-secondary);
    color: var(--interactive-primary);
  }

  .fd-sidebar-toggle {
    display: none;
  }

  .fd-mobile-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: var(--glass-overlay-bg);
    z-index: calc(var(--z-modal) - 1);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity var(--transition-normal),
      visibility 0s linear var(--transition-normal);
  }

  .fd-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
    transition:
      opacity var(--transition-normal),
      visibility 0s linear 0s;
  }

  /*
   * Mobile drawer — one model closed + open (no left:-100% / 280px white rail morph):
   * - .fd-sidebar = full-viewport transparent scrollport (scrollbar at screen edge)
   * - .fd-sidebar-shell = floating card (inset + radius); page stays visible under overlay
   * Closed: translate off-screen; open: transform none.
   */
  .fd-sidebar {
    position: fixed;
    inset: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    height: 100dvh;
    z-index: var(--sidebar-mobile-z-index);
    background-color: transparent;
    box-shadow: none;
    border: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    display: block;
    grid-row: unset;
    pointer-events: none;
    visibility: hidden;
    transform: translate3d(calc(-100% - var(--shell-gutter-x)), 0, 0);
    transition:
      transform var(--transition-normal),
      visibility 0s linear var(--transition-normal);
  }

  .fd-sidebar.mobile-open {
    visibility: visible;
    transform: none;
    transition:
      transform var(--transition-normal),
      visibility 0s linear 0s;
  }

  .fd-sidebar .fd-sidebar-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr auto; /* pin footer when menu is short */
    box-sizing: border-box;
    width: min(
      var(--sidebar-mobile-max-width),
      calc(100% - (var(--shell-gutter-x) * 2) - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))
    );
    min-height: calc(
      100% - (var(--shell-gutter-y) * 2) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
    );
    margin-block: calc(var(--shell-gutter-y) + env(safe-area-inset-top, 0px))
      calc(var(--shell-gutter-y) + env(safe-area-inset-bottom, 0px));
    margin-inline: calc(var(--shell-gutter-x) + env(safe-area-inset-left, 0px)) auto;
    pointer-events: auto;
    background-color: var(--color-white);
    border: var(--stroke-hairline) solid var(--border-primary);
    border-radius: var(--radius-card); /* 24 — card tier */
    overflow: hidden; /* clip header/nav/footer to radius */
    box-shadow: var(--shadow-hover-card-md);
  }

  .fd-sidebar .fd-sidebar-header,
  .fd-sidebar .fd-sidebar-content,
  .fd-sidebar .fd-sidebar-footer {
    background-color: var(--color-white);
  }

  /* Logo centered; reserve toggle column L/R so it stays optically centered */
  .fd-sidebar .fd-sidebar-header {
    justify-content: center;
    padding-inline: calc(var(--logo-header-pad-x-expanded) + var(--control-track-height));
  }

  .fd-sidebar .fd-sidebar-logo,
  .fd-sidebar .fd-logo-link {
    justify-content: center;
  }

  .fd-sidebar .fd-sidebar-content {
    overflow: visible;
    flex: none;
    min-height: auto;
  }

  /* Close control: stay left inside floating shell (same side as closed hamburger) */
  .fd-layout-container:has(.fd-sidebar.mobile-open) .fd-mobile-menu-toggle {
    position: fixed;
    top: calc(
      var(--shell-gutter-y) + env(safe-area-inset-top, 0px) +
        (var(--header-height) - var(--control-track-height)) / 2
    );
    left: calc(
      var(--shell-gutter-x) + env(safe-area-inset-left, 0px) + var(--logo-header-pad-x-expanded)
    );
    right: auto;
    z-index: calc(var(--sidebar-mobile-z-index) + 2);
  }

  @media (prefers-reduced-motion: reduce) {
    .fd-sidebar,
    .fd-sidebar.mobile-open,
    .fd-mobile-overlay,
    .fd-mobile-overlay.active {
      transition: none;
    }
  }

  .fd-content-footer {
    flex-direction: column;
    gap: var(--inset-sm);
    text-align: center;
  }
}

/* Text truncation utilities */
.fd-text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fd-text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fd-text-truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive line height utilities */
.fd-leading-none { line-height: var(--line-height-none); }
.fd-leading-tight { line-height: var(--line-height-tight); }
.fd-leading-snug { line-height: var(--line-height-snug); }
.fd-leading-normal { line-height: var(--line-height-normal); }
.fd-leading-relaxed { line-height: var(--line-height-relaxed); }

/* ========================================
   RESPONSIVE LAYOUT UTILITIES
   ======================================== */

/* Flexbox utilities */
.fd-flex { display: flex; }
.fd-flex-column { flex-direction: column; }
.fd-flex-row { flex-direction: row; }
.fd-flex-wrap { flex-wrap: wrap; }
.fd-flex-nowrap { flex-wrap: nowrap; }

/* Alignment utilities */
.fd-items-start { align-items: flex-start; }
.fd-items-center { align-items: center; }
.fd-items-end { align-items: flex-end; }
.fd-items-stretch { align-items: stretch; }

.fd-justify-start { justify-content: flex-start; }
.fd-justify-center { justify-content: center; }
.fd-justify-end { justify-content: flex-end; }
.fd-justify-between { justify-content: space-between; }
.fd-justify-around { justify-content: space-around; }

/* Gap utilities */
.fd-gap-xs { gap: var(--inset-xs); }
.fd-gap-sm { gap: var(--layout-gap-xs); }
.fd-gap-md { gap: var(--layout-gap-sm); }
.fd-gap-lg { gap: var(--layout-gap-md); }
.fd-gap-xl { gap: var(--layout-gap-lg); }

/* Width utilities */
.fd-w-full { width: 100%; }
.fd-w-auto { width: auto; }
.fd-min-w-0 { min-width: 0; }

/* Responsive visibility utilities */
.fd-hidden-mobile { display: block; }
.fd-visible-mobile { display: none; }

@media (max-width: 767px) {
  .fd-hidden-mobile { display: none; }
  .fd-visible-mobile { display: block; }
}

/* Content density utilities */
.fd-content-dense { gap: var(--layout-gap-xs); }
.fd-content-comfortable { gap: var(--layout-gap-md); }
.fd-content-spacious { gap: var(--layout-gap-lg); }

/* Tablet landscape and iPad portrait range */
@media (max-width: 62rem) { /* 992px */
  /* Make grids breathe a bit more and avoid overflow in 768-990 */
  .row.g-3 { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
  .row.g-4 { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
}

/* Ensure children never overflow the content area */
.fd-content-body > * {
  max-width: 100%;
}

/* Tables/scrollable sections keep within content padding on small screens */
.fd-content-body .table-responsive,
.fd-content-body .fd-table-responsive {
  width: 100%;
  overflow-x: auto;
}

/* Page Header Section */
.fd-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--layout-gap-sm);
  padding-bottom: var(--inset-sm);
}

.fd-page-title-section {
  flex: 1;
}

.fd-page-title {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-page-title);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin: 0;
  line-height: var(--line-height-tight);
}

.fd-breadcrumb-section {
  display: flex;
  align-items: center;
}

.fd-breadcrumb-section .breadcrumb {
  background: none;
  padding: 0;
  margin: 0;
}

.fd-breadcrumb-section .breadcrumb-item {
  font-size: var(--nav-arrow-size);
  color: var(--text-secondary);
}

.fd-breadcrumb-section .breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
}

.fd-breadcrumb-section .breadcrumb-item a:hover {
  color: var(--interactive-primary);
  text-decoration: underline;
}

.fd-breadcrumb-section .breadcrumb-item.active {
  color: var(--text-secondary);
}

/* Page Actions Section */
.fd-page-actions {
  display: flex;
  gap: var(--inset-sm);
    margin-bottom: var(--inset-sm);
  justify-content: flex-end;
}

/* Main Content */
.fd-main-content {
  flex: 1;
}

/* Optional white wrapper card - can be used for pages that need a single container */
.fd-content-card {
  background-color: var(--bg-primary);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-01);
  padding: var(--layout-gap-lg);
  min-height: 400px;
}

/* Content Footer — same shell gutter + gap as topbar / body */
.fd-content-footer {
  background-color: var(--color-bpi-softblue);
  border-top: none;
  padding: var(--shell-gutter-y) var(--shell-gutter-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--shell-gap);
  box-sizing: border-box;
}

.fd-footer-left {
  flex: 1;
}

.fd-footer-text {
  font-size: var(--nav-arrow-size);
  color: var(--text-secondary);
  margin: 0;
}

.fd-footer-text a {
  color: var(--interactive-primary);
  text-decoration: none;
}

.fd-footer-text a:hover {
  text-decoration: underline;
}

.fd-footer-right {
  display: flex;
  align-items: center;
}

.fd-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: var(--shell-gap);
}

.fd-footer-links li {
  margin: 0;
}

.fd-footer-links a {
  font-size: var(--nav-arrow-size);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-normal);
}

.fd-footer-links a:hover {
  color: var(--interactive-primary);
}

/* ========================================
   COMPREHENSIVE SIDEBAR RESPONSIVE SYSTEM
   NO DEAD ZONES - COVERS ALL SCREEN SIZES
   ======================================== */

/* Extra Small Devices: 0px - 575px */
@media (max-width: 575px) {
  .fd-layout-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }
  
  .fd-layout-container.sidebar-collapsed {
    grid-template-columns: 1fr;
  }
  
  /* Mobile sidebar chrome — owned by shared ≤767px shell block (transform + floating shell) */
  .fd-sidebar {
    position: fixed;
    grid-row: unset;
  }

  .fd-sidebar-collapsed {
    width: 100%;
    max-width: none;
  }
  
  .fd-content-area {
    grid-row: 1 / -1;
    width: 100%;
  }
  
  .fd-sidebar-header {
    padding: var(--header-padding-vertical) var(--shell-gutter-x);
  }
  
  /* Content Body Layout Structure - Mobile */
  .fd-content-body {
    font-size: var(--nav-arrow-size);
    line-height: var(--line-height-relaxed);
    flex-direction: column;
    min-height: auto;
    align-items: stretch;
  }
}

/* Small Devices: 576px - 767px */
@media (min-width: 576px) and (max-width: 767px) {
  .fd-layout-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }
  
  .fd-layout-container.sidebar-collapsed {
    grid-template-columns: 1fr;
  }
  
  /* Mobile sidebar chrome — owned by shared ≤767px shell block (transform + floating shell) */
  .fd-sidebar {
    position: fixed;
    grid-row: unset;
  }

  .fd-sidebar-collapsed {
    width: 100%;
    max-width: none;
  }
  
  .fd-content-area {
    grid-row: 1 / -1;
    width: 100%;
  }
  
  .fd-sidebar-header {
    padding: var(--header-padding-vertical) var(--shell-gutter-x);
  }
  
  /* Content Body Layout Structure - Small Mobile */
  .fd-content-body {
    font-size: var(--nav-arrow-size);
    line-height: var(--line-height-relaxed);
    flex-direction: column;
    min-height: auto;
    align-items: stretch;
  }
}

/* Desktop sidebar toggle — shared across ≥768px breakpoints */
@media (min-width: 768px) {
  .fd-mobile-menu-toggle {
    display: none;
  }

  .fd-sidebar-toggle {
    display: flex;
    left: var(--sidebar-width);
  }

  .fd-layout-container.sidebar-collapsed .fd-sidebar-toggle {
    left: var(--sidebar-width-collapsed);
  }
}

/* Medium Devices: 768px - 991px */
@media (min-width: 768px) and (max-width: 991px) {
  .fd-layout-container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: auto 1fr auto;
    align-items: stretch;
  }
  
  .fd-layout-container.sidebar-collapsed {
    grid-template-columns: minmax(var(--sidebar-width-collapsed), var(--sidebar-width-collapsed)) 1fr;
  }
  
  /* Sidebar adjustments for medium screens */
  .fd-sidebar {
    width: 100%;
    background-color: var(--bg-primary);
    border-right: none;
    box-shadow: var(--shadow-sidebar);
  }
  
  /* Content area adjustments */
  .fd-content-area {
    width: 100%;
    overflow-x: hidden;
  }
  
  /* Content Body Layout Structure - Medium Devices */
  .fd-content-body {
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    flex-direction: column;
    min-height: 0;
    align-items: stretch;
  }
  
}

/* Large Devices: 992px - 1199px */
@media (min-width: 992px) and (max-width: 1199px) {
  .fd-layout-container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: auto 1fr auto;
    align-items: stretch;
  }
  
  .fd-layout-container.sidebar-collapsed {
    grid-template-columns: minmax(var(--sidebar-width-collapsed), var(--sidebar-width-collapsed)) 1fr;
  }
  
  /* Sidebar adjustments for large screens */
  .fd-sidebar {
    width: 100%;
    background-color: var(--bg-primary);
    border-right: none;
    box-shadow: var(--shadow-sidebar);
  }
  
  /* Content area adjustments */
  .fd-content-area {
    width: 100%;
    overflow-x: hidden;
  }
  
  /* Content Body Layout Structure - Large Devices */
  .fd-content-body {
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    flex-direction: column;
    min-height: 0;
    align-items: stretch;
  }
  
}

/* Extra Large Devices: 1200px - 1399px */
@media (min-width: 1200px) and (max-width: 1399px) {
  .fd-layout-container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: auto 1fr auto;
    align-items: stretch;
  }
  
  .fd-layout-container.sidebar-collapsed {
    grid-template-columns: minmax(var(--sidebar-width-collapsed), var(--sidebar-width-collapsed)) 1fr;
  }
  
  /* Sidebar adjustments for extra large screens */
  .fd-sidebar {
    width: 100%;
    background-color: var(--bg-primary);
    border-right: none;
    box-shadow: var(--shadow-sidebar);
  }
  
  /* Content area adjustments */
  .fd-content-area {
    width: 100%;
    overflow-x: hidden;
  }
  
  /* Content Body Layout Structure - Extra Large Devices */
  .fd-content-body {
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    flex-direction: column;
    min-height: 0;
    align-items: stretch;
  }
  
}

/* XXL Devices: 1400px+ */
@media (min-width: 1400px) {
  .fd-layout-container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: auto 1fr auto;
    align-items: stretch;
  }
  
  .fd-layout-container.sidebar-collapsed {
    grid-template-columns: minmax(var(--sidebar-width-collapsed), var(--sidebar-width-collapsed)) 1fr;
  }
  
  /* Sidebar adjustments for XXL screens */
  .fd-sidebar {
    width: 100%;
    background-color: var(--bg-primary);
    
    box-shadow: var(--shadow-sidebar);
  }
  
  /* Content area adjustments */
  .fd-content-area {
    width: 100%;
    overflow-x: hidden;
  }
  
  /* Content Body Layout Structure - XXL Devices */
  .fd-content-body {
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    flex-direction: column;
    min-height: 0;
    align-items: stretch;
  }
}

/* ========================================
   COMPREHENSIVE HEADER RESPONSIVE SYSTEM
   NO DEAD ZONES - COVERS ALL SCREEN SIZES
   ======================================== */

/* ========================================
   HEADER RESPONSIVE BREAKPOINTS - NO GAPS
   ======================================== */

/* Extra Small Devices: 0px - 575px */
@media (max-width: 575px) {
  .fd-content-header {
    flex-direction: row;
    gap: var(--shell-topbar-gap);
    min-height: var(--header-height);
    height: var(--header-height);
    align-items: center;
  }
  
  .fd-header-left {
    flex: 0 0 auto;
    justify-content: flex-start;
    order: 1;
    display: flex;
    align-items: center;
    gap: var(--inset-xs);
  }
  
  .fd-header-center {
    flex: 1;
    order: 2;
  }
  
  .fd-header-right {
    flex: 0 0 auto;
    justify-content: flex-end;
    order: 3;
    display: flex;
    align-items: center;
  }
  
  .fd-search-container {
    width: 100%;
    max-width: none;
    display: flex;
    align-items: center;
    gap: var(--inset-xs);
  }
  
  .fd-search-box {
    flex: 1;
    max-width: none;
  }
  
  .fd-search-input {
    font-size: var(--nav-arrow-size);
    padding: var(--inset-xs) var(--inset-sm);
    width: 100%;
  }
  
  /* Move action buttons to search container */
  .fd-search-container .fd-action-buttons {
    flex-shrink: 0;
    margin-left: var(--inset-xs);
  }
  
  .fd-page-title {
    font-size: var(--font-size-page-title);
    text-align: left;
  }
  
  .fd-action-buttons {
    flex-direction: row;
    gap: var(--inset-xs);
    align-items: center;
  }
  
  /* Force icon-only buttons on mobile */
  .fd-action-buttons .fd-btn {
    text-indent: -9999px; /* Hide text by moving it off-screen */
    white-space: nowrap;
    overflow: hidden;
  }
  
  .fd-action-buttons .fd-btn i,
  .fd-action-buttons .fd-btn .ti {
    text-indent: 0; /* Reset for icons */
    display: block;
  }
  
  .fd-btn:not(.fd-btn-icon-round):not(.fd-add-btn):not(.fd-map-view-btn) {
    width: auto;
    min-width: var(--fd-btn-icon-round-size);
    height: var(--fd-btn-icon-round-size);
    padding: var(--inset-xs);
    justify-content: center;
    font-size: var(--nav-arrow-size);
    border-radius: var(--radius-md);
  }
  
  .fd-btn:not(.fd-btn-icon-round) .btn-text,
  .fd-btn:not(.fd-btn-icon-round) span:not(.ti),
  .fd-btn:not(.fd-btn-icon-round):not(.ti),
  .fd-btn:not(.fd-btn-icon-round) *:not(.ti):not(i) {
    display: none; /* Hide all button text on mobile */
  }
  
  .fd-btn:not(.fd-btn-icon-round):not(.fd-add-btn):not(.fd-map-view-btn) {
    min-width: var(--fd-btn-icon-round-size);
    width: var(--fd-btn-icon-round-size);
    height: var(--fd-btn-icon-round-size);
    padding: var(--inset-xs);
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Hide any overflow text */
  }
  
  .fd-btn i,
  .fd-btn .ti {
    display: block; /* Ensure icons are visible */
  }
  
  .fd-btn i {
    font-size: var(--font-size-base);
  }
  
  .fd-user-profile {
    flex-direction: row;
    gap: var(--inset-xs);
    align-items: center;
    justify-content: flex-end;
    min-width: auto;
    max-width: 60px; /* Limit width to just avatar + arrow */
  }
  
  .fd-user-info,
  .fd-user-name,
  .fd-user-email,
  .fd-user-role,
  .fd-user-details {
    display: none; /* Hide all user info text on mobile */
  }
  
  .fd-user-avatar {
    width: 2.286rem; /* 32px @ 12px root */
    height: 2.286rem;
    font-size: var(--nav-arrow-size);
    flex-shrink: 0;
  }
  
  .fd-user-dropdown,
  .fd-user-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    flex-shrink: 0;
  }
  
  /* Ensure user profile stays horizontal on mobile */
  @media (max-width: 575px) {
    .fd-user-profile {
      flex-direction: row;
      align-items: center;
      gap: var(--inset-xs);
      max-width: 60px;
    }
  }
  
  .fd-user-button {
    font-size: var(--font-size-lg);
    padding: var(--inset-xs);
  }
  
  /* Mobile hamburger — geometry owned by base .fd-mobile-menu-toggle / .fd-hamburger */
  .fd-mobile-menu-toggle {
    display: flex;
  }
  
  .fd-mobile-menu-toggle:hover {
    background-color: var(--bg-secondary);
    color: var(--interactive-primary);
  }
  
  /* Hide desktop toggle button on mobile */
  .fd-sidebar-toggle {
    display: none;
  }
}

/* Small Devices: 576px - 767px */
@media (min-width: 576px) and (max-width: 767px) {
  .fd-content-header {
    flex-direction: row;
    gap: var(--shell-topbar-gap);
    min-height: var(--header-height);
    height: var(--header-height);
  }
  
  .fd-header-left {
    flex: 0 0 auto;
    order: 1;
  }
  
  .fd-header-center {
    flex: 1;
    order: 2;
  }
  
  .fd-header-right {
    flex: 0 0 auto;
    order: 3;
  }
  
  .fd-search-container {
    width: 100%;
    max-width: 250px;
  }
  
  .fd-search-box {
    width: 100%;
    max-width: 250px;
  }
  
  .fd-search-input {
    font-size: var(--nav-arrow-size);
    padding: var(--inset-sm) var(--layout-gap-lg) var(--inset-sm) var(--inset-lg);
  }
  
  .fd-page-title {
    font-size: var(--font-size-page-title);
    text-align: left;
  }
  
  .fd-action-buttons {
    flex-direction: row;
    gap: var(--inset-sm);
    flex-wrap: wrap;
  }
  
  .fd-btn {
    font-size: var(--nav-arrow-size);
    padding: var(--inset-xs) var(--inset-md);
    min-width: auto;
  }

  .fd-btn:not(.fd-btn-icon-round):not(.fd-toolbar-icon-btn) {
    min-height: var(--control-track-height);
  }

  .fd-user-profile {
    flex-direction: row;
    gap: var(--inset-sm);
  }
  
  .fd-user-info {
    align-items: flex-start;
    text-align: left;
  }
  
  .fd-user-name {
    font-size: var(--nav-arrow-size);
  }
  
  .fd-user-email,
  .fd-user-role {
    font-size: var(--font-size-xs);
  }
  
  .fd-user-button {
    font-size: var(--font-size-2xl);
    padding: var(--inset-sm);
  }
  
  /* Mobile hamburger — geometry owned by base .fd-mobile-menu-toggle / .fd-hamburger */
  .fd-mobile-menu-toggle {
    display: flex;
  }
  
  .fd-mobile-menu-toggle:hover {
    background-color: var(--bg-secondary);
    color: var(--interactive-primary);
  }
  
  /* Hide desktop toggle button on mobile */
  .fd-sidebar-toggle {
    display: none;
  }
}

/* Medium Devices: 768px - 991px */
@media (min-width: 768px) and (max-width: 991px) {
  .fd-content-header {
    flex-direction: row;
    gap: var(--shell-topbar-gap);
    min-height: var(--header-height);
    height: var(--header-height);
  }
  
  .fd-header-left {
    flex: 0 0 auto;
    order: 1;
  }
  
  .fd-header-center {
    flex: 1;
    order: 2;
  }
  
  .fd-header-right {
    flex: 0 0 auto;
    order: 3;
  }
  
  .fd-search-container {
    width: 100%;
    max-width: 300px;
  }
  
  .fd-search-box {
    width: 100%;
    max-width: 300px;
  }
  
  .fd-search-input {
    font-size: var(--nav-arrow-size);
    padding: var(--inset-sm) var(--layout-gap-lg) var(--inset-sm) var(--inset-lg);
  }
  
  .fd-page-title {
    font-size: var(--font-size-page-title);
    text-align: left;
  }
  
  .fd-action-buttons {
    flex-direction: row;
    gap: var(--inset-sm);
  }
  
  .fd-btn {
    font-size: var(--nav-arrow-size);
    padding: var(--inset-xs) var(--inset-md);
  }

  .fd-btn:not(.fd-btn-icon-round):not(.fd-toolbar-icon-btn) {
    min-height: var(--control-track-height);
  }

  .fd-user-profile {
    flex-direction: row;
    gap: var(--inset-sm);
  }
  
  .fd-user-info {
    align-items: flex-start;
    text-align: left;
  }
  
  .fd-user-name {
    font-size: var(--nav-arrow-size);
  }
  
  .fd-user-email,
  .fd-user-role {
    font-size: var(--font-size-xs);
  }
  
  .fd-user-button {
    font-size: var(--font-size-2xl);
    padding: var(--inset-sm);
  }
  
  /* Hide mobile hamburger menu on medium screens */
  .fd-mobile-menu-toggle {
    display: none;
  }
  
  /* Show desktop sidebar toggle on medium screens */
  .fd-sidebar-toggle {
    display: flex;
  }
}

/* Large Devices: 992px - 1199px */
@media (min-width: 992px) and (max-width: 1199px) {
  .fd-content-header {
    flex-direction: row;
    gap: var(--shell-topbar-gap);
    min-height: var(--header-height);
    height: var(--header-height);
  }
  
  .fd-header-left {
    flex: 0 0 auto;
    order: 1;
  }
  
  .fd-header-center {
    flex: 1;
    order: 2;
  }
  
  .fd-header-right {
    flex: 0 0 auto;
    order: 3;
  }
  
  .fd-search-container {
    width: 100%;
    max-width: 320px;
  }
  
  .fd-search-box {
    width: 100%;
    max-width: 320px;
  }
  
  .fd-search-input {
    font-size: var(--nav-arrow-size);
    padding: var(--inset-sm) var(--layout-gap-lg) var(--inset-sm) var(--inset-lg);
  }
  
  .fd-page-title {
    font-size: var(--font-size-page-title);
    text-align: left;
  }
  
  .fd-action-buttons {
    flex-direction: row;
    gap: var(--inset-sm);
  }
  
  .fd-btn {
    font-size: var(--nav-arrow-size);
    padding: var(--inset-xs) var(--inset-md);
  }

  .fd-btn:not(.fd-btn-icon-round):not(.fd-toolbar-icon-btn) {
    min-height: var(--control-track-height);
  }

  .fd-user-profile {
    flex-direction: row;
    gap: var(--inset-sm);
  }
  
  .fd-user-info {
    align-items: flex-start;
    text-align: left;
  }
  
  .fd-user-name {
    font-size: var(--nav-arrow-size);
  }
  
  .fd-user-email,
  .fd-user-role {
    font-size: var(--font-size-xs);
  }
  
  .fd-user-button {
    font-size: var(--font-size-2xl);
    padding: var(--inset-sm);
  }
  
  /* Hide mobile hamburger menu on large screens */
  .fd-mobile-menu-toggle {
    display: none;
  }
  
  /* Show desktop sidebar toggle on large screens */
  .fd-sidebar-toggle {
    display: flex;
  }
}

/* Extra Large Devices: 1200px - 1399px */
@media (min-width: 1200px) and (max-width: 1399px) {
  .fd-content-header {
    flex-direction: row;
    gap: var(--shell-topbar-gap);
    min-height: var(--header-height);
    height: var(--header-height);
  }
  
  .fd-header-left {
    flex: 0 0 auto;
    order: 1;
  }
  
  .fd-header-center {
    flex: 1;
    order: 2;
  }
  
  .fd-header-right {
    flex: 0 0 auto;
    order: 3;
  }
  
  .fd-search-container {
    width: 100%;
    max-width: 350px;
  }
  
  .fd-search-box {
    width: 100%;
    max-width: 350px;
  }
  
  .fd-search-input {
    font-size: var(--nav-arrow-size);
    padding: var(--inset-sm) var(--layout-gap-lg) var(--inset-sm) var(--inset-lg);
  }
  
  .fd-page-title {
    font-size: var(--font-size-page-title);
    text-align: left;
  }
  
  .fd-action-buttons {
    flex-direction: row;
    gap: var(--inset-sm);
  }
  
  .fd-btn {
    font-size: var(--nav-arrow-size);
    padding: var(--inset-xs) var(--inset-md);
  }

  .fd-btn:not(.fd-btn-icon-round):not(.fd-toolbar-icon-btn) {
    min-height: var(--control-track-height);
  }

  .fd-user-profile {
    flex-direction: row;
    gap: var(--inset-sm);
  }
  
  .fd-user-info {
    align-items: flex-start;
    text-align: left;
  }
  
  .fd-user-name {
    font-size: var(--nav-arrow-size);
  }
  
  .fd-user-email,
  .fd-user-role {
    font-size: var(--font-size-xs);
  }
  
  .fd-user-button {
    font-size: var(--font-size-2xl);
    padding: var(--inset-sm);
  }
  
  /* Hide mobile hamburger menu on extra large screens */
  .fd-mobile-menu-toggle {
    display: none;
  }
  
  /* Show desktop sidebar toggle on extra large screens */
  .fd-sidebar-toggle {
    display: flex;
  }
}

/* XXL Devices: 1400px+ */
@media (min-width: 1400px) {
  .fd-content-header {
    flex-direction: row;
    gap: var(--shell-topbar-gap);
    min-height: var(--header-height);
    height: var(--header-height);
  }
  
  .fd-header-left {
    flex: 0 0 auto;
    order: 1;
  }
  
  .fd-header-center {
    flex: 1;
    order: 2;
  }
  
  .fd-header-right {
    flex: 0 0 auto;
    order: 3;
  }
  
  .fd-search-container {
    width: 100%;
    max-width: 400px;
  }
  
  .fd-search-box {
    width: 100%;
    max-width: 400px;
  }
  
  .fd-search-input {
    font-size: var(--nav-arrow-size);
    padding: var(--inset-sm) var(--layout-gap-lg) var(--inset-sm) var(--inset-lg);
  }
  
  .fd-page-title {
    font-size: var(--font-size-page-title);
    text-align: left;
  }
  
  .fd-action-buttons {
    flex-direction: row;
    gap: var(--inset-sm);
  }
  
  .fd-btn {
    font-size: var(--nav-arrow-size);
    padding: var(--inset-xs) var(--inset-md);
  }

  .fd-btn:not(.fd-btn-icon-round):not(.fd-toolbar-icon-btn) {
    min-height: var(--control-track-height);
  }

  .fd-user-profile {
    flex-direction: row;
    gap: var(--inset-sm);
  }
  
  .fd-user-info {
    align-items: flex-start;
    text-align: left;
  }
  
  .fd-user-name {
    font-size: var(--nav-arrow-size);
  }
  
  .fd-user-email,
  .fd-user-role {
    font-size: var(--font-size-xs);
  }
  
  .fd-user-button {
    font-size: var(--font-size-2xl);
    padding: var(--inset-sm);
  }
  
  /* Hide mobile hamburger menu on XXL screens */
  .fd-mobile-menu-toggle {
    display: none;
  }
  
  /* Show desktop sidebar toggle on XXL screens */
  .fd-sidebar-toggle {
    display: flex;
  }
}

/* ========================================
   HEADER ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Focus management for header - removed to prevent blue border on entire header */

/* Skip to main content - visually hidden until focused */
.fd-skip-to-main {
  position: absolute;
  top: -40px;
  left: var(--inset-xs);
  background: var(--interactive-primary);
  color: var(--text-inverse);
  padding: var(--inset-sm) var(--inset-md);
  text-decoration: none;
  border-radius: var(--radius-sm);
  z-index: 10000;
  font-weight: var(--font-weight-medium);
  transition: top 0.2s ease;
}

.fd-skip-to-main:focus {
  top: var(--inset-xs);
  outline: 2px solid var(--interactive-primary);
  outline-offset: 2px;
}

/* Skip link for header navigation */
.fd-header-skip-link {
  position: absolute;
  top: -40px;
  left: var(--inset-xs);
  background: var(--interactive-primary);
  color: var(--text-inverse);
  padding: var(--inset-sm);
  text-decoration: none;
  border-radius: var(--radius-sm);
  z-index: var(--z-dropdown);
}

.fd-header-skip-link:focus {
  top: var(--inset-xs);
}

/* High contrast mode support for header */
@media (prefers-contrast: high) {
  .fd-content-header {
    border-bottom: 2px solid var(--text-primary);
  }
  
  .fd-btn:hover,
  .fd-user-button:hover {
    background-color: var(--text-primary);
    color: var(--text-inverse);
  }
}

/* ========================================
   ADDITIONAL RESPONSIVE IMPROVEMENTS
   ======================================== */

/* Sidebar Toggle Button Responsive Positioning */
.fd-sidebar-toggle {
  position: fixed;
  top: calc(var(--header-height) / 2);
  left: var(--sidebar-width);
  transform: translate(-50%, -50%);
  z-index: var(--z-fixed);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: var(--nav-arrow-size);
  color: var(--text-secondary);
  cursor: pointer;
  padding: var(--inset-xs);
  border-radius: var(--radius-button); /* 12px — 3×4pt; not pill */
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.fd-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 1);
  color: var(--interactive-primary);
  box-shadow: var(--shadow-hover-card-md);
}

/* Collapsed state positioning */
.fd-layout-container.sidebar-collapsed .fd-sidebar-toggle {
  left: var(--sidebar-width-collapsed);
}

/* Icon rotation for collapsed state */
.fd-toggle-icon {
  transition: transform var(--transition-normal);
}

.fd-layout-container.sidebar-collapsed .fd-toggle-icon {
  transform: rotate(180deg);
}

/* ========================================
   SIDEBAR CONTENT RESPONSIVE ADJUSTMENTS
   ======================================== */

/* Navigation link — keep shell gutter tokens at all widths (no off-ladder overrides) */
@media (max-width: 575px) {
  .fd-nav-link,
  .fd-nav-dropdown-trigger {
    padding: var(--inset-sm) var(--nav-link-pad-x-expanded);
    margin: 0 var(--nav-link-margin-x-expanded) var(--nav-item-margin-bottom) var(--nav-link-margin-x-expanded);
    font-size: var(--nav-link-font-size);
  }
  
  .fd-nav-section-title {
    font-size: var(--font-size-xs);
  }
}

/* ========================================
   GLOBAL SCROLLBAR — Pulse Pro style
   Thin, transparent track, pill thumb that reveals on hover.
   Thumb fades to 70% transparency when inactive, solid on hover.
   ======================================== */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(115, 123, 139, 0.35);
  border-radius: var(--radius-full);
  transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(115, 123, 139, 0.6);
}
/* Firefox global — thin pill, no hover state support */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(115, 123, 139, 0.35) transparent;
}

/* ========================================
   SIDEBAR OVERFLOW HANDLING
   ======================================== */

/* Desktop sticky owns Y-scroll on .fd-sidebar; X clip only on the middle column */
.fd-sidebar-content {
  overflow-x: hidden;
}

/* ========================================
   SIDEBAR Z-INDEX MANAGEMENT
   ======================================== */

/* Ensure proper layering */
.fd-sidebar {
  z-index: var(--z-sticky);
}

@media (max-width: 767px) {
  .fd-sidebar {
    z-index: var(--sidebar-mobile-z-index);
  }
}

.fd-sidebar.mobile-open {
  z-index: var(--z-modal);
}

.fd-mobile-overlay {
  z-index: calc(var(--z-modal) - 1);
}

.fd-sidebar-toggle {
  z-index: var(--z-fixed);
}

/* ========================================
   SIDEBAR ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Focus management for sidebar - removed outline to prevent border on click */

/* Skip link for sidebar navigation */
.fd-sidebar-skip-link {
  position: absolute;
  top: -40px;
  left: var(--inset-xs);
  background: var(--interactive-primary);
  color: var(--text-inverse);
  padding: var(--inset-sm);
  text-decoration: none;
  border-radius: var(--radius-sm);
  z-index: var(--z-dropdown);
}

.fd-sidebar-skip-link:focus {
  top: var(--inset-xs);
  outline: 2px solid var(--interactive-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .fd-sidebar {
    border-right: 2px solid var(--text-primary);
  }
  
  .fd-nav-link:hover,
  .fd-nav-dropdown-trigger:hover {
    background-color: var(--text-primary);
    color: var(--text-inverse);
  }
}

@media (max-width: 36rem) {
  .fd-content-card {
    padding: var(--inset-lg);
  }
  
  .fd-page-title {
    font-size: var(--font-size-page-title);
  }
  
  .fd-header-right {
    gap: var(--inset-lg);
    align-items: stretch;
  }
  
  .fd-header-separator {
    display: none;
  }
  
  .fd-action-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .fd-btn:not(.fd-btn-icon-round):not(.fd-add-btn):not(.fd-map-view-btn) {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }
  
  .fd-user-profile {
    flex-direction: row;
    gap: var(--inset-xs);
    align-items: center;
    max-width: 60px;
  }
  
  .fd-user-info {
    align-items: center;
  }
  
  .fd-search-container {
    width: 100%;
  }
  
  .fd-search-box {
    width: 100%;
    max-width: 200px;
  }
  
  .fd-search-input {
    font-size: var(--font-size-xs);
    padding: var(--inset-xs) var(--inset-lg) var(--inset-xs) var(--inset-sm);
  }
  
  /* Extra small mobile improvements */
  .fd-mobile-menu-toggle {
    display: flex;
  }

  /* Drawer width owned by ≤767px floating-shell block — do not clamp scrollport to 280 */
  .table-responsive {
    border: none;
  }
  
  .table {
    font-size: var(--font-size-xs);
    min-width: 500px;
  }
  
  .table th,
  .table td {
    padding: var(--inset-xs);
    white-space: nowrap;
  }
  
  .table th {
    font-size: var(--font-size-xs);
    padding: var(--inset-xs) var(--inset-sm);
  }
  
  .table td {
    font-size: var(--font-size-xs);
    padding: var(--inset-xs) var(--inset-sm);
  }
  
  /* Mobile button sizing — form-control font-size moved to fd-forms.css (FORM-012) */
  .btn {
    font-size: var(--nav-arrow-size);
    padding: var(--inset-xs) var(--inset-sm);
  }
  
  /* Extra small mobile stat cards — layout-only (typography canonical: fd-components.css) */
  .fd-metric-card {
    margin-bottom: var(--inset-xs);
  }
  
  .fd-stat-icon {
    width: 32px;
    height: 32px;
    font-size: var(--font-size-base);
  }
  
  /* Extra small mobile table actions */
  .fd-btn-sm {
    min-width: 28px;
    height: 28px;
    padding: var(--inset-xs);
  }
  
  .fd-btn-icon {
    width: 28px;
    height: 28px;
  }
  
  /* Extra small mobile DataTable controls */
  .dataTables_length select,
  .dataTables_filter input {
    font-size: var(--font-size-xs);
    padding: var(--inset-xs);
  }
  
  .dt-button {
    font-size: var(--font-size-xs);
    padding: var(--inset-xs);
  }
}

/* ========================================
   DROPDOWN STYLING - CLEAN IMPLEMENTATION
   ======================================== */

/* Clean dropdown styling without conflicts */

/* Select typography — canonical in fd-forms.css (FORM-012) */

/* ========================================
   UTILITY CLASSES
   ======================================== */

.fd-text-center {
  text-align: center;
}

.fd-text-left {
  text-align: left;
}

.fd-text-right {
  text-align: right;
}

/* ========================================
   FOCUS STATES FOR ACCESSIBILITY
   ======================================== */

/* Focus state for sidebar toggle */
.fd-sidebar-toggle:focus-visible {
  outline: 2px solid var(--interactive-primary);
  outline-offset: 2px;
  background: rgba(255, 255, 255, 1);
  color: var(--interactive-primary);
}

/* Focus state for mobile menu toggle */
.fd-mobile-menu-toggle:focus-visible {
  outline: 2px solid var(--interactive-primary);
  outline-offset: 2px;
  background-color: var(--bg-accent);
  color: var(--interactive-primary);
}

/* Focus state for logo link */
.fd-logo-link:focus-visible {
  outline: 2px solid var(--interactive-primary);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

/* Focus state for header user menu trigger */
.fd-user-button:focus-visible {
  outline: 2px solid var(--interactive-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ========================================
   LOADING AND DISABLED STATES
   ======================================== */

/* Loading state for navigation items */
.fd-nav-link.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.fd-nav-link.loading::after {
  content: '';
  position: absolute;
  right: var(--inset-sm);
  top: calc(50% - 6px);
  width: 12px;
  height: 12px;
  border: 2px solid var(--border-secondary);
  border-top: 2px solid var(--interactive-primary);
  border-radius: 50%;
  animation: fd-spin 1s linear infinite;
}

/* Disabled state for navigation items */
.fd-nav-link:disabled,
.fd-nav-dropdown-trigger:disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

/* ========================================
   SHELL-02 — App top bar (Pulse-like zones)
   Menu | context | spacer | search + user tile
   ======================================== */

.fd-content-header.fd-topbar {
  display: flex;
  align-items: center;
  gap: var(--shell-gap);
  /* L3 shell gutter only — do not add page-grid 4pt trim (off-ladder; cards own their trim) */
  padding: var(--shell-gutter-y) var(--shell-gutter-x);
  min-height: var(--header-height);
  height: var(--header-height);
  flex-shrink: 0;
  box-shadow: none;
  border-bottom: none;
  box-sizing: border-box;
  overflow: visible;
}

.fd-topbar-zone {
  display: flex;
  align-items: center;
  min-width: 0;
}

.fd-topbar-zone--menu {
  flex: 0 0 auto;
}

/* Desktop: hamburger is display:none but the empty zone still ate flex gap (16px) */
@media (min-width: 768px) {
  .fd-topbar-zone--menu {
    display: none;
  }
}

.fd-topbar-zone--context {
  flex: 0 1 auto;
  max-width: min(48vw, 520px);
  overflow: hidden;
}

.fd-topbar-spacer {
  flex: 1 1 auto;
  min-width: var(--shell-topbar-gap);
}

.fd-topbar-zone--tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--shell-topbar-gap);
  margin-left: auto;
  overflow: visible;
}

/* Z2 — title stack — 16/24 + 12/16 = 40 (gap 0); centres in 80px header at y=20 */
.fd-topbar-title-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
  max-width: 100%;
}

.fd-topbar-title {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-page-title); /* 16 — was *1.2 → 19.2 off ladder */
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  line-height: var(--line-height-title); /* 24 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.fd-topbar-subtitle {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-page-subtitle); /* 12 */
  font-weight: var(--font-weight-normal);
  color: var(--text-secondary);
  line-height: var(--line-height-secondary); /* 16 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Z2 — breadcrumb (Pulse Pro parity) */
.fd-topbar-breadcrumb {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.fd-breadcrumb {
  display: flex;
  align-items: center;
  min-width: 0;
}

.fd-breadcrumb-list {
  display: flex;
  align-items: center;
  gap: var(--inset-xs);
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.fd-breadcrumb-item {
  display: flex;
  align-items: center;
  gap: var(--inset-xs);
  min-width: 0;
}

.fd-breadcrumb-link {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition-fast, 150ms ease);
}

.fd-breadcrumb-link:hover {
  color: var(--interactive-primary);
}

.fd-breadcrumb-sep {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--text-tertiary);
  line-height: 1;
}

.fd-breadcrumb-item .fd-topbar-title {
  flex: unset;
}

/* Z4 — org clock (profile-tile layout: icon | time + date) */
.fd-topbar-clock {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--inset-sm);
  flex-shrink: 0;
  padding: var(--inset-2xs) var(--inset-md) var(--inset-2xs) var(--inset-2xs);
  border-radius: var(--radius-full);
  border: var(--stroke-hairline) solid var(--border-primary);
  background-color: transparent;
  overflow: visible;
}

/* Clip AM/PM wash to the pill; sun may sit outside the dial */
.fd-topbar-clock-period {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity var(--transition-normal, 0.2s ease);
}

.fd-topbar-clock[data-period="am"] .fd-topbar-clock-period {
  opacity: 1;
  background:
    radial-gradient(
      120% 140% at 100% 100%,
      color-mix(in srgb, var(--status-warning) 22%, transparent) 0%,
      color-mix(in srgb, var(--status-warning) 8%, transparent) 42%,
      transparent 78%
    );
}

.fd-topbar-clock[data-period="pm"] .fd-topbar-clock-period {
  opacity: 1;
  background:
    radial-gradient(
      120% 140% at 100% 100%,
      color-mix(in srgb, var(--color-grey-04) 40%, transparent) 0%,
      color-mix(in srgb, var(--color-grey-03) 14%, transparent) 42%,
      transparent 78%
    );
}

.fd-topbar-clock-face,
.fd-topbar-clock-text {
  position: relative;
  z-index: 1;
}

.fd-topbar-clock-face {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  overflow: visible;
}

/* Day-arc sun — soft yellow disc + rays; sits under dial so rim crops the inside */
.fd-topbar-clock-sun {
  --fd-sun-size: 16px;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--fd-sun-size);
  height: var(--fd-sun-size);
  margin-left: calc(var(--fd-sun-size) / -2);
  margin-top: calc(var(--fd-sun-size) / -2);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
  transition: opacity var(--transition-normal, 0.2s ease);
  will-change: transform;
}

.fd-topbar-clock-sun-svg {
  display: block;
  width: var(--fd-sun-size);
  height: var(--fd-sun-size);
  overflow: visible;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--status-warning-bg) 85%, transparent));
}

.fd-topbar-clock-sun-glow {
  fill: color-mix(in srgb, var(--status-warning-bg) 70%, transparent);
}

.fd-topbar-clock-sun-core {
  fill: var(--status-warning-bg);
  stroke: color-mix(in srgb, var(--status-warning) 55%, var(--status-warning-bg));
  stroke-width: 1;
}

.fd-topbar-clock-sun-rays {
  stroke: color-mix(in srgb, var(--status-warning) 70%, var(--status-warning-bg));
  stroke-width: 1.35;
  stroke-linecap: round;
  opacity: 0.85;
}

.fd-topbar-clock-sun.is-set {
  opacity: 0.4;
}

.fd-topbar-clock-sun.is-set .fd-topbar-clock-sun-svg {
  filter: none;
}

.fd-topbar-clock-sun.is-set .fd-topbar-clock-sun-glow {
  fill: color-mix(in srgb, var(--color-grey-04) 55%, transparent);
}

.fd-topbar-clock-sun.is-set .fd-topbar-clock-sun-core {
  fill: var(--color-grey-04);
  stroke: var(--color-grey-03);
}

.fd-topbar-clock-sun.is-set .fd-topbar-clock-sun-rays {
  stroke: var(--color-grey-03);
  opacity: 0.6;
}

.fd-topbar-analog {
  position: relative;
  z-index: 2;
  display: block;
  width: 40px;
  height: 40px;
  overflow: visible;
}

.fd-topbar-analog-dial {
  fill: var(--bg-primary);
  stroke: var(--border-primary);
  stroke-width: 1.5;
}

.fd-topbar-analog-ticks line {
  stroke: currentColor;
  color: var(--text-tertiary);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.fd-topbar-analog-hand line {
  stroke: currentColor;
  stroke-linecap: round;
}

.fd-topbar-analog-hand--hour {
  color: var(--text-primary);
}

.fd-topbar-analog-hand--hour line {
  stroke-width: 2.75;
}

.fd-topbar-analog-hand--minute {
  color: var(--text-secondary);
}

.fd-topbar-analog-hand--minute line {
  stroke-width: 2.25;
}

.fd-topbar-analog-hand--second {
  color: var(--interactive-primary);
}

.fd-topbar-analog-hand--second line {
  stroke-width: 1.5;
}

.fd-topbar-analog-hub {
  fill: var(--interactive-primary);
  stroke: var(--bg-primary);
  stroke-width: 0.75;
}

.fd-topbar-clock-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  text-align: left;
  padding-right: var(--inset-xs);
}

.fd-topbar-clock-time {
  font-family: var(--font-family-mono);
  font-size: var(--nav-arrow-size);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.fd-topbar-clock-sec {
  color: var(--text-secondary);
  font-weight: var(--font-weight-normal);
}

.fd-topbar-clock-date {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-normal);
  color: var(--text-secondary);
  line-height: 1.2;
  margin-top: var(--inset-2xs);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 575.98px) {
  .fd-topbar-clock {
    padding: var(--inset-2xs);
  }

  .fd-topbar-clock-text {
    display: none;
  }
}

/* Legacy topbar search styles kept for any page that still mounts .fd-topbar-search */
.fd-topbar-search .fd-search-box {
  width: 240px;
  max-width: 240px;
}

.fd-topbar-search .fd-search-input,
.fd-skin.fd-shell-topbar .fd-content-header.fd-topbar .fd-topbar-search .fd-search-input {
  width: 100%;
  border: var(--stroke-hairline) solid transparent;
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: none;
  transition:
    border-color var(--transition-control),
    box-shadow var(--transition-control),
    background-color var(--transition-control);
}

.fd-topbar-search .fd-search-input:hover:not(:focus),
.fd-skin.fd-shell-topbar .fd-content-header.fd-topbar .fd-topbar-search .fd-search-input:hover:not(:focus) {
  border-color: var(--interactive-primary);
  background-color: rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow-hover-sm);
}

.fd-skin.fd-shell-topbar .fd-content-header.fd-topbar .fd-topbar-search .fd-search-input:focus {
  border: var(--stroke-hairline) solid var(--interactive-primary);
  background-color: rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow-focus);
  outline: none;
}

.fd-topbar-search .fd-search-icon {
  transition: color var(--transition-control);
}

.fd-topbar-search .fd-search-box:hover .fd-search-icon,
.fd-topbar-search .fd-search-box:focus-within .fd-search-icon {
  color: var(--interactive-primary);
}

@media (prefers-reduced-motion: reduce) {
  .fd-page-chrome .fd-datatable-search input.fd-search-input,
  .fd-topbar-search .fd-search-input,
  .fd-skin.fd-shell-topbar .fd-content-header.fd-topbar .fd-topbar-search .fd-search-input,
  .fd-page-chrome .fd-btn.fd-add-btn {
    transition: none;
  }
}

/* Z4 — user tile */
.fd-user-tile {
  flex-shrink: 0;
  position: relative;
  overflow: visible;
}

.fd-user-tile.fd-user-profile {
  border-radius: var(--radius-button); /* 12px — 3×4pt */
  background-color: var(--bg-primary);
  /* Symmetric: 2×40×2 height band + 4px inline (was 2/4/2/2 — right-heavy) */
  padding: var(--inset-2xs) var(--inset-xs);
  gap: var(--inset-sm);
}

@media (max-width: 991.98px) {
  .fd-topbar-zone--context {
    max-width: min(36vw, 280px);
  }

  .fd-topbar-search .fd-search-box {
    width: 160px;
    max-width: 160px;
  }

  .fd-user-tile .fd-user-email,
  .fd-user-tile .fd-user-role {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .fd-content-header.fd-topbar {
    gap: var(--shell-gap);
    padding: var(--shell-gutter-y) var(--shell-gutter-x);
  }

  .fd-topbar-subtitle {
    display: none;
  }

  .fd-topbar-zone--context {
    max-width: 42vw;
  }

  .fd-topbar-search .fd-search-box {
    width: 120px;
    max-width: 120px;
  }

  .fd-user-tile .fd-user-info {
    display: none;
  }

  .fd-user-tile.fd-user-profile {
    padding: var(--inset-2xs);
    background: transparent;
  }
}

