/* R68 global-shell ownership: legacy page headers may keep their page title,
   but old global action strips never compete with the canonical navbar. */
.admin-nav-row,
#e2b-executive-launcher,
#phase2-hr-admin-tools-link,
#phase2-hr-admin-tools-nav,
header .header-row > .actions,
header .head > .nav,
header .topin > .nav,
header .header > .actions,
.page-header > .header-nav {
  display: none !important;
}

:root {
  --p2nav-bg: #111827;
  --p2nav-bg-soft: #1f2937;
  --p2nav-border: rgba(255,255,255,.12);
  --p2nav-text: #f8fafc;
  --p2nav-muted: #cbd5e1;
  --p2nav-accent: #818cf8;
  --p2nav-accent-strong: #6366f1;
  --p2nav-surface: #ffffff;
  --p2nav-line: #e2e8f0;
  --p2nav-version: "R68.2.0";
}
#phase2-global-navigation {
  position: sticky;
  top: 0;
  z-index: 1000;
  color: var(--p2nav-text);
  background:
    radial-gradient(circle at 15% -30%, rgba(99,102,241,.42), transparent 36%),
    linear-gradient(120deg, #0f172a, #172554 72%, #312e81);
  box-shadow: 0 8px 28px rgba(15,23,42,.22);
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans TC",Arial,sans-serif;
}
#phase2-global-navigation * { box-sizing: border-box; }
.p2nav-main {
  max-width: 1440px;
  min-height: 68px;
  margin: 0 auto;
  padding: 10px 18px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 18px;
}
.p2nav-brand {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}
.p2nav-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.16);
  font-weight: 900;
}
.p2nav-brand-copy strong {
  display: block;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: .01em;
}
.p2nav-brand-copy span {
  display: block;
  color: var(--p2nav-muted);
  font-size: 11px;
  margin-top: 3px;
}
.p2nav-links {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.p2nav-link {
  color: #dbeafe;
  text-decoration: none;
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
  border: 1px solid transparent;
}
.p2nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.1);
}
.p2nav-link.is-active {
  color: #fff;
  background: rgba(99,102,241,.58);
  border-color: rgba(199,210,254,.4);
}
.p2nav-dropdown {
  position: relative;
  min-width: 0;
}
.p2nav-dropdown > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.p2nav-dropdown > summary::-webkit-details-marker { display: none; }
.p2nav-dropdown > summary::after {
  content: "▾";
  color: #a5b4fc;
  font-size: 10px;
  transition: transform .15s ease;
}
.p2nav-dropdown[open] > summary::after { transform: rotate(180deg); }
.p2nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 1010;
  min-width: 238px;
  max-width: min(360px, 88vw);
  max-height: min(70vh, 560px);
  overflow: auto;
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15,23,42,.28);
}
.p2nav-dropdown-link {
  display: block;
  padding: 9px 11px;
  border-radius: 8px;
  color: #334155;
  text-decoration: none;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}
.p2nav-dropdown-link:hover,
.p2nav-dropdown-link:focus-visible {
  color: #312e81;
  background: #eef2ff;
  outline: none;
}
.p2nav-dropdown-link.is-active {
  color: #312e81;
  background: #e0e7ff;
  box-shadow: inset 3px 0 #6366f1;
}
.p2nav-account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-width: 180px;
}
.p2nav-user {
  min-width: 0;
  text-align: right;
}
.p2nav-user strong {
  display: block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.p2nav-user span {
  display: block;
  color: var(--p2nav-muted);
  font-size: 10px;
  margin-top: 2px;
}
.p2nav-logout,
.p2nav-menu {
  border: 1px solid var(--p2nav-border);
  color: #fff;
  background: rgba(255,255,255,.1);
  border-radius: 9px;
  padding: 8px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.p2nav-logout:hover,
.p2nav-menu:hover { background: rgba(255,255,255,.18); }
.p2nav-menu { display: none; }
.p2nav-context {
  border-top: 1px solid var(--p2nav-border);
  background: rgba(15,23,42,.56);
}
.p2nav-context-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  gap: 2px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: thin;
}
.p2nav-context-label {
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 900;
  padding: 11px 12px 11px 0;
  white-space: nowrap;
}
.p2nav-context-link {
  color: #dbeafe;
  text-decoration: none;
  padding: 11px 12px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 760;
  border-bottom: 3px solid transparent;
}
.p2nav-context-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.p2nav-context-link.is-active {
  color: #fff;
  border-bottom-color: #a5b4fc;
  background: rgba(99,102,241,.18);
}
.p2nav-route-title {
  max-width: 1440px;
  margin: 0 auto;
  padding: 7px 18px 9px;
  color: #cbd5e1;
  font-size: 11px;
  border-top: 1px solid rgba(255,255,255,.05);
}
.p2nav-legacy-nav-hidden { display: none !important; }
body.phase2-route-workspace > div[x-data] > header.top,
body.phase2-route-admin-home .admin-topbar {
  display: none !important;
}
body.phase2-global-nav-mounted {
  --phase2-global-nav-version: "R59.1.0";
}
@media (max-width: 1060px) {
  .p2nav-main {
    grid-template-columns: auto auto 1fr;
  }
  .p2nav-menu { display: inline-flex; }
  .p2nav-links {
    display: none;
    position: absolute;
    top: 62px;
    left: 12px;
    right: 12px;
    padding: 10px;
    border: 1px solid var(--p2nav-border);
    border-radius: 13px;
    background: #172033;
    box-shadow: 0 18px 42px rgba(15,23,42,.35);
    flex-direction: column;
    align-items: stretch;
    z-index: 1002;
  }
  #phase2-global-navigation.p2nav-open .p2nav-links { display: flex; }
  .p2nav-link { padding: 11px 12px; }
  .p2nav-dropdown { width: 100%; }
  .p2nav-dropdown > summary { width: 100%; justify-content: space-between; }
  .p2nav-dropdown-menu {
    position: static;
    min-width: 0;
    max-width: none;
    max-height: none;
    margin: 4px 0 5px;
    border-color: rgba(255,255,255,.12);
    background: rgba(15,23,42,.46);
    box-shadow: none;
  }
  .p2nav-dropdown-link { color: #dbeafe; }
  .p2nav-dropdown-link:hover,
  .p2nav-dropdown-link:focus-visible,
  .p2nav-dropdown-link.is-active { color: #fff; background: rgba(99,102,241,.42); }
  .p2nav-account { min-width: 0; }
}
@media (max-width: 620px) {
  .p2nav-main {
    grid-template-columns: minmax(0,1fr) auto;
    min-height: 60px;
    padding: 9px 12px;
    gap: 8px;
  }
  .p2nav-brand-copy span { display: none; }
  .p2nav-menu { grid-column: 2; grid-row: 1; }
  .p2nav-account {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 7px;
    justify-content: space-between;
  }
  .p2nav-user { text-align: left; }
  .p2nav-user strong { max-width: 230px; }
  .p2nav-links { top: 55px; }
  .p2nav-context-inner { padding: 0 10px; }
  .p2nav-route-title { padding-left: 12px; padding-right: 12px; }
}

/* PHASE2_HR_R59_GLOBAL_NAVIGATION_DEDUP=ENABLED */

/* R68_GLOBAL_NAVIGATION_CARPET_UNIFICATION=ENABLED */
