/**
 * Shared nav and layout — consistent spread across all pages.
 * Brand: Bridge AI OS (policy: brand/BRAND_GUIDELINES.md).
 * Design tokens (--primary, --accent, --bridge-blue, etc.) from unified-theme.css — load that first.
 */
:root {
  --brand-name: 'Bridge AI OS';
  --brand-product: ''; /* e.g. SupaCo — set on body or .supaco-flow to show */
  --footer-year: 2026;
}
.site-nav,
.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}
.site-nav a,
.nav a {
  text-decoration: none;
  font-size: 0.875rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.5rem;
}
.site-nav a:hover,
.nav a:hover {
  text-decoration: underline;
}
/* Linked nav (core nav): touch-friendly targets */
.linked-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.5rem;
}

/* Layout — even spread, consistent max-width and padding */
.layout-wrap {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) {
  .layout-wrap { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
  .layout-wrap { padding-left: 2rem; padding-right: 2rem; }
}

/* Pipeline badge — Install→Generate→Track status */
.pipeline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.375rem;
  text-decoration: none;
}
.pipeline-badge.pending { background: #f3f4f6; color: #6b7280; }
.pipeline-badge.active { background: #dbeafe; color: #1d4ed8; }
.pipeline-badge.done { background: #d1fae5; color: #047857; }

/* Breadcrumb: Dashboard → [Section] → [Page]. Use on all deep pages. */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
}
.breadcrumb a {
  color: var(--accent, #00D4FF);
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb .breadcrumb-sep {
  color: var(--text-muted, #9ca3af);
  user-select: none;
}
.breadcrumb .breadcrumb-current {
  color: var(--text, inherit);
  font-weight: 500;
}

/* Breadcrumb — Dashboard → Section → Page (use with nav-shared.css) */
.breadcrumb-wrap {
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
  margin-bottom: 0.5rem;
}
.breadcrumb-wrap a {
  color: var(--accent, #00D4FF);
  text-decoration: none;
}
.breadcrumb-wrap a:hover {
  text-decoration: underline;
}
.breadcrumb-wrap .sep {
  margin: 0 0.35rem;
  color: var(--text-secondary, #94a3b8);
}
.breadcrumb-wrap .current {
  color: var(--text-primary, #e2e8f0);
  font-weight: 500;
}

/* Optional SupaCo product line in footer */
.footer-brand-product:not(:empty)::before {
  content: ' · ';
  color: var(--text-secondary, #64748b);
}

/* Linked nav — hub navigation strip (All Frontends, Ports Hub, etc.) */
.linked-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color, #2a2a4a);
  font-size: 0.85rem;
}
.linked-nav a {
  color: var(--accent, #00D4FF);
  text-decoration: none;
}
.linked-nav a:hover {
  text-decoration: underline;
}
.linked-nav .ln-sep {
  color: var(--text-muted, #71717a);
  padding: 0 0.2rem;
  user-select: none;
}

/* Responsive core nav (hamburger on small viewports) */
.nav-core-responsive {
  display: block;
  position: relative;
  z-index: 50;
}
.nav-core-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}
.nav-core-brand {
  font-weight: 700;
  color: var(--text-primary, #e2e8f0) !important;
  text-decoration: none !important;
  white-space: nowrap;
  margin-right: auto;
}
.nav-core-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color, #2a2a4a);
  color: var(--text-primary, #e2e8f0);
  border-radius: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}
.nav-core-toggle:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}
.nav-core-desktop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.35rem;
}
.nav-core-menu {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 0 0.25rem;
  border-top: 1px solid var(--border-color, #2a2a4a);
  margin-top: 0.5rem;
}
.nav-core-menu[hidden] {
  display: none !important;
}
.nav-core-menu a {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
}
.nav-core-menu a:focus-visible,
.linked-nav a:focus-visible,
.nav-dd-trigger:focus-visible,
.nav-dd-link:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

/* Categorized dropdown menus */
.nav-core-categorized .nav-dd {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-dd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.35rem 0.65rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  color: var(--accent, #00D4FF);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}
.nav-dd-trigger:hover,
.nav-dd.open .nav-dd-trigger {
  border-color: var(--border-color, #2a2a4a);
  background: rgba(0, 102, 255, 0.08);
  color: var(--text-primary, #e2e8f0);
}
.nav-dd-chevron {
  font-size: 0.65rem;
  opacity: 0.8;
  transition: transform 0.18s ease;
}
.nav-dd.open .nav-dd-chevron {
  transform: rotate(180deg);
}
.nav-dd-panel {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  min-width: 12.5rem;
  padding: 0.35rem;
  background: var(--bg-card, #12182a);
  border: 1px solid var(--border-color, #2a2a4a);
  border-radius: 0.5rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  transform-origin: top center;
  animation: nav-dd-in 0.16s ease-out;
}
.nav-dd-panel[hidden] {
  display: none !important;
  animation: none;
}
@keyframes nav-dd-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Intentional motion — landing / hub presence (2–3, not noise) */
.bridge-motion-fade {
  animation: bridge-fade-up 0.55s ease-out both;
}
.bridge-motion-fade-delay {
  animation: bridge-fade-up 0.55s ease-out 0.12s both;
}
@keyframes bridge-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.nav-core-brand {
  transition: color 0.2s ease, letter-spacing 0.2s ease;
}
.nav-core-brand:hover {
  letter-spacing: 0.02em;
}
@media (prefers-reduced-motion: reduce) {
  .nav-dd-panel,
  .bridge-motion-fade,
  .bridge-motion-fade-delay,
  .nav-dd-chevron,
  .nav-core-brand {
    animation: none !important;
    transition: none !important;
  }
}
.nav-dd-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.4rem 0.65rem;
  border-radius: 0.35rem;
  color: var(--text-secondary, #a0a0b0) !important;
  text-decoration: none !important;
  white-space: nowrap;
}
.nav-dd-link:hover,
.nav-dd-link[aria-current="page"] {
  background: rgba(0, 212, 255, 0.1);
  color: var(--text-primary, #e2e8f0) !important;
}
.nav-core-mobile-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.nav-core-mobile-label {
  margin: 0.35rem 0 0.15rem;
  padding: 0 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #71717a);
}

@media (max-width: 768px) {
  .nav-core-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-core-desktop { display: none; }
  .nav-core-responsive { flex-wrap: nowrap; }
}

/* System status banner — diagnostic strip (landing, demo-suite, system-map) */
.system-status-banner {
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
  background: rgba(10, 22, 40, 0.9);
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--text-muted, #a1a1aa);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.system-status-banner.all-online { border-bottom-color: rgba(34, 197, 94, 0.3); }
.system-status-banner.degraded { border-bottom-color: rgba(234, 179, 8, 0.4); }
.system-status-banner-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem; }
.system-status-label { font-weight: 600; color: var(--accent, #00D4FF); }
.system-status-item { display: inline-flex; align-items: center; gap: 0.25rem; }
.system-status-link { color: var(--accent, #00D4FF); text-decoration: none; }
.system-status-link:hover { text-decoration: underline; }
.system-status-count { font-size: 0.75rem; opacity: 0.9; }
.system-status-ts { margin-left: auto; font-size: 0.75rem; opacity: 0.85; }
.system-status-banner .status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.system-status-banner .status-dot.online { background: #22c55e; }
.system-status-banner .status-dot.offline { background: #ef4444; }
.system-status-banner .status-dot.unknown { background: #71717a; }

/* Vocal collecting AI orchestrator — on all pages */
.vocal-orchestrator-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  background: rgba(10, 22, 40, 0.95);
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--text-muted, #a1a1aa);
}
.vocal-orchestrator-bar .vocal-orchestrator-label { font-weight: 600; color: var(--accent, #00D4FF); }
.vocal-orchestrator-bar .vocal-orchestrator-desc { color: var(--text-muted, #94a3b8); }
.vocal-orchestrator-mic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 50%;
  color: var(--accent, #00D4FF);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.vocal-orchestrator-mic:hover { background: rgba(99, 102, 241, 0.35); transform: scale(1.05); }
.vocal-orchestrator-bar.listening .vocal-orchestrator-mic { background: rgba(239, 68, 68, 0.25); border-color: rgba(239, 68, 68, 0.5); animation: vocal-pulse 1s ease infinite; }
@keyframes vocal-pulse { 50% { opacity: 0.8; } }
.vocal-orchestrator-status { margin-left: 0.25rem; }
.vocal-orchestrator-status.vocal-status-active { color: #22c55e; }
.vocal-orchestrator-status.vocal-status-error { color: #ef4444; }
.vocal-orchestrator-link { color: var(--accent, #00D4FF); text-decoration: none; }
.vocal-orchestrator-link:hover { text-decoration: underline; }
.vocal-mic-icon { font-size: 1rem; }
