/*
 * departments.css — multi-department architecture
 *
 * Covers:
 *   1. Nav dept badge + switcher dropdown (lives in every dashboard's nav)
 *   2. Analytics / Sales placeholder shells (`#dashboard-analytics`, `#dashboard-sales`)
 *   3. Subtle per-dept accent overrides on the cultivation shell (so the
 *      identity changes when a multi-dept user switches into Cultivation)
 *
 * Motion: stagger-in cards (CSS-only via data-stagger + JS adds .mount-in),
 * shared easings with the rest of the system.
 */

/* ════════════════════════════════════════════════════════════════════════
   1) Nav dept badge + dropdown
   ════════════════════════════════════════════════════════════════════════ */
.nav-dept-wrap {
  --dept-tint: var(--accent-cyan, #38bdf8);
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 14px;
  z-index: 30;
}
.nav-dept-wrap:empty { display: none; }

.nav-dept-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 11px 6px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, transform 160ms cubic-bezier(.2,.8,.2,1);
}
.nav-dept-wrap.single .nav-dept-badge {
  cursor: default;
  pointer-events: none;
}
.nav-dept-badge:hover {
  background: color-mix(in oklab, var(--dept-tint) 12%, rgba(255,255,255,0.04));
  border-color: color-mix(in oklab, var(--dept-tint) 36%, rgba(255,255,255,0.10));
}
.nav-dept-badge:active { transform: scale(0.97); }
.nav-dept-wrap.open .nav-dept-badge {
  background: color-mix(in oklab, var(--dept-tint) 16%, rgba(255,255,255,0.06));
  border-color: color-mix(in oklab, var(--dept-tint) 50%, rgba(255,255,255,0.10));
}
.nav-dept-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--dept-tint);
  box-shadow: 0 0 6px color-mix(in oklab, var(--dept-tint) 70%, transparent);
  animation: navDeptDot 2.4s ease-in-out infinite;
}
@keyframes navDeptDot {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%      { transform: scale(0.78); opacity: 0.6; }
}
.nav-dept-name {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
/* The department switcher must always show its full name — never clip to
   "PRODUCTION …". No width/overflow constraint anywhere in the switcher chain
   (the sidebar's narrow width was triggering an ellipsis cutoff). */
#nav-dept-wrap, #nav-dept-badge, .nav-dept-badge {
  overflow: visible !important;
  max-width: none !important;
  flex: 0 0 auto;
}
.nav-dept-name {
  overflow: visible !important;
  text-overflow: clip !important;
  max-width: none !important;
  white-space: nowrap;
}
.nav-dept-chev {
  margin-left: 1px;
  color: rgba(255,255,255,0.45);
  transition: transform 200ms cubic-bezier(.2,.8,.2,1);
}
.nav-dept-wrap.open .nav-dept-chev { transform: rotate(180deg); }

/* Dropdown */
.nav-dept-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(10, 13, 22, 0.92);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 22px 50px -22px rgba(0,0,0,0.7);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top left;
  pointer-events: none;
  transition: opacity 200ms cubic-bezier(.2,.8,.2,1), transform 220ms cubic-bezier(.2,.8,.2,1);
}
.nav-dept-wrap.open .nav-dept-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.nav-dept-dd-label {
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.40);
  padding: 8px 10px 6px;
}
.nav-dept-item {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  column-gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, transform 160ms cubic-bezier(.2,.8,.2,1);
}
.nav-dept-item .nav-dept-dot { width: 8px; height: 8px; }
.nav-dept-item-name {
  display: block;
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}
.nav-dept-item-sub {
  display: block;
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
  grid-column: 2;
}
.nav-dept-check {
  font-size: 11px;
  color: var(--dept-tint);
  filter: drop-shadow(0 0 6px color-mix(in oklab, var(--dept-tint) 60%, transparent));
}
.nav-dept-item:hover { background: rgba(255,255,255,0.06); }
.nav-dept-item:active { transform: scale(0.98); }
.nav-dept-item.current {
  background: color-mix(in oklab, var(--dept-tint) 12%, transparent);
}
.nav-dept-item.locked {
  opacity: 0.42;
  cursor: not-allowed;
  filter: saturate(0.55);
}
.nav-dept-item.locked:hover { background: transparent; }

