/* ShadowCore unified navigation
   One navigation surface at a time: fixed sidebar on desktop, drawer on mobile. */

:root {
  color-scheme: dark;
  --sc-nav-bg: #03060a;
  --sc-nav-panel: rgba(6, 12, 20, 0.98);
  --sc-nav-panel-soft: rgba(11, 20, 31, 0.86);
  --sc-nav-line: rgba(97, 255, 235, 0.15);
  --sc-nav-line-strong: rgba(97, 255, 235, 0.34);
  --sc-nav-text: #f3f8ff;
  --sc-nav-muted: #9ab0c0;
  --sc-nav-muted-2: #708796;
  --sc-nav-accent: #18f5df;
  --sc-nav-blue: #38bdf8;
  --sc-nav-green: #22c55e;
  --sc-nav-red: #fb7185;
  --sc-nav-amber: #f59e0b;
  --sc-sidebar-w: 292px;
  --sc-mobile-h: 62px;
  --sc-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.shadowcore-nav,
.shadowcore-time-strip,
.shadowcore-drawer,
.sc-breadcrumb,
.scv2-top,
.scv2-shell,
.scv2-mobile-panel,
#scCommandCenterShell {
  display: none !important;
}

body.sc-nav-v3 {
  min-height: 100vh;
  margin: 0;
  padding-top: 0 !important;
  padding-left: var(--sc-sidebar-w) !important;
  overflow-x: hidden !important;
  background:
    radial-gradient(circle at 12% -6%, rgba(24, 245, 223, 0.12), transparent 34rem),
    radial-gradient(circle at 92% 0%, rgba(167, 139, 250, 0.10), transparent 32rem),
    linear-gradient(135deg, #020407 0%, #07111b 52%, #030509 100%) !important;
  color: var(--sc-nav-text) !important;
  font-family: var(--sc-font) !important;
}

body.sc-nav-v3::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at top, black, transparent 78%);
}

body.sc-nav-v3::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(24, 245, 223, 0.025), transparent 46%, rgba(167, 139, 250, 0.03));
}

body.sc-nav-v3 .wrap,
body.sc-nav-v3 main,
body.sc-nav-v3 .container {
  max-width: min(1640px, calc(100vw - var(--sc-sidebar-w))) !important;
}

.scv3-sidebar,
.scv3-drawer,
.scv3-mobile-bar {
  color: var(--sc-nav-text);
  font-family: var(--sc-font);
}

.scv3-sidebar *,
.scv3-drawer *,
.scv3-mobile-bar * {
  box-sizing: border-box;
}

.scv3-sidebar [hidden],
.scv3-drawer [hidden] {
  display: none !important;
}

/* Desktop: the sidebar is the only global navigation surface. */
.scv3-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 99980;
  display: flex;
  width: var(--sc-sidebar-w);
  min-width: var(--sc-sidebar-w);
  flex-direction: column;
  padding: 16px 14px 14px;
  border-right: 1px solid var(--sc-nav-line);
  background:
    linear-gradient(180deg, rgba(3, 8, 14, 0.99), rgba(5, 11, 18, 0.97)),
    var(--sc-nav-bg);
  box-shadow: 22px 0 72px rgba(0, 0, 0, 0.34);
}

.scv3-brand-row {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 14px;
  border-bottom: 1px solid rgba(97, 255, 235, 0.10);
}

.scv3-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  color: var(--sc-nav-text);
  text-decoration: none;
}

.scv3-brand > span:first-child,
.scv3-mobile-brand span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--sc-nav-accent), var(--sc-nav-blue));
  color: #03110f;
  font-weight: 1000;
  letter-spacing: 0.04em;
  box-shadow: 0 0 28px rgba(24, 245, 223, 0.22);
}

.scv3-brand-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.scv3-brand-copy b {
  color: #fff;
  font-size: 0.98rem;
  letter-spacing: 0.025em;
  line-height: 1;
  text-transform: uppercase;
}

.scv3-brand-copy small {
  color: var(--sc-nav-accent);
  font-size: 0.65rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.scv3-close {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--sc-nav-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--sc-nav-text);
  font-size: 1.35rem;
  cursor: pointer;
}

.scv3-role-card {
  flex: 0 0 auto;
  margin: 14px 0 12px;
  padding: 13px;
  border: 1px solid rgba(24, 245, 223, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(24, 245, 223, 0.10), rgba(56, 189, 248, 0.045)),
    rgba(4, 10, 17, 0.68);
}

