:root {
  --bg-top: #111722;
  --bg-bottom: #0b1018;
  --panel: rgba(17, 24, 36, 0.94);
  --panel-soft: rgba(10, 17, 29, 0.90);
  --panel-border: rgba(138, 180, 255, 0.16);
  --panel-strong: rgba(138, 180, 255, 0.26);
  --text-main: #eef4ff;
  --text-muted: #a9b8cf;
  --text-faint: #7e90ab;
  --accent: #8ab4ff;
  --accent-soft: rgba(138, 180, 255, 0.12);
  --success-soft: rgba(84, 208, 154, 0.16);
  --success-text: #8de4bc;
  --warning-soft: rgba(255, 181, 76, 0.16);
  --warning-text: #ffca7f;
  --danger-soft: rgba(255, 108, 108, 0.14);
  --danger-text: #ff9b9b;
  --shadow-lg: 0 18px 42px rgba(0, 0, 0, 0.34);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(138, 180, 255, 0.08), transparent 28%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  color: var(--text-main);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.page-hero.inventory-surface-hero {
  position: relative;
  margin-bottom: 18px;
  padding: 0;
  border-radius: var(--radius-xl);
  border: 1px solid var(--panel-strong);
  background:
    radial-gradient(circle at 18% 16%, rgba(138, 180, 255, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(17, 24, 36, 0.97) 0%, rgba(7, 14, 25, 0.98) 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.page-hero.inventory-surface-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(138, 180, 255, 0.05), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 24%);
  pointer-events: none;
}

.page-hero .hero-copy {
  position: relative;
  z-index: 1;
  padding: 26px 28px 24px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.page-hero .hero-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 14px;
}

.page-hero .hero-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
  margin-top: 2px;
  flex: 0 0 auto;
}

.page-hero .hero-title-block {
  min-width: 0;
}

.page-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-hero h1 {
  margin: 14px 0 0;
  font-size: clamp(2.45rem, 4vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.page-hero .hero-sub {
  margin: 0;
  color: var(--text-muted);
  max-width: 920px;
  line-height: 1.55;
  font-size: 1.04rem;
}

.page-hero .hero-chip-wrap {
  display: flex;
  justify-content: flex-end;
  align-self: start;
}

.page-hero .hero-chip {
  min-width: 240px;
  padding: 18px 20px;
  background: rgba(8, 18, 34, 0.82);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.page-hero .hero-chip-label {
  color: var(--text-faint);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.page-hero .hero-chip-value {
  margin-top: 10px;
  font-size: 1.05rem;
  font-weight: 700;
}

.kpi-grid,
.surface-kpi-row,
.page-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.kpi-card,
.surface-kpi-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 16px 18px;
}

.kpi-label {
  color: var(--text-faint);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi-value {
  margin-top: 10px;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.05;
}

.kpi-note {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.kpi-card-warning {
  border-color: rgba(255, 181, 76, 0.26);
}

@media (max-width: 1360px) {
  .kpi-grid,
  .surface-kpi-row,
  .page-kpi-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 820px) {
  body { padding: 14px; }

  .page-hero .hero-copy {
    padding: 22px 18px 20px;
  }

  .page-hero .hero-brand {
    grid-template-columns: auto 1fr;
  }

  .page-hero .hero-chip-wrap {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .kpi-grid,
  .surface-kpi-row,
  .page-kpi-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 560px) {
  .page-hero .hero-brand {
    grid-template-columns: 1fr;
  }

  .page-hero .hero-icon {
    width: 56px;
    height: 56px;
    margin-top: 0;
  }

  .page-hero h1 {
    font-size: 2.1rem;
  }

  .kpi-grid,
  .surface-kpi-row,
  .page-kpi-grid {
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   INVENTORY SURFACE NAVIGATION STRIP
   Shared cross-surface jump bar for Inventory Intelligence
   ========================================================= */

.surface-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
  padding: 0;
}

.surface-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(138, 180, 255, 0.16);
  background: rgba(138, 180, 255, 0.07);
  color: #b8c6dc;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.surface-nav-link:hover {
  background: rgba(138, 180, 255, 0.12);
  border-color: rgba(138, 180, 255, 0.28);
  color: #eef4ff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.surface-nav-link.active {
  background: linear-gradient(180deg, rgba(138, 180, 255, 0.22), rgba(138, 180, 255, 0.14));
  border-color: rgba(138, 180, 255, 0.38);
  color: #eef4ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.surface-nav-link:focus-visible {
  outline: 2px solid rgba(138, 180, 255, 0.55);
  outline-offset: 2px;
}