/* =============================================================================
   OrganicSystem — Module hub workspace (Farm / Facility / Settings home)
   Enterprise welcome surface. Presentation only; does not own scroll chrome.
   ============================================================================= */

body.os-module-shell .module-main-page--shell-nav {
  display: flex;
  flex-direction: column;
  gap: var(--os-hub-gap);
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  padding: 0.85rem 1rem 1.25rem;
  background:
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--os-hub-workspace-bg) 92%, var(--os-color-surface) 8%) 0%,
      var(--os-hub-workspace-bg) 48%,
      color-mix(in srgb, var(--os-hub-workspace-bg) 90%, var(--os-color-surface-muted) 10%) 100%
    );
  box-sizing: border-box;
}

/* Hub title strip — roomier than the cramped global title-bar card */
body.os-module-shell .module-main-page--shell-nav > .module-main-header {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.85rem 1.1rem;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: visible;
  background: var(--os-hub-header-bg);
  border: 1px solid var(--os-hub-header-border);
  border-radius: var(--os-hub-radius);
  border-inline-start: 3px solid var(--os-hub-accent-bar);
  box-shadow: var(--os-hub-panel-shadow);
  display: flex;
  align-items: center;
}

body.os-module-shell .module-main-page--shell-nav > .module-main-header > .d-flex.justify-content-between.align-items-center {
  width: 100%;
  min-height: 0;
  flex-wrap: wrap !important;
  gap: 0.65rem 1rem;
  align-items: center;
}

body.os-module-shell .module-main-page--shell-nav .module-main-header-title-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-width: 0;
}

body.os-module-shell .module-main-page--shell-nav .module-main-header-title-row > h1,
body.os-module-shell .module-main-page--shell-nav .module-main-header-title-row > .h3 {
  margin: 0;
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: clamp(1.25rem, 1.1rem + 0.4vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--os-hub-title);
}

body.os-module-shell .module-main-page--shell-nav .module-main-header-subtitle,
body.os-module-shell .module-main-page--shell-nav .module-main-header-subtitle.text-muted {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--os-hub-muted) !important;
}

body.os-module-shell .module-main-page--shell-nav .module-main-header-actions {
  margin-left: auto;
  gap: 0.5rem;
}

/* Guidance / empty-state workspace panel */
body.os-module-shell .module-main-page--shell-nav .module-main-shell-hint {
  flex: 1 1 auto;
  min-height: 14rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 2rem;
  text-align: center;
}

body.os-module-shell .module-main-page--shell-nav .os-hub-empty {
  width: min(100%, 28rem);
  margin: 0 auto;
  padding: 1.75rem 1.5rem 1.85rem;
  background: var(--os-hub-panel-bg);
  border: 1px solid var(--os-hub-panel-border);
  border-radius: calc(var(--os-hub-radius) + 0.1rem);
  box-shadow: var(--os-hub-panel-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

body.os-module-shell .module-main-page--shell-nav .os-hub-empty__icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--os-hub-icon-bg);
  color: var(--os-hub-icon-color);
  margin-bottom: 0.15rem;
}

body.os-module-shell .module-main-page--shell-nav .os-hub-empty__icon .bi {
  font-size: 1.45rem;
  line-height: 1;
}

body.os-module-shell .module-main-page--shell-nav .os-hub-empty__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--os-hub-muted);
}

body.os-module-shell .module-main-page--shell-nav .os-hub-empty__title {
  margin: 0;
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--os-hub-title);
  max-width: 22rem;
}

body.os-module-shell .module-main-page--shell-nav .os-hub-empty__text,
body.os-module-shell .module-main-page--shell-nav .os-hub-empty__text.text-muted {
  margin: 0;
  max-width: 22rem;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--os-hub-muted) !important;
}

@media (max-width: 991.98px) {
  body.os-module-shell .module-main-page--shell-nav {
    padding: 0.65rem 0.75rem 1rem;
    gap: 0.85rem;
  }

  body.os-module-shell .module-main-page--shell-nav > .module-main-header {
    padding: 0.75rem 0.9rem;
  }

  body.os-module-shell .module-main-page--shell-nav .module-main-shell-hint {
    min-height: 11rem;
    padding: 1rem 0.5rem 1.25rem;
  }

  body.os-module-shell .module-main-page--shell-nav .os-hub-empty {
    padding: 1.35rem 1.1rem 1.45rem;
  }
}

@media (max-width: 575.98px) {
  body.os-module-shell .module-main-page--shell-nav .module-main-header-title-row > h1,
  body.os-module-shell .module-main-page--shell-nav .module-main-header-title-row > .h3 {
    font-size: 1.2rem;
  }

  body.os-module-shell .module-main-page--shell-nav .module-main-header-actions {
    margin-left: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  body.os-module-shell .module-main-page--shell-nav > .module-main-header,
  body.os-module-shell .module-main-page--shell-nav .os-hub-empty {
    transition: border-color 160ms ease, box-shadow 160ms ease;
  }
}