.scv3-role-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--sc-nav-muted-2);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.scv3-role-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.scv3-role-line b {
  color: #fff;
  font-size: 1.03rem;
}

.scv3-role-line i {
  color: #bbf7d0;
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.scv3-role-card small {
  display: block;
  margin-top: 4px;
  color: var(--sc-nav-muted);
  font-size: 0.69rem;
  line-height: 1.35;
}

.scv3-search-wrap {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  padding: 9px 10px;
  border: 1px solid var(--sc-nav-line);
  border-radius: 13px;
  background: rgba(10, 18, 28, 0.82);
  color: var(--sc-nav-muted-2);
}

.scv3-search-wrap:focus-within {
  border-color: rgba(24, 245, 223, 0.52);
  box-shadow: 0 0 0 3px rgba(24, 245, 223, 0.08);
}

.scv3-search-wrap > span {
  color: var(--sc-nav-accent);
  font-size: 1rem;
  font-weight: 900;
}

.scv3-search-wrap input {
  width: 100%;
  min-width: 0;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--sc-nav-text) !important;
  font: inherit;
  font-size: 0.82rem;
}

.scv3-search-wrap input::placeholder {
  color: var(--sc-nav-muted-2);
}

.scv3-search-wrap kbd {
  min-width: 22px;
  padding: 3px 5px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-bottom-color: rgba(148, 163, 184, 0.32);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--sc-nav-muted);
  font: 800 0.64rem/1 var(--sc-font);
  text-align: center;
}

.scv3-nav-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding: 0 4px 10px 0;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(97, 255, 235, 0.20) transparent;
}

.scv3-nav-list::-webkit-scrollbar {
  width: 8px;
}

.scv3-nav-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(97, 255, 235, 0.18);
}

.scv3-group {
  padding: 7px 0 8px;
}

.scv3-group + .scv3-group {
  border-top: 1px solid rgba(148, 163, 184, 0.075);
}

.scv3-group > header {
  display: grid;
  gap: 2px;
  padding: 7px 7px 6px;
}

.scv3-group > header b {
  color: #dbe9f2;
  font-size: 0.69rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scv3-group > header small {
  color: var(--sc-nav-muted-2);
  font-size: 0.63rem;
  line-height: 1.25;
}

.scv3-group-links {
  display: grid;
  gap: 3px;
}

.scv3-link {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--sc-nav-muted);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.scv3-link:hover {
  border-color: rgba(97, 255, 235, 0.19);
  background: rgba(24, 245, 223, 0.052);
  transform: translateX(2px);
}

.scv3-link.active,
.scv3-link[aria-current="page"] {
  border-color: rgba(24, 245, 223, 0.40);
  background: linear-gradient(135deg, rgba(24, 245, 223, 0.17), rgba(56, 189, 248, 0.075));
  box-shadow: inset 3px 0 0 var(--sc-nav-accent), 0 12px 28px rgba(0, 0, 0, 0.16);
}

.scv3-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(97, 255, 235, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--sc-nav-accent);
  font-size: 0.88rem;
  font-weight: 950;
}

.scv3-link.active .scv3-icon,
.scv3-link[aria-current="page"] .scv3-icon {
  border-color: rgba(24, 245, 223, 0.28);
  background: rgba(24, 245, 223, 0.11);
  color: #d9fffb;
}

.scv3-link-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.scv3-link-copy b {
  overflow: hidden;
  color: var(--sc-nav-text);
  font-size: 0.84rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scv3-link-copy small {
  overflow: hidden;
  color: var(--sc-nav-muted-2);
  font-size: 0.66rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scv3-no-results {
  margin: 12px 2px;
  padding: 16px 12px;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: 13px;
  color: var(--sc-nav-muted);
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: center;
}

.scv3-footer {
  flex: 0 0 auto;
  padding-top: 11px;
  border-top: 1px solid rgba(97, 255, 235, 0.10);
}

.scv3-session {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.028);
  color: var(--sc-nav-text);
  text-decoration: none;
}

.scv3-session > span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.scv3-session.on > span {
  background: var(--sc-nav-green);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.70);
}

.scv3-session.off > span {
  background: var(--sc-nav-amber);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.54);
}

.scv3-session b {
  font-size: 0.73rem;
}

