/* Thin Vantage shell header on product sim + admin pages */
.v-sim-bar {
  flex-shrink: 0;
  background: var(--surface, #ffffff);
  border-bottom: 1px solid var(--border, #e5e5e5);
  color: var(--text, #171717);
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  z-index: 200;
}

.v-sim-bar__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  padding: 0.45rem 1rem;
  max-width: 100%;
}

.v-sim-bar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--text, #171717);
  font-family: var(--v-font-display, "Spectral", "Source Serif Pro", Georgia, serif);
  font-weight: 400;
  font-size: 0.98rem;
  letter-spacing: -0.015em;
}

.v-sim-bar__brand img,
.v-sim-bar__mark,
.v-sim-bar__brand .v-logo__mark {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
  color: var(--v-brand-teal, #1375d9);
}

.v-sim-bar__brand-platform {
  font-weight: 700;
}

.v-sim-bar__brand-offering {
  font-weight: 650;
  color: color-mix(in srgb, var(--text, #171717) 82%, var(--accent, #2563eb));
}

.v-sim-bar__brand-offering::before {
  content: "·";
  margin: 0 0.28em;
  font-weight: 400;
  color: var(--muted, #737373);
}

.v-sim-bar__nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
  padding: 0.15rem;
  background: color-mix(in srgb, var(--bg, #fafafa) 88%, var(--surface, #fff));
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 999px;
}

.v-sim-bar__nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 2rem;
  padding: 0.34rem 0.78rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  color: var(--muted, #525252);
  white-space: nowrap;
}

.v-sim-bar__nav a:hover {
  color: var(--text, #171717);
  background: color-mix(in srgb, var(--border, #e5e5e5) 28%, transparent);
}

.v-sim-bar__nav a.is-active {
  color: var(--v-white, #fff);
  background: var(--v-brand-teal, #1375d9);
}

[data-theme="dark"] .v-sim-bar__nav a.is-active {
  color: #0b1220;
}

.v-sim-bar__product {
  margin-left: auto;
  color: var(--text, #171717);
  white-space: normal;
  text-align: right;
}

.v-sim-bar__product a {
  color: inherit;
  text-decoration: none;
}

.v-sim-bar__product a:hover {
  text-decoration: none;
}

.v-sim-bar__product a:hover .v-sim-bar__product-name {
  text-decoration: underline;
}

.v-sim-bar__product--stacked a {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.12rem;
  max-width: min(100%, 20rem);
}

.v-sim-bar__product-name {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.v-sim-bar__product-tagline {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--muted, #525252);
  letter-spacing: -0.01em;
}

.v-sim-bar__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: auto;
}

.v-sim-bar__version {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted, #525252);
  white-space: nowrap;
  line-height: 1;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border, #e5e5e5);
  background: color-mix(in srgb, var(--surface, #fff) 92%, var(--bg, #fafafa));
}

.theme-toggle.theme-toggle--bar {
  appearance: none;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border, #e5e5e5);
  background: var(--surface, #ffffff);
  color: var(--text, #171717);
  flex-shrink: 0;
  cursor: pointer;
  box-sizing: border-box;
}

.theme-toggle.theme-toggle--bar:hover {
  filter: brightness(1.04);
}

.theme-toggle.theme-toggle--bar .theme-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.theme-toggle.theme-toggle--bar .theme-icon svg {
  display: block;
  stroke: currentColor;
}

[data-theme="light"] .theme-toggle.theme-toggle--bar .theme-icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle.theme-toggle--bar .theme-icon-moon {
  display: none;
}

body:not([data-theme]) .theme-toggle.theme-toggle--bar .theme-icon-sun {
  display: none;
}

.v-sim-bar__actions .vantage-identity-menu--sim {
  margin: 0;
}

.v-sim-bar__actions .vantage-identity-menu .vantage-identity__trigger {
  appearance: none;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border, #e5e5e5);
  background: var(--surface, #ffffff);
  color: var(--text, #171717);
  flex-shrink: 0;
  cursor: pointer;
  box-sizing: border-box;
  line-height: 0;
}

.v-sim-bar__actions .vantage-identity-menu .vantage-identity__trigger:hover {
  filter: brightness(1.04);
}

.v-sim-bar__actions .vantage-identity-menu .vantage-identity__trigger svg {
  display: block;
  stroke: currentColor;
}

.v-sim-bar__actions .vantage-identity-menu .vantage-identity__dot {
  border-color: var(--surface, #ffffff);
}

.v-sim-bar__action-btn {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.34rem 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
}

.v-sim-bar__product--named {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.v-sim-bar__product-sep {
  opacity: 0.55;
  margin: 0 0.2rem;
  font-weight: 500;
}

body:has(.v-sim-bar) .slack-app {
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

body:has(.v-sim-bar):has(.admin-wrap) {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}

body:has(.v-sim-bar):has(.admin-wrap) .admin-wrap {
  flex: 1;
  min-height: 0;
}

/* Sim sidebar — light theme grey band (replaces legacy purple) */
body:has(.v-sim-bar)[data-theme="light"] .slack-sidebar {
  background: linear-gradient(180deg, #ececec 0%, #e0e0e0 100%);
  color: #1a1a1a;
  border-right-color: #c8c8c8;
}

body:has(.v-sim-bar)[data-theme="light"] .slack-sidebar-top,
body:has(.v-sim-bar)[data-theme="light"] .slack-workspace {
  border-bottom-color: #c8c8c8;
}

body:has(.v-sim-bar)[data-theme="light"] .slack-sidebar .theme-toggle.theme-toggle--sidebar {
  border-color: #c8c8c8;
  background: #fafafa;
  color: #1a1a1a;
}

body:has(.v-sim-bar)[data-theme="light"] .slack-sidebar .app-version-badge--sidebar,
body:has(.v-sim-bar)[data-theme="light"] .slack-sidebar .app-version-badge.app-version-badge--sidebar {
  color: #404040;
  text-shadow: none;
}

body:has(.v-sim-bar)[data-theme="light"] .slack-nav-title {
  color: #404040;
  opacity: 1;
}

body:has(.v-sim-bar)[data-theme="light"] .slack-nav-item {
  color: #1a1a1a;
}

body:has(.v-sim-bar)[data-theme="light"] .slack-nav-item.active {
  background: rgba(255, 255, 255, 0.55);
  border-radius: 6px;
}

body:has(.v-sim-bar)[data-theme="light"] .slack-brand.slack-brand--product .slack-brand-product {
  color: #1a1a1a;
}

body:has(.v-sim-bar)[data-theme="light"] .slack-brand.slack-brand--product .slack-brand-tagline {
  color: #404040;
  border-top-color: #c8c8c8;
}

body:has(.v-sim-bar)[data-theme="light"] .slack-history-empty,
body:has(.v-sim-bar)[data-theme="light"] .slack-history-item-meta,
body:has(.v-sim-bar)[data-theme="light"] .slack-history-scope {
  color: #404040;
  opacity: 1;
}

body:has(.v-sim-bar)[data-theme="light"] .slack-history-item {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(0, 0, 0, 0.08);
}

body:has(.v-sim-bar)[data-theme="light"] .slack-history-item-title {
  color: #1a1a1a;
}

body:has(.v-sim-bar)[data-theme="light"] .slack-history-clear-btn {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.5);
  color: #1a1a1a;
}

body:has(.v-sim-bar)[data-theme="light"] .slack-history-clear-btn:hover {
  background: rgba(255, 255, 255, 0.82);
}

body:has(.v-sim-bar)[data-theme="light"] .slack-history-pdf-btn {
  border-color: rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: #1a1a1a;
}

body:has(.v-sim-bar)[data-theme="light"] .slack-history-pdf-btn:hover {
  background: #fff;
}

/* Sim sidebar — dark theme grey band (replaces legacy purple) */
body:has(.v-sim-bar)[data-theme="dark"] .slack-sidebar {
  background: linear-gradient(180deg, #3a3a3a 0%, #2c2c2c 100%);
  color: #f5f5f5;
  border-right-color: #525252;
}

body:has(.v-sim-bar)[data-theme="dark"] .slack-sidebar-top,
body:has(.v-sim-bar)[data-theme="dark"] .slack-workspace {
  border-bottom-color: #525252;
}

body:has(.v-sim-bar)[data-theme="dark"] .slack-sidebar .theme-toggle.theme-toggle--sidebar {
  border-color: #525252;
  background: #404040;
  color: #f5f5f5;
}

body:has(.v-sim-bar)[data-theme="dark"] .slack-sidebar .app-version-badge--sidebar,
body:has(.v-sim-bar)[data-theme="dark"] .slack-sidebar .app-version-badge.app-version-badge--sidebar {
  color: #d4d4d4;
  text-shadow: none;
}

body:has(.v-sim-bar)[data-theme="dark"] .slack-nav-title {
  color: #a3a3a3;
  opacity: 1;
}

body:has(.v-sim-bar)[data-theme="dark"] .slack-nav-item {
  color: #f5f5f5;
}

body:has(.v-sim-bar)[data-theme="dark"] .slack-nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

body:has(.v-sim-bar)[data-theme="dark"] .slack-brand.slack-brand--product .slack-brand-product,
body:has(.v-sim-bar)[data-theme="dark"] .slack-brand.slack-brand--product .slack-brand-tagline,
body:has(.v-sim-bar)[data-theme="dark"] .slack-brand.slack-brand--product .slack-brand-name,
body:has(.v-sim-bar)[data-theme="dark"] .slack-brand.slack-brand--product .slack-brand-sub {
  color: #f5f5f5;
  border-top-color: #525252;
  opacity: 1;
}

body:has(.v-sim-bar)[data-theme="dark"] .slack-brand.slack-brand--product .slack-brand-tagline {
  color: #d4d4d4;
}

body:has(.v-sim-bar)[data-theme="dark"] .slack-history-empty,
body:has(.v-sim-bar)[data-theme="dark"] .slack-history-item-meta,
body:has(.v-sim-bar)[data-theme="dark"] .slack-history-scope {
  color: #a3a3a3;
  opacity: 1;
}

body:has(.v-sim-bar)[data-theme="dark"] .slack-history-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

body:has(.v-sim-bar)[data-theme="dark"] .slack-history-item-title {
  color: #f5f5f5;
}

body:has(.v-sim-bar)[data-theme="dark"] .slack-history-clear-btn {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f5;
}

body:has(.v-sim-bar)[data-theme="dark"] .slack-history-pdf-btn {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #f5f5f5;
}

@media (max-width: 720px) {
  .v-sim-bar__inner {
    padding: 0.35rem 0.65rem;
    gap: 0.35rem 0.45rem;
    align-items: center;
  }

  /* Sim pages: drop offering nav row — sidebar + brand link still reach hub */
  body[data-product] .v-sim-bar__nav {
    display: none;
  }

  .v-sim-bar__brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .v-sim-bar__nav {
    order: 4;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, #000 92%, transparent);
  }

  .v-sim-bar__nav::-webkit-scrollbar {
    display: none;
  }

  .v-sim-bar__nav a {
    flex: 0 0 auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.78rem;
    font-size: 0.8125rem;
  }

  .v-sim-bar__product,
  .v-sim-bar__product--stacked {
    display: none;
  }

  .v-sim-bar__actions {
    order: 3;
    margin-left: auto;
  }

  .v-sim-bar__inner > .v-guide-popover,
  .v-sim-bar__inner > .vantage-identity,
  .v-sim-bar__actions .v-guide-popover,
  .v-sim-bar__actions .vantage-identity {
    flex: 0 0 auto;
  }

  /* Admin mobile: plain shell, keep product label visible */
  body:has(.admin-wrap)[data-product] .v-sim-bar {
    background: var(--surface, #fff);
    border-bottom: 1px solid var(--border, #e5e5e5);
    box-shadow: none;
  }

  body:has(.admin-wrap)[data-product] .v-sim-bar__product,
  body:has(.admin-wrap)[data-product] .v-sim-bar__product--stacked {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 0.35rem;
    text-align: right;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--text, #171717);
  }

  body:has(.admin-wrap)[data-product] .v-sim-bar__product a {
    color: inherit;
    font-weight: 800;
  }

  body:has(.admin-wrap)[data-product] .v-sim-bar__product-sep {
    opacity: 0.45;
    margin-inline: 0.15rem;
  }
}