/* Light theme */
html[data-theme="light"] .nav-dept-badge {
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.10);
  color: rgba(15,23,42,0.82);
}
html[data-theme="light"] .nav-dept-chev   { color: rgba(15,23,42,0.40); }
html[data-theme="light"] .nav-dept-dropdown {
  background: rgba(255,255,255,0.92);
  border-color: rgba(15,23,42,0.10);
}
html[data-theme="light"] .nav-dept-dd-label   { color: rgba(15,23,42,0.40); }
html[data-theme="light"] .nav-dept-item       { color: #0f172a; }
html[data-theme="light"] .nav-dept-item-sub   { color: rgba(15,23,42,0.45); }
html[data-theme="light"] .nav-dept-item:hover { background: rgba(15,23,42,0.05); }

/* ════════════════════════════════════════════════════════════════════════
   2) Placeholder department dashboards (Analytics, Sales)
   ════════════════════════════════════════════════════════════════════════ */
.dept-dashboard {
  min-height: 100vh;
  opacity: 0;
  transition: opacity 480ms cubic-bezier(.2,.8,.2,1);
}
.dept-dashboard.visible { opacity: 1; }
.dept-dashboard.hidden  { display: none; }

#dashboard-analytics, #dashboard-sales {
  position: relative;
  font-family: 'Space Grotesk', Inter, sans-serif;
  color: #ffffff;
}

.dept-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

/* Ambient drifting mesh, scoped to each dept's tint */
.dept-shell-bg {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 18%, rgba(56,189,248,0.10) 0%, transparent 40%),
    radial-gradient(circle at 85% 82%, rgba(129,140,248,0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 110%, rgba(45,212,191,0.06) 0%, transparent 55%);
  animation: deptShellDrift 28s ease-in-out infinite alternate;
}
#dashboard-sales .dept-shell-bg {
  background:
    radial-gradient(circle at 18% 12%, rgba(251,191,36,0.09)  0%, transparent 40%),
    radial-gradient(circle at 82% 88%, rgba(167,139,250,0.07) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(56,189,248,0.05)  0%, transparent 55%);
}
@keyframes deptShellDrift {
  0%   { transform: translate3d(0, 0, 0)   scale(1.00); }
  100% { transform: translate3d(-2%, 1.5%, 0) scale(1.05); }
}

/* ── Top bar ──────────────────────────────────────────────────────────── */
.dept-shell-head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 18px 32px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(10,13,22,0.72) 0%, rgba(10,13,22,0.42) 100%);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.dept-shell-brand {
  display: inline-flex; align-items: center; gap: 12px;
}
.dept-shell-brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: rgba(56,189,248,0.10);
  border: 1px solid rgba(56,189,248,0.22);
}
.dept-shell-brand-text {
  display: inline-flex; flex-direction: column; line-height: 1; gap: 4px;
}
.dept-shell-brand-name {
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #ffffff;
  text-transform: uppercase;
}
.dept-shell-brand-name span { color: var(--accent-cyan, #38bdf8); }
.dept-shell-brand-dept {
  --dept-tint: var(--accent-cyan);
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--dept-tint);
  text-transform: uppercase;
}

/* Switcher pills (inside placeholder shells) */
.dept-shell-switch {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  justify-self: center;
}
.dept-switch-pill {
  --dept-tint: var(--accent-cyan);
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.65);
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 160ms cubic-bezier(.2,.8,.2,1);
}
.dept-switch-pill .dept-switch-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--dept-tint);
  box-shadow: 0 0 6px color-mix(in oklab, var(--dept-tint) 70%, transparent);
}
.dept-switch-pill:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.05);
}
.dept-switch-pill:active { transform: scale(0.97); }
.dept-switch-pill.current {
  color: #ffffff;
  background: color-mix(in oklab, var(--dept-tint) 18%, rgba(255,255,255,0.04));
}
.dept-switch-pill.locked {
  opacity: 0.36;
  cursor: not-allowed;
  filter: saturate(0.4);
}
.dept-switch-pill.locked:hover { background: transparent; color: rgba(255,255,255,0.65); }
.dept-switch-check {
  font-size: 8px;
  color: var(--dept-tint);
}