.scv3-footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 7px;
}

.scv3-footer-actions button {
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.028);
  color: var(--sc-nav-muted);
  font: 850 0.7rem/1 var(--sc-font);
  cursor: pointer;
}

.scv3-footer-actions button:hover,
.scv3-close:hover {
  border-color: rgba(24, 245, 223, 0.42);
  background: rgba(24, 245, 223, 0.07);
  color: #fff;
}

.scv3-footer-actions button:last-child:hover {
  border-color: rgba(251, 113, 133, 0.40);
  background: rgba(251, 113, 133, 0.07);
  color: #fecdd3;
}

.scv3-link:focus-visible,
.scv3-brand:focus-visible,
.scv3-session:focus-visible,
.scv3-footer-actions button:focus-visible,
.scv3-close:focus-visible,
.scv3-mobile-menu:focus-visible,
.scv3-mobile-brand:focus-visible,
.scv3-overlay:focus-visible {
  outline: 2px solid rgba(24, 245, 223, 0.82);
  outline-offset: 2px;
}

/* Mobile chrome is hidden on desktop. */
.scv3-mobile-bar,
.scv3-drawer,
.scv3-overlay {
  display: none;
}

@media (max-width: 1049px) {
  body.sc-nav-v3 {
    padding-top: var(--sc-mobile-h) !important;
    padding-left: 0 !important;
  }

  body.sc-nav-v3 .wrap,
  body.sc-nav-v3 main,
  body.sc-nav-v3 .container {
    max-width: 100% !important;
  }

  .scv3-sidebar {
    display: none;
  }

  .scv3-mobile-bar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100000;
    display: grid;
    height: var(--sc-mobile-h);
    grid-template-columns: 40px 40px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 8px 11px;
    border-bottom: 1px solid var(--sc-nav-line);
    background: rgba(3, 8, 14, 0.94);
    box-shadow: 0 15px 42px rgba(0, 0, 0, 0.30);
    backdrop-filter: blur(18px);
  }

  .scv3-mobile-menu {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--sc-nav-line-strong);
    border-radius: 12px;
    background: rgba(24, 245, 223, 0.075);
    color: var(--sc-nav-text);
    font-size: 1.05rem;
    cursor: pointer;
  }

  .scv3-mobile-brand {
    display: inline-grid;
    text-decoration: none;
  }

  .scv3-mobile-brand span {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 0.8rem;
  }

  .scv3-mobile-current {
    display: grid;
    min-width: 0;
    gap: 1px;
  }

  .scv3-mobile-current small {
    overflow: hidden;
    color: var(--sc-nav-accent);
    font-size: 0.61rem;
    font-weight: 950;
    letter-spacing: 0.12em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .scv3-mobile-current b {
    overflow: hidden;
    color: #fff;
    font-size: 0.94rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .scv3-drawer {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100002;
    display: flex;
    width: min(360px, calc(100vw - 34px));
    flex-direction: column;
    padding: 16px 14px 14px;
    border-right: 1px solid var(--sc-nav-line-strong);
    background:
      linear-gradient(180deg, rgba(3, 8, 14, 0.995), rgba(6, 13, 21, 0.99)),
      var(--sc-nav-bg);
    box-shadow: 28px 0 82px rgba(0, 0, 0, 0.58);
    transform: translateX(-105%);
    transition: transform 0.20s ease;
  }

  .scv3-overlay {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.58);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.20s ease;
    backdrop-filter: blur(3px);
  }

  body.scv3-drawer-open {
    overflow: hidden !important;
  }

  body.scv3-drawer-open .scv3-drawer {
    transform: translateX(0);
  }

  body.scv3-drawer-open .scv3-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 560px) {
  :root {
    --sc-mobile-h: 58px;
  }

  .scv3-mobile-bar {
    height: var(--sc-mobile-h);
    grid-template-columns: 38px 38px minmax(0, 1fr);
    gap: 7px;
    padding: 7px 8px;
  }

  .scv3-mobile-menu,
  .scv3-mobile-brand span {
    width: 38px;
    height: 38px;
  }

  .scv3-drawer {
    width: min(340px, calc(100vw - 22px));
    padding: 13px 11px 11px;
  }

  .scv3-role-card {
    margin-top: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scv3-link,
  .scv3-drawer,
  .scv3-overlay {
    transition: none !important;
  }
}
