* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --dash-bg: #0b0d10;
  --dash-bg-2: #121519;
  --dash-surface-1: #15191f;
  --dash-surface-2: #1a1f26;
  --dash-surface-3: #202631;
  --dash-border: #2c3440;
  --dash-border-soft: #242b35;
  --dash-text-1: #f2f5f8;
  --dash-text-2: #c2c9d2;
  --dash-text-3: #8f98a6;
  --dash-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  --ghost-panel-width: min(430px, 36vw);
  --ghost-panel-bg: #0f1115;
  --ghost-panel-surface: #181d25;
  --ghost-panel-border: rgba(170, 156, 214, 0.24);
  --ghost-panel-text: #f3f6fb;
  --ghost-panel-muted: rgba(243, 246, 251, 0.66);
  --ghost-panel-accent: #a38ede;

  --core-purchasing: #bd8628;
  --core-purchasing-soft: rgba(189, 134, 40, 0.2);
  --core-receiving: #3f8b61;
  --core-receiving-soft: rgba(63, 139, 97, 0.2);
  --core-inventory: #254f82;
  --core-inventory-soft: rgba(37, 79, 130, 0.2);
  --core-shipping: #b83a3a;
  --core-shipping-soft: rgba(184, 58, 58, 0.2);
}

body {
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  color: var(--dash-text-1);
  background:
    radial-gradient(circle at 18% -6%, rgba(255, 255, 255, 0.05), transparent 34%),
    radial-gradient(circle at 85% 0%, rgba(255, 255, 255, 0.03), transparent 28%),
    linear-gradient(180deg, var(--dash-bg) 0%, var(--dash-bg-2) 100%);
}

/* =========================
   DASHBOARD SHELL
========================= */

.dashboard-shell {
  min-height: 100vh;
}

.dashboard-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 208px;
  padding: 14px 12px 12px;
  background: linear-gradient(180deg, #0f1318 0%, #10141a 100%);
  border-right: 1px solid var(--dash-border-soft);
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 4px 10px;
  border-bottom: 1px solid var(--dash-border-soft);
}

.sidebar-top .brand-logo {
  width: 146px;
  margin-left: 0;
  transform: none;
}

.sidebar-brand-subtitle {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dash-text-3);
}

.sidebar-nav {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav-item {
  --sidebar-icon-color: #5e89be;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--dash-text-2);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.sidebar-nav-item:hover {
  background: #191e26;
  border-color: var(--dash-border-soft);
  color: var(--dash-text-1);
}

.sidebar-nav-item.is-active {
  background: #1b212a;
  border-color: #3b4656;
  color: #f7f9fc;
}

.sidebar-nav-icon {
  width: 14px;
  height: 14px;
  color: var(--sidebar-icon-color);
  opacity: 0.92;
  flex-shrink: 0;
  transition: opacity 0.18s ease;
}

.sidebar-nav-item:hover .sidebar-nav-icon,
.sidebar-nav-item.is-active .sidebar-nav-icon {
  opacity: 1;
}

.sidebar-nav-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-nav-item--overview {
  --sidebar-icon-color: #4f7fba;
}

.sidebar-nav-item--purchasing {
  --sidebar-icon-color: #bd8628;
}

.sidebar-nav-item--receiving {
  --sidebar-icon-color: #3f8b61;
}

.sidebar-nav-item--inventory {
  --sidebar-icon-color: #2f5f9a;
}

.sidebar-nav-item--shipping {
  --sidebar-icon-color: #b83a3a;
}

.sidebar-ai-ambient {
  position: relative;
  flex: 1;
  min-height: 170px;
  margin: 12px 4px 0;
  border-radius: 10px;
  border: 1px solid rgba(54, 66, 80, 0.46);
  background:
    radial-gradient(circle at 30% 18%, rgba(67, 124, 188, 0.14), transparent 52%),
    radial-gradient(circle at 74% 78%, rgba(71, 189, 180, 0.12), transparent 56%),
    linear-gradient(180deg, rgba(15, 19, 26, 0.72) 0%, rgba(11, 15, 21, 0.28) 100%);
  overflow: hidden;
  pointer-events: none;
}

.sidebar-ai-ambient::before,
.sidebar-ai-ambient::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 24px;
  z-index: 1;
  pointer-events: none;
}

.sidebar-ai-ambient::before {
  top: 0;
  background: linear-gradient(180deg, rgba(15, 19, 26, 0.88) 0%, rgba(15, 19, 26, 0) 100%);
}

.sidebar-ai-ambient::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(15, 19, 26, 0.82) 0%, rgba(15, 19, 26, 0) 100%);
}

.sidebar-ai-ambient__canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.sidebar-nav-item--purchasing:hover {
  border-color: rgba(216, 171, 47, 0.55);
}

.sidebar-nav-item--receiving:hover {
  border-color: rgba(51, 162, 97, 0.55);
}

.sidebar-nav-item--inventory:hover {
  border-color: rgba(122, 90, 209, 0.55);
}

.sidebar-nav-item--shipping:hover {
  border-color: rgba(207, 64, 64, 0.55);
}

.dashboard-content-wrap {
  margin-left: 208px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dashboard-shell .dashboard-header {
  height: auto;
  min-height: 0;
  padding: 7px 16px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background:
    radial-gradient(circle at 18% -85%, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(180deg, #141920 0%, #12171e 100%);
}

.dashboard-shell .header-left {
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  min-width: 0;
}

.dashboard-shell .page-title-block {
  height: auto;
}

.dashboard-shell .page-title-block h1 {
  font-size: 22px;
  line-height: 1.08;
}

.dashboard-shell .page-title-block p {
  margin-top: 5px;
  font-size: 12px;
}

.dashboard-shell .header-center {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.dashboard-shell .header-right {
  display: flex;
  align-items: center;
  height: auto;
  width: auto;
  padding-right: 0;
  gap: 10px;
}

.dashboard-shell .weather-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 124px;
}

.dashboard-shell .weather-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(122, 90, 209, 0.28);
  background: rgba(122, 90, 209, 0.08);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.dashboard-shell .weather-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--core-inventory);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-shell .weather-block__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.12;
  white-space: nowrap;
}

.dashboard-shell .weather-block__temperature {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.dashboard-shell .weather-block__location {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--dash-text-3);
  letter-spacing: 0.04em;
}

.dashboard-shell .date-time {
  height: auto;
  min-width: 102px;
}

.dashboard-shell .user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--dash-border);
  background: #1c222b;
  display: grid;
  place-items: center;
}