.dept-shell-logout {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.62);
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 200ms, color 200ms, border-color 200ms, transform 160ms cubic-bezier(.2,.8,.2,1);
}
.dept-shell-logout:hover {
  background: rgba(251,113,133,0.10);
  border-color: rgba(251,113,133,0.30);
  color: #fb7185;
}
.dept-shell-logout:active { transform: scale(0.97); }

/* ── Main column ─────────────────────────────────────────────────────── */
.dept-shell-main {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  width: calc(100% - 64px);
  margin: 0 auto;
  padding: 64px 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Stagger entrance for any [data-stagger] child */
.dept-shell [data-stagger] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 540ms cubic-bezier(.2,.8,.2,1),
    transform 540ms cubic-bezier(.2,.8,.2,1);
  will-change: transform, opacity;
}
.dept-shell [data-stagger].mount-in {
  opacity: 1;
  transform: translateY(0);
}

.dept-shell-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.62);
  text-transform: uppercase;
  align-self: flex-start;
}
.dept-shell-dot {
  --dept-tint: var(--accent-cyan);
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--dept-tint);
  box-shadow: 0 0 8px color-mix(in oklab, var(--dept-tint) 65%, transparent);
  animation: navDeptDot 2.4s ease-in-out infinite;
}

.dept-shell-title {
  margin: 0;
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-weight: 700;
  font-size: clamp(36px, 6.4vw, 64px);
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: #ffffff;
}
.dept-shell-title span {
  color: var(--accent-cyan);
}
#dashboard-sales .dept-shell-title span {
  color: var(--accent-amber);
}

.dept-shell-lede {
  max-width: 720px;
  margin: 0;
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.62);
}

/* ── Coming-soon cards ───────────────────────────────────────────────── */
.dept-shell-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 8px;
}

.dept-shell-card {
  --dept-tint: var(--accent-cyan);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 22px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 540ms cubic-bezier(.2,.8,.2,1),
    transform 540ms cubic-bezier(.2,.8,.2,1),
    border-color 220ms ease,
    background 220ms ease;
}
.dept-shell-card.mount-in {
  opacity: 1;
  transform: translateY(0);
}
.dept-shell-card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 8%, color-mix(in oklab, var(--dept-tint) 18%, transparent) 0%, transparent 42%);
  opacity: 0.7;
}
.dept-shell-card:hover {
  border-color: color-mix(in oklab, var(--dept-tint) 30%, rgba(255,255,255,0.10));
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.025) 100%);
}

.dept-shell-card-glyph {
  width: 38px; height: 38px;
  color: var(--dept-tint);
  filter: drop-shadow(0 0 10px color-mix(in oklab, var(--dept-tint) 40%, transparent));
}
.dept-shell-card-glyph svg { width: 100%; height: 100%; }

.dept-shell-card-title {
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: #ffffff;
}
.dept-shell-card-sub {
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.58);
}
.dept-shell-card-status {
  align-self: flex-start;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--dept-tint) 14%, rgba(255,255,255,0.04));
  border: 1px solid color-mix(in oklab, var(--dept-tint) 30%, rgba(255,255,255,0.08));
  color: var(--dept-tint);
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ════════════════════════════════════════════════════════════════════════
   3) Light theme — placeholder shells
   ════════════════════════════════════════════════════════════════════════ */
html[data-theme="light"] .dept-shell-head {
  background: linear-gradient(180deg, rgba(240,244,255,0.85) 0%, rgba(240,244,255,0.55) 100%);
  border-bottom-color: rgba(15,23,42,0.08);
}
html[data-theme="light"] .dept-shell-brand-name { color: #0f172a; }
html[data-theme="light"] .dept-shell-switch {
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.08);
}
html[data-theme="light"] .dept-switch-pill { color: rgba(15,23,42,0.6); }
html[data-theme="light"] .dept-switch-pill:hover { color: #0f172a; background: rgba(15,23,42,0.05); }
html[data-theme="light"] .dept-switch-pill.current { color: #0f172a; }
html[data-theme="light"] .dept-shell-logout {
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.10);
  color: rgba(15,23,42,0.6);
}
html[data-theme="light"] .dept-shell-eyebrow {
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.08);
  color: rgba(15,23,42,0.6);
}
html[data-theme="light"] .dept-shell-title { color: #0f172a; }
html[data-theme="light"] .dept-shell-lede  { color: rgba(15,23,42,0.62); }
html[data-theme="light"] .dept-shell-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.72) 100%);
  border-color: rgba(15,23,42,0.08);
  box-shadow: 0 10px 28px -14px rgba(15,23,42,0.18);
}
html[data-theme="light"] .dept-shell-card-title { color: #0f172a; }
html[data-theme="light"] .dept-shell-card-sub   { color: rgba(15,23,42,0.6); }

/* Root text colour on the placeholder shells is hardcoded #ffffff, so any
   descendant text without its own light override renders white-on-lavender.
   Re-anchor the shells to the deep-navy text token. */
html[data-theme="light"] #dashboard-analytics,
html[data-theme="light"] #dashboard-sales {
  color: var(--text-primary);
}

