/* --- User menu dropdown in header v2 ------------------------------- */
.ds-header-user .ds-user-chip-toggle {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #d9d2c0 !important;
  padding: 5px 14px !important;
  border-radius: 999px !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ds-header-user .ds-user-chip-toggle:hover,
.ds-header-user .ds-user-chip-toggle:focus {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
}
.ds-header-user .ds-user-chip-toggle::after {
  margin-left: 8px;
  opacity: 0.7;
}
.ds-header-user .dropdown-menu {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  min-width: 200px;
}
.ds-header-user .dropdown-item {
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--ds-ink);
}
.ds-header-user .dropdown-item:hover {
  background: var(--ds-parchment-mid);
}
.ds-user-email {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

/* --- Impersonation banner ----------------------------------------- */
.ds-impersonation-banner:empty {
  display: none;
}
.ds-impersonation-banner .ds-impersonation-alert {
  border-radius: 0;
  border-left: none;
  border-right: none;
  padding: 10px 28px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 0.92rem;
}

/* --- Header v2 (split workspace bar) -------------------------------- */
/* Two stacked rows: a top strip with brand-chip centered + user menu
 * right, and a pill-tab nav row below. Replaces the old dbc.Navbar.
 * Deliberately understated: brand is small and the nav lives below
 * the brand as horizontal pills, leaving the document content as the
 * primary surface on the page. */
.ds-header-v2 {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 14px 28px 10px;
  /* Lighter blue pulled from the logo's mid-tone — gradient runs
   * from the brightest streak in the artwork down to a slightly
   * deeper companion so the chrome still has subtle depth. */
  background: linear-gradient(180deg, #3a6ca8 0%, #2d5689 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 18px;
}
.ds-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}
/* Centered brand lockup: "ASHWELL by [logo]" as a single horizontal
 * group. A spacer on the left mirrors the user-status block's flex
 * weight on the right so the lockup stays optically centered. */
.ds-header-top::before {
  content: "";
  flex: 1 1 0;
  min-width: 0;
}
.ds-brand-lockup {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  padding: 4px 6px;
  border-radius: 6px;
  transition: opacity 0.15s ease;
}
.ds-brand-lockup:hover {
  opacity: 0.92;
}
.ds-wordmark {
  font-family: 'Cormorant Garamond', 'Palatino Linotype', Palatino, Georgia, serif;
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: 0.32em;
  color: #f3eddc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  padding-left: 0.32em;            /* offset letter-spacing's right-edge gap so "ASHWELL" sits centered inside the lockup */
  user-select: none;
  line-height: 1;
}
.ds-wordmark-by {
  font-family: 'Cormorant Garamond', 'Palatino Linotype', Palatino, Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 0.95rem;
  color: rgba(243, 237, 220, 0.7);
  letter-spacing: 0.04em;
  user-select: none;
  line-height: 1;
  margin: 0 2px;
}
.ds-brand-mark {
  height: 26px;
  width: auto;
  display: block;
}
.ds-header-user {
  flex: 1 1 0;
  justify-content: flex-end;
  min-width: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.ds-header-user a,
.ds-header-user .btn {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: #d9d2c0 !important;
  text-decoration: none !important;
  background: transparent;
  border: 1px solid transparent;
  padding: 5px 10px;
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ds-header-user a:hover,
.ds-header-user .btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
}

/* Pill-tab primary nav row, centered below the brand. */
.ds-pill-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
.ds-pill-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #b8af9b !important;
  text-decoration: none !important;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease,
    border-color 0.15s ease, transform 0.08s ease;
}
.ds-pill-nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.07);
}
.ds-pill-nav-item:active {
  transform: translateY(1px);
}
.ds-pill-nav-item-active {
  background: rgba(212, 175, 55, 0.12);
  color: #f3e9c6 !important;
  border-color: rgba(212, 175, 55, 0.28);
}
.ds-pill-nav-item-active:hover {
  background: rgba(212, 175, 55, 0.18);
  color: #fff5d8 !important;
}
.ds-pill-nav-item i {
  font-size: 0.95rem;
  opacity: 0.85;
}

/* Mobile: stack the pill nav under the brand without overflow. */
@media (max-width: 640px) {
  .ds-header-v2 {
    padding: 10px 14px 8px;
  }
  .ds-header-top {
    min-height: 44px;
  }
  .ds-brand-mark {
    height: 20px;
  }
  .ds-brand-lockup {
    gap: 6px;
  }
  .ds-wordmark {
    font-size: 1.15rem;
    letter-spacing: 0.22em;
    padding-left: 0.22em;
  }
  .ds-wordmark-by {
    font-size: 0.78rem;
  }
  .ds-pill-nav {
    flex-wrap: wrap;
    gap: 4px;
  }
  .ds-pill-nav-item {
    padding: 5px 12px;
    font-size: 0.85rem;
  }
}