.dashboard-shell .user-avatar svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #d8dee7;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-shell .dashboard-main {
  flex: 1;
  padding: 10px 16px 10px;
}

.dashboard-shell .dashboard-footer {
  padding: 8px 0 10px;
}

/* =========================
   HEADER
========================= */

.dashboard-header {
  height: 112px;
  min-height: 112px;
  padding: 0 32px 0 22px;

  background:
    radial-gradient(circle at 36% -30%, rgba(255, 255, 255, 0.07), transparent 44%),
    linear-gradient(135deg, #11151b 0%, #0d1117 55%, #11161d 100%);

  color: var(--dash-text-1);

  display: grid;
  grid-template-columns: 470px 1fr 520px;
  align-items: center;
  gap: 24px;

  overflow: hidden;
}

.header-left,
.header-right {
  height: 104px;
  display: flex;
  align-items: center;
}

.brand-logo {
  width: 230px;
  height: auto;
  display: block;
  object-fit: contain;
  margin-left: -4px;
  transform: translateY(-1px);
}

.header-divider {
  width: 1px;
  height: 54px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 30px;
  flex-shrink: 0;
}

.page-title-block {
  height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-title-block h1 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.page-title-block p {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: var(--dash-text-3);
  letter-spacing: 0.04em;
}

/* =========================
   HEADER CENTER BUTTON
========================= */

.talk-to-ghost-button {
  height: 34px;
  min-width: 150px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(196, 203, 214, 0.44);
  background: linear-gradient(145deg, #171c23 0%, #11161d 100%);
  color: rgba(244, 248, 252, 0.92);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.24);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.talk-to-ghost-button:hover {
  border-color: rgba(220, 227, 236, 0.6);
  background: linear-gradient(145deg, #1b2129 0%, #121820 100%);
  transform: translateY(-1px);
}

.talk-to-ghost-button:focus-visible {
  outline: none;
  border-color: rgba(230, 236, 245, 0.7);
  box-shadow:
    0 0 0 3px rgba(191, 198, 210, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 16px rgba(0, 0, 0, 0.24);
}

.talk-to-ghost-button:active {
  transform: translateY(0);
}


/* =========================
   GHOST WORKSPACE PANEL
========================= */

body {
  overflow-x: hidden;
}

.ghost-workspace-panel {
  position: fixed;
  z-index: 1200;
  top: 0;
  right: 0;
  bottom: 0;

  width: var(--ghost-panel-width);
  min-width: 360px;

  color: var(--ghost-panel-text);
  background:
    radial-gradient(
      circle at 72% 0%,
      rgba(150, 132, 211, 0.16),
      transparent 34%
    ),
    linear-gradient(180deg, #0f1115 0%, #0b0d12 100%);

  border-left: 1px solid var(--ghost-panel-border);

  box-shadow:
    -18px 0 48px rgba(3, 4, 8, 0.44);

  transform: translateX(100%);
  visibility: hidden;

  transition:
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 360ms step-end;
}

body.ghost-workspace-open .ghost-workspace-panel {
  transform: translateX(0);
  visibility: visible;

  transition:
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0ms step-start;
}

.ghost-workspace-panel__inner {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;

  height: 100%;
}

.ghost-workspace-panel__header {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  padding: 14px 18px;

  background: rgba(10, 12, 16, 0.96);
  border-bottom: 1px solid var(--ghost-panel-border);
}

.ghost-workspace-panel__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.ghost-workspace-panel__symbol {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;

  color: #f5f7fb;
  background: linear-gradient(145deg, #232a36, #171c25);

  border: 1px solid rgba(168, 154, 213, 0.58);
  border-radius: 12px;

  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.13);

  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.ghost-workspace-panel__identity span {
  display: block;

  margin-bottom: 3px;

  color: var(--ghost-panel-accent);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.ghost-workspace-panel__identity h2 {
  margin: 0;

  color: var(--ghost-panel-text);
  font-size: 0.96rem;
  font-weight: 700;
}

.ghost-workspace-panel__close {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;

  padding: 0;

  color: rgba(243, 246, 251, 0.72);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;

  transition:
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.ghost-workspace-panel__close:hover {
  color: var(--ghost-panel-text);
  background: rgba(164, 146, 222, 0.14);
  border-color: rgba(164, 146, 222, 0.4);
}

.ghost-workspace-panel__close svg {
  width: 18px;
  height: 18px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.ghost-workspace-hero {
  min-height: 240px;
  overflow: hidden;

  background:
    linear-gradient(
      160deg,
      #11151c,
      #0b0e13
    );

  border-bottom: 1px solid var(--ghost-panel-border);
}

.ghost-workspace-hero__image {
  display: block;
  width: 100%;
  height: 240px;

  object-fit: contain;
  object-position: center;

  background: #0b0d12;

  filter:
    saturate(0.94)
    contrast(1.03);
}

.ghost-conversation {
  min-height: 0;
  overflow-y: auto;

  padding: 18px;

  scrollbar-color:
    rgba(164, 146, 222, 0.35)
    transparent;
}

.ghost-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  margin-bottom: 14px;
}

.ghost-message__avatar {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;

  color: #f3f6fb;
  background: #242c39;
  border: 1px solid rgba(165, 149, 220, 0.42);
  border-radius: 9px;

  font-size: 0.82rem;
  font-weight: 900;
}

.ghost-message__content {
  max-width: 84%;
  padding: 11px 13px;

  background: var(--ghost-panel-surface);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px 14px 14px 14px;
}

.ghost-message__content span {
  display: block;

  margin-bottom: 5px;

  color: var(--ghost-panel-accent);
  font-size: 0.64rem;
  font-weight: 750;
}

.ghost-message__content p {
  margin: 0;

  color: rgba(243, 246, 251, 0.9);
  font-size: 0.76rem;
  line-height: 1.55;
}

.ghost-message--user {
  justify-content: flex-end;
}

.ghost-message--user .ghost-message__avatar {
  order: 2;

  color: #f0f4fb;
  background: #2c3443;
  border-color: rgba(196, 203, 214, 0.34);
}

.ghost-message--user .ghost-message__content {
  max-width: 86%;

  background: rgba(169, 155, 220, 0.14);
  border-color: rgba(169, 155, 220, 0.3);
  border-radius: 14px 4px 14px 14px;
}

.ghost-message--user .ghost-message__content span {
  color: rgba(243, 246, 251, 0.64);
  text-align: right;
}

.ghost-message--error .ghost-message__content {
  background: rgba(193, 73, 73, 0.12);
  border-color: rgba(193, 73, 73, 0.34);
}

.ghost-message--error .ghost-message__content span {
  color: #e39191;
}

.ghost-message--thinking .ghost-message__content {
  border-style: dashed;
  opacity: 0.9;
}

.ghost-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 9px;

  padding: 14px 16px 16px;

  background: rgba(10, 12, 16, 0.97);
  border-top: 1px solid var(--ghost-panel-border);
}

.ghost-composer__field {
  display: block;
  min-width: 0;
}

.ghost-composer textarea {
  display: block;
  width: 100%;
  min-height: 42px;
  max-height: 120px;

  padding: 11px 13px;

  resize: none;

  color: var(--ghost-panel-text);
  outline: none;
  background: #1a1f28;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 11px;

  font-size: 0.76rem;
  line-height: 1.45;

  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.ghost-composer textarea::placeholder {
  color: rgba(243, 246, 251, 0.42);
}

.ghost-composer textarea:focus {
  border-color: rgba(163, 142, 222, 0.5);

  box-shadow:
    0 0 0 3px rgba(163, 142, 222, 0.12);
}

.ghost-composer__send {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;

  padding: 0;

  color: #f0f3f8;
  background:
    linear-gradient(
      145deg,
      #313946,
      #212833
    );

  border: 1px solid rgba(164, 146, 222, 0.42);
  border-radius: 11px;
}

.ghost-composer__send svg {
  width: 18px;
  height: 18px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.ghost-composer__send:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.ghost-composer__status {
  min-height: 16px;

  margin: 0;
  padding: 0 16px 12px;

  color: #e09c9c;
  font-size: 0.7rem;
  line-height: 1.35;

  opacity: 0;
  transition: opacity 160ms ease;
}

.ghost-composer__status.is-visible {
  opacity: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  :root {
    --ghost-panel-width: min(410px, 44vw);
  }
}

@media (max-width: 820px) {
  :root {
    --ghost-panel-width: 100vw;
  }

  .ghost-workspace-panel {
    min-width: 0;
  }

}

/* =========================
   HEADER RIGHT
========================= */

.header-right {
  height: 112px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 22px;
  padding-right: 26px;
  width: 100%;
}

.date-time {
  height: 104px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 118px;
}

.header-svg-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--core-inventory);
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.date-time-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
  white-space: nowrap;
}

.header-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--dash-text-3);
  letter-spacing: 0.04em;
}

.header-time {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.user-block {
  height: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
  white-space: nowrap;
}

.user-info {
  min-width: 84px;
}

.user-block strong {
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.user-block p {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1;
  opacity: 0.84;
}

.chevron-svg {
  width: 14px;
  height: 14px;
  margin-left: 2px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* =========================
   MAIN LAYOUT
========================= */

.dashboard-main {
  display: block;
  padding: 0;
  overflow-x: hidden;
}

.main-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-heading h2,
.quick-access h2 {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin-top: 3px;
  font-size: 11px;
  color: var(--dash-text-2);
}

/* =========================
   GHOST HERO
========================= */

.ghost-hero {
  margin-bottom: 0;
  padding: 12px 14px;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 255, 255, 0.06), transparent 36%),
    linear-gradient(145deg, #171c23 0%, #141920 100%);
  box-shadow: var(--dash-shadow);
  display: grid;
  grid-template-columns: 20% minmax(0, 80%);
  min-height: 200px;
  gap: 12px;
  align-items: center;
}

.ghost-hero__left {
  padding-right: 0;
  border-right: 1px solid var(--dash-border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ghost-hero__image {
  width: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
}

.ghost-hero__image img {
  width: auto;
  height: 180px;
  max-width: 100%;
  object-fit: contain;
  object-position: 50% 50%;
  transform: none;
  display: block;
  filter: contrast(1.03) brightness(0.98);
}

.ghost-hero__right {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
}

.ghost-hero__briefing h3 {
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.ghost-hero__briefing p {
  margin-top: 4px;
  color: var(--dash-text-2);
  font-size: 12px;
}

.ghost-hero__daily-header {
  margin-top: 1px;
}

.ghost-hero__daily-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--dash-text-3);
}

.ghost-briefing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  align-content: start;
}

.ghost-briefing-grid[data-card-count="1"] {
  grid-template-columns: minmax(0, 1fr);
}

.ghost-briefing-grid[data-card-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ghost-ai-card {
  border: 1px solid color-mix(in srgb, var(--ai-accent, #44536a) 24%, var(--dash-border-soft));
  border-left-color: var(--ai-accent, var(--dash-border-soft));
  border-left-width: 2px;
  border-radius: 9px;
  padding: 8px 9px;
  background:
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--ai-accent, #44536a) 16%, #07090c) 0%,
      color-mix(in srgb, var(--ai-accent, #44536a) 10%, #111722) 58%,
      #121923 100%
    );
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 110px;
}

.ghost-ai-card__label {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ai-accent, #c2c9d2) 82%, #ffffff 18%);
}

.ghost-ai-card__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ai-accent, #657285);
  box-shadow: 0 0 4px color-mix(in srgb, var(--ai-accent, #657285) 40%, transparent);
}

.ghost-ai-card__items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ghost-ai-item + .ghost-ai-item {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 6px;
}

.ghost-ai-item__title {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
  color: #f4f7fb;
}

.ghost-ai-item__detail {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.35;
  color: var(--dash-text-2);
}

.ghost-ai-item__meta {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ghost-ai-item__time {
  font-size: 10px;
  color: var(--dash-text-2);
}

.ghost-ai-item__status {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #dce3ec;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 1px 7px;
}

.ghost-safety-card {
  border: 1px solid #314055;
  border-left-width: 2px;
  border-left-color: #8ab3d8;
  border-radius: 9px;
  padding: 10px;
  background: #171d25;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  min-height: 110px;
}

.ghost-safety-card__eyebrow {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9dc0df;
}

.ghost-safety-card__title {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #f4f7fb;
}

.ghost-safety-card__message {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.4;
  color: var(--dash-text-2);
}

.ghost-safety-card__reference {
  margin-top: 6px;
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dash-text-3);
}

.operational-flow-heading {
  margin-top: 2px;
}

/* =========================
   KPI ROW
========================= */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.kpi-card {
  min-height: 106px;
  padding: 10px 8px;
  border-radius: 8px;
  border: 1px solid var(--dash-border);
  background: #171d24;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 7px;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
}

.kpi-card:has(.kpi-card__status-dot--stable)::before {
  background: #33a261;
}

.kpi-card:has(.kpi-card__status-dot--busy)::before {
  background: #3f7ea8;
}

.kpi-card:has(.kpi-card__status-dot--attention)::before {
  background: #d8ab2f;
}

.kpi-card:has(.kpi-card__status-dot--at-risk)::before {
  background: #cc7a34;
}

.kpi-card:has(.kpi-card__status-dot--critical)::before {
  background: #cf4040;
}

.kpi-card__icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--dash-border-soft);
  background: #222a35;
  color: #e4e9f0;
  font-size: 9px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.kpi-card__content {
  min-width: 0;
}

.kpi-card__core-name {
  font-size: 9px;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ecf1f7;
  font-weight: 800;
}

.kpi-card__status-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
}

.kpi-card__status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #7a8594;
}

.kpi-card__status-text {
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #f4f7fb;
  font-weight: 900;
}

.kpi-card__status-dot--stable {
  background: #33a261;
}

.kpi-card__status-dot--busy {
  background: #3f7ea8;
}

.kpi-card__status-dot--attention {
  background: #d8ab2f;
}

.kpi-card__status-dot--at-risk {
  background: #cc7a34;
}

.kpi-card__status-dot--critical {
  background: #cf4040;
  animation: kpi-critical-dot-pulse 1.8s ease-in-out infinite;
}

.kpi-card--critical {
  border-color: rgba(207, 64, 64, 0.6);
  animation: kpi-critical-border-pulse 1.8s ease-in-out infinite;
}

.kpi-card__content small {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  line-height: 1.24;
  color: #bcc5d0;
}

@keyframes kpi-critical-dot-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(207, 64, 64, 0.5);
  }

  60% {
    transform: scale(1.12);
    box-shadow: 0 0 0 6px rgba(207, 64, 64, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(207, 64, 64, 0);
  }
}

@keyframes kpi-critical-border-pulse {
  0%,
  100% {
    border-color: rgba(207, 64, 64, 0.45);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  }

  50% {
    border-color: rgba(207, 64, 64, 0.72);
    box-shadow:
      0 8px 18px rgba(0, 0, 0, 0.2),
      0 0 0 1px rgba(207, 64, 64, 0.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .kpi-card__status-dot--critical,
  .kpi-card--critical {
    animation: none;
  }
}

/* =========================
   MANAGER WORKSPACE
========================= */

.manager-workspace {
  position: relative;
  margin-top: 4px;
  border: 1px solid #ddd5c6;
  border-radius: 10px;
  background: #f3f0e8;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
  padding: 10px 0 0;
  overflow: hidden;
}

.manager-workspace::before {
  content: "";
  position: absolute;
  top: 56px;
  bottom: 0;
  left: 36px;
  width: 1px;
  background: #c9a7a7;
  opacity: 0.65;
  pointer-events: none;
}

.manager-workspace__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px 8px;
}

.manager-workspace__title-wrap h2 {
  color: #25272a;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.manager-workspace__title-wrap p {
  margin-top: 4px;
  color: #5f6469;
  font-size: 11px;
  line-height: 1.3;
}

.manager-workspace__new {
  height: 28px;
  padding: 0 12px;
  border: 1px solid #ccc3b3;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: #5d6267;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: not-allowed;
  opacity: 0.88;
}

.manager-workspace__list {
  list-style: none;
}

.manager-workspace__row {
  min-height: 54px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto 22px;
  align-items: center;
  column-gap: 10px;
  padding: 0 14px;
  border-top: 1px solid #d8d2c5;
  transition: background-color 160ms ease;
}

.manager-workspace__row:hover {
  background: rgba(255, 255, 255, 0.34);
}

.manager-workspace__marker {
  justify-self: start;
  color: #8c8578;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.manager-workspace__entry {
  min-width: 0;
}

.manager-workspace__entry h3 {
  color: #25272a;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manager-workspace__entry p {
  margin-top: 2px;
  color: #5f6469;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manager-workspace__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 150px;
}

.manager-workspace__meta strong {
  color: #35393f;
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.manager-workspace__meta span {
  margin-top: 2px;
  color: #6b7076;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.manager-workspace__chevron {
  color: #8f8a80;
  font-size: 13px;
  line-height: 1;
  text-align: right;
  transition: color 160ms ease;
}

.manager-workspace__row:hover .manager-workspace__chevron {
  color: #4e555d;
}

.manager-workspace__row--empty:hover {
  background: transparent;
}

.manager-workspace__row--empty .manager-workspace__entry h3,
.manager-workspace__row--empty .manager-workspace__entry p,
.manager-workspace__row--empty .manager-workspace__meta strong,
.manager-workspace__row--empty .manager-workspace__meta span,
.manager-workspace__row--empty .manager-workspace__chevron {
  color: transparent;
}

/* =========================
   ALERT
========================= */

.alert-panel {
  margin-top: 24px;
  min-height: 88px;
  border: 1px solid rgba(207, 64, 64, 0.42);
  background: linear-gradient(90deg, #1c1719, #19161a);
  border-radius: 9px;
  display: grid;
  grid-template-columns: 58px 190px 1fr 150px;
  align-items: center;
  padding: 0 22px;
  gap: 16px;
}

.alert-icon {
  width: 42px;
  height: 42px;
  border: 3px solid var(--core-shipping);
  color: var(--core-shipping);
  clip-path: polygon(50% 0, 100% 90%, 0 90%);
  display: grid;
  place-items: center;
  font-size: 21px;
  font-weight: 900;
  padding-top: 10px;
}

.alert-title strong {
  color: #ff7e7e;
  font-size: 17px;
  font-weight: 900;
}

.alert-message p {
  font-size: 15px;
  line-height: 1.42;
  color: var(--dash-text-2);
}

.alert-panel button {
  height: 46px;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  background: var(--dash-surface-3);
  color: var(--dash-text-1);
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

/* =========================
   CORE OVERVIEW
========================= */

.core-heading {
  margin-top: 2px;
}

.core-grid {
  margin-top: 4px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.core-card {
  min-height: 178px;
  background: var(--dash-surface-1);
  border: 1px solid var(--dash-border);
  border-radius: 9px;
  padding: 10px;
  box-shadow: var(--dash-shadow);
  display: flex;
  flex-direction: column;
}

.core-card.purchasing {
  background: linear-gradient(145deg, rgba(189, 134, 40, 0.2) 0%, rgba(18, 17, 14, 0.95) 100%);
  border-color: rgba(189, 134, 40, 0.32);
  box-shadow: var(--dash-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.core-card.receiving {
  background: linear-gradient(145deg, rgba(63, 139, 97, 0.22) 0%, rgba(12, 18, 15, 0.95) 100%);
  border-color: rgba(63, 139, 97, 0.32);
  box-shadow: var(--dash-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.core-card.inventory {
  background: linear-gradient(145deg, rgba(37, 79, 130, 0.28) 0%, rgba(10, 15, 22, 0.95) 100%);
  border-color: rgba(37, 79, 130, 0.34);
  box-shadow: var(--dash-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.core-card.shipping {
  background: linear-gradient(145deg, rgba(184, 58, 58, 0.2) 0%, rgba(18, 13, 14, 0.95) 100%);
  border-color: rgba(184, 58, 58, 0.32);
  box-shadow: var(--dash-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.core-card.purchasing .core-line,
.core-card.purchasing .core-action {
  border-color: rgba(189, 134, 40, 0.28);
}

.core-card.receiving .core-line,
.core-card.receiving .core-action {
  border-color: rgba(63, 139, 97, 0.28);
}

.core-card.inventory .core-line,
.core-card.inventory .core-action {
  border-color: rgba(37, 79, 130, 0.28);
}

.core-card.shipping .core-line,
.core-card.shipping .core-action {
  border-color: rgba(184, 58, 58, 0.28);
}

.core-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.core-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.core-card h3 {
  font-size: 12px;
  font-weight: 900;
  color: #ffffff;
}

.core-line {
  height: 1px;
  background: var(--dash-border-soft);
  margin: 7px 0 7px 42px;
}

.core-primary {
  margin-left: 42px;
}

.core-primary strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.core-primary p {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--dash-text-2);
}

.core-breakdown {
  margin-top: 6px;
}

.core-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  margin-bottom: 4px;
  color: var(--dash-text-2);
}

.core-row strong {
  text-align: right;
  font-size: 11px;
  font-weight: 800;
  color: var(--dash-text-1);
}

.core-sparkline {
  margin-top: 6px;
  height: 20px;
  border-top: 1px solid var(--dash-border-soft);
  padding-top: 5px;
}

.core-sparkline svg {
  width: 100%;
  height: 100%;
}

.core-sparkline polyline {
  fill: none;
  stroke: rgba(200, 210, 223, 0.6);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.78;
}

.core-card.purchasing .core-primary p,
.core-card.purchasing .core-sparkline polyline,
.core-card.purchasing .core-action a {
  color: var(--core-purchasing);
  stroke: var(--core-purchasing);
}

.core-card.receiving .core-primary p,
.core-card.receiving .core-sparkline polyline,
.core-card.receiving .core-action a {
  color: var(--core-receiving);
  stroke: var(--core-receiving);
}

.core-card.inventory .core-primary p,
.core-card.inventory .core-sparkline polyline,
.core-card.inventory .core-action a {
  color: var(--core-inventory);
  stroke: var(--core-inventory);
}

.core-card.shipping .core-primary p,
.core-card.shipping .core-sparkline polyline,
.core-card.shipping .core-action a {
  color: var(--core-shipping);
  stroke: var(--core-shipping);
}

.core-action {
  border-top: 1px solid var(--dash-border-soft);
  margin-top: auto;
  padding-top: 6px;
}

.core-action a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.core-action span {
  margin-left: 6px;
  font-size: 12px;
}

.purchasing h3 {
  color: #ffffff;
}

.purchasing .core-action a {
  color: var(--core-purchasing);
}

.receiving h3 {
  color: #ffffff;
}

.receiving .core-action a {
  color: var(--core-receiving);
}

.inventory h3 {
  color: #ffffff;
}

.inventory .core-action a {
  color: var(--core-inventory);
}

.shipping h3 {
  color: #ffffff;
}

.shipping .core-action a {
  color: var(--core-shipping);
}

/* =========================
   CORE OVERVIEW ICON SYNC
   Match Quick Access gate colors
========================= */

.core-svg-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.core-svg-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #f6f8fb;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Purchasing */
.purchasing .core-svg-icon {
  background: #23211a;
  border: 1px solid rgba(189, 134, 40, 0.6);
  box-shadow: inset 0 0 14px var(--core-purchasing-soft);
}

.purchasing h3 {
  color: #ffffff;
}

.purchasing .core-action a {
  color: var(--core-purchasing);
}

/* Receiving */
.receiving .core-svg-icon {
  background: #1a261f;
  border: 1px solid rgba(63, 139, 97, 0.6);
  box-shadow: inset 0 0 14px var(--core-receiving-soft);
}

.receiving h3 {
  color: #ffffff;
}

.receiving .core-action a {
  color: var(--core-receiving);
}

/* Inventory */
.inventory .core-svg-icon {
  background: #1f1d2a;
  border: 1px solid rgba(37, 79, 130, 0.62);
  box-shadow: inset 0 0 14px var(--core-inventory-soft);
}

.inventory h3 {
  color: #ffffff;
}

.inventory .core-action a {
  color: var(--core-inventory);
}

/* Shipping */
.shipping .core-svg-icon {
  background: #281b1d;
  border: 1px solid rgba(184, 58, 58, 0.62);
  box-shadow: inset 0 0 14px var(--core-shipping-soft);
}

.shipping h3 {
  color: #ffffff;
}

.shipping .core-action a {
  color: var(--core-shipping);
}
/* =========================
   QUICK ACCESS
========================= */

.quick-access {
  display: none;
}

.quick-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.quick-card {
  height: 128px;
  border-radius: 10px;
  color: var(--dash-text-1);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 34px rgba(0, 0, 0, 0.34);
}

.quick-card strong {
  font-size: 15px;
  font-weight: 900;
}

/* =========================
   QUICK ACCESS GATE CARDS
========================= */

.quick-gate {
  position: relative;
  height: 138px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface-2);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    inset 0 -4px 10px rgba(0, 0, 0, 0.26),
    0 16px 28px rgba(0, 0, 0, 0.3);
}

.quick-gate::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
  z-index: 2;
}

.quick-gate::after {
  content: "";
  position: absolute;
  top: -45%;
  left: -28%;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.01)
  );
  pointer-events: none;
  z-index: 1;
}

.quick-svg-wrap {
  position: relative;
  z-index: 3;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}

.quick-gate.purchasing-q .quick-svg-wrap {
  align-self: center;
  margin-left: auto;
  margin-right: auto;
}

.quick-svg {
  width: 52px;
  height: 52px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.22));
}

.quick-gate strong {
  position: relative;
  z-index: 3;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--dash-text-1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.quick-gate span {
  display: none;
}

.quick-gate:hover {
  transform: translateY(-4px);
}

/* Purchasing — clear canary yellow */
.quick-gate.purchasing-q {
  background: linear-gradient(145deg, #1c1a14 0%, #1a1712 100%);
  border-color: rgba(216, 171, 47, 0.62);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.07),
    inset 0 0 18px var(--core-purchasing-soft),
    0 16px 28px rgba(0, 0, 0, 0.3);
}

/* Receiving — clean operational green */
.quick-gate.receiving-q {
  background: linear-gradient(145deg, #152019 0%, #121b16 100%);
  border-color: rgba(51, 162, 97, 0.62);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.07),
    inset 0 0 18px var(--core-receiving-soft),
    0 16px 28px rgba(0, 0, 0, 0.3);
}

/* Inventory — true violet purple */
.quick-gate.inventory-q {
  background: linear-gradient(145deg, #191729 0%, #161421 100%);
  border-color: rgba(122, 90, 209, 0.62);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.07),
    inset 0 0 18px var(--core-inventory-soft),
    0 16px 28px rgba(0, 0, 0, 0.3);
}

/* Shipping — clear orange */
.quick-gate.shipping-q {
  background: linear-gradient(145deg, #241719 0%, #1f1517 100%);
  border-color: rgba(207, 64, 64, 0.62);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.07),
    inset 0 0 18px var(--core-shipping-soft),
    0 16px 28px rgba(0, 0, 0, 0.3);
}

.quick-gate.purchasing-q strong {
  color: var(--core-purchasing);
}

.quick-gate.receiving-q strong {
  color: var(--core-receiving);
}

.quick-gate.inventory-q strong {
  color: var(--core-inventory);
}

.quick-gate.shipping-q strong {
  color: var(--core-shipping);
}

/* =========================
   FOOTER
========================= */

.dashboard-footer {
  padding: 6px 0 8px;
  text-align: center;
  font-size: 11px;
  color: var(--dash-text-3);
}

/* =========================
   RESPONSIVE CONTROL
========================= */

@media (max-width: 1280px) {
  .dashboard-sidebar {
    position: static;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--dash-border-soft);
  }

  .dashboard-content-wrap {
    margin-left: 0;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-ai-ambient {
    min-height: 106px;
    margin-top: 10px;
  }

  .dashboard-shell .dashboard-header {
    flex-direction: column;
    gap: 8px;
  }

  .dashboard-shell .header-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .dashboard-shell .weather-block {
    min-width: 112px;
    gap: 8px;
  }

  .ghost-hero {
    grid-template-columns: 20% minmax(0, 80%);
    gap: 12px;
  }

  .ghost-hero__left {
    padding-right: 0;
    border-right: 1px solid var(--dash-border-soft);
    border-bottom: none;
    padding-bottom: 0;
    align-items: center;
  }

  .ghost-hero__image {
    min-height: 180px;
  }

  .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .core-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-workspace__row {
    grid-template-columns: 40px minmax(0, 1fr);
    row-gap: 4px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .manager-workspace__meta,
  .manager-workspace__chevron {
    grid-column: 2;
    justify-self: start;
    align-items: flex-start;
    min-width: 0;
  }

  .manager-workspace__chevron {
    display: none;
  }

}

@media (max-width: 860px) {
  .sidebar-ai-ambient {
    display: none;
  }

  .dashboard-shell .header-center {
    width: 100%;
    justify-content: flex-start;
    height: auto;
  }

  .talk-to-ghost-button {
    min-width: 140px;
  }

  .ghost-briefing-grid,
  .ghost-briefing-grid[data-card-count="2"] {
    grid-template-columns: 1fr;
  }

  .kpi-row,
  .core-grid {
    grid-template-columns: 1fr;
  }

  .manager-workspace::before {
    left: 30px;
  }

  .manager-workspace__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .manager-workspace__entry h3,
  .manager-workspace__entry p {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}
/* =========================
   DARK MODE
========================= */

body.dark-mode {
  color: #f6f8fb;
  background:
    radial-gradient(circle at 16% -8%, rgba(255, 255, 255, 0.06), transparent 34%),
    linear-gradient(180deg, #07090c 0%, #0d1015 100%);
}

body.dark-mode .dashboard-main {
  background: transparent;
}

body.dark-mode .section-heading p,
body.dark-mode .glance-card p,
body.dark-mode .glance-card span,
body.dark-mode .core-row span {
  color: #c6ced8;
}

body.dark-mode .glance-panel,
body.dark-mode .core-card {
  background: #171b22;
  border-color: #2f3845;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36);
}

body.dark-mode .glance-card {
  border-right-color: #2f3845;
}

body.dark-mode .capacity-ring::after {
  background: #141922;
}

body.dark-mode .alert-panel {
  background: linear-gradient(90deg, #22171a, #1d1518);
  border-color: rgba(207, 64, 64, 0.54);
}

body.dark-mode .alert-panel button {
  background: #1b212a;
  color: #f6f8fb;
  border-color: #354050;
}

body.dark-mode .core-line,
body.dark-mode .core-action {
  border-color: #2f3845;
}

body.dark-mode .core-line {
  background: #2f3845;
}

body.dark-mode .dashboard-footer {
  color: #9ea7b3;
}
body.dark-mode .outlook-panel {
  background: #171b22;
  border-color: #2f3845;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36);
}

body.dark-mode .outlook-card {
  border-right-color: #2f3845;
}

body.dark-mode .outlook-desc,
body.dark-mode .outlook-metric span,
body.dark-mode .outlook-metric small,
body.dark-mode .advisory-list p {
  color: #c6ced8;
}

body.dark-mode .outlook-note {
  background: #1a212b;
  color: #e4e9ef;
}
body.dark-mode .manager-workspace {
  border-color: #ddd5c6;
  background: #f3f0e8;
}

/* =========================================================
   ROUTIQ SHARED AI PILL BUTTON
   Purchasing Core First Implementation
========================================================= */

.ai-pill-control {
  display: flex;
  min-width: 320px;
  min-height: 70px;

  align-items: center;
  justify-content: center;
  gap: 14px;

  overflow: visible;
}


/* ---------------------------------------------------------
   AI Assistant label
--------------------------------------------------------- */

.ai-pill-control__role {
  color:
    rgba(255, 255, 255, 0.58);

  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;

  text-transform: uppercase;
  white-space: nowrap;

  pointer-events: none;
  user-select: none;
}


/* ---------------------------------------------------------
   Pill button foundation
--------------------------------------------------------- */

.ai-pill-button {
  --ai-pill-accent: #d5a63d;
  --ai-pill-accent-light: #f4cf73;
  --ai-pill-accent-rgb: 213, 166, 61;

  position: relative;

  display: inline-flex;

  min-width: 190px;
  height: 58px;

  align-items: center;
  gap: 13px;

  padding:
    5px 22px
    5px 7px;

  overflow: hidden;

  color: #f5f5f2;

  background:
    linear-gradient(
      145deg,
      rgba(23, 24, 23, 0.99),
      rgba(6, 7, 7, 0.99)
    );

  border:
    1px solid
    rgba(
      var(--ai-pill-accent-rgb),
      0.74
    );

  border-radius: 999px;

  box-shadow:
    0 7px 18px
      rgba(0, 0, 0, 0.32),

    0 0 0
      rgba(
        var(--ai-pill-accent-rgb),
        0
      ),

    inset 0 1px 0
      rgba(255, 255, 255, 0.1);

  appearance: none;
  outline: none;

  cursor: pointer;

  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}


/* ---------------------------------------------------------
   Purchasing signature
--------------------------------------------------------- */

.ai-pill-button--purchasing {
  --ai-pill-accent: #d5a63d;
  --ai-pill-accent-light: #f4cf73;
  --ai-pill-accent-rgb: 213, 166, 61;
}

/* ---------------------------------------------------------
   Receiving signature
--------------------------------------------------------- */

.ai-pill-button--receiving {
  --ai-pill-accent: #3f8b61;
  --ai-pill-accent-light: #83c99a;
  --ai-pill-accent-rgb: 63, 139, 97;
}


/* ---------------------------------------------------------
   Robot avatar
--------------------------------------------------------- */

.ai-pill-button__avatar {
  position: relative;

  display: grid;

  width: 46px;
  height: 46px;

  flex:
    0 0 46px;

  place-items: center;

  background:
    linear-gradient(
      145deg,
      #171918,
      #050606
    );

  border:
    2px solid
    var(--ai-pill-accent);

  border-radius: 14px;

  box-shadow:
    inset 0 0 12px
      rgba(
        var(--ai-pill-accent-rgb),
        0.13
      ),

    0 0 8px
      rgba(
        var(--ai-pill-accent-rgb),
        0.15
      );

  pointer-events: none;
  user-select: none;

  transition:
    transform 180ms ease,
    filter 180ms ease,
    box-shadow 180ms ease;
}


/* ---------------------------------------------------------
   Antenna
--------------------------------------------------------- */

.ai-pill-button__antenna {
  position: absolute;

  top: 2px;
  left: 50%;

  width: 2px;
  height: 6px;

  background:
    var(--ai-pill-accent);

  transform:
    translateX(-50%);
}

.ai-pill-button__antenna::before {
  position: absolute;

  top: -2px;
  left: 50%;

  width: 5px;
  height: 5px;

  background:
    var(--ai-pill-accent-light);

  border-radius: 50%;

  box-shadow:
    0 0 7px
      rgba(
        var(--ai-pill-accent-rgb),
        0.82
      );

  content: "";

  transform:
    translateX(-50%);
}


/* ---------------------------------------------------------
   Robot screen and eyes
--------------------------------------------------------- */

.ai-pill-button__screen {
  position: relative;

  display: flex;

  width: 30px;
  height: 22px;

  align-items: center;
  justify-content: center;

  gap: 8px;

  background: #030404;

  border:
    1px solid
    rgba(
      var(--ai-pill-accent-rgb),
      0.72
    );

  border-radius: 8px;
}

.ai-pill-button__eye {
  display: block;

  width: 4px;
  height: 10px;

  background: #f5f7f5;

  border-radius: 999px;

  box-shadow:
    0 0 5px
      rgba(255, 255, 255, 0.46);

  transform-origin: center;
}


/* ---------------------------------------------------------
   Q logo
--------------------------------------------------------- */

.ai-pill-button__q {
  position: absolute;

  bottom: 2px;
  left: 50%;

  color:
    var(--ai-pill-accent);

  font-size: 0.48rem;
  font-weight: 900;
  line-height: 1;

  text-shadow:
    0 0 6px
      rgba(
        var(--ai-pill-accent-rgb),
        0.55
      );

  transform:
    translateX(-50%);
}


/* ---------------------------------------------------------
   Button text
--------------------------------------------------------- */

.ai-pill-button__copy {
  display: inline-flex;

  align-items: baseline;
  gap: 5px;

  font-size: 0.86rem;
  font-weight: 720;
  letter-spacing: 0.01em;
  line-height: 1;

  white-space: nowrap;

  pointer-events: none;
  user-select: none;
}

.ai-pill-button__name {
  color:
    var(--ai-pill-accent-light);
}


/* ---------------------------------------------------------
   Online indicator
--------------------------------------------------------- */

.ai-pill-button__status {
  position: absolute;

  top: 5px;
  right: 8px;

  width: 7px;
  height: 7px;

  background: #72d08e;

  border:
    2px solid
    #151715;

  border-radius: 50%;

  box-shadow:
    0 0 7px
      rgba(114, 208, 142, 0.72);

  pointer-events: none;
}


/* ---------------------------------------------------------
   Hover
--------------------------------------------------------- */

.ai-pill-button:hover {
  border-color:
    var(--ai-pill-accent-light);

  box-shadow:
    0 9px 22px
      rgba(0, 0, 0, 0.4),

    0 0 18px
      rgba(
        var(--ai-pill-accent-rgb),
        0.34
      ),

    inset 0 1px 0
      rgba(255, 255, 255, 0.14);

  transform:
    translateY(-2px)
    scale(1.025);
}

.ai-pill-button:hover
.ai-pill-button__avatar {
  filter:
    brightness(1.08);

  box-shadow:
    inset 0 0 15px
      rgba(
        var(--ai-pill-accent-rgb),
        0.19
      ),

    0 0 12px
      rgba(
        var(--ai-pill-accent-rgb),
        0.31
      );

  transform:
    scale(1.04);
}


/* ---------------------------------------------------------
   Keyboard focus
--------------------------------------------------------- */

.ai-pill-button:focus-visible {
  border-color:
    var(--ai-pill-accent-light);

  box-shadow:
    0 0 0 3px
      rgba(
        var(--ai-pill-accent-rgb),
        0.24
      ),

    0 9px 22px
      rgba(0, 0, 0, 0.4),

    0 0 18px
      rgba(
        var(--ai-pill-accent-rgb),
        0.28
      );
}


/* ---------------------------------------------------------
   Click
--------------------------------------------------------- */

.ai-pill-button:active {
  box-shadow:
    0 4px 11px
      rgba(0, 0, 0, 0.35),

    0 0 10px
      rgba(
        var(--ai-pill-accent-rgb),
        0.22
      ),

    inset 0 2px 5px
      rgba(0, 0, 0, 0.3);

  transform:
    translateY(0)
    scale(0.97);
}


/* ---------------------------------------------------------
   Animation
--------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .ai-pill-button__eye {
    animation:
      aiPillEyeBlink
      6s
      infinite;
  }

  .ai-pill-button__status {
    animation:
      aiPillStatusPulse
      2.8s
      ease-in-out
      infinite;
  }
}

@keyframes aiPillEyeBlink {
  0%,
  45%,
  48%,
  100% {
    transform:
      scaleY(1);
  }

  46%,
  47% {
    transform:
      scaleY(0.12);
  }
}

@keyframes aiPillStatusPulse {
  0%,
  100% {
    opacity: 0.72;

    box-shadow:
      0 0 5px
        rgba(114, 208, 142, 0.5);
  }

  50% {
    opacity: 1;

    box-shadow:
      0 0 10px
        rgba(114, 208, 142, 0.88);
  }
}


/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */

@media (max-width: 1100px) {
  .ai-pill-control {
    min-width: 235px;
  }

  .ai-pill-control__role {
    display: none;
  }

  .ai-pill-button {
    min-width: 174px;
  }
}

@media (max-width: 820px) {
  .ai-pill-control {
    min-width: auto;
  }

  .ai-pill-button {
    min-width: 54px;
    width: 54px;

    padding: 5px;
  }

  .ai-pill-button__copy {
    display: none;
  }
}

/* =========================================================
   AI PILL BUTTON — TEXT ONLY VERSION
========================================================= */

.ai-pill-button--text-only {
  min-width: 180px;
  height: 54px;

  justify-content: center;

  gap: 0;

  padding:
    0 30px;
}

.ai-pill-button__copy--solo {
  display: block;

  color:
    var(--ai-pill-accent-light);

  font-size: 0.9rem;
  font-weight: 760;
  letter-spacing: 0.015em;
  line-height: 1;

  text-align: center;
}


/* Text-only responsive behavior */

@media (max-width: 820px) {
  .ai-pill-button--text-only {
    min-width: 150px;
    width: auto;

    padding:
      0 22px;
  }

  .ai-pill-button--text-only
  .ai-pill-button__copy--solo {
    display: block;
  }
}