/* Title accent spans use a solid accent colour; re-anchor them on the light
   theme so the accent stays legible against the light bg. */
html[data-theme="light"] .dept-shell-title span {
  color: var(--accent-cyan);
}
html[data-theme="light"] #dashboard-sales .dept-shell-title span {
  color: var(--accent-amber);
}

/* ════════════════════════════════════════════════════════════════════════
   4) Responsive
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .dept-shell-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  /* Match the system-wide rule — disable heavy ambient motion on phones.
     Was ≤1194px in the iPad-first era (relaxed 2026-05-22). */
  .dept-shell-bg { animation: none; }
  .dp-vignette  { animation: none; }
}
@media (max-width: 900px) {
  .dept-shell-head {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 16px;
  }
  .dept-shell-switch { justify-self: stretch; flex-wrap: wrap; justify-content: center; }
  .dept-shell-logout { justify-self: end; }
  .dept-shell-main { padding: 36px 0; gap: 22px; width: calc(100% - 32px); }
  .dept-shell-grid { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 640px) {
  .dept-shell-brand-name { font-size: 13px; letter-spacing: 0.14em; }
  .dept-shell-brand-dept { font-size: 8px; letter-spacing: 0.1em; }
  .dept-switch-pill { padding: 6px 10px; font-size: 10px; min-height: 36px; }
  .dept-shell-title { font-size: clamp(28px, 9vw, 40px); }
  .dept-shell-lede  { font-size: 14px; }
  .dept-shell-card  { padding: 18px; }
  .dept-shell-card-title { font-size: 16px; }
}
@media (max-width: 400px) {
  .dept-shell-head { padding: 12px 12px; }
  .dept-shell-main { width: calc(100% - 20px); padding: 28px 0; }
  .dept-shell-brand-name { font-size: 12px; }
  .dept-shell-card { padding: 16px; }
}

/* ── Nav dept badge: small-screen pass ───────────────────────────────── */
@media (max-width: 640px) {
  .nav-dept-wrap { margin-left: 8px; }
  .nav-dept-badge { padding: 5px 9px 5px 8px; font-size: 10px; gap: 6px; }
  .nav-dept-name { font-size: 10px; }
  .nav-dept-dropdown { min-width: 220px; left: -8px; }
}
@media (max-width: 400px) {
  /* The dept badge is important enough to keep; hide only the dept sub-label */
  .nav-dept-item-sub { display: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dept-shell-bg { animation: none; }
  .nav-dept-dot, .dept-shell-dot { animation: none; }
  .dept-shell [data-stagger] { transition: opacity 240ms ease; transform: none; }
  .dept-shell [data-stagger].mount-in { transform: none; }
  .dept-shell-card { transition: opacity 240ms ease, border-color 200ms ease; transform: none; }
  .dept-shell-card.mount-in { transform: none; }
  .nav-dept-dropdown { transition: opacity 180ms ease; transform: none; }
  .nav-dept-wrap.open .nav-dept-dropdown { transform: none; }
  .nav-dept-chev { transition: none; }
}

/* ── Department bundle failed to download ────────────────────────────────────
   A department's code is fetched on open (src/app/boot/dept-assets.js). If that fetch
   fails the user must get a reason and a way out, never a splash that spins
   forever. Deliberately plain: this renders when other assets may be missing
   too, so it depends on nothing but the base tokens. */
.dept-load-fail {
  position: absolute; inset: 0; z-index: 40;
  display: grid; place-content: center; justify-items: center; gap: 10px;
  padding: 32px; text-align: center;
  background: var(--col-void, #080d1e);
}
.dept-load-fail h2 {
  margin: 0;
  font: 700 20px/1.25 var(--font-display, 'Space Grotesk'), sans-serif;
  color: var(--text-primary, #e6edff);
}
.dept-load-fail p {
  margin: 0; max-width: 42ch;
  font: 500 13px/1.5 var(--font-body, Inter), sans-serif;
  color: var(--text-secondary, #cbd5e1);
}
.dept-load-retry {
  margin-top: 6px; padding: 9px 18px; min-height: 40px;
  border: 1px solid color-mix(in srgb, var(--accent-cyan, #22d3ee) 40%, transparent);
  border-radius: 10px; cursor: pointer;
  background: color-mix(in srgb, var(--accent-cyan, #22d3ee) 14%, transparent);
  color: var(--text-primary, #e6edff);
  font: 600 13px/1 var(--font-body, Inter), sans-serif;
  transition: background-color 140ms ease;
}
.dept-load-retry:hover { background: color-mix(in srgb, var(--accent-cyan, #22d3ee) 24%, transparent); }
.dept-load-retry:focus-visible { outline: 2px solid var(--accent-cyan, #22d3ee); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .dept-load-retry { transition: none; } }

/* ── Production boot skeleton ───────────────────────────────────────────────
   Lives HERE, not in src/departments/production/production.css, because that file
   is part of the lazy bundle this skeleton exists to cover — styling it there
   would leave it unstyled for exactly the window it is meant to fill.

   Why it exists: Production's 108 files load lazily, and the boot splash has a
   deliberate ~450ms deferred-show grace so quick loads don't flash it. Between
   the panel becoming visible and the splash appearing there was nothing at all
   on screen (measured ~750ms, and ~5s before _brandedWarmup was fixed to run on
   a department switch at all). boot.js removes .dept-shell-main on mount, so
   this disappears the moment the real page is ready — no teardown code.

   Deliberately shapeless: it suggests "content is coming" without promising a
   specific layout, so it never mismatches the page that replaces it. */
.prod-boot-skel {
  display: flex; flex-direction: column; gap: 22px;
  padding: 54px 40px 56px; max-width: 1240px; margin: 0 auto; width: 100%;
  box-sizing: border-box;
}
.prod-boot-skel .prod-boot-head { display: flex; flex-direction: column; gap: 12px; }
.prod-boot-skel .prod-boot-row { display: flex; gap: 16px; flex-wrap: wrap; }
.prod-boot-skel span,
.prod-boot-skel .prod-boot-panel {
  display: block; border-radius: var(--r-md, 12px);
  background: var(--glass-2, rgba(255, 255, 255, .07));
  border: 1px solid var(--glass-border, rgba(255, 255, 255, .09));
}
.prod-boot-skel .prod-boot-eyebrow { width: 128px; height: 11px; border-radius: 100px; }
.prod-boot-skel .prod-boot-title   { width: 268px; height: 30px; }
.prod-boot-skel .prod-boot-card    { flex: 1 1 180px; height: 92px; }
.prod-boot-skel .prod-boot-panel   { width: 100%; height: 300px; }

/* shimmer.skeleton — one shared sweep so the blocks read as a single surface */
.prod-boot-skel span,
.prod-boot-skel .prod-boot-panel {
  position: relative; overflow: hidden;
}
.prod-boot-skel span::after,
.prod-boot-skel .prod-boot-panel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent,
    var(--glass-3, rgba(255, 255, 255, .10)), transparent);
  transform: translate3d(-100%, 0, 0);
  animation: prod-boot-sweep 1.25s ease-in-out infinite;
}
@keyframes prod-boot-sweep { to { transform: translate3d(100%, 0, 0); } }

/* The announcement is for assistive tech only — the skeleton itself is
   aria-hidden, so without this a screen-reader user gets silence. */
.prod-boot-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

@media (max-width: 768px) {
  .prod-boot-skel { padding: 50px 14px 34px; gap: 16px; }
  .prod-boot-skel .prod-boot-panel { height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  /* No sweep — the blocks still communicate "loading" by being placeholders. */
  .prod-boot-skel span::after,
  .prod-boot-skel .prod-boot-panel::after { animation: none; opacity: 0; }
}
